@steamsets/client-ts 0.15.4 → 0.16.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.
Files changed (67) hide show
  1. package/README.md +0 -42
  2. package/docs/sdks/settings/README.md +1 -1
  3. package/funcs/settingsSubscribeEmail.js +2 -2
  4. package/funcs/settingsSubscribeEmail.js.map +1 -1
  5. package/jsr.json +1 -1
  6. package/lib/config.d.ts +3 -3
  7. package/lib/config.js +3 -3
  8. package/models/components/connection.d.ts +3 -3
  9. package/models/components/index.d.ts +0 -1
  10. package/models/components/index.d.ts.map +1 -1
  11. package/models/components/index.js +0 -1
  12. package/models/components/index.js.map +1 -1
  13. package/models/components/v1admingetaccountresponsebody.d.ts +13 -7
  14. package/models/components/v1admingetaccountresponsebody.d.ts.map +1 -1
  15. package/models/components/v1admingetaccountresponsebody.js +3 -0
  16. package/models/components/v1admingetaccountresponsebody.js.map +1 -1
  17. package/models/components/v1emailsubscriptionrequestbody.d.ts +3 -3
  18. package/models/components/v1emailsubscriptionrequestbody.d.ts.map +1 -1
  19. package/models/components/v1emailsubscriptionrequestbody.js +2 -2
  20. package/models/components/v1emailsubscriptionrequestbody.js.map +1 -1
  21. package/models/components/v1getsessionbody.d.ts +2 -2
  22. package/models/components/v1loginresponsebody.d.ts +2 -2
  23. package/models/components/v1updatesettingsrequestbody.d.ts +2 -2
  24. package/models/components/v1updatesettingsrequestbody.d.ts.map +1 -1
  25. package/models/components/v1updatesettingsrequestbody.js +2 -2
  26. package/models/components/v1updatesettingsrequestbody.js.map +1 -1
  27. package/models/operations/index.d.ts +0 -1
  28. package/models/operations/index.d.ts.map +1 -1
  29. package/models/operations/index.js +0 -1
  30. package/models/operations/index.js.map +1 -1
  31. package/package.json +1 -1
  32. package/sdk/sdk.d.ts +0 -3
  33. package/sdk/sdk.d.ts.map +1 -1
  34. package/sdk/sdk.js +0 -4
  35. package/sdk/sdk.js.map +1 -1
  36. package/src/funcs/settingsSubscribeEmail.ts +2 -2
  37. package/src/lib/config.ts +3 -3
  38. package/src/models/components/connection.ts +3 -3
  39. package/src/models/components/index.ts +0 -1
  40. package/src/models/components/v1admingetaccountresponsebody.ts +20 -7
  41. package/src/models/components/v1emailsubscriptionrequestbody.ts +5 -5
  42. package/src/models/components/v1getsessionbody.ts +2 -2
  43. package/src/models/components/v1loginresponsebody.ts +2 -2
  44. package/src/models/components/v1updatesettingsrequestbody.ts +4 -4
  45. package/src/models/operations/index.ts +0 -1
  46. package/src/sdk/sdk.ts +0 -6
  47. package/docs/sdks/webhooks/README.md +0 -84
  48. package/funcs/webhooksResend.d.ts +0 -9
  49. package/funcs/webhooksResend.d.ts.map +0 -1
  50. package/funcs/webhooksResend.js +0 -114
  51. package/funcs/webhooksResend.js.map +0 -1
  52. package/models/components/errormodel.d.ts +0 -63
  53. package/models/components/errormodel.d.ts.map +0 -1
  54. package/models/components/errormodel.js +0 -81
  55. package/models/components/errormodel.js.map +0 -1
  56. package/models/operations/resendwebhook.d.ts +0 -66
  57. package/models/operations/resendwebhook.d.ts.map +0 -1
  58. package/models/operations/resendwebhook.js +0 -130
  59. package/models/operations/resendwebhook.js.map +0 -1
  60. package/sdk/webhooks.d.ts +0 -6
  61. package/sdk/webhooks.d.ts.map +0 -1
  62. package/sdk/webhooks.js +0 -16
  63. package/sdk/webhooks.js.map +0 -1
  64. package/src/funcs/webhooksResend.ts +0 -153
  65. package/src/models/components/errormodel.ts +0 -122
  66. package/src/models/operations/resendwebhook.ts +0 -179
  67. package/src/sdk/webhooks.ts +0 -21
@@ -113,7 +113,7 @@ export async function settingsSubscribeEmail(
113
113
 
114
114
  const doResult = await client._do(req, {
115
115
  context,
116
- errorCodes: ["422", "429", "4XX", "500", "5XX"],
116
+ errorCodes: ["400", "422", "429", "4XX", "500", "5XX"],
117
117
  retryConfig: context.retryConfig,
118
118
  retryCodes: context.retryCodes,
119
119
  });
@@ -143,7 +143,7 @@ export async function settingsSubscribeEmail(
143
143
  operations.AccountV1SettingsEmailSubscribeResponse$inboundSchema,
144
144
  { hdrs: true },
145
145
  ),
146
- M.jsonErr([422, 429], errors.ErrorModel$inboundSchema, {
146
+ M.jsonErr([400, 422, 429], errors.ErrorModel$inboundSchema, {
147
147
  ctype: "application/problem+json",
148
148
  }),
149
149
  M.jsonErr(500, errors.ErrorModel$inboundSchema, {
package/src/lib/config.ts CHANGED
@@ -55,8 +55,8 @@ export function serverURLFromOptions(options: SDKOptions): URL | null {
55
55
  export const SDK_METADATA = {
56
56
  language: "typescript",
57
57
  openapiDocVersion: "1.0.0",
58
- sdkVersion: "0.15.4",
59
- genVersion: "2.500.5",
58
+ sdkVersion: "0.16.0",
59
+ genVersion: "2.502.0",
60
60
  userAgent:
61
- "speakeasy-sdk/typescript 0.15.4 2.500.5 1.0.0 @steamsets/client-ts",
61
+ "speakeasy-sdk/typescript 0.16.0 2.502.0 1.0.0 @steamsets/client-ts",
62
62
  } as const;
@@ -28,7 +28,7 @@ export type ConnectionProvider = ClosedEnum<typeof ConnectionProvider>;
28
28
 
29
29
  export type Connection = {
30
30
  /**
31
- * The avatar of the connected user
31
+ * The avatar of the connected account
32
32
  */
33
33
  avatar: string;
34
34
  /**
@@ -36,7 +36,7 @@ export type Connection = {
36
36
  */
37
37
  connectionId: string;
38
38
  /**
39
- * The external id of the connected user
39
+ * The external id of the connected account
40
40
  */
41
41
  externalId: string;
42
42
  /**
@@ -48,7 +48,7 @@ export type Connection = {
48
48
  */
49
49
  hide: boolean;
50
50
  /**
51
- * The name of the connected user
51
+ * The name of the connected account
52
52
  */
53
53
  name: string;
54
54
  /**
@@ -18,7 +18,6 @@ export * from "./currentcolortag.js";
18
18
  export * from "./designtag.js";
19
19
  export * from "./developerapp.js";
20
20
  export * from "./errordetail.js";
21
- export * from "./errormodel.js";
22
21
  export * from "./historyvalue.js";
23
22
  export * from "./httpmetadata.js";
24
23
  export * from "./idstruct.js";
@@ -14,6 +14,12 @@ import {
14
14
  Connection$Outbound,
15
15
  Connection$outboundSchema,
16
16
  } from "./connection.js";
17
+ import {
18
+ DeveloperApp,
19
+ DeveloperApp$inboundSchema,
20
+ DeveloperApp$Outbound,
21
+ DeveloperApp$outboundSchema,
22
+ } from "./developerapp.js";
17
23
  import {
18
24
  Resource,
19
25
  Resource$inboundSchema,
@@ -80,19 +86,23 @@ export type V1AdminGetAccountResponseBody = {
80
86
  */
81
87
  city: string | null;
82
88
  /**
83
- * The connections the user has
89
+ * The connections the account has
84
90
  */
85
91
  connections: Array<Connection> | null;
86
92
  /**
87
93
  * The country code of the account
88
94
  */
89
95
  country: string | null;
96
+ /**
97
+ * The developer apps the account has
98
+ */
99
+ developerApps: Array<DeveloperApp> | null;
90
100
  /**
91
101
  * The email of the account
92
102
  */
93
103
  email: string | null;
94
104
  /**
95
- * The location updates the user has
105
+ * The location updates the account has
96
106
  */
97
107
  locationUpdates: Array<V1AccountLocationUpdate> | null;
98
108
  /**
@@ -100,7 +110,7 @@ export type V1AdminGetAccountResponseBody = {
100
110
  */
101
111
  name: string;
102
112
  /**
103
- * The name updates the user has
113
+ * The name updates the account has
104
114
  */
105
115
  nameUpdates: Array<V1AccountNameUpdate> | null;
106
116
  /**
@@ -112,15 +122,15 @@ export type V1AdminGetAccountResponseBody = {
112
122
  */
113
123
  region: string | null;
114
124
  /**
115
- * The resources the user has (permissions)
125
+ * The resources the account has (permissions)
116
126
  */
117
127
  resources: Array<Resource> | null;
118
128
  /**
119
- * The roles the user has
129
+ * The roles the account has
120
130
  */
121
131
  roles: Array<Role> | null;
122
132
  /**
123
- * The sessions the user has
133
+ * The sessions the account has
124
134
  */
125
135
  sessions: Array<Session> | null;
126
136
  /**
@@ -132,7 +142,7 @@ export type V1AdminGetAccountResponseBody = {
132
142
  */
133
143
  vanity: string | null;
134
144
  /**
135
- * The vanity updates the user has
145
+ * The vanity updates the account has
136
146
  */
137
147
  vanityUpdates: Array<V1AccountVanityUpdate> | null;
138
148
  };
@@ -172,6 +182,7 @@ export const V1AdminGetAccountResponseBody$inboundSchema: z.ZodType<
172
182
  city: z.nullable(z.string()),
173
183
  connections: z.nullable(z.array(Connection$inboundSchema)),
174
184
  country: z.nullable(z.string()),
185
+ developerApps: z.nullable(z.array(DeveloperApp$inboundSchema)),
175
186
  email: z.nullable(z.string()),
176
187
  locationUpdates: z.nullable(z.array(V1AccountLocationUpdate$inboundSchema)),
177
188
  name: z.string(),
@@ -197,6 +208,7 @@ export type V1AdminGetAccountResponseBody$Outbound = {
197
208
  city: string | null;
198
209
  connections: Array<Connection$Outbound> | null;
199
210
  country: string | null;
211
+ developerApps: Array<DeveloperApp$Outbound> | null;
200
212
  email: string | null;
201
213
  locationUpdates: Array<V1AccountLocationUpdate$Outbound> | null;
202
214
  name: string;
@@ -222,6 +234,7 @@ export const V1AdminGetAccountResponseBody$outboundSchema: z.ZodType<
222
234
  city: z.nullable(z.string()),
223
235
  connections: z.nullable(z.array(Connection$outboundSchema)),
224
236
  country: z.nullable(z.string()),
237
+ developerApps: z.nullable(z.array(DeveloperApp$outboundSchema)),
225
238
  email: z.nullable(z.string()),
226
239
  locationUpdates: z.nullable(z.array(V1AccountLocationUpdate$outboundSchema)),
227
240
  name: z.string(),
@@ -11,9 +11,9 @@ export type V1EmailSubscriptionRequestBody = {
11
11
  /**
12
12
  * The email address to subscribe to the newsletter (only for the landing page)
13
13
  */
14
- email: string | null;
14
+ email?: string | null | undefined;
15
15
  /**
16
- * Whether the user wants to be subscribed to the newsletter
16
+ * Whether the account wants to be subscribed to the newsletter
17
17
  */
18
18
  subscribed: boolean;
19
19
  };
@@ -24,13 +24,13 @@ export const V1EmailSubscriptionRequestBody$inboundSchema: z.ZodType<
24
24
  z.ZodTypeDef,
25
25
  unknown
26
26
  > = z.object({
27
- email: z.nullable(z.string()),
27
+ email: z.nullable(z.string()).optional(),
28
28
  subscribed: z.boolean(),
29
29
  });
30
30
 
31
31
  /** @internal */
32
32
  export type V1EmailSubscriptionRequestBody$Outbound = {
33
- email: string | null;
33
+ email?: string | null | undefined;
34
34
  subscribed: boolean;
35
35
  };
36
36
 
@@ -40,7 +40,7 @@ export const V1EmailSubscriptionRequestBody$outboundSchema: z.ZodType<
40
40
  z.ZodTypeDef,
41
41
  V1EmailSubscriptionRequestBody
42
42
  > = z.object({
43
- email: z.nullable(z.string()),
43
+ email: z.nullable(z.string()).optional(),
44
44
  subscribed: z.boolean(),
45
45
  });
46
46
 
@@ -44,11 +44,11 @@ export type V1GetSessionBody = {
44
44
  */
45
45
  name: string;
46
46
  /**
47
- * The resources the user has (permissions)
47
+ * The resources the account has (permissions)
48
48
  */
49
49
  resources: Array<Resource> | null;
50
50
  /**
51
- * The roles the user has
51
+ * The roles the account has
52
52
  */
53
53
  roles: Array<Role> | null;
54
54
  sessionData: Session;
@@ -14,11 +14,11 @@ export type V1LoginResponseBody = {
14
14
  */
15
15
  dollarSchema?: string | undefined;
16
16
  /**
17
- * The avatar of the user
17
+ * The avatar of the account
18
18
  */
19
19
  avatar: string;
20
20
  /**
21
- * The name of the user
21
+ * The name of the account
22
22
  */
23
23
  name: string;
24
24
  /**
@@ -11,7 +11,7 @@ export type V1UpdateSettingsRequestBody = {
11
11
  /**
12
12
  * The email the account should use, only if the account is private
13
13
  */
14
- email: string | null;
14
+ email?: string | null | undefined;
15
15
  /**
16
16
  * Whether the account should be hidden in the leaderboards, only possible if the account is private
17
17
  */
@@ -32,7 +32,7 @@ export const V1UpdateSettingsRequestBody$inboundSchema: z.ZodType<
32
32
  z.ZodTypeDef,
33
33
  unknown
34
34
  > = z.object({
35
- email: z.nullable(z.string()),
35
+ email: z.nullable(z.string()).optional(),
36
36
  hidden: z.boolean(),
37
37
  language: z.string(),
38
38
  vanity: z.nullable(z.string()),
@@ -40,7 +40,7 @@ export const V1UpdateSettingsRequestBody$inboundSchema: z.ZodType<
40
40
 
41
41
  /** @internal */
42
42
  export type V1UpdateSettingsRequestBody$Outbound = {
43
- email: string | null;
43
+ email?: string | null | undefined;
44
44
  hidden: boolean;
45
45
  language: string;
46
46
  vanity: string | null;
@@ -52,7 +52,7 @@ export const V1UpdateSettingsRequestBody$outboundSchema: z.ZodType<
52
52
  z.ZodTypeDef,
53
53
  V1UpdateSettingsRequestBody
54
54
  > = z.object({
55
- email: z.nullable(z.string()),
55
+ email: z.nullable(z.string()).optional(),
56
56
  hidden: z.boolean(),
57
57
  language: z.string(),
58
58
  vanity: z.nullable(z.string()),
@@ -48,5 +48,4 @@ export * from "./leaderboardv1getbadges.js";
48
48
  export * from "./leaderboardv1getgroup.js";
49
49
  export * from "./liveness.js";
50
50
  export * from "./locationv1locationget.js";
51
- export * from "./resendwebhook.js";
52
51
  export * from "./statsv1statsget.js";
package/src/sdk/sdk.ts CHANGED
@@ -23,7 +23,6 @@ import { Session } from "./session.js";
23
23
  import { Sessions } from "./sessions.js";
24
24
  import { Settings } from "./settings.js";
25
25
  import { Stats } from "./stats.js";
26
- import { Webhooks } from "./webhooks.js";
27
26
 
28
27
  export class SteamSets extends ClientSDK {
29
28
  private _badges?: Badges;
@@ -125,9 +124,4 @@ export class SteamSets extends ClientSDK {
125
124
  get liveness(): Liveness {
126
125
  return (this._liveness ??= new Liveness(this._options));
127
126
  }
128
-
129
- private _webhooks?: Webhooks;
130
- get webhooks(): Webhooks {
131
- return (this._webhooks ??= new Webhooks(this._options));
132
- }
133
127
  }
@@ -1,84 +0,0 @@
1
- # Webhooks
2
- (*webhooks*)
3
-
4
- ## Overview
5
-
6
- ### Available Operations
7
-
8
- * [resend](#resend)
9
-
10
- ## resend
11
-
12
- ### Example Usage
13
-
14
- ```typescript
15
- import { SteamSets } from "@steamsets/client-ts";
16
- import { openAsBlob } from "node:fs";
17
-
18
- const steamSets = new SteamSets({
19
- token: "<YOUR_BEARER_TOKEN_HERE>",
20
- });
21
-
22
- async function run() {
23
- const result = await steamSets.webhooks.resend({
24
- requestBody: await openAsBlob("example.file"),
25
- });
26
-
27
- // Handle the result
28
- console.log(result);
29
- }
30
-
31
- run();
32
- ```
33
-
34
- ### Standalone function
35
-
36
- The standalone function version of this method:
37
-
38
- ```typescript
39
- import { SteamSetsCore } from "@steamsets/client-ts/core.js";
40
- import { webhooksResend } from "@steamsets/client-ts/funcs/webhooksResend.js";
41
- import { openAsBlob } from "node:fs";
42
-
43
- // Use `SteamSetsCore` for best tree-shaking performance.
44
- // You can create one instance of it to use across an application.
45
- const steamSets = new SteamSetsCore({
46
- token: "<YOUR_BEARER_TOKEN_HERE>",
47
- });
48
-
49
- async function run() {
50
- const res = await webhooksResend(steamSets, {
51
- requestBody: await openAsBlob("example.file"),
52
- });
53
-
54
- if (!res.ok) {
55
- throw res.error;
56
- }
57
-
58
- const { value: result } = res;
59
-
60
- // Handle the result
61
- console.log(result);
62
- }
63
-
64
- run();
65
- ```
66
-
67
- ### Parameters
68
-
69
- | Parameter | Type | Required | Description |
70
- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
71
- | `request` | [operations.ResendWebhookRequest](../../models/operations/resendwebhookrequest.md) | :heavy_check_mark: | The request object to use for the request. |
72
- | `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. |
73
- | `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. |
74
- | `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. |
75
-
76
- ### Response
77
-
78
- **Promise\<[operations.ResendWebhookResponse](../../models/operations/resendwebhookresponse.md)\>**
79
-
80
- ### Errors
81
-
82
- | Error Type | Status Code | Content Type |
83
- | --------------- | --------------- | --------------- |
84
- | errors.SDKError | 4XX, 5XX | \*/\* |
@@ -1,9 +0,0 @@
1
- import { SteamSetsCore } from "../core.js";
2
- import { RequestOptions } from "../lib/sdks.js";
3
- import { ConnectionError, InvalidRequestError, RequestAbortedError, RequestTimeoutError, UnexpectedClientError } from "../models/errors/httpclienterrors.js";
4
- import { SDKError } from "../models/errors/sdkerror.js";
5
- import { SDKValidationError } from "../models/errors/sdkvalidationerror.js";
6
- import * as operations from "../models/operations/index.js";
7
- import { Result } from "../types/fp.js";
8
- export declare function webhooksResend(client: SteamSetsCore, request: operations.ResendWebhookRequest, options?: RequestOptions): Promise<Result<operations.ResendWebhookResponse, SDKError | SDKValidationError | UnexpectedClientError | InvalidRequestError | RequestAbortedError | RequestTimeoutError | ConnectionError>>;
9
- //# sourceMappingURL=webhooksResend.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"webhooksResend.d.ts","sourceRoot":"","sources":["../src/funcs/webhooksResend.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,aAAa,EAAE,MAAM,YAAY,CAAC;AAK3C,OAAO,EAAE,cAAc,EAAE,MAAM,gBAAgB,CAAC;AAGhD,OAAO,EACL,eAAe,EACf,mBAAmB,EACnB,mBAAmB,EACnB,mBAAmB,EACnB,qBAAqB,EACtB,MAAM,sCAAsC,CAAC;AAC9C,OAAO,EAAE,QAAQ,EAAE,MAAM,8BAA8B,CAAC;AACxD,OAAO,EAAE,kBAAkB,EAAE,MAAM,wCAAwC,CAAC;AAC5E,OAAO,KAAK,UAAU,MAAM,+BAA+B,CAAC;AAC5D,OAAO,EAAE,MAAM,EAAE,MAAM,gBAAgB,CAAC;AAExC,wBAAsB,cAAc,CAClC,MAAM,EAAE,aAAa,EACrB,OAAO,EAAE,UAAU,CAAC,oBAAoB,EACxC,OAAO,CAAC,EAAE,cAAc,GACvB,OAAO,CACR,MAAM,CACJ,UAAU,CAAC,qBAAqB,EAC9B,QAAQ,GACR,kBAAkB,GAClB,qBAAqB,GACrB,mBAAmB,GACnB,mBAAmB,GACnB,mBAAmB,GACnB,eAAe,CAClB,CACF,CAiHA"}
@@ -1,114 +0,0 @@
1
- "use strict";
2
- /*
3
- * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
4
- */
5
- var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
6
- if (k2 === undefined) k2 = k;
7
- var desc = Object.getOwnPropertyDescriptor(m, k);
8
- if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
9
- desc = { enumerable: true, get: function() { return m[k]; } };
10
- }
11
- Object.defineProperty(o, k2, desc);
12
- }) : (function(o, m, k, k2) {
13
- if (k2 === undefined) k2 = k;
14
- o[k2] = m[k];
15
- }));
16
- var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
17
- Object.defineProperty(o, "default", { enumerable: true, value: v });
18
- }) : function(o, v) {
19
- o["default"] = v;
20
- });
21
- var __importStar = (this && this.__importStar) || function (mod) {
22
- if (mod && mod.__esModule) return mod;
23
- var result = {};
24
- if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
25
- __setModuleDefault(result, mod);
26
- return result;
27
- };
28
- Object.defineProperty(exports, "__esModule", { value: true });
29
- exports.webhooksResend = webhooksResend;
30
- const encodings_js_1 = require("../lib/encodings.js");
31
- const M = __importStar(require("../lib/matchers.js"));
32
- const primitives_js_1 = require("../lib/primitives.js");
33
- const schemas_js_1 = require("../lib/schemas.js");
34
- const security_js_1 = require("../lib/security.js");
35
- const url_js_1 = require("../lib/url.js");
36
- const operations = __importStar(require("../models/operations/index.js"));
37
- async function webhooksResend(client, request, options) {
38
- const parsed = (0, schemas_js_1.safeParse)(request, (value) => operations.ResendWebhookRequest$outboundSchema.parse(value), "Input validation failed");
39
- if (!parsed.ok) {
40
- return parsed;
41
- }
42
- const payload = parsed.value;
43
- const body = payload.RequestBody;
44
- const path = (0, url_js_1.pathToFunc)("/webhooks/resend")();
45
- const headers = new Headers((0, primitives_js_1.compactMap)({
46
- "Content-Type": "application/octet-stream",
47
- Accept: "application/problem+json",
48
- "webhook-id": (0, encodings_js_1.encodeSimple)("webhook-id", payload["webhook-id"], {
49
- explode: false,
50
- charEncoding: "none",
51
- }),
52
- "webhook-signature": (0, encodings_js_1.encodeSimple)("webhook-signature", payload["webhook-signature"], { explode: false, charEncoding: "none" }),
53
- "webhook-timestamp": (0, encodings_js_1.encodeSimple)("webhook-timestamp", payload["webhook-timestamp"], { explode: false, charEncoding: "none" }),
54
- }));
55
- const secConfig = await (0, security_js_1.extractSecurity)(client._options.token);
56
- const securityInput = secConfig == null ? {} : { token: secConfig };
57
- const requestSecurity = (0, security_js_1.resolveGlobalSecurity)(securityInput);
58
- const context = {
59
- operationID: "resend-webhook",
60
- oAuth2Scopes: [],
61
- resolvedSecurity: requestSecurity,
62
- securitySource: client._options.token,
63
- retryConfig: options?.retries
64
- || client._options.retryConfig
65
- || {
66
- strategy: "backoff",
67
- backoff: {
68
- initialInterval: 500,
69
- maxInterval: 5000,
70
- exponent: 1.5,
71
- maxElapsedTime: 60000,
72
- },
73
- retryConnectionErrors: true,
74
- }
75
- || { strategy: "none" },
76
- retryCodes: options?.retryCodes || ["501", "502", "503", "504"],
77
- };
78
- const requestRes = client._createRequest(context, {
79
- security: requestSecurity,
80
- method: "POST",
81
- baseURL: options?.serverURL,
82
- path: path,
83
- headers: headers,
84
- body: body,
85
- uaHeader: "x-speakeasy-user-agent",
86
- timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1,
87
- }, options);
88
- if (!requestRes.ok) {
89
- return requestRes;
90
- }
91
- const req = requestRes.value;
92
- const doResult = await client._do(req, {
93
- context,
94
- errorCodes: ["4XX", "5XX"],
95
- retryConfig: context.retryConfig,
96
- retryCodes: context.retryCodes,
97
- });
98
- if (!doResult.ok) {
99
- return doResult;
100
- }
101
- const response = doResult.value;
102
- const responseFields = {
103
- HttpMeta: { Response: response, Request: req },
104
- };
105
- const [result] = await M.match(M.nil(204, operations.ResendWebhookResponse$inboundSchema), M.fail("4XX"), M.fail("5XX"), M.json("default", operations.ResendWebhookResponse$inboundSchema, {
106
- ctype: "application/problem+json",
107
- key: "ErrorModel",
108
- }))(response, req, { extraFields: responseFields });
109
- if (!result.ok) {
110
- return result;
111
- }
112
- return result;
113
- }
114
- //# sourceMappingURL=webhooksResend.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"webhooksResend.js","sourceRoot":"","sources":["../src/funcs/webhooksResend.ts"],"names":[],"mappings":";AAAA;;GAEG;;;;;;;;;;;;;;;;;;;;;;;;;AAsBH,wCAgIC;AAnJD,sDAAmD;AACnD,sDAAwC;AACxC,wDAAkD;AAClD,kDAA8C;AAE9C,oDAA4E;AAC5E,0CAA2C;AAU3C,0EAA4D;AAGrD,KAAK,UAAU,cAAc,CAClC,MAAqB,EACrB,OAAwC,EACxC,OAAwB;IAaxB,MAAM,MAAM,GAAG,IAAA,sBAAS,EACtB,OAAO,EACP,CAAC,KAAK,EAAE,EAAE,CAAC,UAAU,CAAC,mCAAmC,CAAC,KAAK,CAAC,KAAK,CAAC,EACtE,yBAAyB,CAC1B,CAAC;IACF,IAAI,CAAC,MAAM,CAAC,EAAE,EAAE,CAAC;QACf,OAAO,MAAM,CAAC;IAChB,CAAC;IACD,MAAM,OAAO,GAAG,MAAM,CAAC,KAAK,CAAC;IAC7B,MAAM,IAAI,GAAG,OAAO,CAAC,WAAW,CAAC;IAEjC,MAAM,IAAI,GAAG,IAAA,mBAAU,EAAC,kBAAkB,CAAC,EAAE,CAAC;IAE9C,MAAM,OAAO,GAAG,IAAI,OAAO,CAAC,IAAA,0BAAU,EAAC;QACrC,cAAc,EAAE,0BAA0B;QAC1C,MAAM,EAAE,0BAA0B;QAClC,YAAY,EAAE,IAAA,2BAAY,EAAC,YAAY,EAAE,OAAO,CAAC,YAAY,CAAC,EAAE;YAC9D,OAAO,EAAE,KAAK;YACd,YAAY,EAAE,MAAM;SACrB,CAAC;QACF,mBAAmB,EAAE,IAAA,2BAAY,EAC/B,mBAAmB,EACnB,OAAO,CAAC,mBAA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,CAAC,CAAC;IAClD,IAAI,CAAC,MAAM,CAAC,EAAE,EAAE,CAAC;QACf,OAAO,MAAM,CAAC;IAChB,CAAC;IAED,OAAO,MAAM,CAAC;AAChB,CAAC"}
@@ -1,63 +0,0 @@
1
- import * as z from "zod";
2
- import { Result as SafeParseResult } from "../../types/fp.js";
3
- import { SDKValidationError } from "../errors/sdkvalidationerror.js";
4
- import { ErrorDetail, ErrorDetail$Outbound } from "./errordetail.js";
5
- export type ErrorModel = {
6
- /**
7
- * A URL to the JSON Schema for this object.
8
- */
9
- dollarSchema?: string | undefined;
10
- /**
11
- * A human-readable explanation specific to this occurrence of the problem.
12
- */
13
- detail?: string | undefined;
14
- /**
15
- * Optional list of individual error details
16
- */
17
- errors?: Array<ErrorDetail> | null | undefined;
18
- /**
19
- * A URI reference that identifies the specific occurrence of the problem.
20
- */
21
- instance?: string | undefined;
22
- /**
23
- * HTTP status code
24
- */
25
- status?: number | undefined;
26
- /**
27
- * A short, human-readable summary of the problem type. This value should not change between occurrences of the error.
28
- */
29
- title?: string | undefined;
30
- /**
31
- * A URI reference to human-readable documentation for the error.
32
- */
33
- type?: string | undefined;
34
- };
35
- /** @internal */
36
- export declare const ErrorModel$inboundSchema: z.ZodType<ErrorModel, z.ZodTypeDef, unknown>;
37
- /** @internal */
38
- export type ErrorModel$Outbound = {
39
- $schema?: string | undefined;
40
- detail?: string | undefined;
41
- errors?: Array<ErrorDetail$Outbound> | null | undefined;
42
- instance?: string | undefined;
43
- status?: number | undefined;
44
- title?: string | undefined;
45
- type: string;
46
- };
47
- /** @internal */
48
- export declare const ErrorModel$outboundSchema: z.ZodType<ErrorModel$Outbound, z.ZodTypeDef, ErrorModel>;
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 declare namespace ErrorModel$ {
54
- /** @deprecated use `ErrorModel$inboundSchema` instead. */
55
- const inboundSchema: z.ZodType<ErrorModel, z.ZodTypeDef, unknown>;
56
- /** @deprecated use `ErrorModel$outboundSchema` instead. */
57
- const outboundSchema: z.ZodType<ErrorModel$Outbound, z.ZodTypeDef, ErrorModel>;
58
- /** @deprecated use `ErrorModel$Outbound` instead. */
59
- type Outbound = ErrorModel$Outbound;
60
- }
61
- export declare function errorModelToJSON(errorModel: ErrorModel): string;
62
- export declare function errorModelFromJSON(jsonString: string): SafeParseResult<ErrorModel, SDKValidationError>;
63
- //# sourceMappingURL=errormodel.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"errormodel.d.ts","sourceRoot":"","sources":["../../src/models/components/errormodel.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,CAAC,MAAM,KAAK,CAAC;AAGzB,OAAO,EAAE,MAAM,IAAI,eAAe,EAAE,MAAM,mBAAmB,CAAC;AAC9D,OAAO,EAAE,kBAAkB,EAAE,MAAM,iCAAiC,CAAC;AACrE,OAAO,EACL,WAAW,EAEX,oBAAoB,EAErB,MAAM,kBAAkB,CAAC;AAE1B,MAAM,MAAM,UAAU,GAAG;IACvB;;OAEG;IACH,YAAY,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IAClC;;OAEG;IACH,MAAM,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IAC5B;;OAEG;IACH,MAAM,CAAC,EAAE,KAAK,CAAC,WAAW,CAAC,GAAG,IAAI,GAAG,SAAS,CAAC;IAC/C;;OAEG;IACH,QAAQ,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IAC9B;;OAEG;IACH,MAAM,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IAC5B;;OAEG;IACH,KAAK,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IAC3B;;OAEG;IACH,IAAI,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;CAC3B,CAAC;AAEF,gBAAgB;AAChB,eAAO,MAAM,wBAAwB,EAAE,CAAC,CAAC,OAAO,CAC9C,UAAU,EACV,CAAC,CAAC,UAAU,EACZ,OAAO,CAaP,CA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