@scaleway/sdk 3.0.0-alpha.0 → 3.1.1

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 (214) hide show
  1. package/dist/index.gen.d.ts +362 -0
  2. package/dist/index.gen.js +323 -0
  3. package/package.json +71 -25
  4. package/README.md +0 -46
  5. package/dist/api/account/index.js +0 -4
  6. package/dist/api/account/v2/api.gen.js +0 -147
  7. package/dist/api/account/v2/index.gen.js +0 -4
  8. package/dist/api/account/v2/marshalling.gen.js +0 -39
  9. package/dist/api/account/v3/api.gen.js +0 -129
  10. package/dist/api/account/v3/index.gen.js +0 -6
  11. package/dist/api/account/v3/marshalling.gen.js +0 -39
  12. package/dist/api/account/v3/validation-rules.gen.js +0 -39
  13. package/dist/api/applesilicon/index.js +0 -2
  14. package/dist/api/applesilicon/v1alpha1/api.gen.js +0 -220
  15. package/dist/api/applesilicon/v1alpha1/content.gen.js +0 -7
  16. package/dist/api/applesilicon/v1alpha1/index.gen.js +0 -5
  17. package/dist/api/applesilicon/v1alpha1/marshalling.gen.js +0 -113
  18. package/dist/api/baremetal/index.js +0 -2
  19. package/dist/api/baremetal/v1/api.gen.js +0 -523
  20. package/dist/api/baremetal/v1/api.utils.js +0 -27
  21. package/dist/api/baremetal/v1/content.gen.js +0 -13
  22. package/dist/api/baremetal/v1/index.js +0 -5
  23. package/dist/api/baremetal/v1/marshalling.gen.js +0 -395
  24. package/dist/api/baremetal/v1/validation-rules.gen.js +0 -109
  25. package/dist/api/billing/index.js +0 -2
  26. package/dist/api/billing/v2alpha1/api.gen.js +0 -80
  27. package/dist/api/billing/v2alpha1/index.gen.js +0 -4
  28. package/dist/api/billing/v2alpha1/marshalling.gen.js +0 -53
  29. package/dist/api/block/index.js +0 -2
  30. package/dist/api/block/v1alpha1/api.gen.js +0 -245
  31. package/dist/api/block/v1alpha1/content.gen.js +0 -13
  32. package/dist/api/block/v1alpha1/index.gen.js +0 -7
  33. package/dist/api/block/v1alpha1/marshalling.gen.js +0 -175
  34. package/dist/api/block/v1alpha1/validation-rules.gen.js +0 -42
  35. package/dist/api/cockpit/index.js +0 -2
  36. package/dist/api/cockpit/v1beta1/api.gen.js +0 -448
  37. package/dist/api/cockpit/v1beta1/content.gen.js +0 -7
  38. package/dist/api/cockpit/v1beta1/index.gen.js +0 -5
  39. package/dist/api/cockpit/v1beta1/marshalling.gen.js +0 -220
  40. package/dist/api/container/index.js +0 -2
  41. package/dist/api/container/v1beta1/api.gen.js +0 -549
  42. package/dist/api/container/v1beta1/content.gen.js +0 -22
  43. package/dist/api/container/v1beta1/index.gen.js +0 -5
  44. package/dist/api/container/v1beta1/marshalling.gen.js +0 -330
  45. package/dist/api/document_db/index.js +0 -2
  46. package/dist/api/document_db/v1beta1/api.gen.js +0 -830
  47. package/dist/api/document_db/v1beta1/content.gen.js +0 -19
  48. package/dist/api/document_db/v1beta1/index.gen.js +0 -7
  49. package/dist/api/document_db/v1beta1/marshalling.gen.js +0 -580
  50. package/dist/api/document_db/v1beta1/validation-rules.gen.js +0 -10
  51. package/dist/api/domain/index.js +0 -2
  52. package/dist/api/domain/v2beta1/api.gen.js +0 -875
  53. package/dist/api/domain/v2beta1/content.gen.js +0 -28
  54. package/dist/api/domain/v2beta1/index.gen.js +0 -7
  55. package/dist/api/domain/v2beta1/marshalling.gen.js +0 -958
  56. package/dist/api/flexibleip/index.js +0 -2
  57. package/dist/api/flexibleip/v1alpha1/api.gen.js +0 -203
  58. package/dist/api/flexibleip/v1alpha1/content.gen.js +0 -10
  59. package/dist/api/flexibleip/v1alpha1/index.gen.js +0 -7
  60. package/dist/api/flexibleip/v1alpha1/marshalling.gen.js +0 -97
  61. package/dist/api/flexibleip/v1alpha1/validation-rules.gen.js +0 -14
  62. package/dist/api/function/index.js +0 -2
  63. package/dist/api/function/v1beta1/api.gen.js +0 -560
  64. package/dist/api/function/v1beta1/content.gen.js +0 -22
  65. package/dist/api/function/v1beta1/index.gen.js +0 -5
  66. package/dist/api/function/v1beta1/marshalling.gen.js +0 -368
  67. package/dist/api/iam/index.js +0 -2
  68. package/dist/api/iam/v1alpha1/api.gen.js +0 -799
  69. package/dist/api/iam/v1alpha1/index.gen.js +0 -6
  70. package/dist/api/iam/v1alpha1/marshalling.gen.js +0 -373
  71. package/dist/api/iam/v1alpha1/validation-rules.gen.js +0 -207
  72. package/dist/api/instance/index.js +0 -2
  73. package/dist/api/instance/v1/api.gen.js +0 -1003
  74. package/dist/api/instance/v1/api.utils.js +0 -369
  75. package/dist/api/instance/v1/content.gen.js +0 -31
  76. package/dist/api/instance/v1/index.js +0 -2
  77. package/dist/api/instance/v1/marshalling.gen.js +0 -1206
  78. package/dist/api/instance/v1/marshalling.utils.js +0 -63
  79. package/dist/api/iot/index.js +0 -2
  80. package/dist/api/iot/v1/api.gen.js +0 -581
  81. package/dist/api/iot/v1/content.gen.js +0 -7
  82. package/dist/api/iot/v1/index.gen.js +0 -5
  83. package/dist/api/iot/v1/marshalling.gen.js +0 -388
  84. package/dist/api/ipfs/index.js +0 -2
  85. package/dist/api/ipfs/v1alpha1/api.gen.js +0 -197
  86. package/dist/api/ipfs/v1alpha1/content.gen.js +0 -7
  87. package/dist/api/ipfs/v1alpha1/index.gen.js +0 -5
  88. package/dist/api/ipfs/v1alpha1/marshalling.gen.js +0 -121
  89. package/dist/api/k8s/index.js +0 -2
  90. package/dist/api/k8s/v1/api.gen.js +0 -454
  91. package/dist/api/k8s/v1/api.utils.js +0 -13
  92. package/dist/api/k8s/v1/content.gen.js +0 -13
  93. package/dist/api/k8s/v1/index.js +0 -4
  94. package/dist/api/k8s/v1/marshalling.gen.js +0 -333
  95. package/dist/api/k8s/v1/validation-rules.gen.js +0 -101
  96. package/dist/api/lb/index.js +0 -2
  97. package/dist/api/lb/v1/api.gen.js +0 -1669
  98. package/dist/api/lb/v1/api.utils.js +0 -81
  99. package/dist/api/lb/v1/content.gen.js +0 -16
  100. package/dist/api/lb/v1/index.js +0 -2
  101. package/dist/api/lb/v1/marshalling.gen.js +0 -923
  102. package/dist/api/marketplace/index.js +0 -4
  103. package/dist/api/marketplace/v1/api.gen.js +0 -60
  104. package/dist/api/marketplace/v1/index.gen.js +0 -4
  105. package/dist/api/marketplace/v1/marshalling.gen.js +0 -92
  106. package/dist/api/marketplace/v2/api.gen.js +0 -162
  107. package/dist/api/marketplace/v2/index.gen.js +0 -4
  108. package/dist/api/marketplace/v2/marshalling.gen.js +0 -94
  109. package/dist/api/mnq/index.js +0 -2
  110. package/dist/api/mnq/v1alpha1/api.gen.js +0 -205
  111. package/dist/api/mnq/v1alpha1/index.gen.js +0 -4
  112. package/dist/api/mnq/v1alpha1/marshalling.gen.js +0 -121
  113. package/dist/api/rdb/index.js +0 -2
  114. package/dist/api/rdb/v1/api.gen.js +0 -972
  115. package/dist/api/rdb/v1/content.gen.js +0 -22
  116. package/dist/api/rdb/v1/index.gen.js +0 -7
  117. package/dist/api/rdb/v1/marshalling.gen.js +0 -636
  118. package/dist/api/rdb/v1/validation-rules.gen.js +0 -10
  119. package/dist/api/redis/index.js +0 -2
  120. package/dist/api/redis/v1/api.gen.js +0 -389
  121. package/dist/api/redis/v1/content.gen.js +0 -7
  122. package/dist/api/redis/v1/index.gen.js +0 -5
  123. package/dist/api/redis/v1/marshalling.gen.js +0 -259
  124. package/dist/api/registry/index.js +0 -2
  125. package/dist/api/registry/v1/api.gen.js +0 -252
  126. package/dist/api/registry/v1/content.gen.js +0 -13
  127. package/dist/api/registry/v1/index.gen.js +0 -5
  128. package/dist/api/registry/v1/marshalling.gen.js +0 -106
  129. package/dist/api/secret/index.js +0 -2
  130. package/dist/api/secret/v1alpha1/api.gen.js +0 -415
  131. package/dist/api/secret/v1alpha1/index.gen.js +0 -4
  132. package/dist/api/secret/v1alpha1/marshalling.gen.js +0 -143
  133. package/dist/api/tem/index.js +0 -2
  134. package/dist/api/tem/v1alpha1/api.gen.js +0 -229
  135. package/dist/api/tem/v1alpha1/content.gen.js +0 -10
  136. package/dist/api/tem/v1alpha1/index.gen.js +0 -5
  137. package/dist/api/tem/v1alpha1/marshalling.gen.js +0 -159
  138. package/dist/api/test/index.js +0 -2
  139. package/dist/api/test/v1/api.gen.js +0 -152
  140. package/dist/api/test/v1/content.gen.js +0 -7
  141. package/dist/api/test/v1/index.gen.js +0 -5
  142. package/dist/api/test/v1/marshalling.gen.js +0 -79
  143. package/dist/api/vpc/index.js +0 -4
  144. package/dist/api/vpc/v1/api.gen.js +0 -110
  145. package/dist/api/vpc/v1/index.gen.js +0 -4
  146. package/dist/api/vpc/v1/marshalling.gen.js +0 -44
  147. package/dist/api/vpc/v2/api.gen.js +0 -276
  148. package/dist/api/vpc/v2/index.gen.js +0 -4
  149. package/dist/api/vpc/v2/marshalling.gen.js +0 -135
  150. package/dist/api/vpcgw/index.js +0 -2
  151. package/dist/api/vpcgw/v1/api.gen.js +0 -669
  152. package/dist/api/vpcgw/v1/content.gen.js +0 -10
  153. package/dist/api/vpcgw/v1/index.gen.js +0 -5
  154. package/dist/api/vpcgw/v1/marshalling.gen.js +0 -336
  155. package/dist/api/webhosting/index.js +0 -2
  156. package/dist/api/webhosting/v1alpha1/api.gen.js +0 -210
  157. package/dist/api/webhosting/v1alpha1/content.gen.js +0 -7
  158. package/dist/api/webhosting/v1alpha1/index.gen.js +0 -7
  159. package/dist/api/webhosting/v1alpha1/marshalling.gen.js +0 -173
  160. package/dist/api/webhosting/v1alpha1/validation-rules.gen.js +0 -23
  161. package/dist/helpers/is-browser.js +0 -5
  162. package/dist/helpers/is-response.js +0 -10
  163. package/dist/helpers/json.js +0 -11
  164. package/dist/helpers/marshalling.js +0 -130
  165. package/dist/index.cjs +0 -24364
  166. package/dist/index.d.ts +0 -27584
  167. package/dist/index.js +0 -69
  168. package/dist/internal/async/interval-retrier.js +0 -105
  169. package/dist/internal/async/sleep.js +0 -13
  170. package/dist/internal/interceptors/composer.js +0 -46
  171. package/dist/internal/interceptors/helpers.js +0 -32
  172. package/dist/internal/logger/console-logger.js +0 -38
  173. package/dist/internal/logger/index.js +0 -41
  174. package/dist/internal/logger/level-resolver.js +0 -13
  175. package/dist/internal/validations/string-validation.js +0 -38
  176. package/dist/node_modules/.pnpm/@scaleway_random-name@4.0.2/node_modules/@scaleway/random-name/dist/index.js +0 -13
  177. package/dist/scw/api.js +0 -12
  178. package/dist/scw/auth.js +0 -68
  179. package/dist/scw/client-ini-factory.js +0 -174
  180. package/dist/scw/client-ini-profile.js +0 -54
  181. package/dist/scw/client-settings.js +0 -78
  182. package/dist/scw/client.js +0 -98
  183. package/dist/scw/constants.js +0 -4
  184. package/dist/scw/custom-marshalling.js +0 -131
  185. package/dist/scw/errors/error-parser.js +0 -107
  186. package/dist/scw/errors/non-standard/invalid-request-mapper.js +0 -36
  187. package/dist/scw/errors/non-standard/unknown-resource-mapper.js +0 -27
  188. package/dist/scw/errors/scw-error.js +0 -66
  189. package/dist/scw/errors/standard/already-exists-error.js +0 -26
  190. package/dist/scw/errors/standard/denied-authentication-error.js +0 -52
  191. package/dist/scw/errors/standard/index.js +0 -13
  192. package/dist/scw/errors/standard/invalid-arguments-error.js +0 -67
  193. package/dist/scw/errors/standard/out-of-stock-error.js +0 -22
  194. package/dist/scw/errors/standard/permissions-denied-error.js +0 -48
  195. package/dist/scw/errors/standard/precondition-failed-error.js +0 -42
  196. package/dist/scw/errors/standard/quotas-exceeded-error.js +0 -68
  197. package/dist/scw/errors/standard/resource-expired-error.js +0 -26
  198. package/dist/scw/errors/standard/resource-locked-error.js +0 -25
  199. package/dist/scw/errors/standard/resource-not-found-error.js +0 -25
  200. package/dist/scw/errors/standard/too-many-requests-error.js +0 -70
  201. package/dist/scw/errors/standard/transient-state-error.js +0 -26
  202. package/dist/scw/errors/types.js +0 -23
  203. package/dist/scw/fetch/build-fetcher.js +0 -72
  204. package/dist/scw/fetch/http-dumper.js +0 -54
  205. package/dist/scw/fetch/http-interceptors.js +0 -99
  206. package/dist/scw/fetch/resource-paginator.js +0 -84
  207. package/dist/scw/fetch/response-parser.js +0 -72
  208. package/node_modules/@scaleway/random-name/.npmignore +0 -4
  209. package/node_modules/@scaleway/random-name/CHANGELOG.md +0 -129
  210. package/node_modules/@scaleway/random-name/LICENSE.md +0 -21
  211. package/node_modules/@scaleway/random-name/README.md +0 -26
  212. package/node_modules/@scaleway/random-name/dist/index.d.ts +0 -3
  213. package/node_modules/@scaleway/random-name/dist/index.js +0 -13
  214. package/node_modules/@scaleway/random-name/package.json +0 -23
@@ -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 };