@cimplify/sdk 0.100.4 → 0.100.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/dist/lint-rules.json +1 -1
- package/dist/lint.d.mts +10 -7
- package/dist/lint.d.ts +10 -7
- package/dist/lint.js +1 -1
- package/dist/lint.mjs +1 -1
- package/dist/testing.d.mts +15 -15
- package/dist/testing.d.ts +15 -15
- package/package.json +1 -1
package/dist/lint-rules.json
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"schemaVersion":1,"name":"@cimplify/sdk/starter","rules":[{"id":"sdk/check-result-ok","severity":"error","message":"Check `result.ok` before reading `result.value`.","help":"Cimplify SDK calls return Result values. Handle the error branch before using the value.","primitive":{"kind":"required-result-check","factories":[{"source":"@cimplify/sdk","imported":["createCimplifyClient"]},{"source":"@cimplify/sdk/server","imported":["getServerClient"]}],"guardProperty":"ok","valueProperty":"value"}},{"id":"sdk/render-price-component","severity":"error","message":"Render money with the SDK `Price` component.","help":"`Price` applies the active business currency and locale consistently.","primitive":{"kind":"required-wrapper-call","context":"jsx-child","activationImports":[{"value":"@cimplify/sdk","match":"prefix"}],"subjectNamePattern":"(?:^|_)(?:price|amount|subtotal|total|tax|fee|discount|cost)
|
|
1
|
+
{"schemaVersion":1,"name":"@cimplify/sdk/starter","rules":[{"id":"sdk/check-result-ok","severity":"error","message":"Check `result.ok` before reading `result.value`.","help":"Cimplify SDK calls return Result values. Handle the error branch before using the value.","primitive":{"kind":"required-result-check","factories":[{"source":"@cimplify/sdk","imported":["createCimplifyClient"]},{"source":"@cimplify/sdk/server","imported":["getServerClient"]}],"guardProperty":"ok","valueProperty":"value"}},{"id":"sdk/render-price-component","severity":"error","message":"Render money with the SDK `Price` component.","help":"`Price` applies the active business currency and locale consistently.","primitive":{"kind":"required-wrapper-call","context":"jsx-child","activationImports":[{"value":"@cimplify/sdk","match":"prefix"}],"subjectNamePattern":"(?:^|_)(?:price|amount|subtotal|total|tax|fee|discount|cost)$","wrapper":{"syntax":"jsx","source":"@cimplify/sdk/react","imported":"Price","prop":"amount"}},"fix":{"kind":"wrap-jsx-expression"}},{"id":"sdk/parse-price-before-math","severity":"error","message":"Call `parsePrice` before using a money value in numeric operations.","help":"Money arrives over the wire as a decimal string; implicit coercion can produce incorrect comparisons and totals.","primitive":{"kind":"required-wrapper-call","context":"numeric-operation","activationImports":[{"value":"@cimplify/sdk","match":"prefix"}],"subjectNamePattern":"(?:^|_)(?:price|amount|subtotal|total|tax|fee|discount|cost)$","wrapper":{"syntax":"call","imports":[{"source":"@cimplify/sdk","imported":["parsePrice"]},{"source":"@cimplify/sdk/utils","imported":["parsePrice"]}]},"operators":["+","-","*","/","%","**","<","<=",">",">="]}},{"id":"sdk/no-react-query","severity":"error","message":"Use Cimplify SDK hooks instead of React Query.","help":"Use the SDK hooks and their provider-owned cache so cart, catalogue, and account state stay coherent.","primitive":{"kind":"banned-import","sources":[{"value":"react-query","match":"exact"},{"value":"@tanstack/react-query","match":"prefix"}]}},{"id":"sdk/no-cookie-in-cache-key","severity":"error","message":"Remove the Cookie header from this cacheable request.","help":"Cookie-bearing requests bypass the shared cache by design. Keep personalized cart/account reads in a client island.","primitive":{"kind":"banned-call-argument","callees":["fetch","Request"],"globalCalleesOnly":true,"argumentIndexes":[1],"objectPaths":[["headers","cookie"]],"caseInsensitive":true},"fix":{"kind":"remove-object-property"}},{"id":"ui/no-raw-img","severity":"warning","message":"Use `next/image` instead of a raw `<img>` element.","help":"The storefront image loader supplies responsive sizes, modern formats, and intrinsic dimensions.","primitive":{"kind":"banned-jsx-element","elements":["img"]}},{"id":"ui/theme-tokens-only","severity":"warning","message":"Use storefront theme tokens instead of hard-coded color utilities.","help":"Define palette changes in `app/globals.css` and consume semantic utilities such as `bg-background` and `text-foreground`.","primitive":{"kind":"banned-classname-pattern","patterns":["^(?:accent|bg|border|caret|decoration|divide|fill|from|outline|placeholder|ring|shadow|stroke|text|to|via)-(?:slate|gray|zinc|neutral|stone|red|orange|amber|yellow|lime|green|emerald|teal|cyan|sky|blue|indigo|violet|purple|fuchsia|pink|rose)-(?:50|100|200|300|400|500|600|700|800|900|950)$","^(?:accent|bg|border|caret|decoration|divide|fill|from|outline|placeholder|ring|shadow|stroke|text|to|via)-(?:black|white)$","^(?:accent|bg|border|caret|decoration|divide|fill|from|outline|placeholder|ring|shadow|stroke|text|to|via)-\\[(?:#|rgba?\\(|hsla?\\(|oklch\\(|oklab\\(|lab\\(|lch\\(|color:)"],"replacements":[{"from":"bg-white","to":"bg-background"},{"from":"bg-black","to":"bg-foreground"},{"from":"text-black","to":"text-foreground"},{"from":"border-black","to":"border-foreground"},{"from":"border-white","to":"border-background"}]},"fix":{"kind":"replace-classname"}}]}
|
package/dist/lint.d.mts
CHANGED
|
@@ -30,7 +30,10 @@ interface RequiredWrapperCallPrimitive {
|
|
|
30
30
|
readonly context: WrapperContext;
|
|
31
31
|
/** The rule is inactive unless the file imports one of these modules. */
|
|
32
32
|
readonly activationImports: readonly ImportSourcePattern[];
|
|
33
|
-
/**
|
|
33
|
+
/**
|
|
34
|
+
* Regular-expression source matched case-insensitively against both the raw identifier/property
|
|
35
|
+
* name and a camelCase/PascalCase form normalized to lowercase snake_case.
|
|
36
|
+
*/
|
|
34
37
|
readonly subjectNamePattern: string;
|
|
35
38
|
readonly wrapper: JsxWrapper | CallWrapper;
|
|
36
39
|
readonly operators?: readonly string[];
|
|
@@ -137,7 +140,7 @@ declare const renderPriceComponentRule: {
|
|
|
137
140
|
readonly value: "@cimplify/sdk";
|
|
138
141
|
readonly match: "prefix";
|
|
139
142
|
}];
|
|
140
|
-
readonly subjectNamePattern: "(?:^|_)(?:price|amount|subtotal|total|tax|fee|discount|cost)
|
|
143
|
+
readonly subjectNamePattern: "(?:^|_)(?:price|amount|subtotal|total|tax|fee|discount|cost)$";
|
|
141
144
|
readonly wrapper: {
|
|
142
145
|
readonly syntax: "jsx";
|
|
143
146
|
readonly source: "@cimplify/sdk/react";
|
|
@@ -161,7 +164,7 @@ declare const parsePriceBeforeMathRule: {
|
|
|
161
164
|
readonly value: "@cimplify/sdk";
|
|
162
165
|
readonly match: "prefix";
|
|
163
166
|
}];
|
|
164
|
-
readonly subjectNamePattern: "(?:^|_)(?:price|amount|subtotal|total|tax|fee|discount|cost)
|
|
167
|
+
readonly subjectNamePattern: "(?:^|_)(?:price|amount|subtotal|total|tax|fee|discount|cost)$";
|
|
165
168
|
readonly wrapper: {
|
|
166
169
|
readonly syntax: "call";
|
|
167
170
|
readonly imports: readonly [{
|
|
@@ -281,7 +284,7 @@ declare const starterLintRuleSet: LintRuleSet & {
|
|
|
281
284
|
readonly value: "@cimplify/sdk";
|
|
282
285
|
readonly match: "prefix";
|
|
283
286
|
}];
|
|
284
|
-
readonly subjectNamePattern: "(?:^|_)(?:price|amount|subtotal|total|tax|fee|discount|cost)
|
|
287
|
+
readonly subjectNamePattern: "(?:^|_)(?:price|amount|subtotal|total|tax|fee|discount|cost)$";
|
|
285
288
|
readonly wrapper: {
|
|
286
289
|
readonly syntax: "jsx";
|
|
287
290
|
readonly source: "@cimplify/sdk/react";
|
|
@@ -304,7 +307,7 @@ declare const starterLintRuleSet: LintRuleSet & {
|
|
|
304
307
|
readonly value: "@cimplify/sdk";
|
|
305
308
|
readonly match: "prefix";
|
|
306
309
|
}];
|
|
307
|
-
readonly subjectNamePattern: "(?:^|_)(?:price|amount|subtotal|total|tax|fee|discount|cost)
|
|
310
|
+
readonly subjectNamePattern: "(?:^|_)(?:price|amount|subtotal|total|tax|fee|discount|cost)$";
|
|
308
311
|
readonly wrapper: {
|
|
309
312
|
readonly syntax: "call";
|
|
310
313
|
readonly imports: readonly [{
|
|
@@ -416,7 +419,7 @@ declare const starterLintRules: readonly LintRule[] & readonly [{
|
|
|
416
419
|
readonly value: "@cimplify/sdk";
|
|
417
420
|
readonly match: "prefix";
|
|
418
421
|
}];
|
|
419
|
-
readonly subjectNamePattern: "(?:^|_)(?:price|amount|subtotal|total|tax|fee|discount|cost)
|
|
422
|
+
readonly subjectNamePattern: "(?:^|_)(?:price|amount|subtotal|total|tax|fee|discount|cost)$";
|
|
420
423
|
readonly wrapper: {
|
|
421
424
|
readonly syntax: "jsx";
|
|
422
425
|
readonly source: "@cimplify/sdk/react";
|
|
@@ -439,7 +442,7 @@ declare const starterLintRules: readonly LintRule[] & readonly [{
|
|
|
439
442
|
readonly value: "@cimplify/sdk";
|
|
440
443
|
readonly match: "prefix";
|
|
441
444
|
}];
|
|
442
|
-
readonly subjectNamePattern: "(?:^|_)(?:price|amount|subtotal|total|tax|fee|discount|cost)
|
|
445
|
+
readonly subjectNamePattern: "(?:^|_)(?:price|amount|subtotal|total|tax|fee|discount|cost)$";
|
|
443
446
|
readonly wrapper: {
|
|
444
447
|
readonly syntax: "call";
|
|
445
448
|
readonly imports: readonly [{
|
package/dist/lint.d.ts
CHANGED
|
@@ -30,7 +30,10 @@ interface RequiredWrapperCallPrimitive {
|
|
|
30
30
|
readonly context: WrapperContext;
|
|
31
31
|
/** The rule is inactive unless the file imports one of these modules. */
|
|
32
32
|
readonly activationImports: readonly ImportSourcePattern[];
|
|
33
|
-
/**
|
|
33
|
+
/**
|
|
34
|
+
* Regular-expression source matched case-insensitively against both the raw identifier/property
|
|
35
|
+
* name and a camelCase/PascalCase form normalized to lowercase snake_case.
|
|
36
|
+
*/
|
|
34
37
|
readonly subjectNamePattern: string;
|
|
35
38
|
readonly wrapper: JsxWrapper | CallWrapper;
|
|
36
39
|
readonly operators?: readonly string[];
|
|
@@ -137,7 +140,7 @@ declare const renderPriceComponentRule: {
|
|
|
137
140
|
readonly value: "@cimplify/sdk";
|
|
138
141
|
readonly match: "prefix";
|
|
139
142
|
}];
|
|
140
|
-
readonly subjectNamePattern: "(?:^|_)(?:price|amount|subtotal|total|tax|fee|discount|cost)
|
|
143
|
+
readonly subjectNamePattern: "(?:^|_)(?:price|amount|subtotal|total|tax|fee|discount|cost)$";
|
|
141
144
|
readonly wrapper: {
|
|
142
145
|
readonly syntax: "jsx";
|
|
143
146
|
readonly source: "@cimplify/sdk/react";
|
|
@@ -161,7 +164,7 @@ declare const parsePriceBeforeMathRule: {
|
|
|
161
164
|
readonly value: "@cimplify/sdk";
|
|
162
165
|
readonly match: "prefix";
|
|
163
166
|
}];
|
|
164
|
-
readonly subjectNamePattern: "(?:^|_)(?:price|amount|subtotal|total|tax|fee|discount|cost)
|
|
167
|
+
readonly subjectNamePattern: "(?:^|_)(?:price|amount|subtotal|total|tax|fee|discount|cost)$";
|
|
165
168
|
readonly wrapper: {
|
|
166
169
|
readonly syntax: "call";
|
|
167
170
|
readonly imports: readonly [{
|
|
@@ -281,7 +284,7 @@ declare const starterLintRuleSet: LintRuleSet & {
|
|
|
281
284
|
readonly value: "@cimplify/sdk";
|
|
282
285
|
readonly match: "prefix";
|
|
283
286
|
}];
|
|
284
|
-
readonly subjectNamePattern: "(?:^|_)(?:price|amount|subtotal|total|tax|fee|discount|cost)
|
|
287
|
+
readonly subjectNamePattern: "(?:^|_)(?:price|amount|subtotal|total|tax|fee|discount|cost)$";
|
|
285
288
|
readonly wrapper: {
|
|
286
289
|
readonly syntax: "jsx";
|
|
287
290
|
readonly source: "@cimplify/sdk/react";
|
|
@@ -304,7 +307,7 @@ declare const starterLintRuleSet: LintRuleSet & {
|
|
|
304
307
|
readonly value: "@cimplify/sdk";
|
|
305
308
|
readonly match: "prefix";
|
|
306
309
|
}];
|
|
307
|
-
readonly subjectNamePattern: "(?:^|_)(?:price|amount|subtotal|total|tax|fee|discount|cost)
|
|
310
|
+
readonly subjectNamePattern: "(?:^|_)(?:price|amount|subtotal|total|tax|fee|discount|cost)$";
|
|
308
311
|
readonly wrapper: {
|
|
309
312
|
readonly syntax: "call";
|
|
310
313
|
readonly imports: readonly [{
|
|
@@ -416,7 +419,7 @@ declare const starterLintRules: readonly LintRule[] & readonly [{
|
|
|
416
419
|
readonly value: "@cimplify/sdk";
|
|
417
420
|
readonly match: "prefix";
|
|
418
421
|
}];
|
|
419
|
-
readonly subjectNamePattern: "(?:^|_)(?:price|amount|subtotal|total|tax|fee|discount|cost)
|
|
422
|
+
readonly subjectNamePattern: "(?:^|_)(?:price|amount|subtotal|total|tax|fee|discount|cost)$";
|
|
420
423
|
readonly wrapper: {
|
|
421
424
|
readonly syntax: "jsx";
|
|
422
425
|
readonly source: "@cimplify/sdk/react";
|
|
@@ -439,7 +442,7 @@ declare const starterLintRules: readonly LintRule[] & readonly [{
|
|
|
439
442
|
readonly value: "@cimplify/sdk";
|
|
440
443
|
readonly match: "prefix";
|
|
441
444
|
}];
|
|
442
|
-
readonly subjectNamePattern: "(?:^|_)(?:price|amount|subtotal|total|tax|fee|discount|cost)
|
|
445
|
+
readonly subjectNamePattern: "(?:^|_)(?:price|amount|subtotal|total|tax|fee|discount|cost)$";
|
|
443
446
|
readonly wrapper: {
|
|
444
447
|
readonly syntax: "call";
|
|
445
448
|
readonly imports: readonly [{
|
package/dist/lint.js
CHANGED
|
@@ -395,7 +395,7 @@ function defineLintRuleSet(options) {
|
|
|
395
395
|
}
|
|
396
396
|
|
|
397
397
|
// src/lint/rules.ts
|
|
398
|
-
var MONEY_NAME_PATTERN = "(?:^|_)(?:price|amount|subtotal|total|tax|fee|discount|cost)
|
|
398
|
+
var MONEY_NAME_PATTERN = "(?:^|_)(?:price|amount|subtotal|total|tax|fee|discount|cost)$";
|
|
399
399
|
var SDK_CLIENT_FACTORIES = [
|
|
400
400
|
{ source: "@cimplify/sdk", imported: ["createCimplifyClient"] },
|
|
401
401
|
{ source: "@cimplify/sdk/server", imported: ["getServerClient"] }
|
package/dist/lint.mjs
CHANGED
|
@@ -393,7 +393,7 @@ function defineLintRuleSet(options) {
|
|
|
393
393
|
}
|
|
394
394
|
|
|
395
395
|
// src/lint/rules.ts
|
|
396
|
-
var MONEY_NAME_PATTERN = "(?:^|_)(?:price|amount|subtotal|total|tax|fee|discount|cost)
|
|
396
|
+
var MONEY_NAME_PATTERN = "(?:^|_)(?:price|amount|subtotal|total|tax|fee|discount|cost)$";
|
|
397
397
|
var SDK_CLIENT_FACTORIES = [
|
|
398
398
|
{ source: "@cimplify/sdk", imported: ["createCimplifyClient"] },
|
|
399
399
|
{ source: "@cimplify/sdk/server", imported: ["getServerClient"] }
|
package/dist/testing.d.mts
CHANGED
|
@@ -54,8 +54,8 @@ declare const CountryCodeSchema: z.ZodString;
|
|
|
54
54
|
declare const LocaleSchema: z.ZodString;
|
|
55
55
|
declare const PhoneE164Schema: z.ZodString;
|
|
56
56
|
declare const SeedNameSchema: z.ZodEnum<{
|
|
57
|
-
default: "default";
|
|
58
57
|
empty: "empty";
|
|
58
|
+
default: "default";
|
|
59
59
|
"reesa-storefront": "reesa-storefront";
|
|
60
60
|
restaurant: "restaurant";
|
|
61
61
|
retail: "retail";
|
|
@@ -71,11 +71,11 @@ declare const ProductTypeSchema: z.ZodEnum<{
|
|
|
71
71
|
composite: "composite";
|
|
72
72
|
}>;
|
|
73
73
|
declare const LineTypeSchema: z.ZodEnum<{
|
|
74
|
+
simple: "simple";
|
|
74
75
|
service: "service";
|
|
75
76
|
digital: "digital";
|
|
76
77
|
bundle: "bundle";
|
|
77
78
|
composite: "composite";
|
|
78
|
-
simple: "simple";
|
|
79
79
|
}>;
|
|
80
80
|
declare const ServiceStatusSchema: z.ZodEnum<{
|
|
81
81
|
pending: "pending";
|
|
@@ -365,8 +365,8 @@ declare const BrandSchema: z.ZodObject<{
|
|
|
365
365
|
}, z.core.$strip>;
|
|
366
366
|
mock: z.ZodObject<{
|
|
367
367
|
seed: z.ZodEnum<{
|
|
368
|
-
default: "default";
|
|
369
368
|
empty: "empty";
|
|
369
|
+
default: "default";
|
|
370
370
|
"reesa-storefront": "reesa-storefront";
|
|
371
371
|
restaurant: "restaurant";
|
|
372
372
|
retail: "retail";
|
|
@@ -531,7 +531,7 @@ declare const assertBrand: (value: unknown) => asserts value is {
|
|
|
531
531
|
summary: string;
|
|
532
532
|
};
|
|
533
533
|
mock: {
|
|
534
|
-
seed: "
|
|
534
|
+
seed: "empty" | "default" | "reesa-storefront" | "restaurant" | "retail" | "services" | "grocery" | "fashion";
|
|
535
535
|
businessId: string;
|
|
536
536
|
};
|
|
537
537
|
trustItems?: {
|
|
@@ -780,11 +780,11 @@ declare const CartItemSchema: z.ZodObject<{
|
|
|
780
780
|
quantity: z.ZodNumber;
|
|
781
781
|
line_key: z.ZodString;
|
|
782
782
|
line_type: z.ZodEnum<{
|
|
783
|
+
simple: "simple";
|
|
783
784
|
service: "service";
|
|
784
785
|
digital: "digital";
|
|
785
786
|
bundle: "bundle";
|
|
786
787
|
composite: "composite";
|
|
787
|
-
simple: "simple";
|
|
788
788
|
}>;
|
|
789
789
|
name: z.ZodString;
|
|
790
790
|
description: z.ZodOptional<z.ZodString>;
|
|
@@ -926,7 +926,7 @@ declare const assertCartItem: (value: unknown) => asserts value is {
|
|
|
926
926
|
item_id: string;
|
|
927
927
|
quantity: number;
|
|
928
928
|
line_key: string;
|
|
929
|
-
line_type: "
|
|
929
|
+
line_type: "simple" | "service" | "digital" | "bundle" | "composite";
|
|
930
930
|
name: string;
|
|
931
931
|
is_available: boolean;
|
|
932
932
|
base_price: string;
|
|
@@ -1079,11 +1079,11 @@ declare const CartSchema: z.ZodObject<{
|
|
|
1079
1079
|
quantity: z.ZodNumber;
|
|
1080
1080
|
line_key: z.ZodString;
|
|
1081
1081
|
line_type: z.ZodEnum<{
|
|
1082
|
+
simple: "simple";
|
|
1082
1083
|
service: "service";
|
|
1083
1084
|
digital: "digital";
|
|
1084
1085
|
bundle: "bundle";
|
|
1085
1086
|
composite: "composite";
|
|
1086
|
-
simple: "simple";
|
|
1087
1087
|
}>;
|
|
1088
1088
|
name: z.ZodString;
|
|
1089
1089
|
description: z.ZodOptional<z.ZodString>;
|
|
@@ -1256,7 +1256,7 @@ declare const assertCart: (value: unknown) => asserts value is {
|
|
|
1256
1256
|
item_id: string;
|
|
1257
1257
|
quantity: number;
|
|
1258
1258
|
line_key: string;
|
|
1259
|
-
line_type: "
|
|
1259
|
+
line_type: "simple" | "service" | "digital" | "bundle" | "composite";
|
|
1260
1260
|
name: string;
|
|
1261
1261
|
is_available: boolean;
|
|
1262
1262
|
base_price: string;
|
|
@@ -1475,10 +1475,10 @@ declare const assertCheckoutBody: (value: unknown) => asserts value is {
|
|
|
1475
1475
|
};
|
|
1476
1476
|
declare const AuthorizationTypeSchema: z.ZodEnum<{
|
|
1477
1477
|
phone: "phone";
|
|
1478
|
-
address: "address";
|
|
1479
1478
|
otp: "otp";
|
|
1480
1479
|
pin: "pin";
|
|
1481
1480
|
birthday: "birthday";
|
|
1481
|
+
address: "address";
|
|
1482
1482
|
}>;
|
|
1483
1483
|
declare const NextActionSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
1484
1484
|
type: z.ZodLiteral<"none">;
|
|
@@ -1498,10 +1498,10 @@ declare const CheckoutResponseSchema: z.ZodObject<{
|
|
|
1498
1498
|
requires_authorization: z.ZodBoolean;
|
|
1499
1499
|
authorization_type: z.ZodOptional<z.ZodEnum<{
|
|
1500
1500
|
phone: "phone";
|
|
1501
|
-
address: "address";
|
|
1502
1501
|
otp: "otp";
|
|
1503
1502
|
pin: "pin";
|
|
1504
1503
|
birthday: "birthday";
|
|
1504
|
+
address: "address";
|
|
1505
1505
|
}>>;
|
|
1506
1506
|
next_action: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
1507
1507
|
type: z.ZodLiteral<"none">;
|
|
@@ -1538,7 +1538,7 @@ declare const assertCheckoutResponse: (value: unknown) => asserts value is {
|
|
|
1538
1538
|
display_text?: string | undefined;
|
|
1539
1539
|
};
|
|
1540
1540
|
payment_reference?: string | undefined;
|
|
1541
|
-
authorization_type?: "phone" | "
|
|
1541
|
+
authorization_type?: "phone" | "otp" | "pin" | "birthday" | "address" | undefined;
|
|
1542
1542
|
provider?: string | undefined;
|
|
1543
1543
|
authorization_url?: string | undefined;
|
|
1544
1544
|
display_text?: string | undefined;
|
|
@@ -1737,8 +1737,8 @@ declare const PUBLIC_SCHEMAS: {
|
|
|
1737
1737
|
}, z.core.$strip>;
|
|
1738
1738
|
mock: z.ZodObject<{
|
|
1739
1739
|
seed: z.ZodEnum<{
|
|
1740
|
-
default: "default";
|
|
1741
1740
|
empty: "empty";
|
|
1741
|
+
default: "default";
|
|
1742
1742
|
"reesa-storefront": "reesa-storefront";
|
|
1743
1743
|
restaurant: "restaurant";
|
|
1744
1744
|
retail: "retail";
|
|
@@ -1798,11 +1798,11 @@ declare const PUBLIC_SCHEMAS: {
|
|
|
1798
1798
|
quantity: z.ZodNumber;
|
|
1799
1799
|
line_key: z.ZodString;
|
|
1800
1800
|
line_type: z.ZodEnum<{
|
|
1801
|
+
simple: "simple";
|
|
1801
1802
|
service: "service";
|
|
1802
1803
|
digital: "digital";
|
|
1803
1804
|
bundle: "bundle";
|
|
1804
1805
|
composite: "composite";
|
|
1805
|
-
simple: "simple";
|
|
1806
1806
|
}>;
|
|
1807
1807
|
name: z.ZodString;
|
|
1808
1808
|
description: z.ZodOptional<z.ZodString>;
|
|
@@ -1970,11 +1970,11 @@ declare const PUBLIC_SCHEMAS: {
|
|
|
1970
1970
|
quantity: z.ZodNumber;
|
|
1971
1971
|
line_key: z.ZodString;
|
|
1972
1972
|
line_type: z.ZodEnum<{
|
|
1973
|
+
simple: "simple";
|
|
1973
1974
|
service: "service";
|
|
1974
1975
|
digital: "digital";
|
|
1975
1976
|
bundle: "bundle";
|
|
1976
1977
|
composite: "composite";
|
|
1977
|
-
simple: "simple";
|
|
1978
1978
|
}>;
|
|
1979
1979
|
name: z.ZodString;
|
|
1980
1980
|
description: z.ZodOptional<z.ZodString>;
|
|
@@ -2152,10 +2152,10 @@ declare const PUBLIC_SCHEMAS: {
|
|
|
2152
2152
|
requires_authorization: z.ZodBoolean;
|
|
2153
2153
|
authorization_type: z.ZodOptional<z.ZodEnum<{
|
|
2154
2154
|
phone: "phone";
|
|
2155
|
-
address: "address";
|
|
2156
2155
|
otp: "otp";
|
|
2157
2156
|
pin: "pin";
|
|
2158
2157
|
birthday: "birthday";
|
|
2158
|
+
address: "address";
|
|
2159
2159
|
}>>;
|
|
2160
2160
|
next_action: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
2161
2161
|
type: z.ZodLiteral<"none">;
|
package/dist/testing.d.ts
CHANGED
|
@@ -54,8 +54,8 @@ declare const CountryCodeSchema: z.ZodString;
|
|
|
54
54
|
declare const LocaleSchema: z.ZodString;
|
|
55
55
|
declare const PhoneE164Schema: z.ZodString;
|
|
56
56
|
declare const SeedNameSchema: z.ZodEnum<{
|
|
57
|
-
default: "default";
|
|
58
57
|
empty: "empty";
|
|
58
|
+
default: "default";
|
|
59
59
|
"reesa-storefront": "reesa-storefront";
|
|
60
60
|
restaurant: "restaurant";
|
|
61
61
|
retail: "retail";
|
|
@@ -71,11 +71,11 @@ declare const ProductTypeSchema: z.ZodEnum<{
|
|
|
71
71
|
composite: "composite";
|
|
72
72
|
}>;
|
|
73
73
|
declare const LineTypeSchema: z.ZodEnum<{
|
|
74
|
+
simple: "simple";
|
|
74
75
|
service: "service";
|
|
75
76
|
digital: "digital";
|
|
76
77
|
bundle: "bundle";
|
|
77
78
|
composite: "composite";
|
|
78
|
-
simple: "simple";
|
|
79
79
|
}>;
|
|
80
80
|
declare const ServiceStatusSchema: z.ZodEnum<{
|
|
81
81
|
pending: "pending";
|
|
@@ -365,8 +365,8 @@ declare const BrandSchema: z.ZodObject<{
|
|
|
365
365
|
}, z.core.$strip>;
|
|
366
366
|
mock: z.ZodObject<{
|
|
367
367
|
seed: z.ZodEnum<{
|
|
368
|
-
default: "default";
|
|
369
368
|
empty: "empty";
|
|
369
|
+
default: "default";
|
|
370
370
|
"reesa-storefront": "reesa-storefront";
|
|
371
371
|
restaurant: "restaurant";
|
|
372
372
|
retail: "retail";
|
|
@@ -531,7 +531,7 @@ declare const assertBrand: (value: unknown) => asserts value is {
|
|
|
531
531
|
summary: string;
|
|
532
532
|
};
|
|
533
533
|
mock: {
|
|
534
|
-
seed: "
|
|
534
|
+
seed: "empty" | "default" | "reesa-storefront" | "restaurant" | "retail" | "services" | "grocery" | "fashion";
|
|
535
535
|
businessId: string;
|
|
536
536
|
};
|
|
537
537
|
trustItems?: {
|
|
@@ -780,11 +780,11 @@ declare const CartItemSchema: z.ZodObject<{
|
|
|
780
780
|
quantity: z.ZodNumber;
|
|
781
781
|
line_key: z.ZodString;
|
|
782
782
|
line_type: z.ZodEnum<{
|
|
783
|
+
simple: "simple";
|
|
783
784
|
service: "service";
|
|
784
785
|
digital: "digital";
|
|
785
786
|
bundle: "bundle";
|
|
786
787
|
composite: "composite";
|
|
787
|
-
simple: "simple";
|
|
788
788
|
}>;
|
|
789
789
|
name: z.ZodString;
|
|
790
790
|
description: z.ZodOptional<z.ZodString>;
|
|
@@ -926,7 +926,7 @@ declare const assertCartItem: (value: unknown) => asserts value is {
|
|
|
926
926
|
item_id: string;
|
|
927
927
|
quantity: number;
|
|
928
928
|
line_key: string;
|
|
929
|
-
line_type: "
|
|
929
|
+
line_type: "simple" | "service" | "digital" | "bundle" | "composite";
|
|
930
930
|
name: string;
|
|
931
931
|
is_available: boolean;
|
|
932
932
|
base_price: string;
|
|
@@ -1079,11 +1079,11 @@ declare const CartSchema: z.ZodObject<{
|
|
|
1079
1079
|
quantity: z.ZodNumber;
|
|
1080
1080
|
line_key: z.ZodString;
|
|
1081
1081
|
line_type: z.ZodEnum<{
|
|
1082
|
+
simple: "simple";
|
|
1082
1083
|
service: "service";
|
|
1083
1084
|
digital: "digital";
|
|
1084
1085
|
bundle: "bundle";
|
|
1085
1086
|
composite: "composite";
|
|
1086
|
-
simple: "simple";
|
|
1087
1087
|
}>;
|
|
1088
1088
|
name: z.ZodString;
|
|
1089
1089
|
description: z.ZodOptional<z.ZodString>;
|
|
@@ -1256,7 +1256,7 @@ declare const assertCart: (value: unknown) => asserts value is {
|
|
|
1256
1256
|
item_id: string;
|
|
1257
1257
|
quantity: number;
|
|
1258
1258
|
line_key: string;
|
|
1259
|
-
line_type: "
|
|
1259
|
+
line_type: "simple" | "service" | "digital" | "bundle" | "composite";
|
|
1260
1260
|
name: string;
|
|
1261
1261
|
is_available: boolean;
|
|
1262
1262
|
base_price: string;
|
|
@@ -1475,10 +1475,10 @@ declare const assertCheckoutBody: (value: unknown) => asserts value is {
|
|
|
1475
1475
|
};
|
|
1476
1476
|
declare const AuthorizationTypeSchema: z.ZodEnum<{
|
|
1477
1477
|
phone: "phone";
|
|
1478
|
-
address: "address";
|
|
1479
1478
|
otp: "otp";
|
|
1480
1479
|
pin: "pin";
|
|
1481
1480
|
birthday: "birthday";
|
|
1481
|
+
address: "address";
|
|
1482
1482
|
}>;
|
|
1483
1483
|
declare const NextActionSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
1484
1484
|
type: z.ZodLiteral<"none">;
|
|
@@ -1498,10 +1498,10 @@ declare const CheckoutResponseSchema: z.ZodObject<{
|
|
|
1498
1498
|
requires_authorization: z.ZodBoolean;
|
|
1499
1499
|
authorization_type: z.ZodOptional<z.ZodEnum<{
|
|
1500
1500
|
phone: "phone";
|
|
1501
|
-
address: "address";
|
|
1502
1501
|
otp: "otp";
|
|
1503
1502
|
pin: "pin";
|
|
1504
1503
|
birthday: "birthday";
|
|
1504
|
+
address: "address";
|
|
1505
1505
|
}>>;
|
|
1506
1506
|
next_action: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
1507
1507
|
type: z.ZodLiteral<"none">;
|
|
@@ -1538,7 +1538,7 @@ declare const assertCheckoutResponse: (value: unknown) => asserts value is {
|
|
|
1538
1538
|
display_text?: string | undefined;
|
|
1539
1539
|
};
|
|
1540
1540
|
payment_reference?: string | undefined;
|
|
1541
|
-
authorization_type?: "phone" | "
|
|
1541
|
+
authorization_type?: "phone" | "otp" | "pin" | "birthday" | "address" | undefined;
|
|
1542
1542
|
provider?: string | undefined;
|
|
1543
1543
|
authorization_url?: string | undefined;
|
|
1544
1544
|
display_text?: string | undefined;
|
|
@@ -1737,8 +1737,8 @@ declare const PUBLIC_SCHEMAS: {
|
|
|
1737
1737
|
}, z.core.$strip>;
|
|
1738
1738
|
mock: z.ZodObject<{
|
|
1739
1739
|
seed: z.ZodEnum<{
|
|
1740
|
-
default: "default";
|
|
1741
1740
|
empty: "empty";
|
|
1741
|
+
default: "default";
|
|
1742
1742
|
"reesa-storefront": "reesa-storefront";
|
|
1743
1743
|
restaurant: "restaurant";
|
|
1744
1744
|
retail: "retail";
|
|
@@ -1798,11 +1798,11 @@ declare const PUBLIC_SCHEMAS: {
|
|
|
1798
1798
|
quantity: z.ZodNumber;
|
|
1799
1799
|
line_key: z.ZodString;
|
|
1800
1800
|
line_type: z.ZodEnum<{
|
|
1801
|
+
simple: "simple";
|
|
1801
1802
|
service: "service";
|
|
1802
1803
|
digital: "digital";
|
|
1803
1804
|
bundle: "bundle";
|
|
1804
1805
|
composite: "composite";
|
|
1805
|
-
simple: "simple";
|
|
1806
1806
|
}>;
|
|
1807
1807
|
name: z.ZodString;
|
|
1808
1808
|
description: z.ZodOptional<z.ZodString>;
|
|
@@ -1970,11 +1970,11 @@ declare const PUBLIC_SCHEMAS: {
|
|
|
1970
1970
|
quantity: z.ZodNumber;
|
|
1971
1971
|
line_key: z.ZodString;
|
|
1972
1972
|
line_type: z.ZodEnum<{
|
|
1973
|
+
simple: "simple";
|
|
1973
1974
|
service: "service";
|
|
1974
1975
|
digital: "digital";
|
|
1975
1976
|
bundle: "bundle";
|
|
1976
1977
|
composite: "composite";
|
|
1977
|
-
simple: "simple";
|
|
1978
1978
|
}>;
|
|
1979
1979
|
name: z.ZodString;
|
|
1980
1980
|
description: z.ZodOptional<z.ZodString>;
|
|
@@ -2152,10 +2152,10 @@ declare const PUBLIC_SCHEMAS: {
|
|
|
2152
2152
|
requires_authorization: z.ZodBoolean;
|
|
2153
2153
|
authorization_type: z.ZodOptional<z.ZodEnum<{
|
|
2154
2154
|
phone: "phone";
|
|
2155
|
-
address: "address";
|
|
2156
2155
|
otp: "otp";
|
|
2157
2156
|
pin: "pin";
|
|
2158
2157
|
birthday: "birthday";
|
|
2158
|
+
address: "address";
|
|
2159
2159
|
}>>;
|
|
2160
2160
|
next_action: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
2161
2161
|
type: z.ZodLiteral<"none">;
|