@wix/secrets 1.0.42 → 1.0.43
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/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@wix/secrets",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.43",
|
|
4
4
|
"publishConfig": {
|
|
5
5
|
"registry": "https://registry.npmjs.org/",
|
|
6
6
|
"access": "public"
|
|
@@ -21,7 +21,7 @@
|
|
|
21
21
|
"type-bundles"
|
|
22
22
|
],
|
|
23
23
|
"dependencies": {
|
|
24
|
-
"@wix/secrets_secrets": "1.0.
|
|
24
|
+
"@wix/secrets_secrets": "1.0.31"
|
|
25
25
|
},
|
|
26
26
|
"devDependencies": {
|
|
27
27
|
"glob": "^10.4.1",
|
|
@@ -46,5 +46,5 @@
|
|
|
46
46
|
"fqdn": ""
|
|
47
47
|
}
|
|
48
48
|
},
|
|
49
|
-
"falconPackageHash": "
|
|
49
|
+
"falconPackageHash": "bf2d19c272a275b1f50acdac9db19522b5c2761b8a820f30ae969993"
|
|
50
50
|
}
|
|
@@ -478,63 +478,55 @@ type MaybeContext<T extends Descriptors> = globalThis.ContextualClient extends {
|
|
|
478
478
|
|
|
479
479
|
interface Secret {
|
|
480
480
|
/**
|
|
481
|
-
*
|
|
481
|
+
* Secret ID.
|
|
482
482
|
* @readonly
|
|
483
483
|
*/
|
|
484
484
|
_id?: string | null;
|
|
485
485
|
/**
|
|
486
|
-
* A unique,
|
|
486
|
+
* A unique, human-friendly name for the secret. Use it to retrieve the secret value easily with the [Get Secret Value](https://dev.wix.com/docs/rest/business-management/secrets/get-secret-value) endpoint.
|
|
487
487
|
*
|
|
488
|
+
* **Note:** You can use alphanumeric characters and the following special characters: `_+=-@#$`. Spaces are not supported.
|
|
488
489
|
*/
|
|
489
490
|
name?: string | null;
|
|
490
491
|
/** An optional text describing the secret's purpose or any other notes about it. */
|
|
491
492
|
description?: string | null;
|
|
492
|
-
/** The confidential value
|
|
493
|
+
/** The encrypted confidential value. */
|
|
493
494
|
value?: string | null;
|
|
494
495
|
/**
|
|
495
|
-
*
|
|
496
|
+
* Date and time when the secret was created.
|
|
496
497
|
* @readonly
|
|
497
498
|
*/
|
|
498
499
|
_createdDate?: Date | null;
|
|
499
500
|
/**
|
|
500
|
-
*
|
|
501
|
+
* Date and time when the secret was updated.
|
|
501
502
|
* @readonly
|
|
502
503
|
*/
|
|
503
504
|
_updatedDate?: Date | null;
|
|
504
505
|
}
|
|
505
506
|
interface GetSecretValueRequest {
|
|
506
|
-
/**
|
|
507
|
+
/** Secret name. */
|
|
507
508
|
name: string;
|
|
508
509
|
}
|
|
509
510
|
interface GetSecretValueResponse {
|
|
510
|
-
/**
|
|
511
|
-
* The plaintext, unencrypted value of the secret.
|
|
512
|
-
*
|
|
513
|
-
*/
|
|
511
|
+
/** The plaintext, unencrypted value of the secret. */
|
|
514
512
|
value?: string;
|
|
515
513
|
}
|
|
516
514
|
interface ListSecretInfoRequest {
|
|
517
515
|
}
|
|
518
516
|
interface ListSecretInfoResponse {
|
|
519
|
-
/**
|
|
517
|
+
/** A list of secrets with encrypted values. */
|
|
520
518
|
secrets?: Secret[];
|
|
521
519
|
}
|
|
522
520
|
interface CreateSecretRequest {
|
|
523
|
-
/**
|
|
521
|
+
/** Details of a secret. */
|
|
524
522
|
secret: Secret;
|
|
525
523
|
}
|
|
526
524
|
interface CreateSecretResponse {
|
|
527
|
-
/**
|
|
528
|
-
* The globally-unique ID assigned to the secret.
|
|
529
|
-
*
|
|
530
|
-
*/
|
|
525
|
+
/** Secret ID. */
|
|
531
526
|
_id?: string;
|
|
532
527
|
}
|
|
533
528
|
interface DeleteSecretRequest {
|
|
534
|
-
/**
|
|
535
|
-
* The unique ID of the secret to be deleted.
|
|
536
|
-
*
|
|
537
|
-
*/
|
|
529
|
+
/** ID of the secret to delete. */
|
|
538
530
|
_id: string;
|
|
539
531
|
}
|
|
540
532
|
interface DeleteSecretResponse {
|
|
@@ -724,79 +716,45 @@ interface SecretUpdatedEnvelope {
|
|
|
724
716
|
declare function getSecretValue$1(httpClient: HttpClient): GetSecretValueSignature;
|
|
725
717
|
interface GetSecretValueSignature {
|
|
726
718
|
/**
|
|
727
|
-
* Retrieves
|
|
728
|
-
*
|
|
729
|
-
* The `getSecretValue()` function returns a Promise that resolves to the value of the secret with the specified given name.
|
|
730
|
-
*
|
|
731
|
-
* >**Note:**
|
|
732
|
-
* > Only use a secret's value in the backend code. Returning the secret value in the frontend is a security risk.
|
|
719
|
+
* Retrieves a secret value by name.
|
|
733
720
|
* @param - The name of the secret to get the value of.
|
|
734
|
-
* @returns Fulfilled - The value of the secret. Rejected - Error message.
|
|
735
721
|
*/
|
|
736
722
|
(name: string): Promise<GetSecretValueResponse & GetSecretValueResponseNonNullableFields>;
|
|
737
723
|
}
|
|
738
724
|
declare function listSecretInfo$1(httpClient: HttpClient): ListSecretInfoSignature;
|
|
739
725
|
interface ListSecretInfoSignature {
|
|
740
726
|
/**
|
|
741
|
-
* Retrieves a list of
|
|
742
|
-
*
|
|
743
|
-
* The `listSecretInfo()` function returns a Promise that resolves to a list containing information about all secrets stored on your site.
|
|
727
|
+
* Retrieves a list of secrets.
|
|
744
728
|
*
|
|
745
|
-
*
|
|
746
|
-
* > - The secret's value does not get returned for security reasons. To retrieve a secret's value, use the [`getSecretValue()`](#getSecretValue) function.
|
|
747
|
-
* @returns Fulfilled - A list of objects containing information about your site's secrets. Rejected - Error message.
|
|
729
|
+
* >**Note:** This endpoint doesn't return the secret's value for security reasons. To retrieve the value, call [Get Secret Value](https://dev.wix.com/docs/rest/business-management/secrets/get-secret-value).
|
|
748
730
|
*/
|
|
749
731
|
(): Promise<ListSecretInfoResponse>;
|
|
750
732
|
}
|
|
751
733
|
declare function createSecret$1(httpClient: HttpClient): CreateSecretSignature;
|
|
752
734
|
interface CreateSecretSignature {
|
|
753
735
|
/**
|
|
754
|
-
* Creates a
|
|
755
|
-
*
|
|
756
|
-
* The `createSecret()` function returns a Promise that resolves secret ID when the secret is created.
|
|
757
|
-
*
|
|
758
|
-
* >**Notes:**
|
|
759
|
-
* > - The secret's name cannot start with `'wix'` or be identical to an existing secret's name.
|
|
760
|
-
* > - 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()`.
|
|
736
|
+
* Creates a secret.
|
|
761
737
|
* @param - Fields of a new secret.
|
|
762
|
-
* @returns
|
|
763
|
-
* Rejected - Error message.
|
|
738
|
+
* @returns Secret ID.
|
|
764
739
|
*/
|
|
765
740
|
(secret: Secret): Promise<string>;
|
|
766
741
|
}
|
|
767
742
|
declare function deleteSecret$1(httpClient: HttpClient): DeleteSecretSignature;
|
|
768
743
|
interface DeleteSecretSignature {
|
|
769
744
|
/**
|
|
770
|
-
* Deletes
|
|
771
|
-
*
|
|
772
|
-
* The `deleteSecret()` function returns a Promise that resolves when the secret is deleted. You can retrieve the secret `_id` using the [`listSecretInfo()`](#listsecretinfo) function.
|
|
773
|
-
*
|
|
774
|
-
* >**Note:**
|
|
775
|
-
* > Deleting a secret is irreversible and will break all code using the secret.
|
|
776
|
-
*
|
|
745
|
+
* Deletes a secret.
|
|
777
746
|
* @param - The unique ID of the secret to be deleted.
|
|
778
|
-
* @returns Fulfilled - When the secret is successfully deleted. Rejected - Error message.
|
|
779
747
|
*/
|
|
780
748
|
(_id: string): Promise<void>;
|
|
781
749
|
}
|
|
782
750
|
declare function updateSecret$1(httpClient: HttpClient): UpdateSecretSignature;
|
|
783
751
|
interface UpdateSecretSignature {
|
|
784
752
|
/**
|
|
785
|
-
* Updates
|
|
786
|
-
*
|
|
787
|
-
*
|
|
788
|
-
* The `updateSecret()` function returns a Promise that resolves when the secret is successfully updated. You can update one or more fields. Only fields passed in the `secret` object will be updated. All other properties will remain unchanged.
|
|
789
|
-
*
|
|
790
|
-
* You can retrieve the `_id` parameter from the [`listSecretInfo()`](#listsecretinfo) function. The secret `_id` is different from the secret `name` used by the [`getSecretValue()`](#getsecretvalue) function.
|
|
753
|
+
* Updates 1 or all fields of a secret.
|
|
791
754
|
*
|
|
792
|
-
*
|
|
793
|
-
* > - Changing a secret's name or value will break all code using the secret.
|
|
794
|
-
* > - You can't rename the secret with a name of an existing secret.
|
|
795
|
-
* > - 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()`.
|
|
755
|
+
* To get the secret ID, call [List Secret Info](https://dev.wix.com/docs/rest/business-management/secrets/list-secret-info).
|
|
796
756
|
* @param - ID of the secret to update.
|
|
797
757
|
* @param - Details of a secret.
|
|
798
|
-
* @returns Fulfilled - When the secret is updated.
|
|
799
|
-
* Rejected - Error message.
|
|
800
758
|
*/
|
|
801
759
|
(_id: string, secret: Secret): Promise<void>;
|
|
802
760
|
}
|
|
@@ -478,63 +478,55 @@ type MaybeContext<T extends Descriptors> = globalThis.ContextualClient extends {
|
|
|
478
478
|
|
|
479
479
|
interface Secret {
|
|
480
480
|
/**
|
|
481
|
-
*
|
|
481
|
+
* Secret ID.
|
|
482
482
|
* @readonly
|
|
483
483
|
*/
|
|
484
484
|
_id?: string | null;
|
|
485
485
|
/**
|
|
486
|
-
* A unique,
|
|
486
|
+
* A unique, human-friendly name for the secret. Use it to retrieve the secret value easily with the [Get Secret Value](https://dev.wix.com/docs/rest/business-management/secrets/get-secret-value) endpoint.
|
|
487
487
|
*
|
|
488
|
+
* **Note:** You can use alphanumeric characters and the following special characters: `_+=-@#$`. Spaces are not supported.
|
|
488
489
|
*/
|
|
489
490
|
name?: string | null;
|
|
490
491
|
/** An optional text describing the secret's purpose or any other notes about it. */
|
|
491
492
|
description?: string | null;
|
|
492
|
-
/** The confidential value
|
|
493
|
+
/** The encrypted confidential value. */
|
|
493
494
|
value?: string | null;
|
|
494
495
|
/**
|
|
495
|
-
*
|
|
496
|
+
* Date and time when the secret was created.
|
|
496
497
|
* @readonly
|
|
497
498
|
*/
|
|
498
499
|
_createdDate?: Date | null;
|
|
499
500
|
/**
|
|
500
|
-
*
|
|
501
|
+
* Date and time when the secret was updated.
|
|
501
502
|
* @readonly
|
|
502
503
|
*/
|
|
503
504
|
_updatedDate?: Date | null;
|
|
504
505
|
}
|
|
505
506
|
interface GetSecretValueRequest {
|
|
506
|
-
/**
|
|
507
|
+
/** Secret name. */
|
|
507
508
|
name: string;
|
|
508
509
|
}
|
|
509
510
|
interface GetSecretValueResponse {
|
|
510
|
-
/**
|
|
511
|
-
* The plaintext, unencrypted value of the secret.
|
|
512
|
-
*
|
|
513
|
-
*/
|
|
511
|
+
/** The plaintext, unencrypted value of the secret. */
|
|
514
512
|
value?: string;
|
|
515
513
|
}
|
|
516
514
|
interface ListSecretInfoRequest {
|
|
517
515
|
}
|
|
518
516
|
interface ListSecretInfoResponse {
|
|
519
|
-
/**
|
|
517
|
+
/** A list of secrets with encrypted values. */
|
|
520
518
|
secrets?: Secret[];
|
|
521
519
|
}
|
|
522
520
|
interface CreateSecretRequest {
|
|
523
|
-
/**
|
|
521
|
+
/** Details of a secret. */
|
|
524
522
|
secret: Secret;
|
|
525
523
|
}
|
|
526
524
|
interface CreateSecretResponse {
|
|
527
|
-
/**
|
|
528
|
-
* The globally-unique ID assigned to the secret.
|
|
529
|
-
*
|
|
530
|
-
*/
|
|
525
|
+
/** Secret ID. */
|
|
531
526
|
_id?: string;
|
|
532
527
|
}
|
|
533
528
|
interface DeleteSecretRequest {
|
|
534
|
-
/**
|
|
535
|
-
* The unique ID of the secret to be deleted.
|
|
536
|
-
*
|
|
537
|
-
*/
|
|
529
|
+
/** ID of the secret to delete. */
|
|
538
530
|
_id: string;
|
|
539
531
|
}
|
|
540
532
|
interface DeleteSecretResponse {
|
|
@@ -724,79 +716,45 @@ interface SecretUpdatedEnvelope {
|
|
|
724
716
|
declare function getSecretValue$1(httpClient: HttpClient): GetSecretValueSignature;
|
|
725
717
|
interface GetSecretValueSignature {
|
|
726
718
|
/**
|
|
727
|
-
* Retrieves
|
|
728
|
-
*
|
|
729
|
-
* The `getSecretValue()` function returns a Promise that resolves to the value of the secret with the specified given name.
|
|
730
|
-
*
|
|
731
|
-
* >**Note:**
|
|
732
|
-
* > Only use a secret's value in the backend code. Returning the secret value in the frontend is a security risk.
|
|
719
|
+
* Retrieves a secret value by name.
|
|
733
720
|
* @param - The name of the secret to get the value of.
|
|
734
|
-
* @returns Fulfilled - The value of the secret. Rejected - Error message.
|
|
735
721
|
*/
|
|
736
722
|
(name: string): Promise<GetSecretValueResponse & GetSecretValueResponseNonNullableFields>;
|
|
737
723
|
}
|
|
738
724
|
declare function listSecretInfo$1(httpClient: HttpClient): ListSecretInfoSignature;
|
|
739
725
|
interface ListSecretInfoSignature {
|
|
740
726
|
/**
|
|
741
|
-
* Retrieves a list of
|
|
742
|
-
*
|
|
743
|
-
* The `listSecretInfo()` function returns a Promise that resolves to a list containing information about all secrets stored on your site.
|
|
727
|
+
* Retrieves a list of secrets.
|
|
744
728
|
*
|
|
745
|
-
*
|
|
746
|
-
* > - The secret's value does not get returned for security reasons. To retrieve a secret's value, use the [`getSecretValue()`](#getSecretValue) function.
|
|
747
|
-
* @returns Fulfilled - A list of objects containing information about your site's secrets. Rejected - Error message.
|
|
729
|
+
* >**Note:** This endpoint doesn't return the secret's value for security reasons. To retrieve the value, call [Get Secret Value](https://dev.wix.com/docs/rest/business-management/secrets/get-secret-value).
|
|
748
730
|
*/
|
|
749
731
|
(): Promise<ListSecretInfoResponse>;
|
|
750
732
|
}
|
|
751
733
|
declare function createSecret$1(httpClient: HttpClient): CreateSecretSignature;
|
|
752
734
|
interface CreateSecretSignature {
|
|
753
735
|
/**
|
|
754
|
-
* Creates a
|
|
755
|
-
*
|
|
756
|
-
* The `createSecret()` function returns a Promise that resolves secret ID when the secret is created.
|
|
757
|
-
*
|
|
758
|
-
* >**Notes:**
|
|
759
|
-
* > - The secret's name cannot start with `'wix'` or be identical to an existing secret's name.
|
|
760
|
-
* > - 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()`.
|
|
736
|
+
* Creates a secret.
|
|
761
737
|
* @param - Fields of a new secret.
|
|
762
|
-
* @returns
|
|
763
|
-
* Rejected - Error message.
|
|
738
|
+
* @returns Secret ID.
|
|
764
739
|
*/
|
|
765
740
|
(secret: Secret): Promise<string>;
|
|
766
741
|
}
|
|
767
742
|
declare function deleteSecret$1(httpClient: HttpClient): DeleteSecretSignature;
|
|
768
743
|
interface DeleteSecretSignature {
|
|
769
744
|
/**
|
|
770
|
-
* Deletes
|
|
771
|
-
*
|
|
772
|
-
* The `deleteSecret()` function returns a Promise that resolves when the secret is deleted. You can retrieve the secret `_id` using the [`listSecretInfo()`](#listsecretinfo) function.
|
|
773
|
-
*
|
|
774
|
-
* >**Note:**
|
|
775
|
-
* > Deleting a secret is irreversible and will break all code using the secret.
|
|
776
|
-
*
|
|
745
|
+
* Deletes a secret.
|
|
777
746
|
* @param - The unique ID of the secret to be deleted.
|
|
778
|
-
* @returns Fulfilled - When the secret is successfully deleted. Rejected - Error message.
|
|
779
747
|
*/
|
|
780
748
|
(_id: string): Promise<void>;
|
|
781
749
|
}
|
|
782
750
|
declare function updateSecret$1(httpClient: HttpClient): UpdateSecretSignature;
|
|
783
751
|
interface UpdateSecretSignature {
|
|
784
752
|
/**
|
|
785
|
-
* Updates
|
|
786
|
-
*
|
|
787
|
-
*
|
|
788
|
-
* The `updateSecret()` function returns a Promise that resolves when the secret is successfully updated. You can update one or more fields. Only fields passed in the `secret` object will be updated. All other properties will remain unchanged.
|
|
789
|
-
*
|
|
790
|
-
* You can retrieve the `_id` parameter from the [`listSecretInfo()`](#listsecretinfo) function. The secret `_id` is different from the secret `name` used by the [`getSecretValue()`](#getsecretvalue) function.
|
|
753
|
+
* Updates 1 or all fields of a secret.
|
|
791
754
|
*
|
|
792
|
-
*
|
|
793
|
-
* > - Changing a secret's name or value will break all code using the secret.
|
|
794
|
-
* > - You can't rename the secret with a name of an existing secret.
|
|
795
|
-
* > - 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()`.
|
|
755
|
+
* To get the secret ID, call [List Secret Info](https://dev.wix.com/docs/rest/business-management/secrets/list-secret-info).
|
|
796
756
|
* @param - ID of the secret to update.
|
|
797
757
|
* @param - Details of a secret.
|
|
798
|
-
* @returns Fulfilled - When the secret is updated.
|
|
799
|
-
* Rejected - Error message.
|
|
800
758
|
*/
|
|
801
759
|
(_id: string, secret: Secret): Promise<void>;
|
|
802
760
|
}
|
|
@@ -70,63 +70,55 @@ interface CreateSecretResponseNonNullableFields$1 {
|
|
|
70
70
|
|
|
71
71
|
interface Secret {
|
|
72
72
|
/**
|
|
73
|
-
*
|
|
73
|
+
* Secret ID.
|
|
74
74
|
* @readonly
|
|
75
75
|
*/
|
|
76
76
|
_id?: string | null;
|
|
77
77
|
/**
|
|
78
|
-
* A unique,
|
|
78
|
+
* A unique, human-friendly name for the secret. Use it to retrieve the secret value easily with the [Get Secret Value](https://dev.wix.com/docs/rest/business-management/secrets/get-secret-value) endpoint.
|
|
79
79
|
*
|
|
80
|
+
* **Note:** You can use alphanumeric characters and the following special characters: `_+=-@#$`. Spaces are not supported.
|
|
80
81
|
*/
|
|
81
82
|
name?: string | null;
|
|
82
83
|
/** An optional text describing the secret's purpose or any other notes about it. */
|
|
83
84
|
description?: string | null;
|
|
84
|
-
/** The confidential value
|
|
85
|
+
/** The encrypted confidential value. */
|
|
85
86
|
value?: string | null;
|
|
86
87
|
/**
|
|
87
|
-
*
|
|
88
|
+
* Date and time when the secret was created.
|
|
88
89
|
* @readonly
|
|
89
90
|
*/
|
|
90
91
|
_createdDate?: Date | null;
|
|
91
92
|
/**
|
|
92
|
-
*
|
|
93
|
+
* Date and time when the secret was updated.
|
|
93
94
|
* @readonly
|
|
94
95
|
*/
|
|
95
96
|
_updatedDate?: Date | null;
|
|
96
97
|
}
|
|
97
98
|
interface GetSecretValueRequest {
|
|
98
|
-
/**
|
|
99
|
+
/** Secret name. */
|
|
99
100
|
name: string;
|
|
100
101
|
}
|
|
101
102
|
interface GetSecretValueResponse {
|
|
102
|
-
/**
|
|
103
|
-
* The plaintext, unencrypted value of the secret.
|
|
104
|
-
*
|
|
105
|
-
*/
|
|
103
|
+
/** The plaintext, unencrypted value of the secret. */
|
|
106
104
|
value?: string;
|
|
107
105
|
}
|
|
108
106
|
interface ListSecretInfoRequest {
|
|
109
107
|
}
|
|
110
108
|
interface ListSecretInfoResponse {
|
|
111
|
-
/**
|
|
109
|
+
/** A list of secrets with encrypted values. */
|
|
112
110
|
secrets?: Secret[];
|
|
113
111
|
}
|
|
114
112
|
interface CreateSecretRequest {
|
|
115
|
-
/**
|
|
113
|
+
/** Details of a secret. */
|
|
116
114
|
secret: Secret;
|
|
117
115
|
}
|
|
118
116
|
interface CreateSecretResponse {
|
|
119
|
-
/**
|
|
120
|
-
* The globally-unique ID assigned to the secret.
|
|
121
|
-
*
|
|
122
|
-
*/
|
|
117
|
+
/** Secret ID. */
|
|
123
118
|
_id?: string;
|
|
124
119
|
}
|
|
125
120
|
interface DeleteSecretRequest {
|
|
126
|
-
/**
|
|
127
|
-
* The unique ID of the secret to be deleted.
|
|
128
|
-
*
|
|
129
|
-
*/
|
|
121
|
+
/** ID of the secret to delete. */
|
|
130
122
|
_id: string;
|
|
131
123
|
}
|
|
132
124
|
interface DeleteSecretResponse {
|