@wix/secrets 1.0.14 → 1.0.16
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.
- package/build/cjs/context.d.ts +1 -0
- package/build/cjs/context.js +28 -0
- package/build/cjs/context.js.map +1 -0
- package/build/cjs/index.js +5 -1
- package/build/cjs/index.js.map +1 -1
- package/build/cjs/index.typings.js +5 -1
- package/build/cjs/index.typings.js.map +1 -1
- package/build/cjs/meta.js +5 -1
- package/build/cjs/meta.js.map +1 -1
- package/build/cjs/src/velo-secrets-vault-v1-secret.context.d.ts +7 -0
- package/build/cjs/src/velo-secrets-vault-v1-secret.context.js +60 -0
- package/build/cjs/src/velo-secrets-vault-v1-secret.context.js.map +1 -0
- package/build/cjs/src/velo-secrets-vault-v1-secret.http.js +30 -48
- package/build/cjs/src/velo-secrets-vault-v1-secret.http.js.map +1 -1
- package/build/cjs/src/velo-secrets-vault-v1-secret.meta.d.ts +1 -1
- package/build/cjs/src/velo-secrets-vault-v1-secret.meta.js +5 -1
- package/build/cjs/src/velo-secrets-vault-v1-secret.meta.js.map +1 -1
- package/build/cjs/src/velo-secrets-vault-v1-secret.public.d.ts +1 -1
- package/build/cjs/src/velo-secrets-vault-v1-secret.types.d.ts +67 -0
- package/build/cjs/src/velo-secrets-vault-v1-secret.universal.d.ts +82 -6
- package/build/cjs/src/velo-secrets-vault-v1-secret.universal.js +48 -35
- package/build/cjs/src/velo-secrets-vault-v1-secret.universal.js.map +1 -1
- package/build/es/context.d.ts +1 -0
- package/build/es/context.js +2 -0
- package/build/es/context.js.map +1 -0
- package/build/es/src/velo-secrets-vault-v1-secret.context.d.ts +7 -0
- package/build/es/src/velo-secrets-vault-v1-secret.context.js +52 -0
- package/build/es/src/velo-secrets-vault-v1-secret.context.js.map +1 -0
- package/build/es/src/velo-secrets-vault-v1-secret.http.js +30 -48
- package/build/es/src/velo-secrets-vault-v1-secret.http.js.map +1 -1
- package/build/es/src/velo-secrets-vault-v1-secret.meta.d.ts +1 -1
- package/build/es/src/velo-secrets-vault-v1-secret.public.d.ts +1 -1
- package/build/es/src/velo-secrets-vault-v1-secret.types.d.ts +67 -0
- package/build/es/src/velo-secrets-vault-v1-secret.universal.d.ts +82 -6
- package/build/es/src/velo-secrets-vault-v1-secret.universal.js +43 -34
- package/build/es/src/velo-secrets-vault-v1-secret.universal.js.map +1 -1
- package/context/package.json +6 -0
- package/package.json +10 -4
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * as secrets from './src/velo-secrets-vault-v1-secret.context';
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
14
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
15
|
+
}) : function(o, v) {
|
|
16
|
+
o["default"] = v;
|
|
17
|
+
});
|
|
18
|
+
var __importStar = (this && this.__importStar) || function (mod) {
|
|
19
|
+
if (mod && mod.__esModule) return mod;
|
|
20
|
+
var result = {};
|
|
21
|
+
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
|
22
|
+
__setModuleDefault(result, mod);
|
|
23
|
+
return result;
|
|
24
|
+
};
|
|
25
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
26
|
+
exports.secrets = void 0;
|
|
27
|
+
exports.secrets = __importStar(require("./src/velo-secrets-vault-v1-secret.context"));
|
|
28
|
+
//# sourceMappingURL=context.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"context.js","sourceRoot":"","sources":["../../context.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,sFAAsE"}
|
package/build/cjs/index.js
CHANGED
|
@@ -1,7 +1,11 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
3
|
if (k2 === undefined) k2 = k;
|
|
4
|
-
Object.
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
5
9
|
}) : (function(o, m, k, k2) {
|
|
6
10
|
if (k2 === undefined) k2 = k;
|
|
7
11
|
o[k2] = m[k];
|
package/build/cjs/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../index.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,qFAAqE"}
|
|
@@ -1,7 +1,11 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
3
|
if (k2 === undefined) k2 = k;
|
|
4
|
-
Object.
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
5
9
|
}) : (function(o, m, k, k2) {
|
|
6
10
|
if (k2 === undefined) k2 = k;
|
|
7
11
|
o[k2] = m[k];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.typings.js","sourceRoot":"","sources":["../../index.typings.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.typings.js","sourceRoot":"","sources":["../../index.typings.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,wFAAwE"}
|
package/build/cjs/meta.js
CHANGED
|
@@ -1,7 +1,11 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
3
|
if (k2 === undefined) k2 = k;
|
|
4
|
-
Object.
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
5
9
|
}) : (function(o, m, k, k2) {
|
|
6
10
|
if (k2 === undefined) k2 = k;
|
|
7
11
|
o[k2] = m[k];
|
package/build/cjs/meta.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"meta.js","sourceRoot":"","sources":["../../meta.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"meta.js","sourceRoot":"","sources":["../../meta.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,mFAAmE"}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { getSecretValue as publicGetSecretValue, listSecretInfo as publicListSecretInfo, createSecret as publicCreateSecret, deleteSecret as publicDeleteSecret, updateSecret as publicUpdateSecret } from './velo-secrets-vault-v1-secret.public';
|
|
2
|
+
import { BuildRESTFunction } from '@wix/sdk-types';
|
|
3
|
+
export declare const getSecretValue: BuildRESTFunction<typeof publicGetSecretValue>;
|
|
4
|
+
export declare const listSecretInfo: BuildRESTFunction<typeof publicListSecretInfo>;
|
|
5
|
+
export declare const createSecret: BuildRESTFunction<typeof publicCreateSecret>;
|
|
6
|
+
export declare const deleteSecret: BuildRESTFunction<typeof publicDeleteSecret>;
|
|
7
|
+
export declare const updateSecret: BuildRESTFunction<typeof publicUpdateSecret>;
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.updateSecret = exports.deleteSecret = exports.createSecret = exports.listSecretInfo = exports.getSecretValue = void 0;
|
|
4
|
+
const velo_secrets_vault_v1_secret_public_1 = require("./velo-secrets-vault-v1-secret.public");
|
|
5
|
+
const getSecretValue = (...args) => {
|
|
6
|
+
// @ts-expect-error
|
|
7
|
+
if (!globalThis.__wix_context__) {
|
|
8
|
+
throw new Error('Wix context is not available. Make sure to initialize the Wix context before using SDK modules');
|
|
9
|
+
}
|
|
10
|
+
// @ts-expect-error
|
|
11
|
+
return globalThis.__wix_context__
|
|
12
|
+
.initWixModules(velo_secrets_vault_v1_secret_public_1.getSecretValue)
|
|
13
|
+
.apply(undefined, args);
|
|
14
|
+
};
|
|
15
|
+
exports.getSecretValue = getSecretValue;
|
|
16
|
+
const listSecretInfo = (...args) => {
|
|
17
|
+
// @ts-expect-error
|
|
18
|
+
if (!globalThis.__wix_context__) {
|
|
19
|
+
throw new Error('Wix context is not available. Make sure to initialize the Wix context before using SDK modules');
|
|
20
|
+
}
|
|
21
|
+
// @ts-expect-error
|
|
22
|
+
return globalThis.__wix_context__
|
|
23
|
+
.initWixModules(velo_secrets_vault_v1_secret_public_1.listSecretInfo)
|
|
24
|
+
.apply(undefined, args);
|
|
25
|
+
};
|
|
26
|
+
exports.listSecretInfo = listSecretInfo;
|
|
27
|
+
const createSecret = (...args) => {
|
|
28
|
+
// @ts-expect-error
|
|
29
|
+
if (!globalThis.__wix_context__) {
|
|
30
|
+
throw new Error('Wix context is not available. Make sure to initialize the Wix context before using SDK modules');
|
|
31
|
+
}
|
|
32
|
+
// @ts-expect-error
|
|
33
|
+
return globalThis.__wix_context__
|
|
34
|
+
.initWixModules(velo_secrets_vault_v1_secret_public_1.createSecret)
|
|
35
|
+
.apply(undefined, args);
|
|
36
|
+
};
|
|
37
|
+
exports.createSecret = createSecret;
|
|
38
|
+
const deleteSecret = (...args) => {
|
|
39
|
+
// @ts-expect-error
|
|
40
|
+
if (!globalThis.__wix_context__) {
|
|
41
|
+
throw new Error('Wix context is not available. Make sure to initialize the Wix context before using SDK modules');
|
|
42
|
+
}
|
|
43
|
+
// @ts-expect-error
|
|
44
|
+
return globalThis.__wix_context__
|
|
45
|
+
.initWixModules(velo_secrets_vault_v1_secret_public_1.deleteSecret)
|
|
46
|
+
.apply(undefined, args);
|
|
47
|
+
};
|
|
48
|
+
exports.deleteSecret = deleteSecret;
|
|
49
|
+
const updateSecret = (...args) => {
|
|
50
|
+
// @ts-expect-error
|
|
51
|
+
if (!globalThis.__wix_context__) {
|
|
52
|
+
throw new Error('Wix context is not available. Make sure to initialize the Wix context before using SDK modules');
|
|
53
|
+
}
|
|
54
|
+
// @ts-expect-error
|
|
55
|
+
return globalThis.__wix_context__
|
|
56
|
+
.initWixModules(velo_secrets_vault_v1_secret_public_1.updateSecret)
|
|
57
|
+
.apply(undefined, args);
|
|
58
|
+
};
|
|
59
|
+
exports.updateSecret = updateSecret;
|
|
60
|
+
//# sourceMappingURL=velo-secrets-vault-v1-secret.context.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"velo-secrets-vault-v1-secret.context.js","sourceRoot":"","sources":["../../../src/velo-secrets-vault-v1-secret.context.ts"],"names":[],"mappings":";;;AAAA,+FAM+C;AAGxC,MAAM,cAAc,GAAmD,CAC5E,GAAG,IAAS,EACZ,EAAE;IACF,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AC;SAClC,KAAK,CAAC,SAAS,EAAE,IAAI,CAAC,CAAC;AAC5B,CAAC,CAAC;AAbW,QAAA,YAAY,gBAavB;AACK,MAAM,YAAY,GAAiD,CACxE,GAAG,IAAS,EACZ,EAAE;IACF,mBAAmB;IACnB,IAAI,CAAC,UAAU,CAAC,eAAe,EAAE,CAAC;QAChC,MAAM,IAAI,KAAK,CACb,gGAAgG,CACjG,CAAC;IACJ,CAAC;IACD,mBAAmB;IACnB,OAAO,UAAU,CAAC,eAAe;SAC9B,cAAc,CAAC,kDAAkB,CAAC;SAClC,KAAK,CAAC,SAAS,EAAE,IAAI,CAAC,CAAC;AAC5B,CAAC,CAAC;AAbW,QAAA,YAAY,gBAavB"}
|
|
@@ -2,22 +2,10 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.partiallyUpdateSecret = exports.deleteSecret = exports.createSecret = exports.listSecretInfo = exports.getSecretValue = void 0;
|
|
4
4
|
const metro_runtime_1 = require("@wix/metro-runtime");
|
|
5
|
-
const
|
|
5
|
+
const timestamp_1 = require("@wix/sdk-runtime/transformations/timestamp");
|
|
6
|
+
const timestamp_2 = require("@wix/sdk-runtime/transformations/timestamp");
|
|
7
|
+
const transform_paths_1 = require("@wix/sdk-runtime/transformations/transform-paths");
|
|
6
8
|
const metro_runtime_2 = require("@wix/metro-runtime");
|
|
7
|
-
const _createSecretRequest = { secret: '_secret' };
|
|
8
|
-
const _createSecretResponse = {};
|
|
9
|
-
const _deleteSecretRequest = {};
|
|
10
|
-
const _deleteSecretResponse = {};
|
|
11
|
-
const _getSecretValueRequest = {};
|
|
12
|
-
const _getSecretValueResponse = {};
|
|
13
|
-
const _listSecretInfoRequest = {};
|
|
14
|
-
const _listSecretInfoResponse = { secrets: '_secret' };
|
|
15
|
-
const _secret = {
|
|
16
|
-
createdDate: 'google.protobuf.Timestamp',
|
|
17
|
-
updatedDate: 'google.protobuf.Timestamp',
|
|
18
|
-
};
|
|
19
|
-
const _updateSecretRequest = { secret: '_secret' };
|
|
20
|
-
const _updateSecretResponse = {};
|
|
21
9
|
function resolveWixVeloSecretsVaultV1SecretsVaultServiceUrl(opts) {
|
|
22
10
|
const domainToMappings = {
|
|
23
11
|
'service.wix-code.com': [
|
|
@@ -62,25 +50,20 @@ function resolveWixVeloSecretsVaultV1SecretsVaultServiceUrl(opts) {
|
|
|
62
50
|
* > Only use a secret's value in the backend code. Returning the secret value in the frontend is a security risk.
|
|
63
51
|
*/
|
|
64
52
|
function getSecretValue(payload) {
|
|
65
|
-
const { toJSON: toReq, fromJSON: fromReq } = (0, ambassador_1.serializer)(_getSecretValueRequest, {});
|
|
66
|
-
const { fromJSON: fromRes } = (0, ambassador_1.serializer)(_getSecretValueResponse, {});
|
|
67
53
|
function __getSecretValue({ host }) {
|
|
68
|
-
const serializedData = toReq(payload);
|
|
69
54
|
const metadata = {
|
|
70
55
|
entityFqdn: 'wix.velo.secrets_vault.v1.secret',
|
|
71
56
|
method: 'GET',
|
|
72
57
|
methodFqn: 'wix.velo.secrets_vault.v1.SecretsVaultService.GetSecretValue',
|
|
73
58
|
url: resolveWixVeloSecretsVaultV1SecretsVaultServiceUrl({
|
|
74
59
|
protoPath: '/api/v1/secrets/name/{name}',
|
|
75
|
-
data:
|
|
60
|
+
data: payload,
|
|
76
61
|
host,
|
|
77
62
|
}),
|
|
78
|
-
params: (0, metro_runtime_1.toURLSearchParams)(
|
|
79
|
-
transformResponse: fromRes,
|
|
63
|
+
params: (0, metro_runtime_1.toURLSearchParams)(payload),
|
|
80
64
|
};
|
|
81
65
|
return metadata;
|
|
82
66
|
}
|
|
83
|
-
__getSecretValue.fromReq = fromReq;
|
|
84
67
|
return __getSecretValue;
|
|
85
68
|
}
|
|
86
69
|
exports.getSecretValue = getSecretValue;
|
|
@@ -93,27 +76,29 @@ exports.getSecretValue = getSecretValue;
|
|
|
93
76
|
* > - The secret's value does not get returned for security reasons. To retrieve a secret's value, use the [`getSecretValue()`](#getSecretValue) function.
|
|
94
77
|
*/
|
|
95
78
|
function listSecretInfo(payload) {
|
|
96
|
-
const { toJSON: toReq, fromJSON: fromReq } = (0, ambassador_1.serializer)(_listSecretInfoRequest, {});
|
|
97
|
-
const { fromJSON: fromRes } = (0, ambassador_1.serializer)(_listSecretInfoResponse, {
|
|
98
|
-
_secret,
|
|
99
|
-
});
|
|
100
79
|
function __listSecretInfo({ host }) {
|
|
101
|
-
const serializedData = toReq(payload);
|
|
102
80
|
const metadata = {
|
|
103
81
|
entityFqdn: 'wix.velo.secrets_vault.v1.secret',
|
|
104
82
|
method: 'GET',
|
|
105
83
|
methodFqn: 'wix.velo.secrets_vault.v1.SecretsVaultService.ListSecretInfo',
|
|
106
84
|
url: resolveWixVeloSecretsVaultV1SecretsVaultServiceUrl({
|
|
107
85
|
protoPath: '/api/v1/secrets',
|
|
108
|
-
data:
|
|
86
|
+
data: payload,
|
|
109
87
|
host,
|
|
110
88
|
}),
|
|
111
|
-
params: (0, metro_runtime_1.toURLSearchParams)(
|
|
112
|
-
transformResponse:
|
|
89
|
+
params: (0, metro_runtime_1.toURLSearchParams)(payload),
|
|
90
|
+
transformResponse: (payload) => (0, transform_paths_1.transformPaths)(payload, [
|
|
91
|
+
{
|
|
92
|
+
transformFn: timestamp_2.transformRESTTimestampToSDKTimestamp,
|
|
93
|
+
paths: [
|
|
94
|
+
{ path: 'secrets.createdDate' },
|
|
95
|
+
{ path: 'secrets.updatedDate' },
|
|
96
|
+
],
|
|
97
|
+
},
|
|
98
|
+
]),
|
|
113
99
|
};
|
|
114
100
|
return metadata;
|
|
115
101
|
}
|
|
116
|
-
__listSecretInfo.fromReq = fromReq;
|
|
117
102
|
return __listSecretInfo;
|
|
118
103
|
}
|
|
119
104
|
exports.listSecretInfo = listSecretInfo;
|
|
@@ -127,10 +112,13 @@ exports.listSecretInfo = listSecretInfo;
|
|
|
127
112
|
* > - Don't leave private keys in your code. Leaving them in your code is a security risk. Make sure to delete the keys from the code after running `createSecret()`.
|
|
128
113
|
*/
|
|
129
114
|
function createSecret(payload) {
|
|
130
|
-
const { toJSON: toReq, fromJSON: fromReq } = (0, ambassador_1.serializer)(_createSecretRequest, { _secret });
|
|
131
|
-
const { fromJSON: fromRes } = (0, ambassador_1.serializer)(_createSecretResponse, {});
|
|
132
115
|
function __createSecret({ host }) {
|
|
133
|
-
const serializedData =
|
|
116
|
+
const serializedData = (0, transform_paths_1.transformPaths)(payload, [
|
|
117
|
+
{
|
|
118
|
+
transformFn: timestamp_1.transformSDKTimestampToRESTTimestamp,
|
|
119
|
+
paths: [{ path: 'secret.createdDate' }, { path: 'secret.updatedDate' }],
|
|
120
|
+
},
|
|
121
|
+
]);
|
|
134
122
|
const metadata = {
|
|
135
123
|
entityFqdn: 'wix.velo.secrets_vault.v1.secret',
|
|
136
124
|
method: 'POST',
|
|
@@ -141,11 +129,9 @@ function createSecret(payload) {
|
|
|
141
129
|
host,
|
|
142
130
|
}),
|
|
143
131
|
data: serializedData,
|
|
144
|
-
transformResponse: fromRes,
|
|
145
132
|
};
|
|
146
133
|
return metadata;
|
|
147
134
|
}
|
|
148
|
-
__createSecret.fromReq = fromReq;
|
|
149
135
|
return __createSecret;
|
|
150
136
|
}
|
|
151
137
|
exports.createSecret = createSecret;
|
|
@@ -159,25 +145,20 @@ exports.createSecret = createSecret;
|
|
|
159
145
|
*
|
|
160
146
|
*/
|
|
161
147
|
function deleteSecret(payload) {
|
|
162
|
-
const { toJSON: toReq, fromJSON: fromReq } = (0, ambassador_1.serializer)(_deleteSecretRequest, {});
|
|
163
|
-
const { fromJSON: fromRes } = (0, ambassador_1.serializer)(_deleteSecretResponse, {});
|
|
164
148
|
function __deleteSecret({ host }) {
|
|
165
|
-
const serializedData = toReq(payload);
|
|
166
149
|
const metadata = {
|
|
167
150
|
entityFqdn: 'wix.velo.secrets_vault.v1.secret',
|
|
168
151
|
method: 'DELETE',
|
|
169
152
|
methodFqn: 'wix.velo.secrets_vault.v1.SecretsVaultService.DeleteSecret',
|
|
170
153
|
url: resolveWixVeloSecretsVaultV1SecretsVaultServiceUrl({
|
|
171
154
|
protoPath: '/api/v1/secrets/{id}',
|
|
172
|
-
data:
|
|
155
|
+
data: payload,
|
|
173
156
|
host,
|
|
174
157
|
}),
|
|
175
|
-
params: (0, metro_runtime_1.toURLSearchParams)(
|
|
176
|
-
transformResponse: fromRes,
|
|
158
|
+
params: (0, metro_runtime_1.toURLSearchParams)(payload),
|
|
177
159
|
};
|
|
178
160
|
return metadata;
|
|
179
161
|
}
|
|
180
|
-
__deleteSecret.fromReq = fromReq;
|
|
181
162
|
return __deleteSecret;
|
|
182
163
|
}
|
|
183
164
|
exports.deleteSecret = deleteSecret;
|
|
@@ -195,10 +176,13 @@ exports.deleteSecret = deleteSecret;
|
|
|
195
176
|
* > - Don't leave private keys in your code! Leaving them in is a security risk. Make sure to delete the keys from the code after running `updateSecret()`.
|
|
196
177
|
*/
|
|
197
178
|
function partiallyUpdateSecret(payload) {
|
|
198
|
-
const { toJSON: toReq, fromJSON: fromReq } = (0, ambassador_1.serializer)(_updateSecretRequest, { _secret });
|
|
199
|
-
const { fromJSON: fromRes } = (0, ambassador_1.serializer)(_updateSecretResponse, {});
|
|
200
179
|
function __partiallyUpdateSecret({ host }) {
|
|
201
|
-
const serializedData =
|
|
180
|
+
const serializedData = (0, transform_paths_1.transformPaths)(payload, [
|
|
181
|
+
{
|
|
182
|
+
transformFn: timestamp_1.transformSDKTimestampToRESTTimestamp,
|
|
183
|
+
paths: [{ path: 'secret.createdDate' }, { path: 'secret.updatedDate' }],
|
|
184
|
+
},
|
|
185
|
+
]);
|
|
202
186
|
const metadata = {
|
|
203
187
|
entityFqdn: 'wix.velo.secrets_vault.v1.secret',
|
|
204
188
|
method: 'PATCH',
|
|
@@ -209,11 +193,9 @@ function partiallyUpdateSecret(payload) {
|
|
|
209
193
|
host,
|
|
210
194
|
}),
|
|
211
195
|
data: serializedData,
|
|
212
|
-
transformResponse: fromRes,
|
|
213
196
|
};
|
|
214
197
|
return metadata;
|
|
215
198
|
}
|
|
216
|
-
__partiallyUpdateSecret.fromReq = fromReq;
|
|
217
199
|
return __partiallyUpdateSecret;
|
|
218
200
|
}
|
|
219
201
|
exports.partiallyUpdateSecret = partiallyUpdateSecret;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"velo-secrets-vault-v1-secret.http.js","sourceRoot":"","sources":["../../../src/velo-secrets-vault-v1-secret.http.ts"],"names":[],"mappings":";;;AAAA,sDAAuD;AACvD,
|
|
1
|
+
{"version":3,"file":"velo-secrets-vault-v1-secret.http.js","sourceRoot":"","sources":["../../../src/velo-secrets-vault-v1-secret.http.ts"],"names":[],"mappings":";;;AAAA,sDAAuD;AACvD,0EAAkG;AAClG,0EAAkG;AAClG,sFAAkF;AAClF,sDAAgD;AAmBhD,SAAS,kDAAkD,CACzD,IAA8C;IAE9C,MAAM,gBAAgB,GAAG;QACvB,sBAAsB,EAAE;YACtB;gBACE,OAAO,EAAE,kCAAkC;gBAC3C,QAAQ,EAAE,EAAE;aACb;SACF;QACD,mBAAmB,EAAE;YACnB;gBACE,OAAO,EAAE,kCAAkC;gBAC3C,QAAQ,EAAE,EAAE;aACb;SACF;QACD,sBAAsB,EAAE;YACtB;gBACE,OAAO,EAAE,kCAAkC;gBAC3C,QAAQ,EAAE,EAAE;aACb;SACF;QACD,0BAA0B,EAAE;YAC1B;gBACE,OAAO,EAAE,kCAAkC;gBAC3C,QAAQ,EAAE,EAAE;aACb;SACF;QACD,iBAAiB,EAAE;YACjB;gBACE,OAAO,EAAE,kCAAkC;gBAC3C,QAAQ,EAAE,EAAE;aACb;SACF;KACF,CAAC;IAEF,OAAO,IAAA,0BAAU,EAAC,MAAM,CAAC,MAAM,CAAC,IAAI,EAAE,EAAE,gBAAgB,EAAE,CAAC,CAAC,CAAC;AAC/D,CAAC;AAED;;;;;;;GAOG;AACH,SAAgB,cAAc,CAC5B,OAA8B;IAI9B,SAAS,gBAAgB,CAAC,EAAE,IAAI,EAAO;QACrC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C,CAAC;QACH,MAAM,QAAQ,GAAG;YACf,UAAU,EAAE,kCAAkC;YAC9C,MAAM,EAAE,OAAc;YACtB,SAAS,EACP,qEAAqE;YACvE,GAAG,EAAE,kDAAkD,CAAC;gBACtD,SAAS,EAAE,sBAAsB;gBACjC,IAAI,EAAE,cAAc;gBACpB,IAAI;aACL,CAAC;YACF,IAAI,EAAE,cAAc;SACrB,CAAC;QAEF,OAAO,QAAQ,CAAC;IAClB,CAAC;IAED,OAAO,uBAAuB,CAAC;AACjC,CAAC;AA3BD,sDA2BC"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import * as ambassadorWixVeloSecretsVaultV1SecretTypes from './velo-secrets-vault-v1-secret.types';
|
|
2
2
|
import * as ambassadorWixVeloSecretsVaultV1SecretUniversalTypes from './velo-secrets-vault-v1-secret.universal';
|
|
3
|
-
export
|
|
3
|
+
export type __PublicMethodMetaInfo<K = string, M = unknown, T = unknown, S = unknown, Q = unknown, R = unknown> = {
|
|
4
4
|
getUrl: (context: any) => string;
|
|
5
5
|
httpMethod: K;
|
|
6
6
|
path: string;
|
|
@@ -1,7 +1,11 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
3
|
if (k2 === undefined) k2 = k;
|
|
4
|
-
Object.
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
5
9
|
}) : (function(o, m, k, k2) {
|
|
6
10
|
if (k2 === undefined) k2 = k;
|
|
7
11
|
o[k2] = m[k];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"velo-secrets-vault-v1-secret.meta.js","sourceRoot":"","sources":["../../../src/velo-secrets-vault-v1-secret.meta.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"velo-secrets-vault-v1-secret.meta.js","sourceRoot":"","sources":["../../../src/velo-secrets-vault-v1-secret.meta.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,2GAA6F;AAsB7F,SAAgB,cAAc;IAU5B,MAAM,OAAO,GAAG,EAAE,IAAI,EAAE,OAAO,EAAS,CAAC;IAEzC,MAAM,iBAAiB,GACrB,qCAAqC,CAAC,cAAc,CAAC,OAAO,CAAC,CAAC;IAEhE,MAAM,MAAM,GAAG,CAAC,OAAY,EAAU,EAAE;QACtC,MAAM,EAAE,GAAG,EAAE,GAAG,iBAAiB,CAAC,OAAO,CAAC,CAAC;QAC3C,OAAO,GAAI,CAAC;IACd,CAAC,CAAC;IAEF,OAAO;QACL,MAAM;QACN,UAAU,EAAE,KAAK;QACjB,IAAI,EAAE,6BAA6B;QACnC,UAAU,EAAE,EAAE,IAAI,EAAE,MAAM,EAAE;QAC5B,aAAa,EAAE,IAAW;QAC1B,qBAAqB,EAAE,IAAW;QAClC,cAAc,EAAE,IAAW;QAC3B,sBAAsB,EAAE,IAAW;KACpC,CAAC;AACJ,CAAC;AA9BD,wCA8BC;AAED,SAAgB,cAAc;IAU5B,MAAM,OAAO,GAAG,EAAS,CAAC;IAE1B,MAAM,iBAAiB,GACrB,qCAAqC,CAAC,cAAc,CAAC,OAAO,CAAC,CAAC;IAEhE,MAAM,MAAM,GAAG,CAAC,OAAY,EAAU,EAAE;QACtC,MAAM,EAAE,GAAG,EAAE,GAAG,iBAAiB,CAAC,OAAO,CAAC,CAAC;QAC3C,OAAO,GAAI,CAAC;IACd,CAAC,CAAC;IAEF,OAAO;QACL,MAAM;QACN,UAAU,EAAE,KAAK;QACjB,IAAI,EAAE,iBAAiB;QACvB,UAAU,EAAE,EAAE;QACd,aAAa,EAAE,IAAW;QAC1B,qBAAqB,EAAE,IAAW;QAClC,cAAc,EAAE,IAAW;QAC3B,sBAAsB,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AC;IAErC,MAAM,iBAAiB,GACrB,qCAAqC,CAAC,qBAAqB,CAAC,OAAO,CAAC,CAAC;IAEvE,MAAM,MAAM,GAAG,CAAC,OAAY,EAAU,EAAE;QACtC,MAAM,EAAE,GAAG,EAAE,GAAG,iBAAiB,CAAC,OAAO,CAAC,CAAC;QAC3C,OAAO,GAAI,CAAC;IACd,CAAC,CAAC;IAEF,OAAO;QACL,MAAM;QACN,UAAU,EAAE,OAAO;QACnB,IAAI,EAAE,sBAAsB;QAC5B,UAAU,EAAE,EAAE,EAAE,EAAE,IAAI,EAAE;QACxB,aAAa,EAAE,IAAW;QAC1B,qBAAqB,EAAE,IAAW;QAClC,cAAc,EAAE,IAAW;QAC3B,sBAAsB,EAAE,IAAW;KACpC,CAAC;AACJ,CAAC;AA5BD,oCA4BC"}
|
|
@@ -8,4 +8,4 @@ export declare function listSecretInfo(httpClient: HttpClient): () => Promise<im
|
|
|
8
8
|
export declare function createSecret(httpClient: HttpClient): (secret: Secret) => Promise<string>;
|
|
9
9
|
export declare function deleteSecret(httpClient: HttpClient): (_id: string) => Promise<void>;
|
|
10
10
|
export declare function updateSecret(httpClient: HttpClient): (_id: string, secret: Secret) => Promise<void>;
|
|
11
|
-
export { Secret, GetSecretValueRequest, GetSecretValueResponse, ListSecretInfoRequest, ListSecretInfoResponse, CreateSecretRequest, CreateSecretResponse, DeleteSecretRequest, DeleteSecretResponse, UpdateSecretRequest, UpdateSecretResponse, GetSecretValueResponseNonNullableFields, ListSecretInfoResponseNonNullableFields, CreateSecretResponseNonNullableFields, } from './velo-secrets-vault-v1-secret.universal';
|
|
11
|
+
export { Secret, GetSecretValueRequest, GetSecretValueResponse, ListSecretInfoRequest, ListSecretInfoResponse, CreateSecretRequest, CreateSecretResponse, DeleteSecretRequest, DeleteSecretResponse, UpdateSecretRequest, UpdateSecretResponse, DomainEvent, DomainEventBodyOneOf, EntityCreatedEvent, EntityUpdatedEvent, EntityDeletedEvent, ActionEvent, GetSecretValueResponseNonNullableFields, ListSecretInfoResponseNonNullableFields, CreateSecretResponseNonNullableFields, } from './velo-secrets-vault-v1-secret.universal';
|
|
@@ -57,6 +57,73 @@ export interface UpdateSecretRequest {
|
|
|
57
57
|
}
|
|
58
58
|
export interface UpdateSecretResponse {
|
|
59
59
|
}
|
|
60
|
+
export interface DomainEvent extends DomainEventBodyOneOf {
|
|
61
|
+
createdEvent?: EntityCreatedEvent;
|
|
62
|
+
updatedEvent?: EntityUpdatedEvent;
|
|
63
|
+
deletedEvent?: EntityDeletedEvent;
|
|
64
|
+
actionEvent?: ActionEvent;
|
|
65
|
+
/**
|
|
66
|
+
* Unique event ID.
|
|
67
|
+
* Allows clients to ignore duplicate webhooks.
|
|
68
|
+
*/
|
|
69
|
+
id?: string;
|
|
70
|
+
/**
|
|
71
|
+
* Assumes actions are also always typed to an entity_type
|
|
72
|
+
* Example: wix.stores.catalog.product, wix.bookings.session, wix.payments.transaction
|
|
73
|
+
*/
|
|
74
|
+
entityFqdn?: string;
|
|
75
|
+
/**
|
|
76
|
+
* This is top level to ease client code dispatching of messages (switch on entity_fqdn+slug)
|
|
77
|
+
* This is although the created/updated/deleted notion is duplication of the oneof types
|
|
78
|
+
* Example: created/updated/deleted/started/completed/email_opened
|
|
79
|
+
*/
|
|
80
|
+
slug?: string;
|
|
81
|
+
/** ID of the entity associated with the event. */
|
|
82
|
+
entityId?: string;
|
|
83
|
+
/** Event timestamp. */
|
|
84
|
+
eventTime?: Date;
|
|
85
|
+
/**
|
|
86
|
+
* Whether the event was triggered as a result of a privacy regulation application
|
|
87
|
+
* (for example, GDPR).
|
|
88
|
+
*/
|
|
89
|
+
triggeredByAnonymizeRequest?: boolean | null;
|
|
90
|
+
/** If present, indicates the action that triggered the event. */
|
|
91
|
+
originatedFrom?: string | null;
|
|
92
|
+
/**
|
|
93
|
+
* A sequence number defining the order of updates to the underlying entity.
|
|
94
|
+
* For example, given that some entity was updated at 16:00 and than again at 16:01,
|
|
95
|
+
* it is guaranteed that the sequence number of the second update is strictly higher than the first.
|
|
96
|
+
* As the consumer, you can use this value to ensure that you handle messages in the correct order.
|
|
97
|
+
* To do so, you will need to persist this number on your end, and compare the sequence number from the
|
|
98
|
+
* message against the one you have stored. Given that the stored number is higher, you should ignore the message.
|
|
99
|
+
*/
|
|
100
|
+
entityEventSequence?: string | null;
|
|
101
|
+
}
|
|
102
|
+
/** @oneof */
|
|
103
|
+
export interface DomainEventBodyOneOf {
|
|
104
|
+
createdEvent?: EntityCreatedEvent;
|
|
105
|
+
updatedEvent?: EntityUpdatedEvent;
|
|
106
|
+
deletedEvent?: EntityDeletedEvent;
|
|
107
|
+
actionEvent?: ActionEvent;
|
|
108
|
+
}
|
|
109
|
+
export interface EntityCreatedEvent {
|
|
110
|
+
entityAsJson?: string;
|
|
111
|
+
}
|
|
112
|
+
export interface EntityUpdatedEvent {
|
|
113
|
+
/**
|
|
114
|
+
* Since platformized APIs only expose PATCH and not PUT we can't assume that the fields sent from the client are the actual diff.
|
|
115
|
+
* This means that to generate a list of changed fields (as opposed to sent fields) one needs to traverse both objects.
|
|
116
|
+
* We don't want to impose this on all developers and so we leave this traversal to the notification recipients which need it.
|
|
117
|
+
*/
|
|
118
|
+
currentEntityAsJson?: string;
|
|
119
|
+
}
|
|
120
|
+
export interface EntityDeletedEvent {
|
|
121
|
+
/** Entity that was deleted */
|
|
122
|
+
deletedEntityAsJson?: string | null;
|
|
123
|
+
}
|
|
124
|
+
export interface ActionEvent {
|
|
125
|
+
bodyAsJson?: string;
|
|
126
|
+
}
|
|
60
127
|
export interface GetSecretValueResponseNonNullableFields {
|
|
61
128
|
value: string;
|
|
62
129
|
}
|
|
@@ -1,9 +1,3 @@
|
|
|
1
|
-
export declare const __debug: {
|
|
2
|
-
verboseLogging: {
|
|
3
|
-
on: () => boolean;
|
|
4
|
-
off: () => boolean;
|
|
5
|
-
};
|
|
6
|
-
};
|
|
7
1
|
export interface Secret {
|
|
8
2
|
/**
|
|
9
3
|
* The secret's unique ID.
|
|
@@ -77,6 +71,73 @@ export interface UpdateSecretRequest {
|
|
|
77
71
|
}
|
|
78
72
|
export interface UpdateSecretResponse {
|
|
79
73
|
}
|
|
74
|
+
export interface DomainEvent extends DomainEventBodyOneOf {
|
|
75
|
+
createdEvent?: EntityCreatedEvent;
|
|
76
|
+
updatedEvent?: EntityUpdatedEvent;
|
|
77
|
+
deletedEvent?: EntityDeletedEvent;
|
|
78
|
+
actionEvent?: ActionEvent;
|
|
79
|
+
/**
|
|
80
|
+
* Unique event ID.
|
|
81
|
+
* Allows clients to ignore duplicate webhooks.
|
|
82
|
+
*/
|
|
83
|
+
_id?: string;
|
|
84
|
+
/**
|
|
85
|
+
* Assumes actions are also always typed to an entity_type
|
|
86
|
+
* Example: wix.stores.catalog.product, wix.bookings.session, wix.payments.transaction
|
|
87
|
+
*/
|
|
88
|
+
entityFqdn?: string;
|
|
89
|
+
/**
|
|
90
|
+
* This is top level to ease client code dispatching of messages (switch on entity_fqdn+slug)
|
|
91
|
+
* This is although the created/updated/deleted notion is duplication of the oneof types
|
|
92
|
+
* Example: created/updated/deleted/started/completed/email_opened
|
|
93
|
+
*/
|
|
94
|
+
slug?: string;
|
|
95
|
+
/** ID of the entity associated with the event. */
|
|
96
|
+
entityId?: string;
|
|
97
|
+
/** Event timestamp. */
|
|
98
|
+
eventTime?: Date;
|
|
99
|
+
/**
|
|
100
|
+
* Whether the event was triggered as a result of a privacy regulation application
|
|
101
|
+
* (for example, GDPR).
|
|
102
|
+
*/
|
|
103
|
+
triggeredByAnonymizeRequest?: boolean | null;
|
|
104
|
+
/** If present, indicates the action that triggered the event. */
|
|
105
|
+
originatedFrom?: string | null;
|
|
106
|
+
/**
|
|
107
|
+
* A sequence number defining the order of updates to the underlying entity.
|
|
108
|
+
* For example, given that some entity was updated at 16:00 and than again at 16:01,
|
|
109
|
+
* it is guaranteed that the sequence number of the second update is strictly higher than the first.
|
|
110
|
+
* As the consumer, you can use this value to ensure that you handle messages in the correct order.
|
|
111
|
+
* To do so, you will need to persist this number on your end, and compare the sequence number from the
|
|
112
|
+
* message against the one you have stored. Given that the stored number is higher, you should ignore the message.
|
|
113
|
+
*/
|
|
114
|
+
entityEventSequence?: string | null;
|
|
115
|
+
}
|
|
116
|
+
/** @oneof */
|
|
117
|
+
export interface DomainEventBodyOneOf {
|
|
118
|
+
createdEvent?: EntityCreatedEvent;
|
|
119
|
+
updatedEvent?: EntityUpdatedEvent;
|
|
120
|
+
deletedEvent?: EntityDeletedEvent;
|
|
121
|
+
actionEvent?: ActionEvent;
|
|
122
|
+
}
|
|
123
|
+
export interface EntityCreatedEvent {
|
|
124
|
+
entityAsJson?: string;
|
|
125
|
+
}
|
|
126
|
+
export interface EntityUpdatedEvent {
|
|
127
|
+
/**
|
|
128
|
+
* Since platformized APIs only expose PATCH and not PUT we can't assume that the fields sent from the client are the actual diff.
|
|
129
|
+
* This means that to generate a list of changed fields (as opposed to sent fields) one needs to traverse both objects.
|
|
130
|
+
* We don't want to impose this on all developers and so we leave this traversal to the notification recipients which need it.
|
|
131
|
+
*/
|
|
132
|
+
currentEntityAsJson?: string;
|
|
133
|
+
}
|
|
134
|
+
export interface EntityDeletedEvent {
|
|
135
|
+
/** Entity that was deleted */
|
|
136
|
+
deletedEntityAsJson?: string | null;
|
|
137
|
+
}
|
|
138
|
+
export interface ActionEvent {
|
|
139
|
+
bodyAsJson?: string;
|
|
140
|
+
}
|
|
80
141
|
export interface GetSecretValueResponseNonNullableFields {
|
|
81
142
|
value: string;
|
|
82
143
|
}
|
|
@@ -97,6 +158,9 @@ export interface CreateSecretResponseNonNullableFields {
|
|
|
97
158
|
* @documentationMaturity preview
|
|
98
159
|
* @requiredField name
|
|
99
160
|
* @param name - The name of the secret to get the value of.
|
|
161
|
+
* @permissionScope Manage Secrets
|
|
162
|
+
* @permissionScopeId SCOPE.VELO.MANAGE_SECRETS
|
|
163
|
+
* @applicableIdentity APP
|
|
100
164
|
* @returns Fulfilled - The value of the secret. Rejected - Error message.
|
|
101
165
|
*/
|
|
102
166
|
export declare function getSecretValue(name: string): Promise<GetSecretValueResponse & GetSecretValueResponseNonNullableFields>;
|
|
@@ -109,6 +173,9 @@ export declare function getSecretValue(name: string): Promise<GetSecretValueResp
|
|
|
109
173
|
* > - The secret's value does not get returned for security reasons. To retrieve a secret's value, use the [`getSecretValue()`](#getSecretValue) function.
|
|
110
174
|
* @public
|
|
111
175
|
* @documentationMaturity preview
|
|
176
|
+
* @permissionScope Manage Secrets
|
|
177
|
+
* @permissionScopeId SCOPE.VELO.MANAGE_SECRETS
|
|
178
|
+
* @applicableIdentity APP
|
|
112
179
|
* @returns Fulfilled - A list of objects containing information about your site's secrets. Rejected - Error message.
|
|
113
180
|
*/
|
|
114
181
|
export declare function listSecretInfo(): Promise<ListSecretInfoResponse & ListSecretInfoResponseNonNullableFields>;
|
|
@@ -126,6 +193,9 @@ export declare function listSecretInfo(): Promise<ListSecretInfoResponse & ListS
|
|
|
126
193
|
* @requiredField secret.name
|
|
127
194
|
* @requiredField secret.value
|
|
128
195
|
* @param secret - Fields of a new secret.
|
|
196
|
+
* @permissionScope Manage Secrets
|
|
197
|
+
* @permissionScopeId SCOPE.VELO.MANAGE_SECRETS
|
|
198
|
+
* @applicableIdentity APP
|
|
129
199
|
* @returns Fulfilled - The ID of the created secret.
|
|
130
200
|
* Rejected - Error message.
|
|
131
201
|
*/
|
|
@@ -142,6 +212,9 @@ export declare function createSecret(secret: Secret): Promise<string>;
|
|
|
142
212
|
* @documentationMaturity preview
|
|
143
213
|
* @requiredField _id
|
|
144
214
|
* @param _id - The unique ID of the secret to be deleted.
|
|
215
|
+
* @permissionScope Manage Secrets
|
|
216
|
+
* @permissionScopeId SCOPE.VELO.MANAGE_SECRETS
|
|
217
|
+
* @applicableIdentity APP
|
|
145
218
|
* @returns Fulfilled - When the secret is successfully deleted. Rejected - Error message.
|
|
146
219
|
*/
|
|
147
220
|
export declare function deleteSecret(_id: string): Promise<void>;
|
|
@@ -163,6 +236,9 @@ export declare function deleteSecret(_id: string): Promise<void>;
|
|
|
163
236
|
* @documentationMaturity preview
|
|
164
237
|
* @requiredField _id
|
|
165
238
|
* @requiredField secret
|
|
239
|
+
* @permissionScope Manage Secrets
|
|
240
|
+
* @permissionScopeId SCOPE.VELO.MANAGE_SECRETS
|
|
241
|
+
* @applicableIdentity APP
|
|
166
242
|
* @returns Fulfilled - When the secret is updated.
|
|
167
243
|
* Rejected - Error message.
|
|
168
244
|
*/
|