@foxy.io/sdk 1.9.2 → 1.9.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -29,6 +29,17 @@ export interface GiftCard extends Graph {
29
29
  expires_after: string | null;
30
30
  /** If you want to limit which products can use this gift card, you can enter a comma separated listed of product codes or partial product codes using `*` as a wild card at the beginning or end of the value. So `abc123`, `fun_*`, `*-small` would match `abc123`, `fun_` and `fun_times`, and `example-small`. It wouldn't match `abc12`, `abc1234`, `fun`, or `good-smalls`. Optional. 5000 characters or less. */
31
31
  product_code_restrictions: string | null;
32
+ /** SKU used to add the gift card to the cart in order to buy it. Optional. 200 characters or less. */
33
+ sku: string | null;
34
+ /** Used for provisioning the gift card. */
35
+ provisioning_config: {
36
+ /** Set to `true` to activate automatic code provisioning for this gift card. */
37
+ allow_autoprovisioning: boolean;
38
+ /** Minimum initial gift card code balance. When this gift card is added to a cart, its price will have to be greater or equal to this value. */
39
+ initial_balance_min: number;
40
+ /** Maximum initial gift card code balance. When this gift card is added to a cart, its price will have to be less or equal to this value. */
41
+ initial_balance_max: number;
42
+ } | null;
32
43
  /** The date this resource was created. ISO date. Read only. */
33
44
  date_created: string | null;
34
45
  /** The date this resource was last modified. ISO date. Read only. */
@@ -3,6 +3,7 @@ import type { GiftCard } from './gift_card';
3
3
  import type { GiftCardCodeLogs } from './gift_card_code_logs';
4
4
  import type { Graph } from '../../core';
5
5
  import type { Store } from './store';
6
+ import type { Transaction } from './transaction';
6
7
 
7
8
  export interface GiftCardCode extends Graph {
8
9
  curie: 'fx:gift_card_code';
@@ -18,6 +19,8 @@ export interface GiftCardCode extends Graph {
18
19
  'fx:gift_card': GiftCard;
19
20
  /** Transactions using this gift card code. */
20
21
  'fx:gift_card_code_logs': GiftCardCodeLogs;
22
+ /** Transaction that resulted in the creation of this gift card code, if applicable. */
23
+ 'fx:provisioned_by_transaction_detail_id': Transaction;
21
24
  };
22
25
 
23
26
  props: {
@@ -0,0 +1,43 @@
1
+ import type { GiftCard } from './gift_card';
2
+ import type { GiftCardCode } from './gift_card_code';
3
+ import type { Graph } from '../../core';
4
+ import type { Store } from './store';
5
+ import type { Transaction } from './transaction';
6
+
7
+ export interface GiftCardCodeLog extends Graph {
8
+ curie: 'fx:gift_card_code_log';
9
+
10
+ links: {
11
+ /** This resource. */
12
+ 'self': GiftCardCodeLog;
13
+ /** Store this resource belongs to. */
14
+ 'fx:store': Store;
15
+ /** Transaction involving the relevant gift card code. */
16
+ 'fx:transaction': Transaction;
17
+ /** Gift card this log belongs to. */
18
+ 'fx:gift_card': GiftCard;
19
+ /** Gift card code this log was created for. */
20
+ 'fx:gift_card_code': GiftCardCode;
21
+ };
22
+
23
+ props: {
24
+ /** User id that made the change, for store admin or API initiated balance adjustments. Integer, optional. */
25
+ user_id: number | null;
26
+ /** External id associated with gift card. If you maintain gift card balances across multiple systems, you can use this field to track non-Foxy transactions. Optional. 50 characters or less. */
27
+ external_id: string | null;
28
+ /** The Foxy transaction ID associated with gift card usage. Integer, optional. */
29
+ transaction_id: number | null;
30
+ /** Balance adjustment for the gift card. Decimal, optional. */
31
+ balance_adjustment: number | null;
32
+ /** Source that made the change for the gift card. Readonly. */
33
+ source: string | null;
34
+ /** The date this resource was created. Readonly. */
35
+ date_created: string | null;
36
+ /** The date this resource was last modified. Readonly. */
37
+ date_modified: string | null;
38
+ };
39
+
40
+ zooms: {
41
+ gift_card?: GiftCard;
42
+ };
43
+ }
@@ -1,10 +1,10 @@
1
1
  import type { CollectionGraphLinks, CollectionGraphProps } from '../../core/defaults';
2
+ import type { GiftCardCodeLog } from './gift_card_code_log';
2
3
  import type { Graph } from '../../core';
3
- import type { Transaction } from './transaction';
4
4
 
5
5
  export interface GiftCardCodeLogs extends Graph {
6
6
  curie: 'fx:gift_card_code_logs';
7
7
  links: CollectionGraphLinks<GiftCardCodeLogs>;
8
8
  props: CollectionGraphProps;
9
- child: Transaction;
9
+ child: GiftCardCodeLog;
10
10
  }
@@ -1,3 +1,4 @@
1
+ import type { EmailTemplate } from './email_template';
1
2
  import type { EmailTemplates } from './email_templates';
2
3
  import type { Graph } from '../../core';
3
4
  import type { Store } from './store';
@@ -15,6 +16,8 @@ export interface ItemCategory extends Graph {
15
16
  'fx:email_templates': EmailTemplates;
16
17
  /** Related tax item categories. */
17
18
  'fx:tax_item_categories': TaxItemCategories;
19
+ /** Gift recipient email template for this item category, if applicable. */
20
+ 'fx:gift_recipient_email_template': EmailTemplate;
18
21
  };
19
22
 
20
23
  props: {
@@ -22,12 +25,14 @@ export interface ItemCategory extends Graph {
22
25
  admin_email_template_uri: string;
23
26
  /** The full API URI of the email template used by this category for sending an additional customer email if send_customer_email is true. */
24
27
  customer_email_template_uri: string;
28
+ /** The full API URI of the email template used by this category for sending an additional customer email for gift items that are in the cart. URL, optional. */
29
+ gift_recipient_email_template_uri: string | null;
25
30
  /** The category code used when applying this item category to the cart. */
26
31
  code: string;
27
32
  /** The name of this category. */
28
33
  name: string;
29
- /** The delivery type of the items in this category. */
30
- item_delivery_type: string;
34
+ /** The delivery type of the items in this category. Required. Defaults to `notshipped`. */
35
+ item_delivery_type: 'shipped' | 'downloaded' | 'flat_rate' | 'pickup' | 'notshipped';
31
36
  /** Determines how many times the same customer can attempt to download a purchased downloadable item before they are given an error. */
32
37
  max_downloads_per_customer: number;
33
38
  /** Determines how long in hours after the initial purchase a customer can attempt to download a purchased downloadable item before they are given an error. Some helpful values include: 1 day = 24 hours, 1 Week = 168 hours, 1 Month = 672 hours, 6 Months = 4032 hours */
@@ -1,3 +1,5 @@
1
+ import type { Attributes } from './attributes';
2
+ import type { CustomFields } from './custom_fields';
1
3
  import type { Customer } from './customer';
2
4
  import type { CustomerAddress } from './customer_address';
3
5
  import type { Graph } from '../../core';
@@ -24,6 +26,10 @@ export interface Shipment extends Graph {
24
26
  'fx:transaction': Transaction;
25
27
  /** Customer's address. */
26
28
  'fx:customer_address': CustomerAddress;
29
+ /** Custom fields associated with this shipment. */
30
+ 'fx:custom_fields': CustomFields;
31
+ /** Attributes associated with this shipment. */
32
+ 'fx:attributes': Attributes;
27
33
  };
28
34
 
29
35
  props: {
@@ -66,4 +72,10 @@ export interface Shipment extends Graph {
66
72
  /** The date this resource was last modified. */
67
73
  date_modified: string | null;
68
74
  };
75
+
76
+ zooms: {
77
+ custom_fields?: CustomFields;
78
+ attributes?: Attributes;
79
+ items?: Items;
80
+ };
69
81
  }
@@ -39,25 +39,25 @@ export interface StoreShippingMethod extends Graph {
39
39
  /** The full API URI of the shipping method defined in our property helpers. */
40
40
  shipping_method_uri: string;
41
41
  /** The full API URI of the shipping method container defined in our property helpers. Each shipping method will have it's own shipping containers. */
42
- shipping_container_uri: string;
42
+ shipping_container_uri?: string;
43
43
  /** The full API URI of the shipping method drop type defined in our property helpers. Each shipping method will have it's own shipping drop types. */
44
- shipping_drop_type_uri: string;
45
- /** If using account specific rates, enter your shipping account id here. */
46
- accountid: string;
44
+ shipping_drop_type_uri?: string;
45
+ /** If using account specific rates, enter your shipping account id here. If using the `CUSTOM-ENDPOINT-POST` method, enter your endpoint URL here. */
46
+ accountid?: string | null;
47
47
  /** If using account specific rates, enter your shipping account password here. */
48
- password: string;
48
+ password?: string | null;
49
49
  /** If using account specific rates, enter your shipping account meter number here, if applicable. */
50
- meter_number: string;
50
+ meter_number?: string | null;
51
51
  /** If using account specific rates, enter your shipping account authentication key here, if applicable. */
52
- authentication_key: string;
52
+ authentication_key?: string | null;
53
53
  /** Set to true if you want this shipping method to apply to domestic shipping rate requests. <br>Note: This value is read only `true` for `CUSTOM-CODE`. */
54
- use_for_domestic: string;
54
+ use_for_domestic: boolean;
55
55
  /** Set to true if you want this shipping method to apply to international shipping rate requests. <br>Note: This value is read only `true` for `CUSTOM-CODE`. */
56
- use_for_international: string;
56
+ use_for_international: boolean;
57
57
  /** For the `CUSTOM-CODE` shipping method. JavaScript used to create and modify shipping rates. */
58
- custom_code: string;
58
+ custom_code?: string;
59
59
  /** For the `CUSTOM-CODE` shipping method. Values are `deploying`, `deployed`, and `error`. */
60
- deployment_status: 'deploying' | 'deployed' | 'error';
60
+ deployment_status?: 'deploying' | 'deployed' | 'error';
61
61
  /** The date this resource was created. */
62
62
  date_created: string | null;
63
63
  /** The date this resource was last modified. */
@@ -65,9 +65,9 @@ export interface StoreShippingMethod extends Graph {
65
65
  };
66
66
 
67
67
  zooms: {
68
- store_shipping_services: StoreShippingServices;
69
- shipping_container: ShippingContainer;
70
- shipping_drop_type: ShippingDropType;
71
- shipping_method: ShippingMethod;
68
+ store_shipping_services?: StoreShippingServices;
69
+ shipping_container?: ShippingContainer;
70
+ shipping_drop_type?: ShippingDropType;
71
+ shipping_method?: ShippingMethod;
72
72
  };
73
73
  }
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@foxy.io/sdk",
3
3
  "type": "commonjs",
4
- "version": "1.9.2",
4
+ "version": "1.9.3",
5
5
  "description": "Universal SDK for a full server-side and a limited in-browser access to Foxy hAPI.",
6
6
  "main": "dist/cjs/index.js",
7
7
  "module": "dist/esm/index.js",
@@ -42,7 +42,7 @@
42
42
  "build:cdn": "webpack",
43
43
  "build:cjs": "tsc --outdir \"dist/cjs\"",
44
44
  "build:esm": "ttsc --project tsconfig.esm.json --outdir \"dist/esm\" && copyfiles --up 1 \"./build/esm/**/*\" \"./dist\"",
45
- "build:docs": "typedoc --excludePrivate --ignoreCompilerErrors --mode library --out docs src/index.ts",
45
+ "build:docs": "typedoc --excludePrivate --out docs src/index.ts",
46
46
  "build:types": "tsc --declarationdir \"dist/types\" --declaration --emitdeclarationonly && copyfiles --up 1 \"./src/**/*.d.ts\" \"./dist/types\"",
47
47
  "prepack": "rimraf dist && run-p \"build:!(docs)\""
48
48
  },
@@ -88,7 +88,7 @@
88
88
  "ts-loader": "^8.0.9",
89
89
  "ts-node": "^9.1.1",
90
90
  "ttypescript": "^1.5.12",
91
- "typedoc": "0.17.0-3",
91
+ "typedoc": "^0.22.18",
92
92
  "typescript": "^4.0.3",
93
93
  "webpack": "^5.4.0",
94
94
  "webpack-cli": "^4.2.0",