@foxy.io/sdk 1.5.1 → 1.7.1
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.
- package/README.md +4 -4
- package/dist/cdn/FoxySDKCustomer.js +1 -1
- package/dist/cjs/backend/API.js +2 -2
- package/dist/cjs/backend/createSSOURL.js +1 -1
- package/dist/cjs/core/API/AuthError.js +1 -1
- package/dist/cjs/core/API/Node.js +11 -11
- package/dist/cjs/core/Nucleon/machine.js +1 -0
- package/dist/esm/backend/API.js +2 -2
- package/dist/esm/backend/createSSOURL.js +1 -1
- package/dist/esm/core/API/AuthError.js +1 -1
- package/dist/esm/core/API/Node.js +11 -11
- package/dist/esm/core/Nucleon/machine.js +1 -0
- package/dist/types/backend/API.d.ts +2 -2
- package/dist/types/backend/Graph/applied_coupon_code.d.ts +2 -2
- package/dist/types/backend/Graph/applied_tax.d.ts +2 -2
- package/dist/types/backend/Graph/attribute.d.ts +2 -2
- package/dist/types/backend/Graph/billing_address.d.ts +2 -2
- package/dist/types/backend/Graph/cart.d.ts +2 -2
- package/dist/types/backend/Graph/cart_include_template.d.ts +2 -2
- package/dist/types/backend/Graph/cart_template.d.ts +2 -2
- package/dist/types/backend/Graph/checkout_template.d.ts +2 -2
- package/dist/types/backend/Graph/client.d.ts +2 -2
- package/dist/types/backend/Graph/coupon.d.ts +2 -2
- package/dist/types/backend/Graph/coupon_code.d.ts +2 -2
- package/dist/types/backend/Graph/coupon_code_transaction.d.ts +2 -2
- package/dist/types/backend/Graph/coupon_detail.d.ts +2 -2
- package/dist/types/backend/Graph/coupon_item_category.d.ts +2 -2
- package/dist/types/backend/Graph/custom_field.d.ts +2 -2
- package/dist/types/backend/Graph/customer.d.ts +2 -2
- package/dist/types/backend/Graph/customer_address.d.ts +4 -4
- package/dist/types/backend/Graph/customer_portal_settings.d.ts +2 -2
- package/dist/types/backend/Graph/default_payment_method.d.ts +2 -2
- package/dist/types/backend/Graph/discount.d.ts +2 -2
- package/dist/types/backend/Graph/discount_detail.d.ts +2 -2
- package/dist/types/backend/Graph/downloadable.d.ts +2 -2
- package/dist/types/backend/Graph/downloadable_purchase.d.ts +2 -2
- package/dist/types/backend/Graph/email_template.d.ts +2 -2
- package/dist/types/backend/Graph/error_entry.d.ts +2 -2
- package/dist/types/backend/Graph/fraud_protection.d.ts +2 -2
- package/dist/types/backend/Graph/hosted_payment_gateways_helper.d.ts +56 -0
- package/dist/types/backend/Graph/integration.d.ts +10 -10
- package/dist/types/backend/Graph/item.d.ts +2 -2
- package/dist/types/backend/Graph/item_category.d.ts +2 -2
- package/dist/types/backend/Graph/item_option.d.ts +2 -2
- package/dist/types/backend/Graph/language_override.d.ts +2 -2
- package/dist/types/backend/Graph/language_strings.d.ts +1 -5
- package/dist/types/backend/Graph/native_integration.d.ts +2 -2
- package/dist/types/backend/Graph/payment.d.ts +2 -2
- package/dist/types/backend/Graph/payment_gateway.d.ts +2 -2
- package/dist/types/backend/Graph/payment_gateways_helper.d.ts +56 -0
- package/dist/types/backend/Graph/payment_method_expiring.d.ts +2 -2
- package/dist/types/backend/Graph/payment_method_set.d.ts +2 -2
- package/dist/types/backend/Graph/payment_method_set_fraud_protection.d.ts +2 -2
- package/dist/types/backend/Graph/payment_method_set_hosted_payment_gateway.d.ts +2 -2
- package/dist/types/backend/Graph/property_helpers.d.ts +4 -4
- package/dist/types/backend/Graph/receipt_template.d.ts +2 -2
- package/dist/types/backend/Graph/regions.d.ts +0 -2
- package/dist/types/backend/Graph/shipment.d.ts +2 -2
- package/dist/types/backend/Graph/shipping_container.d.ts +2 -2
- package/dist/types/backend/Graph/shipping_drop_type.d.ts +2 -2
- package/dist/types/backend/Graph/shipping_method.d.ts +2 -2
- package/dist/types/backend/Graph/shipping_service.d.ts +2 -2
- package/dist/types/backend/Graph/store.d.ts +2 -2
- package/dist/types/backend/Graph/store_shipping_method.d.ts +2 -2
- package/dist/types/backend/Graph/store_shipping_service.d.ts +2 -2
- package/dist/types/backend/Graph/store_version.d.ts +21 -3
- package/dist/types/backend/Graph/subscription.d.ts +2 -2
- package/dist/types/backend/Graph/subscription_settings.d.ts +2 -2
- package/dist/types/backend/Graph/tax.d.ts +2 -2
- package/dist/types/backend/Graph/tax_item_category.d.ts +2 -2
- package/dist/types/backend/Graph/template_config.d.ts +2 -2
- package/dist/types/backend/Graph/template_set.d.ts +2 -2
- package/dist/types/backend/Graph/transaction.d.ts +2 -2
- package/dist/types/backend/Graph/transaction_log.d.ts +1 -1
- package/dist/types/backend/Graph/user.d.ts +2 -2
- package/dist/types/backend/Graph/user_access.d.ts +2 -2
- package/dist/types/backend/Rels.d.ts +2 -0
- package/dist/types/backend/createSSOURL.d.ts +5 -3
- package/dist/types/core/Nucleon/types.d.ts +2 -1
- package/dist/types/core/Resource/Link.d.ts +1 -1
- package/dist/types/customer/Graph/attribute.d.ts +2 -2
- package/dist/types/customer/Graph/customer_address.d.ts +4 -4
- package/dist/types/customer/Graph/customer_portal_settings.d.ts +2 -2
- package/dist/types/customer/Graph/default_payment_method.d.ts +2 -2
- package/dist/types/customer/Graph/index.d.ts +2 -2
- package/dist/types/customer/Graph/item.d.ts +2 -2
- package/dist/types/customer/Graph/subscription.d.ts +2 -2
- package/dist/types/customer/Graph/transaction.d.ts +2 -2
- package/dist/types/customer/Graph/transaction_template.d.ts +2 -2
- package/package.json +1 -1
|
@@ -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:
|
|
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
|
}
|
|
@@ -42,8 +42,8 @@ export interface Payment extends Graph {
|
|
|
42
42
|
/** The total amount of this payment. */
|
|
43
43
|
amount: number;
|
|
44
44
|
/** The date this resource was created. */
|
|
45
|
-
date_created: string;
|
|
45
|
+
date_created: string | null;
|
|
46
46
|
/** The date this resource was last modified. */
|
|
47
|
-
date_modified: string;
|
|
47
|
+
date_modified: string | null;
|
|
48
48
|
};
|
|
49
49
|
}
|
|
@@ -41,8 +41,8 @@ export interface PaymentGateway extends Graph {
|
|
|
41
41
|
/** Your test payment gateway third party key. To view the specific description of this field for the given payment gateway, see {@link https://api-sandbox.foxycart.com/hal-browser/browser.html#https://api-sandbox.foxycart.com/property_helpers/payment_gateways payment_gateways} property helper `third_party_key_description` field. */
|
|
42
42
|
test_third_party_key: string;
|
|
43
43
|
/** The date this resource was created. */
|
|
44
|
-
date_created: string;
|
|
44
|
+
date_created: string | null;
|
|
45
45
|
/** The date this resource was last modified. */
|
|
46
|
-
date_modified: string;
|
|
46
|
+
date_modified: string | null;
|
|
47
47
|
};
|
|
48
48
|
}
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
import type { Graph } from '../../core';
|
|
2
|
+
import type { PropertyHelpers } from './property_helpers';
|
|
3
|
+
|
|
4
|
+
export interface PaymentGatewaysHelper extends Graph {
|
|
5
|
+
curie: 'fx:payment_gateways';
|
|
6
|
+
|
|
7
|
+
links: {
|
|
8
|
+
/** This resource. */
|
|
9
|
+
'self': PaymentGatewaysHelper;
|
|
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 payment gateway. */
|
|
21
|
+
name: string;
|
|
22
|
+
/** The default id you can use for testing this gateway. */
|
|
23
|
+
test_id: string;
|
|
24
|
+
/** The default key you can use for testing this gateway. */
|
|
25
|
+
test_key: string;
|
|
26
|
+
/** The description of the id field for this gateway. */
|
|
27
|
+
id_description: string;
|
|
28
|
+
/** The description of the key field for this gateway. */
|
|
29
|
+
key_description: string;
|
|
30
|
+
/** Whether or not this gateway supports 3D Secure functionality. */
|
|
31
|
+
supports_3d_secure: 0 | 1;
|
|
32
|
+
/** Whether or not this 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 gateway. */
|
|
35
|
+
test_third_party_key: string;
|
|
36
|
+
/** The description of the third party key field for this gateway. */
|
|
37
|
+
third_party_key_description: string;
|
|
38
|
+
/** If this gateway requires additional information, this will contain details about the data which needs to be collected to configure this 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
|
+
}
|
|
@@ -41,8 +41,8 @@ export interface PaymentMethodExpiring extends Graph {
|
|
|
41
41
|
/** The payment card expiration year in the YYYY format. */
|
|
42
42
|
cc_exp_year: string;
|
|
43
43
|
/** The date this resource was created. */
|
|
44
|
-
date_created: string;
|
|
44
|
+
date_created: string | null;
|
|
45
45
|
/** The date this resource was last modified. */
|
|
46
|
-
date_modified: string;
|
|
46
|
+
date_modified: string | null;
|
|
47
47
|
};
|
|
48
48
|
}
|
|
@@ -33,8 +33,8 @@ export interface PaymentMethodSet extends Graph {
|
|
|
33
33
|
/** Set this to true to enable the purchase order payment option on your store. This can only be set to true if your store is active. */
|
|
34
34
|
is_purchase_order_enabled: boolean;
|
|
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 PaymentMethodSetFraudProtection extends Graph {
|
|
|
23
23
|
/** The full API URI of the fraud protection associated with this payment method set fraud protection. */
|
|
24
24
|
fraud_protection_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
|
}
|
|
@@ -23,8 +23,8 @@ export interface PaymentMethodSetHostedPaymentGateway extends Graph {
|
|
|
23
23
|
/** The full API URI of the hosted payment gateway associated with this payment method set hosted payment gateway. */
|
|
24
24
|
hosted_payment_gateway_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
|
}
|
|
@@ -3,11 +3,11 @@ import type { Countries } from './countries';
|
|
|
3
3
|
import type { CustomerPasswordHashTypes } from './customer_password_hash_types';
|
|
4
4
|
import type { DefaultTemplates } from './default_templates';
|
|
5
5
|
import type { Graph } from '../../core';
|
|
6
|
-
import type {
|
|
6
|
+
import type { HostedPaymentGatewaysHelper } from './hosted_payment_gateways_helper';
|
|
7
7
|
import type { LanguageStrings } from './language_strings';
|
|
8
8
|
import type { Languages } from './languages';
|
|
9
9
|
import type { LocaleCodes } from './locale_codes';
|
|
10
|
-
import type {
|
|
10
|
+
import type { PaymentGatewaysHelper } from './payment_gateways_helper';
|
|
11
11
|
import type { Regions } from './regions';
|
|
12
12
|
import type { ShippingAddressTypes } from './shipping_address_types';
|
|
13
13
|
import type { ShippingMethods } from './shipping_methods';
|
|
@@ -37,7 +37,7 @@ export interface PropertyHelpers extends Graph {
|
|
|
37
37
|
/** The shipping carriers used when configuring live shipping rates. */
|
|
38
38
|
'fx:shipping_methods': ShippingMethods;
|
|
39
39
|
/** List of supported payment gateways and valid entries for that resource's `type` setting. */
|
|
40
|
-
'fx:payment_gateways':
|
|
40
|
+
'fx:payment_gateways': PaymentGatewaysHelper;
|
|
41
41
|
/** List of default language strings that can be overriden. */
|
|
42
42
|
'fx:language_strings': LanguageStrings;
|
|
43
43
|
/** Default templates for the cart, checkout, receipt and email. */
|
|
@@ -45,7 +45,7 @@ export interface PropertyHelpers extends Graph {
|
|
|
45
45
|
/** List of valid address type values for the store's `shipping_address_type` setting. */
|
|
46
46
|
'fx:shipping_address_types': ShippingAddressTypes;
|
|
47
47
|
/** Hosted payment gateways such as PayPal, BitPay, and Dwolla. */
|
|
48
|
-
'fx:hosted_payment_gateways':
|
|
48
|
+
'fx:hosted_payment_gateways': HostedPaymentGatewaysHelper;
|
|
49
49
|
/** List of valid customer password hash type values for the store's `customer_password_hash_type` setting. */
|
|
50
50
|
'fx:customer_password_hash_types': CustomerPasswordHashTypes;
|
|
51
51
|
};
|
|
@@ -28,8 +28,8 @@ export interface ReceiptTemplate extends Graph {
|
|
|
28
28
|
/** The URL of your receipt 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
|
}
|
|
@@ -21,8 +21,6 @@ export interface Regions extends Graph {
|
|
|
21
21
|
default: string;
|
|
22
22
|
/** The code for this region. */
|
|
23
23
|
code: string;
|
|
24
|
-
/** The official 3 character country code. */
|
|
25
|
-
cc3: string;
|
|
26
24
|
/** Array of alternative names for this region. */
|
|
27
25
|
alternate_values: string[];
|
|
28
26
|
/** This value determines which regions will show up first in our find-as-you-type system. */
|
|
@@ -62,8 +62,8 @@ export interface Shipment extends Graph {
|
|
|
62
62
|
/** The total price of this shipment. */
|
|
63
63
|
total_price: number;
|
|
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
|
}
|
|
@@ -26,8 +26,8 @@ export interface ShippingContainer extends Graph {
|
|
|
26
26
|
/** The code for this shipping container */
|
|
27
27
|
code: string;
|
|
28
28
|
/** The date this resource was created. */
|
|
29
|
-
date_created: string;
|
|
29
|
+
date_created: string | null;
|
|
30
30
|
/** The date this resource was last modified. */
|
|
31
|
-
date_modified: string;
|
|
31
|
+
date_modified: string | null;
|
|
32
32
|
};
|
|
33
33
|
}
|
|
@@ -26,8 +26,8 @@ export interface ShippingDropType extends Graph {
|
|
|
26
26
|
/** The code for this shipping drop type */
|
|
27
27
|
code: string;
|
|
28
28
|
/** The date this resource was created. */
|
|
29
|
-
date_created: string;
|
|
29
|
+
date_created: string | null;
|
|
30
30
|
/** The date this resource was last modified. */
|
|
31
|
-
date_modified: string;
|
|
31
|
+
date_modified: string | null;
|
|
32
32
|
};
|
|
33
33
|
}
|
|
@@ -29,8 +29,8 @@ export interface ShippingMethod extends Graph {
|
|
|
29
29
|
/** The code for this shipping method */
|
|
30
30
|
code: 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
|
}
|
|
@@ -25,8 +25,8 @@ export interface ShippingService extends Graph {
|
|
|
25
25
|
/** Specifies whether or not this shipping service is for international rate requests only. */
|
|
26
26
|
is_international: boolean;
|
|
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
|
}
|
|
@@ -167,8 +167,8 @@ export interface Store extends Graph {
|
|
|
167
167
|
/** The date of the first payment for this FoxyCart store subscription. This can be considered the go live date for this store. */
|
|
168
168
|
first_payment_date: string;
|
|
169
169
|
/** The date this resource was created. */
|
|
170
|
-
date_created: string;
|
|
170
|
+
date_created: string | null;
|
|
171
171
|
/** The date this resource was last modified. */
|
|
172
|
-
date_modified: string;
|
|
172
|
+
date_modified: string | null;
|
|
173
173
|
};
|
|
174
174
|
}
|
|
@@ -59,9 +59,9 @@ export interface StoreShippingMethod extends Graph {
|
|
|
59
59
|
/** For the `CUSTOM-CODE` shipping method. Values are `deploying`, `deployed`, and `error`. */
|
|
60
60
|
deployment_status: 'deploying' | 'deployed' | 'error';
|
|
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
|
zooms: {
|
|
@@ -29,8 +29,8 @@ export interface StoreShippingService extends Graph {
|
|
|
29
29
|
/** The full API URI of the shipping method shipping service defined in our property helpers. Each shipping method will have it's own shipping services. */
|
|
30
30
|
shipping_service_uri: 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
|
}
|
|
@@ -24,7 +24,25 @@ export interface StoreVersion extends Graph {
|
|
|
24
24
|
/** Full content of the changelog as HTML */
|
|
25
25
|
changelog_content: string;
|
|
26
26
|
/** A JSON object for various cart types supported by this version. Examples include colorbox with links to the JavaScript library, FoxyCart JavaScript files, and FoxyCart CSS files. */
|
|
27
|
-
cart_types:
|
|
27
|
+
cart_types: {
|
|
28
|
+
[key: string]: {
|
|
29
|
+
/** Links to FoxyCart CSS files. */
|
|
30
|
+
css: string[];
|
|
31
|
+
/** Links to FoxyCart JS files. */
|
|
32
|
+
javascript: string[];
|
|
33
|
+
/** JS library needed for FoxyCart JS files to work. If none is needed, this will be an empty array. */
|
|
34
|
+
javascript_library:
|
|
35
|
+
| []
|
|
36
|
+
| {
|
|
37
|
+
/** Name of the JS library. */
|
|
38
|
+
name: string;
|
|
39
|
+
/** Version of the JS library. */
|
|
40
|
+
version: string;
|
|
41
|
+
/** URL of the JS library hosted on a CDN. */
|
|
42
|
+
url: string;
|
|
43
|
+
};
|
|
44
|
+
};
|
|
45
|
+
};
|
|
28
46
|
/** The date this version was publicly released. */
|
|
29
47
|
version_date: string;
|
|
30
48
|
/** If this version is currently visible in the FoxyCart admin. At times, FoxyCart may launch a private beta of the latest version. */
|
|
@@ -32,8 +50,8 @@ export interface StoreVersion extends Graph {
|
|
|
32
50
|
/** If this version is currently considered a beta release. */
|
|
33
51
|
is_beta: boolean;
|
|
34
52
|
/** The date this resource was created. */
|
|
35
|
-
date_created: string;
|
|
53
|
+
date_created: string | null;
|
|
36
54
|
/** The date this resource was last modified. */
|
|
37
|
-
date_modified: string;
|
|
55
|
+
date_modified: string | null;
|
|
38
56
|
};
|
|
39
57
|
}
|
|
@@ -50,9 +50,9 @@ export interface Subscription extends Graph {
|
|
|
50
50
|
/** If this subscription is using a third party subscription system such as PayPal Express, their identifier will be set here. */
|
|
51
51
|
third_party_id: string;
|
|
52
52
|
/** The date this resource was created. */
|
|
53
|
-
date_created: string;
|
|
53
|
+
date_created: string | null;
|
|
54
54
|
/** The date this resource was last modified. */
|
|
55
|
-
date_modified: string;
|
|
55
|
+
date_modified: string | null;
|
|
56
56
|
};
|
|
57
57
|
|
|
58
58
|
zooms: {
|
|
@@ -35,8 +35,8 @@ export interface SubscriptionSettings extends Graph {
|
|
|
35
35
|
/** When subscriptions run automatically to bill your customers, turning this setting off will prevent the normal receipt emails from being sent for their automated payment. The default value is true. */
|
|
36
36
|
send_email_receipts_for_automated_billing: boolean;
|
|
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
|
}
|
|
@@ -41,8 +41,8 @@ export interface Tax extends Graph {
|
|
|
41
41
|
/** The tax rate to be applied for this tax. For 10%, use 10. */
|
|
42
42
|
rate: number;
|
|
43
43
|
/** The date this resource was created. */
|
|
44
|
-
date_created: string;
|
|
44
|
+
date_created: string | null;
|
|
45
45
|
/** The date this resource was last modified. */
|
|
46
|
-
date_modified: string;
|
|
46
|
+
date_modified: string | null;
|
|
47
47
|
};
|
|
48
48
|
}
|
|
@@ -23,8 +23,8 @@ export interface TaxItemCategory extends Graph {
|
|
|
23
23
|
/** A full API URI of the tax resource used in this relationship. When working with hypermedia, it's important to save URIs and not just numeric ids. */
|
|
24
24
|
store_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
|
}
|
|
@@ -20,8 +20,8 @@ export interface TemplateConfig extends Graph {
|
|
|
20
20
|
/** This is the template configuration settings for your store. */
|
|
21
21
|
json: string;
|
|
22
22
|
/** The date this resource was created. */
|
|
23
|
-
date_created: string;
|
|
23
|
+
date_created: string | null;
|
|
24
24
|
/** The date this resource was last modified. */
|
|
25
|
-
date_modified: string;
|
|
25
|
+
date_modified: string | null;
|
|
26
26
|
};
|
|
27
27
|
}
|
|
@@ -53,9 +53,9 @@ export interface TemplateSet extends Graph {
|
|
|
53
53
|
/** This is the template configuration settings for your store. */
|
|
54
54
|
config: string;
|
|
55
55
|
/** The date this resource was created. */
|
|
56
|
-
date_created: string;
|
|
56
|
+
date_created: string | null;
|
|
57
57
|
/** The date this resource was last modified. */
|
|
58
|
-
date_modified: string;
|
|
58
|
+
date_modified: string | null;
|
|
59
59
|
};
|
|
60
60
|
|
|
61
61
|
zooms: {
|
|
@@ -106,9 +106,9 @@ export interface Transaction extends Graph {
|
|
|
106
106
|
/** The currency symbol, such as $, £, €, etc. */
|
|
107
107
|
currency_symbol: string;
|
|
108
108
|
/** The date this resource was created. */
|
|
109
|
-
date_created: string;
|
|
109
|
+
date_created: string | null;
|
|
110
110
|
/** The date this resource was last modified. */
|
|
111
|
-
date_modified: string;
|
|
111
|
+
date_modified: string | null;
|
|
112
112
|
};
|
|
113
113
|
|
|
114
114
|
zooms: {
|
|
@@ -29,6 +29,6 @@ export interface TransactionLog extends Graph {
|
|
|
29
29
|
/** Describes the source transaction modification such as admin or hAPI. */
|
|
30
30
|
request_source: string;
|
|
31
31
|
/** The date this resource was created. */
|
|
32
|
-
date_created: string;
|
|
32
|
+
date_created: string | null;
|
|
33
33
|
};
|
|
34
34
|
}
|
|
@@ -37,8 +37,8 @@ export interface User extends Graph {
|
|
|
37
37
|
/** If this user is a a merchant or store admin involved in the item and money side of the e-commerce business. */
|
|
38
38
|
is_merchant: 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
|
}
|
|
@@ -22,8 +22,8 @@ export interface UserAccess extends Graph {
|
|
|
22
22
|
/** Set this to true to make this store the default store for this user. That means it will be the first store they see when the log in to the FoxyCart admin. */
|
|
23
23
|
is_default_store: 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
|
}
|
|
@@ -65,6 +65,7 @@ export * from './Graph/fraud_protections';
|
|
|
65
65
|
export * from './Graph/generate_codes';
|
|
66
66
|
export * from './Graph/hosted_payment_gateway';
|
|
67
67
|
export * from './Graph/hosted_payment_gateways';
|
|
68
|
+
export * from './Graph/hosted_payment_gateways_helper';
|
|
68
69
|
export * from './Graph/integration';
|
|
69
70
|
export * from './Graph/item';
|
|
70
71
|
export * from './Graph/item_categories';
|
|
@@ -84,6 +85,7 @@ export * from './Graph/original_transaction';
|
|
|
84
85
|
export * from './Graph/payment';
|
|
85
86
|
export * from './Graph/payment_gateway';
|
|
86
87
|
export * from './Graph/payment_gateways';
|
|
88
|
+
export * from './Graph/payment_gateways_helper';
|
|
87
89
|
export * from './Graph/payment_method_expiring';
|
|
88
90
|
export * from './Graph/payment_method_set';
|
|
89
91
|
export * from './Graph/payment_method_set_fraud_protection';
|
|
@@ -1,11 +1,13 @@
|
|
|
1
1
|
interface Options {
|
|
2
2
|
/**
|
|
3
|
-
* Integer, epoch time. The future time that this authentication token will expire.
|
|
3
|
+
* Integer, epoch time (seconds). The future time that this authentication token will expire.
|
|
4
4
|
* If a customer makes a checkout request with an expired authentication token, then FoxyCart
|
|
5
5
|
* will redirect them to the endpoint in order to generate a new token. You can make use of the
|
|
6
6
|
* timestamp value you received to your endpoint in the GET parameters, and add additional time
|
|
7
7
|
* to it for how long you want it to be valid for. For example, adding 3600 to the timestamp will
|
|
8
|
-
* extend it by 3600 seconds, or
|
|
8
|
+
* extend it by 3600 seconds, or 60 minutes.
|
|
9
|
+
*
|
|
10
|
+
* Defaults to an hour from now.
|
|
9
11
|
*
|
|
10
12
|
* @see https://docs.foxycart.com/v/2.0/sso#the_details
|
|
11
13
|
*/
|
|
@@ -37,7 +39,7 @@ interface Options {
|
|
|
37
39
|
* that usually looks like this: `https://yourdomain.foxycart.com`.
|
|
38
40
|
*
|
|
39
41
|
* @see https://docs.foxycart.com/v/2.0/sso#the_details
|
|
40
|
-
* @see https://api.
|
|
42
|
+
* @see https://api.foxy.io/rels/store
|
|
41
43
|
*/
|
|
42
44
|
domain: string;
|
|
43
45
|
}
|
|
@@ -28,6 +28,7 @@ export type Context<TData extends Data = Data, TError = unknown, TFailure = unkn
|
|
|
28
28
|
*/
|
|
29
29
|
export type Event<TData extends Data = Data> =
|
|
30
30
|
| { type: 'SET_DATA'; data: TData | null }
|
|
31
|
+
| { type: 'REFRESH' }
|
|
31
32
|
| { type: 'EDIT'; data: Partial<TData> }
|
|
32
33
|
| { type: 'UNDO' }
|
|
33
34
|
| { type: 'FETCH' }
|
|
@@ -51,7 +52,7 @@ export type State<TData extends Data = Data, TError = unknown, TFailure = unknow
|
|
|
51
52
|
}
|
|
52
53
|
| {
|
|
53
54
|
value: { busy: 'fetching' };
|
|
54
|
-
context: Context<TData, TError> & {
|
|
55
|
+
context: Context<TData, TError> & { failure: null };
|
|
55
56
|
}
|
|
56
57
|
| {
|
|
57
58
|
value: { busy: 'creating' };
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/** Represents a hAPI relation link. */
|
|
2
2
|
export type Link = {
|
|
3
|
-
/** True if this is a template link (example: `https://api.
|
|
3
|
+
/** True if this is a template link (example: `https://api.foxy.io/rels/{rel}`) */
|
|
4
4
|
templated?: boolean;
|
|
5
5
|
/** Short description of this link. */
|
|
6
6
|
title?: string;
|
|
@@ -19,8 +19,8 @@ export interface Attribute extends Graph {
|
|
|
19
19
|
/** The value of this attribute. */
|
|
20
20
|
value: string;
|
|
21
21
|
/** The date this resource was created. */
|
|
22
|
-
date_created: string;
|
|
22
|
+
date_created: string | null;
|
|
23
23
|
/** The date this resource was last modified. */
|
|
24
|
-
date_modified: string;
|
|
24
|
+
date_modified: string | null;
|
|
25
25
|
};
|
|
26
26
|
}
|
|
@@ -35,12 +35,12 @@ export interface CustomerAddress extends Graph {
|
|
|
35
35
|
/** The phone of this address. */
|
|
36
36
|
phone: string;
|
|
37
37
|
/** Specifies if this address is the default billing address for the customer. */
|
|
38
|
-
is_default_billing:
|
|
38
|
+
is_default_billing: boolean;
|
|
39
39
|
/** Specifies if this address is the default shipping address for the customer. */
|
|
40
|
-
is_default_shipping:
|
|
40
|
+
is_default_shipping: boolean;
|
|
41
41
|
/** The date this resource was created. */
|
|
42
|
-
date_created: string;
|
|
42
|
+
date_created: string | null;
|
|
43
43
|
/** The date this resource was last modified. */
|
|
44
|
-
date_modified: string;
|
|
44
|
+
date_modified: string | null;
|
|
45
45
|
};
|
|
46
46
|
}
|
|
@@ -54,8 +54,8 @@ export interface CustomerPortalSettings extends Graph {
|
|
|
54
54
|
/** Life span of session in minutes. Maximum 40320 (4 weeks). */
|
|
55
55
|
session_lifespan_in_minutes: number;
|
|
56
56
|
/** The date this resource was created. */
|
|
57
|
-
date_created: string;
|
|
57
|
+
date_created: string | null;
|
|
58
58
|
/** The date this resource was last modified. */
|
|
59
|
-
date_modified: string;
|
|
59
|
+
date_modified: string | null;
|
|
60
60
|
};
|
|
61
61
|
}
|
|
@@ -24,8 +24,8 @@ export interface DefaultPaymentMethod extends Graph {
|
|
|
24
24
|
/** The payment card expiration year in the YYYY format. */
|
|
25
25
|
cc_exp_year: string | null;
|
|
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
|
}
|