@foxy.io/sdk 1.11.1 → 1.11.2

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.
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -51,6 +51,12 @@ export interface Coupon extends Graph {
51
51
  exclude_line_item_discounts: boolean;
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
+ /** Set to true to enable auto-apply functionality. */
55
+ customer_auto_apply: boolean;
56
+ /** Auto-apply coupons only. This coupon will be automatically applied when a customer record matches this query. Example: `attributes:name[auto_apply_coupons]=1`. */
57
+ customer_attribute_restrictions: string;
58
+ /** Auto-apply coupons only. This coupon will be automatically applied when a subscription includes a product with one of the codes in the list. Wildcards are allowed just like in product code restrictions. Example: `code_1,code_2,sku_*,abc`. */
59
+ customer_subscription_restrictions: string;
54
60
  /** The date this resource was created. */
55
61
  date_created: string | null;
56
62
  /** The date this resource was last modified. */
@@ -35,6 +35,8 @@ export interface HostedPaymentGatewaysHelper extends Graph {
35
35
  test_third_party_key: string;
36
36
  /** The description of the third party key field for this hosted gateway. */
37
37
  third_party_key_description: string;
38
+ /** Marks hosted payment gateways that are no longer supported. */
39
+ is_deprecated: boolean;
38
40
  /** 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
41
  additional_fields: null | {
40
42
  blocks: {
@@ -35,6 +35,8 @@ export interface PaymentGatewaysHelper extends Graph {
35
35
  test_third_party_key: string;
36
36
  /** The description of the third party key field for this gateway. */
37
37
  third_party_key_description: string;
38
+ /** Marks payment gateways that are no longer supported. */
39
+ is_deprecated: boolean;
38
40
  /** If this gateway requires additional information, this will contain details about the data which needs to be collected to configure this gateway. */
39
41
  additional_fields: null | {
40
42
  blocks: {
@@ -26,6 +26,7 @@ import type { TemplateSets } from './template_sets';
26
26
  import type { Transactions } from './transactions';
27
27
  import type { UserAccesses } from './user_accesses';
28
28
  import type { Users } from './users';
29
+ import type { StoreShippingMethods } from './store_shipping_methods';
29
30
 
30
31
  export interface Store extends Graph {
31
32
  curie: 'fx:store';
@@ -81,6 +82,8 @@ export interface Store extends Graph {
81
82
  'fx:subscription_settings': SubscriptionSettings;
82
83
  /** List of cart include templates available in this store. */
83
84
  'fx:cart_include_templates': CartIncludeTemplates;
85
+ /** List of shipping methods supported by this store. */
86
+ 'fx:store_shipping_methods': StoreShippingMethods;
84
87
  /** List of hosted payment gateways enabled for this store. */
85
88
  'fx:hosted_payment_gateways': HostedPaymentGateways;
86
89
  /** Configuration of this store's customer portal. */
@@ -0,0 +1,10 @@
1
+ import type { CollectionGraphLinks, CollectionGraphProps } from '../../core/defaults';
2
+ import type { StoreShippingMethod } from './store_shipping_method';
3
+ import type { Graph } from '../../core';
4
+
5
+ export interface StoreShippingMethods extends Graph {
6
+ curie: 'fx:store_shipping_methods';
7
+ links: CollectionGraphLinks<StoreShippingMethods>;
8
+ props: CollectionGraphProps;
9
+ child: StoreShippingMethod;
10
+ }
@@ -17,6 +17,12 @@ import type { Shipments } from './shipments';
17
17
  import type { Store } from './store';
18
18
  import type { TransactionLogs } from './transaction_logs';
19
19
  import type { Void } from './void';
20
+ import type { GiftCardCodeLog } from './gift_card_code_log';
21
+ import type { TransactionLog } from './transaction_log';
22
+ import type { TransactionJournalEntry } from './transaction_journal_entry';
23
+ import type { TransactionJournalEntries } from './transaction_journal_entries';
24
+ import type { GiftCardCodeLogs } from './gift_card_code_logs';
25
+ import type { Subscription } from './subscription';
20
26
 
21
27
  export interface Transaction extends Graph {
22
28
  curie: 'fx:transaction';
@@ -48,6 +54,8 @@ export interface Transaction extends Graph {
48
54
  'fx:attributes': Attributes;
49
55
  /** POST here to resend emails for this transaction. */
50
56
  'fx:send_emails': SendEmails;
57
+ /** If this transaction has a subscription, it will be linked here. */
58
+ 'fx:subscription': Subscription;
51
59
  /** List of taxes applied to this transaction. */
52
60
  'fx:applied_taxes': AppliedTaxes;
53
61
  /** List of custom fields on this transaction. */
@@ -60,6 +68,10 @@ export interface Transaction extends Graph {
60
68
  'fx:billing_addresses': BillingAddresses;
61
69
  /** POST here to resend transaction to the webhooks. */
62
70
  'fx:native_integrations': NativeIntegrations;
71
+ /** List of all gift card codes applied to this transaction. */
72
+ 'fx:applied_gift_card_codes': GiftCardCodeLogs;
73
+ /** Journal entries for this transaction. */
74
+ 'fx:transaction_journal_entries': TransactionJournalEntries;
63
75
  };
64
76
 
65
77
  props: {
@@ -98,13 +110,42 @@ export interface Transaction extends Graph {
98
110
  /** Total amount of this transaction including all items, taxes, shipping costs and discounts. */
99
111
  total_order: number;
100
112
  /** Used for transactions processed with a hosted payment gateway which can change the status of the transaction after it is originally posted. If the status is empty, a normal payment gateway was used and the transaction should be considered completed. */
101
- status: 'approved' | 'authorized' | 'declined' | 'pending' | 'rejected';
113
+ status:
114
+ | ''
115
+ | 'capturing'
116
+ | 'captured'
117
+ | 'approved'
118
+ | 'authorized'
119
+ | 'pending'
120
+ | 'completed'
121
+ | 'problem'
122
+ | 'pending_fraud_review'
123
+ | 'rejected'
124
+ | 'declined'
125
+ | 'refunding'
126
+ | 'refunded'
127
+ | 'voided'
128
+ | 'verified';
102
129
  /** The type of transaction that has occurred. */
103
- type: 'updateinfo' | 'subscription_modification' | 'subscription_renewal' | 'subscription_cancellation';
130
+ type: '' | 'updateinfo' | 'subscription_modification' | 'subscription_renewal' | 'subscription_cancellation';
104
131
  /** The 3 character ISO code for the currency. */
105
132
  currency_code: string;
106
133
  /** The currency symbol, such as $, £, €, etc. */
107
134
  currency_symbol: string;
135
+ /** The UA string of a browser that customer used on checkout. May contain a special UA for subscription processing. */
136
+ user_agent: string;
137
+ /** If custom transaction IDs, prefixes, or suffixes have been configured, this value will contain the custom ID (which may be a string). Otherwise it will be identical to the id value (an integer). */
138
+ display_id: string | number;
139
+ /** The source of transaction that has occurred. CIT/MIT. */
140
+ source:
141
+ | 'cit_ecommerce'
142
+ | 'mit_uoe'
143
+ | 'mit_api'
144
+ | 'mit_recurring'
145
+ | 'mit_recurring_reattempt_automated'
146
+ | 'mit_recurring_reattempt_manual'
147
+ | 'cit_recurring_cancellation'
148
+ | 'mit_recurring_cancellation';
108
149
  /** The date this resource was created. */
109
150
  date_created: string | null;
110
151
  /** The date this resource was last modified. */
@@ -112,7 +153,10 @@ export interface Transaction extends Graph {
112
153
  };
113
154
 
114
155
  zooms: {
156
+ transaction_journal_entries?: TransactionJournalEntry;
157
+ applied_gift_card_codes?: GiftCardCodeLog;
115
158
  billing_addresses?: BillingAddresses;
159
+ transaction_logs?: TransactionLog;
116
160
  applied_taxes?: AppliedTaxes;
117
161
  custom_fields?: CustomFields;
118
162
  attributes: Attributes;
@@ -0,0 +1,9 @@
1
+ import type { CollectionGraphLinks, CollectionGraphProps } from '../../core/defaults';
2
+ import type { TransactionJournalEntry } from './transaction_journal_entry';
3
+ import type { Graph } from '../../core';
4
+ export interface TransactionJournalEntries extends Graph {
5
+ curie: 'fx:transaction_journal_entries';
6
+ links: CollectionGraphLinks<TransactionJournalEntries>;
7
+ props: CollectionGraphProps;
8
+ child: TransactionJournalEntry;
9
+ }
@@ -0,0 +1,28 @@
1
+ import type { TransactionLog } from './transaction_log';
2
+ import type { Transaction } from './transaction';
3
+ import type { Graph } from '../../core';
4
+ import type { Store } from './store';
5
+ export interface TransactionJournalEntry extends Graph {
6
+ curie: 'fx:transaction_journal_entry';
7
+ links: {
8
+ /** This resource. */
9
+ 'self': TransactionJournalEntry;
10
+ /** Relared store resource. */
11
+ 'fx:store': Store;
12
+ /** Related transaction resource. */
13
+ 'fx:transaction': Transaction;
14
+ /** Related transaction log. */
15
+ 'fx:transaction_log': TransactionLog;
16
+ };
17
+ props: {
18
+ /** The value of money that should be transferred to or from the merchant's bank account (or comparable). Note that voids or refunds will result in a negative number. */
19
+ amount: number;
20
+ /** If custom transaction IDs, prefixes, or suffixes have been configured, this value will contain the custom ID (which may be a string). Otherwise it will be identical to the id value (an integer). */
21
+ display_id: string | number;
22
+ /** The date this resource was created. */
23
+ date_created: string | null;
24
+ };
25
+ zooms: {
26
+ transaction_logs?: TransactionLog;
27
+ };
28
+ }
@@ -129,6 +129,7 @@ export * from './Graph/shipping_service';
129
129
  export * from './Graph/shipping_services';
130
130
  export * from './Graph/store';
131
131
  export * from './Graph/store_shipping_method';
132
+ export * from './Graph/store_shipping_methods';
132
133
  export * from './Graph/store_shipping_service';
133
134
  export * from './Graph/store_shipping_services';
134
135
  export * from './Graph/store_version';
@@ -146,6 +147,8 @@ export * from './Graph/template_config';
146
147
  export * from './Graph/template_set';
147
148
  export * from './Graph/template_sets';
148
149
  export * from './Graph/timezones';
150
+ export * from './Graph/transaction_journal_entries';
151
+ export * from './Graph/transaction_journal_entry';
149
152
  export * from './Graph/transaction';
150
153
  export * from './Graph/transaction_log';
151
154
  export * from './Graph/transaction_log_detail';
@@ -10,6 +10,8 @@ export interface Transaction extends Graph {
10
10
  links: {
11
11
  /** This resource. */
12
12
  'self': Transaction;
13
+ /** List of items in this transaction. */
14
+ 'fx:items': Items;
13
15
  /** Open this link in a browser to see a receipt for this transaction. */
14
16
  'fx:receipt': Receipt;
15
17
  /** Related customer resource. */
@@ -18,15 +20,13 @@ export interface Transaction extends Graph {
18
20
  'fx:attributes': Attributes;
19
21
  /** List of custom fields on this transaction. */
20
22
  'fx:custom_fields': CustomFields;
21
- /** List of items for this transaction. */
22
- 'fx:items': Items;
23
23
  };
24
24
 
25
25
  props: {
26
26
  /** The order number. */
27
27
  id: number;
28
- /** The order number for display (usually same as id). */
29
- display_id: number;
28
+ /** If custom transaction IDs, prefixes, or suffixes have been configured, this value will contain the custom ID (which may be a string). Otherwise it will be identical to the id value (an integer). */
29
+ display_id: string | number;
30
30
  /** True if this transaction was a test transaction and not run against a live payment gateway. */
31
31
  is_test: boolean;
32
32
  /** Set this to true to hide it in the FoxyCart admin. */
@@ -60,9 +60,24 @@ export interface Transaction extends Graph {
60
60
  /** Total amount of this transaction including all items, taxes, shipping costs and discounts. */
61
61
  total_order: number;
62
62
  /** Used for transactions processed with a hosted payment gateway which can change the status of the transaction after it is originally posted. If the status is empty, a normal payment gateway was used and the transaction should be considered completed. */
63
- status: 'approved' | 'authorized' | 'declined' | 'pending' | 'rejected';
63
+ status:
64
+ | ''
65
+ | 'capturing'
66
+ | 'captured'
67
+ | 'approved'
68
+ | 'authorized'
69
+ | 'pending'
70
+ | 'completed'
71
+ | 'problem'
72
+ | 'pending_fraud_review'
73
+ | 'rejected'
74
+ | 'declined'
75
+ | 'refunding'
76
+ | 'refunded'
77
+ | 'voided'
78
+ | 'verified';
64
79
  /** The type of transaction that has occurred. */
65
- type: 'updateinfo' | 'subscription_modification' | 'subscription_renewal' | 'subscription_cancellation';
80
+ type: '' | 'updateinfo' | 'subscription_modification' | 'subscription_renewal' | 'subscription_cancellation';
66
81
  /** The 3 character ISO code for the currency. */
67
82
  currency_code: string;
68
83
  /** The currency symbol, such as $, £, €, etc. */
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@foxy.io/sdk",
3
3
  "type": "commonjs",
4
- "version": "1.11.1",
4
+ "version": "1.11.2",
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",