@novu/api 0.0.5 → 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.
- package/FUNCTIONS.md +15 -8
- package/README.md +218 -45
- package/docs/sdks/credentials/README.md +44 -0
- package/docs/sdks/messages/README.md +8 -2
- package/docs/sdks/notifications/README.md +2 -32
- package/docs/sdks/novu/README.md +247 -244
- package/docs/sdks/novumessages/README.md +4 -4
- package/docs/sdks/novunotifications/README.md +4 -2
- package/docs/sdks/preferences/README.md +4 -4
- package/docs/sdks/properties/README.md +2 -2
- package/docs/sdks/subscribers/README.md +2 -4
- package/funcs/create.d.ts +9 -0
- package/funcs/create.d.ts.map +1 -0
- package/funcs/{healthControllerHealthCheck.js → create.js} +17 -16
- package/funcs/create.js.map +1 -0
- package/funcs/supportControllerFetchUserOrganizations.d.ts +10 -0
- package/funcs/supportControllerFetchUserOrganizations.d.ts.map +1 -0
- package/funcs/{generateRandomNumber.js → supportControllerFetchUserOrganizations.js} +16 -31
- package/funcs/supportControllerFetchUserOrganizations.js.map +1 -0
- package/jsr.json +1 -1
- package/lib/config.d.ts +3 -3
- package/lib/config.js +3 -3
- package/lib/schemas.d.ts +1 -1
- package/lib/schemas.d.ts.map +1 -1
- package/lib/schemas.js +4 -1
- package/lib/schemas.js.map +1 -1
- package/models/components/createsupportthreaddto.d.ts +29 -0
- package/models/components/createsupportthreaddto.d.ts.map +1 -0
- package/models/components/{idempotencetestingresponse.js → createsupportthreaddto.js} +19 -19
- package/models/components/createsupportthreaddto.js.map +1 -0
- package/models/components/index.d.ts +2 -3
- package/models/components/index.d.ts.map +1 -1
- package/models/components/index.js +2 -3
- package/models/components/index.js.map +1 -1
- package/models/components/plaincardrequestdto.d.ts +100 -0
- package/models/components/plaincardrequestdto.d.ts.map +1 -0
- package/models/components/plaincardrequestdto.js +139 -0
- package/models/components/plaincardrequestdto.js.map +1 -0
- package/models/errors/index.d.ts +0 -1
- package/models/errors/index.d.ts.map +1 -1
- package/models/errors/index.js +0 -1
- package/models/errors/index.js.map +1 -1
- package/models/operations/index.d.ts +2 -3
- package/models/operations/index.d.ts.map +1 -1
- package/models/operations/index.js +2 -3
- package/models/operations/index.js.map +1 -1
- package/models/operations/supportcontrollercreatethread.d.ts +35 -0
- package/models/operations/supportcontrollercreatethread.d.ts.map +1 -0
- package/models/operations/supportcontrollercreatethread.js +73 -0
- package/models/operations/supportcontrollercreatethread.js.map +1 -0
- package/models/operations/supportcontrollerfetchuserorganizations.d.ts +56 -0
- package/models/operations/supportcontrollerfetchuserorganizations.d.ts.map +1 -0
- package/models/operations/supportcontrollerfetchuserorganizations.js +96 -0
- package/models/operations/supportcontrollerfetchuserorganizations.js.map +1 -0
- package/package.json +5 -1
- package/sdk/sdk.d.ts +8 -3
- package/sdk/sdk.d.ts.map +1 -1
- package/sdk/sdk.js +14 -12
- package/sdk/sdk.js.map +1 -1
- package/sources/json-development.json +116 -1161
- package/src/funcs/{testIdempotency.ts → create.ts} +15 -57
- package/src/funcs/{healthControllerHealthCheck.ts → supportControllerFetchUserOrganizations.ts} +22 -25
- package/src/lib/config.ts +3 -3
- package/src/lib/schemas.ts +5 -0
- package/src/models/components/createsupportthreaddto.ts +66 -0
- package/src/models/components/index.ts +2 -3
- package/src/models/components/plaincardrequestdto.ts +223 -0
- package/src/models/errors/index.ts +0 -1
- package/src/models/operations/index.ts +2 -3
- package/src/models/operations/supportcontrollercreatethread.ts +90 -0
- package/src/models/operations/supportcontrollerfetchuserorganizations.ts +163 -0
- package/src/sdk/sdk.ts +34 -38
- package/funcs/generateRandomNumber.d.ts +0 -10
- package/funcs/generateRandomNumber.d.ts.map +0 -1
- package/funcs/generateRandomNumber.js.map +0 -1
- package/funcs/healthControllerHealthCheck.d.ts +0 -10
- package/funcs/healthControllerHealthCheck.d.ts.map +0 -1
- package/funcs/healthControllerHealthCheck.js.map +0 -1
- package/funcs/testIdempotency.d.ts +0 -11
- package/funcs/testIdempotency.d.ts.map +0 -1
- package/funcs/testIdempotency.js +0 -129
- package/funcs/testIdempotency.js.map +0 -1
- package/models/components/idempotencetestingresponse.d.ts +0 -32
- package/models/components/idempotencetestingresponse.d.ts.map +0 -1
- package/models/components/idempotencetestingresponse.js.map +0 -1
- package/models/components/idempotencybehaviorenum.d.ts +0 -37
- package/models/components/idempotencybehaviorenum.d.ts.map +0 -1
- package/models/components/idempotencybehaviorenum.js +0 -54
- package/models/components/idempotencybehaviorenum.js.map +0 -1
- package/models/components/idempotencytestingdto.d.ts +0 -33
- package/models/components/idempotencytestingdto.d.ts.map +0 -1
- package/models/components/idempotencytestingdto.js +0 -60
- package/models/components/idempotencytestingdto.js.map +0 -1
- package/models/errors/healthcontrollerhealthcheck.d.ts +0 -153
- package/models/errors/healthcontrollerhealthcheck.d.ts.map +0 -1
- package/models/errors/healthcontrollerhealthcheck.js +0 -190
- package/models/errors/healthcontrollerhealthcheck.js.map +0 -1
- package/models/operations/healthcontrollergeneraterandomnumber.d.ts +0 -64
- package/models/operations/healthcontrollergeneraterandomnumber.d.ts.map +0 -1
- package/models/operations/healthcontrollergeneraterandomnumber.js +0 -108
- package/models/operations/healthcontrollergeneraterandomnumber.js.map +0 -1
- package/models/operations/healthcontrollerhealthcheck.d.ts +0 -165
- package/models/operations/healthcontrollerhealthcheck.d.ts.map +0 -1
- package/models/operations/healthcontrollerhealthcheck.js +0 -206
- package/models/operations/healthcontrollerhealthcheck.js.map +0 -1
- package/models/operations/healthcontrollertestidempotency.d.ts +0 -66
- package/models/operations/healthcontrollertestidempotency.d.ts.map +0 -1
- package/models/operations/healthcontrollertestidempotency.js +0 -112
- package/models/operations/healthcontrollertestidempotency.js.map +0 -1
- package/src/funcs/generateRandomNumber.ts +0 -183
- package/src/models/components/idempotencetestingresponse.ts +0 -69
- package/src/models/components/idempotencybehaviorenum.ts +0 -42
- package/src/models/components/idempotencytestingdto.ts +0 -74
- package/src/models/errors/healthcontrollerhealthcheck.ts +0 -291
- package/src/models/operations/healthcontrollergeneraterandomnumber.ts +0 -177
- package/src/models/operations/healthcontrollerhealthcheck.ts +0 -358
- package/src/models/operations/healthcontrollertestidempotency.ts +0 -174
|
@@ -2,6 +2,7 @@
|
|
|
2
2
|
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
3
|
*/
|
|
4
4
|
|
|
5
|
+
import * as z from "zod";
|
|
5
6
|
import { NovuCore } from "../core.js";
|
|
6
7
|
import { encodeJSON, encodeSimple } from "../lib/encodings.js";
|
|
7
8
|
import * as M from "../lib/matchers.js";
|
|
@@ -18,24 +19,19 @@ import {
|
|
|
18
19
|
RequestTimeoutError,
|
|
19
20
|
UnexpectedClientError,
|
|
20
21
|
} from "../models/errors/httpclienterrors.js";
|
|
21
|
-
import * as errors from "../models/errors/index.js";
|
|
22
22
|
import { SDKError } from "../models/errors/sdkerror.js";
|
|
23
23
|
import { SDKValidationError } from "../models/errors/sdkvalidationerror.js";
|
|
24
24
|
import * as operations from "../models/operations/index.js";
|
|
25
25
|
import { Result } from "../types/fp.js";
|
|
26
26
|
|
|
27
|
-
export async function
|
|
27
|
+
export async function create(
|
|
28
28
|
client: NovuCore,
|
|
29
|
-
|
|
29
|
+
createSupportThreadDto: components.CreateSupportThreadDto,
|
|
30
30
|
idempotencyKey?: string | undefined,
|
|
31
31
|
options?: RequestOptions,
|
|
32
32
|
): Promise<
|
|
33
33
|
Result<
|
|
34
|
-
|
|
35
|
-
| errors.ErrorDto
|
|
36
|
-
| errors.ErrorDto
|
|
37
|
-
| errors.ValidationErrorDto
|
|
38
|
-
| errors.ErrorDto
|
|
34
|
+
void,
|
|
39
35
|
| SDKError
|
|
40
36
|
| SDKValidationError
|
|
41
37
|
| UnexpectedClientError
|
|
@@ -45,15 +41,15 @@ export async function testIdempotency(
|
|
|
45
41
|
| ConnectionError
|
|
46
42
|
>
|
|
47
43
|
> {
|
|
48
|
-
const input: operations.
|
|
49
|
-
|
|
44
|
+
const input: operations.SupportControllerCreateThreadRequest = {
|
|
45
|
+
createSupportThreadDto: createSupportThreadDto,
|
|
50
46
|
idempotencyKey: idempotencyKey,
|
|
51
47
|
};
|
|
52
48
|
|
|
53
49
|
const parsed = safeParse(
|
|
54
50
|
input,
|
|
55
51
|
(value) =>
|
|
56
|
-
operations.
|
|
52
|
+
operations.SupportControllerCreateThreadRequest$outboundSchema.parse(
|
|
57
53
|
value,
|
|
58
54
|
),
|
|
59
55
|
"Input validation failed",
|
|
@@ -62,15 +58,15 @@ export async function testIdempotency(
|
|
|
62
58
|
return parsed;
|
|
63
59
|
}
|
|
64
60
|
const payload = parsed.value;
|
|
65
|
-
const body = encodeJSON("body", payload.
|
|
61
|
+
const body = encodeJSON("body", payload.CreateSupportThreadDto, {
|
|
66
62
|
explode: true,
|
|
67
63
|
});
|
|
68
64
|
|
|
69
|
-
const path = pathToFunc("/v1/
|
|
65
|
+
const path = pathToFunc("/v1/support/create-thread")();
|
|
70
66
|
|
|
71
67
|
const headers = new Headers(compactMap({
|
|
72
68
|
"Content-Type": "application/json",
|
|
73
|
-
Accept: "
|
|
69
|
+
Accept: "*/*",
|
|
74
70
|
"idempotency-key": encodeSimple(
|
|
75
71
|
"idempotency-key",
|
|
76
72
|
payload["idempotency-key"],
|
|
@@ -83,7 +79,7 @@ export async function testIdempotency(
|
|
|
83
79
|
const requestSecurity = resolveGlobalSecurity(securityInput);
|
|
84
80
|
|
|
85
81
|
const context = {
|
|
86
|
-
operationID: "
|
|
82
|
+
operationID: "SupportController_createThread",
|
|
87
83
|
oAuth2Scopes: [],
|
|
88
84
|
|
|
89
85
|
resolvedSecurity: requestSecurity,
|
|
@@ -121,23 +117,7 @@ export async function testIdempotency(
|
|
|
121
117
|
|
|
122
118
|
const doResult = await client._do(req, {
|
|
123
119
|
context,
|
|
124
|
-
errorCodes: [
|
|
125
|
-
"400",
|
|
126
|
-
"401",
|
|
127
|
-
"403",
|
|
128
|
-
"404",
|
|
129
|
-
"405",
|
|
130
|
-
"409",
|
|
131
|
-
"413",
|
|
132
|
-
"414",
|
|
133
|
-
"415",
|
|
134
|
-
"422",
|
|
135
|
-
"429",
|
|
136
|
-
"4XX",
|
|
137
|
-
"500",
|
|
138
|
-
"503",
|
|
139
|
-
"5XX",
|
|
140
|
-
],
|
|
120
|
+
errorCodes: ["4XX", "5XX"],
|
|
141
121
|
retryConfig: context.retryConfig,
|
|
142
122
|
retryCodes: context.retryCodes,
|
|
143
123
|
});
|
|
@@ -146,16 +126,8 @@ export async function testIdempotency(
|
|
|
146
126
|
}
|
|
147
127
|
const response = doResult.value;
|
|
148
128
|
|
|
149
|
-
const responseFields = {
|
|
150
|
-
HttpMeta: { Response: response, Request: req },
|
|
151
|
-
};
|
|
152
|
-
|
|
153
129
|
const [result] = await M.match<
|
|
154
|
-
|
|
155
|
-
| errors.ErrorDto
|
|
156
|
-
| errors.ErrorDto
|
|
157
|
-
| errors.ValidationErrorDto
|
|
158
|
-
| errors.ErrorDto
|
|
130
|
+
void,
|
|
159
131
|
| SDKError
|
|
160
132
|
| SDKValidationError
|
|
161
133
|
| UnexpectedClientError
|
|
@@ -164,24 +136,10 @@ export async function testIdempotency(
|
|
|
164
136
|
| RequestTimeoutError
|
|
165
137
|
| ConnectionError
|
|
166
138
|
>(
|
|
167
|
-
M.
|
|
168
|
-
201,
|
|
169
|
-
operations.HealthControllerTestIdempotencyResponse$inboundSchema,
|
|
170
|
-
{ hdrs: true, key: "Result" },
|
|
171
|
-
),
|
|
172
|
-
M.jsonErr(
|
|
173
|
-
[400, 401, 403, 404, 405, 409, 413, 415],
|
|
174
|
-
errors.ErrorDto$inboundSchema,
|
|
175
|
-
{ hdrs: true },
|
|
176
|
-
),
|
|
177
|
-
M.jsonErr(414, errors.ErrorDto$inboundSchema),
|
|
178
|
-
M.jsonErr(422, errors.ValidationErrorDto$inboundSchema, { hdrs: true }),
|
|
179
|
-
M.fail(429),
|
|
180
|
-
M.jsonErr(500, errors.ErrorDto$inboundSchema, { hdrs: true }),
|
|
181
|
-
M.fail(503),
|
|
139
|
+
M.nil(201, z.void()),
|
|
182
140
|
M.fail("4XX"),
|
|
183
141
|
M.fail("5XX"),
|
|
184
|
-
)(response
|
|
142
|
+
)(response);
|
|
185
143
|
if (!result.ok) {
|
|
186
144
|
return result;
|
|
187
145
|
}
|
package/src/funcs/{healthControllerHealthCheck.ts → supportControllerFetchUserOrganizations.ts}
RENAMED
|
@@ -3,13 +3,14 @@
|
|
|
3
3
|
*/
|
|
4
4
|
|
|
5
5
|
import { NovuCore } from "../core.js";
|
|
6
|
-
import { encodeSimple } from "../lib/encodings.js";
|
|
6
|
+
import { encodeJSON, encodeSimple } from "../lib/encodings.js";
|
|
7
7
|
import * as M from "../lib/matchers.js";
|
|
8
8
|
import { compactMap } from "../lib/primitives.js";
|
|
9
9
|
import { safeParse } from "../lib/schemas.js";
|
|
10
10
|
import { RequestOptions } from "../lib/sdks.js";
|
|
11
11
|
import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js";
|
|
12
12
|
import { pathToFunc } from "../lib/url.js";
|
|
13
|
+
import * as components from "../models/components/index.js";
|
|
13
14
|
import {
|
|
14
15
|
ConnectionError,
|
|
15
16
|
InvalidRequestError,
|
|
@@ -17,20 +18,19 @@ import {
|
|
|
17
18
|
RequestTimeoutError,
|
|
18
19
|
UnexpectedClientError,
|
|
19
20
|
} from "../models/errors/httpclienterrors.js";
|
|
20
|
-
import * as errors from "../models/errors/index.js";
|
|
21
21
|
import { SDKError } from "../models/errors/sdkerror.js";
|
|
22
22
|
import { SDKValidationError } from "../models/errors/sdkvalidationerror.js";
|
|
23
23
|
import * as operations from "../models/operations/index.js";
|
|
24
24
|
import { Result } from "../types/fp.js";
|
|
25
25
|
|
|
26
|
-
export async function
|
|
26
|
+
export async function supportControllerFetchUserOrganizations(
|
|
27
27
|
client: NovuCore,
|
|
28
|
+
plainCardRequestDto: components.PlainCardRequestDto,
|
|
28
29
|
idempotencyKey?: string | undefined,
|
|
29
30
|
options?: RequestOptions,
|
|
30
31
|
): Promise<
|
|
31
32
|
Result<
|
|
32
|
-
operations.
|
|
33
|
-
| errors.HealthControllerHealthCheckResponseBody
|
|
33
|
+
operations.SupportControllerFetchUserOrganizationsResponseBody,
|
|
34
34
|
| SDKError
|
|
35
35
|
| SDKValidationError
|
|
36
36
|
| UnexpectedClientError
|
|
@@ -40,25 +40,30 @@ export async function healthControllerHealthCheck(
|
|
|
40
40
|
| ConnectionError
|
|
41
41
|
>
|
|
42
42
|
> {
|
|
43
|
-
const input: operations.
|
|
43
|
+
const input: operations.SupportControllerFetchUserOrganizationsRequest = {
|
|
44
|
+
plainCardRequestDto: plainCardRequestDto,
|
|
44
45
|
idempotencyKey: idempotencyKey,
|
|
45
46
|
};
|
|
46
47
|
|
|
47
48
|
const parsed = safeParse(
|
|
48
49
|
input,
|
|
49
50
|
(value) =>
|
|
50
|
-
operations.
|
|
51
|
+
operations.SupportControllerFetchUserOrganizationsRequest$outboundSchema
|
|
52
|
+
.parse(value),
|
|
51
53
|
"Input validation failed",
|
|
52
54
|
);
|
|
53
55
|
if (!parsed.ok) {
|
|
54
56
|
return parsed;
|
|
55
57
|
}
|
|
56
58
|
const payload = parsed.value;
|
|
57
|
-
const body =
|
|
59
|
+
const body = encodeJSON("body", payload.PlainCardRequestDto, {
|
|
60
|
+
explode: true,
|
|
61
|
+
});
|
|
58
62
|
|
|
59
|
-
const path = pathToFunc("/v1/
|
|
63
|
+
const path = pathToFunc("/v1/support/user-organizations")();
|
|
60
64
|
|
|
61
65
|
const headers = new Headers(compactMap({
|
|
66
|
+
"Content-Type": "application/json",
|
|
62
67
|
Accept: "application/json",
|
|
63
68
|
"idempotency-key": encodeSimple(
|
|
64
69
|
"idempotency-key",
|
|
@@ -72,7 +77,7 @@ export async function healthControllerHealthCheck(
|
|
|
72
77
|
const requestSecurity = resolveGlobalSecurity(securityInput);
|
|
73
78
|
|
|
74
79
|
const context = {
|
|
75
|
-
operationID: "
|
|
80
|
+
operationID: "SupportController_fetchUserOrganizations",
|
|
76
81
|
oAuth2Scopes: [],
|
|
77
82
|
|
|
78
83
|
resolvedSecurity: requestSecurity,
|
|
@@ -96,7 +101,7 @@ export async function healthControllerHealthCheck(
|
|
|
96
101
|
|
|
97
102
|
const requestRes = client._createRequest(context, {
|
|
98
103
|
security: requestSecurity,
|
|
99
|
-
method: "
|
|
104
|
+
method: "POST",
|
|
100
105
|
baseURL: options?.serverURL,
|
|
101
106
|
path: path,
|
|
102
107
|
headers: headers,
|
|
@@ -110,7 +115,7 @@ export async function healthControllerHealthCheck(
|
|
|
110
115
|
|
|
111
116
|
const doResult = await client._do(req, {
|
|
112
117
|
context,
|
|
113
|
-
errorCodes: ["4XX", "
|
|
118
|
+
errorCodes: ["4XX", "5XX"],
|
|
114
119
|
retryConfig: context.retryConfig,
|
|
115
120
|
retryCodes: context.retryCodes,
|
|
116
121
|
});
|
|
@@ -119,13 +124,8 @@ export async function healthControllerHealthCheck(
|
|
|
119
124
|
}
|
|
120
125
|
const response = doResult.value;
|
|
121
126
|
|
|
122
|
-
const responseFields = {
|
|
123
|
-
HttpMeta: { Response: response, Request: req },
|
|
124
|
-
};
|
|
125
|
-
|
|
126
127
|
const [result] = await M.match<
|
|
127
|
-
operations.
|
|
128
|
-
| errors.HealthControllerHealthCheckResponseBody
|
|
128
|
+
operations.SupportControllerFetchUserOrganizationsResponseBody,
|
|
129
129
|
| SDKError
|
|
130
130
|
| SDKValidationError
|
|
131
131
|
| UnexpectedClientError
|
|
@@ -135,16 +135,13 @@ export async function healthControllerHealthCheck(
|
|
|
135
135
|
| ConnectionError
|
|
136
136
|
>(
|
|
137
137
|
M.json(
|
|
138
|
-
|
|
139
|
-
operations
|
|
140
|
-
|
|
141
|
-
M.jsonErr(
|
|
142
|
-
503,
|
|
143
|
-
errors.HealthControllerHealthCheckResponseBody$inboundSchema,
|
|
138
|
+
201,
|
|
139
|
+
operations
|
|
140
|
+
.SupportControllerFetchUserOrganizationsResponseBody$inboundSchema,
|
|
144
141
|
),
|
|
145
142
|
M.fail("4XX"),
|
|
146
143
|
M.fail("5XX"),
|
|
147
|
-
)(response
|
|
144
|
+
)(response);
|
|
148
145
|
if (!result.ok) {
|
|
149
146
|
return result;
|
|
150
147
|
}
|
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.
|
|
59
|
-
genVersion: "2.493.
|
|
60
|
-
userAgent: "speakeasy-sdk/typescript 0.
|
|
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;
|
package/src/lib/schemas.ts
CHANGED
|
@@ -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";
|
|
@@ -55,9 +56,6 @@ export * from "./fieldfilterpartdto.js";
|
|
|
55
56
|
export * from "./filtertopicsresponsedto.js";
|
|
56
57
|
export * from "./getsubscriberpreferencesresponsedto.js";
|
|
57
58
|
export * from "./gettopicresponsedto.js";
|
|
58
|
-
export * from "./idempotencetestingresponse.js";
|
|
59
|
-
export * from "./idempotencybehaviorenum.js";
|
|
60
|
-
export * from "./idempotencytestingdto.js";
|
|
61
59
|
export * from "./integrationresponsedto.js";
|
|
62
60
|
export * from "./markallmessageasrequestdto.js";
|
|
63
61
|
export * from "./markmessageactionasseendto.js";
|
|
@@ -84,6 +82,7 @@ export * from "./notificationtriggervariable.js";
|
|
|
84
82
|
export * from "./notificationtriggervariableresponse.js";
|
|
85
83
|
export * from "./ordinalenum.js";
|
|
86
84
|
export * from "./ordinalvalueenum.js";
|
|
85
|
+
export * from "./plaincardrequestdto.js";
|
|
87
86
|
export * from "./preference.js";
|
|
88
87
|
export * from "./preferencechannels.js";
|
|
89
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
|
+
}
|
|
@@ -6,9 +6,6 @@ export * from "./eventscontrollerbroadcasteventtoall.js";
|
|
|
6
6
|
export * from "./eventscontrollercancel.js";
|
|
7
7
|
export * from "./eventscontrollertrigger.js";
|
|
8
8
|
export * from "./eventscontrollertriggerbulk.js";
|
|
9
|
-
export * from "./healthcontrollergeneraterandomnumber.js";
|
|
10
|
-
export * from "./healthcontrollerhealthcheck.js";
|
|
11
|
-
export * from "./healthcontrollertestidempotency.js";
|
|
12
9
|
export * from "./integrationscontrollercreateintegration.js";
|
|
13
10
|
export * from "./integrationscontrollergetactiveintegrations.js";
|
|
14
11
|
export * from "./integrationscontrollergetwebhooksupportstatus.js";
|
|
@@ -44,6 +41,8 @@ export * from "./subscriberscontrollerupdatesubscriberchannel.js";
|
|
|
44
41
|
export * from "./subscriberscontrollerupdatesubscriberglobalpreferences.js";
|
|
45
42
|
export * from "./subscriberscontrollerupdatesubscriberonlineflag.js";
|
|
46
43
|
export * from "./subscriberscontrollerupdatesubscriberpreference.js";
|
|
44
|
+
export * from "./supportcontrollercreatethread.js";
|
|
45
|
+
export * from "./supportcontrollerfetchuserorganizations.js";
|
|
47
46
|
export * from "./topicscontrollerassign.js";
|
|
48
47
|
export * from "./topicscontrollercreatetopic.js";
|
|
49
48
|
export * from "./topicscontrollerdeletetopic.js";
|