@crevio/sdk 0.1.0 → 0.2.0
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 +8 -12
- package/RUNTIMES.md +6 -6
- package/dist/commonjs/funcs/accountsGet.js +1 -1
- package/dist/commonjs/funcs/accountsGet.js.map +1 -1
- package/dist/commonjs/funcs/checkoutsCreate.js +1 -1
- package/dist/commonjs/funcs/checkoutsCreate.js.map +1 -1
- package/dist/commonjs/funcs/productsGet.js +1 -1
- package/dist/commonjs/funcs/productsGet.js.map +1 -1
- package/dist/commonjs/funcs/productsList.js +2 -2
- package/dist/commonjs/funcs/productsList.js.map +1 -1
- package/dist/commonjs/funcs/userDelete.js +1 -1
- package/dist/commonjs/funcs/userDelete.js.map +1 -1
- package/dist/commonjs/funcs/userGet.js +1 -1
- package/dist/commonjs/funcs/userGet.js.map +1 -1
- package/dist/commonjs/hooks/hooks.d.ts.map +1 -1
- package/dist/commonjs/hooks/hooks.js +0 -2
- package/dist/commonjs/hooks/hooks.js.map +1 -1
- package/dist/commonjs/lib/base64.d.ts +1 -1
- package/dist/commonjs/lib/base64.d.ts.map +1 -1
- package/dist/commonjs/lib/base64.js +1 -1
- package/dist/commonjs/lib/base64.js.map +1 -1
- package/dist/commonjs/lib/config.d.ts +4 -4
- package/dist/commonjs/lib/config.d.ts.map +1 -1
- package/dist/commonjs/lib/config.js +5 -5
- package/dist/commonjs/lib/config.js.map +1 -1
- package/dist/commonjs/lib/encodings.d.ts +1 -0
- package/dist/commonjs/lib/encodings.d.ts.map +1 -1
- package/dist/commonjs/lib/encodings.js +12 -1
- package/dist/commonjs/lib/encodings.js.map +1 -1
- package/dist/commonjs/lib/env.d.ts +1 -1
- package/dist/commonjs/lib/env.d.ts.map +1 -1
- package/dist/commonjs/lib/env.js +19 -2
- package/dist/commonjs/lib/env.js.map +1 -1
- package/dist/commonjs/lib/schemas.d.ts +1 -1
- package/dist/commonjs/lib/schemas.d.ts.map +1 -1
- package/dist/commonjs/lib/schemas.js +2 -2
- package/dist/commonjs/lib/schemas.js.map +1 -1
- package/dist/commonjs/lib/security.d.ts.map +1 -1
- package/dist/commonjs/lib/security.js.map +1 -1
- package/dist/commonjs/lib/url.js +1 -1
- package/dist/commonjs/lib/url.js.map +1 -1
- package/dist/commonjs/models/account.d.ts +4 -29
- package/dist/commonjs/models/account.d.ts.map +1 -1
- package/dist/commonjs/models/account.js +2 -34
- package/dist/commonjs/models/account.js.map +1 -1
- package/dist/commonjs/models/accountslim.d.ts +1 -22
- package/dist/commonjs/models/accountslim.d.ts.map +1 -1
- package/dist/commonjs/models/accountslim.js +2 -23
- package/dist/commonjs/models/accountslim.js.map +1 -1
- package/dist/commonjs/models/checkoutrequest.d.ts +1 -48
- package/dist/commonjs/models/checkoutrequest.d.ts.map +1 -1
- package/dist/commonjs/models/checkoutrequest.js +2 -78
- package/dist/commonjs/models/checkoutrequest.js.map +1 -1
- package/dist/commonjs/models/checkoutresponse.d.ts +1 -21
- package/dist/commonjs/models/checkoutresponse.d.ts.map +1 -1
- package/dist/commonjs/models/checkoutresponse.js +2 -27
- package/dist/commonjs/models/checkoutresponse.js.map +1 -1
- package/dist/commonjs/models/errors/error.d.ts +1 -20
- package/dist/commonjs/models/errors/error.d.ts.map +1 -1
- package/dist/commonjs/models/errors/error.js +2 -20
- package/dist/commonjs/models/errors/error.js.map +1 -1
- package/dist/commonjs/models/errors/index.d.ts +1 -0
- package/dist/commonjs/models/errors/index.d.ts.map +1 -1
- package/dist/commonjs/models/errors/index.js +1 -0
- package/dist/commonjs/models/errors/index.js.map +1 -1
- package/dist/commonjs/models/errors/responsevalidationerror.js +1 -1
- package/dist/commonjs/models/errors/responsevalidationerror.js.map +1 -1
- package/dist/commonjs/models/errors/sdkvalidationerror.d.ts +1 -1
- package/dist/commonjs/models/errors/sdkvalidationerror.d.ts.map +1 -1
- package/dist/commonjs/models/errors/sdkvalidationerror.js +1 -1
- package/dist/commonjs/models/errors/sdkvalidationerror.js.map +1 -1
- package/dist/commonjs/models/fileattachment.d.ts +1 -24
- package/dist/commonjs/models/fileattachment.d.ts.map +1 -1
- package/dist/commonjs/models/fileattachment.js +2 -30
- package/dist/commonjs/models/fileattachment.js.map +1 -1
- package/dist/commonjs/models/imageattachment.d.ts +1 -24
- package/dist/commonjs/models/imageattachment.d.ts.map +1 -1
- package/dist/commonjs/models/imageattachment.js +2 -30
- package/dist/commonjs/models/imageattachment.js.map +1 -1
- package/dist/commonjs/models/linkinbiopage.d.ts +1 -22
- package/dist/commonjs/models/linkinbiopage.d.ts.map +1 -1
- package/dist/commonjs/models/linkinbiopage.js +2 -23
- package/dist/commonjs/models/linkinbiopage.js.map +1 -1
- package/dist/commonjs/models/operations/delete.d.ts +1 -18
- package/dist/commonjs/models/operations/delete.d.ts.map +1 -1
- package/dist/commonjs/models/operations/delete.js +2 -19
- package/dist/commonjs/models/operations/delete.js.map +1 -1
- package/dist/commonjs/models/operations/getaccount.d.ts +1 -18
- package/dist/commonjs/models/operations/getaccount.d.ts.map +1 -1
- package/dist/commonjs/models/operations/getaccount.js +2 -26
- package/dist/commonjs/models/operations/getaccount.js.map +1 -1
- package/dist/commonjs/models/operations/getproduct.d.ts +1 -18
- package/dist/commonjs/models/operations/getproduct.d.ts.map +1 -1
- package/dist/commonjs/models/operations/getproduct.js +2 -26
- package/dist/commonjs/models/operations/getproduct.js.map +1 -1
- package/dist/commonjs/models/pricevariant.d.ts +1 -27
- package/dist/commonjs/models/pricevariant.d.ts.map +1 -1
- package/dist/commonjs/models/pricevariant.js +2 -32
- package/dist/commonjs/models/pricevariant.js.map +1 -1
- package/dist/commonjs/models/product.d.ts +8 -62
- package/dist/commonjs/models/product.d.ts.map +1 -1
- package/dist/commonjs/models/product.js +3 -61
- package/dist/commonjs/models/product.js.map +1 -1
- package/dist/commonjs/models/review.d.ts +1 -23
- package/dist/commonjs/models/review.d.ts.map +1 -1
- package/dist/commonjs/models/review.js +2 -28
- package/dist/commonjs/models/review.js.map +1 -1
- package/dist/commonjs/models/security.d.ts +1 -18
- package/dist/commonjs/models/security.d.ts.map +1 -1
- package/dist/commonjs/models/security.js +2 -26
- package/dist/commonjs/models/security.js.map +1 -1
- package/dist/commonjs/models/seo.d.ts +1 -22
- package/dist/commonjs/models/seo.d.ts.map +1 -1
- package/dist/commonjs/models/seo.js +2 -24
- package/dist/commonjs/models/seo.js.map +1 -1
- package/dist/commonjs/models/sociallink.d.ts +1 -23
- package/dist/commonjs/models/sociallink.d.ts.map +1 -1
- package/dist/commonjs/models/sociallink.js +2 -24
- package/dist/commonjs/models/sociallink.js.map +1 -1
- package/dist/commonjs/models/user.d.ts +3 -39
- package/dist/commonjs/models/user.d.ts.map +1 -1
- package/dist/commonjs/models/user.js +2 -54
- package/dist/commonjs/models/user.js.map +1 -1
- package/dist/commonjs/types/blobs.d.ts +1 -1
- package/dist/commonjs/types/blobs.d.ts.map +1 -1
- package/dist/commonjs/types/blobs.js +1 -1
- package/dist/commonjs/types/blobs.js.map +1 -1
- package/dist/commonjs/types/constdatetime.d.ts +1 -1
- package/dist/commonjs/types/constdatetime.d.ts.map +1 -1
- package/dist/commonjs/types/constdatetime.js +1 -1
- package/dist/commonjs/types/constdatetime.js.map +1 -1
- package/dist/commonjs/types/enums.d.ts +8 -11
- package/dist/commonjs/types/enums.d.ts.map +1 -1
- package/dist/commonjs/types/enums.js +59 -3
- package/dist/commonjs/types/enums.js.map +1 -1
- package/dist/commonjs/types/index.d.ts +2 -2
- package/dist/commonjs/types/index.d.ts.map +1 -1
- package/dist/commonjs/types/index.js +16 -3
- package/dist/commonjs/types/index.js.map +1 -1
- package/dist/commonjs/types/unrecognized.d.ts +16 -0
- package/dist/commonjs/types/unrecognized.d.ts.map +1 -0
- package/dist/commonjs/types/unrecognized.js +34 -0
- package/dist/commonjs/types/unrecognized.js.map +1 -0
- package/dist/esm/funcs/accountsGet.js +1 -1
- package/dist/esm/funcs/accountsGet.js.map +1 -1
- package/dist/esm/funcs/checkoutsCreate.js +1 -1
- package/dist/esm/funcs/checkoutsCreate.js.map +1 -1
- package/dist/esm/funcs/productsGet.js +1 -1
- package/dist/esm/funcs/productsGet.js.map +1 -1
- package/dist/esm/funcs/productsList.js +2 -2
- package/dist/esm/funcs/productsList.js.map +1 -1
- package/dist/esm/funcs/userDelete.js +1 -1
- package/dist/esm/funcs/userDelete.js.map +1 -1
- package/dist/esm/funcs/userGet.js +1 -1
- package/dist/esm/funcs/userGet.js.map +1 -1
- package/dist/esm/hooks/hooks.d.ts.map +1 -1
- package/dist/esm/hooks/hooks.js +0 -2
- package/dist/esm/hooks/hooks.js.map +1 -1
- package/dist/esm/lib/base64.d.ts +1 -1
- package/dist/esm/lib/base64.d.ts.map +1 -1
- package/dist/esm/lib/base64.js +1 -1
- package/dist/esm/lib/base64.js.map +1 -1
- package/dist/esm/lib/config.d.ts +4 -4
- package/dist/esm/lib/config.d.ts.map +1 -1
- package/dist/esm/lib/config.js +5 -5
- package/dist/esm/lib/config.js.map +1 -1
- package/dist/esm/lib/encodings.d.ts +1 -0
- package/dist/esm/lib/encodings.d.ts.map +1 -1
- package/dist/esm/lib/encodings.js +12 -1
- package/dist/esm/lib/encodings.js.map +1 -1
- package/dist/esm/lib/env.d.ts +1 -1
- package/dist/esm/lib/env.d.ts.map +1 -1
- package/dist/esm/lib/env.js +19 -2
- package/dist/esm/lib/env.js.map +1 -1
- package/dist/esm/lib/schemas.d.ts +1 -1
- package/dist/esm/lib/schemas.d.ts.map +1 -1
- package/dist/esm/lib/schemas.js +1 -1
- package/dist/esm/lib/schemas.js.map +1 -1
- package/dist/esm/lib/security.d.ts.map +1 -1
- package/dist/esm/lib/security.js.map +1 -1
- package/dist/esm/lib/url.js +1 -1
- package/dist/esm/lib/url.js.map +1 -1
- package/dist/esm/models/account.d.ts +4 -29
- package/dist/esm/models/account.d.ts.map +1 -1
- package/dist/esm/models/account.js +4 -35
- package/dist/esm/models/account.js.map +1 -1
- package/dist/esm/models/accountslim.d.ts +1 -22
- package/dist/esm/models/accountslim.d.ts.map +1 -1
- package/dist/esm/models/accountslim.js +1 -21
- package/dist/esm/models/accountslim.js.map +1 -1
- package/dist/esm/models/checkoutrequest.d.ts +1 -48
- package/dist/esm/models/checkoutrequest.d.ts.map +1 -1
- package/dist/esm/models/checkoutrequest.js +1 -74
- package/dist/esm/models/checkoutrequest.js.map +1 -1
- package/dist/esm/models/checkoutresponse.d.ts +1 -21
- package/dist/esm/models/checkoutresponse.d.ts.map +1 -1
- package/dist/esm/models/checkoutresponse.js +1 -25
- package/dist/esm/models/checkoutresponse.js.map +1 -1
- package/dist/esm/models/errors/error.d.ts +1 -20
- package/dist/esm/models/errors/error.d.ts.map +1 -1
- package/dist/esm/models/errors/error.js +1 -19
- package/dist/esm/models/errors/error.js.map +1 -1
- package/dist/esm/models/errors/index.d.ts +1 -0
- package/dist/esm/models/errors/index.d.ts.map +1 -1
- package/dist/esm/models/errors/index.js +1 -0
- package/dist/esm/models/errors/index.js.map +1 -1
- package/dist/esm/models/errors/responsevalidationerror.js +1 -1
- package/dist/esm/models/errors/responsevalidationerror.js.map +1 -1
- package/dist/esm/models/errors/sdkvalidationerror.d.ts +1 -1
- package/dist/esm/models/errors/sdkvalidationerror.d.ts.map +1 -1
- package/dist/esm/models/errors/sdkvalidationerror.js +1 -1
- package/dist/esm/models/errors/sdkvalidationerror.js.map +1 -1
- package/dist/esm/models/fileattachment.d.ts +1 -24
- package/dist/esm/models/fileattachment.d.ts.map +1 -1
- package/dist/esm/models/fileattachment.js +1 -28
- package/dist/esm/models/fileattachment.js.map +1 -1
- package/dist/esm/models/imageattachment.d.ts +1 -24
- package/dist/esm/models/imageattachment.d.ts.map +1 -1
- package/dist/esm/models/imageattachment.js +1 -28
- package/dist/esm/models/imageattachment.js.map +1 -1
- package/dist/esm/models/linkinbiopage.d.ts +1 -22
- package/dist/esm/models/linkinbiopage.d.ts.map +1 -1
- package/dist/esm/models/linkinbiopage.js +1 -21
- package/dist/esm/models/linkinbiopage.js.map +1 -1
- package/dist/esm/models/operations/delete.d.ts +1 -18
- package/dist/esm/models/operations/delete.d.ts.map +1 -1
- package/dist/esm/models/operations/delete.js +1 -17
- package/dist/esm/models/operations/delete.js.map +1 -1
- package/dist/esm/models/operations/getaccount.d.ts +1 -18
- package/dist/esm/models/operations/getaccount.d.ts.map +1 -1
- package/dist/esm/models/operations/getaccount.js +1 -24
- package/dist/esm/models/operations/getaccount.js.map +1 -1
- package/dist/esm/models/operations/getproduct.d.ts +1 -18
- package/dist/esm/models/operations/getproduct.d.ts.map +1 -1
- package/dist/esm/models/operations/getproduct.js +1 -24
- package/dist/esm/models/operations/getproduct.js.map +1 -1
- package/dist/esm/models/pricevariant.d.ts +1 -27
- package/dist/esm/models/pricevariant.d.ts.map +1 -1
- package/dist/esm/models/pricevariant.js +1 -30
- package/dist/esm/models/pricevariant.js.map +1 -1
- package/dist/esm/models/product.d.ts +8 -62
- package/dist/esm/models/product.d.ts.map +1 -1
- package/dist/esm/models/product.js +8 -65
- package/dist/esm/models/product.js.map +1 -1
- package/dist/esm/models/review.d.ts +1 -23
- package/dist/esm/models/review.d.ts.map +1 -1
- package/dist/esm/models/review.js +1 -26
- package/dist/esm/models/review.js.map +1 -1
- package/dist/esm/models/security.d.ts +1 -18
- package/dist/esm/models/security.d.ts.map +1 -1
- package/dist/esm/models/security.js +1 -24
- package/dist/esm/models/security.js.map +1 -1
- package/dist/esm/models/seo.d.ts +1 -22
- package/dist/esm/models/seo.d.ts.map +1 -1
- package/dist/esm/models/seo.js +1 -22
- package/dist/esm/models/seo.js.map +1 -1
- package/dist/esm/models/sociallink.d.ts +1 -23
- package/dist/esm/models/sociallink.d.ts.map +1 -1
- package/dist/esm/models/sociallink.js +1 -22
- package/dist/esm/models/sociallink.js.map +1 -1
- package/dist/esm/models/user.d.ts +3 -39
- package/dist/esm/models/user.d.ts.map +1 -1
- package/dist/esm/models/user.js +3 -54
- package/dist/esm/models/user.js.map +1 -1
- package/dist/esm/types/blobs.d.ts +1 -1
- package/dist/esm/types/blobs.d.ts.map +1 -1
- package/dist/esm/types/blobs.js +1 -1
- package/dist/esm/types/blobs.js.map +1 -1
- package/dist/esm/types/constdatetime.d.ts +1 -1
- package/dist/esm/types/constdatetime.d.ts.map +1 -1
- package/dist/esm/types/constdatetime.js +1 -1
- package/dist/esm/types/constdatetime.js.map +1 -1
- package/dist/esm/types/enums.d.ts +8 -11
- package/dist/esm/types/enums.d.ts.map +1 -1
- package/dist/esm/types/enums.js +22 -2
- package/dist/esm/types/enums.js.map +1 -1
- package/dist/esm/types/index.d.ts +2 -2
- package/dist/esm/types/index.d.ts.map +1 -1
- package/dist/esm/types/index.js +1 -1
- package/dist/esm/types/index.js.map +1 -1
- package/dist/esm/types/unrecognized.d.ts +16 -0
- package/dist/esm/types/unrecognized.d.ts.map +1 -0
- package/dist/esm/types/unrecognized.js +31 -0
- package/dist/esm/types/unrecognized.js.map +1 -0
- package/examples/package-lock.json +4 -4
- package/examples/userGet.example.ts +2 -2
- package/jsr.json +1 -1
- package/package.json +4 -4
- package/src/funcs/accountsGet.ts +1 -1
- package/src/funcs/checkoutsCreate.ts +1 -1
- package/src/funcs/productsGet.ts +1 -1
- package/src/funcs/productsList.ts +2 -2
- package/src/funcs/userDelete.ts +1 -1
- package/src/funcs/userGet.ts +1 -1
- package/src/hooks/hooks.ts +0 -3
- package/src/lib/base64.ts +1 -1
- package/src/lib/config.ts +5 -5
- package/src/lib/encodings.ts +17 -3
- package/src/lib/env.ts +21 -5
- package/src/lib/schemas.ts +1 -1
- package/src/lib/security.ts +4 -1
- package/src/lib/url.ts +1 -1
- package/src/models/account.ts +3 -65
- package/src/models/accountslim.ts +1 -36
- package/src/models/checkoutrequest.ts +1 -120
- package/src/models/checkoutresponse.ts +1 -43
- package/src/models/errors/error.ts +1 -32
- package/src/models/errors/index.ts +1 -0
- package/src/models/errors/responsevalidationerror.ts +1 -1
- package/src/models/errors/sdkvalidationerror.ts +1 -1
- package/src/models/fileattachment.ts +1 -45
- package/src/models/imageattachment.ts +1 -47
- package/src/models/linkinbiopage.ts +1 -36
- package/src/models/operations/delete.ts +1 -28
- package/src/models/operations/getaccount.ts +1 -40
- package/src/models/operations/getproduct.ts +1 -40
- package/src/models/pricevariant.ts +1 -50
- package/src/models/product.ts +6 -117
- package/src/models/review.ts +1 -42
- package/src/models/security.ts +1 -40
- package/src/models/seo.ts +1 -33
- package/src/models/sociallink.ts +1 -38
- package/src/models/user.ts +2 -87
- package/src/types/blobs.ts +7 -6
- package/src/types/constdatetime.ts +1 -1
- package/src/types/enums.ts +38 -9
- package/src/types/index.ts +2 -2
- package/src/types/unrecognized.ts +35 -0
- package/tsconfig.json +0 -1
- package/.devcontainer/README.md +0 -30
- package/docs/sdks/accounts/README.md +0 -84
- package/docs/sdks/checkouts/README.md +0 -96
- package/docs/sdks/crevio/README.md +0 -7
- package/docs/sdks/products/README.md +0 -154
- package/docs/sdks/user/README.md +0 -149
- package/examples/README.md +0 -31
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
3
|
*/
|
|
4
4
|
|
|
5
|
-
import * as z from "zod";
|
|
5
|
+
import * as z from "zod/v3";
|
|
6
6
|
import { remap as remap$ } from "../lib/primitives.js";
|
|
7
7
|
import { safeParse } from "../lib/schemas.js";
|
|
8
8
|
import { Result as SafeParseResult } from "../types/fp.js";
|
|
@@ -34,52 +34,6 @@ export const ImageAttachment$inboundSchema: z.ZodType<
|
|
|
34
34
|
});
|
|
35
35
|
});
|
|
36
36
|
|
|
37
|
-
/** @internal */
|
|
38
|
-
export type ImageAttachment$Outbound = {
|
|
39
|
-
id?: number | undefined;
|
|
40
|
-
filename?: string | undefined;
|
|
41
|
-
content_type?: string | undefined;
|
|
42
|
-
byte_size?: number | undefined;
|
|
43
|
-
url?: string | undefined;
|
|
44
|
-
};
|
|
45
|
-
|
|
46
|
-
/** @internal */
|
|
47
|
-
export const ImageAttachment$outboundSchema: z.ZodType<
|
|
48
|
-
ImageAttachment$Outbound,
|
|
49
|
-
z.ZodTypeDef,
|
|
50
|
-
ImageAttachment
|
|
51
|
-
> = z.object({
|
|
52
|
-
id: z.number().int().optional(),
|
|
53
|
-
filename: z.string().optional(),
|
|
54
|
-
contentType: z.string().optional(),
|
|
55
|
-
byteSize: z.number().int().optional(),
|
|
56
|
-
url: z.string().optional(),
|
|
57
|
-
}).transform((v) => {
|
|
58
|
-
return remap$(v, {
|
|
59
|
-
contentType: "content_type",
|
|
60
|
-
byteSize: "byte_size",
|
|
61
|
-
});
|
|
62
|
-
});
|
|
63
|
-
|
|
64
|
-
/**
|
|
65
|
-
* @internal
|
|
66
|
-
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
67
|
-
*/
|
|
68
|
-
export namespace ImageAttachment$ {
|
|
69
|
-
/** @deprecated use `ImageAttachment$inboundSchema` instead. */
|
|
70
|
-
export const inboundSchema = ImageAttachment$inboundSchema;
|
|
71
|
-
/** @deprecated use `ImageAttachment$outboundSchema` instead. */
|
|
72
|
-
export const outboundSchema = ImageAttachment$outboundSchema;
|
|
73
|
-
/** @deprecated use `ImageAttachment$Outbound` instead. */
|
|
74
|
-
export type Outbound = ImageAttachment$Outbound;
|
|
75
|
-
}
|
|
76
|
-
|
|
77
|
-
export function imageAttachmentToJSON(
|
|
78
|
-
imageAttachment: ImageAttachment,
|
|
79
|
-
): string {
|
|
80
|
-
return JSON.stringify(ImageAttachment$outboundSchema.parse(imageAttachment));
|
|
81
|
-
}
|
|
82
|
-
|
|
83
37
|
export function imageAttachmentFromJSON(
|
|
84
38
|
jsonString: string,
|
|
85
39
|
): SafeParseResult<ImageAttachment, SDKValidationError> {
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
3
|
*/
|
|
4
4
|
|
|
5
|
-
import * as z from "zod";
|
|
5
|
+
import * as z from "zod/v3";
|
|
6
6
|
import { safeParse } from "../lib/schemas.js";
|
|
7
7
|
import { Result as SafeParseResult } from "../types/fp.js";
|
|
8
8
|
import { SDKValidationError } from "./errors/sdkvalidationerror.js";
|
|
@@ -24,41 +24,6 @@ export const LinkInBioPage$inboundSchema: z.ZodType<
|
|
|
24
24
|
description: z.string().optional(),
|
|
25
25
|
});
|
|
26
26
|
|
|
27
|
-
/** @internal */
|
|
28
|
-
export type LinkInBioPage$Outbound = {
|
|
29
|
-
id?: number | undefined;
|
|
30
|
-
title?: string | undefined;
|
|
31
|
-
description?: string | undefined;
|
|
32
|
-
};
|
|
33
|
-
|
|
34
|
-
/** @internal */
|
|
35
|
-
export const LinkInBioPage$outboundSchema: z.ZodType<
|
|
36
|
-
LinkInBioPage$Outbound,
|
|
37
|
-
z.ZodTypeDef,
|
|
38
|
-
LinkInBioPage
|
|
39
|
-
> = z.object({
|
|
40
|
-
id: z.number().int().optional(),
|
|
41
|
-
title: z.string().optional(),
|
|
42
|
-
description: z.string().optional(),
|
|
43
|
-
});
|
|
44
|
-
|
|
45
|
-
/**
|
|
46
|
-
* @internal
|
|
47
|
-
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
48
|
-
*/
|
|
49
|
-
export namespace LinkInBioPage$ {
|
|
50
|
-
/** @deprecated use `LinkInBioPage$inboundSchema` instead. */
|
|
51
|
-
export const inboundSchema = LinkInBioPage$inboundSchema;
|
|
52
|
-
/** @deprecated use `LinkInBioPage$outboundSchema` instead. */
|
|
53
|
-
export const outboundSchema = LinkInBioPage$outboundSchema;
|
|
54
|
-
/** @deprecated use `LinkInBioPage$Outbound` instead. */
|
|
55
|
-
export type Outbound = LinkInBioPage$Outbound;
|
|
56
|
-
}
|
|
57
|
-
|
|
58
|
-
export function linkInBioPageToJSON(linkInBioPage: LinkInBioPage): string {
|
|
59
|
-
return JSON.stringify(LinkInBioPage$outboundSchema.parse(linkInBioPage));
|
|
60
|
-
}
|
|
61
|
-
|
|
62
27
|
export function linkInBioPageFromJSON(
|
|
63
28
|
jsonString: string,
|
|
64
29
|
): SafeParseResult<LinkInBioPage, SDKValidationError> {
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
3
|
*/
|
|
4
4
|
|
|
5
|
-
import * as z from "zod";
|
|
5
|
+
import * as z from "zod/v3";
|
|
6
6
|
import { safeParse } from "../../lib/schemas.js";
|
|
7
7
|
import { Result as SafeParseResult } from "../../types/fp.js";
|
|
8
8
|
import { SDKValidationError } from "../errors/sdkvalidationerror.js";
|
|
@@ -19,33 +19,6 @@ export const DeleteResponse$inboundSchema: z.ZodType<
|
|
|
19
19
|
unknown
|
|
20
20
|
> = z.object({});
|
|
21
21
|
|
|
22
|
-
/** @internal */
|
|
23
|
-
export type DeleteResponse$Outbound = {};
|
|
24
|
-
|
|
25
|
-
/** @internal */
|
|
26
|
-
export const DeleteResponse$outboundSchema: z.ZodType<
|
|
27
|
-
DeleteResponse$Outbound,
|
|
28
|
-
z.ZodTypeDef,
|
|
29
|
-
DeleteResponse
|
|
30
|
-
> = z.object({});
|
|
31
|
-
|
|
32
|
-
/**
|
|
33
|
-
* @internal
|
|
34
|
-
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
35
|
-
*/
|
|
36
|
-
export namespace DeleteResponse$ {
|
|
37
|
-
/** @deprecated use `DeleteResponse$inboundSchema` instead. */
|
|
38
|
-
export const inboundSchema = DeleteResponse$inboundSchema;
|
|
39
|
-
/** @deprecated use `DeleteResponse$outboundSchema` instead. */
|
|
40
|
-
export const outboundSchema = DeleteResponse$outboundSchema;
|
|
41
|
-
/** @deprecated use `DeleteResponse$Outbound` instead. */
|
|
42
|
-
export type Outbound = DeleteResponse$Outbound;
|
|
43
|
-
}
|
|
44
|
-
|
|
45
|
-
export function deleteResponseToJSON(deleteResponse: DeleteResponse): string {
|
|
46
|
-
return JSON.stringify(DeleteResponse$outboundSchema.parse(deleteResponse));
|
|
47
|
-
}
|
|
48
|
-
|
|
49
22
|
export function deleteResponseFromJSON(
|
|
50
23
|
jsonString: string,
|
|
51
24
|
): SafeParseResult<DeleteResponse, SDKValidationError> {
|
|
@@ -2,11 +2,8 @@
|
|
|
2
2
|
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
3
|
*/
|
|
4
4
|
|
|
5
|
-
import * as z from "zod";
|
|
5
|
+
import * as z from "zod/v3";
|
|
6
6
|
import { remap as remap$ } from "../../lib/primitives.js";
|
|
7
|
-
import { safeParse } from "../../lib/schemas.js";
|
|
8
|
-
import { Result as SafeParseResult } from "../../types/fp.js";
|
|
9
|
-
import { SDKValidationError } from "../errors/sdkvalidationerror.js";
|
|
10
7
|
|
|
11
8
|
export type GetAccountRequest = {
|
|
12
9
|
/**
|
|
@@ -15,19 +12,6 @@ export type GetAccountRequest = {
|
|
|
15
12
|
prefixId: string;
|
|
16
13
|
};
|
|
17
14
|
|
|
18
|
-
/** @internal */
|
|
19
|
-
export const GetAccountRequest$inboundSchema: z.ZodType<
|
|
20
|
-
GetAccountRequest,
|
|
21
|
-
z.ZodTypeDef,
|
|
22
|
-
unknown
|
|
23
|
-
> = z.object({
|
|
24
|
-
prefix_id: z.string(),
|
|
25
|
-
}).transform((v) => {
|
|
26
|
-
return remap$(v, {
|
|
27
|
-
"prefix_id": "prefixId",
|
|
28
|
-
});
|
|
29
|
-
});
|
|
30
|
-
|
|
31
15
|
/** @internal */
|
|
32
16
|
export type GetAccountRequest$Outbound = {
|
|
33
17
|
prefix_id: string;
|
|
@@ -46,19 +30,6 @@ export const GetAccountRequest$outboundSchema: z.ZodType<
|
|
|
46
30
|
});
|
|
47
31
|
});
|
|
48
32
|
|
|
49
|
-
/**
|
|
50
|
-
* @internal
|
|
51
|
-
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
52
|
-
*/
|
|
53
|
-
export namespace GetAccountRequest$ {
|
|
54
|
-
/** @deprecated use `GetAccountRequest$inboundSchema` instead. */
|
|
55
|
-
export const inboundSchema = GetAccountRequest$inboundSchema;
|
|
56
|
-
/** @deprecated use `GetAccountRequest$outboundSchema` instead. */
|
|
57
|
-
export const outboundSchema = GetAccountRequest$outboundSchema;
|
|
58
|
-
/** @deprecated use `GetAccountRequest$Outbound` instead. */
|
|
59
|
-
export type Outbound = GetAccountRequest$Outbound;
|
|
60
|
-
}
|
|
61
|
-
|
|
62
33
|
export function getAccountRequestToJSON(
|
|
63
34
|
getAccountRequest: GetAccountRequest,
|
|
64
35
|
): string {
|
|
@@ -66,13 +37,3 @@ export function getAccountRequestToJSON(
|
|
|
66
37
|
GetAccountRequest$outboundSchema.parse(getAccountRequest),
|
|
67
38
|
);
|
|
68
39
|
}
|
|
69
|
-
|
|
70
|
-
export function getAccountRequestFromJSON(
|
|
71
|
-
jsonString: string,
|
|
72
|
-
): SafeParseResult<GetAccountRequest, SDKValidationError> {
|
|
73
|
-
return safeParse(
|
|
74
|
-
jsonString,
|
|
75
|
-
(x) => GetAccountRequest$inboundSchema.parse(JSON.parse(x)),
|
|
76
|
-
`Failed to parse 'GetAccountRequest' from JSON`,
|
|
77
|
-
);
|
|
78
|
-
}
|
|
@@ -2,11 +2,8 @@
|
|
|
2
2
|
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
3
|
*/
|
|
4
4
|
|
|
5
|
-
import * as z from "zod";
|
|
5
|
+
import * as z from "zod/v3";
|
|
6
6
|
import { remap as remap$ } from "../../lib/primitives.js";
|
|
7
|
-
import { safeParse } from "../../lib/schemas.js";
|
|
8
|
-
import { Result as SafeParseResult } from "../../types/fp.js";
|
|
9
|
-
import { SDKValidationError } from "../errors/sdkvalidationerror.js";
|
|
10
7
|
|
|
11
8
|
export type GetProductRequest = {
|
|
12
9
|
/**
|
|
@@ -15,19 +12,6 @@ export type GetProductRequest = {
|
|
|
15
12
|
prefixId: string;
|
|
16
13
|
};
|
|
17
14
|
|
|
18
|
-
/** @internal */
|
|
19
|
-
export const GetProductRequest$inboundSchema: z.ZodType<
|
|
20
|
-
GetProductRequest,
|
|
21
|
-
z.ZodTypeDef,
|
|
22
|
-
unknown
|
|
23
|
-
> = z.object({
|
|
24
|
-
prefix_id: z.string(),
|
|
25
|
-
}).transform((v) => {
|
|
26
|
-
return remap$(v, {
|
|
27
|
-
"prefix_id": "prefixId",
|
|
28
|
-
});
|
|
29
|
-
});
|
|
30
|
-
|
|
31
15
|
/** @internal */
|
|
32
16
|
export type GetProductRequest$Outbound = {
|
|
33
17
|
prefix_id: string;
|
|
@@ -46,19 +30,6 @@ export const GetProductRequest$outboundSchema: z.ZodType<
|
|
|
46
30
|
});
|
|
47
31
|
});
|
|
48
32
|
|
|
49
|
-
/**
|
|
50
|
-
* @internal
|
|
51
|
-
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
52
|
-
*/
|
|
53
|
-
export namespace GetProductRequest$ {
|
|
54
|
-
/** @deprecated use `GetProductRequest$inboundSchema` instead. */
|
|
55
|
-
export const inboundSchema = GetProductRequest$inboundSchema;
|
|
56
|
-
/** @deprecated use `GetProductRequest$outboundSchema` instead. */
|
|
57
|
-
export const outboundSchema = GetProductRequest$outboundSchema;
|
|
58
|
-
/** @deprecated use `GetProductRequest$Outbound` instead. */
|
|
59
|
-
export type Outbound = GetProductRequest$Outbound;
|
|
60
|
-
}
|
|
61
|
-
|
|
62
33
|
export function getProductRequestToJSON(
|
|
63
34
|
getProductRequest: GetProductRequest,
|
|
64
35
|
): string {
|
|
@@ -66,13 +37,3 @@ export function getProductRequestToJSON(
|
|
|
66
37
|
GetProductRequest$outboundSchema.parse(getProductRequest),
|
|
67
38
|
);
|
|
68
39
|
}
|
|
69
|
-
|
|
70
|
-
export function getProductRequestFromJSON(
|
|
71
|
-
jsonString: string,
|
|
72
|
-
): SafeParseResult<GetProductRequest, SDKValidationError> {
|
|
73
|
-
return safeParse(
|
|
74
|
-
jsonString,
|
|
75
|
-
(x) => GetProductRequest$inboundSchema.parse(JSON.parse(x)),
|
|
76
|
-
`Failed to parse 'GetProductRequest' from JSON`,
|
|
77
|
-
);
|
|
78
|
-
}
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
3
|
*/
|
|
4
4
|
|
|
5
|
-
import * as z from "zod";
|
|
5
|
+
import * as z from "zod/v3";
|
|
6
6
|
import { remap as remap$ } from "../lib/primitives.js";
|
|
7
7
|
import { safeParse } from "../lib/schemas.js";
|
|
8
8
|
import { Result as SafeParseResult } from "../types/fp.js";
|
|
@@ -42,55 +42,6 @@ export const PriceVariant$inboundSchema: z.ZodType<
|
|
|
42
42
|
});
|
|
43
43
|
});
|
|
44
44
|
|
|
45
|
-
/** @internal */
|
|
46
|
-
export type PriceVariant$Outbound = {
|
|
47
|
-
id?: number | undefined;
|
|
48
|
-
name?: string | undefined;
|
|
49
|
-
amount?: number | undefined;
|
|
50
|
-
currency?: string | undefined;
|
|
51
|
-
trial_period_days?: number | null | undefined;
|
|
52
|
-
hidden?: boolean | undefined;
|
|
53
|
-
archived?: boolean | undefined;
|
|
54
|
-
position?: number | undefined;
|
|
55
|
-
};
|
|
56
|
-
|
|
57
|
-
/** @internal */
|
|
58
|
-
export const PriceVariant$outboundSchema: z.ZodType<
|
|
59
|
-
PriceVariant$Outbound,
|
|
60
|
-
z.ZodTypeDef,
|
|
61
|
-
PriceVariant
|
|
62
|
-
> = z.object({
|
|
63
|
-
id: z.number().int().optional(),
|
|
64
|
-
name: z.string().optional(),
|
|
65
|
-
amount: z.number().int().optional(),
|
|
66
|
-
currency: z.string().optional(),
|
|
67
|
-
trialPeriodDays: z.nullable(z.number().int()).optional(),
|
|
68
|
-
hidden: z.boolean().optional(),
|
|
69
|
-
archived: z.boolean().optional(),
|
|
70
|
-
position: z.number().int().optional(),
|
|
71
|
-
}).transform((v) => {
|
|
72
|
-
return remap$(v, {
|
|
73
|
-
trialPeriodDays: "trial_period_days",
|
|
74
|
-
});
|
|
75
|
-
});
|
|
76
|
-
|
|
77
|
-
/**
|
|
78
|
-
* @internal
|
|
79
|
-
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
80
|
-
*/
|
|
81
|
-
export namespace PriceVariant$ {
|
|
82
|
-
/** @deprecated use `PriceVariant$inboundSchema` instead. */
|
|
83
|
-
export const inboundSchema = PriceVariant$inboundSchema;
|
|
84
|
-
/** @deprecated use `PriceVariant$outboundSchema` instead. */
|
|
85
|
-
export const outboundSchema = PriceVariant$outboundSchema;
|
|
86
|
-
/** @deprecated use `PriceVariant$Outbound` instead. */
|
|
87
|
-
export type Outbound = PriceVariant$Outbound;
|
|
88
|
-
}
|
|
89
|
-
|
|
90
|
-
export function priceVariantToJSON(priceVariant: PriceVariant): string {
|
|
91
|
-
return JSON.stringify(PriceVariant$outboundSchema.parse(priceVariant));
|
|
92
|
-
}
|
|
93
|
-
|
|
94
45
|
export function priceVariantFromJSON(
|
|
95
46
|
jsonString: string,
|
|
96
47
|
): SafeParseResult<PriceVariant, SDKValidationError> {
|
package/src/models/product.ts
CHANGED
|
@@ -2,52 +2,28 @@
|
|
|
2
2
|
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
3
|
*/
|
|
4
4
|
|
|
5
|
-
import * as z from "zod";
|
|
5
|
+
import * as z from "zod/v3";
|
|
6
6
|
import { remap as remap$ } from "../lib/primitives.js";
|
|
7
7
|
import { safeParse } from "../lib/schemas.js";
|
|
8
8
|
import { ClosedEnum } from "../types/enums.js";
|
|
9
9
|
import { Result as SafeParseResult } from "../types/fp.js";
|
|
10
|
-
import {
|
|
11
|
-
AccountSlim,
|
|
12
|
-
AccountSlim$inboundSchema,
|
|
13
|
-
AccountSlim$Outbound,
|
|
14
|
-
AccountSlim$outboundSchema,
|
|
15
|
-
} from "./accountslim.js";
|
|
10
|
+
import { AccountSlim, AccountSlim$inboundSchema } from "./accountslim.js";
|
|
16
11
|
import { SDKValidationError } from "./errors/sdkvalidationerror.js";
|
|
17
12
|
import {
|
|
18
13
|
FileAttachment,
|
|
19
14
|
FileAttachment$inboundSchema,
|
|
20
|
-
FileAttachment$Outbound,
|
|
21
|
-
FileAttachment$outboundSchema,
|
|
22
15
|
} from "./fileattachment.js";
|
|
23
16
|
import {
|
|
24
17
|
ImageAttachment,
|
|
25
18
|
ImageAttachment$inboundSchema,
|
|
26
|
-
ImageAttachment$Outbound,
|
|
27
|
-
ImageAttachment$outboundSchema,
|
|
28
19
|
} from "./imageattachment.js";
|
|
29
|
-
import {
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
PriceVariant$Outbound,
|
|
33
|
-
PriceVariant$outboundSchema,
|
|
34
|
-
} from "./pricevariant.js";
|
|
35
|
-
import {
|
|
36
|
-
Review,
|
|
37
|
-
Review$inboundSchema,
|
|
38
|
-
Review$Outbound,
|
|
39
|
-
Review$outboundSchema,
|
|
40
|
-
} from "./review.js";
|
|
41
|
-
import {
|
|
42
|
-
Seo,
|
|
43
|
-
Seo$inboundSchema,
|
|
44
|
-
Seo$Outbound,
|
|
45
|
-
Seo$outboundSchema,
|
|
46
|
-
} from "./seo.js";
|
|
20
|
+
import { PriceVariant, PriceVariant$inboundSchema } from "./pricevariant.js";
|
|
21
|
+
import { Review, Review$inboundSchema } from "./review.js";
|
|
22
|
+
import { Seo, Seo$inboundSchema } from "./seo.js";
|
|
47
23
|
|
|
48
24
|
export const Status = {
|
|
49
25
|
Draft: "draft",
|
|
50
|
-
|
|
26
|
+
Active: "active",
|
|
51
27
|
Archived: "archived",
|
|
52
28
|
} as const;
|
|
53
29
|
export type Status = ClosedEnum<typeof Status>;
|
|
@@ -75,21 +51,6 @@ export type Product = {
|
|
|
75
51
|
export const Status$inboundSchema: z.ZodNativeEnum<typeof Status> = z
|
|
76
52
|
.nativeEnum(Status);
|
|
77
53
|
|
|
78
|
-
/** @internal */
|
|
79
|
-
export const Status$outboundSchema: z.ZodNativeEnum<typeof Status> =
|
|
80
|
-
Status$inboundSchema;
|
|
81
|
-
|
|
82
|
-
/**
|
|
83
|
-
* @internal
|
|
84
|
-
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
85
|
-
*/
|
|
86
|
-
export namespace Status$ {
|
|
87
|
-
/** @deprecated use `Status$inboundSchema` instead. */
|
|
88
|
-
export const inboundSchema = Status$inboundSchema;
|
|
89
|
-
/** @deprecated use `Status$outboundSchema` instead. */
|
|
90
|
-
export const outboundSchema = Status$outboundSchema;
|
|
91
|
-
}
|
|
92
|
-
|
|
93
54
|
/** @internal */
|
|
94
55
|
export const Product$inboundSchema: z.ZodType<Product, z.ZodTypeDef, unknown> =
|
|
95
56
|
z.object({
|
|
@@ -122,78 +83,6 @@ export const Product$inboundSchema: z.ZodType<Product, z.ZodTypeDef, unknown> =
|
|
|
122
83
|
});
|
|
123
84
|
});
|
|
124
85
|
|
|
125
|
-
/** @internal */
|
|
126
|
-
export type Product$Outbound = {
|
|
127
|
-
id?: number | undefined;
|
|
128
|
-
name?: string | undefined;
|
|
129
|
-
slug?: string | undefined;
|
|
130
|
-
status?: string | undefined;
|
|
131
|
-
description?: string | undefined;
|
|
132
|
-
body_html?: string | undefined;
|
|
133
|
-
button_cta?: string | undefined;
|
|
134
|
-
prefix_id?: string | undefined;
|
|
135
|
-
thumbnail_blob?: ImageAttachment$Outbound | undefined;
|
|
136
|
-
seller_account?: AccountSlim$Outbound | undefined;
|
|
137
|
-
media_files_blobs?: Array<FileAttachment$Outbound> | undefined;
|
|
138
|
-
reviews?: Array<Review$Outbound> | undefined;
|
|
139
|
-
seo?: Seo$Outbound | undefined;
|
|
140
|
-
price_variants?: Array<PriceVariant$Outbound> | undefined;
|
|
141
|
-
url?: string | undefined;
|
|
142
|
-
has_media?: boolean | undefined;
|
|
143
|
-
};
|
|
144
|
-
|
|
145
|
-
/** @internal */
|
|
146
|
-
export const Product$outboundSchema: z.ZodType<
|
|
147
|
-
Product$Outbound,
|
|
148
|
-
z.ZodTypeDef,
|
|
149
|
-
Product
|
|
150
|
-
> = z.object({
|
|
151
|
-
id: z.number().int().optional(),
|
|
152
|
-
name: z.string().optional(),
|
|
153
|
-
slug: z.string().optional(),
|
|
154
|
-
status: Status$outboundSchema.optional(),
|
|
155
|
-
description: z.string().optional(),
|
|
156
|
-
bodyHtml: z.string().optional(),
|
|
157
|
-
buttonCta: z.string().optional(),
|
|
158
|
-
prefixId: z.string().optional(),
|
|
159
|
-
thumbnailBlob: ImageAttachment$outboundSchema.optional(),
|
|
160
|
-
sellerAccount: AccountSlim$outboundSchema.optional(),
|
|
161
|
-
mediaFilesBlobs: z.array(FileAttachment$outboundSchema).optional(),
|
|
162
|
-
reviews: z.array(Review$outboundSchema).optional(),
|
|
163
|
-
seo: Seo$outboundSchema.optional(),
|
|
164
|
-
priceVariants: z.array(PriceVariant$outboundSchema).optional(),
|
|
165
|
-
url: z.string().optional(),
|
|
166
|
-
hasMedia: z.boolean().optional(),
|
|
167
|
-
}).transform((v) => {
|
|
168
|
-
return remap$(v, {
|
|
169
|
-
bodyHtml: "body_html",
|
|
170
|
-
buttonCta: "button_cta",
|
|
171
|
-
prefixId: "prefix_id",
|
|
172
|
-
thumbnailBlob: "thumbnail_blob",
|
|
173
|
-
sellerAccount: "seller_account",
|
|
174
|
-
mediaFilesBlobs: "media_files_blobs",
|
|
175
|
-
priceVariants: "price_variants",
|
|
176
|
-
hasMedia: "has_media",
|
|
177
|
-
});
|
|
178
|
-
});
|
|
179
|
-
|
|
180
|
-
/**
|
|
181
|
-
* @internal
|
|
182
|
-
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
183
|
-
*/
|
|
184
|
-
export namespace Product$ {
|
|
185
|
-
/** @deprecated use `Product$inboundSchema` instead. */
|
|
186
|
-
export const inboundSchema = Product$inboundSchema;
|
|
187
|
-
/** @deprecated use `Product$outboundSchema` instead. */
|
|
188
|
-
export const outboundSchema = Product$outboundSchema;
|
|
189
|
-
/** @deprecated use `Product$Outbound` instead. */
|
|
190
|
-
export type Outbound = Product$Outbound;
|
|
191
|
-
}
|
|
192
|
-
|
|
193
|
-
export function productToJSON(product: Product): string {
|
|
194
|
-
return JSON.stringify(Product$outboundSchema.parse(product));
|
|
195
|
-
}
|
|
196
|
-
|
|
197
86
|
export function productFromJSON(
|
|
198
87
|
jsonString: string,
|
|
199
88
|
): SafeParseResult<Product, SDKValidationError> {
|
package/src/models/review.ts
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
3
|
*/
|
|
4
4
|
|
|
5
|
-
import * as z from "zod";
|
|
5
|
+
import * as z from "zod/v3";
|
|
6
6
|
import { remap as remap$ } from "../lib/primitives.js";
|
|
7
7
|
import { safeParse } from "../lib/schemas.js";
|
|
8
8
|
import { Result as SafeParseResult } from "../types/fp.js";
|
|
@@ -28,47 +28,6 @@ export const Review$inboundSchema: z.ZodType<Review, z.ZodTypeDef, unknown> = z
|
|
|
28
28
|
});
|
|
29
29
|
});
|
|
30
30
|
|
|
31
|
-
/** @internal */
|
|
32
|
-
export type Review$Outbound = {
|
|
33
|
-
id?: number | undefined;
|
|
34
|
-
rating?: number | undefined;
|
|
35
|
-
comment?: string | undefined;
|
|
36
|
-
author_name?: string | undefined;
|
|
37
|
-
};
|
|
38
|
-
|
|
39
|
-
/** @internal */
|
|
40
|
-
export const Review$outboundSchema: z.ZodType<
|
|
41
|
-
Review$Outbound,
|
|
42
|
-
z.ZodTypeDef,
|
|
43
|
-
Review
|
|
44
|
-
> = z.object({
|
|
45
|
-
id: z.number().int().optional(),
|
|
46
|
-
rating: z.number().int().optional(),
|
|
47
|
-
comment: z.string().optional(),
|
|
48
|
-
authorName: z.string().optional(),
|
|
49
|
-
}).transform((v) => {
|
|
50
|
-
return remap$(v, {
|
|
51
|
-
authorName: "author_name",
|
|
52
|
-
});
|
|
53
|
-
});
|
|
54
|
-
|
|
55
|
-
/**
|
|
56
|
-
* @internal
|
|
57
|
-
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
58
|
-
*/
|
|
59
|
-
export namespace Review$ {
|
|
60
|
-
/** @deprecated use `Review$inboundSchema` instead. */
|
|
61
|
-
export const inboundSchema = Review$inboundSchema;
|
|
62
|
-
/** @deprecated use `Review$outboundSchema` instead. */
|
|
63
|
-
export const outboundSchema = Review$outboundSchema;
|
|
64
|
-
/** @deprecated use `Review$Outbound` instead. */
|
|
65
|
-
export type Outbound = Review$Outbound;
|
|
66
|
-
}
|
|
67
|
-
|
|
68
|
-
export function reviewToJSON(review: Review): string {
|
|
69
|
-
return JSON.stringify(Review$outboundSchema.parse(review));
|
|
70
|
-
}
|
|
71
|
-
|
|
72
31
|
export function reviewFromJSON(
|
|
73
32
|
jsonString: string,
|
|
74
33
|
): SafeParseResult<Review, SDKValidationError> {
|
package/src/models/security.ts
CHANGED
|
@@ -2,29 +2,13 @@
|
|
|
2
2
|
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
3
|
*/
|
|
4
4
|
|
|
5
|
-
import * as z from "zod";
|
|
5
|
+
import * as z from "zod/v3";
|
|
6
6
|
import { remap as remap$ } from "../lib/primitives.js";
|
|
7
|
-
import { safeParse } from "../lib/schemas.js";
|
|
8
|
-
import { Result as SafeParseResult } from "../types/fp.js";
|
|
9
|
-
import { SDKValidationError } from "./errors/sdkvalidationerror.js";
|
|
10
7
|
|
|
11
8
|
export type Security = {
|
|
12
9
|
apiKeyAuth?: string | undefined;
|
|
13
10
|
};
|
|
14
11
|
|
|
15
|
-
/** @internal */
|
|
16
|
-
export const Security$inboundSchema: z.ZodType<
|
|
17
|
-
Security,
|
|
18
|
-
z.ZodTypeDef,
|
|
19
|
-
unknown
|
|
20
|
-
> = z.object({
|
|
21
|
-
ApiKeyAuth: z.string().optional(),
|
|
22
|
-
}).transform((v) => {
|
|
23
|
-
return remap$(v, {
|
|
24
|
-
"ApiKeyAuth": "apiKeyAuth",
|
|
25
|
-
});
|
|
26
|
-
});
|
|
27
|
-
|
|
28
12
|
/** @internal */
|
|
29
13
|
export type Security$Outbound = {
|
|
30
14
|
ApiKeyAuth?: string | undefined;
|
|
@@ -43,29 +27,6 @@ export const Security$outboundSchema: z.ZodType<
|
|
|
43
27
|
});
|
|
44
28
|
});
|
|
45
29
|
|
|
46
|
-
/**
|
|
47
|
-
* @internal
|
|
48
|
-
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
49
|
-
*/
|
|
50
|
-
export namespace Security$ {
|
|
51
|
-
/** @deprecated use `Security$inboundSchema` instead. */
|
|
52
|
-
export const inboundSchema = Security$inboundSchema;
|
|
53
|
-
/** @deprecated use `Security$outboundSchema` instead. */
|
|
54
|
-
export const outboundSchema = Security$outboundSchema;
|
|
55
|
-
/** @deprecated use `Security$Outbound` instead. */
|
|
56
|
-
export type Outbound = Security$Outbound;
|
|
57
|
-
}
|
|
58
|
-
|
|
59
30
|
export function securityToJSON(security: Security): string {
|
|
60
31
|
return JSON.stringify(Security$outboundSchema.parse(security));
|
|
61
32
|
}
|
|
62
|
-
|
|
63
|
-
export function securityFromJSON(
|
|
64
|
-
jsonString: string,
|
|
65
|
-
): SafeParseResult<Security, SDKValidationError> {
|
|
66
|
-
return safeParse(
|
|
67
|
-
jsonString,
|
|
68
|
-
(x) => Security$inboundSchema.parse(JSON.parse(x)),
|
|
69
|
-
`Failed to parse 'Security' from JSON`,
|
|
70
|
-
);
|
|
71
|
-
}
|
package/src/models/seo.ts
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
3
|
*/
|
|
4
4
|
|
|
5
|
-
import * as z from "zod";
|
|
5
|
+
import * as z from "zod/v3";
|
|
6
6
|
import { safeParse } from "../lib/schemas.js";
|
|
7
7
|
import { Result as SafeParseResult } from "../types/fp.js";
|
|
8
8
|
import { SDKValidationError } from "./errors/sdkvalidationerror.js";
|
|
@@ -21,38 +21,6 @@ export const Seo$inboundSchema: z.ZodType<Seo, z.ZodTypeDef, unknown> = z
|
|
|
21
21
|
keywords: z.string().optional(),
|
|
22
22
|
});
|
|
23
23
|
|
|
24
|
-
/** @internal */
|
|
25
|
-
export type Seo$Outbound = {
|
|
26
|
-
title?: string | undefined;
|
|
27
|
-
description?: string | undefined;
|
|
28
|
-
keywords?: string | undefined;
|
|
29
|
-
};
|
|
30
|
-
|
|
31
|
-
/** @internal */
|
|
32
|
-
export const Seo$outboundSchema: z.ZodType<Seo$Outbound, z.ZodTypeDef, Seo> = z
|
|
33
|
-
.object({
|
|
34
|
-
title: z.string().optional(),
|
|
35
|
-
description: z.string().optional(),
|
|
36
|
-
keywords: z.string().optional(),
|
|
37
|
-
});
|
|
38
|
-
|
|
39
|
-
/**
|
|
40
|
-
* @internal
|
|
41
|
-
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
42
|
-
*/
|
|
43
|
-
export namespace Seo$ {
|
|
44
|
-
/** @deprecated use `Seo$inboundSchema` instead. */
|
|
45
|
-
export const inboundSchema = Seo$inboundSchema;
|
|
46
|
-
/** @deprecated use `Seo$outboundSchema` instead. */
|
|
47
|
-
export const outboundSchema = Seo$outboundSchema;
|
|
48
|
-
/** @deprecated use `Seo$Outbound` instead. */
|
|
49
|
-
export type Outbound = Seo$Outbound;
|
|
50
|
-
}
|
|
51
|
-
|
|
52
|
-
export function seoToJSON(seo: Seo): string {
|
|
53
|
-
return JSON.stringify(Seo$outboundSchema.parse(seo));
|
|
54
|
-
}
|
|
55
|
-
|
|
56
24
|
export function seoFromJSON(
|
|
57
25
|
jsonString: string,
|
|
58
26
|
): SafeParseResult<Seo, SDKValidationError> {
|