@wix/secrets 1.0.0 → 1.0.2
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/src/velo-secrets-vault-v1-secret.http.d.ts +35 -4
- package/build/cjs/src/velo-secrets-vault-v1-secret.http.js +35 -4
- package/build/cjs/src/velo-secrets-vault-v1-secret.http.js.map +1 -1
- package/build/cjs/src/velo-secrets-vault-v1-secret.types.d.ts +12 -12
- package/build/cjs/src/velo-secrets-vault-v1-secret.universal.d.ts +65 -25
- package/build/cjs/src/velo-secrets-vault-v1-secret.universal.js +39 -11
- package/build/cjs/src/velo-secrets-vault-v1-secret.universal.js.map +1 -1
- package/build/es/src/velo-secrets-vault-v1-secret.http.d.ts +35 -4
- package/build/es/src/velo-secrets-vault-v1-secret.http.js +35 -4
- package/build/es/src/velo-secrets-vault-v1-secret.http.js.map +1 -1
- package/build/es/src/velo-secrets-vault-v1-secret.types.d.ts +12 -12
- package/build/es/src/velo-secrets-vault-v1-secret.universal.d.ts +65 -25
- package/build/es/src/velo-secrets-vault-v1-secret.universal.js +39 -11
- package/build/es/src/velo-secrets-vault-v1-secret.universal.js.map +1 -1
- package/package.json +2 -2
|
@@ -1,12 +1,43 @@
|
|
|
1
1
|
import { RequestOptionsFactory } from '@wix/sdk-types';
|
|
2
2
|
import { CreateSecretRequest, CreateSecretResponse, DeleteSecretRequest, DeleteSecretResponse, GetSecretValueRequest, GetSecretValueResponse, ListSecretInfoRequest, ListSecretInfoResponse, UpdateSecretRequest, UpdateSecretResponse } from './velo-secrets-vault-v1-secret.types';
|
|
3
|
-
/**
|
|
3
|
+
/**
|
|
4
|
+
* Retrieves the secret value by the secret name.
|
|
5
|
+
*
|
|
6
|
+
* The `getSecretValue()` function returns a Promise that resolves to the value of the secret that was stored in the Secrets Manager with the given name.
|
|
7
|
+
*
|
|
8
|
+
* >**Note:**
|
|
9
|
+
* > Only use a secret's value in the backend code. Returning the secret value in the frontend is a security risk.
|
|
10
|
+
*/
|
|
4
11
|
export declare function getSecretValue(payload: GetSecretValueRequest): RequestOptionsFactory<GetSecretValueResponse>;
|
|
5
|
-
/**
|
|
12
|
+
/**
|
|
13
|
+
* Retrieves a list of objects containing information about all secrets stored in the [Secrets Manager](https://support.wix.com/en/article/velo-working-with-the-secrets-manager).
|
|
14
|
+
*
|
|
15
|
+
* The `listSecretInfo()` function returns a Promise that resolves to a list containing information about all the secrets stored on your site.
|
|
16
|
+
*
|
|
17
|
+
* > **Notes:**
|
|
18
|
+
* > - The secret's value does not get returned for security reasons. To retrieve a secret's value, use the [`getSecretValue()`](#getSecretValue) function.
|
|
19
|
+
* > - Do not use `listSecretInfo()` in a **.jsw** file with anonymous permissions! This is a serious security risk which exposes your secrets to potential leaks. To prevent this, implement `listSecretInfo()` in a separate **.js** file to block frontend access. If you must include `listSecretInfo()` in a **.jsw** file, make sure the exported function has [permissions set](https://support.wix.com/en/article/velo-about-web-module-permissions) to **Admin**.
|
|
20
|
+
*/
|
|
6
21
|
export declare function listSecretInfo(payload: ListSecretInfoRequest): RequestOptionsFactory<ListSecretInfoResponse>;
|
|
7
|
-
/**
|
|
22
|
+
/**
|
|
23
|
+
* Creates a new secret.
|
|
24
|
+
*
|
|
25
|
+
* The `createSecret()` function returns a Promise that resolves to the newly created secret's ID when a secret is created in the [Secrets Manager](https://support.wix.com/en/article/velo-working-with-the-secrets-manager). Secrets created by this function are available in the Secrets Manager section in your site's dashboard, just like any other secret created using the UI.
|
|
26
|
+
*
|
|
27
|
+
* >**Notes:**
|
|
28
|
+
* > - The secret's name cannot start with `'wix'` or be identical to an existing secret's name.
|
|
29
|
+
* > - 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()`, or pass the parameters in using the backend [Functional Testing](https://support.wix.com/en/article/velo-functional-testing-in-the-backend) tool.
|
|
30
|
+
*/
|
|
8
31
|
export declare function createSecret(payload: CreateSecretRequest): RequestOptionsFactory<CreateSecretResponse>;
|
|
9
|
-
/**
|
|
32
|
+
/**
|
|
33
|
+
* Deletes an existing secret by ID.
|
|
34
|
+
*
|
|
35
|
+
* The `deleteSecret()` function returns a Promise that resolves when a secret from the [Secrets Manager](https://support.wix.com/en/article/velo-working-with-the-secrets-manager) is deleted. You can retrieve the `_id` parameter using the [`listSecretInfo()`](#listSecretInfo) function.
|
|
36
|
+
*
|
|
37
|
+
* >**Note:**
|
|
38
|
+
* > Deleting a secret is irreversible and will break all code using the secret.
|
|
39
|
+
*
|
|
40
|
+
*/
|
|
10
41
|
export declare function deleteSecret(payload: DeleteSecretRequest): RequestOptionsFactory<DeleteSecretResponse>;
|
|
11
42
|
/** Updates all the fields of an existing secret at once */
|
|
12
43
|
export declare function updateSecret(payload: UpdateSecretRequest): RequestOptionsFactory<UpdateSecretResponse>;
|
|
@@ -47,7 +47,14 @@ function resolveWixVeloSecretsVaultV1SecretsVaultServiceUrl(opts) {
|
|
|
47
47
|
};
|
|
48
48
|
return (0, metro_runtime_2.resolveUrl)(Object.assign(opts, { domainToMappings }));
|
|
49
49
|
}
|
|
50
|
-
/**
|
|
50
|
+
/**
|
|
51
|
+
* Retrieves the secret value by the secret name.
|
|
52
|
+
*
|
|
53
|
+
* The `getSecretValue()` function returns a Promise that resolves to the value of the secret that was stored in the Secrets Manager with the given name.
|
|
54
|
+
*
|
|
55
|
+
* >**Note:**
|
|
56
|
+
* > Only use a secret's value in the backend code. Returning the secret value in the frontend is a security risk.
|
|
57
|
+
*/
|
|
51
58
|
function getSecretValue(payload) {
|
|
52
59
|
const { toJSON: toReq, fromJSON: fromReq } = (0, ambassador_1.serializer)(_getSecretValueRequest, {});
|
|
53
60
|
const { fromJSON: fromRes } = (0, ambassador_1.serializer)(_getSecretValueResponse, {});
|
|
@@ -71,7 +78,15 @@ function getSecretValue(payload) {
|
|
|
71
78
|
return __getSecretValue;
|
|
72
79
|
}
|
|
73
80
|
exports.getSecretValue = getSecretValue;
|
|
74
|
-
/**
|
|
81
|
+
/**
|
|
82
|
+
* Retrieves a list of objects containing information about all secrets stored in the [Secrets Manager](https://support.wix.com/en/article/velo-working-with-the-secrets-manager).
|
|
83
|
+
*
|
|
84
|
+
* The `listSecretInfo()` function returns a Promise that resolves to a list containing information about all the secrets stored on your site.
|
|
85
|
+
*
|
|
86
|
+
* > **Notes:**
|
|
87
|
+
* > - The secret's value does not get returned for security reasons. To retrieve a secret's value, use the [`getSecretValue()`](#getSecretValue) function.
|
|
88
|
+
* > - Do not use `listSecretInfo()` in a **.jsw** file with anonymous permissions! This is a serious security risk which exposes your secrets to potential leaks. To prevent this, implement `listSecretInfo()` in a separate **.js** file to block frontend access. If you must include `listSecretInfo()` in a **.jsw** file, make sure the exported function has [permissions set](https://support.wix.com/en/article/velo-about-web-module-permissions) to **Admin**.
|
|
89
|
+
*/
|
|
75
90
|
function listSecretInfo(payload) {
|
|
76
91
|
const { toJSON: toReq, fromJSON: fromReq } = (0, ambassador_1.serializer)(_listSecretInfoRequest, {});
|
|
77
92
|
const { fromJSON: fromRes } = (0, ambassador_1.serializer)(_listSecretInfoResponse, {
|
|
@@ -97,7 +112,15 @@ function listSecretInfo(payload) {
|
|
|
97
112
|
return __listSecretInfo;
|
|
98
113
|
}
|
|
99
114
|
exports.listSecretInfo = listSecretInfo;
|
|
100
|
-
/**
|
|
115
|
+
/**
|
|
116
|
+
* Creates a new secret.
|
|
117
|
+
*
|
|
118
|
+
* The `createSecret()` function returns a Promise that resolves to the newly created secret's ID when a secret is created in the [Secrets Manager](https://support.wix.com/en/article/velo-working-with-the-secrets-manager). Secrets created by this function are available in the Secrets Manager section in your site's dashboard, just like any other secret created using the UI.
|
|
119
|
+
*
|
|
120
|
+
* >**Notes:**
|
|
121
|
+
* > - The secret's name cannot start with `'wix'` or be identical to an existing secret's name.
|
|
122
|
+
* > - 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()`, or pass the parameters in using the backend [Functional Testing](https://support.wix.com/en/article/velo-functional-testing-in-the-backend) tool.
|
|
123
|
+
*/
|
|
101
124
|
function createSecret(payload) {
|
|
102
125
|
const { toJSON: toReq, fromJSON: fromReq } = (0, ambassador_1.serializer)(_createSecretRequest, { _secret });
|
|
103
126
|
const { fromJSON: fromRes } = (0, ambassador_1.serializer)(_createSecretResponse, {});
|
|
@@ -121,7 +144,15 @@ function createSecret(payload) {
|
|
|
121
144
|
return __createSecret;
|
|
122
145
|
}
|
|
123
146
|
exports.createSecret = createSecret;
|
|
124
|
-
/**
|
|
147
|
+
/**
|
|
148
|
+
* Deletes an existing secret by ID.
|
|
149
|
+
*
|
|
150
|
+
* The `deleteSecret()` function returns a Promise that resolves when a secret from the [Secrets Manager](https://support.wix.com/en/article/velo-working-with-the-secrets-manager) is deleted. You can retrieve the `_id` parameter using the [`listSecretInfo()`](#listSecretInfo) function.
|
|
151
|
+
*
|
|
152
|
+
* >**Note:**
|
|
153
|
+
* > Deleting a secret is irreversible and will break all code using the secret.
|
|
154
|
+
*
|
|
155
|
+
*/
|
|
125
156
|
function deleteSecret(payload) {
|
|
126
157
|
const { toJSON: toReq, fromJSON: fromReq } = (0, ambassador_1.serializer)(_deleteSecretRequest, {});
|
|
127
158
|
const { fromJSON: fromRes } = (0, ambassador_1.serializer)(_deleteSecretResponse, {});
|
|
@@ -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,8DAA2D;AAC3D,sDAAgD;AAgBhD,MAAM,oBAAoB,GAAG,EAAE,MAAM,EAAE,SAAS,EAAE,CAAC;AACnD,MAAM,qBAAqB,GAAG,EAAE,CAAC;AACjC,MAAM,oBAAoB,GAAG,EAAE,CAAC;AAChC,MAAM,qBAAqB,GAAG,EAAE,CAAC;AACjC,MAAM,sBAAsB,GAAG,EAAE,CAAC;AAClC,MAAM,uBAAuB,GAAG,EAAE,CAAC;AACnC,MAAM,sBAAsB,GAAG,EAAE,CAAC;AAClC,MAAM,uBAAuB,GAAG,EAAE,OAAO,EAAE,SAAS,EAAE,CAAC;AACvD,MAAM,OAAO,GAAG;IACd,WAAW,EAAE,2BAA2B;IACxC,WAAW,EAAE,2BAA2B;CACzC,CAAC;AACF,MAAM,oBAAoB,GAAG,EAAE,MAAM,EAAE,SAAS,EAAE,CAAC;AACnD,MAAM,qBAAqB,GAAG,EAAE,CAAC;AAEjC,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;KACF,CAAC;IAEF,OAAO,IAAA,0BAAU,EAAC,MAAM,CAAC,MAAM,CAAC,IAAI,EAAE,EAAE,gBAAgB,EAAE,CAAC,CAAC,CAAC;AAC/D,CAAC;AAED
|
|
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,8DAA2D;AAC3D,sDAAgD;AAgBhD,MAAM,oBAAoB,GAAG,EAAE,MAAM,EAAE,SAAS,EAAE,CAAC;AACnD,MAAM,qBAAqB,GAAG,EAAE,CAAC;AACjC,MAAM,oBAAoB,GAAG,EAAE,CAAC;AAChC,MAAM,qBAAqB,GAAG,EAAE,CAAC;AACjC,MAAM,sBAAsB,GAAG,EAAE,CAAC;AAClC,MAAM,uBAAuB,GAAG,E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IAE5B,MAAM,EAAE,MAAM,EAAE,KAAK,EAAE,QAAQ,EAAE,OAAO,EAAE,GAAG,IAAA,uBAAU,EACrD,oBAAoB,EACpB,EAAE,OAAO,EAAE,CACZ,CAAC;IACF,MAAM,EAAE,QAAQ,EAAE,OAAO,EAAE,GAAG,IAAA,uBAAU,EAAC,qBAAqB,EAAE,EAAE,CAAC,CAAC;IAEpE,SAAS,uBAAuB,CAAC,EAAE,IAAI,EAAO;QAC5C,MAAM,cAAc,GAAG,KAAK,CAAC,OAAO,CAAC,CAAC;QACtC,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;YACpB,iBAAiB,EAAE,OAAO;SAC3B,CAAC;QAEF,OAAO,QAAQ,CAAC;IAClB,CAAC;IAED,uBAAuB,CAAC,OAAO,GAAG,OAAO,CAAC;IAE1C,OAAO,uBAAuB,CAAC;AACjC,CAAC;AA/BD,sDA+BC"}
|
|
@@ -1,32 +1,32 @@
|
|
|
1
1
|
export interface Secret {
|
|
2
2
|
/**
|
|
3
|
-
* A globally-unique, immutable identifier assigned to the secret upon creation
|
|
3
|
+
* A globally-unique, immutable identifier assigned to the secret upon creation.
|
|
4
4
|
* @readonly
|
|
5
5
|
*/
|
|
6
6
|
id?: string | null;
|
|
7
7
|
/** A unique, human-friendly name for the secret. Used for retrieving the secret easily at runtime. */
|
|
8
8
|
name?: string | null;
|
|
9
|
-
/** An optional text describing the secret's purpose or any other notes about it */
|
|
9
|
+
/** An optional text describing the secret's purpose or any other notes about it. */
|
|
10
10
|
description?: string | null;
|
|
11
|
-
/** The confidential value that is intended to be stored encrypted */
|
|
11
|
+
/** The confidential value that is intended to be stored encrypted. */
|
|
12
12
|
value?: string | null;
|
|
13
13
|
/**
|
|
14
|
-
* The creation timestamp of the secret
|
|
14
|
+
* The creation timestamp of the secret.
|
|
15
15
|
* @readonly
|
|
16
16
|
*/
|
|
17
17
|
createdDate?: Date;
|
|
18
18
|
/**
|
|
19
|
-
* The last-update timestamp of the secret
|
|
19
|
+
* The last-update timestamp of the secret.
|
|
20
20
|
* @readonly
|
|
21
21
|
*/
|
|
22
22
|
updatedDate?: Date;
|
|
23
23
|
}
|
|
24
24
|
export interface GetSecretValueRequest {
|
|
25
|
-
/** The name of the secret to get the value
|
|
25
|
+
/** The name of the secret to get the value of. */
|
|
26
26
|
name: string;
|
|
27
27
|
}
|
|
28
28
|
export interface GetSecretValueResponse {
|
|
29
|
-
/** The plaintext, unencrypted value of the secret */
|
|
29
|
+
/** The plaintext, unencrypted value of the secret. */
|
|
30
30
|
value?: string;
|
|
31
31
|
}
|
|
32
32
|
export interface ListSecretInfoRequest {
|
|
@@ -36,23 +36,23 @@ export interface ListSecretInfoResponse {
|
|
|
36
36
|
secrets?: Secret[];
|
|
37
37
|
}
|
|
38
38
|
export interface CreateSecretRequest {
|
|
39
|
-
/** A set of fields including info and the actual value to protect */
|
|
39
|
+
/** A set of fields including info and the actual value to protect. */
|
|
40
40
|
secret: Secret;
|
|
41
41
|
}
|
|
42
42
|
export interface CreateSecretResponse {
|
|
43
|
-
/** The globally-unique
|
|
43
|
+
/** The globally-unique ID assigned to the secret by the service. */
|
|
44
44
|
id?: string;
|
|
45
45
|
}
|
|
46
46
|
export interface DeleteSecretRequest {
|
|
47
|
-
/** The unique
|
|
47
|
+
/** The unique ID of the secret to be deleted. */
|
|
48
48
|
id: string;
|
|
49
49
|
}
|
|
50
50
|
export interface DeleteSecretResponse {
|
|
51
51
|
}
|
|
52
52
|
export interface UpdateSecretRequest {
|
|
53
|
-
/** The unique
|
|
53
|
+
/** The unique ID of the secret to be updated. */
|
|
54
54
|
id: string;
|
|
55
|
-
/** The secret fields
|
|
55
|
+
/** The secret fields to update. */
|
|
56
56
|
secret: Secret;
|
|
57
57
|
}
|
|
58
58
|
export interface UpdateSecretResponse {
|
|
@@ -6,99 +6,139 @@ export declare const __debug: {
|
|
|
6
6
|
};
|
|
7
7
|
export interface Secret {
|
|
8
8
|
/**
|
|
9
|
-
*
|
|
9
|
+
* The secret's unique ID.
|
|
10
10
|
* @readonly
|
|
11
11
|
*/
|
|
12
12
|
_id?: string | null;
|
|
13
|
-
/**
|
|
13
|
+
/**
|
|
14
|
+
* A unique, meaningful name used for retrieving the secret at runtime with the [`getSecretValue`](#getSecretValue) function. You can use alphanumeric characters and the following special characters: `_+=-@#$`. Spaces are not supported.
|
|
15
|
+
*
|
|
16
|
+
*/
|
|
14
17
|
name?: string | null;
|
|
15
|
-
/** An optional text describing the secret's purpose or any other notes about it */
|
|
18
|
+
/** An optional text describing the secret's purpose or any other notes about it. */
|
|
16
19
|
description?: string | null;
|
|
17
|
-
/** The confidential value
|
|
20
|
+
/** The confidential secret value to protect, such as an API key. */
|
|
18
21
|
value?: string | null;
|
|
19
22
|
/**
|
|
20
|
-
* The
|
|
23
|
+
* The date and time the secreted was created.
|
|
21
24
|
* @readonly
|
|
22
25
|
*/
|
|
23
26
|
_createdDate?: Date;
|
|
24
27
|
/**
|
|
25
|
-
* The
|
|
28
|
+
* The date and time the secret was last updated.
|
|
26
29
|
* @readonly
|
|
27
30
|
*/
|
|
28
31
|
_updatedDate?: Date;
|
|
29
32
|
}
|
|
30
33
|
export interface GetSecretValueRequest {
|
|
31
|
-
/** The name of the secret to get the value
|
|
34
|
+
/** The name of the secret to get the value of. */
|
|
32
35
|
name: string;
|
|
33
36
|
}
|
|
34
37
|
export interface GetSecretValueResponse {
|
|
35
|
-
/**
|
|
38
|
+
/**
|
|
39
|
+
* The plaintext, unencrypted value of the secret.
|
|
40
|
+
*
|
|
41
|
+
*/
|
|
36
42
|
value?: string;
|
|
37
43
|
}
|
|
38
44
|
export interface ListSecretInfoRequest {
|
|
39
45
|
}
|
|
40
46
|
export interface ListSecretInfoResponse {
|
|
41
|
-
/**
|
|
47
|
+
/** Object containing information for each secret. */
|
|
42
48
|
secrets?: Secret[];
|
|
43
49
|
}
|
|
44
50
|
export interface CreateSecretRequest {
|
|
45
|
-
/**
|
|
51
|
+
/** The object including the fields of a new secret. */
|
|
46
52
|
secret: Secret;
|
|
47
53
|
}
|
|
48
54
|
export interface CreateSecretResponse {
|
|
49
|
-
/**
|
|
55
|
+
/**
|
|
56
|
+
* The globally-unique ID assigned to the secret.
|
|
57
|
+
*
|
|
58
|
+
*/
|
|
50
59
|
_id?: string;
|
|
51
60
|
}
|
|
52
61
|
export interface DeleteSecretRequest {
|
|
53
|
-
/**
|
|
62
|
+
/**
|
|
63
|
+
* The unique ID of the secret to be deleted.
|
|
64
|
+
*
|
|
65
|
+
*/
|
|
54
66
|
_id: string;
|
|
55
67
|
}
|
|
56
68
|
export interface DeleteSecretResponse {
|
|
57
69
|
}
|
|
58
70
|
export interface UpdateSecretRequest {
|
|
59
|
-
/** The unique
|
|
71
|
+
/** The unique ID of the secret to be updated. */
|
|
60
72
|
_id: string;
|
|
61
|
-
/** The secret fields
|
|
73
|
+
/** The secret fields to update. */
|
|
62
74
|
secret: Secret;
|
|
63
75
|
}
|
|
64
76
|
export interface UpdateSecretResponse {
|
|
65
77
|
}
|
|
66
78
|
/**
|
|
67
|
-
*
|
|
68
|
-
*
|
|
79
|
+
* Retrieves the secret value by the secret name.
|
|
80
|
+
*
|
|
81
|
+
* The `getSecretValue()` function returns a Promise that resolves to the value of the secret that was stored in the Secrets Manager with the given name.
|
|
82
|
+
*
|
|
83
|
+
* >**Note:**
|
|
84
|
+
* > Only use a secret's value in the backend code. Returning the secret value in the frontend is a security risk.
|
|
69
85
|
* @public
|
|
70
86
|
* @documentationMaturity preview
|
|
71
87
|
* @requiredField name
|
|
88
|
+
* @param name - The name of the secret to get the value of.
|
|
89
|
+
* @returns Fulfilled - The value of the secret. Rejected - Error message.
|
|
72
90
|
*/
|
|
73
91
|
export declare function getSecretValue(name: string): Promise<GetSecretValueResponse>;
|
|
74
92
|
/**
|
|
75
|
-
*
|
|
93
|
+
* Retrieves a list of objects containing information about all secrets stored in the [Secrets Manager](https://support.wix.com/en/article/velo-working-with-the-secrets-manager).
|
|
94
|
+
*
|
|
95
|
+
* The `listSecretInfo()` function returns a Promise that resolves to a list containing information about all the secrets stored on your site.
|
|
96
|
+
*
|
|
97
|
+
* > **Notes:**
|
|
98
|
+
* > - The secret's value does not get returned for security reasons. To retrieve a secret's value, use the [`getSecretValue()`](#getSecretValue) function.
|
|
99
|
+
* > - Do not use `listSecretInfo()` in a **.jsw** file with anonymous permissions! This is a serious security risk which exposes your secrets to potential leaks. To prevent this, implement `listSecretInfo()` in a separate **.js** file to block frontend access. If you must include `listSecretInfo()` in a **.jsw** file, make sure the exported function has [permissions set](https://support.wix.com/en/article/velo-about-web-module-permissions) to **Admin**.
|
|
76
100
|
* @public
|
|
77
101
|
* @documentationMaturity preview
|
|
102
|
+
* @returns Fulfilled - A list of objects containing information about your site's secrets. Rejected - Error message.
|
|
78
103
|
*/
|
|
79
104
|
export declare function listSecretInfo(): Promise<ListSecretInfoResponse>;
|
|
80
105
|
/**
|
|
81
|
-
* Creates a new secret
|
|
82
|
-
*
|
|
106
|
+
* Creates a new secret.
|
|
107
|
+
*
|
|
108
|
+
* The `createSecret()` function returns a Promise that resolves to the newly created secret's ID when a secret is created in the [Secrets Manager](https://support.wix.com/en/article/velo-working-with-the-secrets-manager). Secrets created by this function are available in the Secrets Manager section in your site's dashboard, just like any other secret created using the UI.
|
|
109
|
+
*
|
|
110
|
+
* >**Notes:**
|
|
111
|
+
* > - The secret's name cannot start with `'wix'` or be identical to an existing secret's name.
|
|
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()`, or pass the parameters in using the backend [Functional Testing](https://support.wix.com/en/article/velo-functional-testing-in-the-backend) tool.
|
|
83
113
|
* @public
|
|
84
114
|
* @documentationMaturity preview
|
|
85
115
|
* @requiredField secret
|
|
86
116
|
* @requiredField secret.name
|
|
87
117
|
* @requiredField secret.value
|
|
118
|
+
* @param secret - The object including the fields of a new secret.
|
|
119
|
+
* @returns Fulfilled - The ID of the created secret.
|
|
120
|
+
* Rejected - Error message.
|
|
88
121
|
*/
|
|
89
122
|
export declare function createSecret(secret: Secret): Promise<CreateSecretResponse>;
|
|
90
123
|
/**
|
|
91
|
-
* Deletes an existing secret
|
|
92
|
-
*
|
|
124
|
+
* Deletes an existing secret by ID.
|
|
125
|
+
*
|
|
126
|
+
* The `deleteSecret()` function returns a Promise that resolves when a secret from the [Secrets Manager](https://support.wix.com/en/article/velo-working-with-the-secrets-manager) is deleted. You can retrieve the `_id` parameter using the [`listSecretInfo()`](#listSecretInfo) function.
|
|
127
|
+
*
|
|
128
|
+
* >**Note:**
|
|
129
|
+
* > Deleting a secret is irreversible and will break all code using the secret.
|
|
130
|
+
*
|
|
93
131
|
* @public
|
|
94
132
|
* @documentationMaturity preview
|
|
95
133
|
* @requiredField _id
|
|
134
|
+
* @param _id - The unique ID of the secret to be deleted.
|
|
135
|
+
* @returns Fulfilled - When the secret is successfully deleted from the Secrets Manager. Rejected - Error message.
|
|
96
136
|
*/
|
|
97
137
|
export declare function deleteSecret(_id: string): Promise<void>;
|
|
98
138
|
/**
|
|
99
139
|
* Updates all the fields of an existing secret at once
|
|
100
|
-
* @param _id - The unique
|
|
101
|
-
* @param secret - The secret fields
|
|
140
|
+
* @param _id - The unique ID of the secret to be updated.
|
|
141
|
+
* @param secret - The secret fields to update.
|
|
102
142
|
* @public
|
|
103
143
|
* @documentationMaturity preview
|
|
104
144
|
* @requiredField _id
|
|
@@ -109,8 +149,8 @@ export declare function deleteSecret(_id: string): Promise<void>;
|
|
|
109
149
|
export declare function updateSecret(_id: string, secret: Secret): Promise<void>;
|
|
110
150
|
/**
|
|
111
151
|
* Updates some or all of the fields of an existing secret
|
|
112
|
-
* @param _id - The unique
|
|
113
|
-
* @param secret - The secret fields
|
|
152
|
+
* @param _id - The unique ID of the secret to be updated.
|
|
153
|
+
* @param secret - The secret fields to update.
|
|
114
154
|
* @public
|
|
115
155
|
* @documentationMaturity preview
|
|
116
156
|
* @requiredField _id
|
|
@@ -57,11 +57,17 @@ const _listSecretInfoResponse = {};
|
|
|
57
57
|
const _updateSecretRequest = {};
|
|
58
58
|
const _updateSecretResponse = {};
|
|
59
59
|
/**
|
|
60
|
-
*
|
|
61
|
-
*
|
|
60
|
+
* Retrieves the secret value by the secret name.
|
|
61
|
+
*
|
|
62
|
+
* The `getSecretValue()` function returns a Promise that resolves to the value of the secret that was stored in the Secrets Manager with the given name.
|
|
63
|
+
*
|
|
64
|
+
* >**Note:**
|
|
65
|
+
* > Only use a secret's value in the backend code. Returning the secret value in the frontend is a security risk.
|
|
62
66
|
* @public
|
|
63
67
|
* @documentationMaturity preview
|
|
64
68
|
* @requiredField name
|
|
69
|
+
* @param name - The name of the secret to get the value of.
|
|
70
|
+
* @returns Fulfilled - The value of the secret. Rejected - Error message.
|
|
65
71
|
*/
|
|
66
72
|
function getSecretValue(name) {
|
|
67
73
|
var _a, _b, _c;
|
|
@@ -108,9 +114,16 @@ function getSecretValue(name) {
|
|
|
108
114
|
}
|
|
109
115
|
exports.getSecretValue = getSecretValue;
|
|
110
116
|
/**
|
|
111
|
-
*
|
|
117
|
+
* Retrieves a list of objects containing information about all secrets stored in the [Secrets Manager](https://support.wix.com/en/article/velo-working-with-the-secrets-manager).
|
|
118
|
+
*
|
|
119
|
+
* The `listSecretInfo()` function returns a Promise that resolves to a list containing information about all the secrets stored on your site.
|
|
120
|
+
*
|
|
121
|
+
* > **Notes:**
|
|
122
|
+
* > - The secret's value does not get returned for security reasons. To retrieve a secret's value, use the [`getSecretValue()`](#getSecretValue) function.
|
|
123
|
+
* > - Do not use `listSecretInfo()` in a **.jsw** file with anonymous permissions! This is a serious security risk which exposes your secrets to potential leaks. To prevent this, implement `listSecretInfo()` in a separate **.js** file to block frontend access. If you must include `listSecretInfo()` in a **.jsw** file, make sure the exported function has [permissions set](https://support.wix.com/en/article/velo-about-web-module-permissions) to **Admin**.
|
|
112
124
|
* @public
|
|
113
125
|
* @documentationMaturity preview
|
|
126
|
+
* @returns Fulfilled - A list of objects containing information about your site's secrets. Rejected - Error message.
|
|
114
127
|
*/
|
|
115
128
|
function listSecretInfo() {
|
|
116
129
|
var _a, _b, _c;
|
|
@@ -155,13 +168,21 @@ function listSecretInfo() {
|
|
|
155
168
|
}
|
|
156
169
|
exports.listSecretInfo = listSecretInfo;
|
|
157
170
|
/**
|
|
158
|
-
* Creates a new secret
|
|
159
|
-
*
|
|
171
|
+
* Creates a new secret.
|
|
172
|
+
*
|
|
173
|
+
* The `createSecret()` function returns a Promise that resolves to the newly created secret's ID when a secret is created in the [Secrets Manager](https://support.wix.com/en/article/velo-working-with-the-secrets-manager). Secrets created by this function are available in the Secrets Manager section in your site's dashboard, just like any other secret created using the UI.
|
|
174
|
+
*
|
|
175
|
+
* >**Notes:**
|
|
176
|
+
* > - The secret's name cannot start with `'wix'` or be identical to an existing secret's name.
|
|
177
|
+
* > - 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()`, or pass the parameters in using the backend [Functional Testing](https://support.wix.com/en/article/velo-functional-testing-in-the-backend) tool.
|
|
160
178
|
* @public
|
|
161
179
|
* @documentationMaturity preview
|
|
162
180
|
* @requiredField secret
|
|
163
181
|
* @requiredField secret.name
|
|
164
182
|
* @requiredField secret.value
|
|
183
|
+
* @param secret - The object including the fields of a new secret.
|
|
184
|
+
* @returns Fulfilled - The ID of the created secret.
|
|
185
|
+
* Rejected - Error message.
|
|
165
186
|
*/
|
|
166
187
|
function createSecret(secret) {
|
|
167
188
|
var _a, _b, _c;
|
|
@@ -208,11 +229,18 @@ function createSecret(secret) {
|
|
|
208
229
|
}
|
|
209
230
|
exports.createSecret = createSecret;
|
|
210
231
|
/**
|
|
211
|
-
* Deletes an existing secret
|
|
212
|
-
*
|
|
232
|
+
* Deletes an existing secret by ID.
|
|
233
|
+
*
|
|
234
|
+
* The `deleteSecret()` function returns a Promise that resolves when a secret from the [Secrets Manager](https://support.wix.com/en/article/velo-working-with-the-secrets-manager) is deleted. You can retrieve the `_id` parameter using the [`listSecretInfo()`](#listSecretInfo) function.
|
|
235
|
+
*
|
|
236
|
+
* >**Note:**
|
|
237
|
+
* > Deleting a secret is irreversible and will break all code using the secret.
|
|
238
|
+
*
|
|
213
239
|
* @public
|
|
214
240
|
* @documentationMaturity preview
|
|
215
241
|
* @requiredField _id
|
|
242
|
+
* @param _id - The unique ID of the secret to be deleted.
|
|
243
|
+
* @returns Fulfilled - When the secret is successfully deleted from the Secrets Manager. Rejected - Error message.
|
|
216
244
|
*/
|
|
217
245
|
function deleteSecret(_id) {
|
|
218
246
|
var _a, _b, _c;
|
|
@@ -260,8 +288,8 @@ function deleteSecret(_id) {
|
|
|
260
288
|
exports.deleteSecret = deleteSecret;
|
|
261
289
|
/**
|
|
262
290
|
* Updates all the fields of an existing secret at once
|
|
263
|
-
* @param _id - The unique
|
|
264
|
-
* @param secret - The secret fields
|
|
291
|
+
* @param _id - The unique ID of the secret to be updated.
|
|
292
|
+
* @param secret - The secret fields to update.
|
|
265
293
|
* @public
|
|
266
294
|
* @documentationMaturity preview
|
|
267
295
|
* @requiredField _id
|
|
@@ -316,8 +344,8 @@ function updateSecret(_id, secret) {
|
|
|
316
344
|
exports.updateSecret = updateSecret;
|
|
317
345
|
/**
|
|
318
346
|
* Updates some or all of the fields of an existing secret
|
|
319
|
-
* @param _id - The unique
|
|
320
|
-
* @param secret - The secret fields
|
|
347
|
+
* @param _id - The unique ID of the secret to be updated.
|
|
348
|
+
* @param secret - The secret fields to update.
|
|
321
349
|
* @public
|
|
322
350
|
* @documentationMaturity preview
|
|
323
351
|
* @requiredField _id
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"velo-secrets-vault-v1-secret.universal.js","sourceRoot":"","sources":["../../../src/velo-secrets-vault-v1-secret.universal.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,kDAAqE;AAErE,2GAA6F;AAE7F,IAAI,SAAS,GAAG,KAAK,CAAC;AAEtB,SAAS,KAAK,CAAC,GAAG,IAAW;IAC3B,SAAS,IAAI,OAAO,CAAC,GAAG,CAAC,GAAG,IAAI,CAAC,CAAC;AACpC,CAAC;AAED,SAAS,SAAS,CAAC,GAAQ;IACzB,OAAO,GAAG,CAAC;AACb,CAAC;AAEY,QAAA,OAAO,GAAG;IACrB,cAAc,EAAE;QACd,EAAE,EAAE,GAAG,EAAE,CAAC,CAAC,SAAS,GAAG,IAAI,CAAC;QAC5B,GAAG,EAAE,GAAG,EAAE,CAAC,CAAC,SAAS,GAAG,KAAK,CAAC;KAC/B;CACF,CAAC;AACF,MAAM,aAAa,GAAG,GAAG,CAAC;AAC1B,MAAM,eAAe,GAAG,GAAG,CAAC;
|
|
1
|
+
{"version":3,"file":"velo-secrets-vault-v1-secret.universal.js","sourceRoot":"","sources":["../../../src/velo-secrets-vault-v1-secret.universal.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,kDAAqE;AAErE,2GAA6F;AAE7F,IAAI,SAAS,GAAG,KAAK,CAAC;AAEtB,SAAS,KAAK,CAAC,GAAG,IAAW;IAC3B,SAAS,IAAI,OAAO,CAAC,GAAG,CAAC,GAAG,IAAI,CAAC,CAAC;AACpC,CAAC;AAED,SAAS,SAAS,CAAC,GAAQ;IACzB,OAAO,GAAG,CAAC;AACb,CAAC;AAEY,QAAA,OAAO,GAAG;IACrB,cAAc,EAAE;QACd,EAAE,EAAE,GAAG,EAAE,CAAC,CAAC,SAAS,GAAG,IAAI,CAAC;QAC5B,GAAG,EAAE,GAAG,EAAE,CAAC,CAAC,SAAS,GAAG,KAAK,CAAC;KAC/B;CACF,CAAC;AACF,MAAM,aAAa,GAAG,GAAG,CAAC;AAC1B,MAAM,eAAe,GAAG,GA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Request, GetSecretValueResponse, ListSecretInfoRequest, ListSecretInfoResponse, UpdateSecretRequest, UpdateSecretResponse } from './velo-secrets-vault-v1-secret.types';
|
|
3
|
-
/**
|
|
3
|
+
/**
|
|
4
|
+
* Retrieves the secret value by the secret name.
|
|
5
|
+
*
|
|
6
|
+
* The `getSecretValue()` function returns a Promise that resolves to the value of the secret that was stored in the Secrets Manager with the given name.
|
|
7
|
+
*
|
|
8
|
+
* >**Note:**
|
|
9
|
+
* > Only use a secret's value in the backend code. Returning the secret value in the frontend is a security risk.
|
|
10
|
+
*/
|
|
4
11
|
export declare function getSecretValue(payload: GetSecretValueRequest): RequestOptionsFactory<GetSecretValueResponse>;
|
|
5
|
-
/**
|
|
12
|
+
/**
|
|
13
|
+
* Retrieves a list of objects containing information about all secrets stored in the [Secrets Manager](https://support.wix.com/en/article/velo-working-with-the-secrets-manager).
|
|
14
|
+
*
|
|
15
|
+
* The `listSecretInfo()` function returns a Promise that resolves to a list containing information about all the secrets stored on your site.
|
|
16
|
+
*
|
|
17
|
+
* > **Notes:**
|
|
18
|
+
* > - The secret's value does not get returned for security reasons. To retrieve a secret's value, use the [`getSecretValue()`](#getSecretValue) function.
|
|
19
|
+
* > - Do not use `listSecretInfo()` in a **.jsw** file with anonymous permissions! This is a serious security risk which exposes your secrets to potential leaks. To prevent this, implement `listSecretInfo()` in a separate **.js** file to block frontend access. If you must include `listSecretInfo()` in a **.jsw** file, make sure the exported function has [permissions set](https://support.wix.com/en/article/velo-about-web-module-permissions) to **Admin**.
|
|
20
|
+
*/
|
|
6
21
|
export declare function listSecretInfo(payload: ListSecretInfoRequest): RequestOptionsFactory<ListSecretInfoResponse>;
|
|
7
|
-
/**
|
|
22
|
+
/**
|
|
23
|
+
* Creates a new secret.
|
|
24
|
+
*
|
|
25
|
+
* The `createSecret()` function returns a Promise that resolves to the newly created secret's ID when a secret is created in the [Secrets Manager](https://support.wix.com/en/article/velo-working-with-the-secrets-manager). Secrets created by this function are available in the Secrets Manager section in your site's dashboard, just like any other secret created using the UI.
|
|
26
|
+
*
|
|
27
|
+
* >**Notes:**
|
|
28
|
+
* > - The secret's name cannot start with `'wix'` or be identical to an existing secret's name.
|
|
29
|
+
* > - 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()`, or pass the parameters in using the backend [Functional Testing](https://support.wix.com/en/article/velo-functional-testing-in-the-backend) tool.
|
|
30
|
+
*/
|
|
8
31
|
export declare function createSecret(payload: CreateSecretRequest): RequestOptionsFactory<CreateSecretResponse>;
|
|
9
|
-
/**
|
|
32
|
+
/**
|
|
33
|
+
* Deletes an existing secret by ID.
|
|
34
|
+
*
|
|
35
|
+
* The `deleteSecret()` function returns a Promise that resolves when a secret from the [Secrets Manager](https://support.wix.com/en/article/velo-working-with-the-secrets-manager) is deleted. You can retrieve the `_id` parameter using the [`listSecretInfo()`](#listSecretInfo) function.
|
|
36
|
+
*
|
|
37
|
+
* >**Note:**
|
|
38
|
+
* > Deleting a secret is irreversible and will break all code using the secret.
|
|
39
|
+
*
|
|
40
|
+
*/
|
|
10
41
|
export declare function deleteSecret(payload: DeleteSecretRequest): RequestOptionsFactory<DeleteSecretResponse>;
|
|
11
42
|
/** Updates all the fields of an existing secret at once */
|
|
12
43
|
export declare function updateSecret(payload: UpdateSecretRequest): RequestOptionsFactory<UpdateSecretResponse>;
|
|
@@ -44,7 +44,14 @@ function resolveWixVeloSecretsVaultV1SecretsVaultServiceUrl(opts) {
|
|
|
44
44
|
};
|
|
45
45
|
return resolveUrl(Object.assign(opts, { domainToMappings }));
|
|
46
46
|
}
|
|
47
|
-
/**
|
|
47
|
+
/**
|
|
48
|
+
* Retrieves the secret value by the secret name.
|
|
49
|
+
*
|
|
50
|
+
* The `getSecretValue()` function returns a Promise that resolves to the value of the secret that was stored in the Secrets Manager with the given name.
|
|
51
|
+
*
|
|
52
|
+
* >**Note:**
|
|
53
|
+
* > Only use a secret's value in the backend code. Returning the secret value in the frontend is a security risk.
|
|
54
|
+
*/
|
|
48
55
|
export function getSecretValue(payload) {
|
|
49
56
|
const { toJSON: toReq, fromJSON: fromReq } = serializer(_getSecretValueRequest, {});
|
|
50
57
|
const { fromJSON: fromRes } = serializer(_getSecretValueResponse, {});
|
|
@@ -67,7 +74,15 @@ export function getSecretValue(payload) {
|
|
|
67
74
|
__getSecretValue.fromReq = fromReq;
|
|
68
75
|
return __getSecretValue;
|
|
69
76
|
}
|
|
70
|
-
/**
|
|
77
|
+
/**
|
|
78
|
+
* Retrieves a list of objects containing information about all secrets stored in the [Secrets Manager](https://support.wix.com/en/article/velo-working-with-the-secrets-manager).
|
|
79
|
+
*
|
|
80
|
+
* The `listSecretInfo()` function returns a Promise that resolves to a list containing information about all the secrets stored on your site.
|
|
81
|
+
*
|
|
82
|
+
* > **Notes:**
|
|
83
|
+
* > - The secret's value does not get returned for security reasons. To retrieve a secret's value, use the [`getSecretValue()`](#getSecretValue) function.
|
|
84
|
+
* > - Do not use `listSecretInfo()` in a **.jsw** file with anonymous permissions! This is a serious security risk which exposes your secrets to potential leaks. To prevent this, implement `listSecretInfo()` in a separate **.js** file to block frontend access. If you must include `listSecretInfo()` in a **.jsw** file, make sure the exported function has [permissions set](https://support.wix.com/en/article/velo-about-web-module-permissions) to **Admin**.
|
|
85
|
+
*/
|
|
71
86
|
export function listSecretInfo(payload) {
|
|
72
87
|
const { toJSON: toReq, fromJSON: fromReq } = serializer(_listSecretInfoRequest, {});
|
|
73
88
|
const { fromJSON: fromRes } = serializer(_listSecretInfoResponse, {
|
|
@@ -92,7 +107,15 @@ export function listSecretInfo(payload) {
|
|
|
92
107
|
__listSecretInfo.fromReq = fromReq;
|
|
93
108
|
return __listSecretInfo;
|
|
94
109
|
}
|
|
95
|
-
/**
|
|
110
|
+
/**
|
|
111
|
+
* Creates a new secret.
|
|
112
|
+
*
|
|
113
|
+
* The `createSecret()` function returns a Promise that resolves to the newly created secret's ID when a secret is created in the [Secrets Manager](https://support.wix.com/en/article/velo-working-with-the-secrets-manager). Secrets created by this function are available in the Secrets Manager section in your site's dashboard, just like any other secret created using the UI.
|
|
114
|
+
*
|
|
115
|
+
* >**Notes:**
|
|
116
|
+
* > - The secret's name cannot start with `'wix'` or be identical to an existing secret's name.
|
|
117
|
+
* > - 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()`, or pass the parameters in using the backend [Functional Testing](https://support.wix.com/en/article/velo-functional-testing-in-the-backend) tool.
|
|
118
|
+
*/
|
|
96
119
|
export function createSecret(payload) {
|
|
97
120
|
const { toJSON: toReq, fromJSON: fromReq } = serializer(_createSecretRequest, { _secret });
|
|
98
121
|
const { fromJSON: fromRes } = serializer(_createSecretResponse, {});
|
|
@@ -115,7 +138,15 @@ export function createSecret(payload) {
|
|
|
115
138
|
__createSecret.fromReq = fromReq;
|
|
116
139
|
return __createSecret;
|
|
117
140
|
}
|
|
118
|
-
/**
|
|
141
|
+
/**
|
|
142
|
+
* Deletes an existing secret by ID.
|
|
143
|
+
*
|
|
144
|
+
* The `deleteSecret()` function returns a Promise that resolves when a secret from the [Secrets Manager](https://support.wix.com/en/article/velo-working-with-the-secrets-manager) is deleted. You can retrieve the `_id` parameter using the [`listSecretInfo()`](#listSecretInfo) function.
|
|
145
|
+
*
|
|
146
|
+
* >**Note:**
|
|
147
|
+
* > Deleting a secret is irreversible and will break all code using the secret.
|
|
148
|
+
*
|
|
149
|
+
*/
|
|
119
150
|
export function deleteSecret(payload) {
|
|
120
151
|
const { toJSON: toReq, fromJSON: fromReq } = serializer(_deleteSecretRequest, {});
|
|
121
152
|
const { fromJSON: fromRes } = serializer(_deleteSecretResponse, {});
|
|
@@ -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,OAAO,EAAE,iBAAiB,EAAE,MAAM,oBAAoB,CAAC;AACvD,OAAO,EAAE,UAAU,EAAE,MAAM,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AE,sBAAsB;gBACjC,IAAI,EAAE,cAAc;gBACpB,IAAI;aACL,CAAC;YACF,IAAI,EAAE,cAAc;YACpB,iBAAiB,EAAE,OAAO;SAC3B,CAAC;QAEF,OAAO,QAAQ,CAAC;IAClB,CAAC;IAED,cAAc,CAAC,OAAO,GAAG,OAAO,CAAC;IAEjC,OAAO,cAAc,CAAC;AACxB,CAAC;AAED,8DAA8D;AAC9D,MAAM,UAAU,qBAAqB,CACnC,OAA4B;IAE5B,MAAM,EAAE,MAAM,EAAE,KAAK,EAAE,QAAQ,EAAE,OAAO,EAAE,GAAG,UAAU,CACrD,oBAAoB,EACpB,EAAE,OAAO,EAAE,CACZ,CAAC;IACF,MAAM,EAAE,QAAQ,EAAE,OAAO,EAAE,GAAG,UAAU,CAAC,qBAAqB,EAAE,EAAE,CAAC,CAAC;IAEpE,SAAS,uBAAuB,CAAC,EAAE,IAAI,EAAO;QAC5C,MAAM,cAAc,GAAG,KAAK,CAAC,OAAO,CAAC,CAAC;QACtC,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;YACpB,iBAAiB,EAAE,OAAO;SAC3B,CAAC;QAEF,OAAO,QAAQ,CAAC;IAClB,CAAC;IAED,uBAAuB,CAAC,OAAO,GAAG,OAAO,CAAC;IAE1C,OAAO,uBAAuB,CAAC;AACjC,CAAC"}
|
|
@@ -1,32 +1,32 @@
|
|
|
1
1
|
export interface Secret {
|
|
2
2
|
/**
|
|
3
|
-
* A globally-unique, immutable identifier assigned to the secret upon creation
|
|
3
|
+
* A globally-unique, immutable identifier assigned to the secret upon creation.
|
|
4
4
|
* @readonly
|
|
5
5
|
*/
|
|
6
6
|
id?: string | null;
|
|
7
7
|
/** A unique, human-friendly name for the secret. Used for retrieving the secret easily at runtime. */
|
|
8
8
|
name?: string | null;
|
|
9
|
-
/** An optional text describing the secret's purpose or any other notes about it */
|
|
9
|
+
/** An optional text describing the secret's purpose or any other notes about it. */
|
|
10
10
|
description?: string | null;
|
|
11
|
-
/** The confidential value that is intended to be stored encrypted */
|
|
11
|
+
/** The confidential value that is intended to be stored encrypted. */
|
|
12
12
|
value?: string | null;
|
|
13
13
|
/**
|
|
14
|
-
* The creation timestamp of the secret
|
|
14
|
+
* The creation timestamp of the secret.
|
|
15
15
|
* @readonly
|
|
16
16
|
*/
|
|
17
17
|
createdDate?: Date;
|
|
18
18
|
/**
|
|
19
|
-
* The last-update timestamp of the secret
|
|
19
|
+
* The last-update timestamp of the secret.
|
|
20
20
|
* @readonly
|
|
21
21
|
*/
|
|
22
22
|
updatedDate?: Date;
|
|
23
23
|
}
|
|
24
24
|
export interface GetSecretValueRequest {
|
|
25
|
-
/** The name of the secret to get the value
|
|
25
|
+
/** The name of the secret to get the value of. */
|
|
26
26
|
name: string;
|
|
27
27
|
}
|
|
28
28
|
export interface GetSecretValueResponse {
|
|
29
|
-
/** The plaintext, unencrypted value of the secret */
|
|
29
|
+
/** The plaintext, unencrypted value of the secret. */
|
|
30
30
|
value?: string;
|
|
31
31
|
}
|
|
32
32
|
export interface ListSecretInfoRequest {
|
|
@@ -36,23 +36,23 @@ export interface ListSecretInfoResponse {
|
|
|
36
36
|
secrets?: Secret[];
|
|
37
37
|
}
|
|
38
38
|
export interface CreateSecretRequest {
|
|
39
|
-
/** A set of fields including info and the actual value to protect */
|
|
39
|
+
/** A set of fields including info and the actual value to protect. */
|
|
40
40
|
secret: Secret;
|
|
41
41
|
}
|
|
42
42
|
export interface CreateSecretResponse {
|
|
43
|
-
/** The globally-unique
|
|
43
|
+
/** The globally-unique ID assigned to the secret by the service. */
|
|
44
44
|
id?: string;
|
|
45
45
|
}
|
|
46
46
|
export interface DeleteSecretRequest {
|
|
47
|
-
/** The unique
|
|
47
|
+
/** The unique ID of the secret to be deleted. */
|
|
48
48
|
id: string;
|
|
49
49
|
}
|
|
50
50
|
export interface DeleteSecretResponse {
|
|
51
51
|
}
|
|
52
52
|
export interface UpdateSecretRequest {
|
|
53
|
-
/** The unique
|
|
53
|
+
/** The unique ID of the secret to be updated. */
|
|
54
54
|
id: string;
|
|
55
|
-
/** The secret fields
|
|
55
|
+
/** The secret fields to update. */
|
|
56
56
|
secret: Secret;
|
|
57
57
|
}
|
|
58
58
|
export interface UpdateSecretResponse {
|
|
@@ -6,99 +6,139 @@ export declare const __debug: {
|
|
|
6
6
|
};
|
|
7
7
|
export interface Secret {
|
|
8
8
|
/**
|
|
9
|
-
*
|
|
9
|
+
* The secret's unique ID.
|
|
10
10
|
* @readonly
|
|
11
11
|
*/
|
|
12
12
|
_id?: string | null;
|
|
13
|
-
/**
|
|
13
|
+
/**
|
|
14
|
+
* A unique, meaningful name used for retrieving the secret at runtime with the [`getSecretValue`](#getSecretValue) function. You can use alphanumeric characters and the following special characters: `_+=-@#$`. Spaces are not supported.
|
|
15
|
+
*
|
|
16
|
+
*/
|
|
14
17
|
name?: string | null;
|
|
15
|
-
/** An optional text describing the secret's purpose or any other notes about it */
|
|
18
|
+
/** An optional text describing the secret's purpose or any other notes about it. */
|
|
16
19
|
description?: string | null;
|
|
17
|
-
/** The confidential value
|
|
20
|
+
/** The confidential secret value to protect, such as an API key. */
|
|
18
21
|
value?: string | null;
|
|
19
22
|
/**
|
|
20
|
-
* The
|
|
23
|
+
* The date and time the secreted was created.
|
|
21
24
|
* @readonly
|
|
22
25
|
*/
|
|
23
26
|
_createdDate?: Date;
|
|
24
27
|
/**
|
|
25
|
-
* The
|
|
28
|
+
* The date and time the secret was last updated.
|
|
26
29
|
* @readonly
|
|
27
30
|
*/
|
|
28
31
|
_updatedDate?: Date;
|
|
29
32
|
}
|
|
30
33
|
export interface GetSecretValueRequest {
|
|
31
|
-
/** The name of the secret to get the value
|
|
34
|
+
/** The name of the secret to get the value of. */
|
|
32
35
|
name: string;
|
|
33
36
|
}
|
|
34
37
|
export interface GetSecretValueResponse {
|
|
35
|
-
/**
|
|
38
|
+
/**
|
|
39
|
+
* The plaintext, unencrypted value of the secret.
|
|
40
|
+
*
|
|
41
|
+
*/
|
|
36
42
|
value?: string;
|
|
37
43
|
}
|
|
38
44
|
export interface ListSecretInfoRequest {
|
|
39
45
|
}
|
|
40
46
|
export interface ListSecretInfoResponse {
|
|
41
|
-
/**
|
|
47
|
+
/** Object containing information for each secret. */
|
|
42
48
|
secrets?: Secret[];
|
|
43
49
|
}
|
|
44
50
|
export interface CreateSecretRequest {
|
|
45
|
-
/**
|
|
51
|
+
/** The object including the fields of a new secret. */
|
|
46
52
|
secret: Secret;
|
|
47
53
|
}
|
|
48
54
|
export interface CreateSecretResponse {
|
|
49
|
-
/**
|
|
55
|
+
/**
|
|
56
|
+
* The globally-unique ID assigned to the secret.
|
|
57
|
+
*
|
|
58
|
+
*/
|
|
50
59
|
_id?: string;
|
|
51
60
|
}
|
|
52
61
|
export interface DeleteSecretRequest {
|
|
53
|
-
/**
|
|
62
|
+
/**
|
|
63
|
+
* The unique ID of the secret to be deleted.
|
|
64
|
+
*
|
|
65
|
+
*/
|
|
54
66
|
_id: string;
|
|
55
67
|
}
|
|
56
68
|
export interface DeleteSecretResponse {
|
|
57
69
|
}
|
|
58
70
|
export interface UpdateSecretRequest {
|
|
59
|
-
/** The unique
|
|
71
|
+
/** The unique ID of the secret to be updated. */
|
|
60
72
|
_id: string;
|
|
61
|
-
/** The secret fields
|
|
73
|
+
/** The secret fields to update. */
|
|
62
74
|
secret: Secret;
|
|
63
75
|
}
|
|
64
76
|
export interface UpdateSecretResponse {
|
|
65
77
|
}
|
|
66
78
|
/**
|
|
67
|
-
*
|
|
68
|
-
*
|
|
79
|
+
* Retrieves the secret value by the secret name.
|
|
80
|
+
*
|
|
81
|
+
* The `getSecretValue()` function returns a Promise that resolves to the value of the secret that was stored in the Secrets Manager with the given name.
|
|
82
|
+
*
|
|
83
|
+
* >**Note:**
|
|
84
|
+
* > Only use a secret's value in the backend code. Returning the secret value in the frontend is a security risk.
|
|
69
85
|
* @public
|
|
70
86
|
* @documentationMaturity preview
|
|
71
87
|
* @requiredField name
|
|
88
|
+
* @param name - The name of the secret to get the value of.
|
|
89
|
+
* @returns Fulfilled - The value of the secret. Rejected - Error message.
|
|
72
90
|
*/
|
|
73
91
|
export declare function getSecretValue(name: string): Promise<GetSecretValueResponse>;
|
|
74
92
|
/**
|
|
75
|
-
*
|
|
93
|
+
* Retrieves a list of objects containing information about all secrets stored in the [Secrets Manager](https://support.wix.com/en/article/velo-working-with-the-secrets-manager).
|
|
94
|
+
*
|
|
95
|
+
* The `listSecretInfo()` function returns a Promise that resolves to a list containing information about all the secrets stored on your site.
|
|
96
|
+
*
|
|
97
|
+
* > **Notes:**
|
|
98
|
+
* > - The secret's value does not get returned for security reasons. To retrieve a secret's value, use the [`getSecretValue()`](#getSecretValue) function.
|
|
99
|
+
* > - Do not use `listSecretInfo()` in a **.jsw** file with anonymous permissions! This is a serious security risk which exposes your secrets to potential leaks. To prevent this, implement `listSecretInfo()` in a separate **.js** file to block frontend access. If you must include `listSecretInfo()` in a **.jsw** file, make sure the exported function has [permissions set](https://support.wix.com/en/article/velo-about-web-module-permissions) to **Admin**.
|
|
76
100
|
* @public
|
|
77
101
|
* @documentationMaturity preview
|
|
102
|
+
* @returns Fulfilled - A list of objects containing information about your site's secrets. Rejected - Error message.
|
|
78
103
|
*/
|
|
79
104
|
export declare function listSecretInfo(): Promise<ListSecretInfoResponse>;
|
|
80
105
|
/**
|
|
81
|
-
* Creates a new secret
|
|
82
|
-
*
|
|
106
|
+
* Creates a new secret.
|
|
107
|
+
*
|
|
108
|
+
* The `createSecret()` function returns a Promise that resolves to the newly created secret's ID when a secret is created in the [Secrets Manager](https://support.wix.com/en/article/velo-working-with-the-secrets-manager). Secrets created by this function are available in the Secrets Manager section in your site's dashboard, just like any other secret created using the UI.
|
|
109
|
+
*
|
|
110
|
+
* >**Notes:**
|
|
111
|
+
* > - The secret's name cannot start with `'wix'` or be identical to an existing secret's name.
|
|
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()`, or pass the parameters in using the backend [Functional Testing](https://support.wix.com/en/article/velo-functional-testing-in-the-backend) tool.
|
|
83
113
|
* @public
|
|
84
114
|
* @documentationMaturity preview
|
|
85
115
|
* @requiredField secret
|
|
86
116
|
* @requiredField secret.name
|
|
87
117
|
* @requiredField secret.value
|
|
118
|
+
* @param secret - The object including the fields of a new secret.
|
|
119
|
+
* @returns Fulfilled - The ID of the created secret.
|
|
120
|
+
* Rejected - Error message.
|
|
88
121
|
*/
|
|
89
122
|
export declare function createSecret(secret: Secret): Promise<CreateSecretResponse>;
|
|
90
123
|
/**
|
|
91
|
-
* Deletes an existing secret
|
|
92
|
-
*
|
|
124
|
+
* Deletes an existing secret by ID.
|
|
125
|
+
*
|
|
126
|
+
* The `deleteSecret()` function returns a Promise that resolves when a secret from the [Secrets Manager](https://support.wix.com/en/article/velo-working-with-the-secrets-manager) is deleted. You can retrieve the `_id` parameter using the [`listSecretInfo()`](#listSecretInfo) function.
|
|
127
|
+
*
|
|
128
|
+
* >**Note:**
|
|
129
|
+
* > Deleting a secret is irreversible and will break all code using the secret.
|
|
130
|
+
*
|
|
93
131
|
* @public
|
|
94
132
|
* @documentationMaturity preview
|
|
95
133
|
* @requiredField _id
|
|
134
|
+
* @param _id - The unique ID of the secret to be deleted.
|
|
135
|
+
* @returns Fulfilled - When the secret is successfully deleted from the Secrets Manager. Rejected - Error message.
|
|
96
136
|
*/
|
|
97
137
|
export declare function deleteSecret(_id: string): Promise<void>;
|
|
98
138
|
/**
|
|
99
139
|
* Updates all the fields of an existing secret at once
|
|
100
|
-
* @param _id - The unique
|
|
101
|
-
* @param secret - The secret fields
|
|
140
|
+
* @param _id - The unique ID of the secret to be updated.
|
|
141
|
+
* @param secret - The secret fields to update.
|
|
102
142
|
* @public
|
|
103
143
|
* @documentationMaturity preview
|
|
104
144
|
* @requiredField _id
|
|
@@ -109,8 +149,8 @@ export declare function deleteSecret(_id: string): Promise<void>;
|
|
|
109
149
|
export declare function updateSecret(_id: string, secret: Secret): Promise<void>;
|
|
110
150
|
/**
|
|
111
151
|
* Updates some or all of the fields of an existing secret
|
|
112
|
-
* @param _id - The unique
|
|
113
|
-
* @param secret - The secret fields
|
|
152
|
+
* @param _id - The unique ID of the secret to be updated.
|
|
153
|
+
* @param secret - The secret fields to update.
|
|
114
154
|
* @public
|
|
115
155
|
* @documentationMaturity preview
|
|
116
156
|
* @requiredField _id
|
|
@@ -35,11 +35,17 @@ const _listSecretInfoResponse = {};
|
|
|
35
35
|
const _updateSecretRequest = {};
|
|
36
36
|
const _updateSecretResponse = {};
|
|
37
37
|
/**
|
|
38
|
-
*
|
|
39
|
-
*
|
|
38
|
+
* Retrieves the secret value by the secret name.
|
|
39
|
+
*
|
|
40
|
+
* The `getSecretValue()` function returns a Promise that resolves to the value of the secret that was stored in the Secrets Manager with the given name.
|
|
41
|
+
*
|
|
42
|
+
* >**Note:**
|
|
43
|
+
* > Only use a secret's value in the backend code. Returning the secret value in the frontend is a security risk.
|
|
40
44
|
* @public
|
|
41
45
|
* @documentationMaturity preview
|
|
42
46
|
* @requiredField name
|
|
47
|
+
* @param name - The name of the secret to get the value of.
|
|
48
|
+
* @returns Fulfilled - The value of the secret. Rejected - Error message.
|
|
43
49
|
*/
|
|
44
50
|
export function getSecretValue(name) {
|
|
45
51
|
var _a, _b, _c;
|
|
@@ -85,9 +91,16 @@ export function getSecretValue(name) {
|
|
|
85
91
|
});
|
|
86
92
|
}
|
|
87
93
|
/**
|
|
88
|
-
*
|
|
94
|
+
* Retrieves a list of objects containing information about all secrets stored in the [Secrets Manager](https://support.wix.com/en/article/velo-working-with-the-secrets-manager).
|
|
95
|
+
*
|
|
96
|
+
* The `listSecretInfo()` function returns a Promise that resolves to a list containing information about all the secrets stored on your site.
|
|
97
|
+
*
|
|
98
|
+
* > **Notes:**
|
|
99
|
+
* > - The secret's value does not get returned for security reasons. To retrieve a secret's value, use the [`getSecretValue()`](#getSecretValue) function.
|
|
100
|
+
* > - Do not use `listSecretInfo()` in a **.jsw** file with anonymous permissions! This is a serious security risk which exposes your secrets to potential leaks. To prevent this, implement `listSecretInfo()` in a separate **.js** file to block frontend access. If you must include `listSecretInfo()` in a **.jsw** file, make sure the exported function has [permissions set](https://support.wix.com/en/article/velo-about-web-module-permissions) to **Admin**.
|
|
89
101
|
* @public
|
|
90
102
|
* @documentationMaturity preview
|
|
103
|
+
* @returns Fulfilled - A list of objects containing information about your site's secrets. Rejected - Error message.
|
|
91
104
|
*/
|
|
92
105
|
export function listSecretInfo() {
|
|
93
106
|
var _a, _b, _c;
|
|
@@ -131,13 +144,21 @@ export function listSecretInfo() {
|
|
|
131
144
|
});
|
|
132
145
|
}
|
|
133
146
|
/**
|
|
134
|
-
* Creates a new secret
|
|
135
|
-
*
|
|
147
|
+
* Creates a new secret.
|
|
148
|
+
*
|
|
149
|
+
* The `createSecret()` function returns a Promise that resolves to the newly created secret's ID when a secret is created in the [Secrets Manager](https://support.wix.com/en/article/velo-working-with-the-secrets-manager). Secrets created by this function are available in the Secrets Manager section in your site's dashboard, just like any other secret created using the UI.
|
|
150
|
+
*
|
|
151
|
+
* >**Notes:**
|
|
152
|
+
* > - The secret's name cannot start with `'wix'` or be identical to an existing secret's name.
|
|
153
|
+
* > - 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()`, or pass the parameters in using the backend [Functional Testing](https://support.wix.com/en/article/velo-functional-testing-in-the-backend) tool.
|
|
136
154
|
* @public
|
|
137
155
|
* @documentationMaturity preview
|
|
138
156
|
* @requiredField secret
|
|
139
157
|
* @requiredField secret.name
|
|
140
158
|
* @requiredField secret.value
|
|
159
|
+
* @param secret - The object including the fields of a new secret.
|
|
160
|
+
* @returns Fulfilled - The ID of the created secret.
|
|
161
|
+
* Rejected - Error message.
|
|
141
162
|
*/
|
|
142
163
|
export function createSecret(secret) {
|
|
143
164
|
var _a, _b, _c;
|
|
@@ -183,11 +204,18 @@ export function createSecret(secret) {
|
|
|
183
204
|
});
|
|
184
205
|
}
|
|
185
206
|
/**
|
|
186
|
-
* Deletes an existing secret
|
|
187
|
-
*
|
|
207
|
+
* Deletes an existing secret by ID.
|
|
208
|
+
*
|
|
209
|
+
* The `deleteSecret()` function returns a Promise that resolves when a secret from the [Secrets Manager](https://support.wix.com/en/article/velo-working-with-the-secrets-manager) is deleted. You can retrieve the `_id` parameter using the [`listSecretInfo()`](#listSecretInfo) function.
|
|
210
|
+
*
|
|
211
|
+
* >**Note:**
|
|
212
|
+
* > Deleting a secret is irreversible and will break all code using the secret.
|
|
213
|
+
*
|
|
188
214
|
* @public
|
|
189
215
|
* @documentationMaturity preview
|
|
190
216
|
* @requiredField _id
|
|
217
|
+
* @param _id - The unique ID of the secret to be deleted.
|
|
218
|
+
* @returns Fulfilled - When the secret is successfully deleted from the Secrets Manager. Rejected - Error message.
|
|
191
219
|
*/
|
|
192
220
|
export function deleteSecret(_id) {
|
|
193
221
|
var _a, _b, _c;
|
|
@@ -234,8 +262,8 @@ export function deleteSecret(_id) {
|
|
|
234
262
|
}
|
|
235
263
|
/**
|
|
236
264
|
* Updates all the fields of an existing secret at once
|
|
237
|
-
* @param _id - The unique
|
|
238
|
-
* @param secret - The secret fields
|
|
265
|
+
* @param _id - The unique ID of the secret to be updated.
|
|
266
|
+
* @param secret - The secret fields to update.
|
|
239
267
|
* @public
|
|
240
268
|
* @documentationMaturity preview
|
|
241
269
|
* @requiredField _id
|
|
@@ -289,8 +317,8 @@ export function updateSecret(_id, secret) {
|
|
|
289
317
|
}
|
|
290
318
|
/**
|
|
291
319
|
* Updates some or all of the fields of an existing secret
|
|
292
|
-
* @param _id - The unique
|
|
293
|
-
* @param secret - The secret fields
|
|
320
|
+
* @param _id - The unique ID of the secret to be updated.
|
|
321
|
+
* @param secret - The secret fields to update.
|
|
294
322
|
* @public
|
|
295
323
|
* @documentationMaturity preview
|
|
296
324
|
* @requiredField _id
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"velo-secrets-vault-v1-secret.universal.js","sourceRoot":"","sources":["../../../src/velo-secrets-vault-v1-secret.universal.ts"],"names":[],"mappings":";;;;;;;;;AAAA,OAAO,EAAE,UAAU,EAAE,cAAc,EAAE,MAAM,yBAAyB,CAAC;AAErE,OAAO,KAAK,qCAAqC,MAAM,qCAAqC,CAAC;AAE7F,IAAI,SAAS,GAAG,KAAK,CAAC;AAEtB,SAAS,KAAK,CAAC,GAAG,IAAW;IAC3B,SAAS,IAAI,OAAO,CAAC,GAAG,CAAC,GAAG,IAAI,CAAC,CAAC;AACpC,CAAC;AAED,SAAS,SAAS,CAAC,GAAQ;IACzB,OAAO,GAAG,CAAC;AACb,CAAC;AAED,MAAM,CAAC,MAAM,OAAO,GAAG;IACrB,cAAc,EAAE;QACd,EAAE,EAAE,GAAG,EAAE,CAAC,CAAC,SAAS,GAAG,IAAI,CAAC;QAC5B,GAAG,EAAE,GAAG,EAAE,CAAC,CAAC,SAAS,GAAG,KAAK,CAAC;KAC/B;CACF,CAAC;AACF,MAAM,aAAa,GAAG,GAAG,CAAC;AAC1B,MAAM,eAAe,GAAG,GAAG,CAAC;
|
|
1
|
+
{"version":3,"file":"velo-secrets-vault-v1-secret.universal.js","sourceRoot":"","sources":["../../../src/velo-secrets-vault-v1-secret.universal.ts"],"names":[],"mappings":";;;;;;;;;AAAA,OAAO,EAAE,UAAU,EAAE,cAAc,EAAE,MAAM,yBAAyB,CAAC;AAErE,OAAO,KAAK,qCAAqC,MAAM,qCAAqC,CAAC;AAE7F,IAAI,SAAS,GAAG,KAAK,CAAC;AAEtB,SAAS,KAAK,CAAC,GAAG,IAAW;IAC3B,SAAS,IAAI,OAAO,CAAC,GAAG,CAAC,GAAG,IAAI,CAAC,CAAC;AACpC,CAAC;AAED,SAAS,SAAS,C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
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@wix/secrets",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.2",
|
|
4
4
|
"publishConfig": {
|
|
5
5
|
"registry": "https://registry.npmjs.org/",
|
|
6
6
|
"access": "public"
|
|
@@ -33,5 +33,5 @@
|
|
|
33
33
|
"groupId": "com.wixpress.public-sdk-autogen"
|
|
34
34
|
}
|
|
35
35
|
},
|
|
36
|
-
"falconPackageHash": "
|
|
36
|
+
"falconPackageHash": "9445cd7ccd32bf280e54c4fcb592b47f99ad8d4b1234c0144905c51f"
|
|
37
37
|
}
|