@novu/api 0.1.0 → 0.1.1

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 (67) hide show
  1. package/FUNCTIONS.md +15 -8
  2. package/README.md +161 -73
  3. package/docs/sdks/credentials/README.md +44 -0
  4. package/docs/sdks/messages/README.md +8 -2
  5. package/docs/sdks/notifications/README.md +2 -32
  6. package/docs/sdks/novu/README.md +277 -47
  7. package/docs/sdks/novumessages/README.md +4 -4
  8. package/docs/sdks/novunotifications/README.md +4 -2
  9. package/docs/sdks/preferences/README.md +4 -4
  10. package/docs/sdks/properties/README.md +2 -2
  11. package/docs/sdks/subscribers/README.md +2 -4
  12. package/funcs/create.d.ts +9 -0
  13. package/funcs/create.d.ts.map +1 -0
  14. package/funcs/create.js +110 -0
  15. package/funcs/create.js.map +1 -0
  16. package/funcs/supportControllerFetchUserOrganizations.d.ts +10 -0
  17. package/funcs/supportControllerFetchUserOrganizations.d.ts.map +1 -0
  18. package/funcs/supportControllerFetchUserOrganizations.js +111 -0
  19. package/funcs/supportControllerFetchUserOrganizations.js.map +1 -0
  20. package/jsr.json +1 -1
  21. package/lib/config.d.ts +3 -3
  22. package/lib/config.js +3 -3
  23. package/lib/schemas.d.ts +1 -1
  24. package/lib/schemas.d.ts.map +1 -1
  25. package/lib/schemas.js +4 -1
  26. package/lib/schemas.js.map +1 -1
  27. package/models/components/createsupportthreaddto.d.ts +29 -0
  28. package/models/components/createsupportthreaddto.d.ts.map +1 -0
  29. package/models/components/createsupportthreaddto.js +59 -0
  30. package/models/components/createsupportthreaddto.js.map +1 -0
  31. package/models/components/index.d.ts +2 -0
  32. package/models/components/index.d.ts.map +1 -1
  33. package/models/components/index.js +2 -0
  34. package/models/components/index.js.map +1 -1
  35. package/models/components/plaincardrequestdto.d.ts +100 -0
  36. package/models/components/plaincardrequestdto.d.ts.map +1 -0
  37. package/models/components/plaincardrequestdto.js +139 -0
  38. package/models/components/plaincardrequestdto.js.map +1 -0
  39. package/models/operations/index.d.ts +2 -0
  40. package/models/operations/index.d.ts.map +1 -1
  41. package/models/operations/index.js +2 -0
  42. package/models/operations/index.js.map +1 -1
  43. package/models/operations/supportcontrollercreatethread.d.ts +35 -0
  44. package/models/operations/supportcontrollercreatethread.d.ts.map +1 -0
  45. package/models/operations/supportcontrollercreatethread.js +73 -0
  46. package/models/operations/supportcontrollercreatethread.js.map +1 -0
  47. package/models/operations/supportcontrollerfetchuserorganizations.d.ts +56 -0
  48. package/models/operations/supportcontrollerfetchuserorganizations.d.ts.map +1 -0
  49. package/models/operations/supportcontrollerfetchuserorganizations.js +96 -0
  50. package/models/operations/supportcontrollerfetchuserorganizations.js.map +1 -0
  51. package/package.json +5 -1
  52. package/sdk/sdk.d.ts +8 -0
  53. package/sdk/sdk.d.ts.map +1 -1
  54. package/sdk/sdk.js +14 -0
  55. package/sdk/sdk.js.map +1 -1
  56. package/sources/json-development.json +116 -0
  57. package/src/funcs/create.ts +148 -0
  58. package/src/funcs/supportControllerFetchUserOrganizations.ts +150 -0
  59. package/src/lib/config.ts +3 -3
  60. package/src/lib/schemas.ts +5 -0
  61. package/src/models/components/createsupportthreaddto.ts +66 -0
  62. package/src/models/components/index.ts +2 -0
  63. package/src/models/components/plaincardrequestdto.ts +223 -0
  64. package/src/models/operations/index.ts +2 -0
  65. package/src/models/operations/supportcontrollercreatethread.ts +90 -0
  66. package/src/models/operations/supportcontrollerfetchuserorganizations.ts +163 -0
  67. package/src/sdk/sdk.ts +34 -0
@@ -0,0 +1,148 @@
1
+ /*
2
+ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
3
+ */
4
+
5
+ import * as z from "zod";
6
+ import { NovuCore } from "../core.js";
7
+ import { encodeJSON, encodeSimple } from "../lib/encodings.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 { SDKError } from "../models/errors/sdkerror.js";
23
+ import { SDKValidationError } from "../models/errors/sdkvalidationerror.js";
24
+ import * as operations from "../models/operations/index.js";
25
+ import { Result } from "../types/fp.js";
26
+
27
+ export async function create(
28
+ client: NovuCore,
29
+ createSupportThreadDto: components.CreateSupportThreadDto,
30
+ idempotencyKey?: string | undefined,
31
+ options?: RequestOptions,
32
+ ): Promise<
33
+ Result<
34
+ void,
35
+ | SDKError
36
+ | SDKValidationError
37
+ | UnexpectedClientError
38
+ | InvalidRequestError
39
+ | RequestAbortedError
40
+ | RequestTimeoutError
41
+ | ConnectionError
42
+ >
43
+ > {
44
+ const input: operations.SupportControllerCreateThreadRequest = {
45
+ createSupportThreadDto: createSupportThreadDto,
46
+ idempotencyKey: idempotencyKey,
47
+ };
48
+
49
+ const parsed = safeParse(
50
+ input,
51
+ (value) =>
52
+ operations.SupportControllerCreateThreadRequest$outboundSchema.parse(
53
+ value,
54
+ ),
55
+ "Input validation failed",
56
+ );
57
+ if (!parsed.ok) {
58
+ return parsed;
59
+ }
60
+ const payload = parsed.value;
61
+ const body = encodeJSON("body", payload.CreateSupportThreadDto, {
62
+ explode: true,
63
+ });
64
+
65
+ const path = pathToFunc("/v1/support/create-thread")();
66
+
67
+ const headers = new Headers(compactMap({
68
+ "Content-Type": "application/json",
69
+ Accept: "*/*",
70
+ "idempotency-key": encodeSimple(
71
+ "idempotency-key",
72
+ payload["idempotency-key"],
73
+ { explode: false, charEncoding: "none" },
74
+ ),
75
+ }));
76
+
77
+ const secConfig = await extractSecurity(client._options.apiKey);
78
+ const securityInput = secConfig == null ? {} : { apiKey: secConfig };
79
+ const requestSecurity = resolveGlobalSecurity(securityInput);
80
+
81
+ const context = {
82
+ operationID: "SupportController_createThread",
83
+ oAuth2Scopes: [],
84
+
85
+ resolvedSecurity: requestSecurity,
86
+
87
+ securitySource: client._options.apiKey,
88
+ retryConfig: options?.retries
89
+ || client._options.retryConfig
90
+ || {
91
+ strategy: "backoff",
92
+ backoff: {
93
+ initialInterval: 1000,
94
+ maxInterval: 30000,
95
+ exponent: 1.5,
96
+ maxElapsedTime: 3600000,
97
+ },
98
+ retryConnectionErrors: true,
99
+ }
100
+ || { strategy: "none" },
101
+ retryCodes: options?.retryCodes || ["408", "409", "429", "5XX"],
102
+ };
103
+
104
+ const requestRes = client._createRequest(context, {
105
+ security: requestSecurity,
106
+ method: "POST",
107
+ baseURL: options?.serverURL,
108
+ path: path,
109
+ headers: headers,
110
+ body: body,
111
+ timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1,
112
+ }, options);
113
+ if (!requestRes.ok) {
114
+ return requestRes;
115
+ }
116
+ const req = requestRes.value;
117
+
118
+ const doResult = await client._do(req, {
119
+ context,
120
+ errorCodes: ["4XX", "5XX"],
121
+ retryConfig: context.retryConfig,
122
+ retryCodes: context.retryCodes,
123
+ });
124
+ if (!doResult.ok) {
125
+ return doResult;
126
+ }
127
+ const response = doResult.value;
128
+
129
+ const [result] = await M.match<
130
+ void,
131
+ | SDKError
132
+ | SDKValidationError
133
+ | UnexpectedClientError
134
+ | InvalidRequestError
135
+ | RequestAbortedError
136
+ | RequestTimeoutError
137
+ | ConnectionError
138
+ >(
139
+ M.nil(201, z.void()),
140
+ M.fail("4XX"),
141
+ M.fail("5XX"),
142
+ )(response);
143
+ if (!result.ok) {
144
+ return result;
145
+ }
146
+
147
+ return result;
148
+ }
@@ -0,0 +1,150 @@
1
+ /*
2
+ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
3
+ */
4
+
5
+ import { NovuCore } from "../core.js";
6
+ import { encodeJSON, encodeSimple } from "../lib/encodings.js";
7
+ import * as M from "../lib/matchers.js";
8
+ import { compactMap } from "../lib/primitives.js";
9
+ import { safeParse } from "../lib/schemas.js";
10
+ import { RequestOptions } from "../lib/sdks.js";
11
+ import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js";
12
+ import { pathToFunc } from "../lib/url.js";
13
+ import * as components from "../models/components/index.js";
14
+ import {
15
+ ConnectionError,
16
+ InvalidRequestError,
17
+ RequestAbortedError,
18
+ RequestTimeoutError,
19
+ UnexpectedClientError,
20
+ } from "../models/errors/httpclienterrors.js";
21
+ import { SDKError } from "../models/errors/sdkerror.js";
22
+ import { SDKValidationError } from "../models/errors/sdkvalidationerror.js";
23
+ import * as operations from "../models/operations/index.js";
24
+ import { Result } from "../types/fp.js";
25
+
26
+ export async function supportControllerFetchUserOrganizations(
27
+ client: NovuCore,
28
+ plainCardRequestDto: components.PlainCardRequestDto,
29
+ idempotencyKey?: string | undefined,
30
+ options?: RequestOptions,
31
+ ): Promise<
32
+ Result<
33
+ operations.SupportControllerFetchUserOrganizationsResponseBody,
34
+ | SDKError
35
+ | SDKValidationError
36
+ | UnexpectedClientError
37
+ | InvalidRequestError
38
+ | RequestAbortedError
39
+ | RequestTimeoutError
40
+ | ConnectionError
41
+ >
42
+ > {
43
+ const input: operations.SupportControllerFetchUserOrganizationsRequest = {
44
+ plainCardRequestDto: plainCardRequestDto,
45
+ idempotencyKey: idempotencyKey,
46
+ };
47
+
48
+ const parsed = safeParse(
49
+ input,
50
+ (value) =>
51
+ operations.SupportControllerFetchUserOrganizationsRequest$outboundSchema
52
+ .parse(value),
53
+ "Input validation failed",
54
+ );
55
+ if (!parsed.ok) {
56
+ return parsed;
57
+ }
58
+ const payload = parsed.value;
59
+ const body = encodeJSON("body", payload.PlainCardRequestDto, {
60
+ explode: true,
61
+ });
62
+
63
+ const path = pathToFunc("/v1/support/user-organizations")();
64
+
65
+ const headers = new Headers(compactMap({
66
+ "Content-Type": "application/json",
67
+ Accept: "application/json",
68
+ "idempotency-key": encodeSimple(
69
+ "idempotency-key",
70
+ payload["idempotency-key"],
71
+ { explode: false, charEncoding: "none" },
72
+ ),
73
+ }));
74
+
75
+ const secConfig = await extractSecurity(client._options.apiKey);
76
+ const securityInput = secConfig == null ? {} : { apiKey: secConfig };
77
+ const requestSecurity = resolveGlobalSecurity(securityInput);
78
+
79
+ const context = {
80
+ operationID: "SupportController_fetchUserOrganizations",
81
+ oAuth2Scopes: [],
82
+
83
+ resolvedSecurity: requestSecurity,
84
+
85
+ securitySource: client._options.apiKey,
86
+ retryConfig: options?.retries
87
+ || client._options.retryConfig
88
+ || {
89
+ strategy: "backoff",
90
+ backoff: {
91
+ initialInterval: 1000,
92
+ maxInterval: 30000,
93
+ exponent: 1.5,
94
+ maxElapsedTime: 3600000,
95
+ },
96
+ retryConnectionErrors: true,
97
+ }
98
+ || { strategy: "none" },
99
+ retryCodes: options?.retryCodes || ["408", "409", "429", "5XX"],
100
+ };
101
+
102
+ const requestRes = client._createRequest(context, {
103
+ security: requestSecurity,
104
+ method: "POST",
105
+ baseURL: options?.serverURL,
106
+ path: path,
107
+ headers: headers,
108
+ body: body,
109
+ timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1,
110
+ }, options);
111
+ if (!requestRes.ok) {
112
+ return requestRes;
113
+ }
114
+ const req = requestRes.value;
115
+
116
+ const doResult = await client._do(req, {
117
+ context,
118
+ errorCodes: ["4XX", "5XX"],
119
+ retryConfig: context.retryConfig,
120
+ retryCodes: context.retryCodes,
121
+ });
122
+ if (!doResult.ok) {
123
+ return doResult;
124
+ }
125
+ const response = doResult.value;
126
+
127
+ const [result] = await M.match<
128
+ operations.SupportControllerFetchUserOrganizationsResponseBody,
129
+ | SDKError
130
+ | SDKValidationError
131
+ | UnexpectedClientError
132
+ | InvalidRequestError
133
+ | RequestAbortedError
134
+ | RequestTimeoutError
135
+ | ConnectionError
136
+ >(
137
+ M.json(
138
+ 201,
139
+ operations
140
+ .SupportControllerFetchUserOrganizationsResponseBody$inboundSchema,
141
+ ),
142
+ M.fail("4XX"),
143
+ M.fail("5XX"),
144
+ )(response);
145
+ if (!result.ok) {
146
+ return result;
147
+ }
148
+
149
+ return result;
150
+ }
package/src/lib/config.ts CHANGED
@@ -55,7 +55,7 @@ export function serverURLFromOptions(options: SDKOptions): URL | null {
55
55
  export const SDK_METADATA = {
56
56
  language: "typescript",
57
57
  openapiDocVersion: "1.0",
58
- sdkVersion: "0.1.0",
59
- genVersion: "2.493.21",
60
- userAgent: "speakeasy-sdk/typescript 0.1.0 2.493.21 1.0 @novu/api",
58
+ sdkVersion: "0.1.1",
59
+ genVersion: "2.493.34",
60
+ userAgent: "speakeasy-sdk/typescript 0.1.1 2.493.34 1.0 @novu/api",
61
61
  } as const;
@@ -57,6 +57,7 @@ export function collectExtraKeys<
57
57
  >(
58
58
  obj: ZodObject<Shape, "strip", Catchall>,
59
59
  extrasKey: K,
60
+ optional: boolean,
60
61
  ): ZodEffects<
61
62
  typeof obj,
62
63
  & output<ZodObject<Shape, "strict">>
@@ -81,6 +82,10 @@ export function collectExtraKeys<
81
82
  delete val[key];
82
83
  }
83
84
 
85
+ if (optional && Object.keys(extras).length === 0) {
86
+ return val;
87
+ }
88
+
84
89
  return { ...val, [extrasKey]: extras };
85
90
  });
86
91
  }
@@ -0,0 +1,66 @@
1
+ /*
2
+ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
3
+ */
4
+
5
+ import * as z from "zod";
6
+ import { safeParse } from "../../lib/schemas.js";
7
+ import { Result as SafeParseResult } from "../../types/fp.js";
8
+ import { SDKValidationError } from "../errors/sdkvalidationerror.js";
9
+
10
+ export type CreateSupportThreadDto = {
11
+ text: string;
12
+ };
13
+
14
+ /** @internal */
15
+ export const CreateSupportThreadDto$inboundSchema: z.ZodType<
16
+ CreateSupportThreadDto,
17
+ z.ZodTypeDef,
18
+ unknown
19
+ > = z.object({
20
+ text: z.string(),
21
+ });
22
+
23
+ /** @internal */
24
+ export type CreateSupportThreadDto$Outbound = {
25
+ text: string;
26
+ };
27
+
28
+ /** @internal */
29
+ export const CreateSupportThreadDto$outboundSchema: z.ZodType<
30
+ CreateSupportThreadDto$Outbound,
31
+ z.ZodTypeDef,
32
+ CreateSupportThreadDto
33
+ > = z.object({
34
+ text: z.string(),
35
+ });
36
+
37
+ /**
38
+ * @internal
39
+ * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
40
+ */
41
+ export namespace CreateSupportThreadDto$ {
42
+ /** @deprecated use `CreateSupportThreadDto$inboundSchema` instead. */
43
+ export const inboundSchema = CreateSupportThreadDto$inboundSchema;
44
+ /** @deprecated use `CreateSupportThreadDto$outboundSchema` instead. */
45
+ export const outboundSchema = CreateSupportThreadDto$outboundSchema;
46
+ /** @deprecated use `CreateSupportThreadDto$Outbound` instead. */
47
+ export type Outbound = CreateSupportThreadDto$Outbound;
48
+ }
49
+
50
+ export function createSupportThreadDtoToJSON(
51
+ createSupportThreadDto: CreateSupportThreadDto,
52
+ ): string {
53
+ return JSON.stringify(
54
+ CreateSupportThreadDto$outboundSchema.parse(createSupportThreadDto),
55
+ );
56
+ }
57
+
58
+ export function createSupportThreadDtoFromJSON(
59
+ jsonString: string,
60
+ ): SafeParseResult<CreateSupportThreadDto, SDKValidationError> {
61
+ return safeParse(
62
+ jsonString,
63
+ (x) => CreateSupportThreadDto$inboundSchema.parse(JSON.parse(x)),
64
+ `Failed to parse 'CreateSupportThreadDto' from JSON`,
65
+ );
66
+ }
@@ -29,6 +29,7 @@ export * from "./channeltypeenum.js";
29
29
  export * from "./createdsubscriberdto.js";
30
30
  export * from "./createintegrationrequestdto.js";
31
31
  export * from "./createsubscriberrequestdto.js";
32
+ export * from "./createsupportthreaddto.js";
32
33
  export * from "./createtopicrequestdto.js";
33
34
  export * from "./createtopicresponsedto.js";
34
35
  export * from "./credentialsdto.js";
@@ -81,6 +82,7 @@ export * from "./notificationtriggervariable.js";
81
82
  export * from "./notificationtriggervariableresponse.js";
82
83
  export * from "./ordinalenum.js";
83
84
  export * from "./ordinalvalueenum.js";
85
+ export * from "./plaincardrequestdto.js";
84
86
  export * from "./preference.js";
85
87
  export * from "./preferencechannels.js";
86
88
  export * from "./providersidenum.js";
@@ -0,0 +1,223 @@
1
+ /*
2
+ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
3
+ */
4
+
5
+ import * as z from "zod";
6
+ import { safeParse } from "../../lib/schemas.js";
7
+ import { Result as SafeParseResult } from "../../types/fp.js";
8
+ import { SDKValidationError } from "../errors/sdkvalidationerror.js";
9
+
10
+ export type Customer = {};
11
+
12
+ export type PlainCardRequestDtoTenant = {};
13
+
14
+ export type Thread = {};
15
+
16
+ export type PlainCardRequestDto = {
17
+ cardKeys?: Array<string> | undefined;
18
+ customer?: Customer | null | undefined;
19
+ tenant?: PlainCardRequestDtoTenant | null | undefined;
20
+ thread?: Thread | null | undefined;
21
+ timestamp: string;
22
+ };
23
+
24
+ /** @internal */
25
+ export const Customer$inboundSchema: z.ZodType<
26
+ Customer,
27
+ z.ZodTypeDef,
28
+ unknown
29
+ > = z.object({});
30
+
31
+ /** @internal */
32
+ export type Customer$Outbound = {};
33
+
34
+ /** @internal */
35
+ export const Customer$outboundSchema: z.ZodType<
36
+ Customer$Outbound,
37
+ z.ZodTypeDef,
38
+ Customer
39
+ > = z.object({});
40
+
41
+ /**
42
+ * @internal
43
+ * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
44
+ */
45
+ export namespace Customer$ {
46
+ /** @deprecated use `Customer$inboundSchema` instead. */
47
+ export const inboundSchema = Customer$inboundSchema;
48
+ /** @deprecated use `Customer$outboundSchema` instead. */
49
+ export const outboundSchema = Customer$outboundSchema;
50
+ /** @deprecated use `Customer$Outbound` instead. */
51
+ export type Outbound = Customer$Outbound;
52
+ }
53
+
54
+ export function customerToJSON(customer: Customer): string {
55
+ return JSON.stringify(Customer$outboundSchema.parse(customer));
56
+ }
57
+
58
+ export function customerFromJSON(
59
+ jsonString: string,
60
+ ): SafeParseResult<Customer, SDKValidationError> {
61
+ return safeParse(
62
+ jsonString,
63
+ (x) => Customer$inboundSchema.parse(JSON.parse(x)),
64
+ `Failed to parse 'Customer' from JSON`,
65
+ );
66
+ }
67
+
68
+ /** @internal */
69
+ export const PlainCardRequestDtoTenant$inboundSchema: z.ZodType<
70
+ PlainCardRequestDtoTenant,
71
+ z.ZodTypeDef,
72
+ unknown
73
+ > = z.object({});
74
+
75
+ /** @internal */
76
+ export type PlainCardRequestDtoTenant$Outbound = {};
77
+
78
+ /** @internal */
79
+ export const PlainCardRequestDtoTenant$outboundSchema: z.ZodType<
80
+ PlainCardRequestDtoTenant$Outbound,
81
+ z.ZodTypeDef,
82
+ PlainCardRequestDtoTenant
83
+ > = z.object({});
84
+
85
+ /**
86
+ * @internal
87
+ * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
88
+ */
89
+ export namespace PlainCardRequestDtoTenant$ {
90
+ /** @deprecated use `PlainCardRequestDtoTenant$inboundSchema` instead. */
91
+ export const inboundSchema = PlainCardRequestDtoTenant$inboundSchema;
92
+ /** @deprecated use `PlainCardRequestDtoTenant$outboundSchema` instead. */
93
+ export const outboundSchema = PlainCardRequestDtoTenant$outboundSchema;
94
+ /** @deprecated use `PlainCardRequestDtoTenant$Outbound` instead. */
95
+ export type Outbound = PlainCardRequestDtoTenant$Outbound;
96
+ }
97
+
98
+ export function plainCardRequestDtoTenantToJSON(
99
+ plainCardRequestDtoTenant: PlainCardRequestDtoTenant,
100
+ ): string {
101
+ return JSON.stringify(
102
+ PlainCardRequestDtoTenant$outboundSchema.parse(plainCardRequestDtoTenant),
103
+ );
104
+ }
105
+
106
+ export function plainCardRequestDtoTenantFromJSON(
107
+ jsonString: string,
108
+ ): SafeParseResult<PlainCardRequestDtoTenant, SDKValidationError> {
109
+ return safeParse(
110
+ jsonString,
111
+ (x) => PlainCardRequestDtoTenant$inboundSchema.parse(JSON.parse(x)),
112
+ `Failed to parse 'PlainCardRequestDtoTenant' from JSON`,
113
+ );
114
+ }
115
+
116
+ /** @internal */
117
+ export const Thread$inboundSchema: z.ZodType<Thread, z.ZodTypeDef, unknown> = z
118
+ .object({});
119
+
120
+ /** @internal */
121
+ export type Thread$Outbound = {};
122
+
123
+ /** @internal */
124
+ export const Thread$outboundSchema: z.ZodType<
125
+ Thread$Outbound,
126
+ z.ZodTypeDef,
127
+ Thread
128
+ > = z.object({});
129
+
130
+ /**
131
+ * @internal
132
+ * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
133
+ */
134
+ export namespace Thread$ {
135
+ /** @deprecated use `Thread$inboundSchema` instead. */
136
+ export const inboundSchema = Thread$inboundSchema;
137
+ /** @deprecated use `Thread$outboundSchema` instead. */
138
+ export const outboundSchema = Thread$outboundSchema;
139
+ /** @deprecated use `Thread$Outbound` instead. */
140
+ export type Outbound = Thread$Outbound;
141
+ }
142
+
143
+ export function threadToJSON(thread: Thread): string {
144
+ return JSON.stringify(Thread$outboundSchema.parse(thread));
145
+ }
146
+
147
+ export function threadFromJSON(
148
+ jsonString: string,
149
+ ): SafeParseResult<Thread, SDKValidationError> {
150
+ return safeParse(
151
+ jsonString,
152
+ (x) => Thread$inboundSchema.parse(JSON.parse(x)),
153
+ `Failed to parse 'Thread' from JSON`,
154
+ );
155
+ }
156
+
157
+ /** @internal */
158
+ export const PlainCardRequestDto$inboundSchema: z.ZodType<
159
+ PlainCardRequestDto,
160
+ z.ZodTypeDef,
161
+ unknown
162
+ > = z.object({
163
+ cardKeys: z.array(z.string()).optional(),
164
+ customer: z.nullable(z.lazy(() => Customer$inboundSchema)).optional(),
165
+ tenant: z.nullable(z.lazy(() => PlainCardRequestDtoTenant$inboundSchema))
166
+ .optional(),
167
+ thread: z.nullable(z.lazy(() => Thread$inboundSchema)).optional(),
168
+ timestamp: z.string(),
169
+ });
170
+
171
+ /** @internal */
172
+ export type PlainCardRequestDto$Outbound = {
173
+ cardKeys?: Array<string> | undefined;
174
+ customer?: Customer$Outbound | null | undefined;
175
+ tenant?: PlainCardRequestDtoTenant$Outbound | null | undefined;
176
+ thread?: Thread$Outbound | null | undefined;
177
+ timestamp: string;
178
+ };
179
+
180
+ /** @internal */
181
+ export const PlainCardRequestDto$outboundSchema: z.ZodType<
182
+ PlainCardRequestDto$Outbound,
183
+ z.ZodTypeDef,
184
+ PlainCardRequestDto
185
+ > = z.object({
186
+ cardKeys: z.array(z.string()).optional(),
187
+ customer: z.nullable(z.lazy(() => Customer$outboundSchema)).optional(),
188
+ tenant: z.nullable(z.lazy(() => PlainCardRequestDtoTenant$outboundSchema))
189
+ .optional(),
190
+ thread: z.nullable(z.lazy(() => Thread$outboundSchema)).optional(),
191
+ timestamp: z.string(),
192
+ });
193
+
194
+ /**
195
+ * @internal
196
+ * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
197
+ */
198
+ export namespace PlainCardRequestDto$ {
199
+ /** @deprecated use `PlainCardRequestDto$inboundSchema` instead. */
200
+ export const inboundSchema = PlainCardRequestDto$inboundSchema;
201
+ /** @deprecated use `PlainCardRequestDto$outboundSchema` instead. */
202
+ export const outboundSchema = PlainCardRequestDto$outboundSchema;
203
+ /** @deprecated use `PlainCardRequestDto$Outbound` instead. */
204
+ export type Outbound = PlainCardRequestDto$Outbound;
205
+ }
206
+
207
+ export function plainCardRequestDtoToJSON(
208
+ plainCardRequestDto: PlainCardRequestDto,
209
+ ): string {
210
+ return JSON.stringify(
211
+ PlainCardRequestDto$outboundSchema.parse(plainCardRequestDto),
212
+ );
213
+ }
214
+
215
+ export function plainCardRequestDtoFromJSON(
216
+ jsonString: string,
217
+ ): SafeParseResult<PlainCardRequestDto, SDKValidationError> {
218
+ return safeParse(
219
+ jsonString,
220
+ (x) => PlainCardRequestDto$inboundSchema.parse(JSON.parse(x)),
221
+ `Failed to parse 'PlainCardRequestDto' from JSON`,
222
+ );
223
+ }
@@ -41,6 +41,8 @@ export * from "./subscriberscontrollerupdatesubscriberchannel.js";
41
41
  export * from "./subscriberscontrollerupdatesubscriberglobalpreferences.js";
42
42
  export * from "./subscriberscontrollerupdatesubscriberonlineflag.js";
43
43
  export * from "./subscriberscontrollerupdatesubscriberpreference.js";
44
+ export * from "./supportcontrollercreatethread.js";
45
+ export * from "./supportcontrollerfetchuserorganizations.js";
44
46
  export * from "./topicscontrollerassign.js";
45
47
  export * from "./topicscontrollercreatetopic.js";
46
48
  export * from "./topicscontrollerdeletetopic.js";