@aimee.shop/sdk 0.17.0 → 0.18.0-dev.121
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/dist/core/events/event-names.d.ts +142 -146
- package/dist/core/events/event-names.d.ts.map +1 -1
- package/dist/core/events/event-names.js +141 -145
- package/dist/core/events/event-names.js.map +1 -1
- package/dist/index.d.ts +17 -17
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js.map +1 -1
- package/dist/services/core/assets.client.d.ts +2 -8
- package/dist/services/core/assets.client.d.ts.map +1 -1
- package/dist/services/core/assets.client.js.map +1 -1
- package/dist/services/core/base-resource.d.ts +7 -2
- package/dist/services/core/base-resource.d.ts.map +1 -1
- package/dist/services/core/base-resource.js +27 -20
- package/dist/services/core/base-resource.js.map +1 -1
- package/dist/services/core/cart-messages/cart-messages.client.d.ts +14 -4
- package/dist/services/core/cart-messages/cart-messages.client.d.ts.map +1 -1
- package/dist/services/core/cart-messages/cart-messages.client.js +37 -4
- package/dist/services/core/cart-messages/cart-messages.client.js.map +1 -1
- package/dist/services/core/cart-messages/index.d.ts +1 -1
- package/dist/services/core/cart-messages/index.d.ts.map +1 -1
- package/dist/services/core/cart-messages/types.d.ts +19 -2
- package/dist/services/core/cart-messages/types.d.ts.map +1 -1
- package/dist/services/core/carts.client.d.ts +46 -8
- package/dist/services/core/carts.client.d.ts.map +1 -1
- package/dist/services/core/carts.client.js +18 -0
- package/dist/services/core/carts.client.js.map +1 -1
- package/dist/services/core/categories.client.d.ts +14 -7
- package/dist/services/core/categories.client.d.ts.map +1 -1
- package/dist/services/core/categories.client.js.map +1 -1
- package/dist/services/core/checkout.client.d.ts +74 -35
- package/dist/services/core/checkout.client.d.ts.map +1 -1
- package/dist/services/core/checkout.client.js +3 -2
- package/dist/services/core/checkout.client.js.map +1 -1
- package/dist/services/core/cms/cms.client.d.ts +1 -1
- package/dist/services/core/cms/cms.client.js +1 -1
- package/dist/services/core/cms/entries.client.d.ts +4 -2
- package/dist/services/core/cms/entries.client.d.ts.map +1 -1
- package/dist/services/core/cms/entries.client.js +8 -2
- package/dist/services/core/cms/entries.client.js.map +1 -1
- package/dist/services/core/cms/types.d.ts +95 -53
- package/dist/services/core/cms/types.d.ts.map +1 -1
- package/dist/services/core/cms/types.js.map +1 -1
- package/dist/services/core/customers.client.d.ts +70 -61
- package/dist/services/core/customers.client.d.ts.map +1 -1
- package/dist/services/core/customers.client.js +15 -13
- package/dist/services/core/customers.client.js.map +1 -1
- package/dist/services/core/discounts.client.d.ts +98 -46
- package/dist/services/core/discounts.client.d.ts.map +1 -1
- package/dist/services/core/discounts.client.js +17 -17
- package/dist/services/core/discounts.client.js.map +1 -1
- package/dist/services/core/facets.client.d.ts +27 -10
- package/dist/services/core/facets.client.d.ts.map +1 -1
- package/dist/services/core/facets.client.js +18 -7
- package/dist/services/core/facets.client.js.map +1 -1
- package/dist/services/core/fulfillments.client.d.ts +51 -27
- package/dist/services/core/fulfillments.client.d.ts.map +1 -1
- package/dist/services/core/fulfillments.client.js +30 -18
- package/dist/services/core/fulfillments.client.js.map +1 -1
- package/dist/services/core/inventory/adjustments.client.d.ts +12 -2
- package/dist/services/core/inventory/adjustments.client.d.ts.map +1 -1
- package/dist/services/core/inventory/adjustments.client.js.map +1 -1
- package/dist/services/core/inventory/index.d.ts +1 -1
- package/dist/services/core/inventory/index.d.ts.map +1 -1
- package/dist/services/core/inventory/reservations.client.d.ts +3 -3
- package/dist/services/core/inventory/reservations.client.d.ts.map +1 -1
- package/dist/services/core/inventory/reservations.client.js +2 -2
- package/dist/services/core/inventory/reservations.client.js.map +1 -1
- package/dist/services/core/inventory/types.d.ts +29 -6
- package/dist/services/core/inventory/types.d.ts.map +1 -1
- package/dist/services/core/inventory/types.js +1 -0
- package/dist/services/core/inventory/types.js.map +1 -1
- package/dist/services/core/invoices.client.d.ts +4 -7
- package/dist/services/core/invoices.client.d.ts.map +1 -1
- package/dist/services/core/invoices.client.js +1 -1
- package/dist/services/core/invoices.client.js.map +1 -1
- package/dist/services/core/openai-feed.client.d.ts +34 -3
- package/dist/services/core/openai-feed.client.d.ts.map +1 -1
- package/dist/services/core/openai-feed.client.js.map +1 -1
- package/dist/services/core/option-types.client.d.ts +6 -7
- package/dist/services/core/option-types.client.d.ts.map +1 -1
- package/dist/services/core/option-types.client.js +7 -8
- package/dist/services/core/option-types.client.js.map +1 -1
- package/dist/services/core/option-values.client.d.ts +2 -1
- package/dist/services/core/option-values.client.d.ts.map +1 -1
- package/dist/services/core/option-values.client.js +2 -1
- package/dist/services/core/option-values.client.js.map +1 -1
- package/dist/services/core/order-edits.client.d.ts +20 -14
- package/dist/services/core/order-edits.client.d.ts.map +1 -1
- package/dist/services/core/order-edits.client.js +1 -1
- package/dist/services/core/order-edits.client.js.map +1 -1
- package/dist/services/core/orders.client.d.ts +139 -49
- package/dist/services/core/orders.client.d.ts.map +1 -1
- package/dist/services/core/orders.client.js +40 -9
- package/dist/services/core/orders.client.js.map +1 -1
- package/dist/services/core/pricing/currencies.client.d.ts +9 -23
- package/dist/services/core/pricing/currencies.client.d.ts.map +1 -1
- package/dist/services/core/pricing/currencies.client.js +12 -30
- package/dist/services/core/pricing/currencies.client.js.map +1 -1
- package/dist/services/core/pricing/pricing.client.d.ts +5 -5
- package/dist/services/core/pricing/pricing.client.d.ts.map +1 -1
- package/dist/services/core/pricing/pricing.client.js +4 -4
- package/dist/services/core/pricing/pricing.client.js.map +1 -1
- package/dist/services/core/pricing/store-markets.client.d.ts +2 -5
- package/dist/services/core/pricing/store-markets.client.d.ts.map +1 -1
- package/dist/services/core/pricing/store-markets.client.js +1 -7
- package/dist/services/core/pricing/store-markets.client.js.map +1 -1
- package/dist/services/core/pricing/tiers.client.d.ts +4 -4
- package/dist/services/core/pricing/tiers.client.js +4 -4
- package/dist/services/core/pricing/types.d.ts +67 -60
- package/dist/services/core/pricing/types.d.ts.map +1 -1
- package/dist/services/core/pricing/variant-prices.client.d.ts +14 -14
- package/dist/services/core/pricing/variant-prices.client.d.ts.map +1 -1
- package/dist/services/core/pricing/variant-prices.client.js +14 -18
- package/dist/services/core/pricing/variant-prices.client.js.map +1 -1
- package/dist/services/core/products.client.d.ts +73 -13
- package/dist/services/core/products.client.d.ts.map +1 -1
- package/dist/services/core/products.client.js.map +1 -1
- package/dist/services/core/returns.client.d.ts +21 -6
- package/dist/services/core/returns.client.d.ts.map +1 -1
- package/dist/services/core/returns.client.js +12 -6
- package/dist/services/core/returns.client.js.map +1 -1
- package/dist/services/core/reviews.client.d.ts +17 -15
- package/dist/services/core/reviews.client.d.ts.map +1 -1
- package/dist/services/core/reviews.client.js.map +1 -1
- package/dist/services/core/search.client.d.ts +26 -11
- package/dist/services/core/search.client.d.ts.map +1 -1
- package/dist/services/core/search.client.js.map +1 -1
- package/dist/services/core/shipping/classes.client.d.ts +2 -5
- package/dist/services/core/shipping/classes.client.d.ts.map +1 -1
- package/dist/services/core/shipping/classes.client.js +4 -0
- package/dist/services/core/shipping/classes.client.js.map +1 -1
- package/dist/services/core/shipping/labels.client.d.ts +3 -6
- package/dist/services/core/shipping/labels.client.d.ts.map +1 -1
- package/dist/services/core/shipping/labels.client.js +5 -1
- package/dist/services/core/shipping/labels.client.js.map +1 -1
- package/dist/services/core/shipping/providers.client.d.ts +2 -5
- package/dist/services/core/shipping/providers.client.d.ts.map +1 -1
- package/dist/services/core/shipping/providers.client.js +6 -2
- package/dist/services/core/shipping/providers.client.js.map +1 -1
- package/dist/services/core/shipping/rules.client.d.ts +2 -5
- package/dist/services/core/shipping/rules.client.d.ts.map +1 -1
- package/dist/services/core/shipping/rules.client.js +4 -2
- package/dist/services/core/shipping/rules.client.js.map +1 -1
- package/dist/services/core/shipping/shipping.client.d.ts +4 -4
- package/dist/services/core/shipping/shipping.client.d.ts.map +1 -1
- package/dist/services/core/shipping/shipping.client.js +7 -5
- package/dist/services/core/shipping/shipping.client.js.map +1 -1
- package/dist/services/core/shipping/store-providers.client.d.ts +5 -5
- package/dist/services/core/shipping/store-providers.client.d.ts.map +1 -1
- package/dist/services/core/shipping/store-providers.client.js +1 -1
- package/dist/services/core/shipping/store-providers.client.js.map +1 -1
- package/dist/services/core/shipping/types.d.ts +196 -67
- package/dist/services/core/shipping/types.d.ts.map +1 -1
- package/dist/services/core/shipping/zones.client.d.ts +2 -5
- package/dist/services/core/shipping/zones.client.d.ts.map +1 -1
- package/dist/services/core/shipping/zones.client.js +4 -0
- package/dist/services/core/shipping/zones.client.js.map +1 -1
- package/dist/services/core/storefront/index.d.ts +1 -1
- package/dist/services/core/storefront/index.d.ts.map +1 -1
- package/dist/services/core/storefront/index.js.map +1 -1
- package/dist/services/core/storefront/storefront-auth.client.d.ts +9 -4
- package/dist/services/core/storefront/storefront-auth.client.d.ts.map +1 -1
- package/dist/services/core/storefront/storefront-auth.client.js +7 -2
- package/dist/services/core/storefront/storefront-auth.client.js.map +1 -1
- package/dist/services/core/storefront/storefront-plans.client.d.ts +5 -4
- package/dist/services/core/storefront/storefront-plans.client.d.ts.map +1 -1
- package/dist/services/core/storefront/storefront-plans.client.js.map +1 -1
- package/dist/services/core/storefront/storefront-subscriptions.client.d.ts +19 -12
- package/dist/services/core/storefront/storefront-subscriptions.client.d.ts.map +1 -1
- package/dist/services/core/storefront/storefront-subscriptions.client.js.map +1 -1
- package/dist/services/core/storefront/storefront.client.d.ts +4 -1
- package/dist/services/core/storefront/storefront.client.d.ts.map +1 -1
- package/dist/services/core/storefront/storefront.client.js +4 -1
- package/dist/services/core/storefront/storefront.client.js.map +1 -1
- package/dist/services/core/storefront/types.d.ts +10 -0
- package/dist/services/core/storefront/types.d.ts.map +1 -1
- package/dist/services/core/stores/configuration.client.d.ts +21 -18
- package/dist/services/core/stores/configuration.client.d.ts.map +1 -1
- package/dist/services/core/stores/configuration.client.js.map +1 -1
- package/dist/services/core/stores/index.d.ts +1 -1
- package/dist/services/core/stores/index.d.ts.map +1 -1
- package/dist/services/core/stores/index.js.map +1 -1
- package/dist/services/core/stores/stores.client.d.ts +44 -15
- package/dist/services/core/stores/stores.client.d.ts.map +1 -1
- package/dist/services/core/stores/stores.client.js +10 -5
- package/dist/services/core/stores/stores.client.js.map +1 -1
- package/dist/services/core/taxes/jurisdictions.client.d.ts +4 -4
- package/dist/services/core/taxes/jurisdictions.client.d.ts.map +1 -1
- package/dist/services/core/taxes/jurisdictions.client.js +7 -4
- package/dist/services/core/taxes/jurisdictions.client.js.map +1 -1
- package/dist/services/core/taxes/providers.client.d.ts +1 -1
- package/dist/services/core/taxes/providers.client.d.ts.map +1 -1
- package/dist/services/core/taxes/providers.client.js.map +1 -1
- package/dist/services/core/taxes/rates.client.d.ts +2 -1
- package/dist/services/core/taxes/rates.client.d.ts.map +1 -1
- package/dist/services/core/taxes/rates.client.js +2 -1
- package/dist/services/core/taxes/rates.client.js.map +1 -1
- package/dist/services/core/taxes/store-providers.client.d.ts +5 -5
- package/dist/services/core/taxes/store-providers.client.d.ts.map +1 -1
- package/dist/services/core/taxes/store-providers.client.js +1 -1
- package/dist/services/core/taxes/store-providers.client.js.map +1 -1
- package/dist/services/core/taxes/taxes.client.d.ts +6 -3
- package/dist/services/core/taxes/taxes.client.d.ts.map +1 -1
- package/dist/services/core/taxes/taxes.client.js +5 -2
- package/dist/services/core/taxes/taxes.client.js.map +1 -1
- package/dist/services/core/taxes/types.d.ts +251 -128
- package/dist/services/core/taxes/types.d.ts.map +1 -1
- package/dist/services/core/variants.client.d.ts +80 -11
- package/dist/services/core/variants.client.d.ts.map +1 -1
- package/dist/services/core/variants.client.js +2 -2
- package/dist/services/core/variants.client.js.map +1 -1
- package/dist/services/core/wishlists.client.d.ts +31 -25
- package/dist/services/core/wishlists.client.d.ts.map +1 -1
- package/dist/services/core/wishlists.client.js +4 -2
- package/dist/services/core/wishlists.client.js.map +1 -1
- package/package.json +1 -1
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import type { HttpClientTransport as HttpClient } from '../../core/http-client.js';
|
|
2
|
-
import type { AddressSnapshot } from '../../core/types/address.js';
|
|
3
2
|
import type { PaginatedResponse } from '../../core/types/pagination.js';
|
|
4
3
|
import { BaseResourceClient } from './base-resource.js';
|
|
5
4
|
export type CustomerType = 'guest' | 'individual' | 'organization';
|
|
@@ -31,7 +30,6 @@ interface CustomerMutableFields {
|
|
|
31
30
|
externalRefs?: Record<string, unknown>;
|
|
32
31
|
preferences?: Record<string, unknown>;
|
|
33
32
|
metadata?: Record<string, unknown>;
|
|
34
|
-
notes?: string;
|
|
35
33
|
tags?: string[];
|
|
36
34
|
taxExemptStatus?: CustomerTaxExemptStatus;
|
|
37
35
|
customerGroupId?: string;
|
|
@@ -41,10 +39,10 @@ interface CustomerMutableFields {
|
|
|
41
39
|
paymentTerms?: PaymentTerms;
|
|
42
40
|
accountNumber?: string;
|
|
43
41
|
}
|
|
44
|
-
export interface Customer extends CustomerMutableFields {
|
|
42
|
+
export interface Customer extends Omit<CustomerMutableFields, 'cognitoUserId'> {
|
|
45
43
|
id: string;
|
|
46
44
|
tenantId: string;
|
|
47
|
-
storeId: string;
|
|
45
|
+
storeId: string | null;
|
|
48
46
|
customerType: CustomerType;
|
|
49
47
|
status: CustomerStatus;
|
|
50
48
|
isGuest: boolean;
|
|
@@ -54,27 +52,36 @@ export interface Customer extends CustomerMutableFields {
|
|
|
54
52
|
acceptsSms: boolean;
|
|
55
53
|
preferredLanguage: string;
|
|
56
54
|
totalOrders: number;
|
|
55
|
+
/** Cents, serialized from BigInt */
|
|
57
56
|
totalSpent: string;
|
|
57
|
+
/** Cents, serialized from BigInt */
|
|
58
58
|
averageOrderValue: string;
|
|
59
|
+
/** Cents, serialized from BigInt */
|
|
59
60
|
lifetimeValue: string;
|
|
60
61
|
lastOrderAt?: string;
|
|
61
62
|
lastLoginAt?: string;
|
|
62
63
|
registeredAt?: string;
|
|
63
64
|
loyaltyPoints: number;
|
|
64
65
|
purchasingLimit?: string;
|
|
65
|
-
addresses?: CustomerAddress[];
|
|
66
66
|
createdAt: string;
|
|
67
67
|
updatedAt: string;
|
|
68
68
|
}
|
|
69
|
+
/** Returned by createGuest: the customer plus the token that identifies the guest later */
|
|
70
|
+
export interface GuestCustomer extends Customer {
|
|
71
|
+
guestToken: string;
|
|
72
|
+
}
|
|
69
73
|
export type CreateCustomerDto = CustomerMutableFields & {
|
|
70
74
|
purchasingLimit?: number;
|
|
71
75
|
};
|
|
72
76
|
export type UpdateCustomerDto = CustomerMutableFields & {
|
|
73
77
|
purchasingLimit?: number;
|
|
78
|
+
/** ISO date string */
|
|
79
|
+
lastLoginAt?: string;
|
|
80
|
+
/** ISO date string */
|
|
81
|
+
registeredAt?: string;
|
|
74
82
|
};
|
|
75
83
|
export interface CustomerFilters extends Record<string, unknown> {
|
|
76
|
-
email
|
|
77
|
-
isGuest?: boolean;
|
|
84
|
+
/** Matches email, firstName, lastName */
|
|
78
85
|
search?: string;
|
|
79
86
|
customerType?: CustomerFilterType;
|
|
80
87
|
status?: CustomerStatus;
|
|
@@ -82,16 +89,31 @@ export interface CustomerFilters extends Record<string, unknown> {
|
|
|
82
89
|
export type AddressType = 'billing' | 'shipping' | 'work' | 'home' | 'other';
|
|
83
90
|
export type DefaultAddressType = 'billing' | 'shipping';
|
|
84
91
|
export type ValidationStatus = 'pending' | 'valid' | 'invalid' | 'failed';
|
|
85
|
-
export type ValidationProvider = '
|
|
86
|
-
export type GeocodingProvider = '
|
|
87
|
-
|
|
92
|
+
export type ValidationProvider = 'easypost';
|
|
93
|
+
export type GeocodingProvider = 'easypost';
|
|
94
|
+
/** Postal fields shared by customer address responses and write DTOs */
|
|
95
|
+
interface CustomerAddressFields {
|
|
96
|
+
firstName?: string;
|
|
97
|
+
lastName?: string;
|
|
98
|
+
company?: string;
|
|
99
|
+
address1: string;
|
|
100
|
+
address2?: string;
|
|
101
|
+
address3?: string;
|
|
102
|
+
city: string;
|
|
103
|
+
state?: string;
|
|
104
|
+
zip: string;
|
|
105
|
+
/** ISO-2 on responses; ISO-2, ISO-3 or English name accepted on writes */
|
|
106
|
+
country: string;
|
|
107
|
+
phone?: string;
|
|
108
|
+
instructions?: string;
|
|
109
|
+
}
|
|
110
|
+
export interface CustomerAddress extends CustomerAddressFields {
|
|
88
111
|
id: string;
|
|
89
112
|
customerId: string;
|
|
90
113
|
tenantId: string;
|
|
91
114
|
storeId: string;
|
|
92
115
|
type: AddressType;
|
|
93
116
|
label?: string;
|
|
94
|
-
address3?: string;
|
|
95
117
|
isValidated: boolean;
|
|
96
118
|
validationStatus: ValidationStatus;
|
|
97
119
|
validationMetadata?: Record<string, unknown>;
|
|
@@ -104,10 +126,9 @@ export interface CustomerAddress extends AddressSnapshot {
|
|
|
104
126
|
createdAt: string;
|
|
105
127
|
updatedAt: string;
|
|
106
128
|
}
|
|
107
|
-
export interface CreateCustomerAddressDto extends
|
|
129
|
+
export interface CreateCustomerAddressDto extends CustomerAddressFields {
|
|
108
130
|
type: AddressType;
|
|
109
131
|
label?: string;
|
|
110
|
-
address3?: string;
|
|
111
132
|
isValidated?: boolean;
|
|
112
133
|
validationStatus?: ValidationStatus;
|
|
113
134
|
validationMetadata?: Record<string, unknown>;
|
|
@@ -118,10 +139,9 @@ export interface CreateCustomerAddressDto extends AddressSnapshot {
|
|
|
118
139
|
isDefaultShipping?: boolean;
|
|
119
140
|
metadata?: Record<string, unknown>;
|
|
120
141
|
}
|
|
121
|
-
export interface UpdateCustomerAddressDto extends Partial<
|
|
142
|
+
export interface UpdateCustomerAddressDto extends Partial<CustomerAddressFields> {
|
|
122
143
|
type?: AddressType;
|
|
123
144
|
label?: string;
|
|
124
|
-
address3?: string;
|
|
125
145
|
isValidated?: boolean;
|
|
126
146
|
validationStatus?: ValidationStatus;
|
|
127
147
|
validationMetadata?: Record<string, unknown>;
|
|
@@ -133,49 +153,37 @@ export interface UpdateCustomerAddressDto extends Partial<AddressSnapshot> {
|
|
|
133
153
|
metadata?: Record<string, unknown>;
|
|
134
154
|
}
|
|
135
155
|
export interface ValidateAddressDto {
|
|
136
|
-
isValidated
|
|
156
|
+
isValidated: boolean;
|
|
137
157
|
latitude?: number;
|
|
138
158
|
longitude?: number;
|
|
139
159
|
metadata?: Record<string, unknown>;
|
|
140
160
|
}
|
|
141
|
-
export interface ValidateAddressDataDto extends Pick<
|
|
142
|
-
address2?: string;
|
|
143
|
-
address3?: string;
|
|
144
|
-
state?: string;
|
|
161
|
+
export interface ValidateAddressDataDto extends Pick<CustomerAddressFields, 'address1' | 'address2' | 'address3' | 'city' | 'state' | 'zip' | 'country'> {
|
|
145
162
|
provider?: ValidationProvider;
|
|
146
163
|
}
|
|
147
164
|
export interface AddressValidationResult {
|
|
148
165
|
isValid: boolean;
|
|
149
|
-
validationStatus:
|
|
150
|
-
standardizedAddress
|
|
151
|
-
address1
|
|
152
|
-
address2
|
|
153
|
-
address3
|
|
154
|
-
city
|
|
155
|
-
state
|
|
156
|
-
zip
|
|
157
|
-
country
|
|
166
|
+
validationStatus: 'valid' | 'invalid' | 'failed';
|
|
167
|
+
standardizedAddress: {
|
|
168
|
+
address1: string;
|
|
169
|
+
address2: string | null;
|
|
170
|
+
address3: string | null;
|
|
171
|
+
city: string;
|
|
172
|
+
state: string | null;
|
|
173
|
+
zip: string;
|
|
174
|
+
country: string;
|
|
158
175
|
};
|
|
159
|
-
geocoding
|
|
160
|
-
latitude
|
|
161
|
-
longitude
|
|
162
|
-
timezone
|
|
176
|
+
geocoding: {
|
|
177
|
+
latitude: number;
|
|
178
|
+
longitude: number;
|
|
179
|
+
timezone: string;
|
|
180
|
+
} | null;
|
|
181
|
+
validationMetadata: {
|
|
182
|
+
provider: string;
|
|
183
|
+
confidence: number;
|
|
184
|
+
timestamp: string;
|
|
185
|
+
componentsMatched: string[];
|
|
163
186
|
};
|
|
164
|
-
validationMetadata?: Record<string, unknown>;
|
|
165
|
-
}
|
|
166
|
-
export interface GeocodeAddressDto extends Pick<AddressSnapshot, 'address1' | 'city' | 'zip' | 'country'> {
|
|
167
|
-
address2?: string;
|
|
168
|
-
address3?: string;
|
|
169
|
-
state?: string;
|
|
170
|
-
provider?: GeocodingProvider;
|
|
171
|
-
}
|
|
172
|
-
export interface GeocodeResult {
|
|
173
|
-
latitude: number;
|
|
174
|
-
longitude: number;
|
|
175
|
-
timezone?: string;
|
|
176
|
-
provider?: string;
|
|
177
|
-
accuracy?: string;
|
|
178
|
-
metadata?: Record<string, unknown>;
|
|
179
187
|
}
|
|
180
188
|
export interface ValidationProvidersResult {
|
|
181
189
|
validationProviders: ProviderInfo[];
|
|
@@ -184,8 +192,8 @@ export interface ValidationProvidersResult {
|
|
|
184
192
|
export interface ProviderInfo {
|
|
185
193
|
name: string;
|
|
186
194
|
displayName: string;
|
|
187
|
-
supportedCountries
|
|
188
|
-
features
|
|
195
|
+
supportedCountries: string[];
|
|
196
|
+
features: string[];
|
|
189
197
|
isEnabled: boolean;
|
|
190
198
|
}
|
|
191
199
|
export interface ConvertGuestDto {
|
|
@@ -221,15 +229,16 @@ export declare class CustomersClient extends BaseResourceClient<Customer, Create
|
|
|
221
229
|
*/
|
|
222
230
|
search(query: string, limit?: number): Promise<PaginatedResponse<Customer>>;
|
|
223
231
|
/**
|
|
224
|
-
* Get customer by email
|
|
232
|
+
* Get customer by email. Throws `NotFoundError` when no customer matches.
|
|
225
233
|
*/
|
|
226
234
|
getByEmail(email: string): Promise<Customer>;
|
|
227
235
|
/**
|
|
228
|
-
* Create a guest customer for anonymous shopping
|
|
236
|
+
* Create a guest customer for anonymous shopping.
|
|
237
|
+
* Keep the returned guestToken to look the guest up later.
|
|
229
238
|
*/
|
|
230
|
-
createGuest(): Promise<
|
|
239
|
+
createGuest(): Promise<GuestCustomer>;
|
|
231
240
|
/**
|
|
232
|
-
* Get guest customer by token
|
|
241
|
+
* Get guest customer by token. Throws `NotFoundError` when the token matches no customer.
|
|
233
242
|
*/
|
|
234
243
|
getByGuestToken(token: string): Promise<Customer>;
|
|
235
244
|
/**
|
|
@@ -244,9 +253,13 @@ export declare class CustomersClient extends BaseResourceClient<Customer, Create
|
|
|
244
253
|
*/
|
|
245
254
|
merge(data: MergeCustomersDto): Promise<Customer>;
|
|
246
255
|
/**
|
|
247
|
-
* Get customer addresses with optional type filter
|
|
256
|
+
* Get customer addresses with optional type filter.
|
|
257
|
+
* The API pages addresses with a 0-indexed page (default 0) and limit (default 50).
|
|
248
258
|
*/
|
|
249
|
-
getAddresses(customerId: string, type?: AddressType
|
|
259
|
+
getAddresses(customerId: string, type?: AddressType, options?: {
|
|
260
|
+
page?: number;
|
|
261
|
+
limit?: number;
|
|
262
|
+
}): Promise<CustomerAddress[]>;
|
|
250
263
|
/**
|
|
251
264
|
* Get a specific address by ID
|
|
252
265
|
*/
|
|
@@ -266,7 +279,7 @@ export declare class CustomersClient extends BaseResourceClient<Customer, Create
|
|
|
266
279
|
/**
|
|
267
280
|
* Get default billing or shipping address
|
|
268
281
|
*/
|
|
269
|
-
getDefaultAddress(customerId: string, type: DefaultAddressType): Promise<CustomerAddress>;
|
|
282
|
+
getDefaultAddress(customerId: string, type: DefaultAddressType): Promise<CustomerAddress | null>;
|
|
270
283
|
/**
|
|
271
284
|
* Get all addresses of a specific type
|
|
272
285
|
*/
|
|
@@ -283,10 +296,6 @@ export declare class CustomersClient extends BaseResourceClient<Customer, Create
|
|
|
283
296
|
* Validate address data using external services (Google Places, SmartyStreets)
|
|
284
297
|
*/
|
|
285
298
|
validateAddressData(customerId: string, data: ValidateAddressDataDto): Promise<AddressValidationResult>;
|
|
286
|
-
/**
|
|
287
|
-
* Geocode an address to get latitude, longitude, and timezone
|
|
288
|
-
*/
|
|
289
|
-
geocodeAddress(customerId: string, data: GeocodeAddressDto): Promise<GeocodeResult>;
|
|
290
299
|
/**
|
|
291
300
|
* Get available address validation and geocoding providers
|
|
292
301
|
*/
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"customers.client.d.ts","sourceRoot":"","sources":["../../../../../src/services/core/customers.client.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,mBAAmB,IAAI,UAAU,EAAE,MAAM,2BAA2B,CAAC;AACn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AAC,yBAAyB,CAAC;CAKrF"}
|
|
@@ -30,22 +30,23 @@ export class CustomersClient extends BaseResourceClient {
|
|
|
30
30
|
return this.list({ filters: { search: query }, limit });
|
|
31
31
|
}
|
|
32
32
|
/**
|
|
33
|
-
* Get customer by email
|
|
33
|
+
* Get customer by email. Throws `NotFoundError` when no customer matches.
|
|
34
34
|
*/
|
|
35
35
|
async getByEmail(email) {
|
|
36
36
|
return this.http.get(`${this.endpoint}/email/${encodeURIComponent(email)}`);
|
|
37
37
|
}
|
|
38
38
|
/**
|
|
39
|
-
* Create a guest customer for anonymous shopping
|
|
39
|
+
* Create a guest customer for anonymous shopping.
|
|
40
|
+
* Keep the returned guestToken to look the guest up later.
|
|
40
41
|
*/
|
|
41
42
|
async createGuest() {
|
|
42
43
|
return this.http.post(`${this.endpoint}/guest`, {});
|
|
43
44
|
}
|
|
44
45
|
/**
|
|
45
|
-
* Get guest customer by token
|
|
46
|
+
* Get guest customer by token. Throws `NotFoundError` when the token matches no customer.
|
|
46
47
|
*/
|
|
47
48
|
async getByGuestToken(token) {
|
|
48
|
-
return this.http.get(`${this.endpoint}/guest/${token}`);
|
|
49
|
+
return this.http.get(`${this.endpoint}/guest/${encodeURIComponent(token)}`);
|
|
49
50
|
}
|
|
50
51
|
/**
|
|
51
52
|
* Convert a guest customer to a registered customer
|
|
@@ -64,12 +65,17 @@ export class CustomersClient extends BaseResourceClient {
|
|
|
64
65
|
}
|
|
65
66
|
// ==================== Address Methods ====================
|
|
66
67
|
/**
|
|
67
|
-
* Get customer addresses with optional type filter
|
|
68
|
+
* Get customer addresses with optional type filter.
|
|
69
|
+
* The API pages addresses with a 0-indexed page (default 0) and limit (default 50).
|
|
68
70
|
*/
|
|
69
|
-
async getAddresses(customerId, type) {
|
|
71
|
+
async getAddresses(customerId, type, options = {}) {
|
|
70
72
|
const params = {};
|
|
71
73
|
if (type)
|
|
72
74
|
params.type = type;
|
|
75
|
+
if (options.page !== undefined)
|
|
76
|
+
params.page = String(options.page);
|
|
77
|
+
if (options.limit !== undefined)
|
|
78
|
+
params.limit = String(options.limit);
|
|
73
79
|
return this.http.get(`${this.endpoint}/${customerId}/addresses`, { params });
|
|
74
80
|
}
|
|
75
81
|
/**
|
|
@@ -100,7 +106,9 @@ export class CustomersClient extends BaseResourceClient {
|
|
|
100
106
|
* Get default billing or shipping address
|
|
101
107
|
*/
|
|
102
108
|
async getDefaultAddress(customerId, type) {
|
|
103
|
-
|
|
109
|
+
// The API answers 200 with an empty body when no default is set
|
|
110
|
+
const address = await this.http.get(`${this.endpoint}/${customerId}/addresses/default/${type}`);
|
|
111
|
+
return address || null;
|
|
104
112
|
}
|
|
105
113
|
/**
|
|
106
114
|
* Get all addresses of a specific type
|
|
@@ -126,12 +134,6 @@ export class CustomersClient extends BaseResourceClient {
|
|
|
126
134
|
async validateAddressData(customerId, data) {
|
|
127
135
|
return this.http.post(`${this.endpoint}/${customerId}/addresses/validate`, data);
|
|
128
136
|
}
|
|
129
|
-
/**
|
|
130
|
-
* Geocode an address to get latitude, longitude, and timezone
|
|
131
|
-
*/
|
|
132
|
-
async geocodeAddress(customerId, data) {
|
|
133
|
-
return this.http.post(`${this.endpoint}/${customerId}/addresses/geocode`, data);
|
|
134
|
-
}
|
|
135
137
|
/**
|
|
136
138
|
* Get available address validation and geocoding providers
|
|
137
139
|
*/
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"customers.client.js","sourceRoot":"","sources":["../../../../../src/services/core/customers.client.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"customers.client.js","sourceRoot":"","sources":["../../../../../src/services/core/customers.client.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,kBAAkB,EAAE,MAAM,oBAAoB,CAAC;AAyOxD,mDAAmD;AAEnD,MAAM,OAAO,eAAgB,SAAQ,kBAKpC;IACC,YAAY,UAAsB,EAAE,OAAe;QACjD,KAAK,CAAC,EAAE,UAAU,EAAE,OAAO,EAAE,YAAY,EAAE,WAAW,EA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IAAI,UAAU,cAAc,SAAS,WAAW,EAChE,IAAI,CACL,CAAC;IACJ,CAAC;IAED;;OAEG;IACH,KAAK,CAAC,mBAAmB,CACvB,UAAkB,EAClB,IAA4B;QAE5B,OAAO,IAAI,CAAC,IAAI,CAAC,IAAI,CACnB,GAAG,IAAI,CAAC,QAAQ,IAAI,UAAU,qBAAqB,EACnD,IAAI,CACL,CAAC;IACJ,CAAC;IAED;;OAEG;IACH,KAAK,CAAC,sBAAsB,CAAC,UAAkB;QAC7C,OAAO,IAAI,CAAC,IAAI,CAAC,GAAG,CAClB,GAAG,IAAI,CAAC,QAAQ,IAAI,UAAU,iCAAiC,CAChE,CAAC;IACJ,CAAC;CACF"}
|
|
@@ -29,29 +29,34 @@ export interface Discount {
|
|
|
29
29
|
/** Oldest live code, or `null` when the discount has none (auto-applied). */
|
|
30
30
|
primaryCode: string | null;
|
|
31
31
|
name: string;
|
|
32
|
-
description
|
|
32
|
+
description: string | null;
|
|
33
33
|
discountType: DiscountType;
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
34
|
+
/** Integer serialized as a string: cents for fixedAmount, whole percent (0-100) for percent. */
|
|
35
|
+
discountValue: string;
|
|
36
|
+
currency: string;
|
|
37
|
+
/** Cents, serialized from BigInt */
|
|
38
|
+
minimumOrderAmount: string | null;
|
|
39
|
+
minimumOrderQuantity: number | null;
|
|
40
|
+
usageLimit: number | null;
|
|
41
|
+
usageLimitPerCustomer: number | null;
|
|
40
42
|
usageCount: number;
|
|
41
|
-
applicableProducts
|
|
42
|
-
applicableCategories
|
|
43
|
-
applicableVariants
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
43
|
+
applicableProducts: string[];
|
|
44
|
+
applicableCategories: string[];
|
|
45
|
+
applicableVariants: string[];
|
|
46
|
+
customerEligibility: Record<string, unknown> | null;
|
|
47
|
+
requiredCustomerTags: string[];
|
|
48
|
+
excludedCustomerTags: string[];
|
|
49
|
+
startsAt: string;
|
|
50
|
+
endsAt: string | null;
|
|
48
51
|
isActive: boolean;
|
|
49
|
-
isAutoApplied
|
|
50
|
-
canCombineWithOthers
|
|
51
|
-
priority
|
|
52
|
-
|
|
52
|
+
isAutoApplied: boolean;
|
|
53
|
+
canCombineWithOthers: boolean;
|
|
54
|
+
priority: number;
|
|
55
|
+
/** BOGO discounts carry their `bogoConfig` here. */
|
|
56
|
+
metadata: Record<string, unknown> | null;
|
|
53
57
|
createdAt: string;
|
|
54
58
|
updatedAt: string;
|
|
59
|
+
deletedAt: string | null;
|
|
55
60
|
}
|
|
56
61
|
export interface DiscountCondition {
|
|
57
62
|
type: 'product' | 'category' | 'customer' | 'minimumQuantity';
|
|
@@ -81,9 +86,10 @@ export interface CreateDiscountDto {
|
|
|
81
86
|
name: string;
|
|
82
87
|
description?: string;
|
|
83
88
|
discountType: DiscountType;
|
|
84
|
-
/**
|
|
89
|
+
/** Integer: cents for fixedAmount, whole percent (0-100) for percent. Not used for freeShipping or buyXGetY. */
|
|
85
90
|
discountValue?: number;
|
|
86
91
|
currency?: string;
|
|
92
|
+
/** Integer cents */
|
|
87
93
|
minimumOrderAmount?: number;
|
|
88
94
|
minimumOrderQuantity?: number;
|
|
89
95
|
usageLimit?: number;
|
|
@@ -91,6 +97,7 @@ export interface CreateDiscountDto {
|
|
|
91
97
|
applicableProducts?: string[];
|
|
92
98
|
applicableCategories?: string[];
|
|
93
99
|
applicableVariants?: string[];
|
|
100
|
+
customerEligibility?: Record<string, unknown>;
|
|
94
101
|
requiredCustomerTags?: string[];
|
|
95
102
|
excludedCustomerTags?: string[];
|
|
96
103
|
startsAt?: string;
|
|
@@ -103,7 +110,9 @@ export interface CreateDiscountDto {
|
|
|
103
110
|
/** Configuration for Buy X Get Y discounts. Required when discountType is buyXGetY. */
|
|
104
111
|
bogoConfig?: BogoConfig;
|
|
105
112
|
}
|
|
113
|
+
/** PATCH body: every CreateDiscountDto field is optional (including code). */
|
|
106
114
|
export interface UpdateDiscountDto {
|
|
115
|
+
code?: string;
|
|
107
116
|
name?: string;
|
|
108
117
|
description?: string;
|
|
109
118
|
discountType?: DiscountType;
|
|
@@ -116,6 +125,7 @@ export interface UpdateDiscountDto {
|
|
|
116
125
|
applicableProducts?: string[];
|
|
117
126
|
applicableCategories?: string[];
|
|
118
127
|
applicableVariants?: string[];
|
|
128
|
+
customerEligibility?: Record<string, unknown>;
|
|
119
129
|
requiredCustomerTags?: string[];
|
|
120
130
|
excludedCustomerTags?: string[];
|
|
121
131
|
startsAt?: string;
|
|
@@ -127,23 +137,72 @@ export interface UpdateDiscountDto {
|
|
|
127
137
|
metadata?: Record<string, unknown>;
|
|
128
138
|
bogoConfig?: BogoConfig;
|
|
129
139
|
}
|
|
140
|
+
/** Query filters read by GET /v1/discounts. */
|
|
130
141
|
export interface DiscountFilters extends Record<string, unknown> {
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
142
|
+
/** Case-insensitive match on code or name. */
|
|
143
|
+
search?: string;
|
|
144
|
+
active?: boolean;
|
|
145
|
+
type?: DiscountType;
|
|
146
|
+
}
|
|
147
|
+
/** Response of GET /v1/discounts (`page` is 0-based). */
|
|
148
|
+
export interface DiscountListResponse {
|
|
149
|
+
data: Discount[];
|
|
150
|
+
total: number;
|
|
151
|
+
page: number;
|
|
152
|
+
limit: number;
|
|
153
|
+
}
|
|
154
|
+
/** Body for POST /v1/discounts/validate and POST /v1/discounts/calculate. */
|
|
155
|
+
export interface ValidateDiscountDto {
|
|
156
|
+
code: string;
|
|
157
|
+
customerId?: string;
|
|
158
|
+
/** Guest shopper email for the per-customer limit (matched trimmed and lowercased). */
|
|
159
|
+
customerEmail?: string;
|
|
160
|
+
orderAmount?: number;
|
|
161
|
+
orderQuantity?: number;
|
|
162
|
+
shippingAmount?: number;
|
|
163
|
+
cartItems?: {
|
|
164
|
+
items: Array<{
|
|
165
|
+
productId: string;
|
|
166
|
+
variantId?: string;
|
|
167
|
+
categoryIds?: string[];
|
|
168
|
+
quantity: number;
|
|
169
|
+
price: number;
|
|
170
|
+
}>;
|
|
171
|
+
};
|
|
134
172
|
}
|
|
135
173
|
export interface DiscountValidation {
|
|
136
174
|
isValid: boolean;
|
|
137
|
-
|
|
175
|
+
/** Why the code is invalid (when `isValid` is false). */
|
|
176
|
+
reason?: string;
|
|
177
|
+
discount?: Record<string, unknown>;
|
|
138
178
|
/** Id of the matched code (the code row, not the discount). */
|
|
139
179
|
discountCodeId?: string;
|
|
140
|
-
|
|
180
|
+
/** Integer cents */
|
|
141
181
|
discountAmount?: number;
|
|
182
|
+
remainingUses?: number;
|
|
183
|
+
remainingUsesPerCustomer?: number;
|
|
142
184
|
}
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
185
|
+
export interface DiscountUsageByDate {
|
|
186
|
+
date: string;
|
|
187
|
+
count: number;
|
|
188
|
+
/** Cents, serialized from BigInt */
|
|
189
|
+
amountSaved: string;
|
|
190
|
+
}
|
|
191
|
+
export interface DiscountTopCustomer {
|
|
192
|
+
customerId: string;
|
|
193
|
+
usageCount: number;
|
|
194
|
+
/** Cents, serialized from BigInt */
|
|
195
|
+
totalSaved: string;
|
|
196
|
+
}
|
|
197
|
+
export interface DiscountUsageStats {
|
|
198
|
+
discountId: string;
|
|
199
|
+
code: string;
|
|
200
|
+
totalUsages: number;
|
|
201
|
+
/** Cents, serialized from BigInt */
|
|
202
|
+
totalAmountSaved: string;
|
|
203
|
+
uniqueCustomers: number;
|
|
204
|
+
usageByDate?: DiscountUsageByDate[];
|
|
205
|
+
topCustomers?: DiscountTopCustomer[];
|
|
147
206
|
}
|
|
148
207
|
/** One code of a discount (`/v1/discounts/:id/codes`). */
|
|
149
208
|
export interface DiscountCode {
|
|
@@ -217,7 +276,7 @@ export declare class DiscountCodesClient {
|
|
|
217
276
|
* `list()` `page` is 0-based (server default `page=0`). Most other SDK list
|
|
218
277
|
* helpers document 1-indexed pages. `codes.list()` is 1-based.
|
|
219
278
|
*/
|
|
220
|
-
export declare class DiscountsClient extends BaseResourceClient<Discount, CreateDiscountDto, UpdateDiscountDto, DiscountFilters> {
|
|
279
|
+
export declare class DiscountsClient extends BaseResourceClient<Discount, CreateDiscountDto, UpdateDiscountDto, DiscountFilters, DiscountListResponse> {
|
|
221
280
|
/** Sub-client for the codes of a discount */
|
|
222
281
|
readonly codes: DiscountCodesClient;
|
|
223
282
|
constructor(httpClient: HttpClient, baseUrl: string);
|
|
@@ -226,20 +285,14 @@ export declare class DiscountsClient extends BaseResourceClient<Discount, Create
|
|
|
226
285
|
*/
|
|
227
286
|
getByCode(code: string): Promise<Discount>;
|
|
228
287
|
/**
|
|
229
|
-
* Validate a discount code
|
|
288
|
+
* Validate a discount code against order context (amount, quantity, items).
|
|
230
289
|
*/
|
|
231
|
-
validate(
|
|
290
|
+
validate(data: ValidateDiscountDto): Promise<DiscountValidation>;
|
|
232
291
|
/**
|
|
233
|
-
* Calculate discount amount for
|
|
292
|
+
* Calculate the discount amount for order context. Same body and response
|
|
293
|
+
* as validate().
|
|
234
294
|
*/
|
|
235
|
-
calculate(
|
|
236
|
-
productId: string;
|
|
237
|
-
quantity: number;
|
|
238
|
-
price: number;
|
|
239
|
-
}[]): Promise<{
|
|
240
|
-
discountAmount: number;
|
|
241
|
-
newTotal: number;
|
|
242
|
-
}>;
|
|
295
|
+
calculate(data: ValidateDiscountDto): Promise<DiscountValidation>;
|
|
243
296
|
/**
|
|
244
297
|
* Activate a discount
|
|
245
298
|
*/
|
|
@@ -249,12 +302,11 @@ export declare class DiscountsClient extends BaseResourceClient<Discount, Create
|
|
|
249
302
|
*/
|
|
250
303
|
deactivate(discountId: string): Promise<Discount>;
|
|
251
304
|
/**
|
|
252
|
-
* Get discount usage statistics
|
|
305
|
+
* Get discount usage statistics, optionally bounded by ISO dates.
|
|
253
306
|
*/
|
|
254
|
-
getUsageStats(discountId: string
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
}>;
|
|
307
|
+
getUsageStats(discountId: string, range?: {
|
|
308
|
+
startDate?: string;
|
|
309
|
+
endDate?: string;
|
|
310
|
+
}): Promise<DiscountUsageStats>;
|
|
259
311
|
}
|
|
260
312
|
//# sourceMappingURL=discounts.client.d.ts.map
|