syllable-sdk 0.1.0-alpha.186 → 0.1.0-alpha.190

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (65) hide show
  1. package/README.md +11 -0
  2. package/docs/sdks/batches/README.md +4 -4
  3. package/docs/sdks/organizations/README.md +325 -0
  4. package/docs/sdks/workflows/README.md +8 -8
  5. package/funcs/organizationsCreate.d.ts +16 -0
  6. package/funcs/organizationsCreate.d.ts.map +1 -0
  7. package/funcs/organizationsCreate.js +120 -0
  8. package/funcs/organizationsCreate.js.map +1 -0
  9. package/funcs/organizationsDelete.d.ts +16 -0
  10. package/funcs/organizationsDelete.d.ts.map +1 -0
  11. package/funcs/organizationsDelete.js +105 -0
  12. package/funcs/organizationsDelete.js.map +1 -0
  13. package/funcs/organizationsOrganizationsGet.d.ts +15 -0
  14. package/funcs/organizationsOrganizationsGet.d.ts.map +1 -0
  15. package/funcs/organizationsOrganizationsGet.js +88 -0
  16. package/funcs/organizationsOrganizationsGet.js.map +1 -0
  17. package/funcs/organizationsUpdate.d.ts +16 -0
  18. package/funcs/organizationsUpdate.d.ts.map +1 -0
  19. package/funcs/organizationsUpdate.js +125 -0
  20. package/funcs/organizationsUpdate.js.map +1 -0
  21. package/jsr.json +1 -1
  22. package/lib/config.d.ts +2 -2
  23. package/lib/config.js +2 -2
  24. package/models/components/bodyorganizationscreate.d.ts +74 -0
  25. package/models/components/bodyorganizationscreate.d.ts.map +1 -0
  26. package/models/components/bodyorganizationscreate.js +114 -0
  27. package/models/components/bodyorganizationscreate.js.map +1 -0
  28. package/models/components/bodyorganizationsdelete.d.ts +32 -0
  29. package/models/components/bodyorganizationsdelete.d.ts.map +1 -0
  30. package/models/components/bodyorganizationsdelete.js +68 -0
  31. package/models/components/bodyorganizationsdelete.js.map +1 -0
  32. package/models/components/bodyorganizationsupdate.d.ts +79 -0
  33. package/models/components/bodyorganizationsupdate.d.ts.map +1 -0
  34. package/models/components/bodyorganizationsupdate.js +119 -0
  35. package/models/components/bodyorganizationsupdate.js.map +1 -0
  36. package/models/components/index.d.ts +4 -0
  37. package/models/components/index.d.ts.map +1 -1
  38. package/models/components/index.js +4 -0
  39. package/models/components/index.js.map +1 -1
  40. package/models/components/organizationresponse.d.ts +64 -0
  41. package/models/components/organizationresponse.d.ts.map +1 -0
  42. package/models/components/organizationresponse.js +90 -0
  43. package/models/components/organizationresponse.js.map +1 -0
  44. package/openapi.json +427 -33
  45. package/package.json +1 -1
  46. package/sdk/organizations.d.ts +33 -0
  47. package/sdk/organizations.d.ts.map +1 -0
  48. package/sdk/organizations.js +52 -0
  49. package/sdk/organizations.js.map +1 -0
  50. package/sdk/sdk.d.ts +3 -0
  51. package/sdk/sdk.d.ts.map +1 -1
  52. package/sdk/sdk.js +4 -0
  53. package/sdk/sdk.js.map +1 -1
  54. package/src/funcs/organizationsCreate.ts +157 -0
  55. package/src/funcs/organizationsDelete.ts +140 -0
  56. package/src/funcs/organizationsOrganizationsGet.ts +111 -0
  57. package/src/funcs/organizationsUpdate.ts +162 -0
  58. package/src/lib/config.ts +2 -2
  59. package/src/models/components/bodyorganizationscreate.ts +176 -0
  60. package/src/models/components/bodyorganizationsdelete.ts +78 -0
  61. package/src/models/components/bodyorganizationsupdate.ts +171 -0
  62. package/src/models/components/index.ts +4 -0
  63. package/src/models/components/organizationresponse.ts +134 -0
  64. package/src/sdk/organizations.ts +79 -0
  65. package/src/sdk/sdk.ts +6 -0
@@ -0,0 +1,162 @@
1
+ /*
2
+ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
3
+ */
4
+
5
+ import { SyllableSDKCore } from "../core.js";
6
+ import { appendForm } from "../lib/encodings.js";
7
+ import { readableStreamToArrayBuffer } from "../lib/files.js";
8
+ import * as M from "../lib/matchers.js";
9
+ import { compactMap } from "../lib/primitives.js";
10
+ import { safeParse } from "../lib/schemas.js";
11
+ import { RequestOptions } from "../lib/sdks.js";
12
+ import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js";
13
+ import { pathToFunc } from "../lib/url.js";
14
+ import * as components from "../models/components/index.js";
15
+ import {
16
+ ConnectionError,
17
+ InvalidRequestError,
18
+ RequestAbortedError,
19
+ RequestTimeoutError,
20
+ UnexpectedClientError,
21
+ } from "../models/errors/httpclienterrors.js";
22
+ import * as errors from "../models/errors/index.js";
23
+ import { SDKError } from "../models/errors/sdkerror.js";
24
+ import { SDKValidationError } from "../models/errors/sdkvalidationerror.js";
25
+ import { isBlobLike } from "../types/blobs.js";
26
+ import { Result } from "../types/fp.js";
27
+ import { isReadableStream } from "../types/streams.js";
28
+
29
+ /**
30
+ * Update Current Organization
31
+ *
32
+ * @remarks
33
+ * Update the current organization.
34
+ */
35
+ export async function organizationsUpdate(
36
+ client: SyllableSDKCore,
37
+ request: components.BodyOrganizationsUpdate,
38
+ options?: RequestOptions,
39
+ ): Promise<
40
+ Result<
41
+ components.OrganizationResponse,
42
+ | errors.HTTPValidationError
43
+ | SDKError
44
+ | SDKValidationError
45
+ | UnexpectedClientError
46
+ | InvalidRequestError
47
+ | RequestAbortedError
48
+ | RequestTimeoutError
49
+ | ConnectionError
50
+ >
51
+ > {
52
+ const parsed = safeParse(
53
+ request,
54
+ (value) => components.BodyOrganizationsUpdate$outboundSchema.parse(value),
55
+ "Input validation failed",
56
+ );
57
+ if (!parsed.ok) {
58
+ return parsed;
59
+ }
60
+ const payload = parsed.value;
61
+ const body = new FormData();
62
+
63
+ appendForm(body, "display_name", payload.display_name);
64
+ appendForm(body, "domains", payload.domains);
65
+ if (payload.description !== undefined) {
66
+ appendForm(body, "description", payload.description);
67
+ }
68
+ if (payload.logo !== undefined) {
69
+ if (isBlobLike(payload.logo)) {
70
+ appendForm(body, "logo", payload.logo);
71
+ } else if (isReadableStream(payload.logo.content)) {
72
+ const buffer = await readableStreamToArrayBuffer(payload.logo.content);
73
+ const blob = new Blob([buffer], { type: "application/octet-stream" });
74
+ appendForm(body, "logo", blob);
75
+ } else {
76
+ appendForm(
77
+ body,
78
+ "logo",
79
+ new Blob([payload.logo.content], { type: "application/octet-stream" }),
80
+ payload.logo.fileName,
81
+ );
82
+ }
83
+ }
84
+ if (payload.update_comments !== undefined) {
85
+ appendForm(body, "update_comments", payload.update_comments);
86
+ }
87
+
88
+ const path = pathToFunc("/api/v1/organizations/")();
89
+
90
+ const headers = new Headers(compactMap({
91
+ Accept: "application/json",
92
+ }));
93
+
94
+ const secConfig = await extractSecurity(client._options.apiKeyHeader);
95
+ const securityInput = secConfig == null ? {} : { apiKeyHeader: secConfig };
96
+ const requestSecurity = resolveGlobalSecurity(securityInput);
97
+
98
+ const context = {
99
+ baseURL: options?.serverURL ?? "",
100
+ operationID: "organizations_update",
101
+ oAuth2Scopes: [],
102
+
103
+ resolvedSecurity: requestSecurity,
104
+
105
+ securitySource: client._options.apiKeyHeader,
106
+ retryConfig: options?.retries
107
+ || client._options.retryConfig
108
+ || { strategy: "none" },
109
+ retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"],
110
+ };
111
+
112
+ const requestRes = client._createRequest(context, {
113
+ security: requestSecurity,
114
+ method: "PUT",
115
+ baseURL: options?.serverURL,
116
+ path: path,
117
+ headers: headers,
118
+ body: body,
119
+ timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1,
120
+ }, options);
121
+ if (!requestRes.ok) {
122
+ return requestRes;
123
+ }
124
+ const req = requestRes.value;
125
+
126
+ const doResult = await client._do(req, {
127
+ context,
128
+ errorCodes: ["422", "4XX", "5XX"],
129
+ retryConfig: context.retryConfig,
130
+ retryCodes: context.retryCodes,
131
+ });
132
+ if (!doResult.ok) {
133
+ return doResult;
134
+ }
135
+ const response = doResult.value;
136
+
137
+ const responseFields = {
138
+ HttpMeta: { Response: response, Request: req },
139
+ };
140
+
141
+ const [result] = await M.match<
142
+ components.OrganizationResponse,
143
+ | errors.HTTPValidationError
144
+ | SDKError
145
+ | SDKValidationError
146
+ | UnexpectedClientError
147
+ | InvalidRequestError
148
+ | RequestAbortedError
149
+ | RequestTimeoutError
150
+ | ConnectionError
151
+ >(
152
+ M.json(200, components.OrganizationResponse$inboundSchema),
153
+ M.jsonErr(422, errors.HTTPValidationError$inboundSchema),
154
+ M.fail("4XX"),
155
+ M.fail("5XX"),
156
+ )(response, { extraFields: responseFields });
157
+ if (!result.ok) {
158
+ return result;
159
+ }
160
+
161
+ return result;
162
+ }
package/src/lib/config.ts CHANGED
@@ -57,8 +57,8 @@ export function serverURLFromOptions(options: SDKOptions): URL | null {
57
57
  export const SDK_METADATA = {
58
58
  language: "typescript",
59
59
  openapiDocVersion: "0.0.2",
60
- sdkVersion: "0.1.0-alpha.186",
60
+ sdkVersion: "0.1.0-alpha.190",
61
61
  genVersion: "2.512.4",
62
62
  userAgent:
63
- "speakeasy-sdk/typescript 0.1.0-alpha.186 2.512.4 0.0.2 syllable-sdk",
63
+ "speakeasy-sdk/typescript 0.1.0-alpha.190 2.512.4 0.0.2 syllable-sdk",
64
64
  } as const;
@@ -0,0 +1,176 @@
1
+ /*
2
+ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
3
+ */
4
+
5
+ import * as z from "zod";
6
+ import { remap as remap$ } from "../../lib/primitives.js";
7
+ import { safeParse } from "../../lib/schemas.js";
8
+ import { blobLikeSchema } from "../../types/blobs.js";
9
+ import { Result as SafeParseResult } from "../../types/fp.js";
10
+ import { SDKValidationError } from "../errors/sdkvalidationerror.js";
11
+
12
+ export type BodyOrganizationsCreateLogo = {
13
+ fileName: string;
14
+ content: ReadableStream<Uint8Array> | Blob | ArrayBuffer | Uint8Array;
15
+ };
16
+
17
+ export type BodyOrganizationsCreate = {
18
+ /**
19
+ * The human-readable display name of the organization
20
+ */
21
+ displayName: string;
22
+ /**
23
+ * Comma-delimited list of domains that users at the organization may have in their email addresses
24
+ */
25
+ domains: string;
26
+ /**
27
+ * The organization logo image file to upload. Must be a PNG file and 120x120 pixels.
28
+ */
29
+ logo: BodyOrganizationsCreateLogo | Blob;
30
+ /**
31
+ * Description of the organization
32
+ */
33
+ description?: string | null | undefined;
34
+ };
35
+
36
+ /** @internal */
37
+ export const BodyOrganizationsCreateLogo$inboundSchema: z.ZodType<
38
+ BodyOrganizationsCreateLogo,
39
+ z.ZodTypeDef,
40
+ unknown
41
+ > = z.object({
42
+ fileName: z.string(),
43
+ content: z.union([
44
+ z.instanceof(ReadableStream<Uint8Array>),
45
+ z.instanceof(Blob),
46
+ z.instanceof(ArrayBuffer),
47
+ z.instanceof(Uint8Array),
48
+ ]),
49
+ });
50
+
51
+ /** @internal */
52
+ export type BodyOrganizationsCreateLogo$Outbound = {
53
+ fileName: string;
54
+ content: ReadableStream<Uint8Array> | Blob | ArrayBuffer | Uint8Array;
55
+ };
56
+
57
+ /** @internal */
58
+ export const BodyOrganizationsCreateLogo$outboundSchema: z.ZodType<
59
+ BodyOrganizationsCreateLogo$Outbound,
60
+ z.ZodTypeDef,
61
+ BodyOrganizationsCreateLogo
62
+ > = z.object({
63
+ fileName: z.string(),
64
+ content: z.union([
65
+ z.instanceof(ReadableStream<Uint8Array>),
66
+ z.instanceof(Blob),
67
+ z.instanceof(ArrayBuffer),
68
+ z.instanceof(Uint8Array),
69
+ ]),
70
+ });
71
+
72
+ /**
73
+ * @internal
74
+ * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
75
+ */
76
+ export namespace BodyOrganizationsCreateLogo$ {
77
+ /** @deprecated use `BodyOrganizationsCreateLogo$inboundSchema` instead. */
78
+ export const inboundSchema = BodyOrganizationsCreateLogo$inboundSchema;
79
+ /** @deprecated use `BodyOrganizationsCreateLogo$outboundSchema` instead. */
80
+ export const outboundSchema = BodyOrganizationsCreateLogo$outboundSchema;
81
+ /** @deprecated use `BodyOrganizationsCreateLogo$Outbound` instead. */
82
+ export type Outbound = BodyOrganizationsCreateLogo$Outbound;
83
+ }
84
+
85
+ export function bodyOrganizationsCreateLogoToJSON(
86
+ bodyOrganizationsCreateLogo: BodyOrganizationsCreateLogo,
87
+ ): string {
88
+ return JSON.stringify(
89
+ BodyOrganizationsCreateLogo$outboundSchema.parse(
90
+ bodyOrganizationsCreateLogo,
91
+ ),
92
+ );
93
+ }
94
+
95
+ export function bodyOrganizationsCreateLogoFromJSON(
96
+ jsonString: string,
97
+ ): SafeParseResult<BodyOrganizationsCreateLogo, SDKValidationError> {
98
+ return safeParse(
99
+ jsonString,
100
+ (x) => BodyOrganizationsCreateLogo$inboundSchema.parse(JSON.parse(x)),
101
+ `Failed to parse 'BodyOrganizationsCreateLogo' from JSON`,
102
+ );
103
+ }
104
+
105
+ /** @internal */
106
+ export const BodyOrganizationsCreate$inboundSchema: z.ZodType<
107
+ BodyOrganizationsCreate,
108
+ z.ZodTypeDef,
109
+ unknown
110
+ > = z.object({
111
+ display_name: z.string(),
112
+ domains: z.string(),
113
+ logo: z.lazy(() => BodyOrganizationsCreateLogo$inboundSchema),
114
+ description: z.nullable(z.string()).optional(),
115
+ }).transform((v) => {
116
+ return remap$(v, {
117
+ "display_name": "displayName",
118
+ });
119
+ });
120
+
121
+ /** @internal */
122
+ export type BodyOrganizationsCreate$Outbound = {
123
+ display_name: string;
124
+ domains: string;
125
+ logo: BodyOrganizationsCreateLogo$Outbound | Blob;
126
+ description?: string | null | undefined;
127
+ };
128
+
129
+ /** @internal */
130
+ export const BodyOrganizationsCreate$outboundSchema: z.ZodType<
131
+ BodyOrganizationsCreate$Outbound,
132
+ z.ZodTypeDef,
133
+ BodyOrganizationsCreate
134
+ > = z.object({
135
+ displayName: z.string(),
136
+ domains: z.string(),
137
+ logo: z.lazy(() => BodyOrganizationsCreateLogo$outboundSchema).or(
138
+ blobLikeSchema,
139
+ ),
140
+ description: z.nullable(z.string()).optional(),
141
+ }).transform((v) => {
142
+ return remap$(v, {
143
+ displayName: "display_name",
144
+ });
145
+ });
146
+
147
+ /**
148
+ * @internal
149
+ * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
150
+ */
151
+ export namespace BodyOrganizationsCreate$ {
152
+ /** @deprecated use `BodyOrganizationsCreate$inboundSchema` instead. */
153
+ export const inboundSchema = BodyOrganizationsCreate$inboundSchema;
154
+ /** @deprecated use `BodyOrganizationsCreate$outboundSchema` instead. */
155
+ export const outboundSchema = BodyOrganizationsCreate$outboundSchema;
156
+ /** @deprecated use `BodyOrganizationsCreate$Outbound` instead. */
157
+ export type Outbound = BodyOrganizationsCreate$Outbound;
158
+ }
159
+
160
+ export function bodyOrganizationsCreateToJSON(
161
+ bodyOrganizationsCreate: BodyOrganizationsCreate,
162
+ ): string {
163
+ return JSON.stringify(
164
+ BodyOrganizationsCreate$outboundSchema.parse(bodyOrganizationsCreate),
165
+ );
166
+ }
167
+
168
+ export function bodyOrganizationsCreateFromJSON(
169
+ jsonString: string,
170
+ ): SafeParseResult<BodyOrganizationsCreate, SDKValidationError> {
171
+ return safeParse(
172
+ jsonString,
173
+ (x) => BodyOrganizationsCreate$inboundSchema.parse(JSON.parse(x)),
174
+ `Failed to parse 'BodyOrganizationsCreate' from JSON`,
175
+ );
176
+ }
@@ -0,0 +1,78 @@
1
+ /*
2
+ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
3
+ */
4
+
5
+ import * as z from "zod";
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
+
11
+ export type BodyOrganizationsDelete = {
12
+ /**
13
+ * Comments explaining the deletion
14
+ */
15
+ deleteComments?: string | null | undefined;
16
+ };
17
+
18
+ /** @internal */
19
+ export const BodyOrganizationsDelete$inboundSchema: z.ZodType<
20
+ BodyOrganizationsDelete,
21
+ z.ZodTypeDef,
22
+ unknown
23
+ > = z.object({
24
+ delete_comments: z.nullable(z.string()).optional(),
25
+ }).transform((v) => {
26
+ return remap$(v, {
27
+ "delete_comments": "deleteComments",
28
+ });
29
+ });
30
+
31
+ /** @internal */
32
+ export type BodyOrganizationsDelete$Outbound = {
33
+ delete_comments?: string | null | undefined;
34
+ };
35
+
36
+ /** @internal */
37
+ export const BodyOrganizationsDelete$outboundSchema: z.ZodType<
38
+ BodyOrganizationsDelete$Outbound,
39
+ z.ZodTypeDef,
40
+ BodyOrganizationsDelete
41
+ > = z.object({
42
+ deleteComments: z.nullable(z.string()).optional(),
43
+ }).transform((v) => {
44
+ return remap$(v, {
45
+ deleteComments: "delete_comments",
46
+ });
47
+ });
48
+
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 BodyOrganizationsDelete$ {
54
+ /** @deprecated use `BodyOrganizationsDelete$inboundSchema` instead. */
55
+ export const inboundSchema = BodyOrganizationsDelete$inboundSchema;
56
+ /** @deprecated use `BodyOrganizationsDelete$outboundSchema` instead. */
57
+ export const outboundSchema = BodyOrganizationsDelete$outboundSchema;
58
+ /** @deprecated use `BodyOrganizationsDelete$Outbound` instead. */
59
+ export type Outbound = BodyOrganizationsDelete$Outbound;
60
+ }
61
+
62
+ export function bodyOrganizationsDeleteToJSON(
63
+ bodyOrganizationsDelete: BodyOrganizationsDelete,
64
+ ): string {
65
+ return JSON.stringify(
66
+ BodyOrganizationsDelete$outboundSchema.parse(bodyOrganizationsDelete),
67
+ );
68
+ }
69
+
70
+ export function bodyOrganizationsDeleteFromJSON(
71
+ jsonString: string,
72
+ ): SafeParseResult<BodyOrganizationsDelete, SDKValidationError> {
73
+ return safeParse(
74
+ jsonString,
75
+ (x) => BodyOrganizationsDelete$inboundSchema.parse(JSON.parse(x)),
76
+ `Failed to parse 'BodyOrganizationsDelete' from JSON`,
77
+ );
78
+ }
@@ -0,0 +1,171 @@
1
+ /*
2
+ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
3
+ */
4
+
5
+ import * as z from "zod";
6
+ import { remap as remap$ } from "../../lib/primitives.js";
7
+ import { safeParse } from "../../lib/schemas.js";
8
+ import { blobLikeSchema } from "../../types/blobs.js";
9
+ import { Result as SafeParseResult } from "../../types/fp.js";
10
+ import { SDKValidationError } from "../errors/sdkvalidationerror.js";
11
+
12
+ export type Logo = {
13
+ fileName: string;
14
+ content: ReadableStream<Uint8Array> | Blob | ArrayBuffer | Uint8Array;
15
+ };
16
+
17
+ export type BodyOrganizationsUpdate = {
18
+ /**
19
+ * The human-readable display name of the organization
20
+ */
21
+ displayName: string;
22
+ /**
23
+ * Comma-delimited list of domains that users at the organization may have in their email addresses
24
+ */
25
+ domains: string;
26
+ /**
27
+ * Description of the organization
28
+ */
29
+ description?: string | null | undefined;
30
+ /**
31
+ * The organization logo image file to upload. Must be a PNG file and 120x120 pixels. If not provided, the logo will not be updated.
32
+ */
33
+ logo?: Logo | Blob | undefined;
34
+ /**
35
+ * Comments about the update
36
+ */
37
+ updateComments?: string | null | undefined;
38
+ };
39
+
40
+ /** @internal */
41
+ export const Logo$inboundSchema: z.ZodType<Logo, z.ZodTypeDef, unknown> = z
42
+ .object({
43
+ fileName: z.string(),
44
+ content: z.union([
45
+ z.instanceof(ReadableStream<Uint8Array>),
46
+ z.instanceof(Blob),
47
+ z.instanceof(ArrayBuffer),
48
+ z.instanceof(Uint8Array),
49
+ ]),
50
+ });
51
+
52
+ /** @internal */
53
+ export type Logo$Outbound = {
54
+ fileName: string;
55
+ content: ReadableStream<Uint8Array> | Blob | ArrayBuffer | Uint8Array;
56
+ };
57
+
58
+ /** @internal */
59
+ export const Logo$outboundSchema: z.ZodType<Logo$Outbound, z.ZodTypeDef, Logo> =
60
+ z.object({
61
+ fileName: z.string(),
62
+ content: z.union([
63
+ z.instanceof(ReadableStream<Uint8Array>),
64
+ z.instanceof(Blob),
65
+ z.instanceof(ArrayBuffer),
66
+ z.instanceof(Uint8Array),
67
+ ]),
68
+ });
69
+
70
+ /**
71
+ * @internal
72
+ * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
73
+ */
74
+ export namespace Logo$ {
75
+ /** @deprecated use `Logo$inboundSchema` instead. */
76
+ export const inboundSchema = Logo$inboundSchema;
77
+ /** @deprecated use `Logo$outboundSchema` instead. */
78
+ export const outboundSchema = Logo$outboundSchema;
79
+ /** @deprecated use `Logo$Outbound` instead. */
80
+ export type Outbound = Logo$Outbound;
81
+ }
82
+
83
+ export function logoToJSON(logo: Logo): string {
84
+ return JSON.stringify(Logo$outboundSchema.parse(logo));
85
+ }
86
+
87
+ export function logoFromJSON(
88
+ jsonString: string,
89
+ ): SafeParseResult<Logo, SDKValidationError> {
90
+ return safeParse(
91
+ jsonString,
92
+ (x) => Logo$inboundSchema.parse(JSON.parse(x)),
93
+ `Failed to parse 'Logo' from JSON`,
94
+ );
95
+ }
96
+
97
+ /** @internal */
98
+ export const BodyOrganizationsUpdate$inboundSchema: z.ZodType<
99
+ BodyOrganizationsUpdate,
100
+ z.ZodTypeDef,
101
+ unknown
102
+ > = z.object({
103
+ display_name: z.string(),
104
+ domains: z.string(),
105
+ description: z.nullable(z.string()).optional(),
106
+ logo: z.lazy(() => Logo$inboundSchema).optional(),
107
+ update_comments: z.nullable(z.string()).optional(),
108
+ }).transform((v) => {
109
+ return remap$(v, {
110
+ "display_name": "displayName",
111
+ "update_comments": "updateComments",
112
+ });
113
+ });
114
+
115
+ /** @internal */
116
+ export type BodyOrganizationsUpdate$Outbound = {
117
+ display_name: string;
118
+ domains: string;
119
+ description?: string | null | undefined;
120
+ logo?: Logo$Outbound | Blob | undefined;
121
+ update_comments?: string | null | undefined;
122
+ };
123
+
124
+ /** @internal */
125
+ export const BodyOrganizationsUpdate$outboundSchema: z.ZodType<
126
+ BodyOrganizationsUpdate$Outbound,
127
+ z.ZodTypeDef,
128
+ BodyOrganizationsUpdate
129
+ > = z.object({
130
+ displayName: z.string(),
131
+ domains: z.string(),
132
+ description: z.nullable(z.string()).optional(),
133
+ logo: z.lazy(() => Logo$outboundSchema).or(blobLikeSchema).optional(),
134
+ updateComments: z.nullable(z.string()).optional(),
135
+ }).transform((v) => {
136
+ return remap$(v, {
137
+ displayName: "display_name",
138
+ updateComments: "update_comments",
139
+ });
140
+ });
141
+
142
+ /**
143
+ * @internal
144
+ * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
145
+ */
146
+ export namespace BodyOrganizationsUpdate$ {
147
+ /** @deprecated use `BodyOrganizationsUpdate$inboundSchema` instead. */
148
+ export const inboundSchema = BodyOrganizationsUpdate$inboundSchema;
149
+ /** @deprecated use `BodyOrganizationsUpdate$outboundSchema` instead. */
150
+ export const outboundSchema = BodyOrganizationsUpdate$outboundSchema;
151
+ /** @deprecated use `BodyOrganizationsUpdate$Outbound` instead. */
152
+ export type Outbound = BodyOrganizationsUpdate$Outbound;
153
+ }
154
+
155
+ export function bodyOrganizationsUpdateToJSON(
156
+ bodyOrganizationsUpdate: BodyOrganizationsUpdate,
157
+ ): string {
158
+ return JSON.stringify(
159
+ BodyOrganizationsUpdate$outboundSchema.parse(bodyOrganizationsUpdate),
160
+ );
161
+ }
162
+
163
+ export function bodyOrganizationsUpdateFromJSON(
164
+ jsonString: string,
165
+ ): SafeParseResult<BodyOrganizationsUpdate, SDKValidationError> {
166
+ return safeParse(
167
+ jsonString,
168
+ (x) => BodyOrganizationsUpdate$inboundSchema.parse(JSON.parse(x)),
169
+ `Failed to parse 'BodyOrganizationsUpdate' from JSON`,
170
+ );
171
+ }
@@ -22,6 +22,9 @@ export * from "./batchdetails.js";
22
22
  export * from "./batchproperties.js";
23
23
  export * from "./batchstatus.js";
24
24
  export * from "./bodyinsightsfolderuploadfile.js";
25
+ export * from "./bodyorganizationscreate.js";
26
+ export * from "./bodyorganizationsdelete.js";
27
+ export * from "./bodyorganizationsupdate.js";
25
28
  export * from "./bodyoutboundbatchdelete.js";
26
29
  export * from "./bodyoutboundbatchupload.js";
27
30
  export * from "./campaignproperties.js";
@@ -125,6 +128,7 @@ export * from "./listresponsesessionlabel.js";
125
128
  export * from "./listresponsetoolresponse.js";
126
129
  export * from "./listresponseuserresponse.js";
127
130
  export * from "./orderbydirection.js";
131
+ export * from "./organizationresponse.js";
128
132
  export * from "./outboundcampaign.js";
129
133
  export * from "./outboundcampaigninput.js";
130
134
  export * from "./permissiongroupresponse.js";