ce-storefront 0.18.0 → 0.18.1

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.
Files changed (38) hide show
  1. package/README.md +4 -2
  2. package/docs/sdks/customers/README.md +85 -0
  3. package/esm/funcs/customersListSavedPaymentMethods.d.ts +26 -0
  4. package/esm/funcs/customersListSavedPaymentMethods.d.ts.map +1 -0
  5. package/esm/funcs/customersListSavedPaymentMethods.js +95 -0
  6. package/esm/funcs/customersListSavedPaymentMethods.js.map +1 -0
  7. package/esm/lib/config.d.ts +2 -2
  8. package/esm/lib/config.js +2 -2
  9. package/esm/models/components/index.d.ts +1 -0
  10. package/esm/models/components/index.d.ts.map +1 -1
  11. package/esm/models/components/index.js +1 -0
  12. package/esm/models/components/index.js.map +1 -1
  13. package/esm/models/components/savedpaymentmethod.d.ts +260 -0
  14. package/esm/models/components/savedpaymentmethod.d.ts.map +1 -0
  15. package/esm/models/components/savedpaymentmethod.js +385 -0
  16. package/esm/models/components/savedpaymentmethod.js.map +1 -0
  17. package/esm/models/operations/index.d.ts +1 -0
  18. package/esm/models/operations/index.d.ts.map +1 -1
  19. package/esm/models/operations/index.js +1 -0
  20. package/esm/models/operations/index.js.map +1 -1
  21. package/esm/models/operations/listsavedpaymentmethods.d.ts +90 -0
  22. package/esm/models/operations/listsavedpaymentmethods.d.ts.map +1 -0
  23. package/esm/models/operations/listsavedpaymentmethods.js +105 -0
  24. package/esm/models/operations/listsavedpaymentmethods.js.map +1 -0
  25. package/esm/sdk/customers.d.ts +15 -0
  26. package/esm/sdk/customers.d.ts.map +1 -1
  27. package/esm/sdk/customers.js +18 -0
  28. package/esm/sdk/customers.js.map +1 -1
  29. package/examples/package-lock.json +1 -1
  30. package/jsr.json +1 -1
  31. package/package.json +1 -1
  32. package/src/funcs/customersListSavedPaymentMethods.ts +190 -0
  33. package/src/lib/config.ts +2 -2
  34. package/src/models/components/index.ts +1 -0
  35. package/src/models/components/savedpaymentmethod.ts +668 -0
  36. package/src/models/operations/index.ts +1 -0
  37. package/src/models/operations/listsavedpaymentmethods.ts +225 -0
  38. package/src/sdk/customers.ts +26 -0
@@ -0,0 +1 @@
1
+ {"version":3,"file":"listsavedpaymentmethods.js","sourceRoot":"","sources":["../../../src/models/operations/listsavedpaymentmethods.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,KAAK,CAAC,MAAM,QAAQ,CAAC;AAC5B,OAAO,EAAE,KAAK,IAAI,MAAM,EAAE,MAAM,yBAAyB,CAAC;AAC1D,OAAO,EAAE,SAAS,EAAE,MAAM,sBAAsB,CAAC;AAEjD,OAAO,KAAK,UAAU,MAAM,wBAAwB,CAAC;AAuBrD,gBAAgB;AAChB,MAAM,CAAC,MAAM,4CAA4C,GAIrD,CAAC,CAAC,MAAM,CAAC;IACX,WAAW,EAAE,CAAC,CAAC,MAAM,EAAE;CACxB,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,EAAE,EAAE;IACjB,OAAO,MAAM,CAAC,CAAC,EAAE;QACf,aAAa,EAAE,YAAY;KAC5B,CAAC,CAAC;AACL,CAAC,CAAC,CAAC;AAOH,gBAAgB;AAChB,MAAM,CAAC,MAAM,6CAA6C,GAItD,CAAC,CAAC,MAAM,CAAC;IACX,UAAU,EAAE,CAAC,CAAC,MAAM,EAAE;CACvB,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,EAAE,EAAE;IACjB,OAAO,MAAM,CAAC,CAAC,EAAE;QACf,UAAU,EAAE,aAAa;KAC1B,CAAC,CAAC;AACL,CAAC,CAAC,CAAC;AAEH;;;GAGG;AACH,MAAM,KAAW,+BAA+B,CAO/C;AAPD,WAAiB,+BAA+B;IAC9C,8EAA8E;IACjE,6CAAa,GAAG,4CAA4C,CAAC;IAC1E,+EAA+E;IAClE,8CAAc,GAAG,6CAA6C,CAAC;AAG9E,CAAC,EAPgB,+BAA+B,KAA/B,+BAA+B,QAO/C;AAED,MAAM,UAAU,oCAAoC,CAClD,8BA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AM,UAAU,2CAA2C,CACzD,UAAkB;IAElB,OAAO,SAAS,CACd,UAAU,EACV,CAAC,CAAC,EAAE,EAAE,CACJ,iDAAiD,CAAC,KAAK,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,EACxE,iEAAiE,CAClE,CAAC;AACJ,CAAC"}
@@ -1,6 +1,21 @@
1
1
  import { ClientSDK, RequestOptions } from "../lib/sdks.js";
2
2
  import * as operations from "../models/operations/index.js";
3
3
  export declare class Customers extends ClientSDK {
4
+ /**
5
+ * List all saved payment methods
6
+ *
7
+ * @remarks
8
+ * This endpoint acts as a proxy for JusPay’s “Fetch Saved Payment Methods” API. It enables to securely retrieve a list of payment methods (such as saved cards, UPI handles, wallets) that have been previously stored for a given customer.
9
+ *
10
+ * The operation helps streamline the checkout flow by allowing users to quickly select from existing payment methods, reducing input friction and improving conversion.
11
+ *
12
+ * API documentation of JusPay can be found at below link:
13
+ *
14
+ * https://juspay.io/in/docs/api-reference/docs/express-checkout/fetch-saved-payment-methods
15
+ *
16
+ * @see {@link https://llm-docs.commercengine.io/storefront/operations/list-saved-payment-methods} - API reference for the list-saved-payment-methods operation
17
+ */
18
+ listSavedPaymentMethods(request: operations.ListSavedPaymentMethodsRequest, options?: RequestOptions): Promise<operations.ListSavedPaymentMethodsResponseBody>;
4
19
  /**
5
20
  * Retrieve all addresses
6
21
  *
@@ -1 +1 @@
1
- {"version":3,"file":"customers.d.ts","sourceRoot":"","sources":["../../src/sdk/customers.ts"],"names":[],"mappings":"AAWA,OAAO,EAAE,SAAS,EAAE,cAAc,EAAE,MAAM,gBAAgB,CAAC;AAC3D,OAAO,KAAK,UAAU,MAAM,+BAA+B,CAAC;AAG5D,qBAAa,SAAU,SAAQ,SAAS;IACtC;;;;;;;OAOG;IACG,aAAa,CACjB,OAAO,EAAE,UAAU,CAAC,oBAAoB,EACxC,OAAO,CAAC,EAAE,cAAc,GACvB,OAAO,CAAC,UAAU,CAAC,yBAAyB,CAAC;IAQhD;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AC,mCAAmC,CAAC;IAQ1D;;;;;;;OAOG;IACG,aAAa,CACjB,OAAO,EAAE,UAAU,CAAC,oBAAoB,EACxC,OAAO,CAAC,EAAE,cAAc,GACvB,OAAO,CAAC,UAAU,CAAC,yBAAyB,CAAC;IAQhD;;;;;;;OAOG;IACG,aAAa,CACjB,OAAO,EAAE,UAAU,CAAC,oBAAoB,EACxC,OAAO,CAAC,EAAE,cAAc,GACvB,OAAO,CAAC,UAAU,CAAC,yBAAyB,CAAC;IAQhD;;;;;;;OAOG;IACG,gBAAgB,CACpB,OAAO,EAAE,UAAU,CAAC,uBAAuB,EAC3C,OAAO,CAAC,EAAE,cAAc,GACvB,OAAO,CAAC,UAAU,CAAC,4BAA4B,CAAC;IAQnD;;;;;;;OAOG;IACG,mBAAmB,CACvB,OAAO,EAAE,UAAU,CAAC,0BAA0B,EAC9C,OAAO,CAAC,EAAE,cAAc,GACvB,OAAO,CAAC,UAAU,CAAC,+BAA+B,CAAC;IAQtD;;;;;;;OAOG;IACG,aAAa,CACjB,OAAO,EAAE,UAAU,CAAC,oBAAoB,EACxC,OAAO,CAAC,EAAE,cAAc,GACvB,OAAO,CAAC,UAAU,CAAC,yBAAyB,CAAC;IAQhD;;;;;;;OAOG;IACG,iBAAiB,CACrB,OAAO,EAAE,UAAU,CAAC,wBAAwB,EAC5C,OAAO,CAAC,EAAE,cAAc,GACvB,OAAO,CAAC,UAAU,CAAC,6BAA6B,CAAC;IAQpD;;;;;;;OAOG;IACG,eAAe,CACnB,OAAO,EAAE,UAAU,CAAC,sBAAsB,EAC1C,OAAO,CAAC,EAAE,cAAc,GACvB,OAAO,CAAC,UAAU,CAAC,2BAA2B,CAAC;CAOnD"}
@@ -6,11 +6,29 @@ import { customersDeleteAddress } from "../funcs/customersDeleteAddress.js";
6
6
  import { customersGetAddressDetail } from "../funcs/customersGetAddressDetail.js";
7
7
  import { customersGetLoyaltyDetails } from "../funcs/customersGetLoyaltyDetails.js";
8
8
  import { customersListAddresses } from "../funcs/customersListAddresses.js";
9
+ import { customersListSavedPaymentMethods } from "../funcs/customersListSavedPaymentMethods.js";
9
10
  import { customersListUserReviews } from "../funcs/customersListUserReviews.js";
10
11
  import { customersUpdateAddressDetail } from "../funcs/customersUpdateAddressDetail.js";
11
12
  import { ClientSDK } from "../lib/sdks.js";
12
13
  import { unwrapAsync } from "../types/fp.js";
13
14
  export class Customers extends ClientSDK {
15
+ /**
16
+ * List all saved payment methods
17
+ *
18
+ * @remarks
19
+ * This endpoint acts as a proxy for JusPay’s “Fetch Saved Payment Methods” API. It enables to securely retrieve a list of payment methods (such as saved cards, UPI handles, wallets) that have been previously stored for a given customer.
20
+ *
21
+ * The operation helps streamline the checkout flow by allowing users to quickly select from existing payment methods, reducing input friction and improving conversion.
22
+ *
23
+ * API documentation of JusPay can be found at below link:
24
+ *
25
+ * https://juspay.io/in/docs/api-reference/docs/express-checkout/fetch-saved-payment-methods
26
+ *
27
+ * @see {@link https://llm-docs.commercengine.io/storefront/operations/list-saved-payment-methods} - API reference for the list-saved-payment-methods operation
28
+ */
29
+ async listSavedPaymentMethods(request, options) {
30
+ return unwrapAsync(customersListSavedPaymentMethods(this, request, options));
31
+ }
14
32
  /**
15
33
  * Retrieve all addresses
16
34
  *
@@ -1 +1 @@
1
- {"version":3,"file":"customers.js","sourceRoot":"","sources":["../../src/sdk/customers.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,EAAE,sBAAsB,EAAE,MAAM,oCAAoC,CAAC;AAC5E,OAAO,EAAE,sBAAsB,EAAE,MAAM,oCAAoC,CAAC;AAC5E,OAAO,EAAE,yBAAyB,EAAE,MAAM,uCAAuC,CAAC;AAClF,OAAO,EAAE,0BAA0B,EAAE,MAAM,wCAAwC,CAAC;AACpF,OAAO,EAAE,sBAAsB,EAAE,MAAM,oCAAoC,CAAC;AAC5E,OAAO,EAAE,wBAAwB,EAAE,MAAM,sCAAsC,CAAC;AAChF,OAAO,EAAE,4BAA4B,EAAE,MAAM,0CAA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IAED;;;;;;;OAOG;IACH,KAAK,CAAC,gBAAgB,CACpB,OAA2C,EAC3C,OAAwB;QAExB,OAAO,WAAW,CAAC,yBAAyB,CAC1C,IAAI,EACJ,OAAO,EACP,OAAO,CACR,CAAC,CAAC;IACL,CAAC;IAED;;;;;;;OAOG;IACH,KAAK,CAAC,mBAAmB,CACvB,OAA8C,EAC9C,OAAwB;QAExB,OAAO,WAAW,CAAC,4BAA4B,CAC7C,IAAI,EACJ,OAAO,EACP,OAAO,CACR,CAAC,CAAC;IACL,CAAC;IAED;;;;;;;OAOG;IACH,KAAK,CAAC,aAAa,CACjB,OAAwC,EACxC,OAAwB;QAExB,OAAO,WAAW,CAAC,sBAAsB,CACvC,IAAI,EACJ,OAAO,EACP,OAAO,CACR,CAAC,CAAC;IACL,CAAC;IAED;;;;;;;OAOG;IACH,KAAK,CAAC,iBAAiB,CACrB,OAA4C,EAC5C,OAAwB;QAExB,OAAO,WAAW,CAAC,0BAA0B,CAC3C,IAAI,EACJ,OAAO,EACP,OAAO,CACR,CAAC,CAAC;IACL,CAAC;IAED;;;;;;;OAOG;IACH,KAAK,CAAC,eAAe,CACnB,OAA0C,EAC1C,OAAwB;QAExB,OAAO,WAAW,CAAC,wBAAwB,CACzC,IAAI,EACJ,OAAO,EACP,OAAO,CACR,CAAC,CAAC;IACL,CAAC;CACF"}
@@ -18,7 +18,7 @@
18
18
  },
19
19
  "..": {
20
20
  "name": "ce-storefront",
21
- "version": "0.18.0",
21
+ "version": "0.18.1",
22
22
  "dependencies": {
23
23
  "zod": "^3.25.0 || ^4.0.0"
24
24
  },
package/jsr.json CHANGED
@@ -2,7 +2,7 @@
2
2
 
3
3
  {
4
4
  "name": "ce-storefront",
5
- "version": "0.18.0",
5
+ "version": "0.18.1",
6
6
  "exports": {
7
7
  ".": "./src/index.ts",
8
8
  "./models/errors": "./src/models/errors/index.ts",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "ce-storefront",
3
- "version": "0.18.0",
3
+ "version": "0.18.1",
4
4
  "author": "TarkAI",
5
5
  "type": "module",
6
6
  "main": "./esm/index.js",
@@ -0,0 +1,190 @@
1
+ /*
2
+ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
3
+ */
4
+
5
+ import { CeStorefrontCore } from "../core.js";
6
+ import { encodeSimple } from "../lib/encodings.js";
7
+ import * as M from "../lib/matchers.js";
8
+ import { compactMap } from "../lib/primitives.js";
9
+ import { safeParse } from "../lib/schemas.js";
10
+ import { RequestOptions } from "../lib/sdks.js";
11
+ import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js";
12
+ import { pathToFunc } from "../lib/url.js";
13
+ import { CeStorefrontError } from "../models/errors/cestorefronterror.js";
14
+ import {
15
+ ConnectionError,
16
+ InvalidRequestError,
17
+ RequestAbortedError,
18
+ RequestTimeoutError,
19
+ UnexpectedClientError,
20
+ } from "../models/errors/httpclienterrors.js";
21
+ import * as errors from "../models/errors/index.js";
22
+ import { ResponseValidationError } from "../models/errors/responsevalidationerror.js";
23
+ import { SDKValidationError } from "../models/errors/sdkvalidationerror.js";
24
+ import * as operations from "../models/operations/index.js";
25
+ import { APICall, APIPromise } from "../types/async.js";
26
+ import { Result } from "../types/fp.js";
27
+
28
+ /**
29
+ * List all saved payment methods
30
+ *
31
+ * @remarks
32
+ * This endpoint acts as a proxy for JusPay’s “Fetch Saved Payment Methods” API. It enables to securely retrieve a list of payment methods (such as saved cards, UPI handles, wallets) that have been previously stored for a given customer.
33
+ *
34
+ * The operation helps streamline the checkout flow by allowing users to quickly select from existing payment methods, reducing input friction and improving conversion.
35
+ *
36
+ * API documentation of JusPay can be found at below link:
37
+ *
38
+ * https://juspay.io/in/docs/api-reference/docs/express-checkout/fetch-saved-payment-methods
39
+ *
40
+ * @see {@link https://llm-docs.commercengine.io/storefront/operations/list-saved-payment-methods} - API reference for the list-saved-payment-methods operation
41
+ */
42
+ export function customersListSavedPaymentMethods(
43
+ client: CeStorefrontCore,
44
+ request: operations.ListSavedPaymentMethodsRequest,
45
+ options?: RequestOptions,
46
+ ): APIPromise<
47
+ Result<
48
+ operations.ListSavedPaymentMethodsResponseBody,
49
+ | errors.Unauthorized
50
+ | errors.NotFound
51
+ | CeStorefrontError
52
+ | ResponseValidationError
53
+ | ConnectionError
54
+ | RequestAbortedError
55
+ | RequestTimeoutError
56
+ | InvalidRequestError
57
+ | UnexpectedClientError
58
+ | SDKValidationError
59
+ >
60
+ > {
61
+ return new APIPromise($do(
62
+ client,
63
+ request,
64
+ options,
65
+ ));
66
+ }
67
+
68
+ async function $do(
69
+ client: CeStorefrontCore,
70
+ request: operations.ListSavedPaymentMethodsRequest,
71
+ options?: RequestOptions,
72
+ ): Promise<
73
+ [
74
+ Result<
75
+ operations.ListSavedPaymentMethodsResponseBody,
76
+ | errors.Unauthorized
77
+ | errors.NotFound
78
+ | CeStorefrontError
79
+ | ResponseValidationError
80
+ | ConnectionError
81
+ | RequestAbortedError
82
+ | RequestTimeoutError
83
+ | InvalidRequestError
84
+ | UnexpectedClientError
85
+ | SDKValidationError
86
+ >,
87
+ APICall,
88
+ ]
89
+ > {
90
+ const parsed = safeParse(
91
+ request,
92
+ (value) =>
93
+ operations.ListSavedPaymentMethodsRequest$outboundSchema.parse(value),
94
+ "Input validation failed",
95
+ );
96
+ if (!parsed.ok) {
97
+ return [parsed, { status: "invalid" }];
98
+ }
99
+ const payload = parsed.value;
100
+ const body = null;
101
+
102
+ const pathParams = {
103
+ customer_id: encodeSimple("customer_id", payload.customer_id, {
104
+ explode: false,
105
+ charEncoding: "percent",
106
+ }),
107
+ };
108
+
109
+ const path = pathToFunc("/customers/{customer_id}/payment-methods")(
110
+ pathParams,
111
+ );
112
+
113
+ const headers = new Headers(compactMap({
114
+ Accept: "application/json",
115
+ }));
116
+
117
+ const secConfig = await extractSecurity(client._options.authorization);
118
+ const securityInput = secConfig == null ? {} : { authorization: secConfig };
119
+ const requestSecurity = resolveGlobalSecurity(securityInput);
120
+
121
+ const context = {
122
+ options: client._options,
123
+ baseURL: options?.serverURL ?? client._baseURL ?? "",
124
+ operationID: "list-saved-payment-methods",
125
+ oAuth2Scopes: null,
126
+
127
+ resolvedSecurity: requestSecurity,
128
+
129
+ securitySource: client._options.authorization,
130
+ retryConfig: options?.retries
131
+ || client._options.retryConfig
132
+ || { strategy: "none" },
133
+ retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"],
134
+ };
135
+
136
+ const requestRes = client._createRequest(context, {
137
+ security: requestSecurity,
138
+ method: "GET",
139
+ baseURL: options?.serverURL,
140
+ path: path,
141
+ headers: headers,
142
+ body: body,
143
+ userAgent: client._options.userAgent,
144
+ timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1,
145
+ }, options);
146
+ if (!requestRes.ok) {
147
+ return [requestRes, { status: "invalid" }];
148
+ }
149
+ const req = requestRes.value;
150
+
151
+ const doResult = await client._do(req, {
152
+ context,
153
+ errorCodes: ["401", "404", "4XX", "5XX"],
154
+ retryConfig: context.retryConfig,
155
+ retryCodes: context.retryCodes,
156
+ });
157
+ if (!doResult.ok) {
158
+ return [doResult, { status: "request-error", request: req }];
159
+ }
160
+ const response = doResult.value;
161
+
162
+ const responseFields = {
163
+ HttpMeta: { Response: response, Request: req },
164
+ };
165
+
166
+ const [result] = await M.match<
167
+ operations.ListSavedPaymentMethodsResponseBody,
168
+ | errors.Unauthorized
169
+ | errors.NotFound
170
+ | CeStorefrontError
171
+ | ResponseValidationError
172
+ | ConnectionError
173
+ | RequestAbortedError
174
+ | RequestTimeoutError
175
+ | InvalidRequestError
176
+ | UnexpectedClientError
177
+ | SDKValidationError
178
+ >(
179
+ M.json(200, operations.ListSavedPaymentMethodsResponseBody$inboundSchema),
180
+ M.jsonErr(401, errors.Unauthorized$inboundSchema),
181
+ M.jsonErr(404, errors.NotFound$inboundSchema),
182
+ M.fail("4XX"),
183
+ M.fail("5XX"),
184
+ )(response, req, { extraFields: responseFields });
185
+ if (!result.ok) {
186
+ return [result, { status: "complete", request: req, response }];
187
+ }
188
+
189
+ return [result, { status: "complete", request: req, response }];
190
+ }
package/src/lib/config.ts CHANGED
@@ -80,7 +80,7 @@ export function serverURLFromOptions(options: SDKOptions): URL | null {
80
80
  export const SDK_METADATA = {
81
81
  language: "typescript",
82
82
  openapiDocVersion: "1.0",
83
- sdkVersion: "0.18.0",
83
+ sdkVersion: "0.18.1",
84
84
  genVersion: "2.730.5",
85
- userAgent: "speakeasy-sdk/typescript 0.18.0 2.730.5 1.0 ce-storefront",
85
+ userAgent: "speakeasy-sdk/typescript 0.18.1 2.730.5 1.0 ce-storefront",
86
86
  } as const;
@@ -72,6 +72,7 @@ export * from "./productreview.js";
72
72
  export * from "./productshipping.js";
73
73
  export * from "./productsubscription.js";
74
74
  export * from "./productvideo.js";
75
+ export * from "./savedpaymentmethod.js";
75
76
  export * from "./searchproduct.js";
76
77
  export * from "./security.js";
77
78
  export * from "./seo.js";