@commercelayer/sdk 5.0.0-beta.11 → 5.0.0-beta.13
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/lib/cjs/commercelayer.d.ts +2 -2
- package/lib/cjs/commercelayer.js +1 -1
- package/lib/cjs/common.js +11 -0
- package/lib/cjs/resource.d.ts +3 -4
- package/lib/cjs/resources/cleanups.d.ts +1 -1
- package/lib/cjs/resources/customers.d.ts +1 -1
- package/lib/cjs/resources/exports.d.ts +1 -1
- package/lib/cjs/resources/gift_cards.d.ts +1 -1
- package/lib/cjs/resources/imports.d.ts +1 -1
- package/lib/cjs/resources/in_stock_subscriptions.d.ts +1 -1
- package/lib/cjs/resources/line_items.d.ts +2 -2
- package/lib/cjs/resources/order_copies.d.ts +1 -1
- package/lib/cjs/resources/order_factories.d.ts +1 -1
- package/lib/cjs/resources/order_subscriptions.d.ts +1 -1
- package/lib/cjs/resources/orders.d.ts +3 -3
- package/lib/cjs/resources/parcels.d.ts +3 -3
- package/lib/cjs/resources/paypal_payments.d.ts +1 -1
- package/lib/cjs/resources/recurring_order_copies.d.ts +1 -1
- package/lib/cjs/resources/returns.d.ts +1 -1
- package/lib/cjs/resources/shipments.d.ts +1 -1
- package/lib/cjs/resources/stock_transfers.d.ts +1 -1
- package/lib/esm/commercelayer.d.ts +2 -2
- package/lib/esm/commercelayer.js +1 -1
- package/lib/esm/common.js +11 -0
- package/lib/esm/resource.d.ts +3 -4
- package/lib/esm/resources/cleanups.d.ts +1 -1
- package/lib/esm/resources/customers.d.ts +1 -1
- package/lib/esm/resources/exports.d.ts +1 -1
- package/lib/esm/resources/gift_cards.d.ts +1 -1
- package/lib/esm/resources/imports.d.ts +1 -1
- package/lib/esm/resources/in_stock_subscriptions.d.ts +1 -1
- package/lib/esm/resources/line_items.d.ts +2 -2
- package/lib/esm/resources/order_copies.d.ts +1 -1
- package/lib/esm/resources/order_factories.d.ts +1 -1
- package/lib/esm/resources/order_subscriptions.d.ts +1 -1
- package/lib/esm/resources/orders.d.ts +3 -3
- package/lib/esm/resources/parcels.d.ts +3 -3
- package/lib/esm/resources/paypal_payments.d.ts +1 -1
- package/lib/esm/resources/recurring_order_copies.d.ts +1 -1
- package/lib/esm/resources/returns.d.ts +1 -1
- package/lib/esm/resources/shipments.d.ts +1 -1
- package/lib/esm/resources/stock_transfers.d.ts +1 -1
- package/lib/tsconfig.esm.tsbuildinfo +1 -1
- package/lib/tsconfig.tsbuildinfo +1 -1
- package/package.json +1 -1
@@ -2,7 +2,7 @@ import * as api from './api';
|
|
2
2
|
import type { ApiError } from './error';
|
3
3
|
import type { ErrorInterceptor, InterceptorType, RawResponseReader, RequestInterceptor, ResponseInterceptor } from './interceptor';
|
4
4
|
import type { ResourcesInitConfig } from './resource';
|
5
|
-
declare const OPEN_API_SCHEMA_VERSION = "4.1.
|
5
|
+
declare const OPEN_API_SCHEMA_VERSION = "4.1.2";
|
6
6
|
export { OPEN_API_SCHEMA_VERSION };
|
7
7
|
type SdkConfig = {};
|
8
8
|
type CommerceLayerInitConfig = SdkConfig & ResourcesInitConfig;
|
@@ -10,7 +10,7 @@ type CommerceLayerConfig = Partial<CommerceLayerInitConfig>;
|
|
10
10
|
declare class CommerceLayerClient {
|
11
11
|
#private;
|
12
12
|
static get openApiSchemaVersion(): string;
|
13
|
-
readonly openApiSchemaVersion = "4.1.
|
13
|
+
readonly openApiSchemaVersion = "4.1.2";
|
14
14
|
addresses: api.Addresses;
|
15
15
|
adjustments: api.Adjustments;
|
16
16
|
adyen_gateways: api.AdyenGateways;
|
package/lib/cjs/commercelayer.js
CHANGED
@@ -45,7 +45,7 @@ const resource_1 = __importDefault(require("./resource"));
|
|
45
45
|
const debug_1 = __importDefault(require("./debug"));
|
46
46
|
const debug = (0, debug_1.default)('commercelayer');
|
47
47
|
// Autogenerated schema version number, do not remove this line
|
48
|
-
const OPEN_API_SCHEMA_VERSION = '4.1.
|
48
|
+
const OPEN_API_SCHEMA_VERSION = '4.1.2';
|
49
49
|
exports.OPEN_API_SCHEMA_VERSION = OPEN_API_SCHEMA_VERSION;
|
50
50
|
class CommerceLayerClient {
|
51
51
|
static get openApiSchemaVersion() { return OPEN_API_SCHEMA_VERSION; }
|
package/lib/cjs/common.js
CHANGED
@@ -10,3 +10,14 @@ const isResourceType = (resource) => {
|
|
10
10
|
return resource && (typeof resource.type !== 'undefined') && resource.type && api_1.resourceList.includes(resource.type);
|
11
11
|
};
|
12
12
|
exports.isResourceType = isResourceType;
|
13
|
+
/*
|
14
|
+
// Nullable types
|
15
|
+
type StringNullable = string | null
|
16
|
+
type NumberNullable = number | null
|
17
|
+
type BooleanNullable = boolean | null
|
18
|
+
type ResourceNullable<R extends Resource> = R | null
|
19
|
+
type ResourceArrayNullable<R extends Resource> = R[] | null
|
20
|
+
|
21
|
+
|
22
|
+
export type { StringNullable, NumberNullable, BooleanNullable, ResourceNullable, ResourceArrayNullable }
|
23
|
+
*/
|
package/lib/cjs/resource.d.ts
CHANGED
@@ -1,8 +1,7 @@
|
|
1
1
|
import type { ApiClientInitConfig } from './client';
|
2
|
-
import type { QueryParamsRetrieve, QueryParamsList, QueryFilter } from './query';
|
2
|
+
import type { QueryParamsRetrieve, QueryParamsList, QueryFilter, QueryParams } from './query';
|
3
3
|
import type { ResourceTypeLock } from './api';
|
4
4
|
import type { InterceptorManager } from './interceptor';
|
5
|
-
import { QueryParams } from '.';
|
6
5
|
type ResourceNull = {
|
7
6
|
id: null;
|
8
7
|
} & ResourceType;
|
@@ -17,8 +16,8 @@ interface ResourceId extends ResourceType {
|
|
17
16
|
readonly id: string;
|
18
17
|
}
|
19
18
|
interface ResourceBase {
|
20
|
-
reference?: string;
|
21
|
-
reference_origin?: string;
|
19
|
+
reference?: string | null;
|
20
|
+
reference_origin?: string | null;
|
22
21
|
metadata?: Metadata;
|
23
22
|
}
|
24
23
|
interface Resource extends ResourceBase, ResourceId {
|
@@ -8,7 +8,7 @@ type CleanupRel = ResourceRel & {
|
|
8
8
|
interface Cleanup extends Resource {
|
9
9
|
readonly type: CleanupType;
|
10
10
|
resource_type: string;
|
11
|
-
status
|
11
|
+
status: 'pending' | 'in_progress' | 'interrupted' | 'completed';
|
12
12
|
started_at?: string | null;
|
13
13
|
completed_at?: string | null;
|
14
14
|
interrupted_at?: string | null;
|
@@ -20,7 +20,7 @@ type CustomerGroupRel = ResourceRel & {
|
|
20
20
|
interface Customer extends Resource {
|
21
21
|
readonly type: CustomerType;
|
22
22
|
email: string;
|
23
|
-
status
|
23
|
+
status: 'prospect' | 'acquired' | 'repeat';
|
24
24
|
has_password?: boolean | null;
|
25
25
|
customer_group?: CustomerGroup | null;
|
26
26
|
customer_addresses?: CustomerAddress[] | null;
|
@@ -9,7 +9,7 @@ interface Export extends Resource {
|
|
9
9
|
readonly type: ExportType;
|
10
10
|
resource_type: string;
|
11
11
|
format?: string | null;
|
12
|
-
status
|
12
|
+
status: 'pending' | 'in_progress' | 'completed';
|
13
13
|
includes?: string[] | null;
|
14
14
|
filters?: object | null;
|
15
15
|
dry_data?: boolean | null;
|
@@ -16,7 +16,7 @@ type GiftCardRecipientRel = ResourceRel & {
|
|
16
16
|
};
|
17
17
|
interface GiftCard extends Resource {
|
18
18
|
readonly type: GiftCardType;
|
19
|
-
status
|
19
|
+
status: 'draft' | 'inactive' | 'active' | 'redeemed';
|
20
20
|
code?: string | null;
|
21
21
|
currency_code?: string | null;
|
22
22
|
initial_balance_cents: number;
|
@@ -9,7 +9,7 @@ interface Import extends Resource {
|
|
9
9
|
readonly type: ImportType;
|
10
10
|
resource_type: string;
|
11
11
|
parent_resource_id?: string | null;
|
12
|
-
status
|
12
|
+
status: 'pending' | 'in_progress' | 'interrupted' | 'completed';
|
13
13
|
started_at?: string | null;
|
14
14
|
completed_at?: string | null;
|
15
15
|
interrupted_at?: string | null;
|
@@ -19,7 +19,7 @@ type SkuRel = ResourceRel & {
|
|
19
19
|
};
|
20
20
|
interface InStockSubscription extends Resource {
|
21
21
|
readonly type: InStockSubscriptionType;
|
22
|
-
status
|
22
|
+
status: 'active' | 'inactive' | 'notified';
|
23
23
|
customer_email?: string | null;
|
24
24
|
sku_code?: string | null;
|
25
25
|
stock_threshold?: number | null;
|
@@ -77,7 +77,7 @@ interface LineItem extends Resource {
|
|
77
77
|
discount_breakdown?: object | null;
|
78
78
|
tax_rate?: number | null;
|
79
79
|
tax_breakdown?: object | null;
|
80
|
-
item_type?: '
|
80
|
+
item_type?: 'skus' | 'bundles' | 'shipments' | 'payment_methods' | 'adjustments' | 'gift_cards' | 'percentage_discount_promotions' | 'free_shipping_promotions' | 'free_gift_promotions' | 'fixed_price_promotions' | 'external_promotions' | 'fixed_amount_promotions' | null;
|
81
81
|
frequency?: string | null;
|
82
82
|
order?: Order | null;
|
83
83
|
item?: Adjustment | Bundle | ExternalPromotion | FixedAmountPromotion | FreeShippingPromotion | GiftCard | PaymentMethod | PercentageDiscountPromotion | Shipment | Sku | null;
|
@@ -98,7 +98,7 @@ interface LineItemCreate extends ResourceCreate {
|
|
98
98
|
unit_amount_cents?: number | null;
|
99
99
|
name?: string | null;
|
100
100
|
image_url?: string | null;
|
101
|
-
item_type?: '
|
101
|
+
item_type?: 'skus' | 'bundles' | 'shipments' | 'payment_methods' | 'adjustments' | 'gift_cards' | 'percentage_discount_promotions' | 'free_shipping_promotions' | 'free_gift_promotions' | 'fixed_price_promotions' | 'external_promotions' | 'fixed_amount_promotions' | null;
|
102
102
|
frequency?: string | null;
|
103
103
|
order: OrderRel;
|
104
104
|
item?: AdjustmentRel | BundleRel | ExternalPromotionRel | FixedAmountPromotionRel | FreeShippingPromotionRel | GiftCardRel | PaymentMethodRel | PercentageDiscountPromotionRel | ShipmentRel | SkuRel | null;
|
@@ -12,7 +12,7 @@ type OrderRel = ResourceRel & {
|
|
12
12
|
};
|
13
13
|
interface OrderCopy extends Resource {
|
14
14
|
readonly type: OrderCopyType;
|
15
|
-
status
|
15
|
+
status: 'pending' | 'in_progress' | 'failed' | 'completed';
|
16
16
|
started_at?: string | null;
|
17
17
|
completed_at?: string | null;
|
18
18
|
failed_at?: string | null;
|
@@ -8,7 +8,7 @@ type OrderFactoryRel = ResourceRel & {
|
|
8
8
|
};
|
9
9
|
interface OrderFactory extends Resource {
|
10
10
|
readonly type: OrderFactoryType;
|
11
|
-
status
|
11
|
+
status: 'pending' | 'in_progress' | 'failed' | 'completed';
|
12
12
|
started_at?: string | null;
|
13
13
|
completed_at?: string | null;
|
14
14
|
failed_at?: string | null;
|
@@ -25,7 +25,7 @@ type CustomerPaymentSourceRel = ResourceRel & {
|
|
25
25
|
interface OrderSubscription extends Resource {
|
26
26
|
readonly type: OrderSubscriptionType;
|
27
27
|
number?: string | null;
|
28
|
-
status
|
28
|
+
status: 'draft' | 'inactive' | 'active' | 'cancelled';
|
29
29
|
frequency: string;
|
30
30
|
activate_by_source_order?: boolean | null;
|
31
31
|
customer_email?: string | null;
|
@@ -80,9 +80,9 @@ interface Order extends Resource {
|
|
80
80
|
readonly type: OrderType;
|
81
81
|
number?: number | null;
|
82
82
|
autorefresh?: boolean | null;
|
83
|
-
status
|
84
|
-
payment_status
|
85
|
-
fulfillment_status
|
83
|
+
status: 'draft' | 'pending' | 'placed' | 'approved' | 'cancelled';
|
84
|
+
payment_status: 'unpaid' | 'authorized' | 'partially_authorized' | 'paid' | 'partially_paid' | 'voided' | 'partially_voided' | 'refunded' | 'partially_refunded' | 'free';
|
85
|
+
fulfillment_status: 'unfulfilled' | 'in_progress' | 'fulfilled' | 'not_required';
|
86
86
|
guest?: boolean | null;
|
87
87
|
editable?: boolean | null;
|
88
88
|
customer_email?: string | null;
|
@@ -34,9 +34,9 @@ interface Parcel extends Resource {
|
|
34
34
|
shipping_label_size?: string | null;
|
35
35
|
shipping_label_resolution?: string | null;
|
36
36
|
tracking_number?: string | null;
|
37
|
-
tracking_status
|
38
|
-
tracking_status_detail
|
39
|
-
tracking_status_updated_at
|
37
|
+
tracking_status: string;
|
38
|
+
tracking_status_detail: string;
|
39
|
+
tracking_status_updated_at: string;
|
40
40
|
tracking_details?: string | null;
|
41
41
|
carrier_weight_oz?: string | null;
|
42
42
|
signed_by?: string | null;
|
@@ -17,7 +17,7 @@ interface PaypalPayment extends Resource {
|
|
17
17
|
paypal_payer_id?: string | null;
|
18
18
|
name?: string | null;
|
19
19
|
paypal_id?: string | null;
|
20
|
-
status
|
20
|
+
status: 'created' | 'approved';
|
21
21
|
approval_url?: string | null;
|
22
22
|
mismatched_amounts?: boolean | null;
|
23
23
|
intent_amount_cents: number;
|
@@ -15,7 +15,7 @@ type OrderSubscriptionRel = ResourceRel & {
|
|
15
15
|
};
|
16
16
|
interface RecurringOrderCopy extends Resource {
|
17
17
|
readonly type: RecurringOrderCopyType;
|
18
|
-
status
|
18
|
+
status: 'pending' | 'in_progress' | 'failed' | 'completed';
|
19
19
|
started_at?: string | null;
|
20
20
|
completed_at?: string | null;
|
21
21
|
failed_at?: string | null;
|
@@ -20,7 +20,7 @@ type StockLocationRel = ResourceRel & {
|
|
20
20
|
interface Return extends Resource {
|
21
21
|
readonly type: ReturnType;
|
22
22
|
number?: string | null;
|
23
|
-
status
|
23
|
+
status: 'draft' | 'requested' | 'approved' | 'cancelled' | 'shipped' | 'rejected' | 'received';
|
24
24
|
customer_email?: string | null;
|
25
25
|
skus_count?: number | null;
|
26
26
|
approved_at?: string | null;
|
@@ -22,7 +22,7 @@ type ShippingMethodRel = ResourceRel & {
|
|
22
22
|
interface Shipment extends Resource {
|
23
23
|
readonly type: ShipmentType;
|
24
24
|
number?: string | null;
|
25
|
-
status
|
25
|
+
status: 'draft' | 'upcoming' | 'cancelled' | 'on_hold' | 'picking' | 'packing' | 'ready_to_ship' | 'shipped';
|
26
26
|
currency_code?: string | null;
|
27
27
|
cost_amount_cents?: number | null;
|
28
28
|
cost_amount_float?: number | null;
|
@@ -24,7 +24,7 @@ type LineItemRel = ResourceRel & {
|
|
24
24
|
interface StockTransfer extends Resource {
|
25
25
|
readonly type: StockTransferType;
|
26
26
|
sku_code?: string | null;
|
27
|
-
status
|
27
|
+
status: 'draft' | 'upcoming' | 'picking' | 'in_transit' | 'completed' | 'cancelled';
|
28
28
|
quantity: number;
|
29
29
|
completed_at?: string | null;
|
30
30
|
cancelled_at?: string | null;
|
@@ -2,7 +2,7 @@ import * as api from './api';
|
|
2
2
|
import type { ApiError } from './error';
|
3
3
|
import type { ErrorInterceptor, InterceptorType, RawResponseReader, RequestInterceptor, ResponseInterceptor } from './interceptor';
|
4
4
|
import type { ResourcesInitConfig } from './resource';
|
5
|
-
declare const OPEN_API_SCHEMA_VERSION = "4.1.
|
5
|
+
declare const OPEN_API_SCHEMA_VERSION = "4.1.2";
|
6
6
|
export { OPEN_API_SCHEMA_VERSION };
|
7
7
|
type SdkConfig = {};
|
8
8
|
type CommerceLayerInitConfig = SdkConfig & ResourcesInitConfig;
|
@@ -10,7 +10,7 @@ type CommerceLayerConfig = Partial<CommerceLayerInitConfig>;
|
|
10
10
|
declare class CommerceLayerClient {
|
11
11
|
#private;
|
12
12
|
static get openApiSchemaVersion(): string;
|
13
|
-
readonly openApiSchemaVersion = "4.1.
|
13
|
+
readonly openApiSchemaVersion = "4.1.2";
|
14
14
|
addresses: api.Addresses;
|
15
15
|
adjustments: api.Adjustments;
|
16
16
|
adyen_gateways: api.AdyenGateways;
|
package/lib/esm/commercelayer.js
CHANGED
@@ -16,7 +16,7 @@ import ResourceAdapter from './resource';
|
|
16
16
|
import Debug from './debug';
|
17
17
|
const debug = Debug('commercelayer');
|
18
18
|
// Autogenerated schema version number, do not remove this line
|
19
|
-
const OPEN_API_SCHEMA_VERSION = '4.1.
|
19
|
+
const OPEN_API_SCHEMA_VERSION = '4.1.2';
|
20
20
|
export { OPEN_API_SCHEMA_VERSION };
|
21
21
|
class CommerceLayerClient {
|
22
22
|
static get openApiSchemaVersion() { return OPEN_API_SCHEMA_VERSION; }
|
package/lib/esm/common.js
CHANGED
@@ -6,3 +6,14 @@ const isResourceType = (resource) => {
|
|
6
6
|
return resource && (typeof resource.type !== 'undefined') && resource.type && resourceList.includes(resource.type);
|
7
7
|
};
|
8
8
|
export { isResourceId, isResourceType };
|
9
|
+
/*
|
10
|
+
// Nullable types
|
11
|
+
type StringNullable = string | null
|
12
|
+
type NumberNullable = number | null
|
13
|
+
type BooleanNullable = boolean | null
|
14
|
+
type ResourceNullable<R extends Resource> = R | null
|
15
|
+
type ResourceArrayNullable<R extends Resource> = R[] | null
|
16
|
+
|
17
|
+
|
18
|
+
export type { StringNullable, NumberNullable, BooleanNullable, ResourceNullable, ResourceArrayNullable }
|
19
|
+
*/
|
package/lib/esm/resource.d.ts
CHANGED
@@ -1,8 +1,7 @@
|
|
1
1
|
import type { ApiClientInitConfig } from './client';
|
2
|
-
import type { QueryParamsRetrieve, QueryParamsList, QueryFilter } from './query';
|
2
|
+
import type { QueryParamsRetrieve, QueryParamsList, QueryFilter, QueryParams } from './query';
|
3
3
|
import type { ResourceTypeLock } from './api';
|
4
4
|
import type { InterceptorManager } from './interceptor';
|
5
|
-
import { QueryParams } from '.';
|
6
5
|
type ResourceNull = {
|
7
6
|
id: null;
|
8
7
|
} & ResourceType;
|
@@ -17,8 +16,8 @@ interface ResourceId extends ResourceType {
|
|
17
16
|
readonly id: string;
|
18
17
|
}
|
19
18
|
interface ResourceBase {
|
20
|
-
reference?: string;
|
21
|
-
reference_origin?: string;
|
19
|
+
reference?: string | null;
|
20
|
+
reference_origin?: string | null;
|
22
21
|
metadata?: Metadata;
|
23
22
|
}
|
24
23
|
interface Resource extends ResourceBase, ResourceId {
|
@@ -8,7 +8,7 @@ type CleanupRel = ResourceRel & {
|
|
8
8
|
interface Cleanup extends Resource {
|
9
9
|
readonly type: CleanupType;
|
10
10
|
resource_type: string;
|
11
|
-
status
|
11
|
+
status: 'pending' | 'in_progress' | 'interrupted' | 'completed';
|
12
12
|
started_at?: string | null;
|
13
13
|
completed_at?: string | null;
|
14
14
|
interrupted_at?: string | null;
|
@@ -20,7 +20,7 @@ type CustomerGroupRel = ResourceRel & {
|
|
20
20
|
interface Customer extends Resource {
|
21
21
|
readonly type: CustomerType;
|
22
22
|
email: string;
|
23
|
-
status
|
23
|
+
status: 'prospect' | 'acquired' | 'repeat';
|
24
24
|
has_password?: boolean | null;
|
25
25
|
customer_group?: CustomerGroup | null;
|
26
26
|
customer_addresses?: CustomerAddress[] | null;
|
@@ -9,7 +9,7 @@ interface Export extends Resource {
|
|
9
9
|
readonly type: ExportType;
|
10
10
|
resource_type: string;
|
11
11
|
format?: string | null;
|
12
|
-
status
|
12
|
+
status: 'pending' | 'in_progress' | 'completed';
|
13
13
|
includes?: string[] | null;
|
14
14
|
filters?: object | null;
|
15
15
|
dry_data?: boolean | null;
|
@@ -16,7 +16,7 @@ type GiftCardRecipientRel = ResourceRel & {
|
|
16
16
|
};
|
17
17
|
interface GiftCard extends Resource {
|
18
18
|
readonly type: GiftCardType;
|
19
|
-
status
|
19
|
+
status: 'draft' | 'inactive' | 'active' | 'redeemed';
|
20
20
|
code?: string | null;
|
21
21
|
currency_code?: string | null;
|
22
22
|
initial_balance_cents: number;
|
@@ -9,7 +9,7 @@ interface Import extends Resource {
|
|
9
9
|
readonly type: ImportType;
|
10
10
|
resource_type: string;
|
11
11
|
parent_resource_id?: string | null;
|
12
|
-
status
|
12
|
+
status: 'pending' | 'in_progress' | 'interrupted' | 'completed';
|
13
13
|
started_at?: string | null;
|
14
14
|
completed_at?: string | null;
|
15
15
|
interrupted_at?: string | null;
|
@@ -19,7 +19,7 @@ type SkuRel = ResourceRel & {
|
|
19
19
|
};
|
20
20
|
interface InStockSubscription extends Resource {
|
21
21
|
readonly type: InStockSubscriptionType;
|
22
|
-
status
|
22
|
+
status: 'active' | 'inactive' | 'notified';
|
23
23
|
customer_email?: string | null;
|
24
24
|
sku_code?: string | null;
|
25
25
|
stock_threshold?: number | null;
|
@@ -77,7 +77,7 @@ interface LineItem extends Resource {
|
|
77
77
|
discount_breakdown?: object | null;
|
78
78
|
tax_rate?: number | null;
|
79
79
|
tax_breakdown?: object | null;
|
80
|
-
item_type?: '
|
80
|
+
item_type?: 'skus' | 'bundles' | 'shipments' | 'payment_methods' | 'adjustments' | 'gift_cards' | 'percentage_discount_promotions' | 'free_shipping_promotions' | 'free_gift_promotions' | 'fixed_price_promotions' | 'external_promotions' | 'fixed_amount_promotions' | null;
|
81
81
|
frequency?: string | null;
|
82
82
|
order?: Order | null;
|
83
83
|
item?: Adjustment | Bundle | ExternalPromotion | FixedAmountPromotion | FreeShippingPromotion | GiftCard | PaymentMethod | PercentageDiscountPromotion | Shipment | Sku | null;
|
@@ -98,7 +98,7 @@ interface LineItemCreate extends ResourceCreate {
|
|
98
98
|
unit_amount_cents?: number | null;
|
99
99
|
name?: string | null;
|
100
100
|
image_url?: string | null;
|
101
|
-
item_type?: '
|
101
|
+
item_type?: 'skus' | 'bundles' | 'shipments' | 'payment_methods' | 'adjustments' | 'gift_cards' | 'percentage_discount_promotions' | 'free_shipping_promotions' | 'free_gift_promotions' | 'fixed_price_promotions' | 'external_promotions' | 'fixed_amount_promotions' | null;
|
102
102
|
frequency?: string | null;
|
103
103
|
order: OrderRel;
|
104
104
|
item?: AdjustmentRel | BundleRel | ExternalPromotionRel | FixedAmountPromotionRel | FreeShippingPromotionRel | GiftCardRel | PaymentMethodRel | PercentageDiscountPromotionRel | ShipmentRel | SkuRel | null;
|
@@ -12,7 +12,7 @@ type OrderRel = ResourceRel & {
|
|
12
12
|
};
|
13
13
|
interface OrderCopy extends Resource {
|
14
14
|
readonly type: OrderCopyType;
|
15
|
-
status
|
15
|
+
status: 'pending' | 'in_progress' | 'failed' | 'completed';
|
16
16
|
started_at?: string | null;
|
17
17
|
completed_at?: string | null;
|
18
18
|
failed_at?: string | null;
|
@@ -8,7 +8,7 @@ type OrderFactoryRel = ResourceRel & {
|
|
8
8
|
};
|
9
9
|
interface OrderFactory extends Resource {
|
10
10
|
readonly type: OrderFactoryType;
|
11
|
-
status
|
11
|
+
status: 'pending' | 'in_progress' | 'failed' | 'completed';
|
12
12
|
started_at?: string | null;
|
13
13
|
completed_at?: string | null;
|
14
14
|
failed_at?: string | null;
|
@@ -25,7 +25,7 @@ type CustomerPaymentSourceRel = ResourceRel & {
|
|
25
25
|
interface OrderSubscription extends Resource {
|
26
26
|
readonly type: OrderSubscriptionType;
|
27
27
|
number?: string | null;
|
28
|
-
status
|
28
|
+
status: 'draft' | 'inactive' | 'active' | 'cancelled';
|
29
29
|
frequency: string;
|
30
30
|
activate_by_source_order?: boolean | null;
|
31
31
|
customer_email?: string | null;
|
@@ -80,9 +80,9 @@ interface Order extends Resource {
|
|
80
80
|
readonly type: OrderType;
|
81
81
|
number?: number | null;
|
82
82
|
autorefresh?: boolean | null;
|
83
|
-
status
|
84
|
-
payment_status
|
85
|
-
fulfillment_status
|
83
|
+
status: 'draft' | 'pending' | 'placed' | 'approved' | 'cancelled';
|
84
|
+
payment_status: 'unpaid' | 'authorized' | 'partially_authorized' | 'paid' | 'partially_paid' | 'voided' | 'partially_voided' | 'refunded' | 'partially_refunded' | 'free';
|
85
|
+
fulfillment_status: 'unfulfilled' | 'in_progress' | 'fulfilled' | 'not_required';
|
86
86
|
guest?: boolean | null;
|
87
87
|
editable?: boolean | null;
|
88
88
|
customer_email?: string | null;
|
@@ -34,9 +34,9 @@ interface Parcel extends Resource {
|
|
34
34
|
shipping_label_size?: string | null;
|
35
35
|
shipping_label_resolution?: string | null;
|
36
36
|
tracking_number?: string | null;
|
37
|
-
tracking_status
|
38
|
-
tracking_status_detail
|
39
|
-
tracking_status_updated_at
|
37
|
+
tracking_status: string;
|
38
|
+
tracking_status_detail: string;
|
39
|
+
tracking_status_updated_at: string;
|
40
40
|
tracking_details?: string | null;
|
41
41
|
carrier_weight_oz?: string | null;
|
42
42
|
signed_by?: string | null;
|
@@ -17,7 +17,7 @@ interface PaypalPayment extends Resource {
|
|
17
17
|
paypal_payer_id?: string | null;
|
18
18
|
name?: string | null;
|
19
19
|
paypal_id?: string | null;
|
20
|
-
status
|
20
|
+
status: 'created' | 'approved';
|
21
21
|
approval_url?: string | null;
|
22
22
|
mismatched_amounts?: boolean | null;
|
23
23
|
intent_amount_cents: number;
|
@@ -15,7 +15,7 @@ type OrderSubscriptionRel = ResourceRel & {
|
|
15
15
|
};
|
16
16
|
interface RecurringOrderCopy extends Resource {
|
17
17
|
readonly type: RecurringOrderCopyType;
|
18
|
-
status
|
18
|
+
status: 'pending' | 'in_progress' | 'failed' | 'completed';
|
19
19
|
started_at?: string | null;
|
20
20
|
completed_at?: string | null;
|
21
21
|
failed_at?: string | null;
|
@@ -20,7 +20,7 @@ type StockLocationRel = ResourceRel & {
|
|
20
20
|
interface Return extends Resource {
|
21
21
|
readonly type: ReturnType;
|
22
22
|
number?: string | null;
|
23
|
-
status
|
23
|
+
status: 'draft' | 'requested' | 'approved' | 'cancelled' | 'shipped' | 'rejected' | 'received';
|
24
24
|
customer_email?: string | null;
|
25
25
|
skus_count?: number | null;
|
26
26
|
approved_at?: string | null;
|
@@ -22,7 +22,7 @@ type ShippingMethodRel = ResourceRel & {
|
|
22
22
|
interface Shipment extends Resource {
|
23
23
|
readonly type: ShipmentType;
|
24
24
|
number?: string | null;
|
25
|
-
status
|
25
|
+
status: 'draft' | 'upcoming' | 'cancelled' | 'on_hold' | 'picking' | 'packing' | 'ready_to_ship' | 'shipped';
|
26
26
|
currency_code?: string | null;
|
27
27
|
cost_amount_cents?: number | null;
|
28
28
|
cost_amount_float?: number | null;
|
@@ -24,7 +24,7 @@ type LineItemRel = ResourceRel & {
|
|
24
24
|
interface StockTransfer extends Resource {
|
25
25
|
readonly type: StockTransferType;
|
26
26
|
sku_code?: string | null;
|
27
|
-
status
|
27
|
+
status: 'draft' | 'upcoming' | 'picking' | 'in_transit' | 'completed' | 'cancelled';
|
28
28
|
quantity: number;
|
29
29
|
completed_at?: string | null;
|
30
30
|
cancelled_at?: string | null;
|