@clossir-tech/ts-sdk 0.9.7 → 0.9.9
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 +14 -12
- package/esm/funcs/assets-delete-orgs-by-org-id-assets-by-asset-id.d.ts +18 -0
- package/esm/funcs/assets-delete-orgs-by-org-id-assets-by-asset-id.d.ts.map +1 -0
- package/esm/funcs/assets-delete-orgs-by-org-id-assets-by-asset-id.js +111 -0
- package/esm/funcs/assets-delete-orgs-by-org-id-assets-by-asset-id.js.map +1 -0
- package/esm/funcs/auth-post-auth-refresh.js +1 -1
- package/esm/funcs/auth-post-auth-refresh.js.map +1 -1
- package/esm/funcs/auth-post-auth-reset-password.js +1 -1
- package/esm/funcs/auth-post-auth-reset-password.js.map +1 -1
- package/esm/funcs/compliance-post-orgs-by-org-id-assets-by-asset-id-compliance-policy.d.ts +1 -1
- package/esm/funcs/compliance-post-orgs-by-org-id-assets-by-asset-id-compliance-policy.js +1 -1
- package/esm/funcs/kyc-post-kyc-webhook-by-provider.d.ts +2 -2
- package/esm/funcs/kyc-post-kyc-webhook-by-provider.d.ts.map +1 -1
- package/esm/funcs/kyc-post-kyc-webhook-by-provider.js +10 -8
- package/esm/funcs/kyc-post-kyc-webhook-by-provider.js.map +1 -1
- package/esm/funcs/organizations-get-orgs.d.ts +2 -2
- package/esm/funcs/organizations-get-orgs.d.ts.map +1 -1
- package/esm/funcs/organizations-get-orgs.js +26 -5
- package/esm/funcs/organizations-get-orgs.js.map +1 -1
- package/esm/funcs/organizations-post-orgs-by-org-id-invitations-by-invitation-id-resend.js +3 -1
- package/esm/funcs/organizations-post-orgs-by-org-id-invitations-by-invitation-id-resend.js.map +1 -1
- package/esm/funcs/organizations-post-orgs-by-org-id-members-invite.js +3 -1
- package/esm/funcs/organizations-post-orgs-by-org-id-members-invite.js.map +1 -1
- package/esm/funcs/organizations-post-orgs-by-org-id-members.js +2 -0
- package/esm/funcs/organizations-post-orgs-by-org-id-members.js.map +1 -1
- package/esm/lib/config.d.ts +2 -2
- package/esm/lib/config.js +2 -2
- package/esm/models/operations/delete-orgs-by-org-id-assets-by-asset-id.d.ts +26 -0
- package/esm/models/operations/delete-orgs-by-org-id-assets-by-asset-id.d.ts.map +1 -0
- package/esm/models/operations/delete-orgs-by-org-id-assets-by-asset-id.js +21 -0
- package/esm/models/operations/delete-orgs-by-org-id-assets-by-asset-id.js.map +1 -0
- package/esm/models/operations/get-orgs.d.ts +48 -0
- package/esm/models/operations/get-orgs.d.ts.map +1 -1
- package/esm/models/operations/get-orgs.js +27 -0
- package/esm/models/operations/get-orgs.js.map +1 -1
- package/esm/models/operations/index.d.ts +1 -0
- package/esm/models/operations/index.d.ts.map +1 -1
- package/esm/models/operations/index.js +1 -0
- package/esm/models/operations/index.js.map +1 -1
- package/esm/models/operations/post-kyc-webhook-by-provider.d.ts +64 -0
- package/esm/models/operations/post-kyc-webhook-by-provider.d.ts.map +1 -1
- package/esm/models/operations/post-kyc-webhook-by-provider.js +24 -0
- package/esm/models/operations/post-kyc-webhook-by-provider.js.map +1 -1
- package/esm/models/operations/post-orgs-by-org-id-assets-by-asset-id-compliance-policy.d.ts +43 -1
- package/esm/models/operations/post-orgs-by-org-id-assets-by-asset-id-compliance-policy.d.ts.map +1 -1
- package/esm/models/operations/post-orgs-by-org-id-assets-by-asset-id-compliance-policy.js +29 -0
- package/esm/models/operations/post-orgs-by-org-id-assets-by-asset-id-compliance-policy.js.map +1 -1
- package/esm/sdk/assets.d.ts +7 -0
- package/esm/sdk/assets.d.ts.map +1 -1
- package/esm/sdk/assets.js +10 -0
- package/esm/sdk/assets.js.map +1 -1
- package/esm/sdk/compliance.d.ts +1 -1
- package/esm/sdk/compliance.js +1 -1
- package/esm/sdk/kyc.d.ts +2 -2
- package/esm/sdk/kyc.d.ts.map +1 -1
- package/esm/sdk/kyc.js +3 -3
- package/esm/sdk/kyc.js.map +1 -1
- package/esm/sdk/organizations.d.ts +2 -2
- package/esm/sdk/organizations.d.ts.map +1 -1
- package/esm/sdk/organizations.js +3 -3
- package/esm/sdk/organizations.js.map +1 -1
- package/jsr.json +1 -1
- package/package.json +1 -1
- package/src/funcs/assets-delete-orgs-by-org-id-assets-by-asset-id.ts +214 -0
- package/src/funcs/auth-post-auth-refresh.ts +1 -1
- package/src/funcs/auth-post-auth-reset-password.ts +1 -1
- 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 +10 -5
- package/src/funcs/organizations-get-orgs.ts +37 -2
- package/src/funcs/organizations-post-orgs-by-org-id-invitations-by-invitation-id-resend.ts +3 -0
- package/src/funcs/organizations-post-orgs-by-org-id-members-invite.ts +3 -0
- package/src/funcs/organizations-post-orgs-by-org-id-members.ts +3 -0
- package/src/lib/config.ts +2 -2
- package/src/models/operations/delete-orgs-by-org-id-assets-by-asset-id.ts +69 -0
- package/src/models/operations/get-orgs.ts +91 -0
- package/src/models/operations/index.ts +1 -0
- package/src/models/operations/post-kyc-webhook-by-provider.ts +102 -0
- package/src/models/operations/post-orgs-by-org-id-assets-by-asset-id-compliance-policy.ts +56 -1
- package/src/sdk/assets.ts +22 -0
- package/src/sdk/compliance.ts +1 -1
- package/src/sdk/kyc.ts +3 -1
- package/src/sdk/organizations.ts +5 -1
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
|
|
5
5
|
import * as z from "zod/v4-mini";
|
|
6
6
|
import { ClossirCore } from "../core.js";
|
|
7
|
-
import { encodeSimple } from "../lib/encodings.js";
|
|
7
|
+
import { encodeJSON, encodeSimple } from "../lib/encodings.js";
|
|
8
8
|
import { matchStatusCode } from "../lib/http.js";
|
|
9
9
|
import * as M from "../lib/matchers.js";
|
|
10
10
|
import { compactMap } from "../lib/primitives.js";
|
|
@@ -30,11 +30,12 @@ import { Result } from "../types/fp.js";
|
|
|
30
30
|
* KYC webhook
|
|
31
31
|
*
|
|
32
32
|
* @remarks
|
|
33
|
-
* Webhook endpoint for KYC provider callbacks.
|
|
33
|
+
* Webhook endpoint for KYC provider callbacks. The digest is verified against the raw request bytes; every rejection returns the same opaque 400.
|
|
34
34
|
*/
|
|
35
35
|
export function kycPostKYCWebhookByProvider(
|
|
36
36
|
client: ClossirCore,
|
|
37
37
|
provider: string,
|
|
38
|
+
body: operations.PostKycWebhookByProviderRequestBody,
|
|
38
39
|
options?: RequestOptions,
|
|
39
40
|
): APIPromise<
|
|
40
41
|
Result<
|
|
@@ -53,6 +54,7 @@ export function kycPostKYCWebhookByProvider(
|
|
|
53
54
|
return new APIPromise($do(
|
|
54
55
|
client,
|
|
55
56
|
provider,
|
|
57
|
+
body,
|
|
56
58
|
options,
|
|
57
59
|
));
|
|
58
60
|
}
|
|
@@ -60,6 +62,7 @@ export function kycPostKYCWebhookByProvider(
|
|
|
60
62
|
async function $do(
|
|
61
63
|
client: ClossirCore,
|
|
62
64
|
provider: string,
|
|
65
|
+
body: operations.PostKycWebhookByProviderRequestBody,
|
|
63
66
|
options?: RequestOptions,
|
|
64
67
|
): Promise<
|
|
65
68
|
[
|
|
@@ -80,6 +83,7 @@ async function $do(
|
|
|
80
83
|
> {
|
|
81
84
|
const input: operations.PostKycWebhookByProviderRequest = {
|
|
82
85
|
provider: provider,
|
|
86
|
+
body: body,
|
|
83
87
|
};
|
|
84
88
|
|
|
85
89
|
const parsed = safeParse(
|
|
@@ -92,7 +96,7 @@ async function $do(
|
|
|
92
96
|
return [parsed, { status: "invalid" }];
|
|
93
97
|
}
|
|
94
98
|
const payload = parsed.value;
|
|
95
|
-
const body =
|
|
99
|
+
const body$ = encodeJSON("body", payload.body, { explode: true });
|
|
96
100
|
|
|
97
101
|
const pathParams = {
|
|
98
102
|
provider: encodeSimple("provider", payload.provider, {
|
|
@@ -103,6 +107,7 @@ async function $do(
|
|
|
103
107
|
const path = pathToFunc("/kyc/webhook/{provider}")(pathParams);
|
|
104
108
|
|
|
105
109
|
const headers = new Headers(compactMap({
|
|
110
|
+
"Content-Type": "application/json",
|
|
106
111
|
Accept: "application/json",
|
|
107
112
|
}));
|
|
108
113
|
|
|
@@ -126,7 +131,7 @@ async function $do(
|
|
|
126
131
|
baseURL: options?.serverURL,
|
|
127
132
|
path: path,
|
|
128
133
|
headers: headers,
|
|
129
|
-
body: body
|
|
134
|
+
body: body$,
|
|
130
135
|
userAgent: client._options.userAgent,
|
|
131
136
|
timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1,
|
|
132
137
|
}, options);
|
|
@@ -164,7 +169,7 @@ async function $do(
|
|
|
164
169
|
| SDKValidationError
|
|
165
170
|
>(
|
|
166
171
|
M.json(200, operations.PostKycWebhookByProviderResponse$inboundSchema),
|
|
167
|
-
M.jsonErr([400, 428], errors.ProblemDetailsError$inboundSchema, {
|
|
172
|
+
M.jsonErr([400, 428, 429], errors.ProblemDetailsError$inboundSchema, {
|
|
168
173
|
ctype: "application/problem+json",
|
|
169
174
|
}),
|
|
170
175
|
M.jsonErr(500, errors.ProblemDetailsError$inboundSchema, {
|
|
@@ -2,10 +2,13 @@
|
|
|
2
2
|
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
3
|
*/
|
|
4
4
|
|
|
5
|
+
import * as z from "zod/v4-mini";
|
|
5
6
|
import { ClossirCore } from "../core.js";
|
|
7
|
+
import { encodeFormQuery } from "../lib/encodings.js";
|
|
6
8
|
import { matchStatusCode } from "../lib/http.js";
|
|
7
9
|
import * as M from "../lib/matchers.js";
|
|
8
10
|
import { compactMap } from "../lib/primitives.js";
|
|
11
|
+
import { safeParse } from "../lib/schemas.js";
|
|
9
12
|
import { RequestOptions } from "../lib/sdks.js";
|
|
10
13
|
import { resolveSecurity } from "../lib/security.js";
|
|
11
14
|
import { pathToFunc } from "../lib/url.js";
|
|
@@ -28,11 +31,13 @@ import { Result } from "../types/fp.js";
|
|
|
28
31
|
* List organizations
|
|
29
32
|
*
|
|
30
33
|
* @remarks
|
|
31
|
-
* Returns
|
|
34
|
+
* Returns a paginated list of organizations the caller may see. With a user JWT: every root organization in which the user holds an active membership. With an API key (requires the `orgs:read` permission): only the organization the key belongs to. Unauthenticated requests are rejected with 401; there is no public listing. Use `page` (1-based) and `limit` (default 50, max 200).
|
|
32
35
|
*/
|
|
33
36
|
export function organizationsGetOrgs(
|
|
34
37
|
client: ClossirCore,
|
|
35
38
|
security: operations.GetOrgsSecurity,
|
|
39
|
+
page?: string | undefined,
|
|
40
|
+
limit?: string | undefined,
|
|
36
41
|
options?: RequestOptions,
|
|
37
42
|
): APIPromise<
|
|
38
43
|
Result<
|
|
@@ -51,6 +56,8 @@ export function organizationsGetOrgs(
|
|
|
51
56
|
return new APIPromise($do(
|
|
52
57
|
client,
|
|
53
58
|
security,
|
|
59
|
+
page,
|
|
60
|
+
limit,
|
|
54
61
|
options,
|
|
55
62
|
));
|
|
56
63
|
}
|
|
@@ -58,6 +65,8 @@ export function organizationsGetOrgs(
|
|
|
58
65
|
async function $do(
|
|
59
66
|
client: ClossirCore,
|
|
60
67
|
security: operations.GetOrgsSecurity,
|
|
68
|
+
page?: string | undefined,
|
|
69
|
+
limit?: string | undefined,
|
|
61
70
|
options?: RequestOptions,
|
|
62
71
|
): Promise<
|
|
63
72
|
[
|
|
@@ -76,8 +85,29 @@ async function $do(
|
|
|
76
85
|
APICall,
|
|
77
86
|
]
|
|
78
87
|
> {
|
|
88
|
+
const input: operations.GetOrgsRequest = {
|
|
89
|
+
page: page,
|
|
90
|
+
limit: limit,
|
|
91
|
+
};
|
|
92
|
+
|
|
93
|
+
const parsed = safeParse(
|
|
94
|
+
input,
|
|
95
|
+
(value) => z.parse(operations.GetOrgsRequest$outboundSchema, value),
|
|
96
|
+
"Input validation failed",
|
|
97
|
+
);
|
|
98
|
+
if (!parsed.ok) {
|
|
99
|
+
return [parsed, { status: "invalid" }];
|
|
100
|
+
}
|
|
101
|
+
const payload = parsed.value;
|
|
102
|
+
const body = null;
|
|
103
|
+
|
|
79
104
|
const path = pathToFunc("/orgs/")();
|
|
80
105
|
|
|
106
|
+
const query = encodeFormQuery({
|
|
107
|
+
"limit": payload.limit,
|
|
108
|
+
"page": payload.page,
|
|
109
|
+
});
|
|
110
|
+
|
|
81
111
|
const headers = new Headers(compactMap({
|
|
82
112
|
Accept: "application/json",
|
|
83
113
|
}));
|
|
@@ -120,6 +150,8 @@ async function $do(
|
|
|
120
150
|
baseURL: options?.serverURL,
|
|
121
151
|
path: path,
|
|
122
152
|
headers: headers,
|
|
153
|
+
query: query,
|
|
154
|
+
body: body,
|
|
123
155
|
userAgent: client._options.userAgent,
|
|
124
156
|
timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1,
|
|
125
157
|
}, options);
|
|
@@ -157,7 +189,10 @@ async function $do(
|
|
|
157
189
|
| SDKValidationError
|
|
158
190
|
>(
|
|
159
191
|
M.json(200, operations.GetOrgsResponse$inboundSchema),
|
|
160
|
-
M.jsonErr([403, 428], errors.ProblemDetailsError$inboundSchema, {
|
|
192
|
+
M.jsonErr([401, 403, 428], errors.ProblemDetailsError$inboundSchema, {
|
|
193
|
+
ctype: "application/problem+json",
|
|
194
|
+
}),
|
|
195
|
+
M.jsonErr(500, errors.ProblemDetailsError$inboundSchema, {
|
|
161
196
|
ctype: "application/problem+json",
|
|
162
197
|
}),
|
|
163
198
|
M.fail("4XX"),
|
|
@@ -210,6 +210,9 @@ async function $do(
|
|
|
210
210
|
errors.ProblemDetailsError$inboundSchema,
|
|
211
211
|
{ ctype: "application/problem+json" },
|
|
212
212
|
),
|
|
213
|
+
M.jsonErr(502, errors.ProblemDetailsError$inboundSchema, {
|
|
214
|
+
ctype: "application/problem+json",
|
|
215
|
+
}),
|
|
213
216
|
M.fail("4XX"),
|
|
214
217
|
M.fail("5XX"),
|
|
215
218
|
)(response, req, { extraFields: responseFields });
|
|
@@ -199,6 +199,9 @@ async function $do(
|
|
|
199
199
|
errors.ProblemDetailsError$inboundSchema,
|
|
200
200
|
{ ctype: "application/problem+json" },
|
|
201
201
|
),
|
|
202
|
+
M.jsonErr([500, 502], errors.ProblemDetailsError$inboundSchema, {
|
|
203
|
+
ctype: "application/problem+json",
|
|
204
|
+
}),
|
|
202
205
|
M.fail("4XX"),
|
|
203
206
|
M.fail("5XX"),
|
|
204
207
|
)(response, req, { extraFields: responseFields });
|
|
@@ -194,6 +194,9 @@ async function $do(
|
|
|
194
194
|
M.jsonErr([400, 403, 409, 428], errors.ProblemDetailsError$inboundSchema, {
|
|
195
195
|
ctype: "application/problem+json",
|
|
196
196
|
}),
|
|
197
|
+
M.jsonErr(500, errors.ProblemDetailsError$inboundSchema, {
|
|
198
|
+
ctype: "application/problem+json",
|
|
199
|
+
}),
|
|
197
200
|
M.fail("4XX"),
|
|
198
201
|
M.fail("5XX"),
|
|
199
202
|
)(response, req, { extraFields: responseFields });
|
package/src/lib/config.ts
CHANGED
|
@@ -65,8 +65,8 @@ export function serverURLFromOptions(options: SDKOptions): URL | null {
|
|
|
65
65
|
export const SDK_METADATA = {
|
|
66
66
|
language: "typescript",
|
|
67
67
|
openapiDocVersion: "2.0.0",
|
|
68
|
-
sdkVersion: "0.9.
|
|
68
|
+
sdkVersion: "0.9.9",
|
|
69
69
|
genVersion: "2.916.4",
|
|
70
70
|
userAgent:
|
|
71
|
-
"speakeasy-sdk/typescript 0.9.
|
|
71
|
+
"speakeasy-sdk/typescript 0.9.9 2.916.4 2.0.0 @clossir-tech/ts-sdk",
|
|
72
72
|
} as const;
|
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
import * as z from "zod/v4-mini";
|
|
6
|
+
|
|
7
|
+
export type DeleteOrgsByOrgIdAssetsByAssetIdSecurity = {
|
|
8
|
+
bearerAuth?: string | undefined;
|
|
9
|
+
apiKeyAuth?: string | undefined;
|
|
10
|
+
};
|
|
11
|
+
|
|
12
|
+
export type DeleteOrgsByOrgIdAssetsByAssetIdRequest = {
|
|
13
|
+
orgId: string;
|
|
14
|
+
assetId: string;
|
|
15
|
+
};
|
|
16
|
+
|
|
17
|
+
/** @internal */
|
|
18
|
+
export type DeleteOrgsByOrgIdAssetsByAssetIdSecurity$Outbound = {
|
|
19
|
+
bearerAuth?: string | undefined;
|
|
20
|
+
apiKeyAuth?: string | undefined;
|
|
21
|
+
};
|
|
22
|
+
|
|
23
|
+
/** @internal */
|
|
24
|
+
export const DeleteOrgsByOrgIdAssetsByAssetIdSecurity$outboundSchema:
|
|
25
|
+
z.ZodMiniType<
|
|
26
|
+
DeleteOrgsByOrgIdAssetsByAssetIdSecurity$Outbound,
|
|
27
|
+
DeleteOrgsByOrgIdAssetsByAssetIdSecurity
|
|
28
|
+
> = z.object({
|
|
29
|
+
bearerAuth: z.optional(z.string()),
|
|
30
|
+
apiKeyAuth: z.optional(z.string()),
|
|
31
|
+
});
|
|
32
|
+
|
|
33
|
+
export function deleteOrgsByOrgIdAssetsByAssetIdSecurityToJSON(
|
|
34
|
+
deleteOrgsByOrgIdAssetsByAssetIdSecurity:
|
|
35
|
+
DeleteOrgsByOrgIdAssetsByAssetIdSecurity,
|
|
36
|
+
): string {
|
|
37
|
+
return JSON.stringify(
|
|
38
|
+
DeleteOrgsByOrgIdAssetsByAssetIdSecurity$outboundSchema.parse(
|
|
39
|
+
deleteOrgsByOrgIdAssetsByAssetIdSecurity,
|
|
40
|
+
),
|
|
41
|
+
);
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
/** @internal */
|
|
45
|
+
export type DeleteOrgsByOrgIdAssetsByAssetIdRequest$Outbound = {
|
|
46
|
+
orgId: string;
|
|
47
|
+
assetId: string;
|
|
48
|
+
};
|
|
49
|
+
|
|
50
|
+
/** @internal */
|
|
51
|
+
export const DeleteOrgsByOrgIdAssetsByAssetIdRequest$outboundSchema:
|
|
52
|
+
z.ZodMiniType<
|
|
53
|
+
DeleteOrgsByOrgIdAssetsByAssetIdRequest$Outbound,
|
|
54
|
+
DeleteOrgsByOrgIdAssetsByAssetIdRequest
|
|
55
|
+
> = z.object({
|
|
56
|
+
orgId: z.string(),
|
|
57
|
+
assetId: z.string(),
|
|
58
|
+
});
|
|
59
|
+
|
|
60
|
+
export function deleteOrgsByOrgIdAssetsByAssetIdRequestToJSON(
|
|
61
|
+
deleteOrgsByOrgIdAssetsByAssetIdRequest:
|
|
62
|
+
DeleteOrgsByOrgIdAssetsByAssetIdRequest,
|
|
63
|
+
): string {
|
|
64
|
+
return JSON.stringify(
|
|
65
|
+
DeleteOrgsByOrgIdAssetsByAssetIdRequest$outboundSchema.parse(
|
|
66
|
+
deleteOrgsByOrgIdAssetsByAssetIdRequest,
|
|
67
|
+
),
|
|
68
|
+
);
|
|
69
|
+
}
|
|
@@ -14,6 +14,17 @@ export type GetOrgsSecurity = {
|
|
|
14
14
|
apiKeyAuth?: string | undefined;
|
|
15
15
|
};
|
|
16
16
|
|
|
17
|
+
export type GetOrgsRequest = {
|
|
18
|
+
/**
|
|
19
|
+
* Page number (1-based, default: 1)
|
|
20
|
+
*/
|
|
21
|
+
page?: string | undefined;
|
|
22
|
+
/**
|
|
23
|
+
* Items per page (default: 50, max: 200)
|
|
24
|
+
*/
|
|
25
|
+
limit?: string | undefined;
|
|
26
|
+
};
|
|
27
|
+
|
|
17
28
|
export type GetOrgsOrganization = {
|
|
18
29
|
id: string;
|
|
19
30
|
name: string;
|
|
@@ -32,11 +43,39 @@ export type GetOrgsOrganization = {
|
|
|
32
43
|
updatedAt: string;
|
|
33
44
|
};
|
|
34
45
|
|
|
46
|
+
export type GetOrgsPagination = {
|
|
47
|
+
/**
|
|
48
|
+
* Current page number
|
|
49
|
+
*/
|
|
50
|
+
page: number;
|
|
51
|
+
/**
|
|
52
|
+
* Items per page
|
|
53
|
+
*/
|
|
54
|
+
limit: number;
|
|
55
|
+
/**
|
|
56
|
+
* Total item count
|
|
57
|
+
*/
|
|
58
|
+
total: number;
|
|
59
|
+
/**
|
|
60
|
+
* Total number of pages
|
|
61
|
+
*/
|
|
62
|
+
totalPages: number;
|
|
63
|
+
/**
|
|
64
|
+
* Whether a next page exists
|
|
65
|
+
*/
|
|
66
|
+
hasNext: boolean;
|
|
67
|
+
/**
|
|
68
|
+
* Whether a previous page exists
|
|
69
|
+
*/
|
|
70
|
+
hasPrev: boolean;
|
|
71
|
+
};
|
|
72
|
+
|
|
35
73
|
/**
|
|
36
74
|
* Response
|
|
37
75
|
*/
|
|
38
76
|
export type GetOrgsResponse = {
|
|
39
77
|
organizations: Array<GetOrgsOrganization>;
|
|
78
|
+
pagination: GetOrgsPagination;
|
|
40
79
|
};
|
|
41
80
|
|
|
42
81
|
/** @internal */
|
|
@@ -60,6 +99,25 @@ export function getOrgsSecurityToJSON(
|
|
|
60
99
|
return JSON.stringify(GetOrgsSecurity$outboundSchema.parse(getOrgsSecurity));
|
|
61
100
|
}
|
|
62
101
|
|
|
102
|
+
/** @internal */
|
|
103
|
+
export type GetOrgsRequest$Outbound = {
|
|
104
|
+
page?: string | undefined;
|
|
105
|
+
limit?: string | undefined;
|
|
106
|
+
};
|
|
107
|
+
|
|
108
|
+
/** @internal */
|
|
109
|
+
export const GetOrgsRequest$outboundSchema: z.ZodMiniType<
|
|
110
|
+
GetOrgsRequest$Outbound,
|
|
111
|
+
GetOrgsRequest
|
|
112
|
+
> = z.object({
|
|
113
|
+
page: z.optional(z.string()),
|
|
114
|
+
limit: z.optional(z.string()),
|
|
115
|
+
});
|
|
116
|
+
|
|
117
|
+
export function getOrgsRequestToJSON(getOrgsRequest: GetOrgsRequest): string {
|
|
118
|
+
return JSON.stringify(GetOrgsRequest$outboundSchema.parse(getOrgsRequest));
|
|
119
|
+
}
|
|
120
|
+
|
|
63
121
|
/** @internal */
|
|
64
122
|
export const GetOrgsOrganization$inboundSchema: z.ZodMiniType<
|
|
65
123
|
GetOrgsOrganization,
|
|
@@ -105,12 +163,45 @@ export function getOrgsOrganizationFromJSON(
|
|
|
105
163
|
);
|
|
106
164
|
}
|
|
107
165
|
|
|
166
|
+
/** @internal */
|
|
167
|
+
export const GetOrgsPagination$inboundSchema: z.ZodMiniType<
|
|
168
|
+
GetOrgsPagination,
|
|
169
|
+
unknown
|
|
170
|
+
> = z.pipe(
|
|
171
|
+
z.object({
|
|
172
|
+
page: types.number(),
|
|
173
|
+
limit: types.number(),
|
|
174
|
+
total: types.number(),
|
|
175
|
+
total_pages: types.number(),
|
|
176
|
+
has_next: types.boolean(),
|
|
177
|
+
has_prev: types.boolean(),
|
|
178
|
+
}),
|
|
179
|
+
z.transform((v) => {
|
|
180
|
+
return remap$(v, {
|
|
181
|
+
"total_pages": "totalPages",
|
|
182
|
+
"has_next": "hasNext",
|
|
183
|
+
"has_prev": "hasPrev",
|
|
184
|
+
});
|
|
185
|
+
}),
|
|
186
|
+
);
|
|
187
|
+
|
|
188
|
+
export function getOrgsPaginationFromJSON(
|
|
189
|
+
jsonString: string,
|
|
190
|
+
): SafeParseResult<GetOrgsPagination, SDKValidationError> {
|
|
191
|
+
return safeParse(
|
|
192
|
+
jsonString,
|
|
193
|
+
(x) => GetOrgsPagination$inboundSchema.parse(JSON.parse(x)),
|
|
194
|
+
`Failed to parse 'GetOrgsPagination' from JSON`,
|
|
195
|
+
);
|
|
196
|
+
}
|
|
197
|
+
|
|
108
198
|
/** @internal */
|
|
109
199
|
export const GetOrgsResponse$inboundSchema: z.ZodMiniType<
|
|
110
200
|
GetOrgsResponse,
|
|
111
201
|
unknown
|
|
112
202
|
> = z.object({
|
|
113
203
|
organizations: z.array(z.lazy(() => GetOrgsOrganization$inboundSchema)),
|
|
204
|
+
pagination: z.lazy(() => GetOrgsPagination$inboundSchema),
|
|
114
205
|
});
|
|
115
206
|
|
|
116
207
|
export function getOrgsResponseFromJSON(
|
|
@@ -8,6 +8,7 @@ export * from "./delete-attestations-by-id.js";
|
|
|
8
8
|
export * from "./delete-auth-mfa.js";
|
|
9
9
|
export * from "./delete-orgs-by-org-id-api-keys-by-key-id.js";
|
|
10
10
|
export * from "./delete-orgs-by-org-id-assets-by-asset-id-markets-by-market-id-orders-by-order-id.js";
|
|
11
|
+
export * from "./delete-orgs-by-org-id-assets-by-asset-id.js";
|
|
11
12
|
export * from "./delete-orgs-by-org-id-chains-by-chain-id.js";
|
|
12
13
|
export * from "./delete-orgs-by-org-id-issuer.js";
|
|
13
14
|
export * from "./delete-orgs-by-org-id-members-by-user-id.js";
|
|
@@ -8,11 +8,53 @@ import { Result as SafeParseResult } from "../../types/fp.js";
|
|
|
8
8
|
import * as types from "../../types/primitives.js";
|
|
9
9
|
import { SDKValidationError } from "../errors/sdk-validation-error.js";
|
|
10
10
|
|
|
11
|
+
export type ReviewResult = {
|
|
12
|
+
/**
|
|
13
|
+
* Review answer: GREEN, RED, etc.
|
|
14
|
+
*/
|
|
15
|
+
reviewAnswer?: string | undefined;
|
|
16
|
+
rejectLabels?: Array<string> | undefined;
|
|
17
|
+
reviewRejectType?: string | undefined;
|
|
18
|
+
};
|
|
19
|
+
|
|
20
|
+
export type PostKycWebhookByProviderRequestBody = {
|
|
21
|
+
/**
|
|
22
|
+
* Event type
|
|
23
|
+
*/
|
|
24
|
+
type?: string | undefined;
|
|
25
|
+
/**
|
|
26
|
+
* Sumsub applicant ID
|
|
27
|
+
*/
|
|
28
|
+
applicantId?: string | undefined;
|
|
29
|
+
/**
|
|
30
|
+
* Inspection ID
|
|
31
|
+
*/
|
|
32
|
+
inspectionId?: string | undefined;
|
|
33
|
+
/**
|
|
34
|
+
* Correlation ID
|
|
35
|
+
*/
|
|
36
|
+
correlationId?: string | undefined;
|
|
37
|
+
/**
|
|
38
|
+
* External user ID (our user ID)
|
|
39
|
+
*/
|
|
40
|
+
externalUserId?: string | undefined;
|
|
41
|
+
reviewResult?: ReviewResult | undefined;
|
|
42
|
+
/**
|
|
43
|
+
* Review status
|
|
44
|
+
*/
|
|
45
|
+
reviewStatus?: string | undefined;
|
|
46
|
+
/**
|
|
47
|
+
* Event creation timestamp
|
|
48
|
+
*/
|
|
49
|
+
createdAt?: string | undefined;
|
|
50
|
+
};
|
|
51
|
+
|
|
11
52
|
export type PostKycWebhookByProviderRequest = {
|
|
12
53
|
/**
|
|
13
54
|
* KYC provider name: sumsub, mock
|
|
14
55
|
*/
|
|
15
56
|
provider: string;
|
|
57
|
+
body: PostKycWebhookByProviderRequestBody;
|
|
16
58
|
};
|
|
17
59
|
|
|
18
60
|
/**
|
|
@@ -25,9 +67,68 @@ export type PostKycWebhookByProviderResponse = {
|
|
|
25
67
|
success: boolean;
|
|
26
68
|
};
|
|
27
69
|
|
|
70
|
+
/** @internal */
|
|
71
|
+
export type ReviewResult$Outbound = {
|
|
72
|
+
reviewAnswer?: string | undefined;
|
|
73
|
+
rejectLabels?: Array<string> | undefined;
|
|
74
|
+
reviewRejectType?: string | undefined;
|
|
75
|
+
};
|
|
76
|
+
|
|
77
|
+
/** @internal */
|
|
78
|
+
export const ReviewResult$outboundSchema: z.ZodMiniType<
|
|
79
|
+
ReviewResult$Outbound,
|
|
80
|
+
ReviewResult
|
|
81
|
+
> = z.object({
|
|
82
|
+
reviewAnswer: z.optional(z.string()),
|
|
83
|
+
rejectLabels: z.optional(z.array(z.string())),
|
|
84
|
+
reviewRejectType: z.optional(z.string()),
|
|
85
|
+
});
|
|
86
|
+
|
|
87
|
+
export function reviewResultToJSON(reviewResult: ReviewResult): string {
|
|
88
|
+
return JSON.stringify(ReviewResult$outboundSchema.parse(reviewResult));
|
|
89
|
+
}
|
|
90
|
+
|
|
91
|
+
/** @internal */
|
|
92
|
+
export type PostKycWebhookByProviderRequestBody$Outbound = {
|
|
93
|
+
type?: string | undefined;
|
|
94
|
+
applicantId?: string | undefined;
|
|
95
|
+
inspectionId?: string | undefined;
|
|
96
|
+
correlationId?: string | undefined;
|
|
97
|
+
externalUserId?: string | undefined;
|
|
98
|
+
reviewResult?: ReviewResult$Outbound | undefined;
|
|
99
|
+
reviewStatus?: string | undefined;
|
|
100
|
+
createdAt?: string | undefined;
|
|
101
|
+
};
|
|
102
|
+
|
|
103
|
+
/** @internal */
|
|
104
|
+
export const PostKycWebhookByProviderRequestBody$outboundSchema: z.ZodMiniType<
|
|
105
|
+
PostKycWebhookByProviderRequestBody$Outbound,
|
|
106
|
+
PostKycWebhookByProviderRequestBody
|
|
107
|
+
> = z.object({
|
|
108
|
+
type: z.optional(z.string()),
|
|
109
|
+
applicantId: z.optional(z.string()),
|
|
110
|
+
inspectionId: z.optional(z.string()),
|
|
111
|
+
correlationId: z.optional(z.string()),
|
|
112
|
+
externalUserId: z.optional(z.string()),
|
|
113
|
+
reviewResult: z.optional(z.lazy(() => ReviewResult$outboundSchema)),
|
|
114
|
+
reviewStatus: z.optional(z.string()),
|
|
115
|
+
createdAt: z.optional(z.string()),
|
|
116
|
+
});
|
|
117
|
+
|
|
118
|
+
export function postKycWebhookByProviderRequestBodyToJSON(
|
|
119
|
+
postKycWebhookByProviderRequestBody: PostKycWebhookByProviderRequestBody,
|
|
120
|
+
): string {
|
|
121
|
+
return JSON.stringify(
|
|
122
|
+
PostKycWebhookByProviderRequestBody$outboundSchema.parse(
|
|
123
|
+
postKycWebhookByProviderRequestBody,
|
|
124
|
+
),
|
|
125
|
+
);
|
|
126
|
+
}
|
|
127
|
+
|
|
28
128
|
/** @internal */
|
|
29
129
|
export type PostKycWebhookByProviderRequest$Outbound = {
|
|
30
130
|
provider: string;
|
|
131
|
+
body: PostKycWebhookByProviderRequestBody$Outbound;
|
|
31
132
|
};
|
|
32
133
|
|
|
33
134
|
/** @internal */
|
|
@@ -36,6 +137,7 @@ export const PostKycWebhookByProviderRequest$outboundSchema: z.ZodMiniType<
|
|
|
36
137
|
PostKycWebhookByProviderRequest
|
|
37
138
|
> = z.object({
|
|
38
139
|
provider: z.string(),
|
|
140
|
+
body: z.lazy(() => PostKycWebhookByProviderRequestBody$outboundSchema),
|
|
39
141
|
});
|
|
40
142
|
|
|
41
143
|
export function postKycWebhookByProviderRequestToJSON(
|
|
@@ -5,7 +5,8 @@
|
|
|
5
5
|
import * as z from "zod/v4-mini";
|
|
6
6
|
import { remap as remap$ } from "../../lib/primitives.js";
|
|
7
7
|
import { safeParse } from "../../lib/schemas.js";
|
|
8
|
-
import
|
|
8
|
+
import * as openEnums from "../../types/enums.js";
|
|
9
|
+
import { ClosedEnum, OpenEnum } from "../../types/enums.js";
|
|
9
10
|
import { Result as SafeParseResult } from "../../types/fp.js";
|
|
10
11
|
import * as types from "../../types/primitives.js";
|
|
11
12
|
import { smartUnion } from "../../types/smart-union.js";
|
|
@@ -98,6 +99,22 @@ export type PostOrgsByOrgIdAssetsByAssetIdCompliancePolicyRequest = {
|
|
|
98
99
|
body: PostOrgsByOrgIdAssetsByAssetIdCompliancePolicyRequestBody;
|
|
99
100
|
};
|
|
100
101
|
|
|
102
|
+
/**
|
|
103
|
+
* Which on-chain registration path ran: queued | not_requested | chain_not_deployed | no_contract_address | no_deployer_wallet | publish_failed. onChainSync is true exactly when this is queued.
|
|
104
|
+
*/
|
|
105
|
+
export const OnChainSyncOutcome2 = {
|
|
106
|
+
Queued: "queued",
|
|
107
|
+
NotRequested: "not_requested",
|
|
108
|
+
ChainNotDeployed: "chain_not_deployed",
|
|
109
|
+
NoContractAddress: "no_contract_address",
|
|
110
|
+
NoDeployerWallet: "no_deployer_wallet",
|
|
111
|
+
PublishFailed: "publish_failed",
|
|
112
|
+
} as const;
|
|
113
|
+
/**
|
|
114
|
+
* Which on-chain registration path ran: queued | not_requested | chain_not_deployed | no_contract_address | no_deployer_wallet | publish_failed. onChainSync is true exactly when this is queued.
|
|
115
|
+
*/
|
|
116
|
+
export type OnChainSyncOutcome2 = OpenEnum<typeof OnChainSyncOutcome2>;
|
|
117
|
+
|
|
101
118
|
/**
|
|
102
119
|
* Response
|
|
103
120
|
*/
|
|
@@ -105,11 +122,31 @@ export type PostOrgsByOrgIdAssetsByAssetIdCompliancePolicyResponseBody2 = {
|
|
|
105
122
|
updated: boolean;
|
|
106
123
|
assetId: string;
|
|
107
124
|
onChainSync: boolean;
|
|
125
|
+
/**
|
|
126
|
+
* Which on-chain registration path ran: queued | not_requested | chain_not_deployed | no_contract_address | no_deployer_wallet | publish_failed. onChainSync is true exactly when this is queued.
|
|
127
|
+
*/
|
|
128
|
+
onChainSyncOutcome?: OnChainSyncOutcome2 | undefined;
|
|
108
129
|
policyId?: string | undefined;
|
|
109
130
|
requestId: string;
|
|
110
131
|
message: string;
|
|
111
132
|
};
|
|
112
133
|
|
|
134
|
+
/**
|
|
135
|
+
* Which on-chain registration path ran: queued | not_requested | chain_not_deployed | no_contract_address | no_deployer_wallet | publish_failed. onChainSync is true exactly when this is queued.
|
|
136
|
+
*/
|
|
137
|
+
export const OnChainSyncOutcome1 = {
|
|
138
|
+
Queued: "queued",
|
|
139
|
+
NotRequested: "not_requested",
|
|
140
|
+
ChainNotDeployed: "chain_not_deployed",
|
|
141
|
+
NoContractAddress: "no_contract_address",
|
|
142
|
+
NoDeployerWallet: "no_deployer_wallet",
|
|
143
|
+
PublishFailed: "publish_failed",
|
|
144
|
+
} as const;
|
|
145
|
+
/**
|
|
146
|
+
* Which on-chain registration path ran: queued | not_requested | chain_not_deployed | no_contract_address | no_deployer_wallet | publish_failed. onChainSync is true exactly when this is queued.
|
|
147
|
+
*/
|
|
148
|
+
export type OnChainSyncOutcome1 = OpenEnum<typeof OnChainSyncOutcome1>;
|
|
149
|
+
|
|
113
150
|
/**
|
|
114
151
|
* Response
|
|
115
152
|
*/
|
|
@@ -117,6 +154,10 @@ export type PostOrgsByOrgIdAssetsByAssetIdCompliancePolicyResponseBody1 = {
|
|
|
117
154
|
updated: boolean;
|
|
118
155
|
assetId: string;
|
|
119
156
|
onChainSync: boolean;
|
|
157
|
+
/**
|
|
158
|
+
* Which on-chain registration path ran: queued | not_requested | chain_not_deployed | no_contract_address | no_deployer_wallet | publish_failed. onChainSync is true exactly when this is queued.
|
|
159
|
+
*/
|
|
160
|
+
onChainSyncOutcome?: OnChainSyncOutcome1 | undefined;
|
|
120
161
|
policyId?: string | undefined;
|
|
121
162
|
requestId: string;
|
|
122
163
|
message: string;
|
|
@@ -320,6 +361,12 @@ export function postOrgsByOrgIdAssetsByAssetIdCompliancePolicyRequestToJSON(
|
|
|
320
361
|
);
|
|
321
362
|
}
|
|
322
363
|
|
|
364
|
+
/** @internal */
|
|
365
|
+
export const OnChainSyncOutcome2$inboundSchema: z.ZodMiniType<
|
|
366
|
+
OnChainSyncOutcome2,
|
|
367
|
+
unknown
|
|
368
|
+
> = openEnums.inboundSchema(OnChainSyncOutcome2);
|
|
369
|
+
|
|
323
370
|
/** @internal */
|
|
324
371
|
export const PostOrgsByOrgIdAssetsByAssetIdCompliancePolicyResponseBody2$inboundSchema:
|
|
325
372
|
z.ZodMiniType<
|
|
@@ -329,6 +376,7 @@ export const PostOrgsByOrgIdAssetsByAssetIdCompliancePolicyResponseBody2$inbound
|
|
|
329
376
|
updated: types.boolean(),
|
|
330
377
|
assetId: types.string(),
|
|
331
378
|
onChainSync: types.boolean(),
|
|
379
|
+
onChainSyncOutcome: types.optional(OnChainSyncOutcome2$inboundSchema),
|
|
332
380
|
policyId: types.optional(types.string()),
|
|
333
381
|
requestId: types.string(),
|
|
334
382
|
message: types.string(),
|
|
@@ -349,6 +397,12 @@ export function postOrgsByOrgIdAssetsByAssetIdCompliancePolicyResponseBody2FromJ
|
|
|
349
397
|
);
|
|
350
398
|
}
|
|
351
399
|
|
|
400
|
+
/** @internal */
|
|
401
|
+
export const OnChainSyncOutcome1$inboundSchema: z.ZodMiniType<
|
|
402
|
+
OnChainSyncOutcome1,
|
|
403
|
+
unknown
|
|
404
|
+
> = openEnums.inboundSchema(OnChainSyncOutcome1);
|
|
405
|
+
|
|
352
406
|
/** @internal */
|
|
353
407
|
export const PostOrgsByOrgIdAssetsByAssetIdCompliancePolicyResponseBody1$inboundSchema:
|
|
354
408
|
z.ZodMiniType<
|
|
@@ -358,6 +412,7 @@ export const PostOrgsByOrgIdAssetsByAssetIdCompliancePolicyResponseBody1$inbound
|
|
|
358
412
|
updated: types.boolean(),
|
|
359
413
|
assetId: types.string(),
|
|
360
414
|
onChainSync: types.boolean(),
|
|
415
|
+
onChainSyncOutcome: types.optional(OnChainSyncOutcome1$inboundSchema),
|
|
361
416
|
policyId: types.optional(types.string()),
|
|
362
417
|
requestId: types.string(),
|
|
363
418
|
message: types.string(),
|