@clossir-tech/ts-sdk 0.10.1 → 0.10.3
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 +32 -19
- package/esm/funcs/{kyc-post-kyc-webhook-by-provider.d.ts → assets-get-assets-by-asset-id.d.ts} +4 -4
- package/esm/funcs/assets-get-assets-by-asset-id.d.ts.map +1 -0
- package/esm/funcs/assets-get-assets-by-asset-id.js +106 -0
- package/esm/funcs/assets-get-assets-by-asset-id.js.map +1 -0
- package/esm/funcs/assets-get-assets.d.ts +18 -0
- package/esm/funcs/assets-get-assets.d.ts.map +1 -0
- package/esm/funcs/assets-get-assets.js +109 -0
- package/esm/funcs/assets-get-assets.js.map +1 -0
- package/esm/funcs/assets-patch-orgs-by-org-id-assets-by-asset-id.js +1 -1
- package/esm/funcs/assets-patch-orgs-by-org-id-assets-by-asset-id.js.map +1 -1
- package/esm/funcs/assets-post-orgs-by-org-id-assets-by-asset-id-allocate.js +1 -3
- package/esm/funcs/assets-post-orgs-by-org-id-assets-by-asset-id-allocate.js.map +1 -1
- package/esm/funcs/assets-post-orgs-by-org-id-assets-by-asset-id-deploy.d.ts +1 -1
- package/esm/funcs/assets-post-orgs-by-org-id-assets-by-asset-id-deploy.js +2 -2
- package/esm/funcs/assets-post-orgs-by-org-id-assets-by-asset-id-deploy.js.map +1 -1
- package/esm/funcs/assets-post-orgs-by-org-id-assets.js +1 -1
- package/esm/funcs/assets-post-orgs-by-org-id-assets.js.map +1 -1
- package/esm/funcs/auth-post-auth-switch-org.d.ts +20 -0
- package/esm/funcs/auth-post-auth-switch-org.d.ts.map +1 -0
- package/esm/funcs/auth-post-auth-switch-org.js +90 -0
- package/esm/funcs/auth-post-auth-switch-org.js.map +1 -0
- package/esm/funcs/auth-post-auth-verify-email.d.ts +1 -1
- package/esm/funcs/auth-post-auth-verify-email.js +1 -1
- package/esm/funcs/bridge-post-orgs-by-org-id-assets-by-asset-id-bridge.d.ts +1 -1
- package/esm/funcs/bridge-post-orgs-by-org-id-assets-by-asset-id-bridge.js +2 -2
- package/esm/funcs/bridge-post-orgs-by-org-id-assets-by-asset-id-bridge.js.map +1 -1
- package/esm/funcs/compliance-post-compliance-check.js +1 -3
- package/esm/funcs/compliance-post-compliance-check.js.map +1 -1
- package/esm/funcs/compliance-post-orgs-by-org-id-assets-by-asset-id-compliance-policy.js +1 -1
- package/esm/funcs/compliance-post-orgs-by-org-id-assets-by-asset-id-compliance-policy.js.map +1 -1
- package/esm/funcs/kyb-get-orgs-by-org-id-kyb-status.d.ts +20 -0
- package/esm/funcs/kyb-get-orgs-by-org-id-kyb-status.d.ts.map +1 -0
- package/esm/funcs/{kyc-post-kyc-webhook-by-provider.js → kyb-get-orgs-by-org-id-kyb-status.js} +25 -20
- package/esm/funcs/kyb-get-orgs-by-org-id-kyb-status.js.map +1 -0
- package/esm/funcs/kyb-post-orgs-by-org-id-kyb-access-token.d.ts +20 -0
- package/esm/funcs/kyb-post-orgs-by-org-id-kyb-access-token.d.ts.map +1 -0
- package/esm/funcs/kyb-post-orgs-by-org-id-kyb-access-token.js +96 -0
- package/esm/funcs/kyb-post-orgs-by-org-id-kyb-access-token.js.map +1 -0
- package/esm/funcs/kyb-post-orgs-by-org-id-kyb-initiate.d.ts +20 -0
- package/esm/funcs/kyb-post-orgs-by-org-id-kyb-initiate.d.ts.map +1 -0
- package/esm/funcs/kyb-post-orgs-by-org-id-kyb-initiate.js +96 -0
- package/esm/funcs/kyb-post-orgs-by-org-id-kyb-initiate.js.map +1 -0
- package/esm/funcs/markets-post-orgs-by-org-id-assets-by-asset-id-markets.d.ts +1 -1
- package/esm/funcs/markets-post-orgs-by-org-id-assets-by-asset-id-markets.js +2 -2
- package/esm/funcs/markets-post-orgs-by-org-id-assets-by-asset-id-markets.js.map +1 -1
- package/esm/funcs/organizations-post-orgs-by-org-id-members-by-user-id-attest.js +1 -1
- package/esm/funcs/organizations-post-orgs-by-org-id-members-by-user-id-attest.js.map +1 -1
- package/esm/funcs/organizations-post-orgs-by-org-id-members.d.ts +1 -1
- package/esm/funcs/organizations-post-orgs-by-org-id-members.js +1 -1
- package/esm/funcs/timeseries-get-orgs-by-org-id-holdings-by-user-id.js +1 -1
- package/esm/funcs/timeseries-get-orgs-by-org-id-holdings-by-user-id.js.map +1 -1
- package/esm/funcs/transfers-post-transfers.d.ts +1 -1
- package/esm/funcs/transfers-post-transfers.js +2 -2
- package/esm/funcs/transfers-post-transfers.js.map +1 -1
- package/esm/funcs/vaults-post-orgs-by-org-id-assets-by-asset-id-vault-deploy.js +3 -1
- package/esm/funcs/vaults-post-orgs-by-org-id-assets-by-asset-id-vault-deploy.js.map +1 -1
- package/esm/lib/config.d.ts +2 -2
- package/esm/lib/config.js +2 -2
- package/esm/models/operations/get-assets-by-asset-id.d.ts +85 -0
- package/esm/models/operations/get-assets-by-asset-id.d.ts.map +1 -0
- package/esm/models/operations/get-assets-by-asset-id.js +119 -0
- package/esm/models/operations/get-assets-by-asset-id.js.map +1 -0
- package/esm/models/operations/get-assets.d.ts +112 -0
- package/esm/models/operations/get-assets.d.ts.map +1 -0
- package/esm/models/operations/get-assets.js +100 -0
- package/esm/models/operations/get-assets.js.map +1 -0
- package/esm/models/operations/get-orgs-by-org-id-assets-by-asset-id.d.ts +4 -4
- package/esm/models/operations/get-orgs-by-org-id-assets-by-asset-id.d.ts.map +1 -1
- package/esm/models/operations/get-orgs-by-org-id-assets-by-asset-id.js +4 -5
- package/esm/models/operations/get-orgs-by-org-id-assets-by-asset-id.js.map +1 -1
- package/esm/models/operations/get-orgs-by-org-id-kyb-status.d.ts +33 -0
- package/esm/models/operations/get-orgs-by-org-id-kyb-status.d.ts.map +1 -0
- package/esm/models/operations/get-orgs-by-org-id-kyb-status.js +28 -0
- package/esm/models/operations/get-orgs-by-org-id-kyb-status.js.map +1 -0
- package/esm/models/operations/index.d.ts +6 -1
- package/esm/models/operations/index.d.ts.map +1 -1
- package/esm/models/operations/index.js +6 -1
- package/esm/models/operations/index.js.map +1 -1
- package/esm/models/operations/post-auth-switch-org.d.ts +212 -0
- package/esm/models/operations/post-auth-switch-org.d.ts.map +1 -0
- package/esm/models/operations/post-auth-switch-org.js +206 -0
- package/esm/models/operations/post-auth-switch-org.js.map +1 -0
- package/esm/models/operations/post-auth-verify-email.d.ts +26 -2
- package/esm/models/operations/post-auth-verify-email.d.ts.map +1 -1
- package/esm/models/operations/post-auth-verify-email.js +18 -1
- package/esm/models/operations/post-auth-verify-email.js.map +1 -1
- package/esm/models/operations/post-orgs-by-org-id-assets-by-asset-id-vault-deploy.d.ts +2 -8
- package/esm/models/operations/post-orgs-by-org-id-assets-by-asset-id-vault-deploy.d.ts.map +1 -1
- package/esm/models/operations/post-orgs-by-org-id-assets-by-asset-id-vault-deploy.js +2 -6
- package/esm/models/operations/post-orgs-by-org-id-assets-by-asset-id-vault-deploy.js.map +1 -1
- package/esm/models/operations/post-orgs-by-org-id-assets.d.ts +5 -0
- package/esm/models/operations/post-orgs-by-org-id-assets.d.ts.map +1 -1
- package/esm/models/operations/post-orgs-by-org-id-assets.js +2 -0
- package/esm/models/operations/post-orgs-by-org-id-assets.js.map +1 -1
- package/esm/models/operations/post-orgs-by-org-id-kyb-access-token.d.ts +36 -0
- package/esm/models/operations/post-orgs-by-org-id-kyb-access-token.d.ts.map +1 -0
- package/esm/models/operations/post-orgs-by-org-id-kyb-access-token.js +34 -0
- package/esm/models/operations/post-orgs-by-org-id-kyb-access-token.js.map +1 -0
- package/esm/models/operations/post-orgs-by-org-id-kyb-initiate.d.ts +30 -0
- package/esm/models/operations/post-orgs-by-org-id-kyb-initiate.d.ts.map +1 -0
- package/esm/models/operations/post-orgs-by-org-id-kyb-initiate.js +25 -0
- package/esm/models/operations/post-orgs-by-org-id-kyb-initiate.js.map +1 -0
- package/esm/models/operations/post-orgs-by-org-id-members-by-user-id-attest.d.ts +5 -0
- package/esm/models/operations/post-orgs-by-org-id-members-by-user-id-attest.d.ts.map +1 -1
- package/esm/models/operations/post-orgs-by-org-id-members-by-user-id-attest.js +1 -0
- package/esm/models/operations/post-orgs-by-org-id-members-by-user-id-attest.js.map +1 -1
- package/esm/models/operations/post-orgs-by-org-id-members.d.ts +20 -0
- package/esm/models/operations/post-orgs-by-org-id-members.d.ts.map +1 -1
- package/esm/models/operations/post-orgs-by-org-id-members.js.map +1 -1
- package/esm/sdk/assets.d.ts +15 -1
- package/esm/sdk/assets.d.ts.map +1 -1
- package/esm/sdk/assets.js +21 -1
- package/esm/sdk/assets.js.map +1 -1
- package/esm/sdk/auth.d.ts +8 -1
- package/esm/sdk/auth.d.ts.map +1 -1
- package/esm/sdk/auth.js +11 -1
- package/esm/sdk/auth.js.map +1 -1
- package/esm/sdk/bridge.d.ts +1 -1
- package/esm/sdk/bridge.js +1 -1
- package/esm/sdk/kyb.d.ts +26 -0
- package/esm/sdk/kyb.d.ts.map +1 -0
- package/esm/sdk/kyb.js +38 -0
- package/esm/sdk/kyb.js.map +1 -0
- package/esm/sdk/kyc.d.ts +0 -7
- package/esm/sdk/kyc.d.ts.map +1 -1
- package/esm/sdk/kyc.js +0 -10
- package/esm/sdk/kyc.js.map +1 -1
- package/esm/sdk/markets.d.ts +1 -1
- package/esm/sdk/markets.js +1 -1
- package/esm/sdk/organizations.d.ts +1 -1
- package/esm/sdk/organizations.js +1 -1
- package/esm/sdk/sdk.d.ts +3 -0
- package/esm/sdk/sdk.d.ts.map +1 -1
- package/esm/sdk/sdk.js +5 -0
- package/esm/sdk/sdk.js.map +1 -1
- package/esm/sdk/transfers.d.ts +1 -1
- package/esm/sdk/transfers.js +1 -1
- package/jsr.json +1 -1
- package/package.json +3 -3
- package/src/funcs/assets-get-assets-by-asset-id.ts +203 -0
- package/src/funcs/assets-get-assets.ts +205 -0
- package/src/funcs/assets-patch-orgs-by-org-id-assets-by-asset-id.ts +1 -1
- package/src/funcs/assets-post-orgs-by-org-id-assets-by-asset-id-allocate.ts +5 -3
- package/src/funcs/assets-post-orgs-by-org-id-assets-by-asset-id-deploy.ts +2 -2
- package/src/funcs/assets-post-orgs-by-org-id-assets.ts +1 -1
- package/src/funcs/auth-post-auth-switch-org.ts +180 -0
- package/src/funcs/auth-post-auth-verify-email.ts +1 -1
- package/src/funcs/bridge-post-orgs-by-org-id-assets-by-asset-id-bridge.ts +2 -2
- package/src/funcs/compliance-post-compliance-check.ts +5 -3
- package/src/funcs/compliance-post-orgs-by-org-id-assets-by-asset-id-compliance-policy.ts +1 -1
- package/src/funcs/{kyc-post-kyc-webhook-by-provider.ts → kyb-get-orgs-by-org-id-kyb-status.ts} +31 -28
- package/src/funcs/kyb-post-orgs-by-org-id-kyb-access-token.ts +194 -0
- package/src/funcs/kyb-post-orgs-by-org-id-kyb-initiate.ts +194 -0
- package/src/funcs/markets-post-orgs-by-org-id-assets-by-asset-id-markets.ts +2 -2
- package/src/funcs/organizations-post-orgs-by-org-id-members-by-user-id-attest.ts +1 -1
- package/src/funcs/organizations-post-orgs-by-org-id-members.ts +1 -1
- package/src/funcs/timeseries-get-orgs-by-org-id-holdings-by-user-id.ts +1 -1
- package/src/funcs/transfers-post-transfers.ts +2 -2
- package/src/funcs/vaults-post-orgs-by-org-id-assets-by-asset-id-vault-deploy.ts +3 -0
- package/src/lib/config.ts +2 -2
- package/src/models/operations/get-assets-by-asset-id.ts +253 -0
- package/src/models/operations/get-assets.ts +250 -0
- package/src/models/operations/get-orgs-by-org-id-assets-by-asset-id.ts +17 -9
- package/src/models/operations/get-orgs-by-org-id-kyb-status.ts +78 -0
- package/src/models/operations/index.ts +6 -1
- package/src/models/operations/post-auth-switch-org.ts +549 -0
- package/src/models/operations/post-auth-verify-email.ts +56 -5
- package/src/models/operations/post-orgs-by-org-id-assets-by-asset-id-vault-deploy.ts +19 -26
- package/src/models/operations/post-orgs-by-org-id-assets.ts +7 -0
- package/src/models/operations/post-orgs-by-org-id-kyb-access-token.ts +93 -0
- package/src/models/operations/post-orgs-by-org-id-kyb-initiate.ts +73 -0
- package/src/models/operations/post-orgs-by-org-id-members-by-user-id-attest.ts +6 -0
- package/src/models/operations/post-orgs-by-org-id-members.ts +20 -0
- package/src/sdk/assets.ts +41 -1
- package/src/sdk/auth.ts +19 -1
- package/src/sdk/bridge.ts +1 -1
- package/src/sdk/kyb.ts +63 -0
- package/src/sdk/kyc.ts +0 -20
- package/src/sdk/markets.ts +1 -1
- package/src/sdk/organizations.ts +1 -1
- package/src/sdk/sdk.ts +6 -0
- package/src/sdk/transfers.ts +1 -1
- package/esm/funcs/kyc-post-kyc-webhook-by-provider.d.ts.map +0 -1
- package/esm/funcs/kyc-post-kyc-webhook-by-provider.js.map +0 -1
- package/esm/models/operations/post-kyc-webhook-by-provider.d.ts +0 -93
- package/esm/models/operations/post-kyc-webhook-by-provider.d.ts.map +0 -1
- package/esm/models/operations/post-kyc-webhook-by-provider.js +0 -45
- package/esm/models/operations/post-kyc-webhook-by-provider.js.map +0 -1
- package/src/models/operations/post-kyc-webhook-by-provider.ts +0 -169
|
@@ -0,0 +1,549 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
import * as z from "zod/v4-mini";
|
|
6
|
+
import { remap as remap$ } from "../../lib/primitives.js";
|
|
7
|
+
import { safeParse } from "../../lib/schemas.js";
|
|
8
|
+
import { ClosedEnum } from "../../types/enums.js";
|
|
9
|
+
import { Result as SafeParseResult } from "../../types/fp.js";
|
|
10
|
+
import * as types from "../../types/primitives.js";
|
|
11
|
+
import { smartUnion } from "../../types/smart-union.js";
|
|
12
|
+
import { SDKValidationError } from "../errors/sdk-validation-error.js";
|
|
13
|
+
|
|
14
|
+
export type PostAuthSwitchOrgRequest = {
|
|
15
|
+
/**
|
|
16
|
+
* UUID of the target organization to switch to.
|
|
17
|
+
*/
|
|
18
|
+
orgId: string;
|
|
19
|
+
/**
|
|
20
|
+
* The current refresh token. Will be rotated.
|
|
21
|
+
*/
|
|
22
|
+
refreshToken: string;
|
|
23
|
+
};
|
|
24
|
+
|
|
25
|
+
export const PostAuthSwitchOrgTokenType = {
|
|
26
|
+
Bearer: "Bearer",
|
|
27
|
+
} as const;
|
|
28
|
+
export type PostAuthSwitchOrgTokenType = ClosedEnum<
|
|
29
|
+
typeof PostAuthSwitchOrgTokenType
|
|
30
|
+
>;
|
|
31
|
+
|
|
32
|
+
export const PostAuthSwitchOrgRoleEnum = {
|
|
33
|
+
User: "user",
|
|
34
|
+
} as const;
|
|
35
|
+
export type PostAuthSwitchOrgRoleEnum = ClosedEnum<
|
|
36
|
+
typeof PostAuthSwitchOrgRoleEnum
|
|
37
|
+
>;
|
|
38
|
+
|
|
39
|
+
export const PostAuthSwitchOrgRoleClient = {
|
|
40
|
+
Client: "client",
|
|
41
|
+
} as const;
|
|
42
|
+
export type PostAuthSwitchOrgRoleClient = ClosedEnum<
|
|
43
|
+
typeof PostAuthSwitchOrgRoleClient
|
|
44
|
+
>;
|
|
45
|
+
|
|
46
|
+
export const PostAuthSwitchOrgRoleVerifier = {
|
|
47
|
+
Verifier: "verifier",
|
|
48
|
+
} as const;
|
|
49
|
+
export type PostAuthSwitchOrgRoleVerifier = ClosedEnum<
|
|
50
|
+
typeof PostAuthSwitchOrgRoleVerifier
|
|
51
|
+
>;
|
|
52
|
+
|
|
53
|
+
export const PostAuthSwitchOrgRoleInvestor = {
|
|
54
|
+
Investor: "investor",
|
|
55
|
+
} as const;
|
|
56
|
+
export type PostAuthSwitchOrgRoleInvestor = ClosedEnum<
|
|
57
|
+
typeof PostAuthSwitchOrgRoleInvestor
|
|
58
|
+
>;
|
|
59
|
+
|
|
60
|
+
export const PostAuthSwitchOrgRoleIssuer = {
|
|
61
|
+
Issuer: "issuer",
|
|
62
|
+
} as const;
|
|
63
|
+
export type PostAuthSwitchOrgRoleIssuer = ClosedEnum<
|
|
64
|
+
typeof PostAuthSwitchOrgRoleIssuer
|
|
65
|
+
>;
|
|
66
|
+
|
|
67
|
+
export const PostAuthSwitchOrgRoleAdmin = {
|
|
68
|
+
Admin: "admin",
|
|
69
|
+
} as const;
|
|
70
|
+
export type PostAuthSwitchOrgRoleAdmin = ClosedEnum<
|
|
71
|
+
typeof PostAuthSwitchOrgRoleAdmin
|
|
72
|
+
>;
|
|
73
|
+
|
|
74
|
+
/**
|
|
75
|
+
* Platform user role
|
|
76
|
+
*/
|
|
77
|
+
export type PostAuthSwitchOrgRoleUnion =
|
|
78
|
+
| PostAuthSwitchOrgRoleAdmin
|
|
79
|
+
| PostAuthSwitchOrgRoleIssuer
|
|
80
|
+
| PostAuthSwitchOrgRoleInvestor
|
|
81
|
+
| PostAuthSwitchOrgRoleVerifier
|
|
82
|
+
| PostAuthSwitchOrgRoleClient
|
|
83
|
+
| PostAuthSwitchOrgRoleEnum;
|
|
84
|
+
|
|
85
|
+
export const PostAuthSwitchOrgStatusSuspended = {
|
|
86
|
+
Suspended: "suspended",
|
|
87
|
+
} as const;
|
|
88
|
+
export type PostAuthSwitchOrgStatusSuspended = ClosedEnum<
|
|
89
|
+
typeof PostAuthSwitchOrgStatusSuspended
|
|
90
|
+
>;
|
|
91
|
+
|
|
92
|
+
export const PostAuthSwitchOrgStatusActive = {
|
|
93
|
+
Active: "active",
|
|
94
|
+
} as const;
|
|
95
|
+
export type PostAuthSwitchOrgStatusActive = ClosedEnum<
|
|
96
|
+
typeof PostAuthSwitchOrgStatusActive
|
|
97
|
+
>;
|
|
98
|
+
|
|
99
|
+
export const PostAuthSwitchOrgStatusPending = {
|
|
100
|
+
Pending: "pending",
|
|
101
|
+
} as const;
|
|
102
|
+
export type PostAuthSwitchOrgStatusPending = ClosedEnum<
|
|
103
|
+
typeof PostAuthSwitchOrgStatusPending
|
|
104
|
+
>;
|
|
105
|
+
|
|
106
|
+
export const PostAuthSwitchOrgStatusInvited = {
|
|
107
|
+
Invited: "invited",
|
|
108
|
+
} as const;
|
|
109
|
+
export type PostAuthSwitchOrgStatusInvited = ClosedEnum<
|
|
110
|
+
typeof PostAuthSwitchOrgStatusInvited
|
|
111
|
+
>;
|
|
112
|
+
|
|
113
|
+
export const PostAuthSwitchOrgStatusInitiated = {
|
|
114
|
+
Initiated: "initiated",
|
|
115
|
+
} as const;
|
|
116
|
+
export type PostAuthSwitchOrgStatusInitiated = ClosedEnum<
|
|
117
|
+
typeof PostAuthSwitchOrgStatusInitiated
|
|
118
|
+
>;
|
|
119
|
+
|
|
120
|
+
/**
|
|
121
|
+
* Account status
|
|
122
|
+
*/
|
|
123
|
+
export type PostAuthSwitchOrgStatusUnion =
|
|
124
|
+
| PostAuthSwitchOrgStatusInitiated
|
|
125
|
+
| PostAuthSwitchOrgStatusInvited
|
|
126
|
+
| PostAuthSwitchOrgStatusPending
|
|
127
|
+
| PostAuthSwitchOrgStatusActive
|
|
128
|
+
| PostAuthSwitchOrgStatusSuspended;
|
|
129
|
+
|
|
130
|
+
export type PostAuthSwitchOrgChainIdentities = {
|
|
131
|
+
solana?: Array<string> | undefined;
|
|
132
|
+
evm?: Array<string> | undefined;
|
|
133
|
+
};
|
|
134
|
+
|
|
135
|
+
export type PostAuthSwitchOrgKyc = {
|
|
136
|
+
/**
|
|
137
|
+
* Whether KYC is verified
|
|
138
|
+
*/
|
|
139
|
+
verified: boolean;
|
|
140
|
+
/**
|
|
141
|
+
* Verification level
|
|
142
|
+
*/
|
|
143
|
+
level?: string | undefined;
|
|
144
|
+
/**
|
|
145
|
+
* ISO 8601 timestamp
|
|
146
|
+
*/
|
|
147
|
+
verifiedAt?: string | undefined;
|
|
148
|
+
};
|
|
149
|
+
|
|
150
|
+
export type PostAuthSwitchOrgAttestations = {
|
|
151
|
+
kyc?: PostAuthSwitchOrgKyc | undefined;
|
|
152
|
+
};
|
|
153
|
+
|
|
154
|
+
export type PostAuthSwitchOrgUser = {
|
|
155
|
+
/**
|
|
156
|
+
* Unique user identifier (UUID)
|
|
157
|
+
*/
|
|
158
|
+
id: string;
|
|
159
|
+
/**
|
|
160
|
+
* User's email address
|
|
161
|
+
*/
|
|
162
|
+
email: string;
|
|
163
|
+
displayName: string | null;
|
|
164
|
+
avatarUrl?: string | null | undefined;
|
|
165
|
+
/**
|
|
166
|
+
* Platform user role
|
|
167
|
+
*/
|
|
168
|
+
role:
|
|
169
|
+
| PostAuthSwitchOrgRoleAdmin
|
|
170
|
+
| PostAuthSwitchOrgRoleIssuer
|
|
171
|
+
| PostAuthSwitchOrgRoleInvestor
|
|
172
|
+
| PostAuthSwitchOrgRoleVerifier
|
|
173
|
+
| PostAuthSwitchOrgRoleClient
|
|
174
|
+
| PostAuthSwitchOrgRoleEnum;
|
|
175
|
+
/**
|
|
176
|
+
* Account status
|
|
177
|
+
*/
|
|
178
|
+
status:
|
|
179
|
+
| PostAuthSwitchOrgStatusInitiated
|
|
180
|
+
| PostAuthSwitchOrgStatusInvited
|
|
181
|
+
| PostAuthSwitchOrgStatusPending
|
|
182
|
+
| PostAuthSwitchOrgStatusActive
|
|
183
|
+
| PostAuthSwitchOrgStatusSuspended;
|
|
184
|
+
/**
|
|
185
|
+
* ISO 8601 timestamp of account creation
|
|
186
|
+
*/
|
|
187
|
+
createdAt: string;
|
|
188
|
+
chainIdentities: PostAuthSwitchOrgChainIdentities | null;
|
|
189
|
+
attestations: PostAuthSwitchOrgAttestations | null;
|
|
190
|
+
};
|
|
191
|
+
|
|
192
|
+
export type PostAuthSwitchOrgOrganization = {
|
|
193
|
+
/**
|
|
194
|
+
* Organization UUID
|
|
195
|
+
*/
|
|
196
|
+
id: string;
|
|
197
|
+
/**
|
|
198
|
+
* Organization name
|
|
199
|
+
*/
|
|
200
|
+
name: string;
|
|
201
|
+
orgType?: string | null | undefined;
|
|
202
|
+
status?: string | null | undefined;
|
|
203
|
+
logoUrl?: string | null | undefined;
|
|
204
|
+
role?: string | null | undefined;
|
|
205
|
+
};
|
|
206
|
+
|
|
207
|
+
/**
|
|
208
|
+
* Response
|
|
209
|
+
*/
|
|
210
|
+
export type PostAuthSwitchOrgResponse = {
|
|
211
|
+
/**
|
|
212
|
+
* New JWT access token scoped to the target organization.
|
|
213
|
+
*/
|
|
214
|
+
accessToken: string;
|
|
215
|
+
/**
|
|
216
|
+
* Rotated refresh token bound to the target organization.
|
|
217
|
+
*/
|
|
218
|
+
refreshToken: string;
|
|
219
|
+
tokenType: PostAuthSwitchOrgTokenType;
|
|
220
|
+
/**
|
|
221
|
+
* Access token lifetime in seconds.
|
|
222
|
+
*/
|
|
223
|
+
expiresIn: number;
|
|
224
|
+
user: PostAuthSwitchOrgUser;
|
|
225
|
+
organization: PostAuthSwitchOrgOrganization;
|
|
226
|
+
/**
|
|
227
|
+
* When true, the target org requires MFA and the user has not enrolled.
|
|
228
|
+
*/
|
|
229
|
+
mfaEnrollmentRequired?: boolean | undefined;
|
|
230
|
+
};
|
|
231
|
+
|
|
232
|
+
/** @internal */
|
|
233
|
+
export type PostAuthSwitchOrgRequest$Outbound = {
|
|
234
|
+
org_id: string;
|
|
235
|
+
refresh_token: string;
|
|
236
|
+
};
|
|
237
|
+
|
|
238
|
+
/** @internal */
|
|
239
|
+
export const PostAuthSwitchOrgRequest$outboundSchema: z.ZodMiniType<
|
|
240
|
+
PostAuthSwitchOrgRequest$Outbound,
|
|
241
|
+
PostAuthSwitchOrgRequest
|
|
242
|
+
> = z.pipe(
|
|
243
|
+
z.object({
|
|
244
|
+
orgId: z.string(),
|
|
245
|
+
refreshToken: z.string(),
|
|
246
|
+
}),
|
|
247
|
+
z.transform((v) => {
|
|
248
|
+
return remap$(v, {
|
|
249
|
+
orgId: "org_id",
|
|
250
|
+
refreshToken: "refresh_token",
|
|
251
|
+
});
|
|
252
|
+
}),
|
|
253
|
+
);
|
|
254
|
+
|
|
255
|
+
export function postAuthSwitchOrgRequestToJSON(
|
|
256
|
+
postAuthSwitchOrgRequest: PostAuthSwitchOrgRequest,
|
|
257
|
+
): string {
|
|
258
|
+
return JSON.stringify(
|
|
259
|
+
PostAuthSwitchOrgRequest$outboundSchema.parse(postAuthSwitchOrgRequest),
|
|
260
|
+
);
|
|
261
|
+
}
|
|
262
|
+
|
|
263
|
+
/** @internal */
|
|
264
|
+
export const PostAuthSwitchOrgTokenType$inboundSchema: z.ZodMiniEnum<
|
|
265
|
+
typeof PostAuthSwitchOrgTokenType
|
|
266
|
+
> = z.enum(PostAuthSwitchOrgTokenType);
|
|
267
|
+
|
|
268
|
+
/** @internal */
|
|
269
|
+
export const PostAuthSwitchOrgRoleEnum$inboundSchema: z.ZodMiniEnum<
|
|
270
|
+
typeof PostAuthSwitchOrgRoleEnum
|
|
271
|
+
> = z.enum(PostAuthSwitchOrgRoleEnum);
|
|
272
|
+
|
|
273
|
+
/** @internal */
|
|
274
|
+
export const PostAuthSwitchOrgRoleClient$inboundSchema: z.ZodMiniEnum<
|
|
275
|
+
typeof PostAuthSwitchOrgRoleClient
|
|
276
|
+
> = z.enum(PostAuthSwitchOrgRoleClient);
|
|
277
|
+
|
|
278
|
+
/** @internal */
|
|
279
|
+
export const PostAuthSwitchOrgRoleVerifier$inboundSchema: z.ZodMiniEnum<
|
|
280
|
+
typeof PostAuthSwitchOrgRoleVerifier
|
|
281
|
+
> = z.enum(PostAuthSwitchOrgRoleVerifier);
|
|
282
|
+
|
|
283
|
+
/** @internal */
|
|
284
|
+
export const PostAuthSwitchOrgRoleInvestor$inboundSchema: z.ZodMiniEnum<
|
|
285
|
+
typeof PostAuthSwitchOrgRoleInvestor
|
|
286
|
+
> = z.enum(PostAuthSwitchOrgRoleInvestor);
|
|
287
|
+
|
|
288
|
+
/** @internal */
|
|
289
|
+
export const PostAuthSwitchOrgRoleIssuer$inboundSchema: z.ZodMiniEnum<
|
|
290
|
+
typeof PostAuthSwitchOrgRoleIssuer
|
|
291
|
+
> = z.enum(PostAuthSwitchOrgRoleIssuer);
|
|
292
|
+
|
|
293
|
+
/** @internal */
|
|
294
|
+
export const PostAuthSwitchOrgRoleAdmin$inboundSchema: z.ZodMiniEnum<
|
|
295
|
+
typeof PostAuthSwitchOrgRoleAdmin
|
|
296
|
+
> = z.enum(PostAuthSwitchOrgRoleAdmin);
|
|
297
|
+
|
|
298
|
+
/** @internal */
|
|
299
|
+
export const PostAuthSwitchOrgRoleUnion$inboundSchema: z.ZodMiniType<
|
|
300
|
+
PostAuthSwitchOrgRoleUnion,
|
|
301
|
+
unknown
|
|
302
|
+
> = smartUnion([
|
|
303
|
+
PostAuthSwitchOrgRoleAdmin$inboundSchema,
|
|
304
|
+
PostAuthSwitchOrgRoleIssuer$inboundSchema,
|
|
305
|
+
PostAuthSwitchOrgRoleInvestor$inboundSchema,
|
|
306
|
+
PostAuthSwitchOrgRoleVerifier$inboundSchema,
|
|
307
|
+
PostAuthSwitchOrgRoleClient$inboundSchema,
|
|
308
|
+
PostAuthSwitchOrgRoleEnum$inboundSchema,
|
|
309
|
+
]);
|
|
310
|
+
|
|
311
|
+
export function postAuthSwitchOrgRoleUnionFromJSON(
|
|
312
|
+
jsonString: string,
|
|
313
|
+
): SafeParseResult<PostAuthSwitchOrgRoleUnion, SDKValidationError> {
|
|
314
|
+
return safeParse(
|
|
315
|
+
jsonString,
|
|
316
|
+
(x) => PostAuthSwitchOrgRoleUnion$inboundSchema.parse(JSON.parse(x)),
|
|
317
|
+
`Failed to parse 'PostAuthSwitchOrgRoleUnion' from JSON`,
|
|
318
|
+
);
|
|
319
|
+
}
|
|
320
|
+
|
|
321
|
+
/** @internal */
|
|
322
|
+
export const PostAuthSwitchOrgStatusSuspended$inboundSchema: z.ZodMiniEnum<
|
|
323
|
+
typeof PostAuthSwitchOrgStatusSuspended
|
|
324
|
+
> = z.enum(PostAuthSwitchOrgStatusSuspended);
|
|
325
|
+
|
|
326
|
+
/** @internal */
|
|
327
|
+
export const PostAuthSwitchOrgStatusActive$inboundSchema: z.ZodMiniEnum<
|
|
328
|
+
typeof PostAuthSwitchOrgStatusActive
|
|
329
|
+
> = z.enum(PostAuthSwitchOrgStatusActive);
|
|
330
|
+
|
|
331
|
+
/** @internal */
|
|
332
|
+
export const PostAuthSwitchOrgStatusPending$inboundSchema: z.ZodMiniEnum<
|
|
333
|
+
typeof PostAuthSwitchOrgStatusPending
|
|
334
|
+
> = z.enum(PostAuthSwitchOrgStatusPending);
|
|
335
|
+
|
|
336
|
+
/** @internal */
|
|
337
|
+
export const PostAuthSwitchOrgStatusInvited$inboundSchema: z.ZodMiniEnum<
|
|
338
|
+
typeof PostAuthSwitchOrgStatusInvited
|
|
339
|
+
> = z.enum(PostAuthSwitchOrgStatusInvited);
|
|
340
|
+
|
|
341
|
+
/** @internal */
|
|
342
|
+
export const PostAuthSwitchOrgStatusInitiated$inboundSchema: z.ZodMiniEnum<
|
|
343
|
+
typeof PostAuthSwitchOrgStatusInitiated
|
|
344
|
+
> = z.enum(PostAuthSwitchOrgStatusInitiated);
|
|
345
|
+
|
|
346
|
+
/** @internal */
|
|
347
|
+
export const PostAuthSwitchOrgStatusUnion$inboundSchema: z.ZodMiniType<
|
|
348
|
+
PostAuthSwitchOrgStatusUnion,
|
|
349
|
+
unknown
|
|
350
|
+
> = smartUnion([
|
|
351
|
+
PostAuthSwitchOrgStatusInitiated$inboundSchema,
|
|
352
|
+
PostAuthSwitchOrgStatusInvited$inboundSchema,
|
|
353
|
+
PostAuthSwitchOrgStatusPending$inboundSchema,
|
|
354
|
+
PostAuthSwitchOrgStatusActive$inboundSchema,
|
|
355
|
+
PostAuthSwitchOrgStatusSuspended$inboundSchema,
|
|
356
|
+
]);
|
|
357
|
+
|
|
358
|
+
export function postAuthSwitchOrgStatusUnionFromJSON(
|
|
359
|
+
jsonString: string,
|
|
360
|
+
): SafeParseResult<PostAuthSwitchOrgStatusUnion, SDKValidationError> {
|
|
361
|
+
return safeParse(
|
|
362
|
+
jsonString,
|
|
363
|
+
(x) => PostAuthSwitchOrgStatusUnion$inboundSchema.parse(JSON.parse(x)),
|
|
364
|
+
`Failed to parse 'PostAuthSwitchOrgStatusUnion' from JSON`,
|
|
365
|
+
);
|
|
366
|
+
}
|
|
367
|
+
|
|
368
|
+
/** @internal */
|
|
369
|
+
export const PostAuthSwitchOrgChainIdentities$inboundSchema: z.ZodMiniType<
|
|
370
|
+
PostAuthSwitchOrgChainIdentities,
|
|
371
|
+
unknown
|
|
372
|
+
> = z.object({
|
|
373
|
+
solana: types.optional(z.array(types.string())),
|
|
374
|
+
evm: types.optional(z.array(types.string())),
|
|
375
|
+
});
|
|
376
|
+
|
|
377
|
+
export function postAuthSwitchOrgChainIdentitiesFromJSON(
|
|
378
|
+
jsonString: string,
|
|
379
|
+
): SafeParseResult<PostAuthSwitchOrgChainIdentities, SDKValidationError> {
|
|
380
|
+
return safeParse(
|
|
381
|
+
jsonString,
|
|
382
|
+
(x) => PostAuthSwitchOrgChainIdentities$inboundSchema.parse(JSON.parse(x)),
|
|
383
|
+
`Failed to parse 'PostAuthSwitchOrgChainIdentities' from JSON`,
|
|
384
|
+
);
|
|
385
|
+
}
|
|
386
|
+
|
|
387
|
+
/** @internal */
|
|
388
|
+
export const PostAuthSwitchOrgKyc$inboundSchema: z.ZodMiniType<
|
|
389
|
+
PostAuthSwitchOrgKyc,
|
|
390
|
+
unknown
|
|
391
|
+
> = z.pipe(
|
|
392
|
+
z.object({
|
|
393
|
+
verified: types.boolean(),
|
|
394
|
+
level: types.optional(types.string()),
|
|
395
|
+
verified_at: types.optional(types.string()),
|
|
396
|
+
}),
|
|
397
|
+
z.transform((v) => {
|
|
398
|
+
return remap$(v, {
|
|
399
|
+
"verified_at": "verifiedAt",
|
|
400
|
+
});
|
|
401
|
+
}),
|
|
402
|
+
);
|
|
403
|
+
|
|
404
|
+
export function postAuthSwitchOrgKycFromJSON(
|
|
405
|
+
jsonString: string,
|
|
406
|
+
): SafeParseResult<PostAuthSwitchOrgKyc, SDKValidationError> {
|
|
407
|
+
return safeParse(
|
|
408
|
+
jsonString,
|
|
409
|
+
(x) => PostAuthSwitchOrgKyc$inboundSchema.parse(JSON.parse(x)),
|
|
410
|
+
`Failed to parse 'PostAuthSwitchOrgKyc' from JSON`,
|
|
411
|
+
);
|
|
412
|
+
}
|
|
413
|
+
|
|
414
|
+
/** @internal */
|
|
415
|
+
export const PostAuthSwitchOrgAttestations$inboundSchema: z.ZodMiniType<
|
|
416
|
+
PostAuthSwitchOrgAttestations,
|
|
417
|
+
unknown
|
|
418
|
+
> = z.object({
|
|
419
|
+
kyc: types.optional(z.lazy(() => PostAuthSwitchOrgKyc$inboundSchema)),
|
|
420
|
+
});
|
|
421
|
+
|
|
422
|
+
export function postAuthSwitchOrgAttestationsFromJSON(
|
|
423
|
+
jsonString: string,
|
|
424
|
+
): SafeParseResult<PostAuthSwitchOrgAttestations, SDKValidationError> {
|
|
425
|
+
return safeParse(
|
|
426
|
+
jsonString,
|
|
427
|
+
(x) => PostAuthSwitchOrgAttestations$inboundSchema.parse(JSON.parse(x)),
|
|
428
|
+
`Failed to parse 'PostAuthSwitchOrgAttestations' from JSON`,
|
|
429
|
+
);
|
|
430
|
+
}
|
|
431
|
+
|
|
432
|
+
/** @internal */
|
|
433
|
+
export const PostAuthSwitchOrgUser$inboundSchema: z.ZodMiniType<
|
|
434
|
+
PostAuthSwitchOrgUser,
|
|
435
|
+
unknown
|
|
436
|
+
> = z.pipe(
|
|
437
|
+
z.object({
|
|
438
|
+
id: types.string(),
|
|
439
|
+
email: types.string(),
|
|
440
|
+
display_name: types.nullable(types.string()),
|
|
441
|
+
avatar_url: z.optional(z.nullable(types.string())),
|
|
442
|
+
role: smartUnion([
|
|
443
|
+
PostAuthSwitchOrgRoleAdmin$inboundSchema,
|
|
444
|
+
PostAuthSwitchOrgRoleIssuer$inboundSchema,
|
|
445
|
+
PostAuthSwitchOrgRoleInvestor$inboundSchema,
|
|
446
|
+
PostAuthSwitchOrgRoleVerifier$inboundSchema,
|
|
447
|
+
PostAuthSwitchOrgRoleClient$inboundSchema,
|
|
448
|
+
PostAuthSwitchOrgRoleEnum$inboundSchema,
|
|
449
|
+
]),
|
|
450
|
+
status: smartUnion([
|
|
451
|
+
PostAuthSwitchOrgStatusInitiated$inboundSchema,
|
|
452
|
+
PostAuthSwitchOrgStatusInvited$inboundSchema,
|
|
453
|
+
PostAuthSwitchOrgStatusPending$inboundSchema,
|
|
454
|
+
PostAuthSwitchOrgStatusActive$inboundSchema,
|
|
455
|
+
PostAuthSwitchOrgStatusSuspended$inboundSchema,
|
|
456
|
+
]),
|
|
457
|
+
created_at: types.string(),
|
|
458
|
+
chain_identities: types.nullable(
|
|
459
|
+
z.lazy(() => PostAuthSwitchOrgChainIdentities$inboundSchema),
|
|
460
|
+
),
|
|
461
|
+
attestations: types.nullable(
|
|
462
|
+
z.lazy(() => PostAuthSwitchOrgAttestations$inboundSchema),
|
|
463
|
+
),
|
|
464
|
+
}),
|
|
465
|
+
z.transform((v) => {
|
|
466
|
+
return remap$(v, {
|
|
467
|
+
"display_name": "displayName",
|
|
468
|
+
"avatar_url": "avatarUrl",
|
|
469
|
+
"created_at": "createdAt",
|
|
470
|
+
"chain_identities": "chainIdentities",
|
|
471
|
+
});
|
|
472
|
+
}),
|
|
473
|
+
);
|
|
474
|
+
|
|
475
|
+
export function postAuthSwitchOrgUserFromJSON(
|
|
476
|
+
jsonString: string,
|
|
477
|
+
): SafeParseResult<PostAuthSwitchOrgUser, SDKValidationError> {
|
|
478
|
+
return safeParse(
|
|
479
|
+
jsonString,
|
|
480
|
+
(x) => PostAuthSwitchOrgUser$inboundSchema.parse(JSON.parse(x)),
|
|
481
|
+
`Failed to parse 'PostAuthSwitchOrgUser' from JSON`,
|
|
482
|
+
);
|
|
483
|
+
}
|
|
484
|
+
|
|
485
|
+
/** @internal */
|
|
486
|
+
export const PostAuthSwitchOrgOrganization$inboundSchema: z.ZodMiniType<
|
|
487
|
+
PostAuthSwitchOrgOrganization,
|
|
488
|
+
unknown
|
|
489
|
+
> = z.pipe(
|
|
490
|
+
z.object({
|
|
491
|
+
id: types.string(),
|
|
492
|
+
name: types.string(),
|
|
493
|
+
org_type: z.optional(z.nullable(types.string())),
|
|
494
|
+
status: z.optional(z.nullable(types.string())),
|
|
495
|
+
logo_url: z.optional(z.nullable(types.string())),
|
|
496
|
+
role: z.optional(z.nullable(types.string())),
|
|
497
|
+
}),
|
|
498
|
+
z.transform((v) => {
|
|
499
|
+
return remap$(v, {
|
|
500
|
+
"org_type": "orgType",
|
|
501
|
+
"logo_url": "logoUrl",
|
|
502
|
+
});
|
|
503
|
+
}),
|
|
504
|
+
);
|
|
505
|
+
|
|
506
|
+
export function postAuthSwitchOrgOrganizationFromJSON(
|
|
507
|
+
jsonString: string,
|
|
508
|
+
): SafeParseResult<PostAuthSwitchOrgOrganization, SDKValidationError> {
|
|
509
|
+
return safeParse(
|
|
510
|
+
jsonString,
|
|
511
|
+
(x) => PostAuthSwitchOrgOrganization$inboundSchema.parse(JSON.parse(x)),
|
|
512
|
+
`Failed to parse 'PostAuthSwitchOrgOrganization' from JSON`,
|
|
513
|
+
);
|
|
514
|
+
}
|
|
515
|
+
|
|
516
|
+
/** @internal */
|
|
517
|
+
export const PostAuthSwitchOrgResponse$inboundSchema: z.ZodMiniType<
|
|
518
|
+
PostAuthSwitchOrgResponse,
|
|
519
|
+
unknown
|
|
520
|
+
> = z.pipe(
|
|
521
|
+
z.object({
|
|
522
|
+
access_token: types.string(),
|
|
523
|
+
refresh_token: types.string(),
|
|
524
|
+
token_type: PostAuthSwitchOrgTokenType$inboundSchema,
|
|
525
|
+
expires_in: types.number(),
|
|
526
|
+
user: z.lazy(() => PostAuthSwitchOrgUser$inboundSchema),
|
|
527
|
+
organization: z.lazy(() => PostAuthSwitchOrgOrganization$inboundSchema),
|
|
528
|
+
mfa_enrollment_required: types.optional(types.boolean()),
|
|
529
|
+
}),
|
|
530
|
+
z.transform((v) => {
|
|
531
|
+
return remap$(v, {
|
|
532
|
+
"access_token": "accessToken",
|
|
533
|
+
"refresh_token": "refreshToken",
|
|
534
|
+
"token_type": "tokenType",
|
|
535
|
+
"expires_in": "expiresIn",
|
|
536
|
+
"mfa_enrollment_required": "mfaEnrollmentRequired",
|
|
537
|
+
});
|
|
538
|
+
}),
|
|
539
|
+
);
|
|
540
|
+
|
|
541
|
+
export function postAuthSwitchOrgResponseFromJSON(
|
|
542
|
+
jsonString: string,
|
|
543
|
+
): SafeParseResult<PostAuthSwitchOrgResponse, SDKValidationError> {
|
|
544
|
+
return safeParse(
|
|
545
|
+
jsonString,
|
|
546
|
+
(x) => PostAuthSwitchOrgResponse$inboundSchema.parse(JSON.parse(x)),
|
|
547
|
+
`Failed to parse 'PostAuthSwitchOrgResponse' from JSON`,
|
|
548
|
+
);
|
|
549
|
+
}
|
|
@@ -6,15 +6,29 @@ import * as z from "zod/v4-mini";
|
|
|
6
6
|
import { safeParse } from "../../lib/schemas.js";
|
|
7
7
|
import { Result as SafeParseResult } from "../../types/fp.js";
|
|
8
8
|
import * as types from "../../types/primitives.js";
|
|
9
|
+
import { smartUnion } from "../../types/smart-union.js";
|
|
9
10
|
import { SDKValidationError } from "../errors/sdk-validation-error.js";
|
|
10
11
|
|
|
11
|
-
export type
|
|
12
|
+
export type RequestBody2 = {
|
|
13
|
+
/**
|
|
14
|
+
* 6-digit email verification code.
|
|
15
|
+
*/
|
|
16
|
+
code: string;
|
|
17
|
+
/**
|
|
18
|
+
* Email address the code was sent to.
|
|
19
|
+
*/
|
|
20
|
+
email: string;
|
|
21
|
+
};
|
|
22
|
+
|
|
23
|
+
export type RequestBody1 = {
|
|
12
24
|
/**
|
|
13
25
|
* Email verification token from the email link.
|
|
14
26
|
*/
|
|
15
27
|
token: string;
|
|
16
28
|
};
|
|
17
29
|
|
|
30
|
+
export type PostAuthVerifyEmailRequest = RequestBody2 | RequestBody1;
|
|
31
|
+
|
|
18
32
|
/**
|
|
19
33
|
* Response
|
|
20
34
|
*/
|
|
@@ -30,18 +44,55 @@ export type PostAuthVerifyEmailResponse = {
|
|
|
30
44
|
};
|
|
31
45
|
|
|
32
46
|
/** @internal */
|
|
33
|
-
export type
|
|
47
|
+
export type RequestBody2$Outbound = {
|
|
48
|
+
code: string;
|
|
49
|
+
email: string;
|
|
50
|
+
};
|
|
51
|
+
|
|
52
|
+
/** @internal */
|
|
53
|
+
export const RequestBody2$outboundSchema: z.ZodMiniType<
|
|
54
|
+
RequestBody2$Outbound,
|
|
55
|
+
RequestBody2
|
|
56
|
+
> = z.object({
|
|
57
|
+
code: z.string(),
|
|
58
|
+
email: z.string(),
|
|
59
|
+
});
|
|
60
|
+
|
|
61
|
+
export function requestBody2ToJSON(requestBody2: RequestBody2): string {
|
|
62
|
+
return JSON.stringify(RequestBody2$outboundSchema.parse(requestBody2));
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
/** @internal */
|
|
66
|
+
export type RequestBody1$Outbound = {
|
|
34
67
|
token: string;
|
|
35
68
|
};
|
|
36
69
|
|
|
37
70
|
/** @internal */
|
|
38
|
-
export const
|
|
39
|
-
|
|
40
|
-
|
|
71
|
+
export const RequestBody1$outboundSchema: z.ZodMiniType<
|
|
72
|
+
RequestBody1$Outbound,
|
|
73
|
+
RequestBody1
|
|
41
74
|
> = z.object({
|
|
42
75
|
token: z.string(),
|
|
43
76
|
});
|
|
44
77
|
|
|
78
|
+
export function requestBody1ToJSON(requestBody1: RequestBody1): string {
|
|
79
|
+
return JSON.stringify(RequestBody1$outboundSchema.parse(requestBody1));
|
|
80
|
+
}
|
|
81
|
+
|
|
82
|
+
/** @internal */
|
|
83
|
+
export type PostAuthVerifyEmailRequest$Outbound =
|
|
84
|
+
| RequestBody2$Outbound
|
|
85
|
+
| RequestBody1$Outbound;
|
|
86
|
+
|
|
87
|
+
/** @internal */
|
|
88
|
+
export const PostAuthVerifyEmailRequest$outboundSchema: z.ZodMiniType<
|
|
89
|
+
PostAuthVerifyEmailRequest$Outbound,
|
|
90
|
+
PostAuthVerifyEmailRequest
|
|
91
|
+
> = smartUnion([
|
|
92
|
+
z.lazy(() => RequestBody2$outboundSchema),
|
|
93
|
+
z.lazy(() => RequestBody1$outboundSchema),
|
|
94
|
+
]);
|
|
95
|
+
|
|
45
96
|
export function postAuthVerifyEmailRequestToJSON(
|
|
46
97
|
postAuthVerifyEmailRequest: PostAuthVerifyEmailRequest,
|
|
47
98
|
): string {
|