Skip to content

Commit

Permalink
build: update sdk
Browse files Browse the repository at this point in the history
  • Loading branch information
pheekus committed May 8, 2024
1 parent f7d746c commit d994c1a
Show file tree
Hide file tree
Showing 6 changed files with 7 additions and 27 deletions.
8 changes: 4 additions & 4 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
"prepack": "npm run lint && rimraf dist && node ./.build/compile-for-npm.js && rollup -c"
},
"dependencies": {
"@foxy.io/sdk": "^1.11.2",
"@foxy.io/sdk": "^1.11.3",
"@open-wc/lit-helpers": "^0.3.12",
"@open-wc/scoped-elements": "^1.2.1",
"@polymer/iron-icons": "^3.0.1",
Expand Down
8 changes: 1 addition & 7 deletions src/elements/public/CouponForm/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,4 @@ export type TransactionPageHrefGetter = (
transaction: Resource<Rels.Transaction, { zoom: 'items' }>
) => string | null;

export type Data = Resource<Rels.Coupon> & {
// TODO: remove this once SDK is updated
item_option_restrictions: null | Record<string, string[]>;
shared_codes_allowed: boolean;
inclusive_tax_rate: number;
_links: { 'fx:attributes': { href: string } };
};
export type Data = Resource<Rels.Coupon>;
Original file line number Diff line number Diff line change
Expand Up @@ -31,18 +31,12 @@ export class CustomerPortalSettingsForm extends Base<Data> {
({ allowedOrigins: v = [] }) => {
return v.every(isOrigin) || 'allowed-origins:v8n_invalid';
},
// TODO remove this once SDK types are fixed
// @ts-expect-error SDK types are incorrect
({ jwtSharedSecret: v }) => {
return !v || /^[a-z0-9-]+$/.test(v) || 'jwt-shared-secret:v8n_invalid';
},
// TODO remove this once SDK types are fixed
// @ts-expect-error SDK types are incorrect
({ jwtSharedSecret: v }) => {
return !v || v.length >= 40 || 'jwt-shared-secret:v8n_too_short';
},
// TODO remove this once SDK types are fixed
// @ts-expect-error SDK types are incorrect
({ jwtSharedSecret: v }) => {
return !v || v.length <= 100 || 'jwt-shared-secret:v8n_too_long';
},
Expand Down
5 changes: 0 additions & 5 deletions src/elements/public/GiftCardCodeForm/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,6 @@ import type { Resource } from '@foxy.io/sdk/core';
import type { Rels } from '@foxy.io/sdk/backend';

export type Data = Resource<Rels.GiftCardCode> & {
_links: {
// TODO simplify when SDK is updated
/** Present only when the gift card code is linked to a customer. */
'fx:customer': { href: string };
};
customer_id?: number | string;
};

Expand Down
5 changes: 1 addition & 4 deletions src/elements/public/GiftCardForm/types.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,4 @@
import type { Resource } from '@foxy.io/sdk/core';
import type { Rels } from '@foxy.io/sdk/backend';

// TODO simplify once SDK is updated
export type Data = Resource<Rels.GiftCard> & {
_links: { 'fx:attributes': { href: string } };
};
export type Data = Resource<Rels.GiftCard>;

0 comments on commit d994c1a

Please sign in to comment.