ce-storefront 0.0.2 → 0.0.5
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 +50 -25
- package/docs/sdks/auth/README.md +75 -0
- package/docs/sdks/customers/README.md +1 -80
- package/docs/sdks/customersapi/README.md +322 -0
- package/funcs/authLoginAnonymously.d.ts +16 -0
- package/funcs/authLoginAnonymously.d.ts.map +1 -0
- package/funcs/authLoginAnonymously.js +88 -0
- package/funcs/authLoginAnonymously.js.map +1 -0
- package/funcs/{ordersReturnsList.d.ts → customersAPIGetCustomersId.d.ts} +4 -4
- package/funcs/customersAPIGetCustomersId.d.ts.map +1 -0
- package/funcs/{ordersReturnsList.js → customersAPIGetCustomersId.js} +10 -13
- package/funcs/customersAPIGetCustomersId.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/funcs/customersAPIPostCustomers.d.ts +17 -0
- package/funcs/customersAPIPostCustomers.d.ts.map +1 -0
- package/funcs/customersAPIPostCustomers.js +96 -0
- package/funcs/customersAPIPostCustomers.js.map +1 -0
- package/funcs/customersAPIPutCustomersId.d.ts +16 -0
- package/funcs/customersAPIPutCustomersId.d.ts.map +1 -0
- package/funcs/customersAPIPutCustomersId.js +98 -0
- package/funcs/customersAPIPutCustomersId.js.map +1 -0
- package/lib/config.d.ts +2 -2
- package/lib/config.js +2 -2
- package/models/components/business.d.ts +31 -0
- package/models/components/business.d.ts.map +1 -0
- package/models/components/business.js +71 -0
- package/models/components/business.js.map +1 -0
- package/models/components/cart.d.ts +1 -1
- package/models/components/cart.d.ts.map +1 -1
- package/models/components/cart.js +5 -5
- package/models/components/cart.js.map +1 -1
- package/models/components/createcustomer.d.ts +29 -0
- package/models/components/createcustomer.d.ts.map +1 -0
- package/models/components/createcustomer.js +54 -0
- package/models/components/createcustomer.js.map +1 -0
- package/models/components/{customeraddress.d.ts → customeraddressinput.d.ts} +29 -29
- package/models/components/customeraddressinput.d.ts.map +1 -0
- package/models/components/{customeraddress.js → customeraddressinput.js} +30 -30
- package/models/components/customeraddressinput.js.map +1 -0
- package/models/components/customerdetail.d.ts +51 -0
- package/models/components/customerdetail.d.ts.map +1 -0
- package/models/components/customerdetail.js +88 -0
- package/models/components/customerdetail.js.map +1 -0
- package/models/components/index.d.ts +6 -3
- package/models/components/index.d.ts.map +1 -1
- package/models/components/index.js +6 -3
- package/models/components/index.js.map +1 -1
- package/models/components/orderdetail.d.ts +1 -1
- package/models/components/orderdetail.d.ts.map +1 -1
- package/models/components/orderdetail.js +5 -5
- package/models/components/orderdetail.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/components/updatecustomer.d.ts +26 -0
- package/models/components/updatecustomer.d.ts.map +1 -0
- package/models/components/updatecustomer.js +51 -0
- package/models/components/updatecustomer.js.map +1 -0
- package/models/operations/getcustomersid.d.ts +82 -0
- package/models/operations/getcustomersid.d.ts.map +1 -0
- package/models/operations/getcustomersid.js +106 -0
- package/models/operations/getcustomersid.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 +5 -2
- package/models/operations/index.d.ts.map +1 -1
- package/models/operations/index.js +5 -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/models/operations/postcustomers.d.ts +56 -0
- package/models/operations/postcustomers.d.ts.map +1 -0
- package/models/operations/postcustomers.js +87 -0
- package/models/operations/postcustomers.js.map +1 -0
- package/models/operations/putcustomersid.d.ts +84 -0
- package/models/operations/putcustomersid.d.ts.map +1 -0
- package/models/operations/putcustomersid.js +120 -0
- package/models/operations/putcustomersid.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 +34 -0
- package/sdk/customersapi.d.ts.map +1 -0
- package/sdk/customersapi.js +52 -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/authLoginAnonymously.ts +112 -0
- package/src/funcs/{ordersReturnsList.ts → customersAPIGetCustomersId.ts} +11 -14
- package/src/funcs/{customersGetRecommendedProducts.ts → customersAPIGetRecommendedProducts.ts} +28 -7
- package/src/funcs/customersAPIPostCustomers.ts +133 -0
- package/src/funcs/customersAPIPutCustomersId.ts +136 -0
- package/src/lib/config.ts +2 -2
- package/src/models/components/business.ts +64 -0
- package/src/models/components/cart.ts +1 -1
- package/src/models/components/createcustomer.ts +58 -0
- package/src/models/components/customerdetail.ts +109 -0
- package/src/models/components/index.ts +6 -3
- package/src/models/components/orderdetail.ts +1 -1
- package/src/models/components/recommendedproduct.ts +359 -0
- package/src/models/components/updatecustomer.ts +48 -0
- package/src/models/operations/getcustomersid.ts +153 -0
- package/src/models/operations/getrecommendedproducts.ts +140 -0
- package/src/models/operations/index.ts +5 -2
- package/src/models/operations/postauthanonymous.ts +190 -0
- package/src/models/operations/postcustomers.ts +110 -0
- package/src/models/operations/putcustomersid.ts +169 -0
- package/src/sdk/auth.ts +15 -0
- package/src/sdk/customers.ts +1 -16
- package/src/sdk/customersapi.ts +66 -0
- package/src/sdk/orders.ts +0 -6
- package/src/sdk/sdk.ts +9 -3
- package/docs/sdks/returns/README.md +0 -84
- package/funcs/customersGetRecommendedProducts.d.ts.map +0 -1
- package/funcs/customersGetRecommendedProducts.js.map +0 -1
- package/funcs/ordersReturnsList.d.ts.map +0 -1
- package/funcs/ordersReturnsList.js.map +0 -1
- package/models/components/customeraddress.d.ts.map +0 -1
- package/models/components/customeraddress.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/src/models/components/{customeraddress.ts → customeraddressinput.ts} +46 -46
|
@@ -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"}
|
|
@@ -0,0 +1,88 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/*
|
|
3
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
4
|
+
*/
|
|
5
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
6
|
+
if (k2 === undefined) k2 = k;
|
|
7
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
8
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
9
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
10
|
+
}
|
|
11
|
+
Object.defineProperty(o, k2, desc);
|
|
12
|
+
}) : (function(o, m, k, k2) {
|
|
13
|
+
if (k2 === undefined) k2 = k;
|
|
14
|
+
o[k2] = m[k];
|
|
15
|
+
}));
|
|
16
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
17
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
18
|
+
}) : function(o, v) {
|
|
19
|
+
o["default"] = v;
|
|
20
|
+
});
|
|
21
|
+
var __importStar = (this && this.__importStar) || function (mod) {
|
|
22
|
+
if (mod && mod.__esModule) return mod;
|
|
23
|
+
var result = {};
|
|
24
|
+
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
|
25
|
+
__setModuleDefault(result, mod);
|
|
26
|
+
return result;
|
|
27
|
+
};
|
|
28
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
29
|
+
exports.authLoginAnonymously = authLoginAnonymously;
|
|
30
|
+
const m$ = __importStar(require("../lib/matchers.js"));
|
|
31
|
+
const security_js_1 = require("../lib/security.js");
|
|
32
|
+
const url_js_1 = require("../lib/url.js");
|
|
33
|
+
const operations = __importStar(require("../models/operations/index.js"));
|
|
34
|
+
/**
|
|
35
|
+
* Anonymous user
|
|
36
|
+
*
|
|
37
|
+
* @remarks
|
|
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.
|
|
40
|
+
*/
|
|
41
|
+
async function authLoginAnonymously(client$, security, options) {
|
|
42
|
+
const path$ = (0, url_js_1.pathToFunc)("/auth/anonymous")();
|
|
43
|
+
const headers$ = new Headers({
|
|
44
|
+
Accept: "application/json",
|
|
45
|
+
});
|
|
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$);
|
|
56
|
+
const context = {
|
|
57
|
+
operationID: "post-auth-anonymous",
|
|
58
|
+
oAuth2Scopes: [],
|
|
59
|
+
securitySource: security$,
|
|
60
|
+
};
|
|
61
|
+
const requestRes = client$.createRequest$(context, {
|
|
62
|
+
security: securitySettings$,
|
|
63
|
+
method: "POST",
|
|
64
|
+
path: path$,
|
|
65
|
+
headers: headers$,
|
|
66
|
+
timeoutMs: (options === null || options === void 0 ? void 0 : options.timeoutMs) || client$.options$.timeoutMs || -1,
|
|
67
|
+
}, options);
|
|
68
|
+
if (!requestRes.ok) {
|
|
69
|
+
return requestRes;
|
|
70
|
+
}
|
|
71
|
+
const request$ = requestRes.value;
|
|
72
|
+
const doResult = await client$.do$(request$, {
|
|
73
|
+
context,
|
|
74
|
+
errorCodes: ["4XX", "5XX"],
|
|
75
|
+
retryConfig: (options === null || options === void 0 ? void 0 : options.retries) || client$.options$.retryConfig,
|
|
76
|
+
retryCodes: (options === null || options === void 0 ? void 0 : options.retryCodes) || ["429", "500", "502", "503", "504"],
|
|
77
|
+
});
|
|
78
|
+
if (!doResult.ok) {
|
|
79
|
+
return doResult;
|
|
80
|
+
}
|
|
81
|
+
const response = doResult.value;
|
|
82
|
+
const [result$] = await m$.match(m$.json(200, operations.PostAuthAnonymousResponseBody$inboundSchema), m$.fail(["4XX", "5XX"]))(response);
|
|
83
|
+
if (!result$.ok) {
|
|
84
|
+
return result$;
|
|
85
|
+
}
|
|
86
|
+
return result$;
|
|
87
|
+
}
|
|
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,iBA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AE,KAAK,EAAE,KAAK,EAAE,KAAK,EAAE,KAAK,CAAC;KACzE,CAAC,CAAC;IACH,IAAI,CAAC,QAAQ,CAAC,EAAE,EAAE,CAAC;QACf,OAAO,QAAQ,CAAC;IACpB,CAAC;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"}
|
|
@@ -6,10 +6,10 @@ import { SDKValidationError } from "../models/errors/sdkvalidationerror.js";
|
|
|
6
6
|
import * as operations from "../models/operations/index.js";
|
|
7
7
|
import { Result } from "../types/fp.js";
|
|
8
8
|
/**
|
|
9
|
-
*
|
|
9
|
+
* Retrieve customer detail
|
|
10
10
|
*
|
|
11
11
|
* @remarks
|
|
12
|
-
*
|
|
12
|
+
* Retrieve customer detail.
|
|
13
13
|
*/
|
|
14
|
-
export declare function
|
|
15
|
-
//# sourceMappingURL=
|
|
14
|
+
export declare function customersAPIGetCustomersId(client$: CeStorefrontCore, request: operations.GetCustomersIdRequest, options?: RequestOptions): Promise<Result<operations.GetCustomersIdResponseBody, SDKError | SDKValidationError | UnexpectedClientError | InvalidRequestError | RequestAbortedError | RequestTimeoutError | ConnectionError>>;
|
|
15
|
+
//# sourceMappingURL=customersAPIGetCustomersId.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"customersAPIGetCustomersId.d.ts","sourceRoot":"","sources":["../src/funcs/customersAPIGetCustomersId.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,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,0BAA0B,CAC5C,OAAO,EAAE,gBAAgB,EACzB,OAAO,EAAE,UAAU,CAAC,qBAAqB,EACzC,OAAO,CAAC,EAAE,cAAc,GACzB,OAAO,CACN,MAAM,CACF,UAAU,CAAC,0BAA0B,EACnC,QAAQ,GACR,kBAAkB,GAClB,qBAAqB,GACrB,mBAAmB,GACnB,mBAAmB,GACnB,mBAAmB,GACnB,eAAe,CACpB,CACJ,CA+EA"}
|
|
@@ -26,7 +26,7 @@ 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.customersAPIGetCustomersId = customersAPIGetCustomersId;
|
|
30
30
|
const encodings_js_1 = require("../lib/encodings.js");
|
|
31
31
|
const m$ = __importStar(require("../lib/matchers.js"));
|
|
32
32
|
const schemas$ = __importStar(require("../lib/schemas.js"));
|
|
@@ -34,33 +34,30 @@ const security_js_1 = require("../lib/security.js");
|
|
|
34
34
|
const url_js_1 = require("../lib/url.js");
|
|
35
35
|
const operations = __importStar(require("../models/operations/index.js"));
|
|
36
36
|
/**
|
|
37
|
-
*
|
|
37
|
+
* Retrieve customer detail
|
|
38
38
|
*
|
|
39
39
|
* @remarks
|
|
40
|
-
*
|
|
40
|
+
* Retrieve customer detail.
|
|
41
41
|
*/
|
|
42
|
-
async function
|
|
42
|
+
async function customersAPIGetCustomersId(client$, request, options) {
|
|
43
43
|
const input$ = request;
|
|
44
|
-
const parsed$ = schemas$.safeParse(input$, (value$) => operations.
|
|
44
|
+
const parsed$ = schemas$.safeParse(input$, (value$) => operations.GetCustomersIdRequest$outboundSchema.parse(value$), "Input validation failed");
|
|
45
45
|
if (!parsed$.ok) {
|
|
46
46
|
return parsed$;
|
|
47
47
|
}
|
|
48
48
|
const payload$ = parsed$.value;
|
|
49
49
|
const body$ = null;
|
|
50
50
|
const pathParams$ = {
|
|
51
|
-
|
|
52
|
-
explode: false,
|
|
53
|
-
charEncoding: "percent",
|
|
54
|
-
}),
|
|
51
|
+
id: (0, encodings_js_1.encodeSimple)("id", payload$.id, { explode: false, charEncoding: "percent" }),
|
|
55
52
|
};
|
|
56
|
-
const path$ = (0, url_js_1.pathToFunc)("/
|
|
53
|
+
const path$ = (0, url_js_1.pathToFunc)("/customers/{id}")(pathParams$);
|
|
57
54
|
const headers$ = new Headers({
|
|
58
55
|
Accept: "application/json",
|
|
59
56
|
});
|
|
60
57
|
const authorization$ = await (0, security_js_1.extractSecurity)(client$.options$.authorization);
|
|
61
58
|
const security$ = authorization$ == null ? {} : { authorization: authorization$ };
|
|
62
59
|
const context = {
|
|
63
|
-
operationID: "get-
|
|
60
|
+
operationID: "get-customers-id",
|
|
64
61
|
oAuth2Scopes: [],
|
|
65
62
|
securitySource: client$.options$.authorization,
|
|
66
63
|
};
|
|
@@ -87,10 +84,10 @@ async function ordersReturnsList(client$, request, options) {
|
|
|
87
84
|
return doResult;
|
|
88
85
|
}
|
|
89
86
|
const response = doResult.value;
|
|
90
|
-
const [result$] = await m$.match(m$.json(200, operations.
|
|
87
|
+
const [result$] = await m$.match(m$.json(200, operations.GetCustomersIdResponseBody$inboundSchema), m$.fail(["4XX", "5XX"]))(response);
|
|
91
88
|
if (!result$.ok) {
|
|
92
89
|
return result$;
|
|
93
90
|
}
|
|
94
91
|
return result$;
|
|
95
92
|
}
|
|
96
|
-
//# sourceMappingURL=
|
|
93
|
+
//# sourceMappingURL=customersAPIGetCustomersId.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"customersAPIGetCustomersId.js","sourceRoot":"","sources":["../src/funcs/customersAPIGetCustomersId.ts"],"names":[],"mappings":";AAAA;;GAEG;;;;;;;;;;;;;;;;;;;;;;;;;AA2BH,gEA8FC;AAtHD,sDAAoE;AACpE,uDAAyC;AACzC,4DAA8C;AAE9C,oDAA4E;AAC5E,0CAA2C;AAU3C,0EAA4D;AAG5D;;;;;GAKG;AACI,KAAK,UAAU,0BAA0B,CAC5C,OAAyB,EACzB,OAAyC,EACzC,OAAwB;IAaxB,MAAM,MAAM,GAAG,OAAO,CAAC;IAEvB,MAAM,OAAO,GAAG,QAAQ,CAAC,SAAS,CAC9B,MAAM,EACN,CAAC,MAAM,EAAE,EAAE,CAAC,UAAU,CAAC,oCAAoC,CAAC,KAAK,CAAC,MAAM,CAAC,EACzE,yBAAyB,CAC5B,CAAC;IACF,IAAI,CAAC,OAAO,CAAC,EAAE,EAAE,CAAC;QACd,OAAO,OAAO,CAAC;IACnB,CAAC;IACD,MAAM,QAAQ,GAAG,OAAO,CAAC,KAAK,CAAC;IAC/B,MAAM,KAAK,GAAG,IAAI,CAAC;IAEnB,MAAM,WAAW,GAAG;QAChB,EAAE,EAAE,IAAA,2BAAa,EAAC,IAAI,EAAE,QAAQ,CAAC,EAAE,EAAE,EAAE,OAAO,EAAE,KAAK,EAAE,YAAY,EAAE,SAAS,EAAE,CAAC;KACpF,CAAC;IAEF,MAAM,KAAK,GAAG,IAAA,mBAAU,EAAC,iBAAiB,CAAC,CAAC,WAAW,CAAC,CAAC;IAEzD,MAAM,QAAQ,GAAG,IAAI,OAAO,CAAC;QACzB,MAAM,EAAE,kBAAkB;KAC7B,CAAC,CAAC;IAEH,M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,KAAK,CAAC;KACzE,CAAC,CAAC;IACH,IAAI,CAAC,QAAQ,CAAC,EAAE,EAAE,CAAC;QACf,OAAO,QAAQ,CAAC;IACpB,CAAC;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,wCAAwC,CAAC,EACjE,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,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eAAe,EAAE,CAAC,CAAC;IAC9C,IAAI,CAAC,OAAO,CAAC,EAAE,EAAE,CAAC;QACd,OAAO,OAAO,CAAC;IACnB,CAAC;IAED,OAAO,OAAO,CAAC;AACnB,CAAC"}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { CeStorefrontCore } from "../core.js";
|
|
2
|
+
import { RequestOptions } from "../lib/sdks.js";
|
|
3
|
+
import * as components from "../models/components/index.js";
|
|
4
|
+
import { ConnectionError, InvalidRequestError, RequestAbortedError, RequestTimeoutError, UnexpectedClientError } from "../models/errors/httpclienterrors.js";
|
|
5
|
+
import * as errors from "../models/errors/index.js";
|
|
6
|
+
import { SDKError } from "../models/errors/sdkerror.js";
|
|
7
|
+
import { SDKValidationError } from "../models/errors/sdkvalidationerror.js";
|
|
8
|
+
import * as operations from "../models/operations/index.js";
|
|
9
|
+
import { Result } from "../types/fp.js";
|
|
10
|
+
/**
|
|
11
|
+
* Create customer
|
|
12
|
+
*
|
|
13
|
+
* @remarks
|
|
14
|
+
* Create customer
|
|
15
|
+
*/
|
|
16
|
+
export declare function customersAPIPostCustomers(client$: CeStorefrontCore, request?: components.CreateCustomer | undefined, options?: RequestOptions): Promise<Result<operations.PostCustomersResponseBody, errors.BadRequest | errors.Unauthorized | SDKError | SDKValidationError | UnexpectedClientError | InvalidRequestError | RequestAbortedError | RequestTimeoutError | ConnectionError>>;
|
|
17
|
+
//# sourceMappingURL=customersAPIPostCustomers.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"customersAPIPostCustomers.d.ts","sourceRoot":"","sources":["../src/funcs/customersAPIPostCustomers.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,gBAAgB,EAAE,MAAM,YAAY,CAAC;AAI9C,OAAO,EAAE,cAAc,EAAE,MAAM,gBAAgB,CAAC;AAGhD,OAAO,KAAK,UAAU,MAAM,+BAA+B,CAAC;AAC5D,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,yBAAyB,CAC3C,OAAO,EAAE,gBAAgB,EACzB,OAAO,CAAC,EAAE,UAAU,CAAC,cAAc,GAAG,SAAS,EAC/C,OAAO,CAAC,EAAE,cAAc,GACzB,OAAO,CACN,MAAM,CACF,UAAU,CAAC,yBAAyB,EAClC,MAAM,CAAC,UAAU,GACjB,MAAM,CAAC,YAAY,GACnB,QAAQ,GACR,kBAAkB,GAClB,qBAAqB,GACrB,mBAAmB,GACnB,mBAAmB,GACnB,mBAAmB,GACnB,eAAe,CACpB,CACJ,CAoFA"}
|
|
@@ -0,0 +1,96 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/*
|
|
3
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
4
|
+
*/
|
|
5
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
6
|
+
if (k2 === undefined) k2 = k;
|
|
7
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
8
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
9
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
10
|
+
}
|
|
11
|
+
Object.defineProperty(o, k2, desc);
|
|
12
|
+
}) : (function(o, m, k, k2) {
|
|
13
|
+
if (k2 === undefined) k2 = k;
|
|
14
|
+
o[k2] = m[k];
|
|
15
|
+
}));
|
|
16
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
17
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
18
|
+
}) : function(o, v) {
|
|
19
|
+
o["default"] = v;
|
|
20
|
+
});
|
|
21
|
+
var __importStar = (this && this.__importStar) || function (mod) {
|
|
22
|
+
if (mod && mod.__esModule) return mod;
|
|
23
|
+
var result = {};
|
|
24
|
+
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
|
25
|
+
__setModuleDefault(result, mod);
|
|
26
|
+
return result;
|
|
27
|
+
};
|
|
28
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
29
|
+
exports.customersAPIPostCustomers = customersAPIPostCustomers;
|
|
30
|
+
const encodings_js_1 = require("../lib/encodings.js");
|
|
31
|
+
const m$ = __importStar(require("../lib/matchers.js"));
|
|
32
|
+
const schemas$ = __importStar(require("../lib/schemas.js"));
|
|
33
|
+
const security_js_1 = require("../lib/security.js");
|
|
34
|
+
const url_js_1 = require("../lib/url.js");
|
|
35
|
+
const components = __importStar(require("../models/components/index.js"));
|
|
36
|
+
const errors = __importStar(require("../models/errors/index.js"));
|
|
37
|
+
const operations = __importStar(require("../models/operations/index.js"));
|
|
38
|
+
/**
|
|
39
|
+
* Create customer
|
|
40
|
+
*
|
|
41
|
+
* @remarks
|
|
42
|
+
* Create customer
|
|
43
|
+
*/
|
|
44
|
+
async function customersAPIPostCustomers(client$, request, options) {
|
|
45
|
+
const input$ = request;
|
|
46
|
+
const parsed$ = schemas$.safeParse(input$, (value$) => components.CreateCustomer$outboundSchema.optional().parse(value$), "Input validation failed");
|
|
47
|
+
if (!parsed$.ok) {
|
|
48
|
+
return parsed$;
|
|
49
|
+
}
|
|
50
|
+
const payload$ = parsed$.value;
|
|
51
|
+
const body$ = payload$ === undefined ? null : (0, encodings_js_1.encodeJSON)("body", payload$, { explode: true });
|
|
52
|
+
const path$ = (0, url_js_1.pathToFunc)("/customers")();
|
|
53
|
+
const headers$ = new Headers({
|
|
54
|
+
"Content-Type": "application/json",
|
|
55
|
+
Accept: "application/json",
|
|
56
|
+
});
|
|
57
|
+
const authorization$ = await (0, security_js_1.extractSecurity)(client$.options$.authorization);
|
|
58
|
+
const security$ = authorization$ == null ? {} : { authorization: authorization$ };
|
|
59
|
+
const context = {
|
|
60
|
+
operationID: "post-customers",
|
|
61
|
+
oAuth2Scopes: [],
|
|
62
|
+
securitySource: client$.options$.authorization,
|
|
63
|
+
};
|
|
64
|
+
const securitySettings$ = (0, security_js_1.resolveGlobalSecurity)(security$);
|
|
65
|
+
const requestRes = client$.createRequest$(context, {
|
|
66
|
+
security: securitySettings$,
|
|
67
|
+
method: "POST",
|
|
68
|
+
path: path$,
|
|
69
|
+
headers: headers$,
|
|
70
|
+
body: body$,
|
|
71
|
+
timeoutMs: (options === null || options === void 0 ? void 0 : options.timeoutMs) || client$.options$.timeoutMs || -1,
|
|
72
|
+
}, options);
|
|
73
|
+
if (!requestRes.ok) {
|
|
74
|
+
return requestRes;
|
|
75
|
+
}
|
|
76
|
+
const request$ = requestRes.value;
|
|
77
|
+
const doResult = await client$.do$(request$, {
|
|
78
|
+
context,
|
|
79
|
+
errorCodes: ["400", "401", "4XX", "5XX"],
|
|
80
|
+
retryConfig: (options === null || options === void 0 ? void 0 : options.retries) || client$.options$.retryConfig,
|
|
81
|
+
retryCodes: (options === null || options === void 0 ? void 0 : options.retryCodes) || ["429", "500", "502", "503", "504"],
|
|
82
|
+
});
|
|
83
|
+
if (!doResult.ok) {
|
|
84
|
+
return doResult;
|
|
85
|
+
}
|
|
86
|
+
const response = doResult.value;
|
|
87
|
+
const responseFields$ = {
|
|
88
|
+
HttpMeta: { Response: response, Request: request$ },
|
|
89
|
+
};
|
|
90
|
+
const [result$] = await m$.match(m$.json(200, operations.PostCustomersResponseBody$inboundSchema), m$.jsonErr(400, errors.BadRequest$inboundSchema), m$.jsonErr(401, errors.Unauthorized$inboundSchema), m$.fail(["4XX", "5XX"]))(response, { extraFields: responseFields$ });
|
|
91
|
+
if (!result$.ok) {
|
|
92
|
+
return result$;
|
|
93
|
+
}
|
|
94
|
+
return result$;
|
|
95
|
+
}
|
|
96
|
+
//# sourceMappingURL=customersAPIPostCustomers.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"customersAPIPostCustomers.js","sourceRoot":"","sources":["../src/funcs/customersAPIPostCustomers.ts"],"names":[],"mappings":";AAAA;;GAEG;;;;;;;;;;;;;;;;;;;;;;;;;AA6BH,8DAqGC;AA/HD,sDAAgE;AAChE,uDAAyC;AACzC,4DAA8C;AAE9C,oDAA4E;AAC5E,0CAA2C;AAC3C,0EAA4D;AAQ5D,kEAAoD;AAGpD,0EAA4D;AAG5D;;;;;GAKG;AACI,KAAK,UAAU,yBAAyB,CAC3C,OAAyB,EACzB,OAA+C,EAC/C,OAAwB;IAexB,MAAM,MAAM,GAAG,OAAO,CAAC;IAEvB,MAAM,OAAO,GAAG,QAAQ,CAAC,SAAS,CAC9B,MAAM,EACN,CAAC,MAAM,EAAE,EAAE,CAAC,UAAU,CAAC,6BAA6B,CAAC,QAAQ,EAAE,CAAC,KAAK,CAAC,MAAM,CAAC,EAC7E,yBAAyB,CAC5B,CAAC;IACF,IAAI,CAAC,OAAO,CAAC,EAAE,EAAE,CAAC;QACd,OAAO,OAAO,CAAC;IACnB,CAAC;IACD,MAAM,QAAQ,GAAG,OAAO,CAAC,KAAK,CAAC;IAC/B,MAAM,KAAK,GAAG,QAAQ,KAAK,SAAS,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,IAAA,yBAAW,EAAC,MAAM,EAAE,QAAQ,EAAE,EAAE,OAAO,EAAE,IAAI,EAAE,CAAC,CAAC;IAE/F,MAAM,KAAK,GAAG,IAAA,mBAAU,EAAC,YAAY,CAAC,EAAE,CAAC;IAEzC,MAAM,QAAQ,GAAG,IAAI,OAAO,CAAC;QACzB,cAAc,EAAE,kBAAkB;QAClC,MAAM,EAA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,KAAI,CAAC,KAAK,EAAE,KAAK,EAAE,KAAK,EAAE,KAAK,EAAE,KAAK,CAAC;KACzE,CAAC,CAAC;IACH,IAAI,CAAC,QAAQ,CAAC,EAAE,EAAE,CAAC;QACf,OAAO,QAAQ,CAAC;IACpB,CAAC;IACD,MAAM,QAAQ,GAAG,QAAQ,CAAC,KAAK,CAAC;IAEhC,MAAM,eAAe,GAAG;QACpB,QAAQ,EAAE,EAAE,QAAQ,EAAE,QAAQ,EAAE,OAAO,EAAE,QAAQ,EAAE;KACtD,CAAC;IAEF,MAAM,CAAC,OAAO,CAAC,GAAG,MAAM,EAAE,CAAC,KAAK,CAY5B,EAAE,CAAC,IAAI,CAAC,GAAG,EAAE,UAAU,CAAC,uCAAuC,CAAC,EAChE,EAAE,CAAC,OAAO,CAAC,GAAG,EAAE,MAAM,CAAC,wBAAwB,CAAC,EAChD,EAAE,CAAC,OAAO,CAAC,GAAG,EAAE,MAAM,CAAC,0BAA0B,CAAC,EAClD,EAAE,CAAC,IAAI,CAAC,CAAC,KAAK,EAAE,KAAK,CAAC,CAAC,CAC1B,CAAC,QAAQ,EAAE,EAAE,WAAW,EAAE,eAAe,EAAE,CAAC,CAAC;IAC9C,IAAI,CAAC,OAAO,CAAC,EAAE,EAAE,CAAC;QACd,OAAO,OAAO,CAAC;IACnB,CAAC;IAED,OAAO,OAAO,CAAC;AACnB,CAAC"}
|
|
@@ -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 * as errors from "../models/errors/index.js";
|
|
5
|
+
import { SDKError } from "../models/errors/sdkerror.js";
|
|
6
|
+
import { SDKValidationError } from "../models/errors/sdkvalidationerror.js";
|
|
7
|
+
import * as operations from "../models/operations/index.js";
|
|
8
|
+
import { Result } from "../types/fp.js";
|
|
9
|
+
/**
|
|
10
|
+
* Update customer detail
|
|
11
|
+
*
|
|
12
|
+
* @remarks
|
|
13
|
+
* Update customer detail
|
|
14
|
+
*/
|
|
15
|
+
export declare function customersAPIPutCustomersId(client$: CeStorefrontCore, request: operations.PutCustomersIdRequest, options?: RequestOptions): Promise<Result<operations.PutCustomersIdResponseBody, errors.BadRequest | errors.Unauthorized | SDKError | SDKValidationError | UnexpectedClientError | InvalidRequestError | RequestAbortedError | RequestTimeoutError | ConnectionError>>;
|
|
16
|
+
//# sourceMappingURL=customersAPIPutCustomersId.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"customersAPIPutCustomersId.d.ts","sourceRoot":"","sources":["../src/funcs/customersAPIPutCustomersId.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,0BAA0B,CAC5C,OAAO,EAAE,gBAAgB,EACzB,OAAO,EAAE,UAAU,CAAC,qBAAqB,EACzC,OAAO,CAAC,EAAE,cAAc,GACzB,OAAO,CACN,MAAM,CACF,UAAU,CAAC,0BAA0B,EACnC,MAAM,CAAC,UAAU,GACjB,MAAM,CAAC,YAAY,GACnB,QAAQ,GACR,kBAAkB,GAClB,qBAAqB,GACrB,mBAAmB,GACnB,mBAAmB,GACnB,mBAAmB,GACnB,eAAe,CACpB,CACJ,CAwFA"}
|
|
@@ -0,0 +1,98 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/*
|
|
3
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
4
|
+
*/
|
|
5
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
6
|
+
if (k2 === undefined) k2 = k;
|
|
7
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
8
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
9
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
10
|
+
}
|
|
11
|
+
Object.defineProperty(o, k2, desc);
|
|
12
|
+
}) : (function(o, m, k, k2) {
|
|
13
|
+
if (k2 === undefined) k2 = k;
|
|
14
|
+
o[k2] = m[k];
|
|
15
|
+
}));
|
|
16
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
17
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
18
|
+
}) : function(o, v) {
|
|
19
|
+
o["default"] = v;
|
|
20
|
+
});
|
|
21
|
+
var __importStar = (this && this.__importStar) || function (mod) {
|
|
22
|
+
if (mod && mod.__esModule) return mod;
|
|
23
|
+
var result = {};
|
|
24
|
+
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
|
25
|
+
__setModuleDefault(result, mod);
|
|
26
|
+
return result;
|
|
27
|
+
};
|
|
28
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
29
|
+
exports.customersAPIPutCustomersId = customersAPIPutCustomersId;
|
|
30
|
+
const encodings_js_1 = require("../lib/encodings.js");
|
|
31
|
+
const m$ = __importStar(require("../lib/matchers.js"));
|
|
32
|
+
const schemas$ = __importStar(require("../lib/schemas.js"));
|
|
33
|
+
const security_js_1 = require("../lib/security.js");
|
|
34
|
+
const url_js_1 = require("../lib/url.js");
|
|
35
|
+
const errors = __importStar(require("../models/errors/index.js"));
|
|
36
|
+
const operations = __importStar(require("../models/operations/index.js"));
|
|
37
|
+
/**
|
|
38
|
+
* Update customer detail
|
|
39
|
+
*
|
|
40
|
+
* @remarks
|
|
41
|
+
* Update customer detail
|
|
42
|
+
*/
|
|
43
|
+
async function customersAPIPutCustomersId(client$, request, options) {
|
|
44
|
+
const input$ = request;
|
|
45
|
+
const parsed$ = schemas$.safeParse(input$, (value$) => operations.PutCustomersIdRequest$outboundSchema.parse(value$), "Input validation failed");
|
|
46
|
+
if (!parsed$.ok) {
|
|
47
|
+
return parsed$;
|
|
48
|
+
}
|
|
49
|
+
const payload$ = parsed$.value;
|
|
50
|
+
const body$ = (0, encodings_js_1.encodeJSON)("body", payload$.UpdateCustomer, { explode: true });
|
|
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)("/customers/{id}")(pathParams$);
|
|
55
|
+
const headers$ = new Headers({
|
|
56
|
+
"Content-Type": "application/json",
|
|
57
|
+
Accept: "application/json",
|
|
58
|
+
});
|
|
59
|
+
const authorization$ = await (0, security_js_1.extractSecurity)(client$.options$.authorization);
|
|
60
|
+
const security$ = authorization$ == null ? {} : { authorization: authorization$ };
|
|
61
|
+
const context = {
|
|
62
|
+
operationID: "put-customers-id",
|
|
63
|
+
oAuth2Scopes: [],
|
|
64
|
+
securitySource: client$.options$.authorization,
|
|
65
|
+
};
|
|
66
|
+
const securitySettings$ = (0, security_js_1.resolveGlobalSecurity)(security$);
|
|
67
|
+
const requestRes = client$.createRequest$(context, {
|
|
68
|
+
security: securitySettings$,
|
|
69
|
+
method: "PUT",
|
|
70
|
+
path: path$,
|
|
71
|
+
headers: headers$,
|
|
72
|
+
body: body$,
|
|
73
|
+
timeoutMs: (options === null || options === void 0 ? void 0 : options.timeoutMs) || client$.options$.timeoutMs || -1,
|
|
74
|
+
}, options);
|
|
75
|
+
if (!requestRes.ok) {
|
|
76
|
+
return requestRes;
|
|
77
|
+
}
|
|
78
|
+
const request$ = requestRes.value;
|
|
79
|
+
const doResult = await client$.do$(request$, {
|
|
80
|
+
context,
|
|
81
|
+
errorCodes: ["400", "401", "4XX", "5XX"],
|
|
82
|
+
retryConfig: (options === null || options === void 0 ? void 0 : options.retries) || client$.options$.retryConfig,
|
|
83
|
+
retryCodes: (options === null || options === void 0 ? void 0 : options.retryCodes) || ["429", "500", "502", "503", "504"],
|
|
84
|
+
});
|
|
85
|
+
if (!doResult.ok) {
|
|
86
|
+
return doResult;
|
|
87
|
+
}
|
|
88
|
+
const response = doResult.value;
|
|
89
|
+
const responseFields$ = {
|
|
90
|
+
HttpMeta: { Response: response, Request: request$ },
|
|
91
|
+
};
|
|
92
|
+
const [result$] = await m$.match(m$.json(200, operations.PutCustomersIdResponseBody$inboundSchema), m$.jsonErr(400, errors.BadRequest$inboundSchema), m$.jsonErr(401, errors.Unauthorized$inboundSchema), m$.fail(["4XX", "5XX"]))(response, { extraFields: responseFields$ });
|
|
93
|
+
if (!result$.ok) {
|
|
94
|
+
return result$;
|
|
95
|
+
}
|
|
96
|
+
return result$;
|
|
97
|
+
}
|
|
98
|
+
//# sourceMappingURL=customersAPIPutCustomersId.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"customersAPIPutCustomersId.js","sourceRoot":"","sources":["../src/funcs/customersAPIPutCustomersId.ts"],"names":[],"mappings":";AAAA;;GAEG;;;;;;;;;;;;;;;;;;;;;;;;;AA4BH,gEAyGC;AAlID,sDAA+F;AAC/F,uDAAyC;AACzC,4DAA8C;AAE9C,oDAA4E;AAC5E,0CAA2C;AAQ3C,kEAAoD;AAGpD,0EAA4D;AAG5D;;;;;GAKG;AACI,KAAK,UAAU,0BAA0B,CAC5C,O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,CAY5B,EAAE,CAAC,IAAI,CAAC,GAAG,EAAE,UAAU,CAAC,wCAAwC,CAAC,EACjE,EAAE,CAAC,OAAO,CAAC,GAAG,EAAE,MAAM,CAAC,wBAAwB,CAAC,EAChD,EAAE,CAAC,OAAO,CAAC,GAAG,EAAE,MAAM,CAAC,0BAA0B,CAAC,EAClD,EAAE,CAAC,IAAI,CAAC,CAAC,KAAK,EAAE,KAAK,CAAC,CAAC,CAC1B,CAAC,QAAQ,EAAE,EAAE,WAAW,EAAE,eAAe,EAAE,CAAC,CAAC;IAC9C,IAAI,CAAC,OAAO,CAAC,EAAE,EAAE,CAAC;QACd,OAAO,OAAO,CAAC;IACnB,CAAC;IAED,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.5";
|
|
35
35
|
readonly genVersion: "2.404.3";
|
|
36
|
-
readonly userAgent: "speakeasy-sdk/typescript 0.0.
|
|
36
|
+
readonly userAgent: "speakeasy-sdk/typescript 0.0.5 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.5",
|
|
49
49
|
genVersion: "2.404.3",
|
|
50
|
-
userAgent: "speakeasy-sdk/typescript 0.0.
|
|
50
|
+
userAgent: "speakeasy-sdk/typescript 0.0.5 2.404.3 1.0 ce-storefront",
|
|
51
51
|
};
|
|
52
52
|
//# sourceMappingURL=config.js.map
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import * as z from "zod";
|
|
2
|
+
export type Business = {
|
|
3
|
+
businessType: string;
|
|
4
|
+
name: string;
|
|
5
|
+
panNumber: string;
|
|
6
|
+
gstin?: string | null | undefined;
|
|
7
|
+
};
|
|
8
|
+
/** @internal */
|
|
9
|
+
export declare const Business$inboundSchema: z.ZodType<Business, z.ZodTypeDef, unknown>;
|
|
10
|
+
/** @internal */
|
|
11
|
+
export type Business$Outbound = {
|
|
12
|
+
business_type: string;
|
|
13
|
+
name: string;
|
|
14
|
+
pan_number: string;
|
|
15
|
+
gstin?: string | null | undefined;
|
|
16
|
+
};
|
|
17
|
+
/** @internal */
|
|
18
|
+
export declare const Business$outboundSchema: z.ZodType<Business$Outbound, z.ZodTypeDef, Business>;
|
|
19
|
+
/**
|
|
20
|
+
* @internal
|
|
21
|
+
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
22
|
+
*/
|
|
23
|
+
export declare namespace Business$ {
|
|
24
|
+
/** @deprecated use `Business$inboundSchema` instead. */
|
|
25
|
+
const inboundSchema: z.ZodType<Business, z.ZodTypeDef, unknown>;
|
|
26
|
+
/** @deprecated use `Business$outboundSchema` instead. */
|
|
27
|
+
const outboundSchema: z.ZodType<Business$Outbound, z.ZodTypeDef, Business>;
|
|
28
|
+
/** @deprecated use `Business$Outbound` instead. */
|
|
29
|
+
type Outbound = Business$Outbound;
|
|
30
|
+
}
|
|
31
|
+
//# sourceMappingURL=business.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"business.d.ts","sourceRoot":"","sources":["../../src/models/components/business.ts"],"names":[],"mappings":"AAKA,OAAO,KAAK,CAAC,MAAM,KAAK,CAAC;AAEzB,MAAM,MAAM,QAAQ,GAAG;IACnB,YAAY,EAAE,MAAM,CAAC;IACrB,IAAI,EAAE,MAAM,CAAC;IACb,SAAS,EAAE,MAAM,CAAC;IAClB,KAAK,CAAC,EAAE,MAAM,GAAG,IAAI,GAAG,SAAS,CAAC;CACrC,CAAC;AAEF,gBAAgB;AAChB,eAAO,MAAM,sBAAsB,EAAE,CAAC,CAAC,OAAO,CAAC,QAAQ,EAAE,CAAC,CAAC,UAAU,EAAE,OAAO,CAYxE,CAAC;AAEP,gBAAgB;AAChB,MAAM,MAAM,iBAAiB,GAAG;IAC5B,aAAa,EAAE,MAAM,CAAC;IACtB,IAAI,EAAE,MAAM,CAAC;IACb,UAAU,EAAE,MAAM,CAAC;IACnB,KAAK,CAAC,EAAE,MAAM,GAAG,IAAI,GAAG,SAAS,CAAC;CACrC,CAAC;AAEF,gBAAgB;AAChB,eAAO,MAAM,uBAAuB,EAAE,CAAC,CAAC,OAAO,CAAC,iBAAiB,EAAE,CAAC,CAAC,UAAU,EAAE,QAAQ,CAYnF,CAAC;AAEP;;;GAGG;AACH,yBAAiB,SAAS,CAAC;IACvB,wDAAwD;IACjD,MAAM,aAAa,4CAAyB,CAAC;IACpD,yDAAyD;IAClD,MAAM,cAAc,sDAA0B,CAAC;IACtD,mDAAmD;IACnD,KAAY,QAAQ,GAAG,iBAAiB,CAAC;CAC5C"}
|