@steamsets/client-ts 0.14.8 → 0.14.9

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 (77) hide show
  1. package/README.md +0 -7
  2. package/funcs/accountGetInfo.js +1 -1
  3. package/funcs/accountGetInfo.js.map +1 -1
  4. package/funcs/dataGetInfo.js +1 -1
  5. package/funcs/dataGetInfo.js.map +1 -1
  6. package/funcs/publicGetInfo.js +1 -1
  7. package/funcs/publicGetInfo.js.map +1 -1
  8. package/lib/config.d.ts +2 -2
  9. package/lib/config.js +2 -2
  10. package/models/components/colortag.d.ts +0 -2
  11. package/models/components/colortag.d.ts.map +1 -1
  12. package/models/components/colortag.js +0 -2
  13. package/models/components/colortag.js.map +1 -1
  14. package/models/components/index.d.ts +1 -2
  15. package/models/components/index.d.ts.map +1 -1
  16. package/models/components/index.js +1 -2
  17. package/models/components/index.js.map +1 -1
  18. package/models/components/{accountinfobody.d.ts → v1accountinforesponsebody.d.ts} +53 -14
  19. package/models/components/v1accountinforesponsebody.d.ts.map +1 -0
  20. package/models/components/{accountinfobody.js → v1accountinforesponsebody.js} +42 -17
  21. package/models/components/v1accountinforesponsebody.js.map +1 -0
  22. package/models/operations/accountv1getinfo.d.ts +2 -2
  23. package/models/operations/accountv1getinfo.d.ts.map +1 -1
  24. package/models/operations/accountv1getinfo.js +6 -4
  25. package/models/operations/accountv1getinfo.js.map +1 -1
  26. package/models/operations/index.d.ts +0 -2
  27. package/models/operations/index.d.ts.map +1 -1
  28. package/models/operations/index.js +0 -2
  29. package/models/operations/index.js.map +1 -1
  30. package/package.json +1 -1
  31. package/sdk/sdk.d.ts +0 -3
  32. package/sdk/sdk.d.ts.map +1 -1
  33. package/sdk/sdk.js +0 -4
  34. package/sdk/sdk.js.map +1 -1
  35. package/src/funcs/accountGetInfo.ts +1 -1
  36. package/src/funcs/dataGetInfo.ts +1 -1
  37. package/src/funcs/publicGetInfo.ts +1 -1
  38. package/src/lib/config.ts +2 -2
  39. package/src/models/components/colortag.ts +0 -4
  40. package/src/models/components/index.ts +1 -2
  41. package/src/models/components/{accountinfobody.ts → v1accountinforesponsebody.ts} +58 -21
  42. package/src/models/operations/accountv1getinfo.ts +10 -6
  43. package/src/models/operations/index.ts +0 -2
  44. package/src/sdk/sdk.ts +0 -6
  45. package/docs/sdks/meta/README.md +0 -153
  46. package/funcs/metaAccountV1GetEmbed.d.ts +0 -11
  47. package/funcs/metaAccountV1GetEmbed.d.ts.map +0 -1
  48. package/funcs/metaAccountV1GetEmbed.js +0 -111
  49. package/funcs/metaAccountV1GetEmbed.js.map +0 -1
  50. package/funcs/metaAccountV1GetMeta.d.ts +0 -11
  51. package/funcs/metaAccountV1GetMeta.d.ts.map +0 -1
  52. package/funcs/metaAccountV1GetMeta.js +0 -110
  53. package/funcs/metaAccountV1GetMeta.js.map +0 -1
  54. package/models/components/accountinfobody.d.ts.map +0 -1
  55. package/models/components/accountinfobody.js.map +0 -1
  56. package/models/components/v1accountmetaresponsebody.d.ts +0 -32
  57. package/models/components/v1accountmetaresponsebody.d.ts.map +0 -1
  58. package/models/components/v1accountmetaresponsebody.js +0 -68
  59. package/models/components/v1accountmetaresponsebody.js.map +0 -1
  60. package/models/operations/accountv1getembed.d.ts +0 -41
  61. package/models/operations/accountv1getembed.d.ts.map +0 -1
  62. package/models/operations/accountv1getembed.js +0 -75
  63. package/models/operations/accountv1getembed.js.map +0 -1
  64. package/models/operations/accountv1getmeta.d.ts +0 -35
  65. package/models/operations/accountv1getmeta.d.ts.map +0 -1
  66. package/models/operations/accountv1getmeta.js +0 -75
  67. package/models/operations/accountv1getmeta.js.map +0 -1
  68. package/sdk/meta.d.ts +0 -8
  69. package/sdk/meta.d.ts.map +0 -1
  70. package/sdk/meta.js +0 -20
  71. package/sdk/meta.js.map +0 -1
  72. package/src/funcs/metaAccountV1GetEmbed.ts +0 -143
  73. package/src/funcs/metaAccountV1GetMeta.ts +0 -142
  74. package/src/models/components/v1accountmetaresponsebody.ts +0 -78
  75. package/src/models/operations/accountv1getembed.ts +0 -89
  76. package/src/models/operations/accountv1getmeta.ts +0 -89
  77. package/src/sdk/meta.ts +0 -34
@@ -1,75 +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.AccountV1GetMetaResponse$ = exports.AccountV1GetMetaResponse$outboundSchema = exports.AccountV1GetMetaResponse$inboundSchema = void 0;
30
- exports.accountV1GetMetaResponseToJSON = accountV1GetMetaResponseToJSON;
31
- exports.accountV1GetMetaResponseFromJSON = accountV1GetMetaResponseFromJSON;
32
- const z = __importStar(require("zod"));
33
- const primitives_js_1 = require("../../lib/primitives.js");
34
- const schemas_js_1 = require("../../lib/schemas.js");
35
- const components = __importStar(require("../components/index.js"));
36
- /** @internal */
37
- exports.AccountV1GetMetaResponse$inboundSchema = z.object({
38
- HttpMeta: components.HTTPMetadata$inboundSchema,
39
- V1AccountMetaResponseBody: components.V1AccountMetaResponseBody$inboundSchema
40
- .optional(),
41
- }).transform((v) => {
42
- return (0, primitives_js_1.remap)(v, {
43
- "HttpMeta": "httpMeta",
44
- "V1AccountMetaResponseBody": "v1AccountMetaResponseBody",
45
- });
46
- });
47
- /** @internal */
48
- exports.AccountV1GetMetaResponse$outboundSchema = z.object({
49
- httpMeta: components.HTTPMetadata$outboundSchema,
50
- v1AccountMetaResponseBody: components.V1AccountMetaResponseBody$outboundSchema
51
- .optional(),
52
- }).transform((v) => {
53
- return (0, primitives_js_1.remap)(v, {
54
- httpMeta: "HttpMeta",
55
- v1AccountMetaResponseBody: "V1AccountMetaResponseBody",
56
- });
57
- });
58
- /**
59
- * @internal
60
- * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
61
- */
62
- var AccountV1GetMetaResponse$;
63
- (function (AccountV1GetMetaResponse$) {
64
- /** @deprecated use `AccountV1GetMetaResponse$inboundSchema` instead. */
65
- AccountV1GetMetaResponse$.inboundSchema = exports.AccountV1GetMetaResponse$inboundSchema;
66
- /** @deprecated use `AccountV1GetMetaResponse$outboundSchema` instead. */
67
- AccountV1GetMetaResponse$.outboundSchema = exports.AccountV1GetMetaResponse$outboundSchema;
68
- })(AccountV1GetMetaResponse$ || (exports.AccountV1GetMetaResponse$ = AccountV1GetMetaResponse$ = {}));
69
- function accountV1GetMetaResponseToJSON(accountV1GetMetaResponse) {
70
- return JSON.stringify(exports.AccountV1GetMetaResponse$outboundSchema.parse(accountV1GetMetaResponse));
71
- }
72
- function accountV1GetMetaResponseFromJSON(jsonString) {
73
- return (0, schemas_js_1.safeParse)(jsonString, (x) => exports.AccountV1GetMetaResponse$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'AccountV1GetMetaResponse' from JSON`);
74
- }
75
- //# sourceMappingURL=accountv1getmeta.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"accountv1getmeta.js","sourceRoot":"","sources":["../../src/models/operations/accountv1getmeta.ts"],"names":[],"mappings":";AAAA;;GAEG;;;;;;;;;;;;;;;;;;;;;;;;;;AAsEH,wEAMC;AAED,4EAQC;AApFD,uCAAyB;AACzB,2DAA0D;AAC1D,qDAAiD;AAEjD,mEAAqD;AAWrD,gBAAgB;AACH,QAAA,sCAAsC,GAI/C,CAAC,CAAC,MAAM,CAAC;IACX,QAAQ,EAAE,UAAU,CAAC,0BAA0B;IAC/C,yBAAyB,EAAE,UAAU,CAAC,uCAAuC;SAC1E,QAAQ,EAAE;CACd,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,EAAE,EAAE;IACjB,OAAO,IAAA,qBAAM,EAAC,CAAC,EAAE;QACf,UAAU,EAAE,UAAU;QACtB,2BAA2B,EAAE,2BAA2B;KACzD,CAAC,CAAC;AACL,CAAC,CAAC,CAAC;AAUH,gBAAgB;AACH,QAAA,uCAAuC,GAIhD,CAAC,CAAC,MAAM,CAAC;IACX,QAAQ,EAAE,UAAU,CAAC,2BAA2B;IAChD,yBAAyB,EAAE,UAAU,CAAC,wCAAwC;SAC3E,QAAQ,EAAE;CACd,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,EAAE,EAAE;IACjB,OAAO,IAAA,qBAAM,EAAC,CAAC,EAAE;QACf,QAAQ,EAAE,UAAU;QACpB,yBAAyB,EAAE,2BAA2B;KACvD,CAAC,CAAC;AACL,CAAC,CAAC,CAAC;AAEH;;;GAGG;AACH,IAAiB,yBAAyB,CAOzC;AAPD,WAAiB,yBAAyB;IACxC,wEAAwE;IAC3D,uCAAa,GAAG,8CAAsC,CAAC;IACpE,yEAAyE;IAC5D,wCAAc,GAAG,+CAAuC,CAAC;AAGxE,CAAC,EAPgB,yBAAyB,yCAAzB,yBAAyB,QAOzC;AAED,SAAgB,8BAA8B,CAC5C,wBAAkD;IAElD,OAAO,IAAI,CAAC,SAAS,CACnB,+CAAuC,CAAC,KAAK,CAAC,wBAAwB,CAAC,CACxE,CAAC;AACJ,CAAC;AAED,SAAgB,gCAAgC,CAC9C,UAAkB;IAElB,OAAO,IAAA,sBAAS,EACd,UAAU,EACV,CAAC,CAAC,EAAE,EAAE,CAAC,8CAAsC,CAAC,KAAK,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,EAClE,sDAAsD,CACvD,CAAC;AACJ,CAAC"}
package/sdk/meta.d.ts DELETED
@@ -1,8 +0,0 @@
1
- import { ClientSDK, RequestOptions } from "../lib/sdks.js";
2
- import * as components from "../models/components/index.js";
3
- import * as operations from "../models/operations/index.js";
4
- export declare class Meta extends ClientSDK {
5
- accountV1GetEmbed(request: components.AccountSearch, options?: RequestOptions): Promise<operations.AccountV1GetEmbedResponse>;
6
- accountV1GetMeta(request: components.AccountSearch, options?: RequestOptions): Promise<operations.AccountV1GetMetaResponse>;
7
- }
8
- //# sourceMappingURL=meta.d.ts.map
package/sdk/meta.d.ts.map DELETED
@@ -1 +0,0 @@
1
- {"version":3,"file":"meta.d.ts","sourceRoot":"","sources":["../src/sdk/meta.ts"],"names":[],"mappings":"AAMA,OAAO,EAAE,SAAS,EAAE,cAAc,EAAE,MAAM,gBAAgB,CAAC;AAC3D,OAAO,KAAK,UAAU,MAAM,+BAA+B,CAAC;AAC5D,OAAO,KAAK,UAAU,MAAM,+BAA+B,CAAC;AAG5D,qBAAa,IAAK,SAAQ,SAAS;IAC3B,iBAAiB,CACrB,OAAO,EAAE,UAAU,CAAC,aAAa,EACjC,OAAO,CAAC,EAAE,cAAc,GACvB,OAAO,CAAC,UAAU,CAAC,yBAAyB,CAAC;IAQ1C,gBAAgB,CACpB,OAAO,EAAE,UAAU,CAAC,aAAa,EACjC,OAAO,CAAC,EAAE,cAAc,GACvB,OAAO,CAAC,UAAU,CAAC,wBAAwB,CAAC;CAOhD"}
package/sdk/meta.js DELETED
@@ -1,20 +0,0 @@
1
- "use strict";
2
- /*
3
- * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
4
- */
5
- Object.defineProperty(exports, "__esModule", { value: true });
6
- exports.Meta = void 0;
7
- const metaAccountV1GetEmbed_js_1 = require("../funcs/metaAccountV1GetEmbed.js");
8
- const metaAccountV1GetMeta_js_1 = require("../funcs/metaAccountV1GetMeta.js");
9
- const sdks_js_1 = require("../lib/sdks.js");
10
- const fp_js_1 = require("../types/fp.js");
11
- class Meta extends sdks_js_1.ClientSDK {
12
- async accountV1GetEmbed(request, options) {
13
- return (0, fp_js_1.unwrapAsync)((0, metaAccountV1GetEmbed_js_1.metaAccountV1GetEmbed)(this, request, options));
14
- }
15
- async accountV1GetMeta(request, options) {
16
- return (0, fp_js_1.unwrapAsync)((0, metaAccountV1GetMeta_js_1.metaAccountV1GetMeta)(this, request, options));
17
- }
18
- }
19
- exports.Meta = Meta;
20
- //# sourceMappingURL=meta.js.map
package/sdk/meta.js.map DELETED
@@ -1 +0,0 @@
1
- {"version":3,"file":"meta.js","sourceRoot":"","sources":["../src/sdk/meta.ts"],"names":[],"mappings":";AAAA;;GAEG;;;AAEH,gFAA0E;AAC1E,8EAAwE;AACxE,4CAA2D;AAG3D,0CAA6C;AAE7C,MAAa,IAAK,SAAQ,mBAAS;IACjC,KAAK,CAAC,iBAAiB,CACrB,OAAiC,EACjC,OAAwB;QAExB,OAAO,IAAA,mBAAW,EAAC,IAAA,gDAAqB,EACtC,IAAI,EACJ,OAAO,EACP,OAAO,CACR,CAAC,CAAC;IACL,CAAC;IAED,KAAK,CAAC,gBAAgB,CACpB,OAAiC,EACjC,OAAwB;QAExB,OAAO,IAAA,mBAAW,EAAC,IAAA,8CAAoB,EACrC,IAAI,EACJ,OAAO,EACP,OAAO,CACR,CAAC,CAAC;IACL,CAAC;CACF;AAtBD,oBAsBC"}
@@ -1,143 +0,0 @@
1
- /*
2
- * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
3
- */
4
-
5
- import { SteamSetsCore } from "../core.js";
6
- import { encodeJSON } from "../lib/encodings.js";
7
- import * as M from "../lib/matchers.js";
8
- import { safeParse } from "../lib/schemas.js";
9
- import { RequestOptions } from "../lib/sdks.js";
10
- import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js";
11
- import { pathToFunc } from "../lib/url.js";
12
- import * as components from "../models/components/index.js";
13
- import {
14
- ConnectionError,
15
- InvalidRequestError,
16
- RequestAbortedError,
17
- RequestTimeoutError,
18
- UnexpectedClientError,
19
- } from "../models/errors/httpclienterrors.js";
20
- import * as errors from "../models/errors/index.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 metaAccountV1GetEmbed(
27
- client: SteamSetsCore,
28
- request: components.AccountSearch,
29
- options?: RequestOptions,
30
- ): Promise<
31
- Result<
32
- operations.AccountV1GetEmbedResponse,
33
- | errors.ErrorModel
34
- | SDKError
35
- | SDKValidationError
36
- | UnexpectedClientError
37
- | InvalidRequestError
38
- | RequestAbortedError
39
- | RequestTimeoutError
40
- | ConnectionError
41
- >
42
- > {
43
- const parsed = safeParse(
44
- request,
45
- (value) => components.AccountSearch$outboundSchema.parse(value),
46
- "Input validation failed",
47
- );
48
- if (!parsed.ok) {
49
- return parsed;
50
- }
51
- const payload = parsed.value;
52
- const body = encodeJSON("body", payload, { explode: true });
53
-
54
- const path = pathToFunc("/account.v1.AccountService/GetEmbed")();
55
-
56
- const headers = new Headers({
57
- "Content-Type": "application/json",
58
- Accept: "application/json",
59
- });
60
-
61
- const secConfig = await extractSecurity(client._options.token);
62
- const securityInput = secConfig == null ? {} : { token: secConfig };
63
- const requestSecurity = resolveGlobalSecurity(securityInput);
64
-
65
- const context = {
66
- operationID: "account.v1.getEmbed",
67
- oAuth2Scopes: [],
68
-
69
- resolvedSecurity: requestSecurity,
70
-
71
- securitySource: client._options.token,
72
- retryConfig: options?.retries
73
- || client._options.retryConfig
74
- || {
75
- strategy: "backoff",
76
- backoff: {
77
- initialInterval: 500,
78
- maxInterval: 5000,
79
- exponent: 1.5,
80
- maxElapsedTime: 60000,
81
- },
82
- retryConnectionErrors: true,
83
- }
84
- || { strategy: "none" },
85
- retryCodes: options?.retryCodes || ["501", "502", "503", "504"],
86
- };
87
-
88
- const requestRes = client._createRequest(context, {
89
- security: requestSecurity,
90
- method: "POST",
91
- baseURL: options?.serverURL,
92
- path: path,
93
- headers: headers,
94
- body: body,
95
- uaHeader: "x-speakeasy-user-agent",
96
- timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1,
97
- }, options);
98
- if (!requestRes.ok) {
99
- return requestRes;
100
- }
101
- const req = requestRes.value;
102
-
103
- const doResult = await client._do(req, {
104
- context,
105
- errorCodes: ["403", "404", "422", "429", "4XX", "500", "5XX"],
106
- retryConfig: context.retryConfig,
107
- retryCodes: context.retryCodes,
108
- });
109
- if (!doResult.ok) {
110
- return doResult;
111
- }
112
- const response = doResult.value;
113
-
114
- const responseFields = {
115
- HttpMeta: { Response: response, Request: req },
116
- };
117
-
118
- const [result] = await M.match<
119
- operations.AccountV1GetEmbedResponse,
120
- | errors.ErrorModel
121
- | SDKError
122
- | SDKValidationError
123
- | UnexpectedClientError
124
- | InvalidRequestError
125
- | RequestAbortedError
126
- | RequestTimeoutError
127
- | ConnectionError
128
- >(
129
- M.json(200, operations.AccountV1GetEmbedResponse$inboundSchema, {
130
- hdrs: true,
131
- key: "string",
132
- }),
133
- M.jsonErr([403, 404, 422, 429, 500], errors.ErrorModel$inboundSchema, {
134
- ctype: "application/problem+json",
135
- }),
136
- M.fail(["4XX", "5XX"]),
137
- )(response, req, { extraFields: responseFields });
138
- if (!result.ok) {
139
- return result;
140
- }
141
-
142
- return result;
143
- }
@@ -1,142 +0,0 @@
1
- /*
2
- * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
3
- */
4
-
5
- import { SteamSetsCore } from "../core.js";
6
- import { encodeJSON } from "../lib/encodings.js";
7
- import * as M from "../lib/matchers.js";
8
- import { safeParse } from "../lib/schemas.js";
9
- import { RequestOptions } from "../lib/sdks.js";
10
- import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js";
11
- import { pathToFunc } from "../lib/url.js";
12
- import * as components from "../models/components/index.js";
13
- import {
14
- ConnectionError,
15
- InvalidRequestError,
16
- RequestAbortedError,
17
- RequestTimeoutError,
18
- UnexpectedClientError,
19
- } from "../models/errors/httpclienterrors.js";
20
- import * as errors from "../models/errors/index.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 metaAccountV1GetMeta(
27
- client: SteamSetsCore,
28
- request: components.AccountSearch,
29
- options?: RequestOptions,
30
- ): Promise<
31
- Result<
32
- operations.AccountV1GetMetaResponse,
33
- | errors.ErrorModel
34
- | SDKError
35
- | SDKValidationError
36
- | UnexpectedClientError
37
- | InvalidRequestError
38
- | RequestAbortedError
39
- | RequestTimeoutError
40
- | ConnectionError
41
- >
42
- > {
43
- const parsed = safeParse(
44
- request,
45
- (value) => components.AccountSearch$outboundSchema.parse(value),
46
- "Input validation failed",
47
- );
48
- if (!parsed.ok) {
49
- return parsed;
50
- }
51
- const payload = parsed.value;
52
- const body = encodeJSON("body", payload, { explode: true });
53
-
54
- const path = pathToFunc("/account.v1.AccountService/GetMeta")();
55
-
56
- const headers = new Headers({
57
- "Content-Type": "application/json",
58
- Accept: "application/json",
59
- });
60
-
61
- const secConfig = await extractSecurity(client._options.token);
62
- const securityInput = secConfig == null ? {} : { token: secConfig };
63
- const requestSecurity = resolveGlobalSecurity(securityInput);
64
-
65
- const context = {
66
- operationID: "account.v1.getMeta",
67
- oAuth2Scopes: [],
68
-
69
- resolvedSecurity: requestSecurity,
70
-
71
- securitySource: client._options.token,
72
- retryConfig: options?.retries
73
- || client._options.retryConfig
74
- || {
75
- strategy: "backoff",
76
- backoff: {
77
- initialInterval: 500,
78
- maxInterval: 5000,
79
- exponent: 1.5,
80
- maxElapsedTime: 60000,
81
- },
82
- retryConnectionErrors: true,
83
- }
84
- || { strategy: "none" },
85
- retryCodes: options?.retryCodes || ["501", "502", "503", "504"],
86
- };
87
-
88
- const requestRes = client._createRequest(context, {
89
- security: requestSecurity,
90
- method: "POST",
91
- baseURL: options?.serverURL,
92
- path: path,
93
- headers: headers,
94
- body: body,
95
- uaHeader: "x-speakeasy-user-agent",
96
- timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1,
97
- }, options);
98
- if (!requestRes.ok) {
99
- return requestRes;
100
- }
101
- const req = requestRes.value;
102
-
103
- const doResult = await client._do(req, {
104
- context,
105
- errorCodes: ["403", "404", "422", "429", "4XX", "500", "5XX"],
106
- retryConfig: context.retryConfig,
107
- retryCodes: context.retryCodes,
108
- });
109
- if (!doResult.ok) {
110
- return doResult;
111
- }
112
- const response = doResult.value;
113
-
114
- const responseFields = {
115
- HttpMeta: { Response: response, Request: req },
116
- };
117
-
118
- const [result] = await M.match<
119
- operations.AccountV1GetMetaResponse,
120
- | errors.ErrorModel
121
- | SDKError
122
- | SDKValidationError
123
- | UnexpectedClientError
124
- | InvalidRequestError
125
- | RequestAbortedError
126
- | RequestTimeoutError
127
- | ConnectionError
128
- >(
129
- M.json(200, operations.AccountV1GetMetaResponse$inboundSchema, {
130
- key: "V1AccountMetaResponseBody",
131
- }),
132
- M.jsonErr([403, 404, 422, 429, 500], errors.ErrorModel$inboundSchema, {
133
- ctype: "application/problem+json",
134
- }),
135
- M.fail(["4XX", "5XX"]),
136
- )(response, req, { extraFields: responseFields });
137
- if (!result.ok) {
138
- return result;
139
- }
140
-
141
- return result;
142
- }
@@ -1,78 +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
-
11
- export type V1AccountMetaResponseBody = {
12
- /**
13
- * A URL to the JSON Schema for this object.
14
- */
15
- dollarSchema?: string | undefined;
16
- };
17
-
18
- /** @internal */
19
- export const V1AccountMetaResponseBody$inboundSchema: z.ZodType<
20
- V1AccountMetaResponseBody,
21
- z.ZodTypeDef,
22
- unknown
23
- > = z.object({
24
- $schema: z.string().optional(),
25
- }).transform((v) => {
26
- return remap$(v, {
27
- "$schema": "dollarSchema",
28
- });
29
- });
30
-
31
- /** @internal */
32
- export type V1AccountMetaResponseBody$Outbound = {
33
- $schema?: string | undefined;
34
- };
35
-
36
- /** @internal */
37
- export const V1AccountMetaResponseBody$outboundSchema: z.ZodType<
38
- V1AccountMetaResponseBody$Outbound,
39
- z.ZodTypeDef,
40
- V1AccountMetaResponseBody
41
- > = z.object({
42
- dollarSchema: z.string().optional(),
43
- }).transform((v) => {
44
- return remap$(v, {
45
- dollarSchema: "$schema",
46
- });
47
- });
48
-
49
- /**
50
- * @internal
51
- * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
52
- */
53
- export namespace V1AccountMetaResponseBody$ {
54
- /** @deprecated use `V1AccountMetaResponseBody$inboundSchema` instead. */
55
- export const inboundSchema = V1AccountMetaResponseBody$inboundSchema;
56
- /** @deprecated use `V1AccountMetaResponseBody$outboundSchema` instead. */
57
- export const outboundSchema = V1AccountMetaResponseBody$outboundSchema;
58
- /** @deprecated use `V1AccountMetaResponseBody$Outbound` instead. */
59
- export type Outbound = V1AccountMetaResponseBody$Outbound;
60
- }
61
-
62
- export function v1AccountMetaResponseBodyToJSON(
63
- v1AccountMetaResponseBody: V1AccountMetaResponseBody,
64
- ): string {
65
- return JSON.stringify(
66
- V1AccountMetaResponseBody$outboundSchema.parse(v1AccountMetaResponseBody),
67
- );
68
- }
69
-
70
- export function v1AccountMetaResponseBodyFromJSON(
71
- jsonString: string,
72
- ): SafeParseResult<V1AccountMetaResponseBody, SDKValidationError> {
73
- return safeParse(
74
- jsonString,
75
- (x) => V1AccountMetaResponseBody$inboundSchema.parse(JSON.parse(x)),
76
- `Failed to parse 'V1AccountMetaResponseBody' from JSON`,
77
- );
78
- }
@@ -1,89 +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 AccountV1GetEmbedResponse = {
13
- httpMeta: components.HTTPMetadata;
14
- /**
15
- * OK
16
- */
17
- string?: string | undefined;
18
- headers: { [k: string]: Array<string> };
19
- };
20
-
21
- /** @internal */
22
- export const AccountV1GetEmbedResponse$inboundSchema: z.ZodType<
23
- AccountV1GetEmbedResponse,
24
- z.ZodTypeDef,
25
- unknown
26
- > = z.object({
27
- HttpMeta: components.HTTPMetadata$inboundSchema,
28
- string: z.string().optional(),
29
- Headers: z.record(z.array(z.string())),
30
- }).transform((v) => {
31
- return remap$(v, {
32
- "HttpMeta": "httpMeta",
33
- "Headers": "headers",
34
- });
35
- });
36
-
37
- /** @internal */
38
- export type AccountV1GetEmbedResponse$Outbound = {
39
- HttpMeta: components.HTTPMetadata$Outbound;
40
- string?: string | undefined;
41
- Headers: { [k: string]: Array<string> };
42
- };
43
-
44
- /** @internal */
45
- export const AccountV1GetEmbedResponse$outboundSchema: z.ZodType<
46
- AccountV1GetEmbedResponse$Outbound,
47
- z.ZodTypeDef,
48
- AccountV1GetEmbedResponse
49
- > = z.object({
50
- httpMeta: components.HTTPMetadata$outboundSchema,
51
- string: z.string().optional(),
52
- headers: z.record(z.array(z.string())),
53
- }).transform((v) => {
54
- return remap$(v, {
55
- httpMeta: "HttpMeta",
56
- headers: "Headers",
57
- });
58
- });
59
-
60
- /**
61
- * @internal
62
- * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
63
- */
64
- export namespace AccountV1GetEmbedResponse$ {
65
- /** @deprecated use `AccountV1GetEmbedResponse$inboundSchema` instead. */
66
- export const inboundSchema = AccountV1GetEmbedResponse$inboundSchema;
67
- /** @deprecated use `AccountV1GetEmbedResponse$outboundSchema` instead. */
68
- export const outboundSchema = AccountV1GetEmbedResponse$outboundSchema;
69
- /** @deprecated use `AccountV1GetEmbedResponse$Outbound` instead. */
70
- export type Outbound = AccountV1GetEmbedResponse$Outbound;
71
- }
72
-
73
- export function accountV1GetEmbedResponseToJSON(
74
- accountV1GetEmbedResponse: AccountV1GetEmbedResponse,
75
- ): string {
76
- return JSON.stringify(
77
- AccountV1GetEmbedResponse$outboundSchema.parse(accountV1GetEmbedResponse),
78
- );
79
- }
80
-
81
- export function accountV1GetEmbedResponseFromJSON(
82
- jsonString: string,
83
- ): SafeParseResult<AccountV1GetEmbedResponse, SDKValidationError> {
84
- return safeParse(
85
- jsonString,
86
- (x) => AccountV1GetEmbedResponse$inboundSchema.parse(JSON.parse(x)),
87
- `Failed to parse 'AccountV1GetEmbedResponse' from JSON`,
88
- );
89
- }
@@ -1,89 +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 AccountV1GetMetaResponse = {
13
- httpMeta: components.HTTPMetadata;
14
- /**
15
- * OK
16
- */
17
- v1AccountMetaResponseBody?: components.V1AccountMetaResponseBody | undefined;
18
- };
19
-
20
- /** @internal */
21
- export const AccountV1GetMetaResponse$inboundSchema: z.ZodType<
22
- AccountV1GetMetaResponse,
23
- z.ZodTypeDef,
24
- unknown
25
- > = z.object({
26
- HttpMeta: components.HTTPMetadata$inboundSchema,
27
- V1AccountMetaResponseBody: components.V1AccountMetaResponseBody$inboundSchema
28
- .optional(),
29
- }).transform((v) => {
30
- return remap$(v, {
31
- "HttpMeta": "httpMeta",
32
- "V1AccountMetaResponseBody": "v1AccountMetaResponseBody",
33
- });
34
- });
35
-
36
- /** @internal */
37
- export type AccountV1GetMetaResponse$Outbound = {
38
- HttpMeta: components.HTTPMetadata$Outbound;
39
- V1AccountMetaResponseBody?:
40
- | components.V1AccountMetaResponseBody$Outbound
41
- | undefined;
42
- };
43
-
44
- /** @internal */
45
- export const AccountV1GetMetaResponse$outboundSchema: z.ZodType<
46
- AccountV1GetMetaResponse$Outbound,
47
- z.ZodTypeDef,
48
- AccountV1GetMetaResponse
49
- > = z.object({
50
- httpMeta: components.HTTPMetadata$outboundSchema,
51
- v1AccountMetaResponseBody: components.V1AccountMetaResponseBody$outboundSchema
52
- .optional(),
53
- }).transform((v) => {
54
- return remap$(v, {
55
- httpMeta: "HttpMeta",
56
- v1AccountMetaResponseBody: "V1AccountMetaResponseBody",
57
- });
58
- });
59
-
60
- /**
61
- * @internal
62
- * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
63
- */
64
- export namespace AccountV1GetMetaResponse$ {
65
- /** @deprecated use `AccountV1GetMetaResponse$inboundSchema` instead. */
66
- export const inboundSchema = AccountV1GetMetaResponse$inboundSchema;
67
- /** @deprecated use `AccountV1GetMetaResponse$outboundSchema` instead. */
68
- export const outboundSchema = AccountV1GetMetaResponse$outboundSchema;
69
- /** @deprecated use `AccountV1GetMetaResponse$Outbound` instead. */
70
- export type Outbound = AccountV1GetMetaResponse$Outbound;
71
- }
72
-
73
- export function accountV1GetMetaResponseToJSON(
74
- accountV1GetMetaResponse: AccountV1GetMetaResponse,
75
- ): string {
76
- return JSON.stringify(
77
- AccountV1GetMetaResponse$outboundSchema.parse(accountV1GetMetaResponse),
78
- );
79
- }
80
-
81
- export function accountV1GetMetaResponseFromJSON(
82
- jsonString: string,
83
- ): SafeParseResult<AccountV1GetMetaResponse, SDKValidationError> {
84
- return safeParse(
85
- jsonString,
86
- (x) => AccountV1GetMetaResponse$inboundSchema.parse(JSON.parse(x)),
87
- `Failed to parse 'AccountV1GetMetaResponse' from JSON`,
88
- );
89
- }