@aimee.shop/sdk 0.17.0 → 0.18.0-dev.114
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 +16 -16
- 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 +17 -0
- package/dist/services/core/cart-messages/types.d.ts.map +1 -1
- package/dist/services/core/carts.client.d.ts +25 -4
- 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 +13 -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 +68 -62
- package/dist/services/core/customers.client.d.ts.map +1 -1
- package/dist/services/core/customers.client.js +18 -13
- package/dist/services/core/customers.client.js.map +1 -1
- package/dist/services/core/discounts.client.d.ts +89 -44
- 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 +6 -4
- package/dist/services/core/facets.client.d.ts.map +1 -1
- 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 +1 -6
- 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 +5 -7
- 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 +120 -40
- package/dist/services/core/orders.client.d.ts.map +1 -1
- package/dist/services/core/orders.client.js +41 -10
- 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 +1 -1
- package/dist/services/core/pricing/pricing.client.d.ts.map +1 -1
- 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/types.d.ts +41 -57
- package/dist/services/core/pricing/types.d.ts.map +1 -1
- package/dist/services/core/pricing/variant-prices.client.d.ts +2 -2
- package/dist/services/core/pricing/variant-prices.client.d.ts.map +1 -1
- package/dist/services/core/pricing/variant-prices.client.js +2 -6
- package/dist/services/core/pricing/variant-prices.client.js.map +1 -1
- package/dist/services/core/products.client.d.ts +71 -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 +192 -65
- 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-subscriptions.client.d.ts +3 -1
- 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 +42 -14
- package/dist/services/core/stores/stores.client.d.ts.map +1 -1
- package/dist/services/core/stores/stores.client.js +9 -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/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 +238 -131
- package/dist/services/core/taxes/types.d.ts.map +1 -1
- package/dist/services/core/variants.client.d.ts +72 -9
- package/dist/services/core/variants.client.d.ts.map +1 -1
- 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;
|
|
@@ -62,19 +60,25 @@ export interface Customer extends CustomerMutableFields {
|
|
|
62
60
|
registeredAt?: string;
|
|
63
61
|
loyaltyPoints: number;
|
|
64
62
|
purchasingLimit?: string;
|
|
65
|
-
addresses?: CustomerAddress[];
|
|
66
63
|
createdAt: string;
|
|
67
64
|
updatedAt: string;
|
|
68
65
|
}
|
|
66
|
+
/** Returned by createGuest: the customer plus the token that identifies the guest later */
|
|
67
|
+
export interface GuestCustomer extends Customer {
|
|
68
|
+
guestToken: string;
|
|
69
|
+
}
|
|
69
70
|
export type CreateCustomerDto = CustomerMutableFields & {
|
|
70
71
|
purchasingLimit?: number;
|
|
71
72
|
};
|
|
72
73
|
export type UpdateCustomerDto = CustomerMutableFields & {
|
|
73
74
|
purchasingLimit?: number;
|
|
75
|
+
/** ISO date string */
|
|
76
|
+
lastLoginAt?: string;
|
|
77
|
+
/** ISO date string */
|
|
78
|
+
registeredAt?: string;
|
|
74
79
|
};
|
|
75
80
|
export interface CustomerFilters extends Record<string, unknown> {
|
|
76
|
-
email
|
|
77
|
-
isGuest?: boolean;
|
|
81
|
+
/** Matches email, firstName, lastName */
|
|
78
82
|
search?: string;
|
|
79
83
|
customerType?: CustomerFilterType;
|
|
80
84
|
status?: CustomerStatus;
|
|
@@ -82,16 +86,31 @@ export interface CustomerFilters extends Record<string, unknown> {
|
|
|
82
86
|
export type AddressType = 'billing' | 'shipping' | 'work' | 'home' | 'other';
|
|
83
87
|
export type DefaultAddressType = 'billing' | 'shipping';
|
|
84
88
|
export type ValidationStatus = 'pending' | 'valid' | 'invalid' | 'failed';
|
|
85
|
-
export type ValidationProvider = '
|
|
86
|
-
export type GeocodingProvider = '
|
|
87
|
-
|
|
89
|
+
export type ValidationProvider = 'easypost';
|
|
90
|
+
export type GeocodingProvider = 'easypost';
|
|
91
|
+
/** Postal fields shared by customer address responses and write DTOs */
|
|
92
|
+
interface CustomerAddressFields {
|
|
93
|
+
firstName?: string;
|
|
94
|
+
lastName?: string;
|
|
95
|
+
company?: string;
|
|
96
|
+
address1: string;
|
|
97
|
+
address2?: string;
|
|
98
|
+
address3?: string;
|
|
99
|
+
city: string;
|
|
100
|
+
state?: string;
|
|
101
|
+
zip: string;
|
|
102
|
+
/** ISO-2 on responses; ISO-2, ISO-3 or English name accepted on writes */
|
|
103
|
+
country: string;
|
|
104
|
+
phone?: string;
|
|
105
|
+
instructions?: string;
|
|
106
|
+
}
|
|
107
|
+
export interface CustomerAddress extends CustomerAddressFields {
|
|
88
108
|
id: string;
|
|
89
109
|
customerId: string;
|
|
90
110
|
tenantId: string;
|
|
91
111
|
storeId: string;
|
|
92
112
|
type: AddressType;
|
|
93
113
|
label?: string;
|
|
94
|
-
address3?: string;
|
|
95
114
|
isValidated: boolean;
|
|
96
115
|
validationStatus: ValidationStatus;
|
|
97
116
|
validationMetadata?: Record<string, unknown>;
|
|
@@ -104,10 +123,9 @@ export interface CustomerAddress extends AddressSnapshot {
|
|
|
104
123
|
createdAt: string;
|
|
105
124
|
updatedAt: string;
|
|
106
125
|
}
|
|
107
|
-
export interface CreateCustomerAddressDto extends
|
|
126
|
+
export interface CreateCustomerAddressDto extends CustomerAddressFields {
|
|
108
127
|
type: AddressType;
|
|
109
128
|
label?: string;
|
|
110
|
-
address3?: string;
|
|
111
129
|
isValidated?: boolean;
|
|
112
130
|
validationStatus?: ValidationStatus;
|
|
113
131
|
validationMetadata?: Record<string, unknown>;
|
|
@@ -118,10 +136,9 @@ export interface CreateCustomerAddressDto extends AddressSnapshot {
|
|
|
118
136
|
isDefaultShipping?: boolean;
|
|
119
137
|
metadata?: Record<string, unknown>;
|
|
120
138
|
}
|
|
121
|
-
export interface UpdateCustomerAddressDto extends Partial<
|
|
139
|
+
export interface UpdateCustomerAddressDto extends Partial<CustomerAddressFields> {
|
|
122
140
|
type?: AddressType;
|
|
123
141
|
label?: string;
|
|
124
|
-
address3?: string;
|
|
125
142
|
isValidated?: boolean;
|
|
126
143
|
validationStatus?: ValidationStatus;
|
|
127
144
|
validationMetadata?: Record<string, unknown>;
|
|
@@ -133,49 +150,37 @@ export interface UpdateCustomerAddressDto extends Partial<AddressSnapshot> {
|
|
|
133
150
|
metadata?: Record<string, unknown>;
|
|
134
151
|
}
|
|
135
152
|
export interface ValidateAddressDto {
|
|
136
|
-
isValidated
|
|
153
|
+
isValidated: boolean;
|
|
137
154
|
latitude?: number;
|
|
138
155
|
longitude?: number;
|
|
139
156
|
metadata?: Record<string, unknown>;
|
|
140
157
|
}
|
|
141
|
-
export interface ValidateAddressDataDto extends Pick<
|
|
142
|
-
address2?: string;
|
|
143
|
-
address3?: string;
|
|
144
|
-
state?: string;
|
|
158
|
+
export interface ValidateAddressDataDto extends Pick<CustomerAddressFields, 'address1' | 'address2' | 'address3' | 'city' | 'state' | 'zip' | 'country'> {
|
|
145
159
|
provider?: ValidationProvider;
|
|
146
160
|
}
|
|
147
161
|
export interface AddressValidationResult {
|
|
148
162
|
isValid: boolean;
|
|
149
|
-
validationStatus:
|
|
150
|
-
standardizedAddress
|
|
151
|
-
address1
|
|
152
|
-
address2
|
|
153
|
-
address3
|
|
154
|
-
city
|
|
155
|
-
state
|
|
156
|
-
zip
|
|
157
|
-
country
|
|
163
|
+
validationStatus: 'valid' | 'invalid' | 'failed';
|
|
164
|
+
standardizedAddress: {
|
|
165
|
+
address1: string;
|
|
166
|
+
address2: string | null;
|
|
167
|
+
address3: string | null;
|
|
168
|
+
city: string;
|
|
169
|
+
state: string | null;
|
|
170
|
+
zip: string;
|
|
171
|
+
country: string;
|
|
158
172
|
};
|
|
159
|
-
geocoding
|
|
160
|
-
latitude
|
|
161
|
-
longitude
|
|
162
|
-
timezone
|
|
173
|
+
geocoding: {
|
|
174
|
+
latitude: number;
|
|
175
|
+
longitude: number;
|
|
176
|
+
timezone: string;
|
|
177
|
+
} | null;
|
|
178
|
+
validationMetadata: {
|
|
179
|
+
provider: string;
|
|
180
|
+
confidence: number;
|
|
181
|
+
timestamp: string;
|
|
182
|
+
componentsMatched: string[];
|
|
163
183
|
};
|
|
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
184
|
}
|
|
180
185
|
export interface ValidationProvidersResult {
|
|
181
186
|
validationProviders: ProviderInfo[];
|
|
@@ -184,8 +189,8 @@ export interface ValidationProvidersResult {
|
|
|
184
189
|
export interface ProviderInfo {
|
|
185
190
|
name: string;
|
|
186
191
|
displayName: string;
|
|
187
|
-
supportedCountries
|
|
188
|
-
features
|
|
192
|
+
supportedCountries: string[];
|
|
193
|
+
features: string[];
|
|
189
194
|
isEnabled: boolean;
|
|
190
195
|
}
|
|
191
196
|
export interface ConvertGuestDto {
|
|
@@ -223,15 +228,16 @@ export declare class CustomersClient extends BaseResourceClient<Customer, Create
|
|
|
223
228
|
/**
|
|
224
229
|
* Get customer by email
|
|
225
230
|
*/
|
|
226
|
-
getByEmail(email: string): Promise<Customer>;
|
|
231
|
+
getByEmail(email: string): Promise<Customer | null>;
|
|
227
232
|
/**
|
|
228
|
-
* Create a guest customer for anonymous shopping
|
|
233
|
+
* Create a guest customer for anonymous shopping.
|
|
234
|
+
* Keep the returned guestToken to look the guest up later.
|
|
229
235
|
*/
|
|
230
|
-
createGuest(): Promise<
|
|
236
|
+
createGuest(): Promise<GuestCustomer>;
|
|
231
237
|
/**
|
|
232
|
-
* Get guest customer by token
|
|
238
|
+
* Get guest customer by token, or null when the token matches no customer
|
|
233
239
|
*/
|
|
234
|
-
getByGuestToken(token: string): Promise<Customer>;
|
|
240
|
+
getByGuestToken(token: string): Promise<Customer | null>;
|
|
235
241
|
/**
|
|
236
242
|
* Convert a guest customer to a registered customer
|
|
237
243
|
*/
|
|
@@ -244,9 +250,13 @@ export declare class CustomersClient extends BaseResourceClient<Customer, Create
|
|
|
244
250
|
*/
|
|
245
251
|
merge(data: MergeCustomersDto): Promise<Customer>;
|
|
246
252
|
/**
|
|
247
|
-
* Get customer addresses with optional type filter
|
|
253
|
+
* Get customer addresses with optional type filter.
|
|
254
|
+
* The API pages addresses with a 0-indexed page (default 0) and limit (default 50).
|
|
248
255
|
*/
|
|
249
|
-
getAddresses(customerId: string, type?: AddressType
|
|
256
|
+
getAddresses(customerId: string, type?: AddressType, options?: {
|
|
257
|
+
page?: number;
|
|
258
|
+
limit?: number;
|
|
259
|
+
}): Promise<CustomerAddress[]>;
|
|
250
260
|
/**
|
|
251
261
|
* Get a specific address by ID
|
|
252
262
|
*/
|
|
@@ -266,7 +276,7 @@ export declare class CustomersClient extends BaseResourceClient<Customer, Create
|
|
|
266
276
|
/**
|
|
267
277
|
* Get default billing or shipping address
|
|
268
278
|
*/
|
|
269
|
-
getDefaultAddress(customerId: string, type: DefaultAddressType): Promise<CustomerAddress>;
|
|
279
|
+
getDefaultAddress(customerId: string, type: DefaultAddressType): Promise<CustomerAddress | null>;
|
|
270
280
|
/**
|
|
271
281
|
* Get all addresses of a specific type
|
|
272
282
|
*/
|
|
@@ -283,10 +293,6 @@ export declare class CustomersClient extends BaseResourceClient<Customer, Create
|
|
|
283
293
|
* Validate address data using external services (Google Places, SmartyStreets)
|
|
284
294
|
*/
|
|
285
295
|
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
296
|
/**
|
|
291
297
|
* Get available address validation and geocoding providers
|
|
292
298
|
*/
|
|
@@ -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;AACnF,OAAO,KAAK,EAAE,
|
|
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;AACnF,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,gCAAgC,CAAC;AACxE,OAAO,EAAE,kBAAkB,EAAE,MAAM,oBAAoB,CAAC;AAIxD,MAAM,MAAM,YAAY,GAAG,OAAO,GAAG,YAAY,GAAG,cAAc,CAAC;AACnE,MAAM,MAAM,cAAc,GAAG,QAAQ,GAAG,UAAU,GAAG,WAAW,GAAG,QAAQ,CAAC;AAC5E,MAAM,MAAM,cAAc,GAAG,MAAM,GAAG,QAAQ,GAAG,OAAO,GAAG,gBAAgB,CAAC;AAC5E,MAAM,MAAM,YAAY,GAAG,gBAAgB,GAAG,QAAQ,GAAG,QAAQ,GAAG,QAAQ,GAAG,QAAQ,CAAC;AACxF,MAAM,MAAM,kBAAkB,GAAG,OAAO,GAAG,YAAY,GAAG,cAAc,CAAC;AACzE,MAAM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AAE,MAAM,EAAE,IAAI,EAAE,WAAW,GAAG,OAAO,CAAC,eAAe,EAAE,CAAC;IAM3F;;OAEG;IACG,iBAAiB,CACrB,UAAU,EAAE,MAAM,EAClB,SAAS,EAAE,MAAM,EACjB,IAAI,EAAE,kBAAkB,GACvB,OAAO,CAAC,eAAe,CAAC;IAO3B;;OAEG;IACG,eAAe,CACnB,UAAU,EAAE,MAAM,EAClB,SAAS,EAAE,MAAM,EACjB,IAAI,EAAE,kBAAkB,GACvB,OAAO,CAAC,eAAe,CAAC;IAO3B;;OAEG;IACG,mBAAmB,CACvB,UAAU,EAAE,MAAM,EAClB,IAAI,EAAE,sBAAsB,GAC3B,OAAO,CAAC,uBAAuB,CAAC;IAOnC;;OAEG;IACG,sBAAsB,CAAC,UAAU,EAAE,MAAM,GAAG,OAAO,CAAC,yBAAyB,CAAC;CAKrF"}
|
|
@@ -33,19 +33,23 @@ export class CustomersClient extends BaseResourceClient {
|
|
|
33
33
|
* Get customer by email
|
|
34
34
|
*/
|
|
35
35
|
async getByEmail(email) {
|
|
36
|
-
|
|
36
|
+
// The API answers 200 with an empty body (not 404) when no customer matches
|
|
37
|
+
const customer = await this.http.get(`${this.endpoint}/email/${encodeURIComponent(email)}`);
|
|
38
|
+
return customer || null;
|
|
37
39
|
}
|
|
38
40
|
/**
|
|
39
|
-
* Create a guest customer for anonymous shopping
|
|
41
|
+
* Create a guest customer for anonymous shopping.
|
|
42
|
+
* Keep the returned guestToken to look the guest up later.
|
|
40
43
|
*/
|
|
41
44
|
async createGuest() {
|
|
42
45
|
return this.http.post(`${this.endpoint}/guest`, {});
|
|
43
46
|
}
|
|
44
47
|
/**
|
|
45
|
-
* Get guest customer by token
|
|
48
|
+
* Get guest customer by token, or null when the token matches no customer
|
|
46
49
|
*/
|
|
47
50
|
async getByGuestToken(token) {
|
|
48
|
-
|
|
51
|
+
const customer = await this.http.get(`${this.endpoint}/guest/${encodeURIComponent(token)}`);
|
|
52
|
+
return customer || null;
|
|
49
53
|
}
|
|
50
54
|
/**
|
|
51
55
|
* Convert a guest customer to a registered customer
|
|
@@ -64,12 +68,17 @@ export class CustomersClient extends BaseResourceClient {
|
|
|
64
68
|
}
|
|
65
69
|
// ==================== Address Methods ====================
|
|
66
70
|
/**
|
|
67
|
-
* Get customer addresses with optional type filter
|
|
71
|
+
* Get customer addresses with optional type filter.
|
|
72
|
+
* The API pages addresses with a 0-indexed page (default 0) and limit (default 50).
|
|
68
73
|
*/
|
|
69
|
-
async getAddresses(customerId, type) {
|
|
74
|
+
async getAddresses(customerId, type, options = {}) {
|
|
70
75
|
const params = {};
|
|
71
76
|
if (type)
|
|
72
77
|
params.type = type;
|
|
78
|
+
if (options.page !== undefined)
|
|
79
|
+
params.page = String(options.page);
|
|
80
|
+
if (options.limit !== undefined)
|
|
81
|
+
params.limit = String(options.limit);
|
|
73
82
|
return this.http.get(`${this.endpoint}/${customerId}/addresses`, { params });
|
|
74
83
|
}
|
|
75
84
|
/**
|
|
@@ -100,7 +109,9 @@ export class CustomersClient extends BaseResourceClient {
|
|
|
100
109
|
* Get default billing or shipping address
|
|
101
110
|
*/
|
|
102
111
|
async getDefaultAddress(customerId, type) {
|
|
103
|
-
|
|
112
|
+
// The API answers 200 with an empty body when no default is set
|
|
113
|
+
const address = await this.http.get(`${this.endpoint}/${customerId}/addresses/default/${type}`);
|
|
114
|
+
return address || null;
|
|
104
115
|
}
|
|
105
116
|
/**
|
|
106
117
|
* Get all addresses of a specific type
|
|
@@ -126,12 +137,6 @@ export class CustomersClient extends BaseResourceClient {
|
|
|
126
137
|
async validateAddressData(customerId, data) {
|
|
127
138
|
return this.http.post(`${this.endpoint}/${customerId}/addresses/validate`, data);
|
|
128
139
|
}
|
|
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
140
|
/**
|
|
136
141
|
* Get available address validation and geocoding providers
|
|
137
142
|
*/
|
|
@@ -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;AAsOxD,mDAAmD;AAEnD,MAAM,OAAO,eAAgB,SAAQ,kBAKpC;IACC,YAAY,UAAsB,EAAE,OAAe;QACjD,KAAK,CAAC,EAAE,UAAU,EAAE,OAAO,EAAE,YAAY,EAAE,WAAW,EAAE,CAAC,CAAC;IAC5D,CAAC;IAED;;OAEG;IACH,KAAK,CAAC,MAAM,CAAC,EAAU,EAAE,IAAuB;QAC9C,OAAO,IAAI,CAAC,IAAI,CAAC,GAAG,CAAW,GAAG,IAAI,CAAC,QAAQ,IAAI,EAAE,EAAE,EAAE,IAAI,CAAC,CAAC;IACjE,CAAC;IAED;;;;;;;;OAQG;IACH,KAAK,CAAC,kBAAkB,CAAC,UAAkB,EAAE,IAAuB;QAClE,OAAO,IAAI,CAAC,IAAI,CAAC,GAAG,CAClB,GAAG,IAAI,CAAC,QAAQ,aAAa,kBAAkB,CAAC,UAAU,CAAC,EAAE,EAC7D,IAAI,CACL,CAAC;IACJ,CAAC;IAED;;;OAGG;IACH,KAAK,CAAC,MAAM,CAAC,KAAa,EAAE,KAAc;QACxC,OAAO,IAAI,CAAC,IAAI,CAAC,EAAE,OAAO,EAAE,EAAE,MAAM,EAAE,KAAK,EAAE,EAAE,KAAK,EAAE,CAAC,CAAC;IAC1D,CAAC;IAED;;OAEG;IACH,KAAK,CAAC,UAAU,CAAC,KAAa;QAC5B,4EAA4E;QAC5E,MAAM,QAAQ,GAAG,MAAM,IAAI,CAAC,IAAI,CAAC,GAAG,CAClC,GAAG,IAAI,CA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AC;IACzB,CAAC;IAED;;OAEG;IACH,KAAK,CAAC,kBAAkB,CAAC,UAAkB,EAAE,IAAiB;QAC5D,OAAO,IAAI,CAAC,IAAI,CAAC,GAAG,CAClB,GAAG,IAAI,CAAC,QAAQ,IAAI,UAAU,sBAAsB,IAAI,EAAE,CAC3D,CAAC;IACJ,CAAC;IAED;;OAEG;IACH,KAAK,CAAC,iBAAiB,CACrB,UAAkB,EAClB,SAAiB,EACjB,IAAwB;QAExB,OAAO,IAAI,CAAC,IAAI,CAAC,IAAI,CACnB,GAAG,IAAI,CAAC,QAAQ,IAAI,UAAU,cAAc,SAAS,gBAAgB,IAAI,EAAE,EAC3E,EAAE,CACH,CAAC;IACJ,CAAC;IAED;;OAEG;IACH,KAAK,CAAC,eAAe,CACnB,UAAkB,EAClB,SAAiB,EACjB,IAAwB;QAExB,OAAO,IAAI,CAAC,IAAI,CAAC,IAAI,CACnB,GAAG,IAAI,CAAC,QAAQ,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,32 @@ 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
34
|
discountValue: number;
|
|
35
|
-
currency
|
|
36
|
-
minimumOrderAmount
|
|
37
|
-
minimumOrderQuantity
|
|
38
|
-
usageLimit
|
|
39
|
-
usageLimitPerCustomer
|
|
35
|
+
currency: string;
|
|
36
|
+
minimumOrderAmount: number | null;
|
|
37
|
+
minimumOrderQuantity: number | null;
|
|
38
|
+
usageLimit: number | null;
|
|
39
|
+
usageLimitPerCustomer: number | null;
|
|
40
40
|
usageCount: number;
|
|
41
|
-
applicableProducts
|
|
42
|
-
applicableCategories
|
|
43
|
-
applicableVariants
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
41
|
+
applicableProducts: string[];
|
|
42
|
+
applicableCategories: string[];
|
|
43
|
+
applicableVariants: string[];
|
|
44
|
+
customerEligibility: Record<string, unknown> | null;
|
|
45
|
+
requiredCustomerTags: string[];
|
|
46
|
+
excludedCustomerTags: string[];
|
|
47
|
+
startsAt: string;
|
|
48
|
+
endsAt: string | null;
|
|
48
49
|
isActive: boolean;
|
|
49
|
-
isAutoApplied
|
|
50
|
-
canCombineWithOthers
|
|
51
|
-
priority
|
|
52
|
-
|
|
50
|
+
isAutoApplied: boolean;
|
|
51
|
+
canCombineWithOthers: boolean;
|
|
52
|
+
priority: number;
|
|
53
|
+
/** BOGO discounts carry their `bogoConfig` here. */
|
|
54
|
+
metadata: Record<string, unknown> | null;
|
|
53
55
|
createdAt: string;
|
|
54
56
|
updatedAt: string;
|
|
57
|
+
deletedAt: string | null;
|
|
55
58
|
}
|
|
56
59
|
export interface DiscountCondition {
|
|
57
60
|
type: 'product' | 'category' | 'customer' | 'minimumQuantity';
|
|
@@ -91,6 +94,7 @@ export interface CreateDiscountDto {
|
|
|
91
94
|
applicableProducts?: string[];
|
|
92
95
|
applicableCategories?: string[];
|
|
93
96
|
applicableVariants?: string[];
|
|
97
|
+
customerEligibility?: Record<string, unknown>;
|
|
94
98
|
requiredCustomerTags?: string[];
|
|
95
99
|
excludedCustomerTags?: string[];
|
|
96
100
|
startsAt?: string;
|
|
@@ -103,7 +107,9 @@ export interface CreateDiscountDto {
|
|
|
103
107
|
/** Configuration for Buy X Get Y discounts. Required when discountType is buyXGetY. */
|
|
104
108
|
bogoConfig?: BogoConfig;
|
|
105
109
|
}
|
|
110
|
+
/** PATCH body: every CreateDiscountDto field is optional (including code). */
|
|
106
111
|
export interface UpdateDiscountDto {
|
|
112
|
+
code?: string;
|
|
107
113
|
name?: string;
|
|
108
114
|
description?: string;
|
|
109
115
|
discountType?: DiscountType;
|
|
@@ -116,6 +122,7 @@ export interface UpdateDiscountDto {
|
|
|
116
122
|
applicableProducts?: string[];
|
|
117
123
|
applicableCategories?: string[];
|
|
118
124
|
applicableVariants?: string[];
|
|
125
|
+
customerEligibility?: Record<string, unknown>;
|
|
119
126
|
requiredCustomerTags?: string[];
|
|
120
127
|
excludedCustomerTags?: string[];
|
|
121
128
|
startsAt?: string;
|
|
@@ -127,23 +134,68 @@ export interface UpdateDiscountDto {
|
|
|
127
134
|
metadata?: Record<string, unknown>;
|
|
128
135
|
bogoConfig?: BogoConfig;
|
|
129
136
|
}
|
|
137
|
+
/** Query filters read by GET /v1/discounts. */
|
|
130
138
|
export interface DiscountFilters extends Record<string, unknown> {
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
139
|
+
/** Case-insensitive match on code or name. */
|
|
140
|
+
search?: string;
|
|
141
|
+
active?: boolean;
|
|
142
|
+
type?: DiscountType;
|
|
143
|
+
}
|
|
144
|
+
/** Response of GET /v1/discounts (`page` is 0-based). */
|
|
145
|
+
export interface DiscountListResponse {
|
|
146
|
+
data: Discount[];
|
|
147
|
+
total: number;
|
|
148
|
+
page: number;
|
|
149
|
+
limit: number;
|
|
150
|
+
}
|
|
151
|
+
/** Body for POST /v1/discounts/validate and POST /v1/discounts/calculate. */
|
|
152
|
+
export interface ValidateDiscountDto {
|
|
153
|
+
code: string;
|
|
154
|
+
customerId?: string;
|
|
155
|
+
/** Guest shopper email for the per-customer limit (matched trimmed and lowercased). */
|
|
156
|
+
customerEmail?: string;
|
|
157
|
+
orderAmount?: number;
|
|
158
|
+
orderQuantity?: number;
|
|
159
|
+
shippingAmount?: number;
|
|
160
|
+
cartItems?: {
|
|
161
|
+
items: Array<{
|
|
162
|
+
productId: string;
|
|
163
|
+
variantId?: string;
|
|
164
|
+
categoryIds?: string[];
|
|
165
|
+
quantity: number;
|
|
166
|
+
price: number;
|
|
167
|
+
}>;
|
|
168
|
+
};
|
|
134
169
|
}
|
|
135
170
|
export interface DiscountValidation {
|
|
136
171
|
isValid: boolean;
|
|
137
|
-
|
|
172
|
+
/** Why the code is invalid (when `isValid` is false). */
|
|
173
|
+
reason?: string;
|
|
174
|
+
discount?: Record<string, unknown>;
|
|
138
175
|
/** Id of the matched code (the code row, not the discount). */
|
|
139
176
|
discountCodeId?: string;
|
|
140
|
-
error?: string;
|
|
141
177
|
discountAmount?: number;
|
|
178
|
+
remainingUses?: number;
|
|
179
|
+
remainingUsesPerCustomer?: number;
|
|
142
180
|
}
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
181
|
+
export interface DiscountUsageByDate {
|
|
182
|
+
date: string;
|
|
183
|
+
count: number;
|
|
184
|
+
amountSaved: number;
|
|
185
|
+
}
|
|
186
|
+
export interface DiscountTopCustomer {
|
|
187
|
+
customerId: string;
|
|
188
|
+
usageCount: number;
|
|
189
|
+
totalSaved: number;
|
|
190
|
+
}
|
|
191
|
+
export interface DiscountUsageStats {
|
|
192
|
+
discountId: string;
|
|
193
|
+
code: string;
|
|
194
|
+
totalUsages: number;
|
|
195
|
+
totalAmountSaved: number;
|
|
196
|
+
uniqueCustomers: number;
|
|
197
|
+
usageByDate?: DiscountUsageByDate[];
|
|
198
|
+
topCustomers?: DiscountTopCustomer[];
|
|
147
199
|
}
|
|
148
200
|
/** One code of a discount (`/v1/discounts/:id/codes`). */
|
|
149
201
|
export interface DiscountCode {
|
|
@@ -217,7 +269,7 @@ export declare class DiscountCodesClient {
|
|
|
217
269
|
* `list()` `page` is 0-based (server default `page=0`). Most other SDK list
|
|
218
270
|
* helpers document 1-indexed pages. `codes.list()` is 1-based.
|
|
219
271
|
*/
|
|
220
|
-
export declare class DiscountsClient extends BaseResourceClient<Discount, CreateDiscountDto, UpdateDiscountDto, DiscountFilters> {
|
|
272
|
+
export declare class DiscountsClient extends BaseResourceClient<Discount, CreateDiscountDto, UpdateDiscountDto, DiscountFilters, DiscountListResponse> {
|
|
221
273
|
/** Sub-client for the codes of a discount */
|
|
222
274
|
readonly codes: DiscountCodesClient;
|
|
223
275
|
constructor(httpClient: HttpClient, baseUrl: string);
|
|
@@ -226,20 +278,14 @@ export declare class DiscountsClient extends BaseResourceClient<Discount, Create
|
|
|
226
278
|
*/
|
|
227
279
|
getByCode(code: string): Promise<Discount>;
|
|
228
280
|
/**
|
|
229
|
-
* Validate a discount code
|
|
281
|
+
* Validate a discount code against order context (amount, quantity, items).
|
|
230
282
|
*/
|
|
231
|
-
validate(
|
|
283
|
+
validate(data: ValidateDiscountDto): Promise<DiscountValidation>;
|
|
232
284
|
/**
|
|
233
|
-
* Calculate discount amount for
|
|
285
|
+
* Calculate the discount amount for order context. Same body and response
|
|
286
|
+
* as validate().
|
|
234
287
|
*/
|
|
235
|
-
calculate(
|
|
236
|
-
productId: string;
|
|
237
|
-
quantity: number;
|
|
238
|
-
price: number;
|
|
239
|
-
}[]): Promise<{
|
|
240
|
-
discountAmount: number;
|
|
241
|
-
newTotal: number;
|
|
242
|
-
}>;
|
|
288
|
+
calculate(data: ValidateDiscountDto): Promise<DiscountValidation>;
|
|
243
289
|
/**
|
|
244
290
|
* Activate a discount
|
|
245
291
|
*/
|
|
@@ -249,12 +295,11 @@ export declare class DiscountsClient extends BaseResourceClient<Discount, Create
|
|
|
249
295
|
*/
|
|
250
296
|
deactivate(discountId: string): Promise<Discount>;
|
|
251
297
|
/**
|
|
252
|
-
* Get discount usage statistics
|
|
298
|
+
* Get discount usage statistics, optionally bounded by ISO dates.
|
|
253
299
|
*/
|
|
254
|
-
getUsageStats(discountId: string
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
}>;
|
|
300
|
+
getUsageStats(discountId: string, range?: {
|
|
301
|
+
startDate?: string;
|
|
302
|
+
endDate?: string;
|
|
303
|
+
}): Promise<DiscountUsageStats>;
|
|
259
304
|
}
|
|
260
305
|
//# sourceMappingURL=discounts.client.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"discounts.client.d.ts","sourceRoot":"","sources":["../../../../../src/services/core/discounts.client.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,mBAAmB,IAAI,UAAU,EAAE,MAAM,2BAA2B,CAAC;AACnF,OAAO,KAAK,EAAE,WAAW,EAAE,iBAAiB,EAAE,MAAM,gCAAgC,CAAC;AACrF,OAAO,EAAE,kBAAkB,EAAE,MAAM,oBAAoB,CAAC;AAIxD;;GAEG;AACH,MAAM,MAAM,YAAY,GAAG,SAAS,GAAG,aAAa,GAAG,cAAc,GAAG,UAAU,CAAC;AAEnF;;GAEG;AACH,MAAM,WAAW,UAAU;IACzB,mDAAmD;IACnD,WAAW,EAAE,MAAM,CAAC;IACpB,oDAAoD;IACpD,WAAW,EAAE,MAAM,CAAC;IACpB,0EAA0E;IAC1E,kBAAkB,EAAE,MAAM,CAAC;CAC5B;AAED;;;GAGG;AACH,MAAM,WAAW,QAAQ;IACvB,EAAE,EAAE,MAAM,CAAC;IACX,QAAQ,EAAE,MAAM,CAAC;IACjB,OAAO,EAAE,MAAM,CAAC;IAChB,0CAA0C;IAC1C,SAAS,EAAE,MAAM,CAAC;IAClB,6EAA6E;IAC7E,WAAW,EAAE,MAAM,GAAG,IAAI,CAAC;IAC3B,IAAI,EAAE,MAAM,CAAC;IACb,WAAW,
|
|
1
|
+
{"version":3,"file":"discounts.client.d.ts","sourceRoot":"","sources":["../../../../../src/services/core/discounts.client.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,mBAAm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