@foxy.io/sdk 1.6.0 → 1.7.0

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.
Files changed (83) hide show
  1. package/README.md +4 -4
  2. package/dist/cdn/FoxySDKCustomer.js +1 -1
  3. package/dist/cjs/backend/API.js +2 -2
  4. package/dist/cjs/core/API/Node.js +11 -11
  5. package/dist/esm/backend/API.js +2 -2
  6. package/dist/esm/core/API/Node.js +11 -11
  7. package/dist/types/backend/API.d.ts +2 -2
  8. package/dist/types/backend/Graph/applied_coupon_code.d.ts +2 -2
  9. package/dist/types/backend/Graph/applied_tax.d.ts +2 -2
  10. package/dist/types/backend/Graph/attribute.d.ts +2 -2
  11. package/dist/types/backend/Graph/billing_address.d.ts +2 -2
  12. package/dist/types/backend/Graph/cart.d.ts +2 -2
  13. package/dist/types/backend/Graph/cart_include_template.d.ts +2 -2
  14. package/dist/types/backend/Graph/cart_template.d.ts +2 -2
  15. package/dist/types/backend/Graph/checkout_template.d.ts +2 -2
  16. package/dist/types/backend/Graph/client.d.ts +2 -2
  17. package/dist/types/backend/Graph/coupon.d.ts +2 -2
  18. package/dist/types/backend/Graph/coupon_code.d.ts +2 -2
  19. package/dist/types/backend/Graph/coupon_code_transaction.d.ts +2 -2
  20. package/dist/types/backend/Graph/coupon_detail.d.ts +2 -2
  21. package/dist/types/backend/Graph/coupon_item_category.d.ts +2 -2
  22. package/dist/types/backend/Graph/custom_field.d.ts +2 -2
  23. package/dist/types/backend/Graph/customer.d.ts +2 -2
  24. package/dist/types/backend/Graph/customer_address.d.ts +4 -4
  25. package/dist/types/backend/Graph/customer_portal_settings.d.ts +2 -2
  26. package/dist/types/backend/Graph/default_payment_method.d.ts +2 -2
  27. package/dist/types/backend/Graph/discount.d.ts +2 -2
  28. package/dist/types/backend/Graph/discount_detail.d.ts +2 -2
  29. package/dist/types/backend/Graph/downloadable.d.ts +2 -2
  30. package/dist/types/backend/Graph/downloadable_purchase.d.ts +2 -2
  31. package/dist/types/backend/Graph/email_template.d.ts +2 -2
  32. package/dist/types/backend/Graph/error_entry.d.ts +2 -2
  33. package/dist/types/backend/Graph/fraud_protection.d.ts +2 -2
  34. package/dist/types/backend/Graph/hosted_payment_gateways_helper.d.ts +56 -0
  35. package/dist/types/backend/Graph/integration.d.ts +10 -10
  36. package/dist/types/backend/Graph/item.d.ts +2 -2
  37. package/dist/types/backend/Graph/item_category.d.ts +2 -2
  38. package/dist/types/backend/Graph/item_option.d.ts +2 -2
  39. package/dist/types/backend/Graph/language_override.d.ts +2 -2
  40. package/dist/types/backend/Graph/language_strings.d.ts +1 -5
  41. package/dist/types/backend/Graph/native_integration.d.ts +2 -2
  42. package/dist/types/backend/Graph/payment.d.ts +2 -2
  43. package/dist/types/backend/Graph/payment_gateway.d.ts +2 -2
  44. package/dist/types/backend/Graph/payment_gateways_helper.d.ts +56 -0
  45. package/dist/types/backend/Graph/payment_method_expiring.d.ts +2 -2
  46. package/dist/types/backend/Graph/payment_method_set.d.ts +2 -2
  47. package/dist/types/backend/Graph/payment_method_set_fraud_protection.d.ts +2 -2
  48. package/dist/types/backend/Graph/payment_method_set_hosted_payment_gateway.d.ts +2 -2
  49. package/dist/types/backend/Graph/property_helpers.d.ts +4 -4
  50. package/dist/types/backend/Graph/receipt_template.d.ts +2 -2
  51. package/dist/types/backend/Graph/regions.d.ts +0 -2
  52. package/dist/types/backend/Graph/shipment.d.ts +2 -2
  53. package/dist/types/backend/Graph/shipping_container.d.ts +2 -2
  54. package/dist/types/backend/Graph/shipping_drop_type.d.ts +2 -2
  55. package/dist/types/backend/Graph/shipping_method.d.ts +2 -2
  56. package/dist/types/backend/Graph/shipping_service.d.ts +2 -2
  57. package/dist/types/backend/Graph/store.d.ts +2 -2
  58. package/dist/types/backend/Graph/store_shipping_method.d.ts +2 -2
  59. package/dist/types/backend/Graph/store_shipping_service.d.ts +2 -2
  60. package/dist/types/backend/Graph/store_version.d.ts +21 -3
  61. package/dist/types/backend/Graph/subscription.d.ts +2 -2
  62. package/dist/types/backend/Graph/subscription_settings.d.ts +2 -2
  63. package/dist/types/backend/Graph/tax.d.ts +2 -2
  64. package/dist/types/backend/Graph/tax_item_category.d.ts +2 -2
  65. package/dist/types/backend/Graph/template_config.d.ts +2 -2
  66. package/dist/types/backend/Graph/template_set.d.ts +2 -2
  67. package/dist/types/backend/Graph/transaction.d.ts +2 -2
  68. package/dist/types/backend/Graph/transaction_log.d.ts +1 -1
  69. package/dist/types/backend/Graph/user.d.ts +2 -2
  70. package/dist/types/backend/Graph/user_access.d.ts +2 -2
  71. package/dist/types/backend/Rels.d.ts +2 -0
  72. package/dist/types/backend/createSSOURL.d.ts +1 -1
  73. package/dist/types/core/Resource/Link.d.ts +1 -1
  74. package/dist/types/customer/Graph/attribute.d.ts +2 -2
  75. package/dist/types/customer/Graph/customer_address.d.ts +4 -4
  76. package/dist/types/customer/Graph/customer_portal_settings.d.ts +2 -2
  77. package/dist/types/customer/Graph/default_payment_method.d.ts +2 -2
  78. package/dist/types/customer/Graph/index.d.ts +2 -2
  79. package/dist/types/customer/Graph/item.d.ts +2 -2
  80. package/dist/types/customer/Graph/subscription.d.ts +2 -2
  81. package/dist/types/customer/Graph/transaction.d.ts +2 -2
  82. package/dist/types/customer/Graph/transaction_template.d.ts +2 -2
  83. package/package.json +1 -1
@@ -36,7 +36,7 @@ const Core = __importStar(require("../core/index.js"));
36
36
  const cross_fetch_1 = require("cross-fetch");
37
37
  const v8n_js_1 = require("../core/v8n.js");
38
38
  const fake_storage_1 = __importDefault(require("fake-storage"));
39
- /** JS SDK for building backends with [Foxy Hypermedia API](https://api.foxycart.com/docs). Hypermedia API is designed to give you complete control over all aspects of your Foxy accounts, whether working with a single store or automating the provisioning of thousands. Anything you can do within the Foxy administration, you can also do through the API. This means that you can embed Foxy into any application (CMS, LMS, CRM, etc.) and expose as much or as little of Foxy's functionality as desired. */
39
+ /** JS SDK for building backends with [Foxy Hypermedia API](https://api.foxy.io/docs). Hypermedia API is designed to give you complete control over all aspects of your Foxy accounts, whether working with a single store or automating the provisioning of thousands. Anything you can do within the Foxy administration, you can also do through the API. This means that you can embed Foxy into any application (CMS, LMS, CRM, etc.) and expose as much or as little of Foxy's functionality as desired. */
40
40
  class API extends Core.API {
41
41
  constructor(params) {
42
42
  var _a, _b, _c, _d;
@@ -125,7 +125,7 @@ class API extends Core.API {
125
125
  exports.API = API;
126
126
  API.REFRESH_THRESHOLD = 5 * 60 * 1000;
127
127
  API.ACCESS_TOKEN = 'access_token';
128
- API.BASE_URL = new URL('https://api.foxycart.com/');
128
+ API.BASE_URL = new URL('https://api.foxy.io/');
129
129
  API.VERSION = '1';
130
130
  API.v8n = {
131
131
  classConstructor: v8n_js_1.v8n().schema({
@@ -197,18 +197,18 @@ class Node {
197
197
  }
198
198
  const response = yield this._fetch(baseURL.toString());
199
199
  if (response.ok) {
200
- const json = yield response.json();
201
- const url = new URL(json._links[curie].href);
202
- const reducedPath = [url, ...this._path.slice(2)];
203
- this._cache.setItem(key, url.toString());
204
- this._console.trace(`Cached ${url.toString()} for ${key}.`);
205
- this._console.success(`Resolved ${key} to ${url.toString()} online.`);
206
- return new Node(Object.assign(Object.assign({}, config), { path: reducedPath }))._resolve();
207
- }
208
- else {
209
- this._console.error(`Failed to resolve ${key}.`);
210
- throw new ResolutionError_js_1.ResolutionError(response);
200
+ const json = yield response.clone().json();
201
+ if (json._links[curie]) {
202
+ const url = new URL(json._links[curie].href);
203
+ const reducedPath = [url, ...this._path.slice(2)];
204
+ this._cache.setItem(key, url.toString());
205
+ this._console.trace(`Cached ${url.toString()} for ${key}.`);
206
+ this._console.success(`Resolved ${key} to ${url.toString()} online.`);
207
+ return new Node(Object.assign(Object.assign({}, config), { path: reducedPath }))._resolve();
208
+ }
211
209
  }
210
+ this._console.error(`Failed to resolve ${key}.`);
211
+ throw new ResolutionError_js_1.ResolutionError(response);
212
212
  });
213
213
  }
214
214
  }
@@ -11,7 +11,7 @@ import * as Core from '../core/index.js';
11
11
  import { Headers, Request, fetch } from 'cross-fetch';
12
12
  import { storageV8N, v8n } from '../core/v8n.js';
13
13
  import MemoryStorage from 'fake-storage';
14
- /** JS SDK for building backends with [Foxy Hypermedia API](https://api.foxycart.com/docs). Hypermedia API is designed to give you complete control over all aspects of your Foxy accounts, whether working with a single store or automating the provisioning of thousands. Anything you can do within the Foxy administration, you can also do through the API. This means that you can embed Foxy into any application (CMS, LMS, CRM, etc.) and expose as much or as little of Foxy's functionality as desired. */
14
+ /** JS SDK for building backends with [Foxy Hypermedia API](https://api.foxy.io/docs). Hypermedia API is designed to give you complete control over all aspects of your Foxy accounts, whether working with a single store or automating the provisioning of thousands. Anything you can do within the Foxy administration, you can also do through the API. This means that you can embed Foxy into any application (CMS, LMS, CRM, etc.) and expose as much or as little of Foxy's functionality as desired. */
15
15
  export class API extends Core.API {
16
16
  constructor(params) {
17
17
  var _a, _b, _c, _d;
@@ -99,7 +99,7 @@ export class API extends Core.API {
99
99
  }
100
100
  API.REFRESH_THRESHOLD = 5 * 60 * 1000;
101
101
  API.ACCESS_TOKEN = 'access_token';
102
- API.BASE_URL = new URL('https://api.foxycart.com/');
102
+ API.BASE_URL = new URL('https://api.foxy.io/');
103
103
  API.VERSION = '1';
104
104
  API.v8n = {
105
105
  classConstructor: v8n().schema({
@@ -191,18 +191,18 @@ export class Node {
191
191
  }
192
192
  const response = yield this._fetch(baseURL.toString());
193
193
  if (response.ok) {
194
- const json = yield response.json();
195
- const url = new URL(json._links[curie].href);
196
- const reducedPath = [url, ...this._path.slice(2)];
197
- this._cache.setItem(key, url.toString());
198
- this._console.trace(`Cached ${url.toString()} for ${key}.`);
199
- this._console.success(`Resolved ${key} to ${url.toString()} online.`);
200
- return new Node(Object.assign(Object.assign({}, config), { path: reducedPath }))._resolve();
201
- }
202
- else {
203
- this._console.error(`Failed to resolve ${key}.`);
204
- throw new ResolutionError(response);
194
+ const json = yield response.clone().json();
195
+ if (json._links[curie]) {
196
+ const url = new URL(json._links[curie].href);
197
+ const reducedPath = [url, ...this._path.slice(2)];
198
+ this._cache.setItem(key, url.toString());
199
+ this._console.trace(`Cached ${url.toString()} for ${key}.`);
200
+ this._console.success(`Resolved ${key} to ${url.toString()} online.`);
201
+ return new Node(Object.assign(Object.assign({}, config), { path: reducedPath }))._resolve();
202
+ }
205
203
  }
204
+ this._console.error(`Failed to resolve ${key}.`);
205
+ throw new ResolutionError(response);
206
206
  });
207
207
  }
208
208
  }
@@ -31,7 +31,7 @@ declare type Token = {
31
31
  token_type: string;
32
32
  scope: string;
33
33
  };
34
- /** JS SDK for building backends with [Foxy Hypermedia API](https://api.foxycart.com/docs). Hypermedia API is designed to give you complete control over all aspects of your Foxy accounts, whether working with a single store or automating the provisioning of thousands. Anything you can do within the Foxy administration, you can also do through the API. This means that you can embed Foxy into any application (CMS, LMS, CRM, etc.) and expose as much or as little of Foxy's functionality as desired. */
34
+ /** JS SDK for building backends with [Foxy Hypermedia API](https://api.foxy.io/docs). Hypermedia API is designed to give you complete control over all aspects of your Foxy accounts, whether working with a single store or automating the provisioning of thousands. Anything you can do within the Foxy administration, you can also do through the API. This means that you can embed Foxy into any application (CMS, LMS, CRM, etc.) and expose as much or as little of Foxy's functionality as desired. */
35
35
  export declare class API extends Core.API<Graph> {
36
36
  static readonly REFRESH_THRESHOLD: number;
37
37
  static readonly ACCESS_TOKEN = "access_token";
@@ -43,7 +43,7 @@ export declare class API extends Core.API<Graph> {
43
43
  };
44
44
  /**
45
45
  * Fetches a new access token in exchange for an authorization code
46
- * or a refresh token. See more in our [authentication docs](https://api.foxycart.com/docs/authentication).
46
+ * or a refresh token. See more in our [authentication docs](https://api.foxy.io/docs/authentication).
47
47
  *
48
48
  * @param opts Request options.
49
49
  * @param throwOnFailure If true, this method will throw an error instead of returning null on failure to obtain a token.
@@ -24,8 +24,8 @@ export interface AppliedCouponCode extends Graph {
24
24
  /** The coupon code applied to this cart. */
25
25
  code: string;
26
26
  /** The date this resource was created. */
27
- date_created: string;
27
+ date_created: string | null;
28
28
  /** The date this resource was last modified. */
29
- date_modified: string;
29
+ date_modified: string | null;
30
30
  };
31
31
  }
@@ -33,8 +33,8 @@ export interface AppliedTax extends Graph {
33
33
  /** If this tax only applied to a specific shipto shipment, the shipto address name will be listed here. */
34
34
  shipto: string;
35
35
  /** The date this resource was created. */
36
- date_created: string;
36
+ date_created: string | null;
37
37
  /** The date this resource was last modified. */
38
- date_modified: string;
38
+ date_modified: string | null;
39
39
  };
40
40
  }
@@ -16,8 +16,8 @@ export interface Attribute extends Graph {
16
16
  /** The value of this attribute. */
17
17
  value: string;
18
18
  /** The date this resource was created. */
19
- date_created: string;
19
+ date_created: string | null;
20
20
  /** The date this resource was last modified. */
21
- date_modified: string;
21
+ date_modified: string | null;
22
22
  };
23
23
  }
@@ -51,8 +51,8 @@ export interface BillingAddress extends Graph {
51
51
  /** Specifies if this address is the default shipping address for the customer. */
52
52
  is_default_shipping: boolean;
53
53
  /** The date this resource was created. */
54
- date_created: string;
54
+ date_created: string | null;
55
55
  /** The date this resource was last modified. */
56
- date_modified: string;
56
+ date_modified: string | null;
57
57
  };
58
58
  }
@@ -124,9 +124,9 @@ export interface Cart extends Graph {
124
124
  /** Total order amount of this cart including all items, taxes, shipping costs and discounts. */
125
125
  total_order: string;
126
126
  /** The date this resource was created. */
127
- date_created: string;
127
+ date_created: string | null;
128
128
  /** The date this resource was last modified. */
129
- date_modified: string;
129
+ date_modified: string | null;
130
130
  };
131
131
 
132
132
  zooms: {
@@ -25,8 +25,8 @@ export interface CartIncludeTemplate extends Graph {
25
25
  /** The URL of your cart include template hosted on your own server online and publicly available for our server to cache. */
26
26
  content_url: string;
27
27
  /** The date this resource was created. */
28
- date_created: string;
28
+ date_created: string | null;
29
29
  /** The date this resource was last modified. */
30
- date_modified: string;
30
+ date_modified: string | null;
31
31
  };
32
32
  }
@@ -25,8 +25,8 @@ export interface CartTemplate extends Graph {
25
25
  /** The URL of your cart template hosted on your own server online and publicly available for our server to cache. */
26
26
  content_url: string;
27
27
  /** The date this resource was created. */
28
- date_created: string;
28
+ date_created: string | null;
29
29
  /** The date this resource was last modified. */
30
- date_modified: string;
30
+ date_modified: string | null;
31
31
  };
32
32
  }
@@ -28,8 +28,8 @@ export interface CheckoutTemplate extends Graph {
28
28
  /** The URL of your checkout template hosted on your own server online and publicly available for our server to cache. */
29
29
  content_url: string;
30
30
  /** The date this resource was created. */
31
- date_created: string;
31
+ date_created: string | null;
32
32
  /** The date this resource was last modified. */
33
- date_modified: string;
33
+ date_modified: string | null;
34
34
  };
35
35
  }
@@ -35,8 +35,8 @@ export interface Client extends Graph {
35
35
  /** The phone number of the individual responsible for this integration. */
36
36
  contact_phone: string;
37
37
  /** The date this resource was created. */
38
- date_created: string;
38
+ date_created: string | null;
39
39
  /** The date this resource was last modified. */
40
- date_modified: string;
40
+ date_modified: string | null;
41
41
  };
42
42
  }
@@ -52,9 +52,9 @@ export interface Coupon extends Graph {
52
52
  /** Set to true to apply taxes before this coupon's discount is applied. Check with your tax professional if you have questions about how you should calculate taxes. */
53
53
  is_taxable: boolean;
54
54
  /** The date this resource was created. */
55
- date_created: string;
55
+ date_created: string | null;
56
56
  /** The date this resource was last modified. */
57
- date_modified: string;
57
+ date_modified: string | null;
58
58
  };
59
59
 
60
60
  zooms: {
@@ -23,8 +23,8 @@ export interface CouponCode extends Graph {
23
23
  /** For informational purposes, this shows you how many times this coupon code has already been used. */
24
24
  number_of_uses_to_date: number;
25
25
  /** The date this resource was created. */
26
- date_created: string;
26
+ date_created: string | null;
27
27
  /** The date this resource was last modified. */
28
- date_modified: string;
28
+ date_modified: string | null;
29
29
  };
30
30
  }
@@ -22,8 +22,8 @@ export interface CouponCodeTransaction extends Graph {
22
22
 
23
23
  props: {
24
24
  /** The date this resource was created. */
25
- date_created: string;
25
+ date_created: string | null;
26
26
  /** The date this resource was last modified. */
27
- date_modified: string;
27
+ date_modified: string | null;
28
28
  };
29
29
  }
@@ -33,8 +33,8 @@ export interface CouponDetail extends Graph {
33
33
  /** The amount of discount applied to this item. */
34
34
  amount_per: number;
35
35
  /** The date this resource was created. */
36
- date_created: string;
36
+ date_created: string | null;
37
37
  /** The date this resource was last modified. */
38
- date_modified: string;
38
+ date_modified: string | null;
39
39
  };
40
40
  }
@@ -23,8 +23,8 @@ export interface CouponItemCategory extends Graph {
23
23
  /** The full API URI of the item category associated with this coupon item category. */
24
24
  item_category_uri: string;
25
25
  /** The date this resource was created. */
26
- date_created: string;
26
+ date_created: string | null;
27
27
  /** The date this resource was last modified. */
28
- date_modified: string;
28
+ date_modified: string | null;
29
29
  };
30
30
  }
@@ -22,8 +22,8 @@ export interface CustomField extends Graph {
22
22
  /** Whether or not this custom field is visible on the receipt and email receipt. This correlates to custom fields with a "h:" prefix when added to the cart. */
23
23
  is_hidden: boolean;
24
24
  /** The date this resource was created. */
25
- date_created: string;
25
+ date_created: string | null;
26
26
  /** The date this resource was last modified. */
27
- date_modified: string;
27
+ date_modified: string | null;
28
28
  };
29
29
  }
@@ -62,9 +62,9 @@ export interface Customer extends Graph {
62
62
  /** If this customer checks out as a guest, this will be set to true. Once it is set, it can not be changed. */
63
63
  is_anonymous: boolean;
64
64
  /** The date this resource was created. */
65
- date_created: string;
65
+ date_created: string | null;
66
66
  /** The date this resource was last modified. */
67
- date_modified: string;
67
+ date_modified: string | null;
68
68
  };
69
69
 
70
70
  zooms: {
@@ -40,12 +40,12 @@ export interface CustomerAddress extends Graph {
40
40
  /** The phone of this address. */
41
41
  phone: string;
42
42
  /** Specifies if this address is the default billing address for the customer. */
43
- is_default_billing: string;
43
+ is_default_billing: boolean;
44
44
  /** Specifies if this address is the default shipping address for the customer. */
45
- is_default_shipping: string;
45
+ is_default_shipping: boolean;
46
46
  /** The date this resource was created. */
47
- date_created: string;
47
+ date_created: string | null;
48
48
  /** The date this resource was last modified. */
49
- date_modified: string;
49
+ date_modified: string | null;
50
50
  };
51
51
  }
@@ -59,9 +59,9 @@ export interface CustomerPortalSettings extends Graph {
59
59
  /** Life span of session in minutes. Maximum 40320 (4 weeks). */
60
60
  sessionLifespanInMinutes: number;
61
61
  /** The date this resource was created. */
62
- date_created: string;
62
+ date_created: string | null;
63
63
  /** The date this resource was last modified. */
64
- date_modified: string;
64
+ date_modified: string | null;
65
65
  } & (
66
66
  | {
67
67
  /** Shared secret key. */
@@ -28,8 +28,8 @@ export interface DefaultPaymentMethod extends Graph {
28
28
  /** The payment card expiration year in the YYYY format. */
29
29
  cc_exp_year: string | null;
30
30
  /** The date this resource was created. */
31
- date_created: string;
31
+ date_created: string | null;
32
32
  /** The date this resource was last modified. */
33
- date_modified: string;
33
+ date_modified: string | null;
34
34
  };
35
35
  }
@@ -37,8 +37,8 @@ export interface Discount extends Graph {
37
37
  /** Whether or not this discount is part of a subscription that is to be charged in the future based on when this transaction was processed. */
38
38
  is_future_discount: boolean;
39
39
  /** The date this resource was created. */
40
- date_created: string;
40
+ date_created: string | null;
41
41
  /** The date this resource was last modified. */
42
- date_modified: string;
42
+ date_modified: string | null;
43
43
  };
44
44
  }
@@ -25,8 +25,8 @@ export interface DiscountDetail extends Graph {
25
25
  /** The amount of discount applied to this item. */
26
26
  amount_per: number;
27
27
  /** The date this resource was created. */
28
- date_created: string;
28
+ date_created: string | null;
29
29
  /** The date this resource was last modified. */
30
- date_modified: string;
30
+ date_modified: string | null;
31
31
  };
32
32
  }
@@ -33,8 +33,8 @@ export interface Downloadable extends Graph {
33
33
  /** The date this file was last uploaded. */
34
34
  upload_date: string;
35
35
  /** The date this resource was created. */
36
- date_created: string;
36
+ date_created: string | null;
37
37
  /** The date this resource was last modified. */
38
- date_modified: string;
38
+ date_modified: string | null;
39
39
  };
40
40
  }
@@ -31,8 +31,8 @@ export interface DownloadablePurchase extends Graph {
31
31
  /** This is the passcode for downloading this item after a purchase. To construct the download link, use `https://{store_domain}.foxycart.com/dl?p={download_passcode}` */
32
32
  download_passcode: string;
33
33
  /** The date this resource was created. */
34
- date_created: string;
34
+ date_created: string | null;
35
35
  /** The date this resource was last modified. */
36
- date_modified: string;
36
+ date_modified: string | null;
37
37
  };
38
38
  }
@@ -29,8 +29,8 @@ export interface EmailTemplate extends Graph {
29
29
  /** The URL of your text email template hosted on your own server online and publicly available for our server to cache. */
30
30
  content_text_url: string;
31
31
  /** The date this resource was created. */
32
- date_created: string;
32
+ date_created: string | null;
33
33
  /** The date this resource was last modified. */
34
- date_modified: string;
34
+ date_modified: string | null;
35
35
  };
36
36
  }
@@ -31,8 +31,8 @@ export interface ErrorEntry extends Graph {
31
31
  /** Set this to false to hide this error entry from the Foxy administrative interface. This may be a helpful way to manage and acknowledge errors for your store. */
32
32
  hide_error: boolean;
33
33
  /** The date this resource was created. */
34
- date_created: string;
34
+ date_created: string | null;
35
35
  /** The date this resource was last modified. */
36
- date_modified: string;
36
+ date_modified: string | null;
37
37
  };
38
38
  }
@@ -24,8 +24,8 @@ export interface FraudProtection extends Graph {
24
24
  /** The score threshold used for minfraud. This should be set between 0 and 100. 0 will disable minFraud and 100 will turn it on for logging but still allow all transactions to go through. */
25
25
  score_threshold_reject: number;
26
26
  /** The date this resource was created. */
27
- date_created: string;
27
+ date_created: string | null;
28
28
  /** The date this resource was last modified. */
29
- date_modified: string;
29
+ date_modified: string | null;
30
30
  };
31
31
  }
@@ -0,0 +1,56 @@
1
+ import type { Graph } from '../../core';
2
+ import type { PropertyHelpers } from './property_helpers';
3
+
4
+ export interface HostedPaymentGatewaysHelper extends Graph {
5
+ curie: 'fx:hosted_payment_gateways';
6
+
7
+ links: {
8
+ /** This resource. */
9
+ 'self': HostedPaymentGatewaysHelper;
10
+ /** Various predefined property values. */
11
+ 'fx:property_helpers': PropertyHelpers;
12
+ };
13
+
14
+ props: {
15
+ /** A small, human readable explanation of this property helper. */
16
+ message: string;
17
+ /** JSON objects with the payment gateway names as the keys. */
18
+ values: {
19
+ [key: string]: {
20
+ /** The name of this hosted payment gateway. */
21
+ name: string;
22
+ /** The default id you can use for testing this hosted gateway. */
23
+ test_id: string;
24
+ /** The default key you can use for testing this hosted gateway. */
25
+ test_key: string;
26
+ /** The description of the id field for this hosted gateway. */
27
+ id_description: string;
28
+ /** The description of the key field for this hosted gateway. */
29
+ key_description: string;
30
+ /** Whether or not this hosted gateway supports 3D Secure functionality. */
31
+ supports_3d_secure: 0 | 1;
32
+ /** Whether or not this hosted gateway supports authorize only instead of auth+capture. */
33
+ supports_auth_only: 0 | 1;
34
+ /** The default third party key you can use for testing this hosted gateway. */
35
+ test_third_party_key: string;
36
+ /** The description of the third party key field for this hosted gateway. */
37
+ third_party_key_description: string;
38
+ /** If this hosted gateway requires additional information, this will contain details about the data which needs to be collected to configure this hosted gateway. */
39
+ additional_fields: null | {
40
+ blocks: {
41
+ id: string;
42
+ is_live: boolean;
43
+ parent_id: string;
44
+ fields: {
45
+ id: string;
46
+ name: string;
47
+ type: string;
48
+ description?: string;
49
+ default_value: string;
50
+ }[];
51
+ }[];
52
+ };
53
+ };
54
+ };
55
+ };
56
+ }
@@ -20,29 +20,29 @@ export interface Integration extends Graph {
20
20
  props: {
21
21
  /** A full API URI of the user resource used in this relationship. When working with hypermedia, it's important to save URIs and not just numeric ids. */
22
22
  user_uri: string;
23
- /** A unique identifier for this client. Maps to the client_id of the {@link https://api.foxycart.com/rels/client client} resource. */
23
+ /** A unique identifier for this client. Maps to the client_id of the {@link https://api.foxy.io/rels/client client} resource. */
24
24
  client_id: string;
25
25
  /** The OAuth scope granted to this integration. */
26
26
  scope: string;
27
27
  /** When this OAuth refresh token expires. */
28
28
  expires: number;
29
- /** Maps to the project_name of the {@link https://api.foxycart.com/rels/client client} resource. */
29
+ /** Maps to the project_name of the {@link https://api.foxy.io/rels/client client} resource. */
30
30
  project_name: string;
31
- /** Maps to the project_description of the {@link https://api.foxycart.com/rels/client client} resource. */
31
+ /** Maps to the project_description of the {@link https://api.foxy.io/rels/client client} resource. */
32
32
  project_description: string;
33
- /** Maps to the company_name of the {@link https://api.foxycart.com/rels/client client} resource. */
33
+ /** Maps to the company_name of the {@link https://api.foxy.io/rels/client client} resource. */
34
34
  company_name: string;
35
- /** Maps to the company_url of the {@link https://api.foxycart.com/rels/client client} resource. */
35
+ /** Maps to the company_url of the {@link https://api.foxy.io/rels/client client} resource. */
36
36
  company_url: string;
37
- /** Maps to the company_logo of the {@link https://api.foxycart.com/rels/client client} resource. */
37
+ /** Maps to the company_logo of the {@link https://api.foxy.io/rels/client client} resource. */
38
38
  company_logo: string;
39
- /** Maps to the contact_name of the {@link https://api.foxycart.com/rels/client client} resource. */
39
+ /** Maps to the contact_name of the {@link https://api.foxy.io/rels/client client} resource. */
40
40
  contact_name: string;
41
- /** Maps to the contact_email of the {@link https://api.foxycart.com/rels/client client} resource. */
41
+ /** Maps to the contact_email of the {@link https://api.foxy.io/rels/client client} resource. */
42
42
  contact_email: string;
43
- /** Maps to the first_name and last_name of the {@link https://api.foxycart.com/rels/user user} resource. */
43
+ /** Maps to the first_name and last_name of the {@link https://api.foxy.io/rels/user user} resource. */
44
44
  added_by_name: string;
45
- /** Maps to the email of the {@link https://api.foxycart.com/rels/user user} resource. */
45
+ /** Maps to the email of the {@link https://api.foxy.io/rels/user user} resource. */
46
46
  added_by_email: string;
47
47
  };
48
48
  }
@@ -82,9 +82,9 @@ export interface Item extends Graph {
82
82
  /** As a unix timestamp, this is the point in the future when this item will no longer be valid and will be removed from the cart. */
83
83
  expires: number;
84
84
  /** The date this resource was created. */
85
- date_created: string;
85
+ date_created: string | null;
86
86
  /** The date this resource was last modified. */
87
- date_modified: string;
87
+ date_modified: string | null;
88
88
  };
89
89
 
90
90
  zooms: {
@@ -65,8 +65,8 @@ export interface ItemCategory extends Graph {
65
65
  /** Email address of the administrator you'd like to send an email to every time an item in this category is purchased. */
66
66
  admin_email: string;
67
67
  /** The date this resource was created. */
68
- date_created: string;
68
+ date_created: string | null;
69
69
  /** The date this resource was last modified. */
70
- date_modified: string;
70
+ date_modified: string | null;
71
71
  };
72
72
  }
@@ -27,8 +27,8 @@ export interface ItemOption extends Graph {
27
27
  /** The weight modifier for this item option. The weight of the item in the cart will be adjusted by this amount because of this item option. */
28
28
  weight_mod: number;
29
29
  /** The date this resource was created. */
30
- date_created: string;
30
+ date_created: string | null;
31
31
  /** The date this resource was last modified. */
32
- date_modified: string;
32
+ date_modified: string | null;
33
33
  };
34
34
  }
@@ -25,8 +25,8 @@ export interface LanguageOverride extends Graph {
25
25
  /** Your custom string for this language code. */
26
26
  custom_value: string;
27
27
  /** The date this resource was created. */
28
- date_created: string;
28
+ date_created: string | null;
29
29
  /** The date this resource was last modified. */
30
- date_modified: string;
30
+ date_modified: string | null;
31
31
  };
32
32
  }
@@ -1,10 +1,6 @@
1
1
  import type { Graph } from '../../core';
2
2
  import type { PropertyHelpers } from './property_helpers';
3
3
 
4
- interface StringRecord {
5
- [key: string]: StringRecord;
6
- }
7
-
8
4
  export interface LanguageStrings extends Graph {
9
5
  curie: 'fx:language_strings';
10
6
 
@@ -19,6 +15,6 @@ export interface LanguageStrings extends Graph {
19
15
  /** A small, human readable explanation of this property helper. */
20
16
  message: string;
21
17
  /** JSON objects with the language strings supported. The key values match the language property and each pair represents the language_override `code` and `custom_value`. */
22
- values: StringRecord;
18
+ values: Record<string, Record<string, string>>;
23
19
  };
24
20
  }
@@ -17,8 +17,8 @@ export interface NativeIntegration extends Graph {
17
17
  /** A JSON string containing the configuration values and credentials for this native integration. */
18
18
  config: string;
19
19
  /** The date this resource was created. */
20
- date_created: string;
20
+ date_created: string | null;
21
21
  /** The date this resource was last modified. */
22
- date_modified: string;
22
+ date_modified: string | null;
23
23
  };
24
24
  }