@scaleway/sdk 2.0.0-alpha.11 → 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,6 +0,0 @@
1
- export { API } from './api.gen.js';
2
- import * as validationRules_gen from './validation-rules.gen.js';
3
- export { validationRules_gen as ValidationRules };
4
-
5
- // This file was automatically generated. DO NOT EDIT.
6
- // If you have any remark or suggestion do not hesitate to open an issue.
@@ -1,373 +0,0 @@
1
- import randomName from '../../../node_modules/.pnpm/@scaleway_random-name@4.0.2/node_modules/@scaleway/random-name/dist/index.js';
2
- import { isJSONObject } from '../../../helpers/json.js';
3
- import { unmarshalDate, unmarshalArrayOfObject, resolveOneOf } from '../../../helpers/marshalling.js';
4
-
5
- // This file was automatically generated. DO NOT EDIT.
6
- // If you have any remark or suggestion do not hesitate to open an issue.
7
- const unmarshalJWT = data => {
8
- if (!isJSONObject(data)) {
9
- throw new TypeError(`Unmarshalling the type 'JWT' failed as data isn't a dictionary.`);
10
- }
11
- return {
12
- audienceId: data.audience_id,
13
- createdAt: unmarshalDate(data.created_at),
14
- expiresAt: unmarshalDate(data.expires_at),
15
- ip: data.ip,
16
- issuerId: data.issuer_id,
17
- jti: data.jti,
18
- updatedAt: unmarshalDate(data.updated_at),
19
- userAgent: data.user_agent
20
- };
21
- };
22
- const unmarshalAPIKey = data => {
23
- if (!isJSONObject(data)) {
24
- throw new TypeError(`Unmarshalling the type 'APIKey' failed as data isn't a dictionary.`);
25
- }
26
- return {
27
- accessKey: data.access_key,
28
- applicationId: data.application_id ? data.application_id : undefined,
29
- createdAt: unmarshalDate(data.created_at),
30
- creationIp: data.creation_ip,
31
- defaultProjectId: data.default_project_id,
32
- description: data.description,
33
- editable: data.editable,
34
- expiresAt: unmarshalDate(data.expires_at),
35
- secretKey: data.secret_key ? data.secret_key : undefined,
36
- updatedAt: unmarshalDate(data.updated_at),
37
- userId: data.user_id ? data.user_id : undefined
38
- };
39
- };
40
- const unmarshalApplication = data => {
41
- if (!isJSONObject(data)) {
42
- throw new TypeError(`Unmarshalling the type 'Application' failed as data isn't a dictionary.`);
43
- }
44
- return {
45
- createdAt: unmarshalDate(data.created_at),
46
- description: data.description,
47
- editable: data.editable,
48
- id: data.id,
49
- name: data.name,
50
- nbApiKeys: data.nb_api_keys,
51
- organizationId: data.organization_id,
52
- updatedAt: unmarshalDate(data.updated_at)
53
- };
54
- };
55
- const unmarshalGroup = data => {
56
- if (!isJSONObject(data)) {
57
- throw new TypeError(`Unmarshalling the type 'Group' failed as data isn't a dictionary.`);
58
- }
59
- return {
60
- applicationIds: data.application_ids,
61
- createdAt: unmarshalDate(data.created_at),
62
- description: data.description,
63
- id: data.id,
64
- name: data.name,
65
- organizationId: data.organization_id,
66
- updatedAt: unmarshalDate(data.updated_at),
67
- userIds: data.user_ids
68
- };
69
- };
70
- const unmarshalPolicy = data => {
71
- if (!isJSONObject(data)) {
72
- throw new TypeError(`Unmarshalling the type 'Policy' failed as data isn't a dictionary.`);
73
- }
74
- return {
75
- applicationId: data.application_id ? data.application_id : undefined,
76
- createdAt: unmarshalDate(data.created_at),
77
- description: data.description,
78
- editable: data.editable,
79
- groupId: data.group_id ? data.group_id : undefined,
80
- id: data.id,
81
- name: data.name,
82
- nbPermissionSets: data.nb_permission_sets,
83
- nbRules: data.nb_rules,
84
- nbScopes: data.nb_scopes,
85
- noPrincipal: data.no_principal ? data.no_principal : undefined,
86
- organizationId: data.organization_id,
87
- updatedAt: unmarshalDate(data.updated_at),
88
- userId: data.user_id ? data.user_id : undefined
89
- };
90
- };
91
- const unmarshalQuotum = data => {
92
- if (!isJSONObject(data)) {
93
- throw new TypeError(`Unmarshalling the type 'Quotum' failed as data isn't a dictionary.`);
94
- }
95
- return {
96
- limit: data.limit ? data.limit : undefined,
97
- name: data.name,
98
- unlimited: data.unlimited ? data.unlimited : undefined
99
- };
100
- };
101
- const unmarshalSSHKey = data => {
102
- if (!isJSONObject(data)) {
103
- throw new TypeError(`Unmarshalling the type 'SSHKey' failed as data isn't a dictionary.`);
104
- }
105
- return {
106
- createdAt: unmarshalDate(data.created_at),
107
- disabled: data.disabled,
108
- fingerprint: data.fingerprint,
109
- id: data.id,
110
- name: data.name,
111
- organizationId: data.organization_id,
112
- projectId: data.project_id,
113
- publicKey: data.public_key,
114
- updatedAt: unmarshalDate(data.updated_at)
115
- };
116
- };
117
- const unmarshalUser = data => {
118
- if (!isJSONObject(data)) {
119
- throw new TypeError(`Unmarshalling the type 'User' failed as data isn't a dictionary.`);
120
- }
121
- return {
122
- accountRootUserId: data.account_root_user_id,
123
- createdAt: unmarshalDate(data.created_at),
124
- deletable: data.deletable,
125
- email: data.email,
126
- id: data.id,
127
- lastLoginAt: unmarshalDate(data.last_login_at),
128
- mfa: data.mfa,
129
- organizationId: data.organization_id,
130
- status: data.status,
131
- twoFactorEnabled: data.two_factor_enabled ? data.two_factor_enabled : undefined,
132
- type: data.type,
133
- updatedAt: unmarshalDate(data.updated_at)
134
- };
135
- };
136
- const unmarshalListAPIKeysResponse = data => {
137
- if (!isJSONObject(data)) {
138
- throw new TypeError(`Unmarshalling the type 'ListAPIKeysResponse' failed as data isn't a dictionary.`);
139
- }
140
- return {
141
- apiKeys: unmarshalArrayOfObject(data.api_keys, unmarshalAPIKey),
142
- totalCount: data.total_count
143
- };
144
- };
145
- const unmarshalListApplicationsResponse = data => {
146
- if (!isJSONObject(data)) {
147
- throw new TypeError(`Unmarshalling the type 'ListApplicationsResponse' failed as data isn't a dictionary.`);
148
- }
149
- return {
150
- applications: unmarshalArrayOfObject(data.applications, unmarshalApplication),
151
- totalCount: data.total_count
152
- };
153
- };
154
- const unmarshalListGroupsResponse = data => {
155
- if (!isJSONObject(data)) {
156
- throw new TypeError(`Unmarshalling the type 'ListGroupsResponse' failed as data isn't a dictionary.`);
157
- }
158
- return {
159
- groups: unmarshalArrayOfObject(data.groups, unmarshalGroup),
160
- totalCount: data.total_count
161
- };
162
- };
163
- const unmarshalListJWTsResponse = data => {
164
- if (!isJSONObject(data)) {
165
- throw new TypeError(`Unmarshalling the type 'ListJWTsResponse' failed as data isn't a dictionary.`);
166
- }
167
- return {
168
- jwts: unmarshalArrayOfObject(data.jwts, unmarshalJWT),
169
- totalCount: data.total_count
170
- };
171
- };
172
- const unmarshalPermissionSet = data => {
173
- if (!isJSONObject(data)) {
174
- throw new TypeError(`Unmarshalling the type 'PermissionSet' failed as data isn't a dictionary.`);
175
- }
176
- return {
177
- categories: data.categories ? data.categories : undefined,
178
- description: data.description,
179
- id: data.id,
180
- name: data.name,
181
- scopeType: data.scope_type
182
- };
183
- };
184
- const unmarshalListPermissionSetsResponse = data => {
185
- if (!isJSONObject(data)) {
186
- throw new TypeError(`Unmarshalling the type 'ListPermissionSetsResponse' failed as data isn't a dictionary.`);
187
- }
188
- return {
189
- permissionSets: unmarshalArrayOfObject(data.permission_sets, unmarshalPermissionSet),
190
- totalCount: data.total_count
191
- };
192
- };
193
- const unmarshalListPoliciesResponse = data => {
194
- if (!isJSONObject(data)) {
195
- throw new TypeError(`Unmarshalling the type 'ListPoliciesResponse' failed as data isn't a dictionary.`);
196
- }
197
- return {
198
- policies: unmarshalArrayOfObject(data.policies, unmarshalPolicy),
199
- totalCount: data.total_count
200
- };
201
- };
202
- const unmarshalListQuotaResponse = data => {
203
- if (!isJSONObject(data)) {
204
- throw new TypeError(`Unmarshalling the type 'ListQuotaResponse' failed as data isn't a dictionary.`);
205
- }
206
- return {
207
- quota: unmarshalArrayOfObject(data.quota, unmarshalQuotum),
208
- totalCount: data.total_count
209
- };
210
- };
211
- const unmarshalRule = data => {
212
- if (!isJSONObject(data)) {
213
- throw new TypeError(`Unmarshalling the type 'Rule' failed as data isn't a dictionary.`);
214
- }
215
- return {
216
- accountRootUserId: data.account_root_user_id ? data.account_root_user_id : undefined,
217
- id: data.id,
218
- organizationId: data.organization_id ? data.organization_id : undefined,
219
- permissionSetNames: data.permission_set_names ? data.permission_set_names : undefined,
220
- permissionSetsScopeType: data.permission_sets_scope_type,
221
- projectIds: data.project_ids ? data.project_ids : undefined
222
- };
223
- };
224
- const unmarshalListRulesResponse = data => {
225
- if (!isJSONObject(data)) {
226
- throw new TypeError(`Unmarshalling the type 'ListRulesResponse' failed as data isn't a dictionary.`);
227
- }
228
- return {
229
- rules: unmarshalArrayOfObject(data.rules, unmarshalRule),
230
- totalCount: data.total_count
231
- };
232
- };
233
- const unmarshalListSSHKeysResponse = data => {
234
- if (!isJSONObject(data)) {
235
- throw new TypeError(`Unmarshalling the type 'ListSSHKeysResponse' failed as data isn't a dictionary.`);
236
- }
237
- return {
238
- sshKeys: unmarshalArrayOfObject(data.ssh_keys, unmarshalSSHKey),
239
- totalCount: data.total_count
240
- };
241
- };
242
- const unmarshalListUsersResponse = data => {
243
- if (!isJSONObject(data)) {
244
- throw new TypeError(`Unmarshalling the type 'ListUsersResponse' failed as data isn't a dictionary.`);
245
- }
246
- return {
247
- totalCount: data.total_count,
248
- users: unmarshalArrayOfObject(data.users, unmarshalUser)
249
- };
250
- };
251
- const unmarshalSetRulesResponse = data => {
252
- if (!isJSONObject(data)) {
253
- throw new TypeError(`Unmarshalling the type 'SetRulesResponse' failed as data isn't a dictionary.`);
254
- }
255
- return {
256
- rules: unmarshalArrayOfObject(data.rules, unmarshalRule)
257
- };
258
- };
259
- const marshalAddGroupMemberRequest = (request, defaults) => ({
260
- ...resolveOneOf([{
261
- param: 'application_id',
262
- value: request.applicationId
263
- }, {
264
- param: 'user_id',
265
- value: request.userId
266
- }])
267
- });
268
- const marshalAddGroupMembersRequest = (request, defaults) => ({
269
- application_ids: request.applicationIds,
270
- user_ids: request.userIds
271
- });
272
- const marshalCreateAPIKeyRequest = (request, defaults) => ({
273
- default_project_id: request.defaultProjectId,
274
- description: request.description,
275
- expires_at: request.expiresAt,
276
- ...resolveOneOf([{
277
- param: 'application_id',
278
- value: request.applicationId
279
- }, {
280
- param: 'user_id',
281
- value: request.userId
282
- }])
283
- });
284
- const marshalCreateApplicationRequest = (request, defaults) => ({
285
- description: request.description,
286
- name: request.name || randomName('app'),
287
- organization_id: request.organizationId ?? defaults.defaultOrganizationId
288
- });
289
- const marshalCreateGroupRequest = (request, defaults) => ({
290
- description: request.description,
291
- name: request.name || randomName('grp'),
292
- organization_id: request.organizationId ?? defaults.defaultOrganizationId
293
- });
294
- const marshalCreatePolicyRequest = (request, defaults) => ({
295
- description: request.description,
296
- name: request.name || randomName('pol'),
297
- organization_id: request.organizationId ?? defaults.defaultOrganizationId,
298
- rules: request.rules,
299
- ...resolveOneOf([{
300
- param: 'application_id',
301
- value: request.applicationId
302
- }, {
303
- param: 'group_id',
304
- value: request.groupId
305
- }, {
306
- param: 'no_principal',
307
- value: request.noPrincipal
308
- }, {
309
- param: 'user_id',
310
- value: request.userId
311
- }])
312
- });
313
- const marshalCreateSSHKeyRequest = (request, defaults) => ({
314
- name: request.name || randomName('key'),
315
- project_id: request.projectId ?? defaults.defaultProjectId,
316
- public_key: request.publicKey
317
- });
318
- const marshalCreateUserRequest = (request, defaults) => ({
319
- email: request.email,
320
- organization_id: request.organizationId ?? defaults.defaultOrganizationId
321
- });
322
- const marshalRemoveGroupMemberRequest = (request, defaults) => ({
323
- ...resolveOneOf([{
324
- param: 'application_id',
325
- value: request.applicationId
326
- }, {
327
- param: 'user_id',
328
- value: request.userId
329
- }])
330
- });
331
- const marshalSetGroupMembersRequest = (request, defaults) => ({
332
- application_ids: request.applicationIds,
333
- user_ids: request.userIds
334
- });
335
- const marshalSetRulesRequest = (request, defaults) => ({
336
- policy_id: request.policyId,
337
- rules: request.rules
338
- });
339
- const marshalUpdateAPIKeyRequest = (request, defaults) => ({
340
- default_project_id: request.defaultProjectId,
341
- description: request.description
342
- });
343
- const marshalUpdateApplicationRequest = (request, defaults) => ({
344
- description: request.description,
345
- name: request.name
346
- });
347
- const marshalUpdateGroupRequest = (request, defaults) => ({
348
- description: request.description,
349
- name: request.name
350
- });
351
- const marshalUpdatePolicyRequest = (request, defaults) => ({
352
- description: request.description,
353
- name: request.name,
354
- ...resolveOneOf([{
355
- param: 'application_id',
356
- value: request.applicationId
357
- }, {
358
- param: 'group_id',
359
- value: request.groupId
360
- }, {
361
- param: 'no_principal',
362
- value: request.noPrincipal
363
- }, {
364
- param: 'user_id',
365
- value: request.userId
366
- }])
367
- });
368
- const marshalUpdateSSHKeyRequest = (request, defaults) => ({
369
- disabled: request.disabled,
370
- name: request.name
371
- });
372
-
373
- export { marshalAddGroupMemberRequest, marshalAddGroupMembersRequest, marshalCreateAPIKeyRequest, marshalCreateApplicationRequest, marshalCreateGroupRequest, marshalCreatePolicyRequest, marshalCreateSSHKeyRequest, marshalCreateUserRequest, marshalRemoveGroupMemberRequest, marshalSetGroupMembersRequest, marshalSetRulesRequest, marshalUpdateAPIKeyRequest, marshalUpdateApplicationRequest, marshalUpdateGroupRequest, marshalUpdatePolicyRequest, marshalUpdateSSHKeyRequest, unmarshalAPIKey, unmarshalApplication, unmarshalGroup, unmarshalJWT, unmarshalListAPIKeysResponse, unmarshalListApplicationsResponse, unmarshalListGroupsResponse, unmarshalListJWTsResponse, unmarshalListPermissionSetsResponse, unmarshalListPoliciesResponse, unmarshalListQuotaResponse, unmarshalListRulesResponse, unmarshalListSSHKeysResponse, unmarshalListUsersResponse, unmarshalPolicy, unmarshalQuotum, unmarshalSSHKey, unmarshalSetRulesResponse, unmarshalUser };
@@ -1,207 +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
- const CreateAPIKeyRequest = {
5
- description: {
6
- ignoreEmpty: true,
7
- maxLength: 200
8
- }
9
- };
10
- const CreateApplicationRequest = {
11
- description: {
12
- ignoreEmpty: true,
13
- maxLength: 200
14
- },
15
- name: {
16
- maxLength: 64,
17
- minLength: 1,
18
- pattern: /^[a-zA-Z0-9\(\)\._\- ]+$/
19
- }
20
- };
21
- const CreateGroupRequest = {
22
- description: {
23
- ignoreEmpty: true,
24
- maxLength: 200
25
- },
26
- name: {
27
- maxLength: 64,
28
- minLength: 1,
29
- pattern: /^[a-zA-Z0-9\(\)\._\- ]+$/
30
- }
31
- };
32
- const CreatePolicyRequest = {
33
- description: {
34
- ignoreEmpty: true,
35
- maxLength: 200
36
- },
37
- name: {
38
- maxLength: 64,
39
- minLength: 1,
40
- pattern: /^[a-zA-Z0-9\(\)\._\- ]+$/
41
- }
42
- };
43
- const CreateSSHKeyRequest = {
44
- name: {
45
- ignoreEmpty: true,
46
- maxLength: 1000
47
- },
48
- publicKey: {
49
- maxLength: 65000,
50
- minLength: 1
51
- }
52
- };
53
- const GetQuotumRequest = {
54
- quotumName: {
55
- minLength: 1
56
- }
57
- };
58
- const ListAPIKeysRequest = {
59
- description: {
60
- maxLength: 200
61
- },
62
- page: {
63
- greaterThan: 0
64
- },
65
- pageSize: {
66
- greaterThanOrEqual: 1,
67
- lessThanOrEqual: 100
68
- }
69
- };
70
- const ListApplicationsRequest = {
71
- name: {
72
- maxLength: 64,
73
- minLength: 1,
74
- pattern: /^[a-zA-Z0-9\(\)\._\- ]+$/
75
- },
76
- page: {
77
- greaterThan: 0
78
- },
79
- pageSize: {
80
- greaterThanOrEqual: 1,
81
- lessThanOrEqual: 100
82
- }
83
- };
84
- const ListGroupsRequest = {
85
- name: {
86
- minLength: 1
87
- },
88
- page: {
89
- greaterThan: 0
90
- },
91
- pageSize: {
92
- greaterThanOrEqual: 1,
93
- lessThanOrEqual: 100
94
- }
95
- };
96
- const ListJWTsRequest = {
97
- page: {
98
- greaterThan: 0
99
- },
100
- pageSize: {
101
- greaterThanOrEqual: 1,
102
- lessThanOrEqual: 100
103
- }
104
- };
105
- const ListPermissionSetsRequest = {
106
- page: {
107
- greaterThan: 0
108
- },
109
- pageSize: {
110
- greaterThanOrEqual: 1,
111
- lessThanOrEqual: 100
112
- }
113
- };
114
- const ListPoliciesRequest = {
115
- page: {
116
- greaterThan: 0
117
- },
118
- pageSize: {
119
- greaterThanOrEqual: 1,
120
- lessThanOrEqual: 100
121
- },
122
- policyName: {
123
- minLength: 1
124
- }
125
- };
126
- const ListQuotaRequest = {
127
- page: {
128
- greaterThan: 0
129
- },
130
- pageSize: {
131
- greaterThanOrEqual: 1,
132
- lessThanOrEqual: 100
133
- }
134
- };
135
- const ListRulesRequest = {
136
- page: {
137
- greaterThan: 0
138
- },
139
- pageSize: {
140
- greaterThanOrEqual: 1,
141
- lessThanOrEqual: 100
142
- }
143
- };
144
- const ListSSHKeysRequest = {
145
- name: {
146
- maxLength: 1000,
147
- minLength: 1
148
- },
149
- page: {
150
- greaterThan: 0
151
- },
152
- pageSize: {
153
- greaterThanOrEqual: 1,
154
- lessThanOrEqual: 100
155
- }
156
- };
157
- const ListUsersRequest = {
158
- page: {
159
- greaterThan: 0
160
- },
161
- pageSize: {
162
- greaterThanOrEqual: 1,
163
- lessThanOrEqual: 100
164
- }
165
- };
166
- const UpdateAPIKeyRequest = {
167
- description: {
168
- maxLength: 200
169
- }
170
- };
171
- const UpdateApplicationRequest = {
172
- description: {
173
- maxLength: 200
174
- },
175
- name: {
176
- maxLength: 64,
177
- minLength: 1,
178
- pattern: /^[a-zA-Z0-9\(\)\._\- ]+$/
179
- }
180
- };
181
- const UpdateGroupRequest = {
182
- description: {
183
- maxLength: 200
184
- },
185
- name: {
186
- maxLength: 64,
187
- minLength: 1,
188
- pattern: /^[a-zA-Z0-9\(\)\._\- ]+$/
189
- }
190
- };
191
- const UpdatePolicyRequest = {
192
- description: {
193
- maxLength: 200
194
- },
195
- name: {
196
- maxLength: 64,
197
- minLength: 1,
198
- pattern: /^[a-zA-Z0-9\(\)\._\- ]+$/
199
- }
200
- };
201
- const UpdateSSHKeyRequest = {
202
- name: {
203
- maxLength: 1000
204
- }
205
- };
206
-
207
- export { CreateAPIKeyRequest, CreateApplicationRequest, CreateGroupRequest, CreatePolicyRequest, CreateSSHKeyRequest, GetQuotumRequest, ListAPIKeysRequest, ListApplicationsRequest, ListGroupsRequest, ListJWTsRequest, ListPermissionSetsRequest, ListPoliciesRequest, ListQuotaRequest, ListRulesRequest, ListSSHKeysRequest, ListUsersRequest, UpdateAPIKeyRequest, UpdateApplicationRequest, UpdateGroupRequest, UpdatePolicyRequest, UpdateSSHKeyRequest };
@@ -1,2 +0,0 @@
1
- import * as index from './v1/index.js';
2
- export { index as v1 };