@flowcore/sdk 1.51.0 → 1.53.0
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/CHANGELOG.md +21 -0
- package/README.md +2 -2
- package/esm/commands/adapter/reset-adapter.d.ts +2 -2
- package/esm/commands/adapter/reset-adapter.d.ts.map +1 -1
- package/esm/commands/adapter/reset-adapter.js +1 -1
- package/esm/commands/iam/permissions/get-user-permissions.d.ts +1 -1
- package/esm/commands/iam/permissions/get-user-permissions.d.ts.map +1 -1
- package/esm/commands/iam/permissions/get-user-permissions.js +2 -1
- package/esm/commands/iam/policies/create-policy.d.ts +1 -1
- package/esm/commands/iam/policies/create-policy.d.ts.map +1 -1
- package/esm/commands/iam/policies/create-policy.js +2 -1
- package/esm/commands/iam/policies/get-policy.d.ts +1 -1
- package/esm/commands/iam/policies/get-policy.d.ts.map +1 -1
- package/esm/commands/iam/policies/get-policy.js +2 -1
- package/esm/commands/iam/policies/id/archive-policy.d.ts +1 -1
- package/esm/commands/iam/policies/id/archive-policy.d.ts.map +1 -1
- package/esm/commands/iam/policies/id/archive-policy.js +2 -1
- package/esm/commands/iam/policies/id/get-policy.d.ts +1 -1
- package/esm/commands/iam/policies/id/get-policy.d.ts.map +1 -1
- package/esm/commands/iam/policies/id/get-policy.js +2 -1
- package/esm/commands/iam/policies/id/update-policy.d.ts +1 -1
- package/esm/commands/iam/policies/id/update-policy.d.ts.map +1 -1
- package/esm/commands/iam/policies/id/update-policy.js +2 -1
- package/esm/commands/iam/policy-associations/get-key-policies.d.ts +1 -1
- package/esm/commands/iam/policy-associations/get-key-policies.d.ts.map +1 -1
- package/esm/commands/iam/policy-associations/get-key-policies.js +2 -1
- package/esm/commands/iam/policy-associations/get-organization-policies.d.ts +1 -1
- package/esm/commands/iam/policy-associations/get-organization-policies.d.ts.map +1 -1
- package/esm/commands/iam/policy-associations/get-organization-policies.js +2 -1
- package/esm/commands/iam/policy-associations/get-policy-associations.d.ts +1 -1
- package/esm/commands/iam/policy-associations/get-policy-associations.d.ts.map +1 -1
- package/esm/commands/iam/policy-associations/get-policy-associations.js +2 -1
- package/esm/commands/iam/policy-associations/get-role-policies.d.ts +1 -1
- package/esm/commands/iam/policy-associations/get-role-policies.d.ts.map +1 -1
- package/esm/commands/iam/policy-associations/get-role-policies.js +2 -1
- package/esm/commands/iam/policy-associations/get-user-policies.d.ts +1 -1
- package/esm/commands/iam/policy-associations/get-user-policies.d.ts.map +1 -1
- package/esm/commands/iam/policy-associations/get-user-policies.js +2 -1
- package/esm/commands/iam/policy-associations/link-key-policy.d.ts +1 -1
- package/esm/commands/iam/policy-associations/link-key-policy.d.ts.map +1 -1
- package/esm/commands/iam/policy-associations/link-key-policy.js +2 -1
- package/esm/commands/iam/policy-associations/link-role-policy.d.ts +1 -1
- package/esm/commands/iam/policy-associations/link-role-policy.d.ts.map +1 -1
- package/esm/commands/iam/policy-associations/link-role-policy.js +2 -1
- package/esm/commands/iam/policy-associations/link-user-policy.d.ts +1 -1
- package/esm/commands/iam/policy-associations/link-user-policy.d.ts.map +1 -1
- package/esm/commands/iam/policy-associations/link-user-policy.js +2 -1
- package/esm/commands/iam/policy-associations/unlink-key-policy.d.ts +1 -1
- package/esm/commands/iam/policy-associations/unlink-key-policy.d.ts.map +1 -1
- package/esm/commands/iam/policy-associations/unlink-key-policy.js +2 -1
- package/esm/commands/iam/policy-associations/unlink-role-policy.d.ts +1 -1
- package/esm/commands/iam/policy-associations/unlink-role-policy.d.ts.map +1 -1
- package/esm/commands/iam/policy-associations/unlink-role-policy.js +2 -1
- package/esm/commands/iam/policy-associations/unlink-user-policy.d.ts +1 -1
- package/esm/commands/iam/policy-associations/unlink-user-policy.d.ts.map +1 -1
- package/esm/commands/iam/policy-associations/unlink-user-policy.js +2 -1
- package/esm/commands/iam/role-associations/get-key-roles.d.ts +1 -1
- package/esm/commands/iam/role-associations/get-key-roles.d.ts.map +1 -1
- package/esm/commands/iam/role-associations/get-key-roles.js +2 -1
- package/esm/commands/iam/role-associations/get-organization-roles.d.ts +1 -1
- package/esm/commands/iam/role-associations/get-organization-roles.d.ts.map +1 -1
- package/esm/commands/iam/role-associations/get-organization-roles.js +2 -1
- package/esm/commands/iam/role-associations/get-role-associations.d.ts +1 -1
- package/esm/commands/iam/role-associations/get-role-associations.d.ts.map +1 -1
- package/esm/commands/iam/role-associations/get-role-associations.js +2 -1
- package/esm/commands/iam/role-associations/get-user-roles.d.ts +1 -1
- package/esm/commands/iam/role-associations/get-user-roles.d.ts.map +1 -1
- package/esm/commands/iam/role-associations/get-user-roles.js +2 -1
- package/esm/commands/iam/role-associations/link-key-role.d.ts +1 -1
- package/esm/commands/iam/role-associations/link-key-role.d.ts.map +1 -1
- package/esm/commands/iam/role-associations/link-key-role.js +2 -1
- package/esm/commands/iam/role-associations/link-user-role.d.ts +1 -1
- package/esm/commands/iam/role-associations/link-user-role.d.ts.map +1 -1
- package/esm/commands/iam/role-associations/link-user-role.js +2 -1
- package/esm/commands/iam/role-associations/unlink-key-role.d.ts +1 -1
- package/esm/commands/iam/role-associations/unlink-key-role.d.ts.map +1 -1
- package/esm/commands/iam/role-associations/unlink-key-role.js +2 -1
- package/esm/commands/iam/role-associations/unlink-user-role.d.ts +1 -1
- package/esm/commands/iam/role-associations/unlink-user-role.d.ts.map +1 -1
- package/esm/commands/iam/role-associations/unlink-user-role.js +2 -1
- package/esm/commands/iam/roles/create-role.d.ts +1 -1
- package/esm/commands/iam/roles/create-role.d.ts.map +1 -1
- package/esm/commands/iam/roles/create-role.js +2 -1
- package/esm/commands/iam/roles/get-roles.d.ts +1 -1
- package/esm/commands/iam/roles/get-roles.d.ts.map +1 -1
- package/esm/commands/iam/roles/get-roles.js +2 -1
- package/esm/commands/iam/roles/id/archive-role.d.ts +1 -1
- package/esm/commands/iam/roles/id/archive-role.d.ts.map +1 -1
- package/esm/commands/iam/roles/id/archive-role.js +2 -1
- package/esm/commands/iam/roles/id/get-role.d.ts +1 -1
- package/esm/commands/iam/roles/id/get-role.d.ts.map +1 -1
- package/esm/commands/iam/roles/id/get-role.js +2 -1
- package/esm/commands/iam/roles/id/update-role.d.ts +1 -1
- package/esm/commands/iam/roles/id/update-role.d.ts.map +1 -1
- package/esm/commands/iam/roles/id/update-role.js +2 -1
- package/esm/commands/iam/tenant-iam-audit/get-audit-for-tenant.d.ts +1 -1
- package/esm/commands/iam/tenant-iam-audit/get-audit-for-tenant.d.ts.map +1 -1
- package/esm/commands/iam/tenant-iam-audit/get-audit-for-tenant.js +2 -1
- package/esm/commands/iam/validate/validate-key.d.ts +1 -1
- package/esm/commands/iam/validate/validate-key.d.ts.map +1 -1
- package/esm/commands/iam/validate/validate-key.js +2 -1
- package/esm/commands/iam/validate/validate-user.d.ts +1 -1
- package/esm/commands/iam/validate/validate-user.d.ts.map +1 -1
- package/esm/commands/iam/validate/validate-user.js +2 -1
- package/esm/commands/index.d.ts +2 -0
- package/esm/commands/index.d.ts.map +1 -1
- package/esm/commands/index.js +2 -0
- package/esm/commands/secret/secret.create.d.ts +23 -8
- package/esm/commands/secret/secret.create.d.ts.map +1 -1
- package/esm/commands/secret/secret.create.js +27 -39
- package/esm/commands/secret/secret.delete.d.ts +20 -8
- package/esm/commands/secret/secret.delete.d.ts.map +1 -1
- package/esm/commands/secret/secret.delete.js +27 -41
- package/esm/commands/secret/secret.edit.d.ts +45 -0
- package/esm/commands/secret/secret.edit.d.ts.map +1 -0
- package/esm/commands/secret/secret.edit.js +40 -0
- package/esm/commands/secret/secret.list.d.ts +20 -7
- package/esm/commands/secret/secret.list.d.ts.map +1 -1
- package/esm/commands/secret/secret.list.js +27 -41
- package/esm/commands/variable/variable.create.d.ts +21 -7
- package/esm/commands/variable/variable.create.d.ts.map +1 -1
- package/esm/commands/variable/variable.create.js +26 -44
- package/esm/commands/variable/variable.delete.d.ts +20 -8
- package/esm/commands/variable/variable.delete.d.ts.map +1 -1
- package/esm/commands/variable/variable.delete.js +27 -44
- package/esm/commands/variable/variable.edit.d.ts +45 -0
- package/esm/commands/variable/variable.edit.d.ts.map +1 -0
- package/esm/commands/variable/variable.edit.js +40 -0
- package/esm/commands/variable/variable.list.d.ts +19 -7
- package/esm/commands/variable/variable.list.d.ts.map +1 -1
- package/esm/commands/variable/variable.list.js +27 -47
- package/esm/contracts/secret.d.ts +16 -0
- package/esm/contracts/secret.d.ts.map +1 -0
- package/esm/contracts/secret.js +11 -0
- package/esm/contracts/variable.d.ts +5 -1
- package/esm/contracts/variable.d.ts.map +1 -1
- package/esm/contracts/variable.js +4 -0
- package/package.json +1 -1
- package/script/commands/adapter/reset-adapter.d.ts +2 -2
- package/script/commands/adapter/reset-adapter.d.ts.map +1 -1
- package/script/commands/adapter/reset-adapter.js +2 -2
- package/script/commands/iam/permissions/get-user-permissions.d.ts +1 -1
- package/script/commands/iam/permissions/get-user-permissions.d.ts.map +1 -1
- package/script/commands/iam/permissions/get-user-permissions.js +4 -3
- package/script/commands/iam/policies/create-policy.d.ts +1 -1
- package/script/commands/iam/policies/create-policy.d.ts.map +1 -1
- package/script/commands/iam/policies/create-policy.js +4 -3
- package/script/commands/iam/policies/get-policy.d.ts +1 -1
- package/script/commands/iam/policies/get-policy.d.ts.map +1 -1
- package/script/commands/iam/policies/get-policy.js +4 -3
- package/script/commands/iam/policies/id/archive-policy.d.ts +1 -1
- package/script/commands/iam/policies/id/archive-policy.d.ts.map +1 -1
- package/script/commands/iam/policies/id/archive-policy.js +4 -3
- package/script/commands/iam/policies/id/get-policy.d.ts +1 -1
- package/script/commands/iam/policies/id/get-policy.d.ts.map +1 -1
- package/script/commands/iam/policies/id/get-policy.js +4 -3
- package/script/commands/iam/policies/id/update-policy.d.ts +1 -1
- package/script/commands/iam/policies/id/update-policy.d.ts.map +1 -1
- package/script/commands/iam/policies/id/update-policy.js +4 -3
- package/script/commands/iam/policy-associations/get-key-policies.d.ts +1 -1
- package/script/commands/iam/policy-associations/get-key-policies.d.ts.map +1 -1
- package/script/commands/iam/policy-associations/get-key-policies.js +5 -4
- package/script/commands/iam/policy-associations/get-organization-policies.d.ts +1 -1
- package/script/commands/iam/policy-associations/get-organization-policies.d.ts.map +1 -1
- package/script/commands/iam/policy-associations/get-organization-policies.js +5 -4
- package/script/commands/iam/policy-associations/get-policy-associations.d.ts +1 -1
- package/script/commands/iam/policy-associations/get-policy-associations.d.ts.map +1 -1
- package/script/commands/iam/policy-associations/get-policy-associations.js +7 -6
- package/script/commands/iam/policy-associations/get-role-policies.d.ts +1 -1
- package/script/commands/iam/policy-associations/get-role-policies.d.ts.map +1 -1
- package/script/commands/iam/policy-associations/get-role-policies.js +5 -4
- package/script/commands/iam/policy-associations/get-user-policies.d.ts +1 -1
- package/script/commands/iam/policy-associations/get-user-policies.d.ts.map +1 -1
- package/script/commands/iam/policy-associations/get-user-policies.js +4 -3
- package/script/commands/iam/policy-associations/link-key-policy.d.ts +1 -1
- package/script/commands/iam/policy-associations/link-key-policy.d.ts.map +1 -1
- package/script/commands/iam/policy-associations/link-key-policy.js +4 -3
- package/script/commands/iam/policy-associations/link-role-policy.d.ts +1 -1
- package/script/commands/iam/policy-associations/link-role-policy.d.ts.map +1 -1
- package/script/commands/iam/policy-associations/link-role-policy.js +4 -3
- package/script/commands/iam/policy-associations/link-user-policy.d.ts +1 -1
- package/script/commands/iam/policy-associations/link-user-policy.d.ts.map +1 -1
- package/script/commands/iam/policy-associations/link-user-policy.js +4 -3
- package/script/commands/iam/policy-associations/unlink-key-policy.d.ts +1 -1
- package/script/commands/iam/policy-associations/unlink-key-policy.d.ts.map +1 -1
- package/script/commands/iam/policy-associations/unlink-key-policy.js +4 -3
- package/script/commands/iam/policy-associations/unlink-role-policy.d.ts +1 -1
- package/script/commands/iam/policy-associations/unlink-role-policy.d.ts.map +1 -1
- package/script/commands/iam/policy-associations/unlink-role-policy.js +4 -3
- package/script/commands/iam/policy-associations/unlink-user-policy.d.ts +1 -1
- package/script/commands/iam/policy-associations/unlink-user-policy.d.ts.map +1 -1
- package/script/commands/iam/policy-associations/unlink-user-policy.js +4 -3
- package/script/commands/iam/role-associations/get-key-roles.d.ts +1 -1
- package/script/commands/iam/role-associations/get-key-roles.d.ts.map +1 -1
- package/script/commands/iam/role-associations/get-key-roles.js +4 -3
- package/script/commands/iam/role-associations/get-organization-roles.d.ts +1 -1
- package/script/commands/iam/role-associations/get-organization-roles.d.ts.map +1 -1
- package/script/commands/iam/role-associations/get-organization-roles.js +4 -3
- package/script/commands/iam/role-associations/get-role-associations.d.ts +1 -1
- package/script/commands/iam/role-associations/get-role-associations.d.ts.map +1 -1
- package/script/commands/iam/role-associations/get-role-associations.js +4 -3
- package/script/commands/iam/role-associations/get-user-roles.d.ts +1 -1
- package/script/commands/iam/role-associations/get-user-roles.d.ts.map +1 -1
- package/script/commands/iam/role-associations/get-user-roles.js +4 -3
- package/script/commands/iam/role-associations/link-key-role.d.ts +1 -1
- package/script/commands/iam/role-associations/link-key-role.d.ts.map +1 -1
- package/script/commands/iam/role-associations/link-key-role.js +4 -3
- package/script/commands/iam/role-associations/link-user-role.d.ts +1 -1
- package/script/commands/iam/role-associations/link-user-role.d.ts.map +1 -1
- package/script/commands/iam/role-associations/link-user-role.js +4 -3
- package/script/commands/iam/role-associations/unlink-key-role.d.ts +1 -1
- package/script/commands/iam/role-associations/unlink-key-role.d.ts.map +1 -1
- package/script/commands/iam/role-associations/unlink-key-role.js +4 -3
- package/script/commands/iam/role-associations/unlink-user-role.d.ts +1 -1
- package/script/commands/iam/role-associations/unlink-user-role.d.ts.map +1 -1
- package/script/commands/iam/role-associations/unlink-user-role.js +4 -3
- package/script/commands/iam/roles/create-role.d.ts +1 -1
- package/script/commands/iam/roles/create-role.d.ts.map +1 -1
- package/script/commands/iam/roles/create-role.js +4 -3
- package/script/commands/iam/roles/get-roles.d.ts +1 -1
- package/script/commands/iam/roles/get-roles.d.ts.map +1 -1
- package/script/commands/iam/roles/get-roles.js +4 -3
- package/script/commands/iam/roles/id/archive-role.d.ts +1 -1
- package/script/commands/iam/roles/id/archive-role.d.ts.map +1 -1
- package/script/commands/iam/roles/id/archive-role.js +4 -3
- package/script/commands/iam/roles/id/get-role.d.ts +1 -1
- package/script/commands/iam/roles/id/get-role.d.ts.map +1 -1
- package/script/commands/iam/roles/id/get-role.js +4 -3
- package/script/commands/iam/roles/id/update-role.d.ts +1 -1
- package/script/commands/iam/roles/id/update-role.d.ts.map +1 -1
- package/script/commands/iam/roles/id/update-role.js +4 -3
- package/script/commands/iam/tenant-iam-audit/get-audit-for-tenant.d.ts +1 -1
- package/script/commands/iam/tenant-iam-audit/get-audit-for-tenant.d.ts.map +1 -1
- package/script/commands/iam/tenant-iam-audit/get-audit-for-tenant.js +4 -3
- package/script/commands/iam/validate/validate-key.d.ts +1 -1
- package/script/commands/iam/validate/validate-key.d.ts.map +1 -1
- package/script/commands/iam/validate/validate-key.js +4 -3
- package/script/commands/iam/validate/validate-user.d.ts +1 -1
- package/script/commands/iam/validate/validate-user.d.ts.map +1 -1
- package/script/commands/iam/validate/validate-user.js +4 -3
- package/script/commands/index.d.ts +2 -0
- package/script/commands/index.d.ts.map +1 -1
- package/script/commands/index.js +2 -0
- package/script/commands/secret/secret.create.d.ts +23 -8
- package/script/commands/secret/secret.create.d.ts.map +1 -1
- package/script/commands/secret/secret.create.js +27 -39
- package/script/commands/secret/secret.delete.d.ts +20 -8
- package/script/commands/secret/secret.delete.d.ts.map +1 -1
- package/script/commands/secret/secret.delete.js +27 -41
- package/script/commands/secret/secret.edit.d.ts +45 -0
- package/script/commands/secret/secret.edit.d.ts.map +1 -0
- package/script/commands/secret/secret.edit.js +44 -0
- package/script/commands/secret/secret.list.d.ts +20 -7
- package/script/commands/secret/secret.list.d.ts.map +1 -1
- package/script/commands/secret/secret.list.js +27 -41
- package/script/commands/variable/variable.create.d.ts +21 -7
- package/script/commands/variable/variable.create.d.ts.map +1 -1
- package/script/commands/variable/variable.create.js +26 -44
- package/script/commands/variable/variable.delete.d.ts +20 -8
- package/script/commands/variable/variable.delete.d.ts.map +1 -1
- package/script/commands/variable/variable.delete.js +27 -44
- package/script/commands/variable/variable.edit.d.ts +45 -0
- package/script/commands/variable/variable.edit.d.ts.map +1 -0
- package/script/commands/variable/variable.edit.js +44 -0
- package/script/commands/variable/variable.list.d.ts +19 -7
- package/script/commands/variable/variable.list.d.ts.map +1 -1
- package/script/commands/variable/variable.list.js +27 -47
- package/script/contracts/secret.d.ts +16 -0
- package/script/contracts/secret.d.ts.map +1 -0
- package/script/contracts/secret.js +14 -0
- package/script/contracts/variable.d.ts +5 -1
- package/script/contracts/variable.d.ts.map +1 -1
- package/script/contracts/variable.js +4 -0
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { Command } from "../../common/command.js";
|
|
2
2
|
/**
|
|
3
3
|
* The input for the secret delete command
|
|
4
4
|
*/
|
|
@@ -9,9 +9,25 @@ export interface SecretDeleteInput {
|
|
|
9
9
|
key: string;
|
|
10
10
|
}
|
|
11
11
|
/**
|
|
12
|
-
*
|
|
12
|
+
* Delete a secret
|
|
13
13
|
*/
|
|
14
|
-
export declare class SecretDeleteCommand extends
|
|
14
|
+
export declare class SecretDeleteCommand extends Command<SecretDeleteInput, boolean> {
|
|
15
|
+
/**
|
|
16
|
+
* Whether the command should retry on failure
|
|
17
|
+
*/
|
|
18
|
+
protected retryOnFailure: boolean;
|
|
19
|
+
/**
|
|
20
|
+
* Get the method
|
|
21
|
+
*/
|
|
22
|
+
protected getMethod(): string;
|
|
23
|
+
/**
|
|
24
|
+
* Get the base url
|
|
25
|
+
*/
|
|
26
|
+
protected getBaseUrl(): string;
|
|
27
|
+
/**
|
|
28
|
+
* Get the path
|
|
29
|
+
*/
|
|
30
|
+
protected getPath(): string;
|
|
15
31
|
/**
|
|
16
32
|
* The allowed modes for the command
|
|
17
33
|
*/
|
|
@@ -19,10 +35,6 @@ export declare class SecretDeleteCommand extends GraphQlCommand<SecretDeleteInpu
|
|
|
19
35
|
/**
|
|
20
36
|
* Parse the response
|
|
21
37
|
*/
|
|
22
|
-
protected parseResponse(
|
|
23
|
-
/**
|
|
24
|
-
* Get the body for the request
|
|
25
|
-
*/
|
|
26
|
-
protected getBody(): Record<string, unknown>;
|
|
38
|
+
protected parseResponse(_rawResponse: unknown): boolean;
|
|
27
39
|
}
|
|
28
40
|
//# sourceMappingURL=secret.delete.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"secret.delete.d.ts","sourceRoot":"","sources":["../../../src/commands/secret/secret.delete.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"secret.delete.d.ts","sourceRoot":"","sources":["../../../src/commands/secret/secret.delete.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,yBAAyB,CAAA;AAEjD;;GAEG;AACH,MAAM,WAAW,iBAAiB;IAChC,oBAAoB;IACpB,QAAQ,EAAE,MAAM,CAAA;IAChB,4BAA4B;IAC5B,GAAG,EAAE,MAAM,CAAA;CACZ;AAED;;GAEG;AACH,qBAAa,mBAAoB,SAAQ,OAAO,CAAC,iBAAiB,EAAE,OAAO,CAAC;IAC1E;;OAEG;IACH,UAAmB,cAAc,EAAE,OAAO,CAAQ;IAElD;;OAEG;cACgB,SAAS,IAAI,MAAM;IAGtC;;OAEG;cACgB,UAAU,IAAI,MAAM;IAIvC;;OAEG;cACgB,OAAO,IAAI,MAAM;IAIpC;;OAEG;IACH,UAAmB,YAAY,EAAE,CAAC,QAAQ,GAAG,QAAQ,CAAC,EAAE,CAAa;IAErE;;OAEG;cACgB,aAAa,CAAC,YAAY,EAAE,OAAO,GAAG,OAAO;CAGjE"}
|
|
@@ -1,56 +1,42 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.SecretDeleteCommand = void 0;
|
|
4
|
-
const
|
|
5
|
-
const command_graphql_js_1 = require("../../common/command-graphql.js");
|
|
6
|
-
const parse_response_helper_js_1 = require("../../utils/parse-response-helper.js");
|
|
7
|
-
const command_error_js_1 = require("../../exceptions/command-error.js");
|
|
8
|
-
const graphQlQueryById = `
|
|
9
|
-
mutation FLOWCORE_SDK_SECRET_DELETE($tenantId: ID!, $key: String!) {
|
|
10
|
-
organization(id: $tenantId) {
|
|
11
|
-
removeSecret(key: $key)
|
|
12
|
-
}
|
|
13
|
-
}
|
|
14
|
-
`;
|
|
15
|
-
const responseSchema = typebox_1.Type.Object({
|
|
16
|
-
errors: typebox_1.Type.Optional(typebox_1.Type.Array(typebox_1.Type.Object({
|
|
17
|
-
message: typebox_1.Type.String(),
|
|
18
|
-
}))),
|
|
19
|
-
data: typebox_1.Type.Object({
|
|
20
|
-
organization: typebox_1.Type.Object({
|
|
21
|
-
removeSecret: typebox_1.Type.Union([typebox_1.Type.Boolean(), typebox_1.Type.Null()]),
|
|
22
|
-
}),
|
|
23
|
-
}),
|
|
24
|
-
});
|
|
4
|
+
const command_js_1 = require("../../common/command.js");
|
|
25
5
|
/**
|
|
26
|
-
*
|
|
6
|
+
* Delete a secret
|
|
27
7
|
*/
|
|
28
|
-
class SecretDeleteCommand extends
|
|
8
|
+
class SecretDeleteCommand extends command_js_1.Command {
|
|
29
9
|
/**
|
|
30
|
-
*
|
|
10
|
+
* Whether the command should retry on failure
|
|
31
11
|
*/
|
|
32
|
-
|
|
12
|
+
retryOnFailure = false;
|
|
33
13
|
/**
|
|
34
|
-
*
|
|
14
|
+
* Get the method
|
|
35
15
|
*/
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
if (response.errors) {
|
|
39
|
-
throw new command_error_js_1.CommandError(this.constructor.name, response.errors[0].message);
|
|
40
|
-
}
|
|
41
|
-
if (response.data.organization.removeSecret !== true) {
|
|
42
|
-
throw new command_error_js_1.CommandError(this.constructor.name, "Failed to delete secret");
|
|
43
|
-
}
|
|
44
|
-
return response.data.organization.removeSecret;
|
|
16
|
+
getMethod() {
|
|
17
|
+
return "DELETE";
|
|
45
18
|
}
|
|
46
19
|
/**
|
|
47
|
-
* Get the
|
|
20
|
+
* Get the base url
|
|
21
|
+
*/
|
|
22
|
+
getBaseUrl() {
|
|
23
|
+
return "https://tenant-store.api.flowcore.io";
|
|
24
|
+
}
|
|
25
|
+
/**
|
|
26
|
+
* Get the path
|
|
27
|
+
*/
|
|
28
|
+
getPath() {
|
|
29
|
+
return `/api/v1/tenants/${this.input.tenantId}/secrets/${this.input.key}`;
|
|
30
|
+
}
|
|
31
|
+
/**
|
|
32
|
+
* The allowed modes for the command
|
|
33
|
+
*/
|
|
34
|
+
allowedModes = ["bearer"];
|
|
35
|
+
/**
|
|
36
|
+
* Parse the response
|
|
48
37
|
*/
|
|
49
|
-
|
|
50
|
-
return
|
|
51
|
-
query: graphQlQueryById,
|
|
52
|
-
variables: this.input,
|
|
53
|
-
};
|
|
38
|
+
parseResponse(_rawResponse) {
|
|
39
|
+
return true;
|
|
54
40
|
}
|
|
55
41
|
}
|
|
56
42
|
exports.SecretDeleteCommand = SecretDeleteCommand;
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
import { Command } from "../../common/command.js";
|
|
2
|
+
import { type Secret } from "../../contracts/secret.js";
|
|
3
|
+
/**
|
|
4
|
+
* The input for the secret edit command
|
|
5
|
+
*/
|
|
6
|
+
export interface SecretEditInput {
|
|
7
|
+
/** The tenant id */
|
|
8
|
+
tenantId: string;
|
|
9
|
+
/** The key of the secret */
|
|
10
|
+
key: string;
|
|
11
|
+
/** The value of the secret */
|
|
12
|
+
value?: string;
|
|
13
|
+
/** The description of the secret */
|
|
14
|
+
description?: string;
|
|
15
|
+
}
|
|
16
|
+
/**
|
|
17
|
+
* Edit a secret
|
|
18
|
+
*/
|
|
19
|
+
export declare class SecretEditCommand extends Command<SecretEditInput, Secret> {
|
|
20
|
+
/**
|
|
21
|
+
* Whether the command should retry on failure
|
|
22
|
+
*/
|
|
23
|
+
protected retryOnFailure: boolean;
|
|
24
|
+
/**
|
|
25
|
+
* Get the method
|
|
26
|
+
*/
|
|
27
|
+
protected getMethod(): string;
|
|
28
|
+
/**
|
|
29
|
+
* Get the base url
|
|
30
|
+
*/
|
|
31
|
+
protected getBaseUrl(): string;
|
|
32
|
+
/**
|
|
33
|
+
* Get the path
|
|
34
|
+
*/
|
|
35
|
+
protected getPath(): string;
|
|
36
|
+
/**
|
|
37
|
+
* The allowed modes for the command
|
|
38
|
+
*/
|
|
39
|
+
protected allowedModes: ("apiKey" | "bearer")[];
|
|
40
|
+
/**
|
|
41
|
+
* Parse the response
|
|
42
|
+
*/
|
|
43
|
+
protected parseResponse(rawResponse: unknown): Secret;
|
|
44
|
+
}
|
|
45
|
+
//# sourceMappingURL=secret.edit.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"secret.edit.d.ts","sourceRoot":"","sources":["../../../src/commands/secret/secret.edit.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,yBAAyB,CAAA;AAEjD,OAAO,EAAE,KAAK,MAAM,EAAgB,MAAM,2BAA2B,CAAA;AAErE;;GAEG;AACH,MAAM,WAAW,eAAe;IAC9B,oBAAoB;IACpB,QAAQ,EAAE,MAAM,CAAA;IAChB,4BAA4B;IAC5B,GAAG,EAAE,MAAM,CAAA;IACX,8BAA8B;IAC9B,KAAK,CAAC,EAAE,MAAM,CAAA;IACd,oCAAoC;IACpC,WAAW,CAAC,EAAE,MAAM,CAAA;CACrB;AAED;;GAEG;AACH,qBAAa,iBAAkB,SAAQ,OAAO,CAAC,eAAe,EAAE,MAAM,CAAC;IACrE;;OAEG;IACH,UAAmB,cAAc,EAAE,OAAO,CAAQ;IAElD;;OAEG;cACgB,SAAS,IAAI,MAAM;IAGtC;;OAEG;cACgB,UAAU,IAAI,MAAM;IAIvC;;OAEG;cACgB,OAAO,IAAI,MAAM;IAIpC;;OAEG;IACH,UAAmB,YAAY,EAAE,CAAC,QAAQ,GAAG,QAAQ,CAAC,EAAE,CAAa;IAErE;;OAEG;cACgB,aAAa,CAAC,WAAW,EAAE,OAAO,GAAG,MAAM;CAG/D"}
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.SecretEditCommand = void 0;
|
|
4
|
+
const command_js_1 = require("../../common/command.js");
|
|
5
|
+
const parse_response_helper_js_1 = require("../../utils/parse-response-helper.js");
|
|
6
|
+
const secret_js_1 = require("../../contracts/secret.js");
|
|
7
|
+
/**
|
|
8
|
+
* Edit a secret
|
|
9
|
+
*/
|
|
10
|
+
class SecretEditCommand extends command_js_1.Command {
|
|
11
|
+
/**
|
|
12
|
+
* Whether the command should retry on failure
|
|
13
|
+
*/
|
|
14
|
+
retryOnFailure = false;
|
|
15
|
+
/**
|
|
16
|
+
* Get the method
|
|
17
|
+
*/
|
|
18
|
+
getMethod() {
|
|
19
|
+
return "PATCH";
|
|
20
|
+
}
|
|
21
|
+
/**
|
|
22
|
+
* Get the base url
|
|
23
|
+
*/
|
|
24
|
+
getBaseUrl() {
|
|
25
|
+
return "https://tenant-store.api.flowcore.io";
|
|
26
|
+
}
|
|
27
|
+
/**
|
|
28
|
+
* Get the path
|
|
29
|
+
*/
|
|
30
|
+
getPath() {
|
|
31
|
+
return `/api/v1/tenants/${this.input.tenantId}/secrets/${this.input.key}`;
|
|
32
|
+
}
|
|
33
|
+
/**
|
|
34
|
+
* The allowed modes for the command
|
|
35
|
+
*/
|
|
36
|
+
allowedModes = ["bearer"];
|
|
37
|
+
/**
|
|
38
|
+
* Parse the response
|
|
39
|
+
*/
|
|
40
|
+
parseResponse(rawResponse) {
|
|
41
|
+
return (0, parse_response_helper_js_1.parseResponseHelper)(secret_js_1.SecretSchema, rawResponse);
|
|
42
|
+
}
|
|
43
|
+
}
|
|
44
|
+
exports.SecretEditCommand = SecretEditCommand;
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { Command } from "../../common/command.js";
|
|
2
|
+
import { type Secret } from "../../contracts/secret.js";
|
|
2
3
|
/**
|
|
3
4
|
* The input for the secret list command
|
|
4
5
|
*/
|
|
@@ -9,7 +10,23 @@ export interface SecretListInput {
|
|
|
9
10
|
/**
|
|
10
11
|
* List secrets
|
|
11
12
|
*/
|
|
12
|
-
export declare class SecretListCommand extends
|
|
13
|
+
export declare class SecretListCommand extends Command<SecretListInput, Secret[]> {
|
|
14
|
+
/**
|
|
15
|
+
* Whether the command should retry on failure
|
|
16
|
+
*/
|
|
17
|
+
protected retryOnFailure: boolean;
|
|
18
|
+
/**
|
|
19
|
+
* Get the method
|
|
20
|
+
*/
|
|
21
|
+
protected getMethod(): string;
|
|
22
|
+
/**
|
|
23
|
+
* Get the base url
|
|
24
|
+
*/
|
|
25
|
+
protected getBaseUrl(): string;
|
|
26
|
+
/**
|
|
27
|
+
* Get the path
|
|
28
|
+
*/
|
|
29
|
+
protected getPath(): string;
|
|
13
30
|
/**
|
|
14
31
|
* The allowed modes for the command
|
|
15
32
|
*/
|
|
@@ -17,10 +34,6 @@ export declare class SecretListCommand extends GraphQlCommand<SecretListInput, s
|
|
|
17
34
|
/**
|
|
18
35
|
* Parse the response
|
|
19
36
|
*/
|
|
20
|
-
protected parseResponse(rawResponse: unknown):
|
|
21
|
-
/**
|
|
22
|
-
* Get the body for the request
|
|
23
|
-
*/
|
|
24
|
-
protected getBody(): Record<string, unknown>;
|
|
37
|
+
protected parseResponse(rawResponse: unknown): Secret[];
|
|
25
38
|
}
|
|
26
39
|
//# sourceMappingURL=secret.list.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"secret.list.d.ts","sourceRoot":"","sources":["../../../src/commands/secret/secret.list.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"secret.list.d.ts","sourceRoot":"","sources":["../../../src/commands/secret/secret.list.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,yBAAyB,CAAA;AAEjD,OAAO,EAAE,KAAK,MAAM,EAAgB,MAAM,2BAA2B,CAAA;AAGrE;;GAEG;AACH,MAAM,WAAW,eAAe;IAC9B,oBAAoB;IACpB,QAAQ,EAAE,MAAM,CAAA;CACjB;AAED;;GAEG;AACH,qBAAa,iBAAkB,SAAQ,OAAO,CAAC,eAAe,EAAE,MAAM,EAAE,CAAC;IACvE;;OAEG;IACH,UAAmB,cAAc,EAAE,OAAO,CAAQ;IAElD;;OAEG;cACgB,SAAS,IAAI,MAAM;IAGtC;;OAEG;cACgB,UAAU,IAAI,MAAM;IAIvC;;OAEG;cACgB,OAAO,IAAI,MAAM;IAIpC;;OAEG;IACH,UAAmB,YAAY,EAAE,CAAC,QAAQ,GAAG,QAAQ,CAAC,EAAE,CAAa;IAErE;;OAEG;cACgB,aAAa,CAAC,WAAW,EAAE,OAAO,GAAG,MAAM,EAAE;CAGjE"}
|
|
@@ -1,34 +1,36 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.SecretListCommand = void 0;
|
|
4
|
-
const
|
|
5
|
-
const command_graphql_js_1 = require("../../common/command-graphql.js");
|
|
4
|
+
const command_js_1 = require("../../common/command.js");
|
|
6
5
|
const parse_response_helper_js_1 = require("../../utils/parse-response-helper.js");
|
|
7
|
-
const
|
|
8
|
-
const
|
|
9
|
-
query FLOWCORE_SDK_SECRET_LIST($tenantId: ID!) {
|
|
10
|
-
organization(search: {id: $tenantId}) {
|
|
11
|
-
secrets
|
|
12
|
-
}
|
|
13
|
-
}
|
|
14
|
-
`;
|
|
15
|
-
const responseSchema = typebox_1.Type.Object({
|
|
16
|
-
errors: typebox_1.Type.Optional(typebox_1.Type.Array(typebox_1.Type.Object({
|
|
17
|
-
message: typebox_1.Type.String(),
|
|
18
|
-
}))),
|
|
19
|
-
data: typebox_1.Type.Object({
|
|
20
|
-
organization: typebox_1.Type.Object({
|
|
21
|
-
secrets: typebox_1.Type.Union([
|
|
22
|
-
typebox_1.Type.Array(typebox_1.Type.String()),
|
|
23
|
-
typebox_1.Type.Null(),
|
|
24
|
-
]),
|
|
25
|
-
}),
|
|
26
|
-
}),
|
|
27
|
-
});
|
|
6
|
+
const secret_js_1 = require("../../contracts/secret.js");
|
|
7
|
+
const typebox_1 = require("@sinclair/typebox");
|
|
28
8
|
/**
|
|
29
9
|
* List secrets
|
|
30
10
|
*/
|
|
31
|
-
class SecretListCommand extends
|
|
11
|
+
class SecretListCommand extends command_js_1.Command {
|
|
12
|
+
/**
|
|
13
|
+
* Whether the command should retry on failure
|
|
14
|
+
*/
|
|
15
|
+
retryOnFailure = false;
|
|
16
|
+
/**
|
|
17
|
+
* Get the method
|
|
18
|
+
*/
|
|
19
|
+
getMethod() {
|
|
20
|
+
return "GET";
|
|
21
|
+
}
|
|
22
|
+
/**
|
|
23
|
+
* Get the base url
|
|
24
|
+
*/
|
|
25
|
+
getBaseUrl() {
|
|
26
|
+
return "https://tenant-store.api.flowcore.io";
|
|
27
|
+
}
|
|
28
|
+
/**
|
|
29
|
+
* Get the path
|
|
30
|
+
*/
|
|
31
|
+
getPath() {
|
|
32
|
+
return `/api/v1/tenants/${this.input.tenantId}/secrets`;
|
|
33
|
+
}
|
|
32
34
|
/**
|
|
33
35
|
* The allowed modes for the command
|
|
34
36
|
*/
|
|
@@ -37,23 +39,7 @@ class SecretListCommand extends command_graphql_js_1.GraphQlCommand {
|
|
|
37
39
|
* Parse the response
|
|
38
40
|
*/
|
|
39
41
|
parseResponse(rawResponse) {
|
|
40
|
-
|
|
41
|
-
if (response.errors) {
|
|
42
|
-
throw new command_error_js_1.CommandError(this.constructor.name, response.errors[0].message);
|
|
43
|
-
}
|
|
44
|
-
if (response.data.organization.secrets === null) {
|
|
45
|
-
throw new command_error_js_1.CommandError(this.constructor.name, "Failed to list secrets");
|
|
46
|
-
}
|
|
47
|
-
return response.data.organization.secrets;
|
|
48
|
-
}
|
|
49
|
-
/**
|
|
50
|
-
* Get the body for the request
|
|
51
|
-
*/
|
|
52
|
-
getBody() {
|
|
53
|
-
return {
|
|
54
|
-
query: graphQlQueryById,
|
|
55
|
-
variables: this.input,
|
|
56
|
-
};
|
|
42
|
+
return (0, parse_response_helper_js_1.parseResponseHelper)(typebox_1.Type.Array(secret_js_1.SecretSchema), rawResponse);
|
|
57
43
|
}
|
|
58
44
|
}
|
|
59
45
|
exports.SecretListCommand = SecretListCommand;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import type
|
|
1
|
+
import { Command } from "../../common/command.js";
|
|
2
|
+
import { type Variable } from "../../contracts/variable.js";
|
|
3
3
|
/**
|
|
4
4
|
* The input for the variable create command
|
|
5
5
|
*/
|
|
@@ -10,11 +10,29 @@ export interface VariableCreateInput {
|
|
|
10
10
|
key: string;
|
|
11
11
|
/** The value of the variable */
|
|
12
12
|
value: string;
|
|
13
|
+
/** The description of the variable */
|
|
14
|
+
description?: string;
|
|
13
15
|
}
|
|
14
16
|
/**
|
|
15
17
|
* Create a variable
|
|
16
18
|
*/
|
|
17
|
-
export declare class VariableCreateCommand extends
|
|
19
|
+
export declare class VariableCreateCommand extends Command<VariableCreateInput, Variable> {
|
|
20
|
+
/**
|
|
21
|
+
* Whether the command should retry on failure
|
|
22
|
+
*/
|
|
23
|
+
protected retryOnFailure: boolean;
|
|
24
|
+
/**
|
|
25
|
+
* Get the method
|
|
26
|
+
*/
|
|
27
|
+
protected getMethod(): string;
|
|
28
|
+
/**
|
|
29
|
+
* Get the base url
|
|
30
|
+
*/
|
|
31
|
+
protected getBaseUrl(): string;
|
|
32
|
+
/**
|
|
33
|
+
* Get the path
|
|
34
|
+
*/
|
|
35
|
+
protected getPath(): string;
|
|
18
36
|
/**
|
|
19
37
|
* The allowed modes for the command
|
|
20
38
|
*/
|
|
@@ -23,9 +41,5 @@ export declare class VariableCreateCommand extends GraphQlCommand<VariableCreate
|
|
|
23
41
|
* Parse the response
|
|
24
42
|
*/
|
|
25
43
|
protected parseResponse(rawResponse: unknown): Variable;
|
|
26
|
-
/**
|
|
27
|
-
* Get the body for the request
|
|
28
|
-
*/
|
|
29
|
-
protected getBody(): Record<string, unknown>;
|
|
30
44
|
}
|
|
31
45
|
//# sourceMappingURL=variable.create.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"variable.create.d.ts","sourceRoot":"","sources":["../../../src/commands/variable/variable.create.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"variable.create.d.ts","sourceRoot":"","sources":["../../../src/commands/variable/variable.create.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,yBAAyB,CAAA;AAEjD,OAAO,EAAE,KAAK,QAAQ,EAAkB,MAAM,6BAA6B,CAAA;AAE3E;;GAEG;AACH,MAAM,WAAW,mBAAmB;IAClC,oBAAoB;IACpB,QAAQ,EAAE,MAAM,CAAA;IAChB,8BAA8B;IAC9B,GAAG,EAAE,MAAM,CAAA;IACX,gCAAgC;IAChC,KAAK,EAAE,MAAM,CAAA;IACb,sCAAsC;IACtC,WAAW,CAAC,EAAE,MAAM,CAAA;CACrB;AAED;;GAEG;AACH,qBAAa,qBAAsB,SAAQ,OAAO,CAAC,mBAAmB,EAAE,QAAQ,CAAC;IAC/E;;OAEG;IACH,UAAmB,cAAc,EAAE,OAAO,CAAQ;IAElD;;OAEG;cACgB,SAAS,IAAI,MAAM;IAGtC;;OAEG;cACgB,UAAU,IAAI,MAAM;IAIvC;;OAEG;cACgB,OAAO,IAAI,MAAM;IAIpC;;OAEG;IACH,UAAmB,YAAY,EAAE,CAAC,QAAQ,GAAG,QAAQ,CAAC,EAAE,CAAa;IAErE;;OAEG;cACgB,aAAa,CAAC,WAAW,EAAE,OAAO,GAAG,QAAQ;CAGjE"}
|
|
@@ -1,34 +1,35 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.VariableCreateCommand = void 0;
|
|
4
|
-
const
|
|
5
|
-
const command_graphql_js_1 = require("../../common/command-graphql.js");
|
|
4
|
+
const command_js_1 = require("../../common/command.js");
|
|
6
5
|
const parse_response_helper_js_1 = require("../../utils/parse-response-helper.js");
|
|
7
|
-
const
|
|
8
|
-
const graphQlQueryById = `
|
|
9
|
-
mutation FLOWCORE_SDK_VARIABLE_CREATE($tenantId: ID!, $key: String!, $value: String!) {
|
|
10
|
-
organization(id: $tenantId) {
|
|
11
|
-
createVariable(key: $key, value: $value)
|
|
12
|
-
}
|
|
13
|
-
}
|
|
14
|
-
`;
|
|
15
|
-
const responseSchema = typebox_1.Type.Object({
|
|
16
|
-
errors: typebox_1.Type.Optional(typebox_1.Type.Array(typebox_1.Type.Object({
|
|
17
|
-
message: typebox_1.Type.String(),
|
|
18
|
-
}))),
|
|
19
|
-
data: typebox_1.Type.Union([
|
|
20
|
-
typebox_1.Type.Object({
|
|
21
|
-
organization: typebox_1.Type.Object({
|
|
22
|
-
createVariable: typebox_1.Type.Union([typebox_1.Type.Boolean(), typebox_1.Type.Null()]),
|
|
23
|
-
}),
|
|
24
|
-
}),
|
|
25
|
-
typebox_1.Type.Null(),
|
|
26
|
-
]),
|
|
27
|
-
});
|
|
6
|
+
const variable_js_1 = require("../../contracts/variable.js");
|
|
28
7
|
/**
|
|
29
8
|
* Create a variable
|
|
30
9
|
*/
|
|
31
|
-
class VariableCreateCommand extends
|
|
10
|
+
class VariableCreateCommand extends command_js_1.Command {
|
|
11
|
+
/**
|
|
12
|
+
* Whether the command should retry on failure
|
|
13
|
+
*/
|
|
14
|
+
retryOnFailure = false;
|
|
15
|
+
/**
|
|
16
|
+
* Get the method
|
|
17
|
+
*/
|
|
18
|
+
getMethod() {
|
|
19
|
+
return "POST";
|
|
20
|
+
}
|
|
21
|
+
/**
|
|
22
|
+
* Get the base url
|
|
23
|
+
*/
|
|
24
|
+
getBaseUrl() {
|
|
25
|
+
return "https://tenant-store.api.flowcore.io";
|
|
26
|
+
}
|
|
27
|
+
/**
|
|
28
|
+
* Get the path
|
|
29
|
+
*/
|
|
30
|
+
getPath() {
|
|
31
|
+
return `/api/v1/tenants/${this.input.tenantId}/variables`;
|
|
32
|
+
}
|
|
32
33
|
/**
|
|
33
34
|
* The allowed modes for the command
|
|
34
35
|
*/
|
|
@@ -37,26 +38,7 @@ class VariableCreateCommand extends command_graphql_js_1.GraphQlCommand {
|
|
|
37
38
|
* Parse the response
|
|
38
39
|
*/
|
|
39
40
|
parseResponse(rawResponse) {
|
|
40
|
-
|
|
41
|
-
if (response.errors) {
|
|
42
|
-
throw new command_error_js_1.CommandError(this.constructor.name, response.errors[0].message);
|
|
43
|
-
}
|
|
44
|
-
if (!response.data || response.data.organization.createVariable !== true) {
|
|
45
|
-
throw new command_error_js_1.CommandError(this.constructor.name, "Failed to create variable");
|
|
46
|
-
}
|
|
47
|
-
return {
|
|
48
|
-
key: this.input.key,
|
|
49
|
-
value: this.input.value,
|
|
50
|
-
};
|
|
51
|
-
}
|
|
52
|
-
/**
|
|
53
|
-
* Get the body for the request
|
|
54
|
-
*/
|
|
55
|
-
getBody() {
|
|
56
|
-
return {
|
|
57
|
-
query: graphQlQueryById,
|
|
58
|
-
variables: this.input,
|
|
59
|
-
};
|
|
41
|
+
return (0, parse_response_helper_js_1.parseResponseHelper)(variable_js_1.VariableSchema, rawResponse);
|
|
60
42
|
}
|
|
61
43
|
}
|
|
62
44
|
exports.VariableCreateCommand = VariableCreateCommand;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { Command } from "../../common/command.js";
|
|
2
2
|
/**
|
|
3
3
|
* The input for the variable delete command
|
|
4
4
|
*/
|
|
@@ -9,9 +9,25 @@ export interface VariableDeleteInput {
|
|
|
9
9
|
key: string;
|
|
10
10
|
}
|
|
11
11
|
/**
|
|
12
|
-
*
|
|
12
|
+
* Delete a variable
|
|
13
13
|
*/
|
|
14
|
-
export declare class VariableDeleteCommand extends
|
|
14
|
+
export declare class VariableDeleteCommand extends Command<VariableDeleteInput, boolean> {
|
|
15
|
+
/**
|
|
16
|
+
* Whether the command should retry on failure
|
|
17
|
+
*/
|
|
18
|
+
protected retryOnFailure: boolean;
|
|
19
|
+
/**
|
|
20
|
+
* Get the method
|
|
21
|
+
*/
|
|
22
|
+
protected getMethod(): string;
|
|
23
|
+
/**
|
|
24
|
+
* Get the base url
|
|
25
|
+
*/
|
|
26
|
+
protected getBaseUrl(): string;
|
|
27
|
+
/**
|
|
28
|
+
* Get the path
|
|
29
|
+
*/
|
|
30
|
+
protected getPath(): string;
|
|
15
31
|
/**
|
|
16
32
|
* The allowed modes for the command
|
|
17
33
|
*/
|
|
@@ -19,10 +35,6 @@ export declare class VariableDeleteCommand extends GraphQlCommand<VariableDelete
|
|
|
19
35
|
/**
|
|
20
36
|
* Parse the response
|
|
21
37
|
*/
|
|
22
|
-
protected parseResponse(
|
|
23
|
-
/**
|
|
24
|
-
* Get the body for the request
|
|
25
|
-
*/
|
|
26
|
-
protected getBody(): Record<string, unknown>;
|
|
38
|
+
protected parseResponse(): boolean;
|
|
27
39
|
}
|
|
28
40
|
//# sourceMappingURL=variable.delete.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"variable.delete.d.ts","sourceRoot":"","sources":["../../../src/commands/variable/variable.delete.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"variable.delete.d.ts","sourceRoot":"","sources":["../../../src/commands/variable/variable.delete.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,yBAAyB,CAAA;AAEjD;;GAEG;AACH,MAAM,WAAW,mBAAmB;IAClC,oBAAoB;IACpB,QAAQ,EAAE,MAAM,CAAA;IAChB,8BAA8B;IAC9B,GAAG,EAAE,MAAM,CAAA;CACZ;AAED;;GAEG;AACH,qBAAa,qBAAsB,SAAQ,OAAO,CAAC,mBAAmB,EAAE,OAAO,CAAC;IAC9E;;OAEG;IACH,UAAmB,cAAc,EAAE,OAAO,CAAQ;IAElD;;OAEG;cACgB,SAAS,IAAI,MAAM;IAGtC;;OAEG;cACgB,UAAU,IAAI,MAAM;IAIvC;;OAEG;cACgB,OAAO,IAAI,MAAM;IAIpC;;OAEG;IACH,UAAmB,YAAY,EAAE,CAAC,QAAQ,GAAG,QAAQ,CAAC,EAAE,CAAa;IAErE;;OAEG;cACgB,aAAa,IAAI,OAAO;CAG5C"}
|
|
@@ -1,59 +1,42 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.VariableDeleteCommand = void 0;
|
|
4
|
-
const
|
|
5
|
-
const command_graphql_js_1 = require("../../common/command-graphql.js");
|
|
6
|
-
const parse_response_helper_js_1 = require("../../utils/parse-response-helper.js");
|
|
7
|
-
const command_error_js_1 = require("../../exceptions/command-error.js");
|
|
8
|
-
const graphQlQueryById = `
|
|
9
|
-
mutation FLOWCORE_SDK_VARIABLE_DELETE($tenantId: ID!, $key: String!) {
|
|
10
|
-
organization(id: $tenantId) {
|
|
11
|
-
removeVariable(key: $key)
|
|
12
|
-
}
|
|
13
|
-
}
|
|
14
|
-
`;
|
|
15
|
-
const responseSchema = typebox_1.Type.Object({
|
|
16
|
-
errors: typebox_1.Type.Optional(typebox_1.Type.Array(typebox_1.Type.Object({
|
|
17
|
-
message: typebox_1.Type.String(),
|
|
18
|
-
}))),
|
|
19
|
-
data: typebox_1.Type.Union([
|
|
20
|
-
typebox_1.Type.Object({
|
|
21
|
-
organization: typebox_1.Type.Object({
|
|
22
|
-
removeVariable: typebox_1.Type.Union([typebox_1.Type.Boolean(), typebox_1.Type.Null()]),
|
|
23
|
-
}),
|
|
24
|
-
}),
|
|
25
|
-
typebox_1.Type.Null(),
|
|
26
|
-
]),
|
|
27
|
-
});
|
|
4
|
+
const command_js_1 = require("../../common/command.js");
|
|
28
5
|
/**
|
|
29
|
-
*
|
|
6
|
+
* Delete a variable
|
|
30
7
|
*/
|
|
31
|
-
class VariableDeleteCommand extends
|
|
8
|
+
class VariableDeleteCommand extends command_js_1.Command {
|
|
32
9
|
/**
|
|
33
|
-
*
|
|
10
|
+
* Whether the command should retry on failure
|
|
34
11
|
*/
|
|
35
|
-
|
|
12
|
+
retryOnFailure = false;
|
|
36
13
|
/**
|
|
37
|
-
*
|
|
14
|
+
* Get the method
|
|
38
15
|
*/
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
if (response.errors) {
|
|
42
|
-
throw new command_error_js_1.CommandError(this.constructor.name, response.errors[0].message);
|
|
43
|
-
}
|
|
44
|
-
if (!response.data || response.data.organization.removeVariable !== true) {
|
|
45
|
-
throw new command_error_js_1.CommandError(this.constructor.name, "Failed to delete variable");
|
|
46
|
-
}
|
|
47
|
-
return response.data.organization.removeVariable;
|
|
16
|
+
getMethod() {
|
|
17
|
+
return "DELETE";
|
|
48
18
|
}
|
|
49
19
|
/**
|
|
50
|
-
* Get the
|
|
20
|
+
* Get the base url
|
|
21
|
+
*/
|
|
22
|
+
getBaseUrl() {
|
|
23
|
+
return "https://tenant-store.api.flowcore.io";
|
|
24
|
+
}
|
|
25
|
+
/**
|
|
26
|
+
* Get the path
|
|
27
|
+
*/
|
|
28
|
+
getPath() {
|
|
29
|
+
return `/api/v1/tenants/${this.input.tenantId}/variables/${this.input.key}`;
|
|
30
|
+
}
|
|
31
|
+
/**
|
|
32
|
+
* The allowed modes for the command
|
|
33
|
+
*/
|
|
34
|
+
allowedModes = ["bearer"];
|
|
35
|
+
/**
|
|
36
|
+
* Parse the response
|
|
51
37
|
*/
|
|
52
|
-
|
|
53
|
-
return
|
|
54
|
-
query: graphQlQueryById,
|
|
55
|
-
variables: this.input,
|
|
56
|
-
};
|
|
38
|
+
parseResponse() {
|
|
39
|
+
return true;
|
|
57
40
|
}
|
|
58
41
|
}
|
|
59
42
|
exports.VariableDeleteCommand = VariableDeleteCommand;
|