@scaleway/sdk 2.0.0-alpha.12 → 2.0.0-alpha.13

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 (204) hide show
  1. package/package.json +2 -2
  2. package/dist/api/account/index.js +0 -4
  3. package/dist/api/account/v2/api.gen.js +0 -147
  4. package/dist/api/account/v2/index.gen.js +0 -4
  5. package/dist/api/account/v2/marshalling.gen.js +0 -39
  6. package/dist/api/account/v3/api.gen.js +0 -129
  7. package/dist/api/account/v3/index.gen.js +0 -6
  8. package/dist/api/account/v3/marshalling.gen.js +0 -39
  9. package/dist/api/account/v3/validation-rules.gen.js +0 -39
  10. package/dist/api/applesilicon/index.js +0 -2
  11. package/dist/api/applesilicon/v1alpha1/api.gen.js +0 -220
  12. package/dist/api/applesilicon/v1alpha1/content.gen.js +0 -7
  13. package/dist/api/applesilicon/v1alpha1/index.gen.js +0 -5
  14. package/dist/api/applesilicon/v1alpha1/marshalling.gen.js +0 -113
  15. package/dist/api/baremetal/index.js +0 -2
  16. package/dist/api/baremetal/v1/api.gen.js +0 -523
  17. package/dist/api/baremetal/v1/api.utils.js +0 -27
  18. package/dist/api/baremetal/v1/content.gen.js +0 -13
  19. package/dist/api/baremetal/v1/index.js +0 -5
  20. package/dist/api/baremetal/v1/marshalling.gen.js +0 -395
  21. package/dist/api/baremetal/v1/validation-rules.gen.js +0 -109
  22. package/dist/api/billing/index.js +0 -2
  23. package/dist/api/billing/v2alpha1/api.gen.js +0 -80
  24. package/dist/api/billing/v2alpha1/index.gen.js +0 -4
  25. package/dist/api/billing/v2alpha1/marshalling.gen.js +0 -53
  26. package/dist/api/block/index.js +0 -2
  27. package/dist/api/block/v1alpha1/api.gen.js +0 -245
  28. package/dist/api/block/v1alpha1/content.gen.js +0 -13
  29. package/dist/api/block/v1alpha1/index.gen.js +0 -7
  30. package/dist/api/block/v1alpha1/marshalling.gen.js +0 -175
  31. package/dist/api/block/v1alpha1/validation-rules.gen.js +0 -42
  32. package/dist/api/cockpit/index.js +0 -2
  33. package/dist/api/cockpit/v1beta1/api.gen.js +0 -448
  34. package/dist/api/cockpit/v1beta1/content.gen.js +0 -7
  35. package/dist/api/cockpit/v1beta1/index.gen.js +0 -5
  36. package/dist/api/cockpit/v1beta1/marshalling.gen.js +0 -220
  37. package/dist/api/container/index.js +0 -2
  38. package/dist/api/container/v1beta1/api.gen.js +0 -549
  39. package/dist/api/container/v1beta1/content.gen.js +0 -22
  40. package/dist/api/container/v1beta1/index.gen.js +0 -5
  41. package/dist/api/container/v1beta1/marshalling.gen.js +0 -330
  42. package/dist/api/document_db/index.js +0 -2
  43. package/dist/api/document_db/v1beta1/api.gen.js +0 -830
  44. package/dist/api/document_db/v1beta1/content.gen.js +0 -19
  45. package/dist/api/document_db/v1beta1/index.gen.js +0 -7
  46. package/dist/api/document_db/v1beta1/marshalling.gen.js +0 -580
  47. package/dist/api/document_db/v1beta1/validation-rules.gen.js +0 -10
  48. package/dist/api/domain/index.js +0 -2
  49. package/dist/api/domain/v2beta1/api.gen.js +0 -875
  50. package/dist/api/domain/v2beta1/content.gen.js +0 -28
  51. package/dist/api/domain/v2beta1/index.gen.js +0 -7
  52. package/dist/api/domain/v2beta1/marshalling.gen.js +0 -958
  53. package/dist/api/flexibleip/index.js +0 -2
  54. package/dist/api/flexibleip/v1alpha1/api.gen.js +0 -203
  55. package/dist/api/flexibleip/v1alpha1/content.gen.js +0 -10
  56. package/dist/api/flexibleip/v1alpha1/index.gen.js +0 -7
  57. package/dist/api/flexibleip/v1alpha1/marshalling.gen.js +0 -97
  58. package/dist/api/flexibleip/v1alpha1/validation-rules.gen.js +0 -14
  59. package/dist/api/function/index.js +0 -2
  60. package/dist/api/function/v1beta1/api.gen.js +0 -560
  61. package/dist/api/function/v1beta1/content.gen.js +0 -22
  62. package/dist/api/function/v1beta1/index.gen.js +0 -5
  63. package/dist/api/function/v1beta1/marshalling.gen.js +0 -368
  64. package/dist/api/iam/index.js +0 -2
  65. package/dist/api/iam/v1alpha1/api.gen.js +0 -799
  66. package/dist/api/iam/v1alpha1/index.gen.js +0 -6
  67. package/dist/api/iam/v1alpha1/marshalling.gen.js +0 -373
  68. package/dist/api/iam/v1alpha1/validation-rules.gen.js +0 -207
  69. package/dist/api/instance/index.js +0 -2
  70. package/dist/api/instance/v1/api.gen.js +0 -1003
  71. package/dist/api/instance/v1/api.utils.js +0 -369
  72. package/dist/api/instance/v1/content.gen.js +0 -31
  73. package/dist/api/instance/v1/index.js +0 -2
  74. package/dist/api/instance/v1/marshalling.gen.js +0 -1206
  75. package/dist/api/instance/v1/marshalling.utils.js +0 -63
  76. package/dist/api/iot/index.js +0 -2
  77. package/dist/api/iot/v1/api.gen.js +0 -581
  78. package/dist/api/iot/v1/content.gen.js +0 -7
  79. package/dist/api/iot/v1/index.gen.js +0 -5
  80. package/dist/api/iot/v1/marshalling.gen.js +0 -388
  81. package/dist/api/ipfs/index.js +0 -2
  82. package/dist/api/ipfs/v1alpha1/api.gen.js +0 -197
  83. package/dist/api/ipfs/v1alpha1/content.gen.js +0 -7
  84. package/dist/api/ipfs/v1alpha1/index.gen.js +0 -5
  85. package/dist/api/ipfs/v1alpha1/marshalling.gen.js +0 -121
  86. package/dist/api/k8s/index.js +0 -2
  87. package/dist/api/k8s/v1/api.gen.js +0 -454
  88. package/dist/api/k8s/v1/api.utils.js +0 -13
  89. package/dist/api/k8s/v1/content.gen.js +0 -13
  90. package/dist/api/k8s/v1/index.js +0 -4
  91. package/dist/api/k8s/v1/marshalling.gen.js +0 -333
  92. package/dist/api/k8s/v1/validation-rules.gen.js +0 -101
  93. package/dist/api/lb/index.js +0 -2
  94. package/dist/api/lb/v1/api.gen.js +0 -1669
  95. package/dist/api/lb/v1/api.utils.js +0 -81
  96. package/dist/api/lb/v1/content.gen.js +0 -16
  97. package/dist/api/lb/v1/index.js +0 -2
  98. package/dist/api/lb/v1/marshalling.gen.js +0 -923
  99. package/dist/api/marketplace/index.js +0 -4
  100. package/dist/api/marketplace/v1/api.gen.js +0 -60
  101. package/dist/api/marketplace/v1/index.gen.js +0 -4
  102. package/dist/api/marketplace/v1/marshalling.gen.js +0 -92
  103. package/dist/api/marketplace/v2/api.gen.js +0 -162
  104. package/dist/api/marketplace/v2/index.gen.js +0 -4
  105. package/dist/api/marketplace/v2/marshalling.gen.js +0 -94
  106. package/dist/api/mnq/index.js +0 -2
  107. package/dist/api/mnq/v1alpha1/api.gen.js +0 -205
  108. package/dist/api/mnq/v1alpha1/index.gen.js +0 -4
  109. package/dist/api/mnq/v1alpha1/marshalling.gen.js +0 -121
  110. package/dist/api/rdb/index.js +0 -2
  111. package/dist/api/rdb/v1/api.gen.js +0 -972
  112. package/dist/api/rdb/v1/content.gen.js +0 -22
  113. package/dist/api/rdb/v1/index.gen.js +0 -7
  114. package/dist/api/rdb/v1/marshalling.gen.js +0 -636
  115. package/dist/api/rdb/v1/validation-rules.gen.js +0 -10
  116. package/dist/api/redis/index.js +0 -2
  117. package/dist/api/redis/v1/api.gen.js +0 -389
  118. package/dist/api/redis/v1/content.gen.js +0 -7
  119. package/dist/api/redis/v1/index.gen.js +0 -5
  120. package/dist/api/redis/v1/marshalling.gen.js +0 -259
  121. package/dist/api/registry/index.js +0 -2
  122. package/dist/api/registry/v1/api.gen.js +0 -252
  123. package/dist/api/registry/v1/content.gen.js +0 -13
  124. package/dist/api/registry/v1/index.gen.js +0 -5
  125. package/dist/api/registry/v1/marshalling.gen.js +0 -106
  126. package/dist/api/secret/index.js +0 -2
  127. package/dist/api/secret/v1alpha1/api.gen.js +0 -415
  128. package/dist/api/secret/v1alpha1/index.gen.js +0 -4
  129. package/dist/api/secret/v1alpha1/marshalling.gen.js +0 -143
  130. package/dist/api/tem/index.js +0 -2
  131. package/dist/api/tem/v1alpha1/api.gen.js +0 -229
  132. package/dist/api/tem/v1alpha1/content.gen.js +0 -10
  133. package/dist/api/tem/v1alpha1/index.gen.js +0 -5
  134. package/dist/api/tem/v1alpha1/marshalling.gen.js +0 -159
  135. package/dist/api/test/index.js +0 -2
  136. package/dist/api/test/v1/api.gen.js +0 -152
  137. package/dist/api/test/v1/content.gen.js +0 -7
  138. package/dist/api/test/v1/index.gen.js +0 -5
  139. package/dist/api/test/v1/marshalling.gen.js +0 -79
  140. package/dist/api/vpc/index.js +0 -4
  141. package/dist/api/vpc/v1/api.gen.js +0 -110
  142. package/dist/api/vpc/v1/index.gen.js +0 -4
  143. package/dist/api/vpc/v1/marshalling.gen.js +0 -44
  144. package/dist/api/vpc/v2/api.gen.js +0 -276
  145. package/dist/api/vpc/v2/index.gen.js +0 -4
  146. package/dist/api/vpc/v2/marshalling.gen.js +0 -135
  147. package/dist/api/vpcgw/index.js +0 -2
  148. package/dist/api/vpcgw/v1/api.gen.js +0 -669
  149. package/dist/api/vpcgw/v1/content.gen.js +0 -10
  150. package/dist/api/vpcgw/v1/index.gen.js +0 -5
  151. package/dist/api/vpcgw/v1/marshalling.gen.js +0 -336
  152. package/dist/api/webhosting/index.js +0 -2
  153. package/dist/api/webhosting/v1alpha1/api.gen.js +0 -210
  154. package/dist/api/webhosting/v1alpha1/content.gen.js +0 -7
  155. package/dist/api/webhosting/v1alpha1/index.gen.js +0 -7
  156. package/dist/api/webhosting/v1alpha1/marshalling.gen.js +0 -173
  157. package/dist/api/webhosting/v1alpha1/validation-rules.gen.js +0 -23
  158. package/dist/helpers/is-browser.js +0 -5
  159. package/dist/helpers/is-response.js +0 -10
  160. package/dist/helpers/json.js +0 -11
  161. package/dist/helpers/marshalling.js +0 -130
  162. package/dist/index.cjs +0 -24364
  163. package/dist/index.d.ts +0 -27584
  164. package/dist/index.js +0 -69
  165. package/dist/internal/async/interval-retrier.js +0 -105
  166. package/dist/internal/async/sleep.js +0 -13
  167. package/dist/internal/interceptors/composer.js +0 -46
  168. package/dist/internal/interceptors/helpers.js +0 -32
  169. package/dist/internal/logger/console-logger.js +0 -38
  170. package/dist/internal/logger/index.js +0 -41
  171. package/dist/internal/logger/level-resolver.js +0 -13
  172. package/dist/internal/validations/string-validation.js +0 -38
  173. package/dist/node_modules/.pnpm/@scaleway_random-name@4.0.2/node_modules/@scaleway/random-name/dist/index.js +0 -13
  174. package/dist/scw/api.js +0 -12
  175. package/dist/scw/auth.js +0 -68
  176. package/dist/scw/client-ini-factory.js +0 -174
  177. package/dist/scw/client-ini-profile.js +0 -54
  178. package/dist/scw/client-settings.js +0 -78
  179. package/dist/scw/client.js +0 -98
  180. package/dist/scw/constants.js +0 -4
  181. package/dist/scw/custom-marshalling.js +0 -131
  182. package/dist/scw/errors/error-parser.js +0 -107
  183. package/dist/scw/errors/non-standard/invalid-request-mapper.js +0 -36
  184. package/dist/scw/errors/non-standard/unknown-resource-mapper.js +0 -27
  185. package/dist/scw/errors/scw-error.js +0 -66
  186. package/dist/scw/errors/standard/already-exists-error.js +0 -26
  187. package/dist/scw/errors/standard/denied-authentication-error.js +0 -52
  188. package/dist/scw/errors/standard/index.js +0 -13
  189. package/dist/scw/errors/standard/invalid-arguments-error.js +0 -67
  190. package/dist/scw/errors/standard/out-of-stock-error.js +0 -22
  191. package/dist/scw/errors/standard/permissions-denied-error.js +0 -48
  192. package/dist/scw/errors/standard/precondition-failed-error.js +0 -42
  193. package/dist/scw/errors/standard/quotas-exceeded-error.js +0 -68
  194. package/dist/scw/errors/standard/resource-expired-error.js +0 -26
  195. package/dist/scw/errors/standard/resource-locked-error.js +0 -25
  196. package/dist/scw/errors/standard/resource-not-found-error.js +0 -25
  197. package/dist/scw/errors/standard/too-many-requests-error.js +0 -70
  198. package/dist/scw/errors/standard/transient-state-error.js +0 -26
  199. package/dist/scw/errors/types.js +0 -23
  200. package/dist/scw/fetch/build-fetcher.js +0 -72
  201. package/dist/scw/fetch/http-dumper.js +0 -54
  202. package/dist/scw/fetch/http-interceptors.js +0 -99
  203. package/dist/scw/fetch/resource-paginator.js +0 -84
  204. package/dist/scw/fetch/response-parser.js +0 -72
@@ -1,549 +0,0 @@
1
- import { waitForResource } from '../../../internal/async/interval-retrier.js';
2
- import { API as API$1 } from '../../../scw/api.js';
3
- import { validatePathParam, urlParams, resolveOneOf } from '../../../helpers/marshalling.js';
4
- import { enrichForPagination } from '../../../scw/fetch/resource-paginator.js';
5
- import { NAMESPACE_TRANSIENT_STATUSES, CONTAINER_TRANSIENT_STATUSES, CRON_TRANSIENT_STATUSES, DOMAIN_TRANSIENT_STATUSES, TOKEN_TRANSIENT_STATUSES, TRIGGER_TRANSIENT_STATUSES } from './content.gen.js';
6
- import { unmarshalListNamespacesResponse, unmarshalNamespace, marshalCreateNamespaceRequest, marshalUpdateNamespaceRequest, unmarshalListContainersResponse, unmarshalContainer, marshalCreateContainerRequest, marshalUpdateContainerRequest, unmarshalListCronsResponse, unmarshalCron, marshalCreateCronRequest, marshalUpdateCronRequest, unmarshalListLogsResponse, unmarshalListDomainsResponse, unmarshalDomain, marshalCreateDomainRequest, unmarshalToken, marshalCreateTokenRequest, unmarshalListTokensResponse, marshalCreateTriggerRequest, unmarshalTrigger, unmarshalListTriggersResponse, marshalUpdateTriggerRequest } from './marshalling.gen.js';
7
-
8
- // This file was automatically generated. DO NOT EDIT.
9
- // If you have any remark or suggestion do not hesitate to open an issue.
10
- const jsonContentHeaders = {
11
- 'Content-Type': 'application/json; charset=utf-8'
12
- };
13
-
14
- /** Serverless Containers API. */
15
- class API extends API$1 {
16
- /** Lists the available regions of the API. */
17
- static LOCALITIES = ['fr-par', 'nl-ams', 'pl-waw'];
18
- pageOfListNamespaces = (() => {
19
- var _this = this;
20
- return function (request) {
21
- if (request === void 0) {
22
- request = {};
23
- }
24
- return _this.client.fetch({
25
- method: 'GET',
26
- path: `/containers/v1beta1/regions/${validatePathParam('region', request.region ?? _this.client.settings.defaultRegion)}/namespaces`,
27
- urlParams: urlParams(['name', request.name], ['order_by', request.orderBy], ['organization_id', request.organizationId], ['page', request.page], ['page_size', request.pageSize ?? _this.client.settings.defaultPageSize], ['project_id', request.projectId])
28
- }, unmarshalListNamespacesResponse);
29
- };
30
- })();
31
-
32
- /**
33
- * List all your namespaces. List all namespaces in a specified region.
34
- *
35
- * @param request - The request {@link ListNamespacesRequest}
36
- * @returns A Promise of ListNamespacesResponse
37
- */
38
- listNamespaces = (() => {
39
- var _this2 = this;
40
- return function (request) {
41
- if (request === void 0) {
42
- request = {};
43
- }
44
- return enrichForPagination('namespaces', _this2.pageOfListNamespaces, request);
45
- };
46
- })();
47
-
48
- /**
49
- * Get a namespace. Get the namespace associated with the specified ID.
50
- *
51
- * @param request - The request {@link GetNamespaceRequest}
52
- * @returns A Promise of Namespace
53
- */
54
- getNamespace = request => this.client.fetch({
55
- method: 'GET',
56
- path: `/containers/v1beta1/regions/${validatePathParam('region', request.region ?? this.client.settings.defaultRegion)}/namespaces/${validatePathParam('namespaceId', request.namespaceId)}`
57
- }, unmarshalNamespace);
58
-
59
- /**
60
- * Waits for {@link Namespace} to be in a final state.
61
- *
62
- * @param request - The request {@link GetNamespaceRequest}
63
- * @param options - The waiting options
64
- * @returns A Promise of Namespace
65
- */
66
- waitForNamespace = (request, options) => waitForResource(options?.stop ?? (res => Promise.resolve(!NAMESPACE_TRANSIENT_STATUSES.includes(res.status))), this.getNamespace, request, options);
67
-
68
- /**
69
- * Create a new namespace. Create a new namespace in a specified region.
70
- *
71
- * @param request - The request {@link CreateNamespaceRequest}
72
- * @returns A Promise of Namespace
73
- */
74
- createNamespace = (() => {
75
- var _this3 = this;
76
- return function (request) {
77
- if (request === void 0) {
78
- request = {};
79
- }
80
- return _this3.client.fetch({
81
- body: JSON.stringify(marshalCreateNamespaceRequest(request, _this3.client.settings)),
82
- headers: jsonContentHeaders,
83
- method: 'POST',
84
- path: `/containers/v1beta1/regions/${validatePathParam('region', request.region ?? _this3.client.settings.defaultRegion)}/namespaces`
85
- }, unmarshalNamespace);
86
- };
87
- })();
88
-
89
- /**
90
- * Update an existing namespace. Update the space associated with the
91
- * specified ID.
92
- *
93
- * @param request - The request {@link UpdateNamespaceRequest}
94
- * @returns A Promise of Namespace
95
- */
96
- updateNamespace = request => this.client.fetch({
97
- body: JSON.stringify(marshalUpdateNamespaceRequest(request, this.client.settings)),
98
- headers: jsonContentHeaders,
99
- method: 'PATCH',
100
- path: `/containers/v1beta1/regions/${validatePathParam('region', request.region ?? this.client.settings.defaultRegion)}/namespaces/${validatePathParam('namespaceId', request.namespaceId)}`
101
- }, unmarshalNamespace);
102
-
103
- /**
104
- * Delete an existing namespace. Delete the namespace associated with the
105
- * specified ID.
106
- *
107
- * @param request - The request {@link DeleteNamespaceRequest}
108
- * @returns A Promise of Namespace
109
- */
110
- deleteNamespace = request => this.client.fetch({
111
- method: 'DELETE',
112
- path: `/containers/v1beta1/regions/${validatePathParam('region', request.region ?? this.client.settings.defaultRegion)}/namespaces/${validatePathParam('namespaceId', request.namespaceId)}`
113
- }, unmarshalNamespace);
114
- pageOfListContainers = request => this.client.fetch({
115
- method: 'GET',
116
- path: `/containers/v1beta1/regions/${validatePathParam('region', request.region ?? this.client.settings.defaultRegion)}/containers`,
117
- urlParams: urlParams(['name', request.name], ['namespace_id', request.namespaceId], ['order_by', request.orderBy], ['organization_id', request.organizationId], ['page', request.page], ['page_size', request.pageSize ?? this.client.settings.defaultPageSize], ['project_id', request.projectId])
118
- }, unmarshalListContainersResponse);
119
-
120
- /**
121
- * List all your containers. List all containers for a specified region.
122
- *
123
- * @param request - The request {@link ListContainersRequest}
124
- * @returns A Promise of ListContainersResponse
125
- */
126
- listContainers = request => enrichForPagination('containers', this.pageOfListContainers, request);
127
-
128
- /**
129
- * Get a container. Get the container associated with the specified ID.
130
- *
131
- * @param request - The request {@link GetContainerRequest}
132
- * @returns A Promise of Container
133
- */
134
- getContainer = request => this.client.fetch({
135
- method: 'GET',
136
- path: `/containers/v1beta1/regions/${validatePathParam('region', request.region ?? this.client.settings.defaultRegion)}/containers/${validatePathParam('containerId', request.containerId)}`
137
- }, unmarshalContainer);
138
-
139
- /**
140
- * Waits for {@link Container} to be in a final state.
141
- *
142
- * @param request - The request {@link GetContainerRequest}
143
- * @param options - The waiting options
144
- * @returns A Promise of Container
145
- */
146
- waitForContainer = (request, options) => waitForResource(options?.stop ?? (res => Promise.resolve(!CONTAINER_TRANSIENT_STATUSES.includes(res.status))), this.getContainer, request, options);
147
-
148
- /**
149
- * Create a new container. Create a new container in the specified region.
150
- *
151
- * @param request - The request {@link CreateContainerRequest}
152
- * @returns A Promise of Container
153
- */
154
- createContainer = request => this.client.fetch({
155
- body: JSON.stringify(marshalCreateContainerRequest(request, this.client.settings)),
156
- headers: jsonContentHeaders,
157
- method: 'POST',
158
- path: `/containers/v1beta1/regions/${validatePathParam('region', request.region ?? this.client.settings.defaultRegion)}/containers`
159
- }, unmarshalContainer);
160
-
161
- /**
162
- * Update an existing container. Update the container associated with the
163
- * specified ID.
164
- *
165
- * @param request - The request {@link UpdateContainerRequest}
166
- * @returns A Promise of Container
167
- */
168
- updateContainer = request => this.client.fetch({
169
- body: JSON.stringify(marshalUpdateContainerRequest(request, this.client.settings)),
170
- headers: jsonContentHeaders,
171
- method: 'PATCH',
172
- path: `/containers/v1beta1/regions/${validatePathParam('region', request.region ?? this.client.settings.defaultRegion)}/containers/${validatePathParam('containerId', request.containerId)}`
173
- }, unmarshalContainer);
174
-
175
- /**
176
- * Delete a container. Delete the container associated with the specified ID.
177
- *
178
- * @param request - The request {@link DeleteContainerRequest}
179
- * @returns A Promise of Container
180
- */
181
- deleteContainer = request => this.client.fetch({
182
- method: 'DELETE',
183
- path: `/containers/v1beta1/regions/${validatePathParam('region', request.region ?? this.client.settings.defaultRegion)}/containers/${validatePathParam('containerId', request.containerId)}`
184
- }, unmarshalContainer);
185
-
186
- /**
187
- * Deploy a container. Deploy a container associated with the specified ID.
188
- *
189
- * @param request - The request {@link DeployContainerRequest}
190
- * @returns A Promise of Container
191
- */
192
- deployContainer = request => this.client.fetch({
193
- body: '{}',
194
- headers: jsonContentHeaders,
195
- method: 'POST',
196
- path: `/containers/v1beta1/regions/${validatePathParam('region', request.region ?? this.client.settings.defaultRegion)}/containers/${validatePathParam('containerId', request.containerId)}/deploy`
197
- }, unmarshalContainer);
198
- pageOfListCrons = request => this.client.fetch({
199
- method: 'GET',
200
- path: `/containers/v1beta1/regions/${validatePathParam('region', request.region ?? this.client.settings.defaultRegion)}/crons`,
201
- urlParams: urlParams(['container_id', request.containerId], ['order_by', request.orderBy], ['page', request.page], ['page_size', request.pageSize ?? this.client.settings.defaultPageSize])
202
- }, unmarshalListCronsResponse);
203
-
204
- /**
205
- * List all your crons.
206
- *
207
- * @param request - The request {@link ListCronsRequest}
208
- * @returns A Promise of ListCronsResponse
209
- */
210
- listCrons = request => enrichForPagination('crons', this.pageOfListCrons, request);
211
-
212
- /**
213
- * Get a cron. Get the cron associated with the specified ID.
214
- *
215
- * @param request - The request {@link GetCronRequest}
216
- * @returns A Promise of Cron
217
- */
218
- getCron = request => this.client.fetch({
219
- method: 'GET',
220
- path: `/containers/v1beta1/regions/${validatePathParam('region', request.region ?? this.client.settings.defaultRegion)}/crons/${validatePathParam('cronId', request.cronId)}`
221
- }, unmarshalCron);
222
-
223
- /**
224
- * Waits for {@link Cron} to be in a final state.
225
- *
226
- * @param request - The request {@link GetCronRequest}
227
- * @param options - The waiting options
228
- * @returns A Promise of Cron
229
- */
230
- waitForCron = (request, options) => waitForResource(options?.stop ?? (res => Promise.resolve(!CRON_TRANSIENT_STATUSES.includes(res.status))), this.getCron, request, options);
231
-
232
- /**
233
- * Create a new cron.
234
- *
235
- * @param request - The request {@link CreateCronRequest}
236
- * @returns A Promise of Cron
237
- */
238
- createCron = request => this.client.fetch({
239
- body: JSON.stringify(marshalCreateCronRequest(request, this.client.settings)),
240
- headers: jsonContentHeaders,
241
- method: 'POST',
242
- path: `/containers/v1beta1/regions/${validatePathParam('region', request.region ?? this.client.settings.defaultRegion)}/crons`
243
- }, unmarshalCron);
244
-
245
- /**
246
- * Update an existing cron. Update the cron associated with the specified ID.
247
- *
248
- * @param request - The request {@link UpdateCronRequest}
249
- * @returns A Promise of Cron
250
- */
251
- updateCron = request => this.client.fetch({
252
- body: JSON.stringify(marshalUpdateCronRequest(request, this.client.settings)),
253
- headers: jsonContentHeaders,
254
- method: 'PATCH',
255
- path: `/containers/v1beta1/regions/${validatePathParam('region', request.region ?? this.client.settings.defaultRegion)}/crons/${validatePathParam('cronId', request.cronId)}`
256
- }, unmarshalCron);
257
-
258
- /**
259
- * Delete an existing cron. Delete the cron associated with the specified ID.
260
- *
261
- * @param request - The request {@link DeleteCronRequest}
262
- * @returns A Promise of Cron
263
- */
264
- deleteCron = request => this.client.fetch({
265
- method: 'DELETE',
266
- path: `/containers/v1beta1/regions/${validatePathParam('region', request.region ?? this.client.settings.defaultRegion)}/crons/${validatePathParam('cronId', request.cronId)}`
267
- }, unmarshalCron);
268
- pageOfListLogs = request => this.client.fetch({
269
- method: 'GET',
270
- path: `/containers/v1beta1/regions/${validatePathParam('region', request.region ?? this.client.settings.defaultRegion)}/containers/${validatePathParam('containerId', request.containerId)}/logs`,
271
- urlParams: urlParams(['order_by', request.orderBy], ['page', request.page], ['page_size', request.pageSize ?? this.client.settings.defaultPageSize])
272
- }, unmarshalListLogsResponse);
273
-
274
- /**
275
- * List your container logs. List the logs of the container with the specified
276
- * ID.
277
- *
278
- * @param request - The request {@link ListLogsRequest}
279
- * @returns A Promise of ListLogsResponse
280
- */
281
- listLogs = request => enrichForPagination('logs', this.pageOfListLogs, request);
282
- pageOfListDomains = request => this.client.fetch({
283
- method: 'GET',
284
- path: `/containers/v1beta1/regions/${validatePathParam('region', request.region ?? this.client.settings.defaultRegion)}/domains`,
285
- urlParams: urlParams(['container_id', request.containerId], ['order_by', request.orderBy], ['page', request.page], ['page_size', request.pageSize ?? this.client.settings.defaultPageSize])
286
- }, unmarshalListDomainsResponse);
287
-
288
- /**
289
- * List all domain name bindings. List all domain name bindings in a specified
290
- * region.
291
- *
292
- * @param request - The request {@link ListDomainsRequest}
293
- * @returns A Promise of ListDomainsResponse
294
- */
295
- listDomains = request => enrichForPagination('domains', this.pageOfListDomains, request);
296
-
297
- /**
298
- * Get a domain name binding. Get a domain name binding for the container with
299
- * the specified ID.
300
- *
301
- * @param request - The request {@link GetDomainRequest}
302
- * @returns A Promise of Domain
303
- */
304
- getDomain = request => this.client.fetch({
305
- method: 'GET',
306
- path: `/containers/v1beta1/regions/${validatePathParam('region', request.region ?? this.client.settings.defaultRegion)}/domains/${validatePathParam('domainId', request.domainId)}`
307
- }, unmarshalDomain);
308
-
309
- /**
310
- * Waits for {@link Domain} to be in a final state.
311
- *
312
- * @param request - The request {@link GetDomainRequest}
313
- * @param options - The waiting options
314
- * @returns A Promise of Domain
315
- */
316
- waitForDomain = (request, options) => waitForResource(options?.stop ?? (res => Promise.resolve(!DOMAIN_TRANSIENT_STATUSES.includes(res.status))), this.getDomain, request, options);
317
-
318
- /**
319
- * Create a domain name binding. Create a domain name binding for the
320
- * container with the specified ID.
321
- *
322
- * @param request - The request {@link CreateDomainRequest}
323
- * @returns A Promise of Domain
324
- */
325
- createDomain = request => this.client.fetch({
326
- body: JSON.stringify(marshalCreateDomainRequest(request, this.client.settings)),
327
- headers: jsonContentHeaders,
328
- method: 'POST',
329
- path: `/containers/v1beta1/regions/${validatePathParam('region', request.region ?? this.client.settings.defaultRegion)}/domains`
330
- }, unmarshalDomain);
331
-
332
- /**
333
- * Delete a domain name binding. Delete the domain name binding with the
334
- * specific ID.
335
- *
336
- * @param request - The request {@link DeleteDomainRequest}
337
- * @returns A Promise of Domain
338
- */
339
- deleteDomain = request => this.client.fetch({
340
- method: 'DELETE',
341
- path: `/containers/v1beta1/regions/${validatePathParam('region', request.region ?? this.client.settings.defaultRegion)}/domains/${validatePathParam('domainId', request.domainId)}`
342
- }, unmarshalDomain);
343
-
344
- /**
345
- * @deprecated
346
- * @param request - The request {@link IssueJWTRequest}
347
- * @returns A Promise of Token
348
- */
349
- issueJWT = (() => {
350
- var _this4 = this;
351
- return function (request) {
352
- if (request === void 0) {
353
- request = {};
354
- }
355
- return _this4.client.fetch({
356
- method: 'GET',
357
- path: `/containers/v1beta1/regions/${validatePathParam('region', request.region ?? _this4.client.settings.defaultRegion)}/issue-jwt`,
358
- urlParams: urlParams(['expires_at', request.expiresAt], ...Object.entries(resolveOneOf([{
359
- param: 'container_id',
360
- value: request.containerId
361
- }, {
362
- param: 'namespace_id',
363
- value: request.namespaceId
364
- }])))
365
- }, unmarshalToken);
366
- };
367
- })();
368
-
369
- /**
370
- * Create a new revocable token.
371
- *
372
- * @param request - The request {@link CreateTokenRequest}
373
- * @returns A Promise of Token
374
- */
375
- createToken = (() => {
376
- var _this5 = this;
377
- return function (request) {
378
- if (request === void 0) {
379
- request = {};
380
- }
381
- return _this5.client.fetch({
382
- body: JSON.stringify(marshalCreateTokenRequest(request, _this5.client.settings)),
383
- headers: jsonContentHeaders,
384
- method: 'POST',
385
- path: `/containers/v1beta1/regions/${validatePathParam('region', request.region ?? _this5.client.settings.defaultRegion)}/tokens`
386
- }, unmarshalToken);
387
- };
388
- })();
389
-
390
- /**
391
- * Get a token. Get a token with a specified ID.
392
- *
393
- * @param request - The request {@link GetTokenRequest}
394
- * @returns A Promise of Token
395
- */
396
- getToken = request => this.client.fetch({
397
- method: 'GET',
398
- path: `/containers/v1beta1/regions/${validatePathParam('region', request.region ?? this.client.settings.defaultRegion)}/tokens/${validatePathParam('tokenId', request.tokenId)}`
399
- }, unmarshalToken);
400
-
401
- /**
402
- * Waits for {@link Token} to be in a final state.
403
- *
404
- * @param request - The request {@link GetTokenRequest}
405
- * @param options - The waiting options
406
- * @returns A Promise of Token
407
- */
408
- waitForToken = (request, options) => waitForResource(options?.stop ?? (res => Promise.resolve(!TOKEN_TRANSIENT_STATUSES.includes(res.status))), this.getToken, request, options);
409
- pageOfListTokens = (() => {
410
- var _this6 = this;
411
- return function (request) {
412
- if (request === void 0) {
413
- request = {};
414
- }
415
- return _this6.client.fetch({
416
- method: 'GET',
417
- path: `/containers/v1beta1/regions/${validatePathParam('region', request.region ?? _this6.client.settings.defaultRegion)}/tokens`,
418
- urlParams: urlParams(['container_id', request.containerId], ['namespace_id', request.namespaceId], ['order_by', request.orderBy], ['page', request.page], ['page_size', request.pageSize ?? _this6.client.settings.defaultPageSize])
419
- }, unmarshalListTokensResponse);
420
- };
421
- })();
422
-
423
- /**
424
- * List all tokens. List all tokens belonging to a specified Organization or
425
- * Project.
426
- *
427
- * @param request - The request {@link ListTokensRequest}
428
- * @returns A Promise of ListTokensResponse
429
- */
430
- listTokens = (() => {
431
- var _this7 = this;
432
- return function (request) {
433
- if (request === void 0) {
434
- request = {};
435
- }
436
- return enrichForPagination('tokens', _this7.pageOfListTokens, request);
437
- };
438
- })();
439
-
440
- /**
441
- * Delete a token. Delete a token with a specified ID.
442
- *
443
- * @param request - The request {@link DeleteTokenRequest}
444
- * @returns A Promise of Token
445
- */
446
- deleteToken = request => this.client.fetch({
447
- method: 'DELETE',
448
- path: `/containers/v1beta1/regions/${validatePathParam('region', request.region ?? this.client.settings.defaultRegion)}/tokens/${validatePathParam('tokenId', request.tokenId)}`
449
- }, unmarshalToken);
450
-
451
- /**
452
- * Create a trigger. Create a new trigger for a specified container.
453
- *
454
- * @param request - The request {@link CreateTriggerRequest}
455
- * @returns A Promise of Trigger
456
- */
457
- createTrigger = request => this.client.fetch({
458
- body: JSON.stringify(marshalCreateTriggerRequest(request, this.client.settings)),
459
- headers: jsonContentHeaders,
460
- method: 'POST',
461
- path: `/containers/v1beta1/regions/${validatePathParam('region', request.region ?? this.client.settings.defaultRegion)}/triggers`
462
- }, unmarshalTrigger);
463
-
464
- /**
465
- * Get a trigger. Get a trigger with a specified ID.
466
- *
467
- * @param request - The request {@link GetTriggerRequest}
468
- * @returns A Promise of Trigger
469
- */
470
- getTrigger = request => this.client.fetch({
471
- method: 'GET',
472
- path: `/containers/v1beta1/regions/${validatePathParam('region', request.region ?? this.client.settings.defaultRegion)}/triggers/${validatePathParam('triggerId', request.triggerId)}`
473
- }, unmarshalTrigger);
474
-
475
- /**
476
- * Waits for {@link Trigger} to be in a final state.
477
- *
478
- * @param request - The request {@link GetTriggerRequest}
479
- * @param options - The waiting options
480
- * @returns A Promise of Trigger
481
- */
482
- waitForTrigger = (request, options) => waitForResource(options?.stop ?? (res => Promise.resolve(!TRIGGER_TRANSIENT_STATUSES.includes(res.status))), this.getTrigger, request, options);
483
- pageOfListTriggers = (() => {
484
- var _this8 = this;
485
- return function (request) {
486
- if (request === void 0) {
487
- request = {};
488
- }
489
- return _this8.client.fetch({
490
- method: 'GET',
491
- path: `/containers/v1beta1/regions/${validatePathParam('region', request.region ?? _this8.client.settings.defaultRegion)}/triggers`,
492
- urlParams: urlParams(['order_by', request.orderBy], ['page', request.page], ['page_size', request.pageSize ?? _this8.client.settings.defaultPageSize], ...Object.entries(resolveOneOf([{
493
- param: 'container_id',
494
- value: request.containerId
495
- }, {
496
- param: 'namespace_id',
497
- value: request.namespaceId
498
- }, {
499
- default: _this8.client.settings.defaultProjectId,
500
- param: 'project_id',
501
- value: request.projectId
502
- }])))
503
- }, unmarshalListTriggersResponse);
504
- };
505
- })();
506
-
507
- /**
508
- * List all triggers. List all triggers belonging to a specified Organization
509
- * or Project.
510
- *
511
- * @param request - The request {@link ListTriggersRequest}
512
- * @returns A Promise of ListTriggersResponse
513
- */
514
- listTriggers = (() => {
515
- var _this9 = this;
516
- return function (request) {
517
- if (request === void 0) {
518
- request = {};
519
- }
520
- return enrichForPagination('triggers', _this9.pageOfListTriggers, request);
521
- };
522
- })();
523
-
524
- /**
525
- * Update a trigger. Update a trigger with a specified ID.
526
- *
527
- * @param request - The request {@link UpdateTriggerRequest}
528
- * @returns A Promise of Trigger
529
- */
530
- updateTrigger = request => this.client.fetch({
531
- body: JSON.stringify(marshalUpdateTriggerRequest(request, this.client.settings)),
532
- headers: jsonContentHeaders,
533
- method: 'PATCH',
534
- path: `/containers/v1beta1/regions/${validatePathParam('region', request.region ?? this.client.settings.defaultRegion)}/triggers/${validatePathParam('triggerId', request.triggerId)}`
535
- }, unmarshalTrigger);
536
-
537
- /**
538
- * Delete a trigger. Delete a trigger with a specified ID.
539
- *
540
- * @param request - The request {@link DeleteTriggerRequest}
541
- * @returns A Promise of Trigger
542
- */
543
- deleteTrigger = request => this.client.fetch({
544
- method: 'DELETE',
545
- path: `/containers/v1beta1/regions/${validatePathParam('region', request.region ?? this.client.settings.defaultRegion)}/triggers/${validatePathParam('triggerId', request.triggerId)}`
546
- }, unmarshalTrigger);
547
- }
548
-
549
- export { API };
@@ -1,22 +0,0 @@
1
- // This file was automatically generated. DO NOT EDIT.
2
- // If you have any remark or suggestion do not hesitate to open an issue.
3
-
4
- /** Lists transient statutes of the enum {@link ContainerStatus}. */
5
- const CONTAINER_TRANSIENT_STATUSES = ['deleting', 'creating', 'pending'];
6
-
7
- /** Lists transient statutes of the enum {@link CronStatus}. */
8
- const CRON_TRANSIENT_STATUSES = ['deleting', 'creating', 'pending'];
9
-
10
- /** Lists transient statutes of the enum {@link DomainStatus}. */
11
- const DOMAIN_TRANSIENT_STATUSES = ['deleting', 'creating', 'pending'];
12
-
13
- /** Lists transient statutes of the enum {@link NamespaceStatus}. */
14
- const NAMESPACE_TRANSIENT_STATUSES = ['deleting', 'creating', 'pending'];
15
-
16
- /** Lists transient statutes of the enum {@link TokenStatus}. */
17
- const TOKEN_TRANSIENT_STATUSES = ['deleting', 'creating'];
18
-
19
- /** Lists transient statutes of the enum {@link TriggerStatus}. */
20
- const TRIGGER_TRANSIENT_STATUSES = ['deleting', 'creating', 'pending'];
21
-
22
- export { CONTAINER_TRANSIENT_STATUSES, CRON_TRANSIENT_STATUSES, DOMAIN_TRANSIENT_STATUSES, NAMESPACE_TRANSIENT_STATUSES, TOKEN_TRANSIENT_STATUSES, TRIGGER_TRANSIENT_STATUSES };
@@ -1,5 +0,0 @@
1
- export { API } from './api.gen.js';
2
- export { CONTAINER_TRANSIENT_STATUSES, CRON_TRANSIENT_STATUSES, DOMAIN_TRANSIENT_STATUSES, NAMESPACE_TRANSIENT_STATUSES, TOKEN_TRANSIENT_STATUSES, TRIGGER_TRANSIENT_STATUSES } from './content.gen.js';
3
-
4
- // This file was automatically generated. DO NOT EDIT.
5
- // If you have any remark or suggestion do not hesitate to open an issue.