ce-storefront 0.0.2 → 0.0.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +44 -25
- package/docs/sdks/auth/README.md +75 -0
- package/docs/sdks/customers/README.md +1 -80
- package/docs/sdks/{returns → customersapi}/README.md +19 -15
- package/funcs/authLoginAnonymously.d.ts +16 -0
- package/funcs/authLoginAnonymously.d.ts.map +1 -0
- package/funcs/{ordersReturnsList.js → authLoginAnonymously.js} +21 -29
- package/funcs/authLoginAnonymously.js.map +1 -0
- package/funcs/{customersGetRecommendedProducts.d.ts → customersAPIGetRecommendedProducts.d.ts} +3 -3
- package/funcs/customersAPIGetRecommendedProducts.d.ts.map +1 -0
- package/funcs/{customersGetRecommendedProducts.js → customersAPIGetRecommendedProducts.js} +20 -7
- package/funcs/customersAPIGetRecommendedProducts.js.map +1 -0
- package/lib/config.d.ts +2 -2
- package/lib/config.js +2 -2
- package/models/components/index.d.ts +1 -2
- package/models/components/index.d.ts.map +1 -1
- package/models/components/index.js +1 -2
- package/models/components/index.js.map +1 -1
- package/models/components/recommendedproduct.d.ts +149 -0
- package/models/components/recommendedproduct.d.ts.map +1 -0
- package/models/components/recommendedproduct.js +230 -0
- package/models/components/recommendedproduct.js.map +1 -0
- package/models/operations/getrecommendedproducts.d.ts +82 -0
- package/models/operations/getrecommendedproducts.d.ts.map +1 -0
- package/models/operations/getrecommendedproducts.js +93 -0
- package/models/operations/getrecommendedproducts.js.map +1 -0
- package/models/operations/index.d.ts +2 -2
- package/models/operations/index.d.ts.map +1 -1
- package/models/operations/index.js +2 -2
- package/models/operations/index.js.map +1 -1
- package/models/operations/postauthanonymous.d.ts +101 -0
- package/models/operations/postauthanonymous.d.ts.map +1 -0
- package/models/operations/postauthanonymous.js +124 -0
- package/models/operations/postauthanonymous.js.map +1 -0
- package/package.json +1 -1
- package/sdk/auth.d.ts +8 -0
- package/sdk/auth.d.ts.map +1 -1
- package/sdk/auth.js +11 -0
- package/sdk/auth.js.map +1 -1
- package/sdk/customers.d.ts +1 -9
- package/sdk/customers.d.ts.map +1 -1
- package/sdk/customers.js +0 -11
- package/sdk/customers.js.map +1 -1
- package/sdk/customersapi.d.ts +12 -0
- package/sdk/customersapi.d.ts.map +1 -0
- package/sdk/customersapi.js +22 -0
- package/sdk/customersapi.js.map +1 -0
- package/sdk/orders.d.ts +0 -3
- package/sdk/orders.d.ts.map +1 -1
- package/sdk/orders.js +0 -5
- package/sdk/orders.js.map +1 -1
- package/sdk/sdk.d.ts +5 -2
- package/sdk/sdk.d.ts.map +1 -1
- package/sdk/sdk.js +7 -2
- package/sdk/sdk.js.map +1 -1
- package/src/funcs/{ordersReturnsList.ts → authLoginAnonymously.ts} +23 -38
- package/src/funcs/{customersGetRecommendedProducts.ts → customersAPIGetRecommendedProducts.ts} +28 -7
- package/src/lib/config.ts +2 -2
- package/src/models/components/index.ts +1 -2
- package/src/models/components/recommendedproduct.ts +359 -0
- package/src/models/operations/getrecommendedproducts.ts +140 -0
- package/src/models/operations/index.ts +2 -2
- package/src/models/operations/postauthanonymous.ts +190 -0
- package/src/sdk/auth.ts +15 -0
- package/src/sdk/customers.ts +1 -16
- package/src/sdk/customersapi.ts +23 -0
- package/src/sdk/orders.ts +0 -6
- package/src/sdk/sdk.ts +9 -3
- package/funcs/customersGetRecommendedProducts.d.ts.map +0 -1
- package/funcs/customersGetRecommendedProducts.js.map +0 -1
- package/funcs/ordersReturnsList.d.ts +0 -15
- package/funcs/ordersReturnsList.d.ts.map +0 -1
- package/funcs/ordersReturnsList.js.map +0 -1
- package/models/components/orderreturn.d.ts +0 -59
- package/models/components/orderreturn.d.ts.map +0 -1
- package/models/components/orderreturn.js +0 -165
- package/models/components/orderreturn.js.map +0 -1
- package/models/components/orderreturnitem.d.ts +0 -91
- package/models/components/orderreturnitem.d.ts.map +0 -1
- package/models/components/orderreturnitem.js +0 -130
- package/models/components/orderreturnitem.js.map +0 -1
- package/models/operations/getordersordernumberreturn.d.ts +0 -59
- package/models/operations/getordersordernumberreturn.d.ts.map +0 -1
- package/models/operations/getordersordernumberreturn.js +0 -99
- package/models/operations/getordersordernumberreturn.js.map +0 -1
- package/models/operations/getrecommended.d.ts +0 -56
- package/models/operations/getrecommended.d.ts.map +0 -1
- package/models/operations/getrecommended.js +0 -74
- package/models/operations/getrecommended.js.map +0 -1
- package/sdk/returns.d.ts +0 -12
- package/sdk/returns.d.ts.map +0 -1
- package/sdk/returns.js +0 -22
- package/sdk/returns.js.map +0 -1
- package/src/models/components/orderreturn.ts +0 -198
- package/src/models/components/orderreturnitem.ts +0 -152
- package/src/models/operations/getordersordernumberreturn.ts +0 -125
- package/src/models/operations/getrecommended.ts +0 -97
- package/src/sdk/returns.ts +0 -23
package/README.md
CHANGED
|
@@ -92,26 +92,9 @@ run();
|
|
|
92
92
|
|
|
93
93
|
* [list](docs/sdks/categories/README.md#list) - List all categories
|
|
94
94
|
|
|
95
|
-
### [
|
|
95
|
+
### [customersAPI](docs/sdks/customersapi/README.md)
|
|
96
96
|
|
|
97
|
-
* [getRecommendedProducts](docs/sdks/
|
|
98
|
-
|
|
99
|
-
### [customers.addresses](docs/sdks/addresses/README.md)
|
|
100
|
-
|
|
101
|
-
* [list](docs/sdks/addresses/README.md#list) - Retrieve all addresses
|
|
102
|
-
* [add](docs/sdks/addresses/README.md#add) - Add address
|
|
103
|
-
* [get](docs/sdks/addresses/README.md#get) - Retrieve particular address
|
|
104
|
-
* [update](docs/sdks/addresses/README.md#update) - Update particular address
|
|
105
|
-
* [delete](docs/sdks/addresses/README.md#delete) - Remove particular address
|
|
106
|
-
|
|
107
|
-
### [customers.loyalty](docs/sdks/loyalty/README.md)
|
|
108
|
-
|
|
109
|
-
* [get](docs/sdks/loyalty/README.md#get) - Retrieve loyalty details
|
|
110
|
-
* [listActivities](docs/sdks/loyalty/README.md#listactivities) - List all loyalty points activity
|
|
111
|
-
|
|
112
|
-
### [customers.reviews](docs/sdks/reviews/README.md)
|
|
113
|
-
|
|
114
|
-
* [list](docs/sdks/reviews/README.md#list) - Retrieve all reviews
|
|
97
|
+
* [getRecommendedProducts](docs/sdks/customersapi/README.md#getrecommendedproducts) - List all recommended products
|
|
115
98
|
|
|
116
99
|
### [carts](docs/sdks/carts/README.md)
|
|
117
100
|
|
|
@@ -146,6 +129,24 @@ run();
|
|
|
146
129
|
* [add](docs/sdks/wishlist/README.md#add) - Add product to wishlist
|
|
147
130
|
* [delete](docs/sdks/wishlist/README.md#delete) - Delete product from wishlist
|
|
148
131
|
|
|
132
|
+
|
|
133
|
+
### [customers.addresses](docs/sdks/addresses/README.md)
|
|
134
|
+
|
|
135
|
+
* [list](docs/sdks/addresses/README.md#list) - Retrieve all addresses
|
|
136
|
+
* [add](docs/sdks/addresses/README.md#add) - Add address
|
|
137
|
+
* [get](docs/sdks/addresses/README.md#get) - Retrieve particular address
|
|
138
|
+
* [update](docs/sdks/addresses/README.md#update) - Update particular address
|
|
139
|
+
* [delete](docs/sdks/addresses/README.md#delete) - Remove particular address
|
|
140
|
+
|
|
141
|
+
### [customers.loyalty](docs/sdks/loyalty/README.md)
|
|
142
|
+
|
|
143
|
+
* [get](docs/sdks/loyalty/README.md#get) - Retrieve loyalty details
|
|
144
|
+
* [listActivities](docs/sdks/loyalty/README.md#listactivities) - List all loyalty points activity
|
|
145
|
+
|
|
146
|
+
### [customers.reviews](docs/sdks/reviews/README.md)
|
|
147
|
+
|
|
148
|
+
* [list](docs/sdks/reviews/README.md#list) - Retrieve all reviews
|
|
149
|
+
|
|
149
150
|
### [orders](docs/sdks/orders/README.md)
|
|
150
151
|
|
|
151
152
|
* [create](docs/sdks/orders/README.md#create) - Create order
|
|
@@ -166,16 +167,13 @@ run();
|
|
|
166
167
|
|
|
167
168
|
* [list](docs/sdks/cestorefrontpayments/README.md#list) - Retrieve order payments
|
|
168
169
|
|
|
169
|
-
### [orders.returns](docs/sdks/returns/README.md)
|
|
170
|
-
|
|
171
|
-
* [list](docs/sdks/returns/README.md#list) - List all order returns
|
|
172
|
-
|
|
173
170
|
### [shipping](docs/sdks/shipping/README.md)
|
|
174
171
|
|
|
175
172
|
* [checkPincodeServiceability](docs/sdks/shipping/README.md#checkpincodeserviceability) - Check pincode serviceability
|
|
176
173
|
|
|
177
174
|
### [auth](docs/sdks/auth/README.md)
|
|
178
175
|
|
|
176
|
+
* [loginAnonymously](docs/sdks/auth/README.md#loginanonymously) - Anonymous user
|
|
179
177
|
* [loginWithPhone](docs/sdks/auth/README.md#loginwithphone) - Login with phone
|
|
180
178
|
* [loginWithEmail](docs/sdks/auth/README.md#loginwithemail) - Login with email
|
|
181
179
|
* [loginWithWhatsapp](docs/sdks/auth/README.md#loginwithwhatsapp) - Login with whatsapp
|
|
@@ -248,6 +246,7 @@ To read more about standalone functions, check [FUNCTIONS.md](./FUNCTIONS.md).
|
|
|
248
246
|
|
|
249
247
|
- [analyticsTrack](docs/sdks/analytics/README.md#track)
|
|
250
248
|
- [authGenerateOtp](docs/sdks/auth/README.md#generateotp)
|
|
249
|
+
- [authLoginAnonymously](docs/sdks/auth/README.md#loginanonymously)
|
|
251
250
|
- [authLoginWithEmail](docs/sdks/auth/README.md#loginwithemail)
|
|
252
251
|
- [authLoginWithPassword](docs/sdks/auth/README.md#loginwithpassword)
|
|
253
252
|
- [authLoginWithPhone](docs/sdks/auth/README.md#loginwithphone)
|
|
@@ -294,12 +293,12 @@ To read more about standalone functions, check [FUNCTIONS.md](./FUNCTIONS.md).
|
|
|
294
293
|
- [checkoutRemoveLoyaltyPoints](docs/sdks/checkout/README.md#removeloyaltypoints)
|
|
295
294
|
- [checkoutUpdateAddress](docs/sdks/checkout/README.md#updateaddress)
|
|
296
295
|
- [checkoutUseCreditBalance](docs/sdks/checkout/README.md#usecreditbalance)
|
|
296
|
+
- [customersAPIGetRecommendedProducts](docs/sdks/customersapi/README.md#getrecommendedproducts)
|
|
297
297
|
- [customersAddressesAdd](docs/sdks/addresses/README.md#add)
|
|
298
298
|
- [customersAddressesDelete](docs/sdks/addresses/README.md#delete)
|
|
299
299
|
- [customersAddressesGet](docs/sdks/addresses/README.md#get)
|
|
300
300
|
- [customersAddressesList](docs/sdks/addresses/README.md#list)
|
|
301
301
|
- [customersAddressesUpdate](docs/sdks/addresses/README.md#update)
|
|
302
|
-
- [customersGetRecommendedProducts](docs/sdks/customers/README.md#getrecommendedproducts)
|
|
303
302
|
- [customersLoyaltyGet](docs/sdks/loyalty/README.md#get)
|
|
304
303
|
- [customersLoyaltyListActivities](docs/sdks/loyalty/README.md#listactivities)
|
|
305
304
|
- [customersReviewsList](docs/sdks/reviews/README.md#list)
|
|
@@ -312,7 +311,6 @@ To read more about standalone functions, check [FUNCTIONS.md](./FUNCTIONS.md).
|
|
|
312
311
|
- [ordersPaymentsList](docs/sdks/cestorefrontpayments/README.md#list)
|
|
313
312
|
- [ordersRefundsList](docs/sdks/refunds/README.md#list)
|
|
314
313
|
- [ordersRetryPayment](docs/sdks/orders/README.md#retrypayment)
|
|
315
|
-
- [ordersReturnsList](docs/sdks/returns/README.md#list)
|
|
316
314
|
- [ordersShipmentsList](docs/sdks/shipments/README.md#list)
|
|
317
315
|
- [paymentsGenerateHash](docs/sdks/payments/README.md#generatehash)
|
|
318
316
|
- [paymentsGetMethods](docs/sdks/payments/README.md#getmethods)
|
|
@@ -641,6 +639,27 @@ async function run() {
|
|
|
641
639
|
|
|
642
640
|
run();
|
|
643
641
|
|
|
642
|
+
```
|
|
643
|
+
|
|
644
|
+
### Per-Operation Security Schemes
|
|
645
|
+
|
|
646
|
+
Some operations in this SDK require the security scheme to be specified at the request level. For example:
|
|
647
|
+
```typescript
|
|
648
|
+
import { CeStorefront } from "ce-storefront";
|
|
649
|
+
|
|
650
|
+
const ceStorefront = new CeStorefront();
|
|
651
|
+
|
|
652
|
+
async function run() {
|
|
653
|
+
const result = await ceStorefront.auth.loginAnonymously({
|
|
654
|
+
xApiKey: "<YOUR_API_KEY_HERE>",
|
|
655
|
+
});
|
|
656
|
+
|
|
657
|
+
// Handle the result
|
|
658
|
+
console.log(result);
|
|
659
|
+
}
|
|
660
|
+
|
|
661
|
+
run();
|
|
662
|
+
|
|
644
663
|
```
|
|
645
664
|
<!-- End Authentication [security] -->
|
|
646
665
|
|
package/docs/sdks/auth/README.md
CHANGED
|
@@ -5,6 +5,7 @@
|
|
|
5
5
|
|
|
6
6
|
### Available Operations
|
|
7
7
|
|
|
8
|
+
* [loginAnonymously](#loginanonymously) - Anonymous user
|
|
8
9
|
* [loginWithPhone](#loginwithphone) - Login with phone
|
|
9
10
|
* [loginWithEmail](#loginwithemail) - Login with email
|
|
10
11
|
* [loginWithWhatsapp](#loginwithwhatsapp) - Login with whatsapp
|
|
@@ -18,6 +19,80 @@
|
|
|
18
19
|
* [generateOtp](#generateotp) - Generate OTP
|
|
19
20
|
* [verifyEmailPhone](#verifyemailphone) - Check verified email phone
|
|
20
21
|
|
|
22
|
+
## loginAnonymously
|
|
23
|
+
|
|
24
|
+
This API’s focus is on anonymous users who have not undergone the formal account creation process. These anonymous users are associated with a unique identifier called a ULID, ensuring that even in the absence of a fully realized account, there is a distinct and trackable identity for each user.
|
|
25
|
+
To interact with the system, each anonymous user is issued an access token. This access token plays a dual role in the system: it serves as a means of authenticating the user and it also acts as a tool for authorization, determining what actions the authenticated user is permitted to perform.
|
|
26
|
+
|
|
27
|
+
### Example Usage
|
|
28
|
+
|
|
29
|
+
```typescript
|
|
30
|
+
import { CeStorefront } from "ce-storefront";
|
|
31
|
+
|
|
32
|
+
const ceStorefront = new CeStorefront();
|
|
33
|
+
|
|
34
|
+
async function run() {
|
|
35
|
+
const result = await ceStorefront.auth.loginAnonymously({
|
|
36
|
+
xApiKey: "<YOUR_API_KEY_HERE>",
|
|
37
|
+
});
|
|
38
|
+
|
|
39
|
+
// Handle the result
|
|
40
|
+
console.log(result)
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
run();
|
|
44
|
+
```
|
|
45
|
+
|
|
46
|
+
### Standalone function
|
|
47
|
+
|
|
48
|
+
The standalone function version of this method:
|
|
49
|
+
|
|
50
|
+
```typescript
|
|
51
|
+
import { CeStorefrontCore } from "ce-storefront/core.js";
|
|
52
|
+
import { authLoginAnonymously } from "ce-storefront/funcs/authLoginAnonymously.js";
|
|
53
|
+
|
|
54
|
+
// Use `CeStorefrontCore` for best tree-shaking performance.
|
|
55
|
+
// You can create one instance of it to use across an application.
|
|
56
|
+
const ceStorefront = new CeStorefrontCore();
|
|
57
|
+
|
|
58
|
+
async function run() {
|
|
59
|
+
const res = await authLoginAnonymously(ceStorefront, {
|
|
60
|
+
xApiKey: "<YOUR_API_KEY_HERE>",
|
|
61
|
+
});
|
|
62
|
+
|
|
63
|
+
if (!res.ok) {
|
|
64
|
+
throw res.error;
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
const { value: result } = res;
|
|
68
|
+
|
|
69
|
+
// Handle the result
|
|
70
|
+
console.log(result)
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
run();
|
|
74
|
+
```
|
|
75
|
+
|
|
76
|
+
### Parameters
|
|
77
|
+
|
|
78
|
+
| Parameter | Type | Required | Description |
|
|
79
|
+
| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
|
|
80
|
+
| `security` | [operations.PostAuthAnonymousSecurity](../../models/operations/postauthanonymoussecurity.md) | :heavy_check_mark: | The security requirements to use for the request. |
|
|
81
|
+
| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. |
|
|
82
|
+
| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. |
|
|
83
|
+
| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. |
|
|
84
|
+
|
|
85
|
+
### Response
|
|
86
|
+
|
|
87
|
+
**Promise\<[operations.PostAuthAnonymousResponseBody](../../models/operations/postauthanonymousresponsebody.md)\>**
|
|
88
|
+
|
|
89
|
+
### Errors
|
|
90
|
+
|
|
91
|
+
| Error Object | Status Code | Content Type |
|
|
92
|
+
| --------------- | --------------- | --------------- |
|
|
93
|
+
| errors.SDKError | 4xx-5xx | */* |
|
|
94
|
+
|
|
95
|
+
|
|
21
96
|
## loginWithPhone
|
|
22
97
|
|
|
23
98
|
This API enables users to authenticate into the system using their phone number. It provides a secure way for users to log in by verifying their identity through a one-time password (OTP) sent to their registered phone.
|
|
@@ -1,81 +1,2 @@
|
|
|
1
1
|
# Customers
|
|
2
|
-
(*customers*)
|
|
3
|
-
|
|
4
|
-
## Overview
|
|
5
|
-
|
|
6
|
-
### Available Operations
|
|
7
|
-
|
|
8
|
-
* [getRecommendedProducts](#getrecommendedproducts) - Retrieve recommended products
|
|
9
|
-
|
|
10
|
-
## getRecommendedProducts
|
|
11
|
-
|
|
12
|
-
Retrieves a list of recommended products for a specified user based on their browsing history, past purchases, and indicated preferences. The recommended products are returned sorted by relevance, providing a personalized shopping experience for each user.
|
|
13
|
-
|
|
14
|
-
### Example Usage
|
|
15
|
-
|
|
16
|
-
```typescript
|
|
17
|
-
import { CeStorefront } from "ce-storefront";
|
|
18
|
-
|
|
19
|
-
const ceStorefront = new CeStorefront({
|
|
20
|
-
authorization: "<YOUR_BEARER_TOKEN_HERE>",
|
|
21
|
-
});
|
|
22
|
-
|
|
23
|
-
async function run() {
|
|
24
|
-
const result = await ceStorefront.customers.getRecommendedProducts();
|
|
25
|
-
|
|
26
|
-
// Handle the result
|
|
27
|
-
console.log(result)
|
|
28
|
-
}
|
|
29
|
-
|
|
30
|
-
run();
|
|
31
|
-
```
|
|
32
|
-
|
|
33
|
-
### Standalone function
|
|
34
|
-
|
|
35
|
-
The standalone function version of this method:
|
|
36
|
-
|
|
37
|
-
```typescript
|
|
38
|
-
import { CeStorefrontCore } from "ce-storefront/core.js";
|
|
39
|
-
import { customersGetRecommendedProducts } from "ce-storefront/funcs/customersGetRecommendedProducts.js";
|
|
40
|
-
|
|
41
|
-
// Use `CeStorefrontCore` for best tree-shaking performance.
|
|
42
|
-
// You can create one instance of it to use across an application.
|
|
43
|
-
const ceStorefront = new CeStorefrontCore({
|
|
44
|
-
authorization: "<YOUR_BEARER_TOKEN_HERE>",
|
|
45
|
-
});
|
|
46
|
-
|
|
47
|
-
async function run() {
|
|
48
|
-
const res = await customersGetRecommendedProducts(ceStorefront);
|
|
49
|
-
|
|
50
|
-
if (!res.ok) {
|
|
51
|
-
throw res.error;
|
|
52
|
-
}
|
|
53
|
-
|
|
54
|
-
const { value: result } = res;
|
|
55
|
-
|
|
56
|
-
// Handle the result
|
|
57
|
-
console.log(result)
|
|
58
|
-
}
|
|
59
|
-
|
|
60
|
-
run();
|
|
61
|
-
```
|
|
62
|
-
|
|
63
|
-
### Parameters
|
|
64
|
-
|
|
65
|
-
| Parameter | Type | Required | Description |
|
|
66
|
-
| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
|
|
67
|
-
| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. |
|
|
68
|
-
| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. |
|
|
69
|
-
| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. |
|
|
70
|
-
|
|
71
|
-
### Response
|
|
72
|
-
|
|
73
|
-
**Promise\<[operations.GetRecommendedResponseBody](../../models/operations/getrecommendedresponsebody.md)\>**
|
|
74
|
-
|
|
75
|
-
### Errors
|
|
76
|
-
|
|
77
|
-
| Error Object | Status Code | Content Type |
|
|
78
|
-
| ------------------- | ------------------- | ------------------- |
|
|
79
|
-
| errors.Unauthorized | 401 | application/json |
|
|
80
|
-
| errors.NotFound | 404 | application/json |
|
|
81
|
-
| errors.SDKError | 4xx-5xx | */* |
|
|
2
|
+
(*customers*)
|
|
@@ -1,15 +1,17 @@
|
|
|
1
|
-
#
|
|
2
|
-
(*
|
|
1
|
+
# CustomersAPI
|
|
2
|
+
(*customersAPI*)
|
|
3
3
|
|
|
4
4
|
## Overview
|
|
5
5
|
|
|
6
|
+
Customers API
|
|
7
|
+
|
|
6
8
|
### Available Operations
|
|
7
9
|
|
|
8
|
-
* [
|
|
10
|
+
* [getRecommendedProducts](#getrecommendedproducts) - List all recommended products
|
|
9
11
|
|
|
10
|
-
##
|
|
12
|
+
## getRecommendedProducts
|
|
11
13
|
|
|
12
|
-
|
|
14
|
+
Retrieves a list of recommended products for a specified user based on their browsing history, past purchases, and indicated preferences. The recommended products are returned sorted by relevance, providing a personalized shopping experience for each user.
|
|
13
15
|
|
|
14
16
|
### Example Usage
|
|
15
17
|
|
|
@@ -21,8 +23,8 @@ const ceStorefront = new CeStorefront({
|
|
|
21
23
|
});
|
|
22
24
|
|
|
23
25
|
async function run() {
|
|
24
|
-
const result = await ceStorefront.
|
|
25
|
-
|
|
26
|
+
const result = await ceStorefront.customersAPI.getRecommendedProducts({
|
|
27
|
+
id: "<id>",
|
|
26
28
|
});
|
|
27
29
|
|
|
28
30
|
// Handle the result
|
|
@@ -38,7 +40,7 @@ The standalone function version of this method:
|
|
|
38
40
|
|
|
39
41
|
```typescript
|
|
40
42
|
import { CeStorefrontCore } from "ce-storefront/core.js";
|
|
41
|
-
import {
|
|
43
|
+
import { customersAPIGetRecommendedProducts } from "ce-storefront/funcs/customersAPIGetRecommendedProducts.js";
|
|
42
44
|
|
|
43
45
|
// Use `CeStorefrontCore` for best tree-shaking performance.
|
|
44
46
|
// You can create one instance of it to use across an application.
|
|
@@ -47,8 +49,8 @@ const ceStorefront = new CeStorefrontCore({
|
|
|
47
49
|
});
|
|
48
50
|
|
|
49
51
|
async function run() {
|
|
50
|
-
const res = await
|
|
51
|
-
|
|
52
|
+
const res = await customersAPIGetRecommendedProducts(ceStorefront, {
|
|
53
|
+
id: "<id>",
|
|
52
54
|
});
|
|
53
55
|
|
|
54
56
|
if (!res.ok) {
|
|
@@ -68,17 +70,19 @@ run();
|
|
|
68
70
|
|
|
69
71
|
| Parameter | Type | Required | Description |
|
|
70
72
|
| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
|
|
71
|
-
| `request` | [operations.
|
|
73
|
+
| `request` | [operations.GetRecommendedProductsRequest](../../models/operations/getrecommendedproductsrequest.md) | :heavy_check_mark: | The request object to use for the request. |
|
|
72
74
|
| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. |
|
|
73
75
|
| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. |
|
|
74
76
|
| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. |
|
|
75
77
|
|
|
76
78
|
### Response
|
|
77
79
|
|
|
78
|
-
**Promise\<[operations.
|
|
80
|
+
**Promise\<[operations.GetRecommendedProductsResponseBody](../../models/operations/getrecommendedproductsresponsebody.md)\>**
|
|
79
81
|
|
|
80
82
|
### Errors
|
|
81
83
|
|
|
82
|
-
| Error Object
|
|
83
|
-
|
|
|
84
|
-
| errors.
|
|
84
|
+
| Error Object | Status Code | Content Type |
|
|
85
|
+
| ------------------- | ------------------- | ------------------- |
|
|
86
|
+
| errors.Unauthorized | 401 | application/json |
|
|
87
|
+
| errors.NotFound | 404 | application/json |
|
|
88
|
+
| errors.SDKError | 4xx-5xx | */* |
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { CeStorefrontCore } from "../core.js";
|
|
2
|
+
import { RequestOptions } from "../lib/sdks.js";
|
|
3
|
+
import { ConnectionError, InvalidRequestError, RequestAbortedError, RequestTimeoutError, UnexpectedClientError } from "../models/errors/httpclienterrors.js";
|
|
4
|
+
import { SDKError } from "../models/errors/sdkerror.js";
|
|
5
|
+
import { SDKValidationError } from "../models/errors/sdkvalidationerror.js";
|
|
6
|
+
import * as operations from "../models/operations/index.js";
|
|
7
|
+
import { Result } from "../types/fp.js";
|
|
8
|
+
/**
|
|
9
|
+
* Anonymous user
|
|
10
|
+
*
|
|
11
|
+
* @remarks
|
|
12
|
+
* This API’s focus is on anonymous users who have not undergone the formal account creation process. These anonymous users are associated with a unique identifier called a ULID, ensuring that even in the absence of a fully realized account, there is a distinct and trackable identity for each user.
|
|
13
|
+
* To interact with the system, each anonymous user is issued an access token. This access token plays a dual role in the system: it serves as a means of authenticating the user and it also acts as a tool for authorization, determining what actions the authenticated user is permitted to perform.
|
|
14
|
+
*/
|
|
15
|
+
export declare function authLoginAnonymously(client$: CeStorefrontCore, security: operations.PostAuthAnonymousSecurity, options?: RequestOptions): Promise<Result<operations.PostAuthAnonymousResponseBody, SDKError | SDKValidationError | UnexpectedClientError | InvalidRequestError | RequestAbortedError | RequestTimeoutError | ConnectionError>>;
|
|
16
|
+
//# sourceMappingURL=authLoginAnonymously.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"authLoginAnonymously.d.ts","sourceRoot":"","sources":["../src/funcs/authLoginAnonymously.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,gBAAgB,EAAE,MAAM,YAAY,CAAC;AAE9C,OAAO,EAAE,cAAc,EAAE,MAAM,gBAAgB,CAAC;AAGhD,OAAO,EACH,eAAe,EACf,mBAAmB,EACnB,mBAAmB,EACnB,mBAAmB,EACnB,qBAAqB,EACxB,MAAM,sCAAsC,CAAC;AAC9C,OAAO,EAAE,QAAQ,EAAE,MAAM,8BAA8B,CAAC;AACxD,OAAO,EAAE,kBAAkB,EAAE,MAAM,wCAAwC,CAAC;AAC5E,OAAO,KAAK,UAAU,MAAM,+BAA+B,CAAC;AAC5D,OAAO,EAAE,MAAM,EAAE,MAAM,gBAAgB,CAAC;AAExC;;;;;;GAMG;AACH,wBAAsB,oBAAoB,CACtC,OAAO,EAAE,gBAAgB,EACzB,QAAQ,EAAE,UAAU,CAAC,yBAAyB,EAC9C,OAAO,CAAC,EAAE,cAAc,GACzB,OAAO,CACN,MAAM,CACF,UAAU,CAAC,6BAA6B,EACtC,QAAQ,GACR,kBAAkB,GAClB,qBAAqB,GACrB,mBAAmB,GACnB,mBAAmB,GACnB,mBAAmB,GACnB,eAAe,CACpB,CACJ,CAoEA"}
|
|
@@ -26,51 +26,43 @@ var __importStar = (this && this.__importStar) || function (mod) {
|
|
|
26
26
|
return result;
|
|
27
27
|
};
|
|
28
28
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
29
|
-
exports.
|
|
30
|
-
const encodings_js_1 = require("../lib/encodings.js");
|
|
29
|
+
exports.authLoginAnonymously = authLoginAnonymously;
|
|
31
30
|
const m$ = __importStar(require("../lib/matchers.js"));
|
|
32
|
-
const schemas$ = __importStar(require("../lib/schemas.js"));
|
|
33
31
|
const security_js_1 = require("../lib/security.js");
|
|
34
32
|
const url_js_1 = require("../lib/url.js");
|
|
35
33
|
const operations = __importStar(require("../models/operations/index.js"));
|
|
36
34
|
/**
|
|
37
|
-
*
|
|
35
|
+
* Anonymous user
|
|
38
36
|
*
|
|
39
37
|
* @remarks
|
|
40
|
-
*
|
|
38
|
+
* This API’s focus is on anonymous users who have not undergone the formal account creation process. These anonymous users are associated with a unique identifier called a ULID, ensuring that even in the absence of a fully realized account, there is a distinct and trackable identity for each user.
|
|
39
|
+
* To interact with the system, each anonymous user is issued an access token. This access token plays a dual role in the system: it serves as a means of authenticating the user and it also acts as a tool for authorization, determining what actions the authenticated user is permitted to perform.
|
|
41
40
|
*/
|
|
42
|
-
async function
|
|
43
|
-
const
|
|
44
|
-
const parsed$ = schemas$.safeParse(input$, (value$) => operations.GetOrdersOrderNumberReturnRequest$outboundSchema.parse(value$), "Input validation failed");
|
|
45
|
-
if (!parsed$.ok) {
|
|
46
|
-
return parsed$;
|
|
47
|
-
}
|
|
48
|
-
const payload$ = parsed$.value;
|
|
49
|
-
const body$ = null;
|
|
50
|
-
const pathParams$ = {
|
|
51
|
-
order_number: (0, encodings_js_1.encodeSimple)("order_number", payload$.order_number, {
|
|
52
|
-
explode: false,
|
|
53
|
-
charEncoding: "percent",
|
|
54
|
-
}),
|
|
55
|
-
};
|
|
56
|
-
const path$ = (0, url_js_1.pathToFunc)("/orders/{order_number}/return")(pathParams$);
|
|
41
|
+
async function authLoginAnonymously(client$, security, options) {
|
|
42
|
+
const path$ = (0, url_js_1.pathToFunc)("/auth/anonymous")();
|
|
57
43
|
const headers$ = new Headers({
|
|
58
44
|
Accept: "application/json",
|
|
59
45
|
});
|
|
60
|
-
const
|
|
61
|
-
|
|
46
|
+
const security$ = [
|
|
47
|
+
[
|
|
48
|
+
{
|
|
49
|
+
fieldName: "X-Api-Key",
|
|
50
|
+
type: "apiKey:header",
|
|
51
|
+
value: security === null || security === void 0 ? void 0 : security.xApiKey,
|
|
52
|
+
},
|
|
53
|
+
],
|
|
54
|
+
];
|
|
55
|
+
const securitySettings$ = (0, security_js_1.resolveSecurity)(...security$);
|
|
62
56
|
const context = {
|
|
63
|
-
operationID: "
|
|
57
|
+
operationID: "post-auth-anonymous",
|
|
64
58
|
oAuth2Scopes: [],
|
|
65
|
-
securitySource:
|
|
59
|
+
securitySource: security$,
|
|
66
60
|
};
|
|
67
|
-
const securitySettings$ = (0, security_js_1.resolveGlobalSecurity)(security$);
|
|
68
61
|
const requestRes = client$.createRequest$(context, {
|
|
69
62
|
security: securitySettings$,
|
|
70
|
-
method: "
|
|
63
|
+
method: "POST",
|
|
71
64
|
path: path$,
|
|
72
65
|
headers: headers$,
|
|
73
|
-
body: body$,
|
|
74
66
|
timeoutMs: (options === null || options === void 0 ? void 0 : options.timeoutMs) || client$.options$.timeoutMs || -1,
|
|
75
67
|
}, options);
|
|
76
68
|
if (!requestRes.ok) {
|
|
@@ -87,10 +79,10 @@ async function ordersReturnsList(client$, request, options) {
|
|
|
87
79
|
return doResult;
|
|
88
80
|
}
|
|
89
81
|
const response = doResult.value;
|
|
90
|
-
const [result$] = await m$.match(m$.json(200, operations.
|
|
82
|
+
const [result$] = await m$.match(m$.json(200, operations.PostAuthAnonymousResponseBody$inboundSchema), m$.fail(["4XX", "5XX"]))(response);
|
|
91
83
|
if (!result$.ok) {
|
|
92
84
|
return result$;
|
|
93
85
|
}
|
|
94
86
|
return result$;
|
|
95
87
|
}
|
|
96
|
-
//# sourceMappingURL=
|
|
88
|
+
//# sourceMappingURL=authLoginAnonymously.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"authLoginAnonymously.js","sourceRoot":"","sources":["../src/funcs/authLoginAnonymously.ts"],"names":[],"mappings":";AAAA;;GAEG;;;;;;;;;;;;;;;;;;;;;;;;;AA0BH,oDAmFC;AA1GD,uDAAyC;AAEzC,oDAAoE;AACpE,0CAA2C;AAU3C,0EAA4D;AAG5D;;;;;;GAMG;AACI,KAAK,UAAU,oBAAoB,CACtC,OAAyB,EACzB,QAA8C,EAC9C,OAAwB;IAaxB,MAAM,KAAK,GAAG,IAAA,mBAAU,EAAC,iBAAiB,CAAC,EAAE,CAAC;IAE9C,MAAM,QAAQ,GAAG,IAAI,OAAO,CAAC;QACzB,MAAM,EAAE,kBAAkB;KAC7B,CAAC,CAAC;IAEH,MAAM,SAAS,GAAsB;QACjC;YACI;gB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C;IACD,MAAM,QAAQ,GAAG,QAAQ,CAAC,KAAK,CAAC;IAEhC,MAAM,CAAC,OAAO,CAAC,GAAG,MAAM,EAAE,CAAC,KAAK,CAU5B,EAAE,CAAC,IAAI,CAAC,GAAG,EAAE,UAAU,CAAC,2CAA2C,CAAC,EACpE,EAAE,CAAC,IAAI,CAAC,CAAC,KAAK,EAAE,KAAK,CAAC,CAAC,CAC1B,CAAC,QAAQ,CAAC,CAAC;IACZ,IAAI,CAAC,OAAO,CAAC,EAAE,EAAE,CAAC;QACd,OAAO,OAAO,CAAC;IACnB,CAAC;IAED,OAAO,OAAO,CAAC;AACnB,CAAC"}
|
package/funcs/{customersGetRecommendedProducts.d.ts → customersAPIGetRecommendedProducts.d.ts}
RENAMED
|
@@ -7,10 +7,10 @@ import { SDKValidationError } from "../models/errors/sdkvalidationerror.js";
|
|
|
7
7
|
import * as operations from "../models/operations/index.js";
|
|
8
8
|
import { Result } from "../types/fp.js";
|
|
9
9
|
/**
|
|
10
|
-
*
|
|
10
|
+
* List all recommended products
|
|
11
11
|
*
|
|
12
12
|
* @remarks
|
|
13
13
|
* Retrieves a list of recommended products for a specified user based on their browsing history, past purchases, and indicated preferences. The recommended products are returned sorted by relevance, providing a personalized shopping experience for each user.
|
|
14
14
|
*/
|
|
15
|
-
export declare function
|
|
16
|
-
//# sourceMappingURL=
|
|
15
|
+
export declare function customersAPIGetRecommendedProducts(client$: CeStorefrontCore, request: operations.GetRecommendedProductsRequest, options?: RequestOptions): Promise<Result<operations.GetRecommendedProductsResponseBody, errors.Unauthorized | errors.NotFound | SDKError | SDKValidationError | UnexpectedClientError | InvalidRequestError | RequestAbortedError | RequestTimeoutError | ConnectionError>>;
|
|
16
|
+
//# sourceMappingURL=customersAPIGetRecommendedProducts.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"customersAPIGetRecommendedProducts.d.ts","sourceRoot":"","sources":["../src/funcs/customersAPIGetRecommendedProducts.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,gBAAgB,EAAE,MAAM,YAAY,CAAC;AAI9C,OAAO,EAAE,cAAc,EAAE,MAAM,gBAAgB,CAAC;AAGhD,OAAO,EACH,eAAe,EACf,mBAAmB,EACnB,mBAAmB,EACnB,mBAAmB,EACnB,qBAAqB,EACxB,MAAM,sCAAsC,CAAC;AAC9C,OAAO,KAAK,MAAM,MAAM,2BAA2B,CAAC;AACpD,OAAO,EAAE,QAAQ,EAAE,MAAM,8BAA8B,CAAC;AACxD,OAAO,EAAE,kBAAkB,EAAE,MAAM,wCAAwC,CAAC;AAC5E,OAAO,KAAK,UAAU,MAAM,+BAA+B,CAAC;AAC5D,OAAO,EAAE,MAAM,EAAE,MAAM,gBAAgB,CAAC;AAExC;;;;;GAKG;AACH,wBAAsB,kCAAkC,CACpD,OAAO,EAAE,gBAAgB,EACzB,OAAO,EAAE,UAAU,CAAC,6BAA6B,EACjD,OAAO,CAAC,EAAE,cAAc,GACzB,OAAO,CACN,MAAM,CACF,UAAU,CAAC,kCAAkC,EAC3C,MAAM,CAAC,YAAY,GACnB,MAAM,CAAC,QAAQ,GACf,QAAQ,GACR,kBAAkB,GAClB,qBAAqB,GACrB,mBAAmB,GACnB,mBAAmB,GACnB,mBAAmB,GACnB,eAAe,CACpB,CACJ,CAuFA"}
|
|
@@ -26,27 +26,39 @@ var __importStar = (this && this.__importStar) || function (mod) {
|
|
|
26
26
|
return result;
|
|
27
27
|
};
|
|
28
28
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
29
|
-
exports.
|
|
29
|
+
exports.customersAPIGetRecommendedProducts = customersAPIGetRecommendedProducts;
|
|
30
|
+
const encodings_js_1 = require("../lib/encodings.js");
|
|
30
31
|
const m$ = __importStar(require("../lib/matchers.js"));
|
|
32
|
+
const schemas$ = __importStar(require("../lib/schemas.js"));
|
|
31
33
|
const security_js_1 = require("../lib/security.js");
|
|
32
34
|
const url_js_1 = require("../lib/url.js");
|
|
33
35
|
const errors = __importStar(require("../models/errors/index.js"));
|
|
34
36
|
const operations = __importStar(require("../models/operations/index.js"));
|
|
35
37
|
/**
|
|
36
|
-
*
|
|
38
|
+
* List all recommended products
|
|
37
39
|
*
|
|
38
40
|
* @remarks
|
|
39
41
|
* Retrieves a list of recommended products for a specified user based on their browsing history, past purchases, and indicated preferences. The recommended products are returned sorted by relevance, providing a personalized shopping experience for each user.
|
|
40
42
|
*/
|
|
41
|
-
async function
|
|
42
|
-
const
|
|
43
|
+
async function customersAPIGetRecommendedProducts(client$, request, options) {
|
|
44
|
+
const input$ = request;
|
|
45
|
+
const parsed$ = schemas$.safeParse(input$, (value$) => operations.GetRecommendedProductsRequest$outboundSchema.parse(value$), "Input validation failed");
|
|
46
|
+
if (!parsed$.ok) {
|
|
47
|
+
return parsed$;
|
|
48
|
+
}
|
|
49
|
+
const payload$ = parsed$.value;
|
|
50
|
+
const body$ = null;
|
|
51
|
+
const pathParams$ = {
|
|
52
|
+
id: (0, encodings_js_1.encodeSimple)("id", payload$.id, { explode: false, charEncoding: "percent" }),
|
|
53
|
+
};
|
|
54
|
+
const path$ = (0, url_js_1.pathToFunc)("/customer/{id}/recommended-products")(pathParams$);
|
|
43
55
|
const headers$ = new Headers({
|
|
44
56
|
Accept: "application/json",
|
|
45
57
|
});
|
|
46
58
|
const authorization$ = await (0, security_js_1.extractSecurity)(client$.options$.authorization);
|
|
47
59
|
const security$ = authorization$ == null ? {} : { authorization: authorization$ };
|
|
48
60
|
const context = {
|
|
49
|
-
operationID: "get-recommended",
|
|
61
|
+
operationID: "get-recommended-products",
|
|
50
62
|
oAuth2Scopes: [],
|
|
51
63
|
securitySource: client$.options$.authorization,
|
|
52
64
|
};
|
|
@@ -56,6 +68,7 @@ async function customersGetRecommendedProducts(client$, options) {
|
|
|
56
68
|
method: "GET",
|
|
57
69
|
path: path$,
|
|
58
70
|
headers: headers$,
|
|
71
|
+
body: body$,
|
|
59
72
|
timeoutMs: (options === null || options === void 0 ? void 0 : options.timeoutMs) || client$.options$.timeoutMs || -1,
|
|
60
73
|
}, options);
|
|
61
74
|
if (!requestRes.ok) {
|
|
@@ -75,10 +88,10 @@ async function customersGetRecommendedProducts(client$, options) {
|
|
|
75
88
|
const responseFields$ = {
|
|
76
89
|
HttpMeta: { Response: response, Request: request$ },
|
|
77
90
|
};
|
|
78
|
-
const [result$] = await m$.match(m$.json(200, operations.
|
|
91
|
+
const [result$] = await m$.match(m$.json(200, operations.GetRecommendedProductsResponseBody$inboundSchema), m$.jsonErr(401, errors.Unauthorized$inboundSchema), m$.jsonErr(404, errors.NotFound$inboundSchema), m$.fail(["4XX", "5XX"]))(response, { extraFields: responseFields$ });
|
|
79
92
|
if (!result$.ok) {
|
|
80
93
|
return result$;
|
|
81
94
|
}
|
|
82
95
|
return result$;
|
|
83
96
|
}
|
|
84
|
-
//# sourceMappingURL=
|
|
97
|
+
//# sourceMappingURL=customersAPIGetRecommendedProducts.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"customersAPIGetRecommendedProducts.js","sourceRoot":"","sources":["../src/funcs/customersAPIGetRecommendedProducts.ts"],"names":[],"mappings":";AAAA;;GAEG;;;;;;;;;;;;;;;;;;;;;;;;;AA4BH,gFAwGC;AAjID,sDAAoE;AACpE,uDAAyC;AACzC,4DAA8C;AAE9C,oDAA4E;AAC5E,0CAA2C;AAQ3C,kEAAoD;AAGpD,0EAA4D;AAG5D;;;;;GAKG;AACI,KAAK,UAAU,kCAAkC,CACpD,OAAyB,EACzB,OAAiD,EACjD,OAAwB;IAexB,MAAM,MAAM,GAAG,OAAO,CAAC;IAEvB,MAAM,OAAO,GAAG,QAAQ,CAAC,SAAS,CAC9B,MAAM,EACN,CAAC,MAAM,EAAE,EAAE,CAAC,UAAU,CAAC,4CAA4C,CAAC,KAAK,CAAC,MAAM,CAAC,EACjF,yBAAyB,CAC5B,CAAC;IACF,IAAI,CAAC,OAAO,CAAC,EAAE,EAAE,CAAC;QACd,OAAO,OAAO,CAAC;IACnB,CAA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OAAO,OAAO,CAAC;AACnB,CAAC"}
|
package/lib/config.d.ts
CHANGED
|
@@ -31,8 +31,8 @@ export declare function serverURLFromOptions(options: SDKOptions): URL | null;
|
|
|
31
31
|
export declare const SDK_METADATA: {
|
|
32
32
|
readonly language: "typescript";
|
|
33
33
|
readonly openapiDocVersion: "1.0";
|
|
34
|
-
readonly sdkVersion: "0.0.
|
|
34
|
+
readonly sdkVersion: "0.0.4";
|
|
35
35
|
readonly genVersion: "2.404.3";
|
|
36
|
-
readonly userAgent: "speakeasy-sdk/typescript 0.0.
|
|
36
|
+
readonly userAgent: "speakeasy-sdk/typescript 0.0.4 2.404.3 1.0 ce-storefront";
|
|
37
37
|
};
|
|
38
38
|
//# sourceMappingURL=config.d.ts.map
|
package/lib/config.js
CHANGED
|
@@ -45,8 +45,8 @@ function serverURLFromOptions(options) {
|
|
|
45
45
|
exports.SDK_METADATA = {
|
|
46
46
|
language: "typescript",
|
|
47
47
|
openapiDocVersion: "1.0",
|
|
48
|
-
sdkVersion: "0.0.
|
|
48
|
+
sdkVersion: "0.0.4",
|
|
49
49
|
genVersion: "2.404.3",
|
|
50
|
-
userAgent: "speakeasy-sdk/typescript 0.0.
|
|
50
|
+
userAgent: "speakeasy-sdk/typescript 0.0.4 2.404.3 1.0 ce-storefront",
|
|
51
51
|
};
|
|
52
52
|
//# sourceMappingURL=config.js.map
|
|
@@ -24,8 +24,6 @@ export * from "./orderitem.js";
|
|
|
24
24
|
export * from "./orderlist.js";
|
|
25
25
|
export * from "./orderpayment.js";
|
|
26
26
|
export * from "./orderrefund.js";
|
|
27
|
-
export * from "./orderreturn.js";
|
|
28
|
-
export * from "./orderreturnitem.js";
|
|
29
27
|
export * from "./ordershipment.js";
|
|
30
28
|
export * from "./pagination.js";
|
|
31
29
|
export * from "./pincode.js";
|
|
@@ -43,6 +41,7 @@ export * from "./productshipping.js";
|
|
|
43
41
|
export * from "./productsubscription.js";
|
|
44
42
|
export * from "./productvideo.js";
|
|
45
43
|
export * from "./promotion.js";
|
|
44
|
+
export * from "./recommendedproduct.js";
|
|
46
45
|
export * from "./saleschannel.js";
|
|
47
46
|
export * from "./security.js";
|
|
48
47
|
export * from "./seo.js";
|