@wix/secrets 1.0.42 → 1.0.44

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.42",
3
+ "version": "1.0.44",
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.30"
24
+ "@wix/secrets_secrets": "1.0.32"
25
25
  },
26
26
  "devDependencies": {
27
27
  "glob": "^10.4.1",
@@ -46,5 +46,5 @@
46
46
  "fqdn": ""
47
47
  }
48
48
  },
49
- "falconPackageHash": "b0ac06e139ec5d38b420ab8eb0ccb6cad138b8efcd47957ececf99f0"
49
+ "falconPackageHash": "ce8a0745a45eb834a2f0e808ab7d328822eb59657cfeef8ec6312850"
50
50
  }
@@ -478,63 +478,55 @@ type MaybeContext<T extends Descriptors> = globalThis.ContextualClient extends {
478
478
 
479
479
  interface Secret {
480
480
  /**
481
- * The secret's unique ID.
481
+ * Unique secret ID.
482
482
  * @readonly
483
483
  */
484
484
  _id?: string | null;
485
485
  /**
486
- * A unique, meaningful name used for retrieving the secret at runtime with the `getSecretValue()` function. You can use alphanumeric characters and the following special characters: `_+=-@#$`. Spaces are not supported.
486
+ * A unique, human-friendly name for the secret. Use it to retrieve the secret value with Get Secret Value.
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
- /** An optional text describing the secret's purpose or any other notes about it. */
491
+ /** Optional text describing the secret's purpose or any other notes about it. */
491
492
  description?: string | null;
492
- /** The confidential value to protect, such as an API key. */
493
+ /** The encrypted confidential value. */
493
494
  value?: string | null;
494
495
  /**
495
- * The date and time the secreted was created.
496
+ * Date and time when the secret was created.
496
497
  * @readonly
497
498
  */
498
499
  _createdDate?: Date | null;
499
500
  /**
500
- * The date and time the secret was last updated.
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
- /** The name of the secret to get the value of. */
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 confidential value to protect, such as an API key. */
514
512
  value?: string;
515
513
  }
516
514
  interface ListSecretInfoRequest {
517
515
  }
518
516
  interface ListSecretInfoResponse {
519
- /** Object containing information for each secret. */
517
+ /** A list of secrets with encrypted values. */
520
518
  secrets?: Secret[];
521
519
  }
522
520
  interface CreateSecretRequest {
523
- /** The object including the fields of a new secret. */
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
+ /** Unique 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,55 @@ interface SecretUpdatedEnvelope {
724
716
  declare function getSecretValue$1(httpClient: HttpClient): GetSecretValueSignature;
725
717
  interface GetSecretValueSignature {
726
718
  /**
727
- * Retrieves the secret value specified by the secret name.
719
+ * Retrieves a secret value by name.
728
720
  *
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.
721
+ * <blockquote class="caution">
722
+ * __Caution:__
723
+ * Only use a secret's value in the backend code. Returning the secret value in the frontend is a security risk.
724
+ * </blockquote>
733
725
  * @param - The name of the secret to get the value of.
734
- * @returns Fulfilled - The value of the secret. Rejected - Error message.
735
726
  */
736
727
  (name: string): Promise<GetSecretValueResponse & GetSecretValueResponseNonNullableFields>;
737
728
  }
738
729
  declare function listSecretInfo$1(httpClient: HttpClient): ListSecretInfoSignature;
739
730
  interface ListSecretInfoSignature {
740
731
  /**
741
- * Retrieves a list of objects containing information about all secrets.
742
- *
743
- * The `listSecretInfo()` function returns a Promise that resolves to a list containing information about all secrets stored on your site.
732
+ * Retrieves a list of secrets.
744
733
  *
745
- * > **Note:**
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.
734
+ * > **Note:** This method 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
735
  */
749
736
  (): Promise<ListSecretInfoResponse>;
750
737
  }
751
738
  declare function createSecret$1(httpClient: HttpClient): CreateSecretSignature;
752
739
  interface CreateSecretSignature {
753
740
  /**
754
- * Creates a new secret.
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()`.
741
+ * Creates a secret.
761
742
  * @param - Fields of a new secret.
762
- * @returns Fulfilled - The ID of the created secret.
763
- * Rejected - Error message.
743
+ * @returns Unique secret ID.
764
744
  */
765
745
  (secret: Secret): Promise<string>;
766
746
  }
767
747
  declare function deleteSecret$1(httpClient: HttpClient): DeleteSecretSignature;
768
748
  interface DeleteSecretSignature {
769
749
  /**
770
- * Deletes an existing secret by ID.
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.
750
+ * Deletes a secret.
776
751
  *
752
+ * <blockquote class="warning">
753
+ * __Warning:__
754
+ * Deleting a secret is irreversible and will break all code using the secret.
755
+ * </blockquote>
777
756
  * @param - The unique ID of the secret to be deleted.
778
- * @returns Fulfilled - When the secret is successfully deleted. Rejected - Error message.
779
757
  */
780
758
  (_id: string): Promise<void>;
781
759
  }
782
760
  declare function updateSecret$1(httpClient: HttpClient): UpdateSecretSignature;
783
761
  interface UpdateSecretSignature {
784
762
  /**
785
- * Updates the specified fields of an existing secret by ID.
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.
763
+ * Updates 1 or all fields of a secret.
791
764
  *
792
- * > **Notes:**
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()`.
765
+ * To get the secret ID, call [List Secret Info](https://dev.wix.com/docs/rest/business-management/secrets/list-secret-info).
796
766
  * @param - ID of the secret to update.
797
767
  * @param - Details of a secret.
798
- * @returns Fulfilled - When the secret is updated.
799
- * Rejected - Error message.
800
768
  */
801
769
  (_id: string, secret: Secret): Promise<void>;
802
770
  }
@@ -478,63 +478,55 @@ type MaybeContext<T extends Descriptors> = globalThis.ContextualClient extends {
478
478
 
479
479
  interface Secret {
480
480
  /**
481
- * The secret's unique ID.
481
+ * Unique secret ID.
482
482
  * @readonly
483
483
  */
484
484
  _id?: string | null;
485
485
  /**
486
- * A unique, meaningful name used for retrieving the secret at runtime with the `getSecretValue()` function. You can use alphanumeric characters and the following special characters: `_+=-@#$`. Spaces are not supported.
486
+ * A unique, human-friendly name for the secret. Use it to retrieve the secret value with Get Secret Value.
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
- /** An optional text describing the secret's purpose or any other notes about it. */
491
+ /** Optional text describing the secret's purpose or any other notes about it. */
491
492
  description?: string | null;
492
- /** The confidential value to protect, such as an API key. */
493
+ /** The encrypted confidential value. */
493
494
  value?: string | null;
494
495
  /**
495
- * The date and time the secreted was created.
496
+ * Date and time when the secret was created.
496
497
  * @readonly
497
498
  */
498
499
  _createdDate?: Date | null;
499
500
  /**
500
- * The date and time the secret was last updated.
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
- /** The name of the secret to get the value of. */
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 confidential value to protect, such as an API key. */
514
512
  value?: string;
515
513
  }
516
514
  interface ListSecretInfoRequest {
517
515
  }
518
516
  interface ListSecretInfoResponse {
519
- /** Object containing information for each secret. */
517
+ /** A list of secrets with encrypted values. */
520
518
  secrets?: Secret[];
521
519
  }
522
520
  interface CreateSecretRequest {
523
- /** The object including the fields of a new secret. */
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
+ /** Unique 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,55 @@ interface SecretUpdatedEnvelope {
724
716
  declare function getSecretValue$1(httpClient: HttpClient): GetSecretValueSignature;
725
717
  interface GetSecretValueSignature {
726
718
  /**
727
- * Retrieves the secret value specified by the secret name.
719
+ * Retrieves a secret value by name.
728
720
  *
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.
721
+ * <blockquote class="caution">
722
+ * __Caution:__
723
+ * Only use a secret's value in the backend code. Returning the secret value in the frontend is a security risk.
724
+ * </blockquote>
733
725
  * @param - The name of the secret to get the value of.
734
- * @returns Fulfilled - The value of the secret. Rejected - Error message.
735
726
  */
736
727
  (name: string): Promise<GetSecretValueResponse & GetSecretValueResponseNonNullableFields>;
737
728
  }
738
729
  declare function listSecretInfo$1(httpClient: HttpClient): ListSecretInfoSignature;
739
730
  interface ListSecretInfoSignature {
740
731
  /**
741
- * Retrieves a list of objects containing information about all secrets.
742
- *
743
- * The `listSecretInfo()` function returns a Promise that resolves to a list containing information about all secrets stored on your site.
732
+ * Retrieves a list of secrets.
744
733
  *
745
- * > **Note:**
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.
734
+ * > **Note:** This method 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
735
  */
749
736
  (): Promise<ListSecretInfoResponse>;
750
737
  }
751
738
  declare function createSecret$1(httpClient: HttpClient): CreateSecretSignature;
752
739
  interface CreateSecretSignature {
753
740
  /**
754
- * Creates a new secret.
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()`.
741
+ * Creates a secret.
761
742
  * @param - Fields of a new secret.
762
- * @returns Fulfilled - The ID of the created secret.
763
- * Rejected - Error message.
743
+ * @returns Unique secret ID.
764
744
  */
765
745
  (secret: Secret): Promise<string>;
766
746
  }
767
747
  declare function deleteSecret$1(httpClient: HttpClient): DeleteSecretSignature;
768
748
  interface DeleteSecretSignature {
769
749
  /**
770
- * Deletes an existing secret by ID.
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.
750
+ * Deletes a secret.
776
751
  *
752
+ * <blockquote class="warning">
753
+ * __Warning:__
754
+ * Deleting a secret is irreversible and will break all code using the secret.
755
+ * </blockquote>
777
756
  * @param - The unique ID of the secret to be deleted.
778
- * @returns Fulfilled - When the secret is successfully deleted. Rejected - Error message.
779
757
  */
780
758
  (_id: string): Promise<void>;
781
759
  }
782
760
  declare function updateSecret$1(httpClient: HttpClient): UpdateSecretSignature;
783
761
  interface UpdateSecretSignature {
784
762
  /**
785
- * Updates the specified fields of an existing secret by ID.
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.
763
+ * Updates 1 or all fields of a secret.
791
764
  *
792
- * > **Notes:**
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()`.
765
+ * To get the secret ID, call [List Secret Info](https://dev.wix.com/docs/rest/business-management/secrets/list-secret-info).
796
766
  * @param - ID of the secret to update.
797
767
  * @param - Details of a secret.
798
- * @returns Fulfilled - When the secret is updated.
799
- * Rejected - Error message.
800
768
  */
801
769
  (_id: string, secret: Secret): Promise<void>;
802
770
  }
@@ -1,16 +1,16 @@
1
1
  interface Secret$1 {
2
2
  /**
3
- * Secret ID.
3
+ * Unique secret ID.
4
4
  * @readonly
5
5
  */
6
6
  id?: string | null;
7
7
  /**
8
- * 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.
8
+ * A unique, human-friendly name for the secret. Use it to retrieve the secret value with Get Secret Value.
9
9
  *
10
10
  * **Note:** You can use alphanumeric characters and the following special characters: `_+=-@#$`. Spaces are not supported.
11
11
  */
12
12
  name?: string | null;
13
- /** An optional text describing the secret's purpose or any other notes about it. */
13
+ /** Optional text describing the secret's purpose or any other notes about it. */
14
14
  description?: string | null;
15
15
  /** The encrypted confidential value. */
16
16
  value?: string | null;
@@ -30,7 +30,7 @@ interface GetSecretValueRequest$1 {
30
30
  name: string;
31
31
  }
32
32
  interface GetSecretValueResponse$1 {
33
- /** The plaintext, unencrypted value of the secret. */
33
+ /** The confidential value to protect, such as an API key. */
34
34
  value?: string;
35
35
  }
36
36
  interface ListSecretInfoRequest$1 {
@@ -44,7 +44,7 @@ interface CreateSecretRequest$1 {
44
44
  secret: Secret$1;
45
45
  }
46
46
  interface CreateSecretResponse$1 {
47
- /** Secret ID. */
47
+ /** Unique secret ID. */
48
48
  id?: string;
49
49
  }
50
50
  interface DeleteSecretRequest$1 {
@@ -70,63 +70,55 @@ interface CreateSecretResponseNonNullableFields$1 {
70
70
 
71
71
  interface Secret {
72
72
  /**
73
- * The secret's unique ID.
73
+ * Unique secret ID.
74
74
  * @readonly
75
75
  */
76
76
  _id?: string | null;
77
77
  /**
78
- * A unique, meaningful name used for retrieving the secret at runtime with the `getSecretValue()` function. You can use alphanumeric characters and the following special characters: `_+=-@#$`. Spaces are not supported.
78
+ * A unique, human-friendly name for the secret. Use it to retrieve the secret value with Get Secret Value.
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
- /** An optional text describing the secret's purpose or any other notes about it. */
83
+ /** Optional text describing the secret's purpose or any other notes about it. */
83
84
  description?: string | null;
84
- /** The confidential value to protect, such as an API key. */
85
+ /** The encrypted confidential value. */
85
86
  value?: string | null;
86
87
  /**
87
- * The date and time the secreted was created.
88
+ * Date and time when the secret was created.
88
89
  * @readonly
89
90
  */
90
91
  _createdDate?: Date | null;
91
92
  /**
92
- * The date and time the secret was last updated.
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
- /** The name of the secret to get the value of. */
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 confidential value to protect, such as an API key. */
106
104
  value?: string;
107
105
  }
108
106
  interface ListSecretInfoRequest {
109
107
  }
110
108
  interface ListSecretInfoResponse {
111
- /** Object containing information for each secret. */
109
+ /** A list of secrets with encrypted values. */
112
110
  secrets?: Secret[];
113
111
  }
114
112
  interface CreateSecretRequest {
115
- /** The object including the fields of a new secret. */
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
+ /** Unique 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 {