@steamsets/client-ts 0.15.4 → 0.17.0
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 +0 -42
- package/docs/sdks/settings/README.md +1 -1
- package/funcs/sessionCreate.d.ts.map +1 -1
- package/funcs/sessionCreate.js +1 -0
- package/funcs/sessionCreate.js.map +1 -1
- package/funcs/settingsSubscribeEmail.js +2 -2
- package/funcs/settingsSubscribeEmail.js.map +1 -1
- package/jsr.json +1 -1
- package/lib/config.d.ts +3 -3
- package/lib/config.js +3 -3
- package/models/components/connection.d.ts +3 -3
- package/models/components/index.d.ts +0 -1
- package/models/components/index.d.ts.map +1 -1
- package/models/components/index.js +0 -1
- package/models/components/index.js.map +1 -1
- package/models/components/v1admingetaccountresponsebody.d.ts +13 -7
- package/models/components/v1admingetaccountresponsebody.d.ts.map +1 -1
- package/models/components/v1admingetaccountresponsebody.js +3 -0
- package/models/components/v1admingetaccountresponsebody.js.map +1 -1
- package/models/components/v1createsessionbody.d.ts +0 -15
- package/models/components/v1createsessionbody.d.ts.map +1 -1
- package/models/components/v1createsessionbody.js +0 -6
- package/models/components/v1createsessionbody.js.map +1 -1
- package/models/components/v1emailsubscriptionrequestbody.d.ts +3 -3
- package/models/components/v1emailsubscriptionrequestbody.d.ts.map +1 -1
- package/models/components/v1emailsubscriptionrequestbody.js +2 -2
- package/models/components/v1emailsubscriptionrequestbody.js.map +1 -1
- package/models/components/v1getsessionbody.d.ts +2 -2
- package/models/components/v1loginresponsebody.d.ts +2 -2
- package/models/components/v1updatesettingsrequestbody.d.ts +2 -2
- package/models/components/v1updatesettingsrequestbody.d.ts.map +1 -1
- package/models/components/v1updatesettingsrequestbody.js +2 -2
- package/models/components/v1updatesettingsrequestbody.js.map +1 -1
- package/models/operations/accountv1sessioncreate.d.ts +6 -0
- package/models/operations/accountv1sessioncreate.d.ts.map +1 -1
- package/models/operations/accountv1sessioncreate.js +4 -0
- package/models/operations/accountv1sessioncreate.js.map +1 -1
- package/models/operations/index.d.ts +0 -1
- package/models/operations/index.d.ts.map +1 -1
- package/models/operations/index.js +0 -1
- package/models/operations/index.js.map +1 -1
- package/package.json +1 -1
- package/sdk/sdk.d.ts +0 -3
- package/sdk/sdk.d.ts.map +1 -1
- package/sdk/sdk.js +0 -4
- package/sdk/sdk.js.map +1 -1
- package/src/funcs/sessionCreate.ts +1 -0
- package/src/funcs/settingsSubscribeEmail.ts +2 -2
- package/src/lib/config.ts +3 -3
- package/src/models/components/connection.ts +3 -3
- package/src/models/components/index.ts +0 -1
- package/src/models/components/v1admingetaccountresponsebody.ts +20 -7
- package/src/models/components/v1createsessionbody.ts +0 -21
- package/src/models/components/v1emailsubscriptionrequestbody.ts +5 -5
- package/src/models/components/v1getsessionbody.ts +2 -2
- package/src/models/components/v1loginresponsebody.ts +2 -2
- package/src/models/components/v1updatesettingsrequestbody.ts +4 -4
- package/src/models/operations/accountv1sessioncreate.ts +6 -0
- package/src/models/operations/index.ts +0 -1
- package/src/sdk/sdk.ts +0 -6
- package/docs/sdks/webhooks/README.md +0 -84
- package/funcs/webhooksResend.d.ts +0 -9
- package/funcs/webhooksResend.d.ts.map +0 -1
- package/funcs/webhooksResend.js +0 -114
- package/funcs/webhooksResend.js.map +0 -1
- package/models/components/errormodel.d.ts +0 -63
- package/models/components/errormodel.d.ts.map +0 -1
- package/models/components/errormodel.js +0 -81
- package/models/components/errormodel.js.map +0 -1
- package/models/operations/resendwebhook.d.ts +0 -66
- package/models/operations/resendwebhook.d.ts.map +0 -1
- package/models/operations/resendwebhook.js +0 -130
- package/models/operations/resendwebhook.js.map +0 -1
- package/sdk/webhooks.d.ts +0 -6
- package/sdk/webhooks.d.ts.map +0 -1
- package/sdk/webhooks.js +0 -16
- package/sdk/webhooks.js.map +0 -1
- package/src/funcs/webhooksResend.ts +0 -153
- package/src/models/components/errormodel.ts +0 -122
- package/src/models/operations/resendwebhook.ts +0 -179
- package/src/sdk/webhooks.ts +0 -21
|
@@ -1,153 +0,0 @@
|
|
|
1
|
-
/*
|
|
2
|
-
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
-
*/
|
|
4
|
-
|
|
5
|
-
import { SteamSetsCore } from "../core.js";
|
|
6
|
-
import { 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 {
|
|
14
|
-
ConnectionError,
|
|
15
|
-
InvalidRequestError,
|
|
16
|
-
RequestAbortedError,
|
|
17
|
-
RequestTimeoutError,
|
|
18
|
-
UnexpectedClientError,
|
|
19
|
-
} from "../models/errors/httpclienterrors.js";
|
|
20
|
-
import { SDKError } from "../models/errors/sdkerror.js";
|
|
21
|
-
import { SDKValidationError } from "../models/errors/sdkvalidationerror.js";
|
|
22
|
-
import * as operations from "../models/operations/index.js";
|
|
23
|
-
import { Result } from "../types/fp.js";
|
|
24
|
-
|
|
25
|
-
export async function webhooksResend(
|
|
26
|
-
client: SteamSetsCore,
|
|
27
|
-
request: operations.ResendWebhookRequest,
|
|
28
|
-
options?: RequestOptions,
|
|
29
|
-
): Promise<
|
|
30
|
-
Result<
|
|
31
|
-
operations.ResendWebhookResponse,
|
|
32
|
-
| SDKError
|
|
33
|
-
| SDKValidationError
|
|
34
|
-
| UnexpectedClientError
|
|
35
|
-
| InvalidRequestError
|
|
36
|
-
| RequestAbortedError
|
|
37
|
-
| RequestTimeoutError
|
|
38
|
-
| ConnectionError
|
|
39
|
-
>
|
|
40
|
-
> {
|
|
41
|
-
const parsed = safeParse(
|
|
42
|
-
request,
|
|
43
|
-
(value) => operations.ResendWebhookRequest$outboundSchema.parse(value),
|
|
44
|
-
"Input validation failed",
|
|
45
|
-
);
|
|
46
|
-
if (!parsed.ok) {
|
|
47
|
-
return parsed;
|
|
48
|
-
}
|
|
49
|
-
const payload = parsed.value;
|
|
50
|
-
const body = payload.RequestBody;
|
|
51
|
-
|
|
52
|
-
const path = pathToFunc("/webhooks/resend")();
|
|
53
|
-
|
|
54
|
-
const headers = new Headers(compactMap({
|
|
55
|
-
"Content-Type": "application/octet-stream",
|
|
56
|
-
Accept: "application/problem+json",
|
|
57
|
-
"webhook-id": encodeSimple("webhook-id", payload["webhook-id"], {
|
|
58
|
-
explode: false,
|
|
59
|
-
charEncoding: "none",
|
|
60
|
-
}),
|
|
61
|
-
"webhook-signature": encodeSimple(
|
|
62
|
-
"webhook-signature",
|
|
63
|
-
payload["webhook-signature"],
|
|
64
|
-
{ explode: false, charEncoding: "none" },
|
|
65
|
-
),
|
|
66
|
-
"webhook-timestamp": encodeSimple(
|
|
67
|
-
"webhook-timestamp",
|
|
68
|
-
payload["webhook-timestamp"],
|
|
69
|
-
{ explode: false, charEncoding: "none" },
|
|
70
|
-
),
|
|
71
|
-
}));
|
|
72
|
-
|
|
73
|
-
const secConfig = await extractSecurity(client._options.token);
|
|
74
|
-
const securityInput = secConfig == null ? {} : { token: secConfig };
|
|
75
|
-
const requestSecurity = resolveGlobalSecurity(securityInput);
|
|
76
|
-
|
|
77
|
-
const context = {
|
|
78
|
-
operationID: "resend-webhook",
|
|
79
|
-
oAuth2Scopes: [],
|
|
80
|
-
|
|
81
|
-
resolvedSecurity: requestSecurity,
|
|
82
|
-
|
|
83
|
-
securitySource: client._options.token,
|
|
84
|
-
retryConfig: options?.retries
|
|
85
|
-
|| client._options.retryConfig
|
|
86
|
-
|| {
|
|
87
|
-
strategy: "backoff",
|
|
88
|
-
backoff: {
|
|
89
|
-
initialInterval: 500,
|
|
90
|
-
maxInterval: 5000,
|
|
91
|
-
exponent: 1.5,
|
|
92
|
-
maxElapsedTime: 60000,
|
|
93
|
-
},
|
|
94
|
-
retryConnectionErrors: true,
|
|
95
|
-
}
|
|
96
|
-
|| { strategy: "none" },
|
|
97
|
-
retryCodes: options?.retryCodes || ["501", "502", "503", "504"],
|
|
98
|
-
};
|
|
99
|
-
|
|
100
|
-
const requestRes = client._createRequest(context, {
|
|
101
|
-
security: requestSecurity,
|
|
102
|
-
method: "POST",
|
|
103
|
-
baseURL: options?.serverURL,
|
|
104
|
-
path: path,
|
|
105
|
-
headers: headers,
|
|
106
|
-
body: body,
|
|
107
|
-
uaHeader: "x-speakeasy-user-agent",
|
|
108
|
-
timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1,
|
|
109
|
-
}, options);
|
|
110
|
-
if (!requestRes.ok) {
|
|
111
|
-
return requestRes;
|
|
112
|
-
}
|
|
113
|
-
const req = requestRes.value;
|
|
114
|
-
|
|
115
|
-
const doResult = await client._do(req, {
|
|
116
|
-
context,
|
|
117
|
-
errorCodes: ["4XX", "5XX"],
|
|
118
|
-
retryConfig: context.retryConfig,
|
|
119
|
-
retryCodes: context.retryCodes,
|
|
120
|
-
});
|
|
121
|
-
if (!doResult.ok) {
|
|
122
|
-
return doResult;
|
|
123
|
-
}
|
|
124
|
-
const response = doResult.value;
|
|
125
|
-
|
|
126
|
-
const responseFields = {
|
|
127
|
-
HttpMeta: { Response: response, Request: req },
|
|
128
|
-
};
|
|
129
|
-
|
|
130
|
-
const [result] = await M.match<
|
|
131
|
-
operations.ResendWebhookResponse,
|
|
132
|
-
| SDKError
|
|
133
|
-
| SDKValidationError
|
|
134
|
-
| UnexpectedClientError
|
|
135
|
-
| InvalidRequestError
|
|
136
|
-
| RequestAbortedError
|
|
137
|
-
| RequestTimeoutError
|
|
138
|
-
| ConnectionError
|
|
139
|
-
>(
|
|
140
|
-
M.nil(204, operations.ResendWebhookResponse$inboundSchema),
|
|
141
|
-
M.fail("4XX"),
|
|
142
|
-
M.fail("5XX"),
|
|
143
|
-
M.json("default", operations.ResendWebhookResponse$inboundSchema, {
|
|
144
|
-
ctype: "application/problem+json",
|
|
145
|
-
key: "ErrorModel",
|
|
146
|
-
}),
|
|
147
|
-
)(response, req, { extraFields: responseFields });
|
|
148
|
-
if (!result.ok) {
|
|
149
|
-
return result;
|
|
150
|
-
}
|
|
151
|
-
|
|
152
|
-
return result;
|
|
153
|
-
}
|
|
@@ -1,122 +0,0 @@
|
|
|
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
|
-
import {
|
|
11
|
-
ErrorDetail,
|
|
12
|
-
ErrorDetail$inboundSchema,
|
|
13
|
-
ErrorDetail$Outbound,
|
|
14
|
-
ErrorDetail$outboundSchema,
|
|
15
|
-
} from "./errordetail.js";
|
|
16
|
-
|
|
17
|
-
export type ErrorModel = {
|
|
18
|
-
/**
|
|
19
|
-
* A URL to the JSON Schema for this object.
|
|
20
|
-
*/
|
|
21
|
-
dollarSchema?: string | undefined;
|
|
22
|
-
/**
|
|
23
|
-
* A human-readable explanation specific to this occurrence of the problem.
|
|
24
|
-
*/
|
|
25
|
-
detail?: string | undefined;
|
|
26
|
-
/**
|
|
27
|
-
* Optional list of individual error details
|
|
28
|
-
*/
|
|
29
|
-
errors?: Array<ErrorDetail> | null | undefined;
|
|
30
|
-
/**
|
|
31
|
-
* A URI reference that identifies the specific occurrence of the problem.
|
|
32
|
-
*/
|
|
33
|
-
instance?: string | undefined;
|
|
34
|
-
/**
|
|
35
|
-
* HTTP status code
|
|
36
|
-
*/
|
|
37
|
-
status?: number | undefined;
|
|
38
|
-
/**
|
|
39
|
-
* A short, human-readable summary of the problem type. This value should not change between occurrences of the error.
|
|
40
|
-
*/
|
|
41
|
-
title?: string | undefined;
|
|
42
|
-
/**
|
|
43
|
-
* A URI reference to human-readable documentation for the error.
|
|
44
|
-
*/
|
|
45
|
-
type?: string | undefined;
|
|
46
|
-
};
|
|
47
|
-
|
|
48
|
-
/** @internal */
|
|
49
|
-
export const ErrorModel$inboundSchema: z.ZodType<
|
|
50
|
-
ErrorModel,
|
|
51
|
-
z.ZodTypeDef,
|
|
52
|
-
unknown
|
|
53
|
-
> = z.object({
|
|
54
|
-
$schema: z.string().optional(),
|
|
55
|
-
detail: z.string().optional(),
|
|
56
|
-
errors: z.nullable(z.array(ErrorDetail$inboundSchema)).optional(),
|
|
57
|
-
instance: z.string().optional(),
|
|
58
|
-
status: z.number().int().optional(),
|
|
59
|
-
title: z.string().optional(),
|
|
60
|
-
type: z.string().default("about:blank"),
|
|
61
|
-
}).transform((v) => {
|
|
62
|
-
return remap$(v, {
|
|
63
|
-
"$schema": "dollarSchema",
|
|
64
|
-
});
|
|
65
|
-
});
|
|
66
|
-
|
|
67
|
-
/** @internal */
|
|
68
|
-
export type ErrorModel$Outbound = {
|
|
69
|
-
$schema?: string | undefined;
|
|
70
|
-
detail?: string | undefined;
|
|
71
|
-
errors?: Array<ErrorDetail$Outbound> | null | undefined;
|
|
72
|
-
instance?: string | undefined;
|
|
73
|
-
status?: number | undefined;
|
|
74
|
-
title?: string | undefined;
|
|
75
|
-
type: string;
|
|
76
|
-
};
|
|
77
|
-
|
|
78
|
-
/** @internal */
|
|
79
|
-
export const ErrorModel$outboundSchema: z.ZodType<
|
|
80
|
-
ErrorModel$Outbound,
|
|
81
|
-
z.ZodTypeDef,
|
|
82
|
-
ErrorModel
|
|
83
|
-
> = z.object({
|
|
84
|
-
dollarSchema: z.string().optional(),
|
|
85
|
-
detail: z.string().optional(),
|
|
86
|
-
errors: z.nullable(z.array(ErrorDetail$outboundSchema)).optional(),
|
|
87
|
-
instance: z.string().optional(),
|
|
88
|
-
status: z.number().int().optional(),
|
|
89
|
-
title: z.string().optional(),
|
|
90
|
-
type: z.string().default("about:blank"),
|
|
91
|
-
}).transform((v) => {
|
|
92
|
-
return remap$(v, {
|
|
93
|
-
dollarSchema: "$schema",
|
|
94
|
-
});
|
|
95
|
-
});
|
|
96
|
-
|
|
97
|
-
/**
|
|
98
|
-
* @internal
|
|
99
|
-
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
100
|
-
*/
|
|
101
|
-
export namespace ErrorModel$ {
|
|
102
|
-
/** @deprecated use `ErrorModel$inboundSchema` instead. */
|
|
103
|
-
export const inboundSchema = ErrorModel$inboundSchema;
|
|
104
|
-
/** @deprecated use `ErrorModel$outboundSchema` instead. */
|
|
105
|
-
export const outboundSchema = ErrorModel$outboundSchema;
|
|
106
|
-
/** @deprecated use `ErrorModel$Outbound` instead. */
|
|
107
|
-
export type Outbound = ErrorModel$Outbound;
|
|
108
|
-
}
|
|
109
|
-
|
|
110
|
-
export function errorModelToJSON(errorModel: ErrorModel): string {
|
|
111
|
-
return JSON.stringify(ErrorModel$outboundSchema.parse(errorModel));
|
|
112
|
-
}
|
|
113
|
-
|
|
114
|
-
export function errorModelFromJSON(
|
|
115
|
-
jsonString: string,
|
|
116
|
-
): SafeParseResult<ErrorModel, SDKValidationError> {
|
|
117
|
-
return safeParse(
|
|
118
|
-
jsonString,
|
|
119
|
-
(x) => ErrorModel$inboundSchema.parse(JSON.parse(x)),
|
|
120
|
-
`Failed to parse 'ErrorModel' from JSON`,
|
|
121
|
-
);
|
|
122
|
-
}
|
|
@@ -1,179 +0,0 @@
|
|
|
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 * as components from "../components/index.js";
|
|
10
|
-
import { SDKValidationError } from "../errors/sdkvalidationerror.js";
|
|
11
|
-
|
|
12
|
-
export type ResendWebhookRequest = {
|
|
13
|
-
webhookId?: string | undefined;
|
|
14
|
-
webhookTimestamp?: string | undefined;
|
|
15
|
-
webhookSignature?: string | undefined;
|
|
16
|
-
requestBody: ReadableStream<Uint8Array> | Blob | ArrayBuffer | Uint8Array;
|
|
17
|
-
};
|
|
18
|
-
|
|
19
|
-
export type ResendWebhookResponse = {
|
|
20
|
-
httpMeta: components.HTTPMetadata;
|
|
21
|
-
/**
|
|
22
|
-
* Error
|
|
23
|
-
*/
|
|
24
|
-
errorModel?: components.ErrorModel | undefined;
|
|
25
|
-
};
|
|
26
|
-
|
|
27
|
-
/** @internal */
|
|
28
|
-
export const ResendWebhookRequest$inboundSchema: z.ZodType<
|
|
29
|
-
ResendWebhookRequest,
|
|
30
|
-
z.ZodTypeDef,
|
|
31
|
-
unknown
|
|
32
|
-
> = z.object({
|
|
33
|
-
"webhook-id": z.string().optional(),
|
|
34
|
-
"webhook-timestamp": z.string().optional(),
|
|
35
|
-
"webhook-signature": z.string().optional(),
|
|
36
|
-
RequestBody: z.union([
|
|
37
|
-
z.instanceof(ReadableStream<Uint8Array>),
|
|
38
|
-
z.instanceof(Blob),
|
|
39
|
-
z.instanceof(ArrayBuffer),
|
|
40
|
-
z.instanceof(Uint8Array),
|
|
41
|
-
]),
|
|
42
|
-
}).transform((v) => {
|
|
43
|
-
return remap$(v, {
|
|
44
|
-
"webhook-id": "webhookId",
|
|
45
|
-
"webhook-timestamp": "webhookTimestamp",
|
|
46
|
-
"webhook-signature": "webhookSignature",
|
|
47
|
-
"RequestBody": "requestBody",
|
|
48
|
-
});
|
|
49
|
-
});
|
|
50
|
-
|
|
51
|
-
/** @internal */
|
|
52
|
-
export type ResendWebhookRequest$Outbound = {
|
|
53
|
-
"webhook-id"?: string | undefined;
|
|
54
|
-
"webhook-timestamp"?: string | undefined;
|
|
55
|
-
"webhook-signature"?: string | undefined;
|
|
56
|
-
RequestBody: ReadableStream<Uint8Array> | Blob | ArrayBuffer | Uint8Array;
|
|
57
|
-
};
|
|
58
|
-
|
|
59
|
-
/** @internal */
|
|
60
|
-
export const ResendWebhookRequest$outboundSchema: z.ZodType<
|
|
61
|
-
ResendWebhookRequest$Outbound,
|
|
62
|
-
z.ZodTypeDef,
|
|
63
|
-
ResendWebhookRequest
|
|
64
|
-
> = z.object({
|
|
65
|
-
webhookId: z.string().optional(),
|
|
66
|
-
webhookTimestamp: z.string().optional(),
|
|
67
|
-
webhookSignature: z.string().optional(),
|
|
68
|
-
requestBody: z.union([
|
|
69
|
-
z.instanceof(ReadableStream<Uint8Array>),
|
|
70
|
-
z.instanceof(Blob),
|
|
71
|
-
z.instanceof(ArrayBuffer),
|
|
72
|
-
z.instanceof(Uint8Array),
|
|
73
|
-
]),
|
|
74
|
-
}).transform((v) => {
|
|
75
|
-
return remap$(v, {
|
|
76
|
-
webhookId: "webhook-id",
|
|
77
|
-
webhookTimestamp: "webhook-timestamp",
|
|
78
|
-
webhookSignature: "webhook-signature",
|
|
79
|
-
requestBody: "RequestBody",
|
|
80
|
-
});
|
|
81
|
-
});
|
|
82
|
-
|
|
83
|
-
/**
|
|
84
|
-
* @internal
|
|
85
|
-
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
86
|
-
*/
|
|
87
|
-
export namespace ResendWebhookRequest$ {
|
|
88
|
-
/** @deprecated use `ResendWebhookRequest$inboundSchema` instead. */
|
|
89
|
-
export const inboundSchema = ResendWebhookRequest$inboundSchema;
|
|
90
|
-
/** @deprecated use `ResendWebhookRequest$outboundSchema` instead. */
|
|
91
|
-
export const outboundSchema = ResendWebhookRequest$outboundSchema;
|
|
92
|
-
/** @deprecated use `ResendWebhookRequest$Outbound` instead. */
|
|
93
|
-
export type Outbound = ResendWebhookRequest$Outbound;
|
|
94
|
-
}
|
|
95
|
-
|
|
96
|
-
export function resendWebhookRequestToJSON(
|
|
97
|
-
resendWebhookRequest: ResendWebhookRequest,
|
|
98
|
-
): string {
|
|
99
|
-
return JSON.stringify(
|
|
100
|
-
ResendWebhookRequest$outboundSchema.parse(resendWebhookRequest),
|
|
101
|
-
);
|
|
102
|
-
}
|
|
103
|
-
|
|
104
|
-
export function resendWebhookRequestFromJSON(
|
|
105
|
-
jsonString: string,
|
|
106
|
-
): SafeParseResult<ResendWebhookRequest, SDKValidationError> {
|
|
107
|
-
return safeParse(
|
|
108
|
-
jsonString,
|
|
109
|
-
(x) => ResendWebhookRequest$inboundSchema.parse(JSON.parse(x)),
|
|
110
|
-
`Failed to parse 'ResendWebhookRequest' from JSON`,
|
|
111
|
-
);
|
|
112
|
-
}
|
|
113
|
-
|
|
114
|
-
/** @internal */
|
|
115
|
-
export const ResendWebhookResponse$inboundSchema: z.ZodType<
|
|
116
|
-
ResendWebhookResponse,
|
|
117
|
-
z.ZodTypeDef,
|
|
118
|
-
unknown
|
|
119
|
-
> = z.object({
|
|
120
|
-
HttpMeta: components.HTTPMetadata$inboundSchema,
|
|
121
|
-
ErrorModel: components.ErrorModel$inboundSchema.optional(),
|
|
122
|
-
}).transform((v) => {
|
|
123
|
-
return remap$(v, {
|
|
124
|
-
"HttpMeta": "httpMeta",
|
|
125
|
-
"ErrorModel": "errorModel",
|
|
126
|
-
});
|
|
127
|
-
});
|
|
128
|
-
|
|
129
|
-
/** @internal */
|
|
130
|
-
export type ResendWebhookResponse$Outbound = {
|
|
131
|
-
HttpMeta: components.HTTPMetadata$Outbound;
|
|
132
|
-
ErrorModel?: components.ErrorModel$Outbound | undefined;
|
|
133
|
-
};
|
|
134
|
-
|
|
135
|
-
/** @internal */
|
|
136
|
-
export const ResendWebhookResponse$outboundSchema: z.ZodType<
|
|
137
|
-
ResendWebhookResponse$Outbound,
|
|
138
|
-
z.ZodTypeDef,
|
|
139
|
-
ResendWebhookResponse
|
|
140
|
-
> = z.object({
|
|
141
|
-
httpMeta: components.HTTPMetadata$outboundSchema,
|
|
142
|
-
errorModel: components.ErrorModel$outboundSchema.optional(),
|
|
143
|
-
}).transform((v) => {
|
|
144
|
-
return remap$(v, {
|
|
145
|
-
httpMeta: "HttpMeta",
|
|
146
|
-
errorModel: "ErrorModel",
|
|
147
|
-
});
|
|
148
|
-
});
|
|
149
|
-
|
|
150
|
-
/**
|
|
151
|
-
* @internal
|
|
152
|
-
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
153
|
-
*/
|
|
154
|
-
export namespace ResendWebhookResponse$ {
|
|
155
|
-
/** @deprecated use `ResendWebhookResponse$inboundSchema` instead. */
|
|
156
|
-
export const inboundSchema = ResendWebhookResponse$inboundSchema;
|
|
157
|
-
/** @deprecated use `ResendWebhookResponse$outboundSchema` instead. */
|
|
158
|
-
export const outboundSchema = ResendWebhookResponse$outboundSchema;
|
|
159
|
-
/** @deprecated use `ResendWebhookResponse$Outbound` instead. */
|
|
160
|
-
export type Outbound = ResendWebhookResponse$Outbound;
|
|
161
|
-
}
|
|
162
|
-
|
|
163
|
-
export function resendWebhookResponseToJSON(
|
|
164
|
-
resendWebhookResponse: ResendWebhookResponse,
|
|
165
|
-
): string {
|
|
166
|
-
return JSON.stringify(
|
|
167
|
-
ResendWebhookResponse$outboundSchema.parse(resendWebhookResponse),
|
|
168
|
-
);
|
|
169
|
-
}
|
|
170
|
-
|
|
171
|
-
export function resendWebhookResponseFromJSON(
|
|
172
|
-
jsonString: string,
|
|
173
|
-
): SafeParseResult<ResendWebhookResponse, SDKValidationError> {
|
|
174
|
-
return safeParse(
|
|
175
|
-
jsonString,
|
|
176
|
-
(x) => ResendWebhookResponse$inboundSchema.parse(JSON.parse(x)),
|
|
177
|
-
`Failed to parse 'ResendWebhookResponse' from JSON`,
|
|
178
|
-
);
|
|
179
|
-
}
|
package/src/sdk/webhooks.ts
DELETED
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
/*
|
|
2
|
-
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
-
*/
|
|
4
|
-
|
|
5
|
-
import { webhooksResend } from "../funcs/webhooksResend.js";
|
|
6
|
-
import { ClientSDK, RequestOptions } from "../lib/sdks.js";
|
|
7
|
-
import * as operations from "../models/operations/index.js";
|
|
8
|
-
import { unwrapAsync } from "../types/fp.js";
|
|
9
|
-
|
|
10
|
-
export class Webhooks extends ClientSDK {
|
|
11
|
-
async resend(
|
|
12
|
-
request: operations.ResendWebhookRequest,
|
|
13
|
-
options?: RequestOptions,
|
|
14
|
-
): Promise<operations.ResendWebhookResponse> {
|
|
15
|
-
return unwrapAsync(webhooksResend(
|
|
16
|
-
this,
|
|
17
|
-
request,
|
|
18
|
-
options,
|
|
19
|
-
));
|
|
20
|
-
}
|
|
21
|
-
}
|