@steamsets/client-ts 0.13.4 → 0.13.7

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 (148) hide show
  1. package/README.md +36 -26
  2. package/docs/sdks/account/README.md +72 -0
  3. package/docs/sdks/admin/README.md +159 -0
  4. package/docs/sdks/badge/README.md +150 -0
  5. package/funcs/accountAccountV1GetBadgeBookmarks.d.ts +11 -0
  6. package/funcs/accountAccountV1GetBadgeBookmarks.d.ts.map +1 -0
  7. package/funcs/accountAccountV1GetBadgeBookmarks.js +99 -0
  8. package/funcs/accountAccountV1GetBadgeBookmarks.js.map +1 -0
  9. package/funcs/adminAdminV1GetEvents.d.ts +10 -0
  10. package/funcs/adminAdminV1GetEvents.d.ts.map +1 -0
  11. package/funcs/adminAdminV1GetEvents.js +98 -0
  12. package/funcs/adminAdminV1GetEvents.js.map +1 -0
  13. package/funcs/adminAdminV1UpdateEvent.d.ts +11 -0
  14. package/funcs/adminAdminV1UpdateEvent.d.ts.map +1 -0
  15. package/funcs/adminAdminV1UpdateEvent.js +109 -0
  16. package/funcs/adminAdminV1UpdateEvent.js.map +1 -0
  17. package/funcs/badgeAccountV1BookmarkBadge.d.ts +11 -0
  18. package/funcs/badgeAccountV1BookmarkBadge.d.ts.map +1 -0
  19. package/funcs/badgeAccountV1BookmarkBadge.js +109 -0
  20. package/funcs/badgeAccountV1BookmarkBadge.js.map +1 -0
  21. package/funcs/badgeAccountV1GetBadgeBookmarks.d.ts +11 -0
  22. package/funcs/badgeAccountV1GetBadgeBookmarks.d.ts.map +1 -0
  23. package/funcs/badgeAccountV1GetBadgeBookmarks.js +99 -0
  24. package/funcs/badgeAccountV1GetBadgeBookmarks.js.map +1 -0
  25. package/lib/config.d.ts +3 -3
  26. package/lib/config.js +3 -3
  27. package/models/components/index.d.ts +11 -0
  28. package/models/components/index.d.ts.map +1 -1
  29. package/models/components/index.js +11 -0
  30. package/models/components/index.js.map +1 -1
  31. package/models/components/v1accountbadgebookmark.d.ts +37 -0
  32. package/models/components/v1accountbadgebookmark.d.ts.map +1 -0
  33. package/models/components/v1accountbadgebookmark.js +61 -0
  34. package/models/components/v1accountbadgebookmark.js.map +1 -0
  35. package/models/components/v1accountbadgebookmarkrequestbody.d.ts +37 -0
  36. package/models/components/v1accountbadgebookmarkrequestbody.d.ts.map +1 -0
  37. package/models/components/v1accountbadgebookmarkrequestbody.js +61 -0
  38. package/models/components/v1accountbadgebookmarkrequestbody.js.map +1 -0
  39. package/models/components/v1accountbadgebookmarkresponsebody.d.ts +32 -0
  40. package/models/components/v1accountbadgebookmarkresponsebody.d.ts.map +1 -0
  41. package/models/components/v1accountbadgebookmarkresponsebody.js +68 -0
  42. package/models/components/v1accountbadgebookmarkresponsebody.js.map +1 -0
  43. package/models/components/v1accountbadgebookmarksrequestbody.d.ts +25 -0
  44. package/models/components/v1accountbadgebookmarksrequestbody.d.ts.map +1 -0
  45. package/models/components/v1accountbadgebookmarksrequestbody.js +55 -0
  46. package/models/components/v1accountbadgebookmarksrequestbody.js.map +1 -0
  47. package/models/components/v1accountbadgebookmarksresponsebody.d.ts +35 -0
  48. package/models/components/v1accountbadgebookmarksresponsebody.d.ts.map +1 -0
  49. package/models/components/v1accountbadgebookmarksresponsebody.js +71 -0
  50. package/models/components/v1accountbadgebookmarksresponsebody.js.map +1 -0
  51. package/models/components/v1admingeteventsresponsebody.d.ts +35 -0
  52. package/models/components/v1admingeteventsresponsebody.d.ts.map +1 -0
  53. package/models/components/v1admingeteventsresponsebody.js +71 -0
  54. package/models/components/v1admingeteventsresponsebody.js.map +1 -0
  55. package/models/components/v1adminupdateeventrequestbody.d.ts +38 -0
  56. package/models/components/v1adminupdateeventrequestbody.d.ts.map +1 -0
  57. package/models/components/v1adminupdateeventrequestbody.js +62 -0
  58. package/models/components/v1adminupdateeventrequestbody.js.map +1 -0
  59. package/models/components/v1adminupdateeventresponsebody.d.ts +32 -0
  60. package/models/components/v1adminupdateeventresponsebody.d.ts.map +1 -0
  61. package/models/components/v1adminupdateeventresponsebody.js +68 -0
  62. package/models/components/v1adminupdateeventresponsebody.js.map +1 -0
  63. package/models/components/v1appeventmapping.d.ts +37 -0
  64. package/models/components/v1appeventmapping.d.ts.map +1 -0
  65. package/models/components/v1appeventmapping.js +61 -0
  66. package/models/components/v1appeventmapping.js.map +1 -0
  67. package/models/components/v1event.d.ts +88 -0
  68. package/models/components/v1event.d.ts.map +1 -0
  69. package/models/components/v1event.js +82 -0
  70. package/models/components/v1event.js.map +1 -0
  71. package/models/components/v1getsessionbody.d.ts +10 -0
  72. package/models/components/v1getsessionbody.d.ts.map +1 -1
  73. package/models/components/v1getsessionbody.js +4 -0
  74. package/models/components/v1getsessionbody.js.map +1 -1
  75. package/models/components/v1leaderboardbadge.d.ts +3 -0
  76. package/models/components/v1leaderboardbadge.d.ts.map +1 -1
  77. package/models/components/v1leaderboardbadge.js +3 -0
  78. package/models/components/v1leaderboardbadge.js.map +1 -1
  79. package/models/components/v1leaderboardbadgeevent.d.ts +77 -0
  80. package/models/components/v1leaderboardbadgeevent.d.ts.map +1 -0
  81. package/models/components/v1leaderboardbadgeevent.js +77 -0
  82. package/models/components/v1leaderboardbadgeevent.js.map +1 -0
  83. package/models/operations/accountv1bookmarkbadge.d.ts +35 -0
  84. package/models/operations/accountv1bookmarkbadge.d.ts.map +1 -0
  85. package/models/operations/accountv1bookmarkbadge.js +75 -0
  86. package/models/operations/accountv1bookmarkbadge.js.map +1 -0
  87. package/models/operations/accountv1getbadgebookmarks.d.ts +35 -0
  88. package/models/operations/accountv1getbadgebookmarks.d.ts.map +1 -0
  89. package/models/operations/accountv1getbadgebookmarks.js +75 -0
  90. package/models/operations/accountv1getbadgebookmarks.js.map +1 -0
  91. package/models/operations/adminv1getevents.d.ts +35 -0
  92. package/models/operations/adminv1getevents.d.ts.map +1 -0
  93. package/models/operations/adminv1getevents.js +75 -0
  94. package/models/operations/adminv1getevents.js.map +1 -0
  95. package/models/operations/adminv1updateevent.d.ts +35 -0
  96. package/models/operations/adminv1updateevent.d.ts.map +1 -0
  97. package/models/operations/adminv1updateevent.js +75 -0
  98. package/models/operations/adminv1updateevent.js.map +1 -0
  99. package/models/operations/index.d.ts +4 -0
  100. package/models/operations/index.d.ts.map +1 -1
  101. package/models/operations/index.js +4 -0
  102. package/models/operations/index.js.map +1 -1
  103. package/package.json +1 -1
  104. package/sdk/account.d.ts +1 -0
  105. package/sdk/account.d.ts.map +1 -1
  106. package/sdk/account.js +4 -0
  107. package/sdk/account.js.map +1 -1
  108. package/sdk/admin.d.ts +2 -0
  109. package/sdk/admin.d.ts.map +1 -1
  110. package/sdk/admin.js +8 -0
  111. package/sdk/admin.js.map +1 -1
  112. package/sdk/badge.d.ts +2 -0
  113. package/sdk/badge.d.ts.map +1 -1
  114. package/sdk/badge.js +8 -0
  115. package/sdk/badge.js.map +1 -1
  116. package/sdk/sdk.d.ts +2 -2
  117. package/sdk/sdk.d.ts.map +1 -1
  118. package/sdk/sdk.js +4 -4
  119. package/sdk/sdk.js.map +1 -1
  120. package/src/funcs/accountAccountV1GetBadgeBookmarks.ts +127 -0
  121. package/src/funcs/adminAdminV1GetEvents.ts +124 -0
  122. package/src/funcs/adminAdminV1UpdateEvent.ts +142 -0
  123. package/src/funcs/badgeAccountV1BookmarkBadge.ts +142 -0
  124. package/src/funcs/badgeAccountV1GetBadgeBookmarks.ts +127 -0
  125. package/src/lib/config.ts +3 -3
  126. package/src/models/components/index.ts +11 -0
  127. package/src/models/components/v1accountbadgebookmark.ts +78 -0
  128. package/src/models/components/v1accountbadgebookmarkrequestbody.ts +79 -0
  129. package/src/models/components/v1accountbadgebookmarkresponsebody.ts +82 -0
  130. package/src/models/components/v1accountbadgebookmarksrequestbody.ts +62 -0
  131. package/src/models/components/v1accountbadgebookmarksresponsebody.ts +93 -0
  132. package/src/models/components/v1admingeteventsresponsebody.ts +90 -0
  133. package/src/models/components/v1adminupdateeventrequestbody.ts +84 -0
  134. package/src/models/components/v1adminupdateeventresponsebody.ts +80 -0
  135. package/src/models/components/v1appeventmapping.ts +76 -0
  136. package/src/models/components/v1event.ts +145 -0
  137. package/src/models/components/v1getsessionbody.ts +14 -0
  138. package/src/models/components/v1leaderboardbadge.ts +10 -0
  139. package/src/models/components/v1leaderboardbadgeevent.ts +132 -0
  140. package/src/models/operations/accountv1bookmarkbadge.ts +93 -0
  141. package/src/models/operations/accountv1getbadgebookmarks.ts +96 -0
  142. package/src/models/operations/adminv1getevents.ts +91 -0
  143. package/src/models/operations/adminv1updateevent.ts +91 -0
  144. package/src/models/operations/index.ts +4 -0
  145. package/src/sdk/account.ts +12 -0
  146. package/src/sdk/admin.ts +22 -0
  147. package/src/sdk/badge.ts +24 -0
  148. package/src/sdk/sdk.ts +5 -5
@@ -0,0 +1,127 @@
1
+ /*
2
+ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
3
+ */
4
+
5
+ import { SteamSetsCore } from "../core.js";
6
+ import * as M from "../lib/matchers.js";
7
+ import { RequestOptions } from "../lib/sdks.js";
8
+ import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js";
9
+ import { pathToFunc } from "../lib/url.js";
10
+ import * as components from "../models/components/index.js";
11
+ import {
12
+ ConnectionError,
13
+ InvalidRequestError,
14
+ RequestAbortedError,
15
+ RequestTimeoutError,
16
+ UnexpectedClientError,
17
+ } from "../models/errors/httpclienterrors.js";
18
+ import * as errors from "../models/errors/index.js";
19
+ import { SDKError } from "../models/errors/sdkerror.js";
20
+ import { SDKValidationError } from "../models/errors/sdkvalidationerror.js";
21
+ import * as operations from "../models/operations/index.js";
22
+ import { Result } from "../types/fp.js";
23
+
24
+ export async function accountAccountV1GetBadgeBookmarks(
25
+ client: SteamSetsCore,
26
+ _request: components.V1AccountBadgeBookmarksRequestBody,
27
+ options?: RequestOptions,
28
+ ): Promise<
29
+ Result<
30
+ operations.AccountV1GetBadgeBookmarksResponse,
31
+ | errors.ErrorModel
32
+ | SDKError
33
+ | SDKValidationError
34
+ | UnexpectedClientError
35
+ | InvalidRequestError
36
+ | RequestAbortedError
37
+ | RequestTimeoutError
38
+ | ConnectionError
39
+ >
40
+ > {
41
+ const path = pathToFunc("/account.v1.AccountService/GetBadgeBookmarks")();
42
+
43
+ const headers = new Headers({
44
+ "Content-Type": "application/json",
45
+ Accept: "application/json",
46
+ });
47
+
48
+ const secConfig = await extractSecurity(client._options.token);
49
+ const securityInput = secConfig == null ? {} : { token: secConfig };
50
+ const requestSecurity = resolveGlobalSecurity(securityInput);
51
+
52
+ const context = {
53
+ operationID: "account.v1.getBadgeBookmarks",
54
+ oAuth2Scopes: [],
55
+
56
+ resolvedSecurity: requestSecurity,
57
+
58
+ securitySource: client._options.token,
59
+ retryConfig: options?.retries
60
+ || client._options.retryConfig
61
+ || {
62
+ strategy: "backoff",
63
+ backoff: {
64
+ initialInterval: 500,
65
+ maxInterval: 60000,
66
+ exponent: 1.5,
67
+ maxElapsedTime: 3600000,
68
+ },
69
+ retryConnectionErrors: true,
70
+ }
71
+ || { strategy: "none" },
72
+ retryCodes: options?.retryCodes || ["500", "501", "502", "503", "504"],
73
+ };
74
+
75
+ const requestRes = client._createRequest(context, {
76
+ security: requestSecurity,
77
+ method: "POST",
78
+ path: path,
79
+ headers: headers,
80
+ uaHeader: "x-speakeasy-user-agent",
81
+ timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1,
82
+ }, options);
83
+ if (!requestRes.ok) {
84
+ return requestRes;
85
+ }
86
+ const req = requestRes.value;
87
+
88
+ const doResult = await client._do(req, {
89
+ context,
90
+ errorCodes: ["403", "404", "422", "4XX", "500", "5XX"],
91
+ retryConfig: context.retryConfig,
92
+ retryCodes: context.retryCodes,
93
+ });
94
+ if (!doResult.ok) {
95
+ return doResult;
96
+ }
97
+ const response = doResult.value;
98
+
99
+ const responseFields = {
100
+ HttpMeta: { Response: response, Request: req },
101
+ };
102
+
103
+ const [result] = await M.match<
104
+ operations.AccountV1GetBadgeBookmarksResponse,
105
+ | errors.ErrorModel
106
+ | SDKError
107
+ | SDKValidationError
108
+ | UnexpectedClientError
109
+ | InvalidRequestError
110
+ | RequestAbortedError
111
+ | RequestTimeoutError
112
+ | ConnectionError
113
+ >(
114
+ M.json(200, operations.AccountV1GetBadgeBookmarksResponse$inboundSchema, {
115
+ key: "V1AccountBadgeBookmarksResponseBody",
116
+ }),
117
+ M.jsonErr([403, 404, 422, 500], errors.ErrorModel$inboundSchema, {
118
+ ctype: "application/problem+json",
119
+ }),
120
+ M.fail(["4XX", "5XX"]),
121
+ )(response, req, { extraFields: responseFields });
122
+ if (!result.ok) {
123
+ return result;
124
+ }
125
+
126
+ return result;
127
+ }
@@ -0,0 +1,124 @@
1
+ /*
2
+ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
3
+ */
4
+
5
+ import { SteamSetsCore } from "../core.js";
6
+ import * as M from "../lib/matchers.js";
7
+ import { RequestOptions } from "../lib/sdks.js";
8
+ import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js";
9
+ import { pathToFunc } from "../lib/url.js";
10
+ import {
11
+ ConnectionError,
12
+ InvalidRequestError,
13
+ RequestAbortedError,
14
+ RequestTimeoutError,
15
+ UnexpectedClientError,
16
+ } from "../models/errors/httpclienterrors.js";
17
+ import * as errors from "../models/errors/index.js";
18
+ import { SDKError } from "../models/errors/sdkerror.js";
19
+ import { SDKValidationError } from "../models/errors/sdkvalidationerror.js";
20
+ import * as operations from "../models/operations/index.js";
21
+ import { Result } from "../types/fp.js";
22
+
23
+ export async function adminAdminV1GetEvents(
24
+ client: SteamSetsCore,
25
+ options?: RequestOptions,
26
+ ): Promise<
27
+ Result<
28
+ operations.AdminV1GetEventsResponse,
29
+ | errors.ErrorModel
30
+ | SDKError
31
+ | SDKValidationError
32
+ | UnexpectedClientError
33
+ | InvalidRequestError
34
+ | RequestAbortedError
35
+ | RequestTimeoutError
36
+ | ConnectionError
37
+ >
38
+ > {
39
+ const path = pathToFunc("/admin.v1.AdminService/GetEvents")();
40
+
41
+ const headers = new Headers({
42
+ Accept: "application/json",
43
+ });
44
+
45
+ const secConfig = await extractSecurity(client._options.token);
46
+ const securityInput = secConfig == null ? {} : { token: secConfig };
47
+ const requestSecurity = resolveGlobalSecurity(securityInput);
48
+
49
+ const context = {
50
+ operationID: "admin.v1.get-events",
51
+ oAuth2Scopes: [],
52
+
53
+ resolvedSecurity: requestSecurity,
54
+
55
+ securitySource: client._options.token,
56
+ retryConfig: options?.retries
57
+ || client._options.retryConfig
58
+ || {
59
+ strategy: "backoff",
60
+ backoff: {
61
+ initialInterval: 500,
62
+ maxInterval: 60000,
63
+ exponent: 1.5,
64
+ maxElapsedTime: 3600000,
65
+ },
66
+ retryConnectionErrors: true,
67
+ }
68
+ || { strategy: "none" },
69
+ retryCodes: options?.retryCodes || ["500", "501", "502", "503", "504"],
70
+ };
71
+
72
+ const requestRes = client._createRequest(context, {
73
+ security: requestSecurity,
74
+ method: "POST",
75
+ path: path,
76
+ headers: headers,
77
+ uaHeader: "x-speakeasy-user-agent",
78
+ timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1,
79
+ }, options);
80
+ if (!requestRes.ok) {
81
+ return requestRes;
82
+ }
83
+ const req = requestRes.value;
84
+
85
+ const doResult = await client._do(req, {
86
+ context,
87
+ errorCodes: ["403", "404", "429", "4XX", "500", "5XX"],
88
+ retryConfig: context.retryConfig,
89
+ retryCodes: context.retryCodes,
90
+ });
91
+ if (!doResult.ok) {
92
+ return doResult;
93
+ }
94
+ const response = doResult.value;
95
+
96
+ const responseFields = {
97
+ HttpMeta: { Response: response, Request: req },
98
+ };
99
+
100
+ const [result] = await M.match<
101
+ operations.AdminV1GetEventsResponse,
102
+ | errors.ErrorModel
103
+ | SDKError
104
+ | SDKValidationError
105
+ | UnexpectedClientError
106
+ | InvalidRequestError
107
+ | RequestAbortedError
108
+ | RequestTimeoutError
109
+ | ConnectionError
110
+ >(
111
+ M.json(200, operations.AdminV1GetEventsResponse$inboundSchema, {
112
+ key: "V1AdminGetEventsResponseBody",
113
+ }),
114
+ M.jsonErr([403, 404, 429, 500], errors.ErrorModel$inboundSchema, {
115
+ ctype: "application/problem+json",
116
+ }),
117
+ M.fail(["4XX", "5XX"]),
118
+ )(response, req, { extraFields: responseFields });
119
+ if (!result.ok) {
120
+ return result;
121
+ }
122
+
123
+ return result;
124
+ }
@@ -0,0 +1,142 @@
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 adminAdminV1UpdateEvent(
27
+ client: SteamSetsCore,
28
+ request: components.V1AdminUpdateEventRequestBody,
29
+ options?: RequestOptions,
30
+ ): Promise<
31
+ Result<
32
+ operations.AdminV1UpdateEventResponse,
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) =>
46
+ components.V1AdminUpdateEventRequestBody$outboundSchema.parse(value),
47
+ "Input validation failed",
48
+ );
49
+ if (!parsed.ok) {
50
+ return parsed;
51
+ }
52
+ const payload = parsed.value;
53
+ const body = encodeJSON("body", payload, { explode: true });
54
+
55
+ const path = pathToFunc("/admin.v1.AdminService/UpdateEvent")();
56
+
57
+ const headers = new Headers({
58
+ "Content-Type": "application/json",
59
+ Accept: "application/json",
60
+ });
61
+
62
+ const secConfig = await extractSecurity(client._options.token);
63
+ const securityInput = secConfig == null ? {} : { token: secConfig };
64
+ const requestSecurity = resolveGlobalSecurity(securityInput);
65
+
66
+ const context = {
67
+ operationID: "admin.v1.update-event",
68
+ oAuth2Scopes: [],
69
+
70
+ resolvedSecurity: requestSecurity,
71
+
72
+ securitySource: client._options.token,
73
+ retryConfig: options?.retries
74
+ || client._options.retryConfig
75
+ || {
76
+ strategy: "backoff",
77
+ backoff: {
78
+ initialInterval: 500,
79
+ maxInterval: 60000,
80
+ exponent: 1.5,
81
+ maxElapsedTime: 3600000,
82
+ },
83
+ retryConnectionErrors: true,
84
+ }
85
+ || { strategy: "none" },
86
+ retryCodes: options?.retryCodes || ["500", "501", "502", "503", "504"],
87
+ };
88
+
89
+ const requestRes = client._createRequest(context, {
90
+ security: requestSecurity,
91
+ method: "POST",
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.AdminV1UpdateEventResponse,
120
+ | errors.ErrorModel
121
+ | SDKError
122
+ | SDKValidationError
123
+ | UnexpectedClientError
124
+ | InvalidRequestError
125
+ | RequestAbortedError
126
+ | RequestTimeoutError
127
+ | ConnectionError
128
+ >(
129
+ M.json(200, operations.AdminV1UpdateEventResponse$inboundSchema, {
130
+ key: "V1AdminUpdateEventResponseBody",
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
+ }
@@ -0,0 +1,142 @@
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 badgeAccountV1BookmarkBadge(
27
+ client: SteamSetsCore,
28
+ request: components.V1AccountBadgeBookmarkRequestBody,
29
+ options?: RequestOptions,
30
+ ): Promise<
31
+ Result<
32
+ operations.AccountV1BookmarkBadgeResponse,
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) =>
46
+ components.V1AccountBadgeBookmarkRequestBody$outboundSchema.parse(value),
47
+ "Input validation failed",
48
+ );
49
+ if (!parsed.ok) {
50
+ return parsed;
51
+ }
52
+ const payload = parsed.value;
53
+ const body = encodeJSON("body", payload, { explode: true });
54
+
55
+ const path = pathToFunc("/account.v1.AccountService/BookmarkBadge")();
56
+
57
+ const headers = new Headers({
58
+ "Content-Type": "application/json",
59
+ Accept: "application/json",
60
+ });
61
+
62
+ const secConfig = await extractSecurity(client._options.token);
63
+ const securityInput = secConfig == null ? {} : { token: secConfig };
64
+ const requestSecurity = resolveGlobalSecurity(securityInput);
65
+
66
+ const context = {
67
+ operationID: "account.v1.bookmark-badge",
68
+ oAuth2Scopes: [],
69
+
70
+ resolvedSecurity: requestSecurity,
71
+
72
+ securitySource: client._options.token,
73
+ retryConfig: options?.retries
74
+ || client._options.retryConfig
75
+ || {
76
+ strategy: "backoff",
77
+ backoff: {
78
+ initialInterval: 500,
79
+ maxInterval: 60000,
80
+ exponent: 1.5,
81
+ maxElapsedTime: 3600000,
82
+ },
83
+ retryConnectionErrors: true,
84
+ }
85
+ || { strategy: "none" },
86
+ retryCodes: options?.retryCodes || ["500", "501", "502", "503", "504"],
87
+ };
88
+
89
+ const requestRes = client._createRequest(context, {
90
+ security: requestSecurity,
91
+ method: "POST",
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", "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.AccountV1BookmarkBadgeResponse,
120
+ | errors.ErrorModel
121
+ | SDKError
122
+ | SDKValidationError
123
+ | UnexpectedClientError
124
+ | InvalidRequestError
125
+ | RequestAbortedError
126
+ | RequestTimeoutError
127
+ | ConnectionError
128
+ >(
129
+ M.json(200, operations.AccountV1BookmarkBadgeResponse$inboundSchema, {
130
+ key: "V1AccountBadgeBookmarkResponseBody",
131
+ }),
132
+ M.jsonErr([403, 404, 422, 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
+ }
@@ -0,0 +1,127 @@
1
+ /*
2
+ * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
3
+ */
4
+
5
+ import { SteamSetsCore } from "../core.js";
6
+ import * as M from "../lib/matchers.js";
7
+ import { RequestOptions } from "../lib/sdks.js";
8
+ import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js";
9
+ import { pathToFunc } from "../lib/url.js";
10
+ import * as components from "../models/components/index.js";
11
+ import {
12
+ ConnectionError,
13
+ InvalidRequestError,
14
+ RequestAbortedError,
15
+ RequestTimeoutError,
16
+ UnexpectedClientError,
17
+ } from "../models/errors/httpclienterrors.js";
18
+ import * as errors from "../models/errors/index.js";
19
+ import { SDKError } from "../models/errors/sdkerror.js";
20
+ import { SDKValidationError } from "../models/errors/sdkvalidationerror.js";
21
+ import * as operations from "../models/operations/index.js";
22
+ import { Result } from "../types/fp.js";
23
+
24
+ export async function badgeAccountV1GetBadgeBookmarks(
25
+ client: SteamSetsCore,
26
+ _request: components.V1AccountBadgeBookmarksRequestBody,
27
+ options?: RequestOptions,
28
+ ): Promise<
29
+ Result<
30
+ operations.AccountV1GetBadgeBookmarksResponse,
31
+ | errors.ErrorModel
32
+ | SDKError
33
+ | SDKValidationError
34
+ | UnexpectedClientError
35
+ | InvalidRequestError
36
+ | RequestAbortedError
37
+ | RequestTimeoutError
38
+ | ConnectionError
39
+ >
40
+ > {
41
+ const path = pathToFunc("/account.v1.AccountService/GetBadgeBookmarks")();
42
+
43
+ const headers = new Headers({
44
+ "Content-Type": "application/json",
45
+ Accept: "application/json",
46
+ });
47
+
48
+ const secConfig = await extractSecurity(client._options.token);
49
+ const securityInput = secConfig == null ? {} : { token: secConfig };
50
+ const requestSecurity = resolveGlobalSecurity(securityInput);
51
+
52
+ const context = {
53
+ operationID: "account.v1.getBadgeBookmarks",
54
+ oAuth2Scopes: [],
55
+
56
+ resolvedSecurity: requestSecurity,
57
+
58
+ securitySource: client._options.token,
59
+ retryConfig: options?.retries
60
+ || client._options.retryConfig
61
+ || {
62
+ strategy: "backoff",
63
+ backoff: {
64
+ initialInterval: 500,
65
+ maxInterval: 60000,
66
+ exponent: 1.5,
67
+ maxElapsedTime: 3600000,
68
+ },
69
+ retryConnectionErrors: true,
70
+ }
71
+ || { strategy: "none" },
72
+ retryCodes: options?.retryCodes || ["500", "501", "502", "503", "504"],
73
+ };
74
+
75
+ const requestRes = client._createRequest(context, {
76
+ security: requestSecurity,
77
+ method: "POST",
78
+ path: path,
79
+ headers: headers,
80
+ uaHeader: "x-speakeasy-user-agent",
81
+ timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1,
82
+ }, options);
83
+ if (!requestRes.ok) {
84
+ return requestRes;
85
+ }
86
+ const req = requestRes.value;
87
+
88
+ const doResult = await client._do(req, {
89
+ context,
90
+ errorCodes: ["403", "404", "422", "4XX", "500", "5XX"],
91
+ retryConfig: context.retryConfig,
92
+ retryCodes: context.retryCodes,
93
+ });
94
+ if (!doResult.ok) {
95
+ return doResult;
96
+ }
97
+ const response = doResult.value;
98
+
99
+ const responseFields = {
100
+ HttpMeta: { Response: response, Request: req },
101
+ };
102
+
103
+ const [result] = await M.match<
104
+ operations.AccountV1GetBadgeBookmarksResponse,
105
+ | errors.ErrorModel
106
+ | SDKError
107
+ | SDKValidationError
108
+ | UnexpectedClientError
109
+ | InvalidRequestError
110
+ | RequestAbortedError
111
+ | RequestTimeoutError
112
+ | ConnectionError
113
+ >(
114
+ M.json(200, operations.AccountV1GetBadgeBookmarksResponse$inboundSchema, {
115
+ key: "V1AccountBadgeBookmarksResponseBody",
116
+ }),
117
+ M.jsonErr([403, 404, 422, 500], errors.ErrorModel$inboundSchema, {
118
+ ctype: "application/problem+json",
119
+ }),
120
+ M.fail(["4XX", "5XX"]),
121
+ )(response, req, { extraFields: responseFields });
122
+ if (!result.ok) {
123
+ return result;
124
+ }
125
+
126
+ return result;
127
+ }
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.13.4",
59
- genVersion: "2.460.1",
58
+ sdkVersion: "0.13.7",
59
+ genVersion: "2.461.4",
60
60
  userAgent:
61
- "speakeasy-sdk/typescript 0.13.4 2.460.1 1.0.0 @steamsets/client-ts",
61
+ "speakeasy-sdk/typescript 0.13.7 2.461.4 1.0.0 @steamsets/client-ts",
62
62
  } as const;