@riocrypto/common-server 1.0.2612 → 1.0.2614

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.
@@ -3,7 +3,10 @@ declare class CosignerClient {
3
3
  private webhookSecret;
4
4
  private axiosClient;
5
5
  constructor(apiKey: string, webhookSecret: string);
6
- sendRequest(title: string, description: string, minApprovers: number, notificationUrl: string, approverGroupId: string, metadata?: Object): Promise<void>;
6
+ sendRequest(title: string, description: string, minApprovers: number, notificationUrl: string, approverGroupId: string, metadata?: Object, alternativeActions?: {
7
+ label: string;
8
+ value: string;
9
+ }[]): Promise<void>;
7
10
  decryptNotification(encryptedData: string, iv: string): Promise<string>;
8
11
  }
9
12
  export declare const buildCosignerClient: () => Promise<CosignerClient>;
@@ -22,7 +22,7 @@ class CosignerClient {
22
22
  this.webhookSecret = webhookSecret;
23
23
  this.axiosClient = (0, axios_with_logging_1.buildAxiosWithLogging)();
24
24
  }
25
- sendRequest(title, description, minApprovers, notificationUrl, approverGroupId, metadata) {
25
+ sendRequest(title, description, minApprovers, notificationUrl, approverGroupId, metadata, alternativeActions) {
26
26
  return __awaiter(this, void 0, void 0, function* () {
27
27
  yield this.axiosClient.post("https://www.cosigner.xyz/api/requests", {
28
28
  title,
@@ -31,6 +31,7 @@ class CosignerClient {
31
31
  minApprovers,
32
32
  notificationUrl,
33
33
  approverGroupId,
34
+ alternativeActions,
34
35
  }, {
35
36
  headers: {
36
37
  "x-api-key": this.apiKey,
@@ -89,7 +89,7 @@ class SecretManagerClient {
89
89
  if (this.env === common_1.RioEnv.Development) {
90
90
  file = "dev-secrets";
91
91
  }
92
- else if (this.env === common_1.RioEnv.Sandbox || this.env === common_1.RioEnv.Local) {
92
+ else if (this.env === common_1.RioEnv.Sandbox) {
93
93
  file = "sandbox-secrets";
94
94
  }
95
95
  else if (this.env === common_1.RioEnv.Test) {
@@ -98,6 +98,12 @@ class SecretManagerClient {
98
98
  else if (this.env === common_1.RioEnv.Production) {
99
99
  file = "production-secrets";
100
100
  }
101
+ else if (this.env === common_1.RioEnv.Local) {
102
+ file = "local-secrets";
103
+ }
104
+ else {
105
+ throw new Error(`Invalid environment: ${this.env}`);
106
+ }
101
107
  const maxRetries = 5;
102
108
  let attempt = 0;
103
109
  while (attempt < maxRetries) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@riocrypto/common-server",
3
- "version": "1.0.2612",
3
+ "version": "1.0.2614",
4
4
  "description": "",
5
5
  "main": "./build/index.js",
6
6
  "types": "./build/index.d.ts",
@@ -28,7 +28,7 @@
28
28
  "@google-cloud/secret-manager": "^5.3.0",
29
29
  "@google-cloud/storage": "^6.9.5",
30
30
  "@hyperdx/node-opentelemetry": "^0.7.0",
31
- "@riocrypto/common": "^1.0.2412",
31
+ "@riocrypto/common": "^1.0.2414",
32
32
  "@types/express": "^4.17.13",
33
33
  "axios": "^1.7.4",
34
34
  "crypto-js": "^4.2.0",