@scaleway/sdk 0.1.0-beta.18 → 0.1.0-beta.19
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.
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import randomName from '../../../node_modules/.pnpm/@scaleway_random-name@3.0.2/node_modules/@scaleway/random-name/dist/index.js';
|
|
1
2
|
import { isJSONObject } from '../../../helpers/json.js';
|
|
2
3
|
import { unmarshalDate, unmarshalArrayOfObject, resolveOneOf } from '../../../helpers/marshalling.js';
|
|
3
4
|
|
|
@@ -124,7 +125,7 @@ const marshalPermissions = (request, defaults) => ({
|
|
|
124
125
|
can_receive: request.canReceive
|
|
125
126
|
});
|
|
126
127
|
const marshalCreateCredentialRequest = (request, defaults) => ({
|
|
127
|
-
name: request.name,
|
|
128
|
+
name: request.name || randomName('mnq'),
|
|
128
129
|
namespace_id: request.namespaceId,
|
|
129
130
|
...resolveOneOf([{
|
|
130
131
|
param: 'permissions',
|
|
@@ -132,7 +133,7 @@ const marshalCreateCredentialRequest = (request, defaults) => ({
|
|
|
132
133
|
}])
|
|
133
134
|
});
|
|
134
135
|
const marshalCreateNamespaceRequest = (request, defaults) => ({
|
|
135
|
-
name: request.name,
|
|
136
|
+
name: request.name || randomName('mnq'),
|
|
136
137
|
project_id: request.projectId ?? defaults.defaultProjectId,
|
|
137
138
|
protocol: request.protocol
|
|
138
139
|
});
|
package/dist/index.cjs
CHANGED
|
@@ -364,7 +364,7 @@ const assertValidSettings = obj => {
|
|
|
364
364
|
if (typeof obj.userAgent !== 'string') throw new Error(`Invalid User-Agent`);
|
|
365
365
|
};
|
|
366
366
|
|
|
367
|
-
const version = 'v0.1.0-beta.
|
|
367
|
+
const version = 'v0.1.0-beta.18';
|
|
368
368
|
const userAgent = `scaleway-sdk-js/${version}`;
|
|
369
369
|
|
|
370
370
|
const isBrowser = () => typeof window !== 'undefined' && typeof window.document !== 'undefined';
|
|
@@ -14552,7 +14552,7 @@ const marshalPermissions = (request, defaults) => ({
|
|
|
14552
14552
|
can_receive: request.canReceive
|
|
14553
14553
|
});
|
|
14554
14554
|
const marshalCreateCredentialRequest = (request, defaults) => ({
|
|
14555
|
-
name: request.name,
|
|
14555
|
+
name: request.name || randomName('mnq'),
|
|
14556
14556
|
namespace_id: request.namespaceId,
|
|
14557
14557
|
...resolveOneOf([{
|
|
14558
14558
|
param: 'permissions',
|
|
@@ -14560,7 +14560,7 @@ const marshalCreateCredentialRequest = (request, defaults) => ({
|
|
|
14560
14560
|
}])
|
|
14561
14561
|
});
|
|
14562
14562
|
const marshalCreateNamespaceRequest$1 = (request, defaults) => ({
|
|
14563
|
-
name: request.name,
|
|
14563
|
+
name: request.name || randomName('mnq'),
|
|
14564
14564
|
project_id: request.projectId ?? defaults.defaultProjectId,
|
|
14565
14565
|
protocol: request.protocol
|
|
14566
14566
|
});
|
|
@@ -14582,7 +14582,7 @@ const jsonContentHeaders$8 = {
|
|
|
14582
14582
|
};
|
|
14583
14583
|
|
|
14584
14584
|
/**
|
|
14585
|
-
* MnQ API.
|
|
14585
|
+
* MnQ API (beta).
|
|
14586
14586
|
*
|
|
14587
14587
|
* This API allows you to manage Messaging or Queueing brokers.
|
|
14588
14588
|
*/
|
package/dist/index.d.ts
CHANGED
|
@@ -16048,156 +16048,241 @@ declare namespace index$h {
|
|
|
16048
16048
|
declare type ListCredentialsRequestOrderBy = 'id_asc' | 'id_desc' | 'name_asc' | 'name_desc';
|
|
16049
16049
|
declare type ListNamespacesRequestOrderBy$1 = 'created_at_asc' | 'created_at_desc' | 'updated_at_asc' | 'updated_at_desc' | 'id_asc' | 'id_desc' | 'name_asc' | 'name_desc' | 'project_id_asc' | 'project_id_desc';
|
|
16050
16050
|
declare type NamespaceProtocol = 'unknown' | 'nats' | 'sqs_sns' | 'amqp';
|
|
16051
|
+
/** Credential */
|
|
16051
16052
|
interface Credential {
|
|
16053
|
+
/** Credential ID */
|
|
16052
16054
|
id: string;
|
|
16055
|
+
/** Credential name */
|
|
16053
16056
|
name: string;
|
|
16057
|
+
/** Namespace containing the Credential */
|
|
16054
16058
|
namespaceId: string;
|
|
16059
|
+
/** Protocol associated to the Credential */
|
|
16055
16060
|
protocol: NamespaceProtocol;
|
|
16056
16061
|
/**
|
|
16062
|
+
* Credentials file used to connect to the NATS service.
|
|
16063
|
+
*
|
|
16057
16064
|
* One-of ('credentialType'): at most one of 'natsCredentials',
|
|
16058
16065
|
* 'sqsSnsCredentials', 'amqpCredentials' could be set.
|
|
16059
16066
|
*/
|
|
16060
16067
|
natsCredentials?: CredentialNATSCredsFile;
|
|
16061
16068
|
/**
|
|
16069
|
+
* Credential used to connect to the SQS/SNS service.
|
|
16070
|
+
*
|
|
16062
16071
|
* One-of ('credentialType'): at most one of 'natsCredentials',
|
|
16063
16072
|
* 'sqsSnsCredentials', 'amqpCredentials' could be set.
|
|
16064
16073
|
*/
|
|
16065
16074
|
sqsSnsCredentials?: CredentialSQSSNSCreds;
|
|
16066
16075
|
/**
|
|
16076
|
+
* Credential used to connect to the AMQP service.
|
|
16077
|
+
*
|
|
16067
16078
|
* One-of ('credentialType'): at most one of 'natsCredentials',
|
|
16068
16079
|
* 'sqsSnsCredentials', 'amqpCredentials' could be set.
|
|
16069
16080
|
*/
|
|
16070
16081
|
amqpCredentials?: CredentialAMQPCreds;
|
|
16071
16082
|
}
|
|
16083
|
+
/** Credential.amqp creds */
|
|
16072
16084
|
interface CredentialAMQPCreds {
|
|
16085
|
+
/** Username used to connect to the AMQP service */
|
|
16073
16086
|
username: string;
|
|
16087
|
+
/** Password used to connect to the AMQP service */
|
|
16074
16088
|
password?: string;
|
|
16089
|
+
/** List of permissions associated to this Credential */
|
|
16075
16090
|
permissions?: Permissions;
|
|
16076
16091
|
}
|
|
16092
|
+
/** Credential.nats creds file */
|
|
16077
16093
|
interface CredentialNATSCredsFile {
|
|
16094
|
+
/** Raw content of the NATS credentials file */
|
|
16078
16095
|
content: string;
|
|
16079
16096
|
}
|
|
16097
|
+
/** Credential.sqssns creds */
|
|
16080
16098
|
interface CredentialSQSSNSCreds {
|
|
16099
|
+
/** ID of the key */
|
|
16081
16100
|
accessKey: string;
|
|
16101
|
+
/** Secret value of the key */
|
|
16082
16102
|
secretKey?: string;
|
|
16103
|
+
/** List of permissions associated to this Credential */
|
|
16083
16104
|
permissions?: Permissions;
|
|
16084
16105
|
}
|
|
16106
|
+
/** Credential summary */
|
|
16085
16107
|
interface CredentialSummary {
|
|
16108
|
+
/** Credential ID */
|
|
16086
16109
|
id: string;
|
|
16110
|
+
/** Credential name */
|
|
16087
16111
|
name: string;
|
|
16112
|
+
/** Namespace containing the Credential */
|
|
16088
16113
|
namespaceId: string;
|
|
16114
|
+
/** Protocol associated to the Credential */
|
|
16089
16115
|
protocol: NamespaceProtocol;
|
|
16090
16116
|
/**
|
|
16117
|
+
* Credential used to connect to the SQS/SNS service.
|
|
16118
|
+
*
|
|
16091
16119
|
* One-of ('credentialType'): at most one of 'sqsSnsCredentials',
|
|
16092
16120
|
* 'amqpCredentials' could be set.
|
|
16093
16121
|
*/
|
|
16094
16122
|
sqsSnsCredentials?: CredentialSummarySQSSNSCreds;
|
|
16095
16123
|
/**
|
|
16124
|
+
* Credential used to connect to the AMQP service.
|
|
16125
|
+
*
|
|
16096
16126
|
* One-of ('credentialType'): at most one of 'sqsSnsCredentials',
|
|
16097
16127
|
* 'amqpCredentials' could be set.
|
|
16098
16128
|
*/
|
|
16099
16129
|
amqpCredentials?: CredentialSummaryAMQPCreds;
|
|
16100
16130
|
}
|
|
16131
|
+
/** Credential summary.amqp creds */
|
|
16101
16132
|
interface CredentialSummaryAMQPCreds {
|
|
16133
|
+
/** Username used to connect to the AMQP service */
|
|
16102
16134
|
username: string;
|
|
16135
|
+
/** List of permissions associated to this Credential */
|
|
16103
16136
|
permissions?: Permissions;
|
|
16104
16137
|
}
|
|
16138
|
+
/** Credential summary.sqssns creds */
|
|
16105
16139
|
interface CredentialSummarySQSSNSCreds {
|
|
16140
|
+
/** ID of the key */
|
|
16106
16141
|
accessKey: string;
|
|
16142
|
+
/** List of permissions associated to this Credential */
|
|
16107
16143
|
permissions?: Permissions;
|
|
16108
16144
|
}
|
|
16145
|
+
/** List credentials response */
|
|
16109
16146
|
interface ListCredentialsResponse {
|
|
16147
|
+
/** Total number of existing Credentials */
|
|
16110
16148
|
totalCount: number;
|
|
16149
|
+
/** A page of Credentials */
|
|
16111
16150
|
credentials: Array<CredentialSummary>;
|
|
16112
16151
|
}
|
|
16152
|
+
/** List namespaces response */
|
|
16113
16153
|
interface ListNamespacesResponse$1 {
|
|
16154
|
+
/** Total number of existing Namespaces */
|
|
16114
16155
|
totalCount: number;
|
|
16156
|
+
/** A page of Namespaces */
|
|
16115
16157
|
namespaces: Array<Namespace$1>;
|
|
16116
16158
|
}
|
|
16159
|
+
/** Namespace */
|
|
16117
16160
|
interface Namespace$1 {
|
|
16161
|
+
/** Namespace ID */
|
|
16118
16162
|
id: string;
|
|
16119
|
-
|
|
16163
|
+
/** Namespace name */
|
|
16120
16164
|
name: string;
|
|
16165
|
+
/** Endpoint of the service matching the Namespace protocol */
|
|
16121
16166
|
endpoint: string;
|
|
16167
|
+
/** Namespace protocol */
|
|
16122
16168
|
protocol: NamespaceProtocol;
|
|
16169
|
+
/** Project containing the Namespace */
|
|
16170
|
+
projectId: string;
|
|
16171
|
+
/** Region where the Namespace is deployed */
|
|
16172
|
+
region: Region;
|
|
16173
|
+
/** Namespace creation date */
|
|
16123
16174
|
createdAt?: Date;
|
|
16175
|
+
/** Namespace last modification date */
|
|
16124
16176
|
updatedAt?: Date;
|
|
16125
|
-
region: Region;
|
|
16126
16177
|
}
|
|
16178
|
+
/** Permissions */
|
|
16127
16179
|
interface Permissions {
|
|
16180
|
+
/** Defines if user can publish messages to the service */
|
|
16128
16181
|
canPublish?: boolean;
|
|
16182
|
+
/** Defines if user can receive messages from the service */
|
|
16129
16183
|
canReceive?: boolean;
|
|
16184
|
+
/** Defines if user can manage the associated resource(s) */
|
|
16130
16185
|
canManage?: boolean;
|
|
16131
16186
|
}
|
|
16132
16187
|
declare type ListNamespacesRequest$1 = {
|
|
16133
16188
|
/** Region to target. If none is passed will use default region from the config */
|
|
16134
16189
|
region?: Region;
|
|
16190
|
+
/** Will list only the Namespaces owned by the specified organization */
|
|
16191
|
+
organizationId?: string;
|
|
16192
|
+
/** Will list only the Namespaces contained into the specified project */
|
|
16135
16193
|
projectId?: string;
|
|
16194
|
+
/** Indicate the page number of results to be returned */
|
|
16136
16195
|
page?: number;
|
|
16196
|
+
/** Maximum number of results returned by page */
|
|
16137
16197
|
pageSize?: number;
|
|
16198
|
+
/** Field used for sorting results */
|
|
16138
16199
|
orderBy?: ListNamespacesRequestOrderBy$1;
|
|
16139
|
-
organizationId?: string;
|
|
16140
16200
|
};
|
|
16141
16201
|
declare type CreateNamespaceRequest$1 = {
|
|
16142
16202
|
/** Region to target. If none is passed will use default region from the config */
|
|
16143
16203
|
region?: Region;
|
|
16144
|
-
name
|
|
16145
|
-
|
|
16204
|
+
/** Namespace name */
|
|
16205
|
+
name?: string;
|
|
16206
|
+
/** Namespace protocol */
|
|
16146
16207
|
protocol: NamespaceProtocol;
|
|
16208
|
+
/** Project containing the Namespace */
|
|
16209
|
+
projectId?: string;
|
|
16147
16210
|
};
|
|
16148
16211
|
declare type UpdateNamespaceRequest$1 = {
|
|
16149
16212
|
/** Region to target. If none is passed will use default region from the config */
|
|
16150
16213
|
region?: Region;
|
|
16214
|
+
/** ID of the Namespace to update */
|
|
16151
16215
|
namespaceId: string;
|
|
16216
|
+
/** Namespace name */
|
|
16152
16217
|
name?: string;
|
|
16153
16218
|
};
|
|
16154
16219
|
declare type GetNamespaceRequest$1 = {
|
|
16155
16220
|
/** Region to target. If none is passed will use default region from the config */
|
|
16156
16221
|
region?: Region;
|
|
16222
|
+
/** ID of the Namespace to get */
|
|
16157
16223
|
namespaceId: string;
|
|
16158
16224
|
};
|
|
16159
16225
|
declare type DeleteNamespaceRequest$1 = {
|
|
16160
16226
|
/** Region to target. If none is passed will use default region from the config */
|
|
16161
16227
|
region?: Region;
|
|
16228
|
+
/** ID of the Namespace to delete */
|
|
16162
16229
|
namespaceId: string;
|
|
16163
16230
|
};
|
|
16164
16231
|
declare type CreateCredentialRequest = {
|
|
16165
16232
|
/** Region to target. If none is passed will use default region from the config */
|
|
16166
16233
|
region?: Region;
|
|
16167
|
-
|
|
16234
|
+
/** Namespace containing the Credential */
|
|
16168
16235
|
namespaceId: string;
|
|
16169
|
-
/**
|
|
16236
|
+
/** Credential name */
|
|
16237
|
+
name?: string;
|
|
16238
|
+
/**
|
|
16239
|
+
* List of permissions associated to this Credential.
|
|
16240
|
+
*
|
|
16241
|
+
* One-of ('optionalPermissions'): at most one of 'permissions' could be set.
|
|
16242
|
+
*/
|
|
16170
16243
|
permissions?: Permissions;
|
|
16171
16244
|
};
|
|
16172
16245
|
declare type DeleteCredentialRequest = {
|
|
16173
16246
|
/** Region to target. If none is passed will use default region from the config */
|
|
16174
16247
|
region?: Region;
|
|
16248
|
+
/** ID of the Credential to delete */
|
|
16175
16249
|
credentialId: string;
|
|
16176
16250
|
};
|
|
16177
16251
|
declare type ListCredentialsRequest = {
|
|
16178
16252
|
/** Region to target. If none is passed will use default region from the config */
|
|
16179
16253
|
region?: Region;
|
|
16254
|
+
/** Namespace containing the Credential */
|
|
16180
16255
|
namespaceId?: string;
|
|
16256
|
+
/** Indicate the page number of results to be returned */
|
|
16181
16257
|
page?: number;
|
|
16258
|
+
/** Maximum number of results returned by page */
|
|
16182
16259
|
pageSize?: number;
|
|
16260
|
+
/** Field used for sorting results */
|
|
16183
16261
|
orderBy?: ListCredentialsRequestOrderBy;
|
|
16184
16262
|
};
|
|
16185
16263
|
declare type UpdateCredentialRequest = {
|
|
16186
16264
|
/** Region to target. If none is passed will use default region from the config */
|
|
16187
16265
|
region?: Region;
|
|
16266
|
+
/** ID of the Credential to update */
|
|
16188
16267
|
credentialId: string;
|
|
16268
|
+
/** Credential name */
|
|
16189
16269
|
name?: string;
|
|
16190
|
-
/**
|
|
16270
|
+
/**
|
|
16271
|
+
* List of permissions associated to this Credential.
|
|
16272
|
+
*
|
|
16273
|
+
* One-of ('optionalPermissions'): at most one of 'permissions' could be set.
|
|
16274
|
+
*/
|
|
16191
16275
|
permissions?: Permissions;
|
|
16192
16276
|
};
|
|
16193
16277
|
declare type GetCredentialRequest = {
|
|
16194
16278
|
/** Region to target. If none is passed will use default region from the config */
|
|
16195
16279
|
region?: Region;
|
|
16280
|
+
/** ID of the Credential to get */
|
|
16196
16281
|
credentialId: string;
|
|
16197
16282
|
};
|
|
16198
16283
|
|
|
16199
16284
|
/**
|
|
16200
|
-
* MnQ API.
|
|
16285
|
+
* MnQ API (beta).
|
|
16201
16286
|
*
|
|
16202
16287
|
* This API allows you to manage Messaging or Queueing brokers.
|
|
16203
16288
|
*/
|
package/dist/scw/constants.js
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@scaleway/sdk",
|
|
3
|
-
"version": "0.1.0-beta.
|
|
3
|
+
"version": "0.1.0-beta.19",
|
|
4
4
|
"license": "Apache-2.0",
|
|
5
5
|
"description": "Scaleway SDK.",
|
|
6
6
|
"keywords": [
|
|
@@ -36,5 +36,5 @@
|
|
|
36
36
|
"bundledDependencies": [
|
|
37
37
|
"@scaleway/random-name"
|
|
38
38
|
],
|
|
39
|
-
"gitHead": "
|
|
39
|
+
"gitHead": "6263e5f9c6940de277e56e21aba557bdd92a8c0a"
|
|
40
40
|
}
|