@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.
Files changed (273) hide show
  1. package/CHANGELOG.md +21 -0
  2. package/README.md +2 -2
  3. package/esm/commands/adapter/reset-adapter.d.ts +2 -2
  4. package/esm/commands/adapter/reset-adapter.d.ts.map +1 -1
  5. package/esm/commands/adapter/reset-adapter.js +1 -1
  6. package/esm/commands/iam/permissions/get-user-permissions.d.ts +1 -1
  7. package/esm/commands/iam/permissions/get-user-permissions.d.ts.map +1 -1
  8. package/esm/commands/iam/permissions/get-user-permissions.js +2 -1
  9. package/esm/commands/iam/policies/create-policy.d.ts +1 -1
  10. package/esm/commands/iam/policies/create-policy.d.ts.map +1 -1
  11. package/esm/commands/iam/policies/create-policy.js +2 -1
  12. package/esm/commands/iam/policies/get-policy.d.ts +1 -1
  13. package/esm/commands/iam/policies/get-policy.d.ts.map +1 -1
  14. package/esm/commands/iam/policies/get-policy.js +2 -1
  15. package/esm/commands/iam/policies/id/archive-policy.d.ts +1 -1
  16. package/esm/commands/iam/policies/id/archive-policy.d.ts.map +1 -1
  17. package/esm/commands/iam/policies/id/archive-policy.js +2 -1
  18. package/esm/commands/iam/policies/id/get-policy.d.ts +1 -1
  19. package/esm/commands/iam/policies/id/get-policy.d.ts.map +1 -1
  20. package/esm/commands/iam/policies/id/get-policy.js +2 -1
  21. package/esm/commands/iam/policies/id/update-policy.d.ts +1 -1
  22. package/esm/commands/iam/policies/id/update-policy.d.ts.map +1 -1
  23. package/esm/commands/iam/policies/id/update-policy.js +2 -1
  24. package/esm/commands/iam/policy-associations/get-key-policies.d.ts +1 -1
  25. package/esm/commands/iam/policy-associations/get-key-policies.d.ts.map +1 -1
  26. package/esm/commands/iam/policy-associations/get-key-policies.js +2 -1
  27. package/esm/commands/iam/policy-associations/get-organization-policies.d.ts +1 -1
  28. package/esm/commands/iam/policy-associations/get-organization-policies.d.ts.map +1 -1
  29. package/esm/commands/iam/policy-associations/get-organization-policies.js +2 -1
  30. package/esm/commands/iam/policy-associations/get-policy-associations.d.ts +1 -1
  31. package/esm/commands/iam/policy-associations/get-policy-associations.d.ts.map +1 -1
  32. package/esm/commands/iam/policy-associations/get-policy-associations.js +2 -1
  33. package/esm/commands/iam/policy-associations/get-role-policies.d.ts +1 -1
  34. package/esm/commands/iam/policy-associations/get-role-policies.d.ts.map +1 -1
  35. package/esm/commands/iam/policy-associations/get-role-policies.js +2 -1
  36. package/esm/commands/iam/policy-associations/get-user-policies.d.ts +1 -1
  37. package/esm/commands/iam/policy-associations/get-user-policies.d.ts.map +1 -1
  38. package/esm/commands/iam/policy-associations/get-user-policies.js +2 -1
  39. package/esm/commands/iam/policy-associations/link-key-policy.d.ts +1 -1
  40. package/esm/commands/iam/policy-associations/link-key-policy.d.ts.map +1 -1
  41. package/esm/commands/iam/policy-associations/link-key-policy.js +2 -1
  42. package/esm/commands/iam/policy-associations/link-role-policy.d.ts +1 -1
  43. package/esm/commands/iam/policy-associations/link-role-policy.d.ts.map +1 -1
  44. package/esm/commands/iam/policy-associations/link-role-policy.js +2 -1
  45. package/esm/commands/iam/policy-associations/link-user-policy.d.ts +1 -1
  46. package/esm/commands/iam/policy-associations/link-user-policy.d.ts.map +1 -1
  47. package/esm/commands/iam/policy-associations/link-user-policy.js +2 -1
  48. package/esm/commands/iam/policy-associations/unlink-key-policy.d.ts +1 -1
  49. package/esm/commands/iam/policy-associations/unlink-key-policy.d.ts.map +1 -1
  50. package/esm/commands/iam/policy-associations/unlink-key-policy.js +2 -1
  51. package/esm/commands/iam/policy-associations/unlink-role-policy.d.ts +1 -1
  52. package/esm/commands/iam/policy-associations/unlink-role-policy.d.ts.map +1 -1
  53. package/esm/commands/iam/policy-associations/unlink-role-policy.js +2 -1
  54. package/esm/commands/iam/policy-associations/unlink-user-policy.d.ts +1 -1
  55. package/esm/commands/iam/policy-associations/unlink-user-policy.d.ts.map +1 -1
  56. package/esm/commands/iam/policy-associations/unlink-user-policy.js +2 -1
  57. package/esm/commands/iam/role-associations/get-key-roles.d.ts +1 -1
  58. package/esm/commands/iam/role-associations/get-key-roles.d.ts.map +1 -1
  59. package/esm/commands/iam/role-associations/get-key-roles.js +2 -1
  60. package/esm/commands/iam/role-associations/get-organization-roles.d.ts +1 -1
  61. package/esm/commands/iam/role-associations/get-organization-roles.d.ts.map +1 -1
  62. package/esm/commands/iam/role-associations/get-organization-roles.js +2 -1
  63. package/esm/commands/iam/role-associations/get-role-associations.d.ts +1 -1
  64. package/esm/commands/iam/role-associations/get-role-associations.d.ts.map +1 -1
  65. package/esm/commands/iam/role-associations/get-role-associations.js +2 -1
  66. package/esm/commands/iam/role-associations/get-user-roles.d.ts +1 -1
  67. package/esm/commands/iam/role-associations/get-user-roles.d.ts.map +1 -1
  68. package/esm/commands/iam/role-associations/get-user-roles.js +2 -1
  69. package/esm/commands/iam/role-associations/link-key-role.d.ts +1 -1
  70. package/esm/commands/iam/role-associations/link-key-role.d.ts.map +1 -1
  71. package/esm/commands/iam/role-associations/link-key-role.js +2 -1
  72. package/esm/commands/iam/role-associations/link-user-role.d.ts +1 -1
  73. package/esm/commands/iam/role-associations/link-user-role.d.ts.map +1 -1
  74. package/esm/commands/iam/role-associations/link-user-role.js +2 -1
  75. package/esm/commands/iam/role-associations/unlink-key-role.d.ts +1 -1
  76. package/esm/commands/iam/role-associations/unlink-key-role.d.ts.map +1 -1
  77. package/esm/commands/iam/role-associations/unlink-key-role.js +2 -1
  78. package/esm/commands/iam/role-associations/unlink-user-role.d.ts +1 -1
  79. package/esm/commands/iam/role-associations/unlink-user-role.d.ts.map +1 -1
  80. package/esm/commands/iam/role-associations/unlink-user-role.js +2 -1
  81. package/esm/commands/iam/roles/create-role.d.ts +1 -1
  82. package/esm/commands/iam/roles/create-role.d.ts.map +1 -1
  83. package/esm/commands/iam/roles/create-role.js +2 -1
  84. package/esm/commands/iam/roles/get-roles.d.ts +1 -1
  85. package/esm/commands/iam/roles/get-roles.d.ts.map +1 -1
  86. package/esm/commands/iam/roles/get-roles.js +2 -1
  87. package/esm/commands/iam/roles/id/archive-role.d.ts +1 -1
  88. package/esm/commands/iam/roles/id/archive-role.d.ts.map +1 -1
  89. package/esm/commands/iam/roles/id/archive-role.js +2 -1
  90. package/esm/commands/iam/roles/id/get-role.d.ts +1 -1
  91. package/esm/commands/iam/roles/id/get-role.d.ts.map +1 -1
  92. package/esm/commands/iam/roles/id/get-role.js +2 -1
  93. package/esm/commands/iam/roles/id/update-role.d.ts +1 -1
  94. package/esm/commands/iam/roles/id/update-role.d.ts.map +1 -1
  95. package/esm/commands/iam/roles/id/update-role.js +2 -1
  96. package/esm/commands/iam/tenant-iam-audit/get-audit-for-tenant.d.ts +1 -1
  97. package/esm/commands/iam/tenant-iam-audit/get-audit-for-tenant.d.ts.map +1 -1
  98. package/esm/commands/iam/tenant-iam-audit/get-audit-for-tenant.js +2 -1
  99. package/esm/commands/iam/validate/validate-key.d.ts +1 -1
  100. package/esm/commands/iam/validate/validate-key.d.ts.map +1 -1
  101. package/esm/commands/iam/validate/validate-key.js +2 -1
  102. package/esm/commands/iam/validate/validate-user.d.ts +1 -1
  103. package/esm/commands/iam/validate/validate-user.d.ts.map +1 -1
  104. package/esm/commands/iam/validate/validate-user.js +2 -1
  105. package/esm/commands/index.d.ts +2 -0
  106. package/esm/commands/index.d.ts.map +1 -1
  107. package/esm/commands/index.js +2 -0
  108. package/esm/commands/secret/secret.create.d.ts +23 -8
  109. package/esm/commands/secret/secret.create.d.ts.map +1 -1
  110. package/esm/commands/secret/secret.create.js +27 -39
  111. package/esm/commands/secret/secret.delete.d.ts +20 -8
  112. package/esm/commands/secret/secret.delete.d.ts.map +1 -1
  113. package/esm/commands/secret/secret.delete.js +27 -41
  114. package/esm/commands/secret/secret.edit.d.ts +45 -0
  115. package/esm/commands/secret/secret.edit.d.ts.map +1 -0
  116. package/esm/commands/secret/secret.edit.js +40 -0
  117. package/esm/commands/secret/secret.list.d.ts +20 -7
  118. package/esm/commands/secret/secret.list.d.ts.map +1 -1
  119. package/esm/commands/secret/secret.list.js +27 -41
  120. package/esm/commands/variable/variable.create.d.ts +21 -7
  121. package/esm/commands/variable/variable.create.d.ts.map +1 -1
  122. package/esm/commands/variable/variable.create.js +26 -44
  123. package/esm/commands/variable/variable.delete.d.ts +20 -8
  124. package/esm/commands/variable/variable.delete.d.ts.map +1 -1
  125. package/esm/commands/variable/variable.delete.js +27 -44
  126. package/esm/commands/variable/variable.edit.d.ts +45 -0
  127. package/esm/commands/variable/variable.edit.d.ts.map +1 -0
  128. package/esm/commands/variable/variable.edit.js +40 -0
  129. package/esm/commands/variable/variable.list.d.ts +19 -7
  130. package/esm/commands/variable/variable.list.d.ts.map +1 -1
  131. package/esm/commands/variable/variable.list.js +27 -47
  132. package/esm/contracts/secret.d.ts +16 -0
  133. package/esm/contracts/secret.d.ts.map +1 -0
  134. package/esm/contracts/secret.js +11 -0
  135. package/esm/contracts/variable.d.ts +5 -1
  136. package/esm/contracts/variable.d.ts.map +1 -1
  137. package/esm/contracts/variable.js +4 -0
  138. package/package.json +1 -1
  139. package/script/commands/adapter/reset-adapter.d.ts +2 -2
  140. package/script/commands/adapter/reset-adapter.d.ts.map +1 -1
  141. package/script/commands/adapter/reset-adapter.js +2 -2
  142. package/script/commands/iam/permissions/get-user-permissions.d.ts +1 -1
  143. package/script/commands/iam/permissions/get-user-permissions.d.ts.map +1 -1
  144. package/script/commands/iam/permissions/get-user-permissions.js +4 -3
  145. package/script/commands/iam/policies/create-policy.d.ts +1 -1
  146. package/script/commands/iam/policies/create-policy.d.ts.map +1 -1
  147. package/script/commands/iam/policies/create-policy.js +4 -3
  148. package/script/commands/iam/policies/get-policy.d.ts +1 -1
  149. package/script/commands/iam/policies/get-policy.d.ts.map +1 -1
  150. package/script/commands/iam/policies/get-policy.js +4 -3
  151. package/script/commands/iam/policies/id/archive-policy.d.ts +1 -1
  152. package/script/commands/iam/policies/id/archive-policy.d.ts.map +1 -1
  153. package/script/commands/iam/policies/id/archive-policy.js +4 -3
  154. package/script/commands/iam/policies/id/get-policy.d.ts +1 -1
  155. package/script/commands/iam/policies/id/get-policy.d.ts.map +1 -1
  156. package/script/commands/iam/policies/id/get-policy.js +4 -3
  157. package/script/commands/iam/policies/id/update-policy.d.ts +1 -1
  158. package/script/commands/iam/policies/id/update-policy.d.ts.map +1 -1
  159. package/script/commands/iam/policies/id/update-policy.js +4 -3
  160. package/script/commands/iam/policy-associations/get-key-policies.d.ts +1 -1
  161. package/script/commands/iam/policy-associations/get-key-policies.d.ts.map +1 -1
  162. package/script/commands/iam/policy-associations/get-key-policies.js +5 -4
  163. package/script/commands/iam/policy-associations/get-organization-policies.d.ts +1 -1
  164. package/script/commands/iam/policy-associations/get-organization-policies.d.ts.map +1 -1
  165. package/script/commands/iam/policy-associations/get-organization-policies.js +5 -4
  166. package/script/commands/iam/policy-associations/get-policy-associations.d.ts +1 -1
  167. package/script/commands/iam/policy-associations/get-policy-associations.d.ts.map +1 -1
  168. package/script/commands/iam/policy-associations/get-policy-associations.js +7 -6
  169. package/script/commands/iam/policy-associations/get-role-policies.d.ts +1 -1
  170. package/script/commands/iam/policy-associations/get-role-policies.d.ts.map +1 -1
  171. package/script/commands/iam/policy-associations/get-role-policies.js +5 -4
  172. package/script/commands/iam/policy-associations/get-user-policies.d.ts +1 -1
  173. package/script/commands/iam/policy-associations/get-user-policies.d.ts.map +1 -1
  174. package/script/commands/iam/policy-associations/get-user-policies.js +4 -3
  175. package/script/commands/iam/policy-associations/link-key-policy.d.ts +1 -1
  176. package/script/commands/iam/policy-associations/link-key-policy.d.ts.map +1 -1
  177. package/script/commands/iam/policy-associations/link-key-policy.js +4 -3
  178. package/script/commands/iam/policy-associations/link-role-policy.d.ts +1 -1
  179. package/script/commands/iam/policy-associations/link-role-policy.d.ts.map +1 -1
  180. package/script/commands/iam/policy-associations/link-role-policy.js +4 -3
  181. package/script/commands/iam/policy-associations/link-user-policy.d.ts +1 -1
  182. package/script/commands/iam/policy-associations/link-user-policy.d.ts.map +1 -1
  183. package/script/commands/iam/policy-associations/link-user-policy.js +4 -3
  184. package/script/commands/iam/policy-associations/unlink-key-policy.d.ts +1 -1
  185. package/script/commands/iam/policy-associations/unlink-key-policy.d.ts.map +1 -1
  186. package/script/commands/iam/policy-associations/unlink-key-policy.js +4 -3
  187. package/script/commands/iam/policy-associations/unlink-role-policy.d.ts +1 -1
  188. package/script/commands/iam/policy-associations/unlink-role-policy.d.ts.map +1 -1
  189. package/script/commands/iam/policy-associations/unlink-role-policy.js +4 -3
  190. package/script/commands/iam/policy-associations/unlink-user-policy.d.ts +1 -1
  191. package/script/commands/iam/policy-associations/unlink-user-policy.d.ts.map +1 -1
  192. package/script/commands/iam/policy-associations/unlink-user-policy.js +4 -3
  193. package/script/commands/iam/role-associations/get-key-roles.d.ts +1 -1
  194. package/script/commands/iam/role-associations/get-key-roles.d.ts.map +1 -1
  195. package/script/commands/iam/role-associations/get-key-roles.js +4 -3
  196. package/script/commands/iam/role-associations/get-organization-roles.d.ts +1 -1
  197. package/script/commands/iam/role-associations/get-organization-roles.d.ts.map +1 -1
  198. package/script/commands/iam/role-associations/get-organization-roles.js +4 -3
  199. package/script/commands/iam/role-associations/get-role-associations.d.ts +1 -1
  200. package/script/commands/iam/role-associations/get-role-associations.d.ts.map +1 -1
  201. package/script/commands/iam/role-associations/get-role-associations.js +4 -3
  202. package/script/commands/iam/role-associations/get-user-roles.d.ts +1 -1
  203. package/script/commands/iam/role-associations/get-user-roles.d.ts.map +1 -1
  204. package/script/commands/iam/role-associations/get-user-roles.js +4 -3
  205. package/script/commands/iam/role-associations/link-key-role.d.ts +1 -1
  206. package/script/commands/iam/role-associations/link-key-role.d.ts.map +1 -1
  207. package/script/commands/iam/role-associations/link-key-role.js +4 -3
  208. package/script/commands/iam/role-associations/link-user-role.d.ts +1 -1
  209. package/script/commands/iam/role-associations/link-user-role.d.ts.map +1 -1
  210. package/script/commands/iam/role-associations/link-user-role.js +4 -3
  211. package/script/commands/iam/role-associations/unlink-key-role.d.ts +1 -1
  212. package/script/commands/iam/role-associations/unlink-key-role.d.ts.map +1 -1
  213. package/script/commands/iam/role-associations/unlink-key-role.js +4 -3
  214. package/script/commands/iam/role-associations/unlink-user-role.d.ts +1 -1
  215. package/script/commands/iam/role-associations/unlink-user-role.d.ts.map +1 -1
  216. package/script/commands/iam/role-associations/unlink-user-role.js +4 -3
  217. package/script/commands/iam/roles/create-role.d.ts +1 -1
  218. package/script/commands/iam/roles/create-role.d.ts.map +1 -1
  219. package/script/commands/iam/roles/create-role.js +4 -3
  220. package/script/commands/iam/roles/get-roles.d.ts +1 -1
  221. package/script/commands/iam/roles/get-roles.d.ts.map +1 -1
  222. package/script/commands/iam/roles/get-roles.js +4 -3
  223. package/script/commands/iam/roles/id/archive-role.d.ts +1 -1
  224. package/script/commands/iam/roles/id/archive-role.d.ts.map +1 -1
  225. package/script/commands/iam/roles/id/archive-role.js +4 -3
  226. package/script/commands/iam/roles/id/get-role.d.ts +1 -1
  227. package/script/commands/iam/roles/id/get-role.d.ts.map +1 -1
  228. package/script/commands/iam/roles/id/get-role.js +4 -3
  229. package/script/commands/iam/roles/id/update-role.d.ts +1 -1
  230. package/script/commands/iam/roles/id/update-role.d.ts.map +1 -1
  231. package/script/commands/iam/roles/id/update-role.js +4 -3
  232. package/script/commands/iam/tenant-iam-audit/get-audit-for-tenant.d.ts +1 -1
  233. package/script/commands/iam/tenant-iam-audit/get-audit-for-tenant.d.ts.map +1 -1
  234. package/script/commands/iam/tenant-iam-audit/get-audit-for-tenant.js +4 -3
  235. package/script/commands/iam/validate/validate-key.d.ts +1 -1
  236. package/script/commands/iam/validate/validate-key.d.ts.map +1 -1
  237. package/script/commands/iam/validate/validate-key.js +4 -3
  238. package/script/commands/iam/validate/validate-user.d.ts +1 -1
  239. package/script/commands/iam/validate/validate-user.d.ts.map +1 -1
  240. package/script/commands/iam/validate/validate-user.js +4 -3
  241. package/script/commands/index.d.ts +2 -0
  242. package/script/commands/index.d.ts.map +1 -1
  243. package/script/commands/index.js +2 -0
  244. package/script/commands/secret/secret.create.d.ts +23 -8
  245. package/script/commands/secret/secret.create.d.ts.map +1 -1
  246. package/script/commands/secret/secret.create.js +27 -39
  247. package/script/commands/secret/secret.delete.d.ts +20 -8
  248. package/script/commands/secret/secret.delete.d.ts.map +1 -1
  249. package/script/commands/secret/secret.delete.js +27 -41
  250. package/script/commands/secret/secret.edit.d.ts +45 -0
  251. package/script/commands/secret/secret.edit.d.ts.map +1 -0
  252. package/script/commands/secret/secret.edit.js +44 -0
  253. package/script/commands/secret/secret.list.d.ts +20 -7
  254. package/script/commands/secret/secret.list.d.ts.map +1 -1
  255. package/script/commands/secret/secret.list.js +27 -41
  256. package/script/commands/variable/variable.create.d.ts +21 -7
  257. package/script/commands/variable/variable.create.d.ts.map +1 -1
  258. package/script/commands/variable/variable.create.js +26 -44
  259. package/script/commands/variable/variable.delete.d.ts +20 -8
  260. package/script/commands/variable/variable.delete.d.ts.map +1 -1
  261. package/script/commands/variable/variable.delete.js +27 -44
  262. package/script/commands/variable/variable.edit.d.ts +45 -0
  263. package/script/commands/variable/variable.edit.d.ts.map +1 -0
  264. package/script/commands/variable/variable.edit.js +44 -0
  265. package/script/commands/variable/variable.list.d.ts +19 -7
  266. package/script/commands/variable/variable.list.d.ts.map +1 -1
  267. package/script/commands/variable/variable.list.js +27 -47
  268. package/script/contracts/secret.d.ts +16 -0
  269. package/script/contracts/secret.d.ts.map +1 -0
  270. package/script/contracts/secret.js +14 -0
  271. package/script/contracts/variable.d.ts +5 -1
  272. package/script/contracts/variable.d.ts.map +1 -1
  273. package/script/contracts/variable.js +4 -0
@@ -1,4 +1,4 @@
1
- import { GraphQlCommand } from "../../common/command-graphql.js";
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
- * List secrets
12
+ * Delete a secret
13
13
  */
14
- export declare class SecretDeleteCommand extends GraphQlCommand<SecretDeleteInput, boolean> {
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(rawResponse: unknown): boolean;
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":"AACA,OAAO,EAAE,cAAc,EAAE,MAAM,iCAAiC,CAAA;AAIhE;;GAEG;AACH,MAAM,WAAW,iBAAiB;IAChC,oBAAoB;IACpB,QAAQ,EAAE,MAAM,CAAA;IAChB,4BAA4B;IAC5B,GAAG,EAAE,MAAM,CAAA;CACZ;AAyBD;;GAEG;AACH,qBAAa,mBAAoB,SAAQ,cAAc,CAAC,iBAAiB,EAAE,OAAO,CAAC;IACjF;;OAEG;IACH,UAAmB,YAAY,EAAE,CAAC,QAAQ,GAAG,QAAQ,CAAC,EAAE,CAAa;IAErE;;OAEG;cACgB,aAAa,CAAC,WAAW,EAAE,OAAO,GAAG,OAAO;IAW/D;;OAEG;cACgB,OAAO,IAAI,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC;CAMtD"}
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 typebox_1 = require("@sinclair/typebox");
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
- * List secrets
6
+ * Delete a secret
27
7
  */
28
- class SecretDeleteCommand extends command_graphql_js_1.GraphQlCommand {
8
+ class SecretDeleteCommand extends command_js_1.Command {
29
9
  /**
30
- * The allowed modes for the command
10
+ * Whether the command should retry on failure
31
11
  */
32
- allowedModes = ["bearer"];
12
+ retryOnFailure = false;
33
13
  /**
34
- * Parse the response
14
+ * Get the method
35
15
  */
36
- parseResponse(rawResponse) {
37
- const response = (0, parse_response_helper_js_1.parseResponseHelper)(responseSchema, rawResponse);
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 body for the request
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
- getBody() {
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 { GraphQlCommand } from "../../common/command-graphql.js";
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 GraphQlCommand<SecretListInput, string[]> {
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): string[];
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":"AACA,OAAO,EAAE,cAAc,EAAE,MAAM,iCAAiC,CAAA;AAIhE;;GAEG;AACH,MAAM,WAAW,eAAe;IAC9B,oBAAoB;IACpB,QAAQ,EAAE,MAAM,CAAA;CACjB;AA4BD;;GAEG;AACH,qBAAa,iBAAkB,SAAQ,cAAc,CAAC,eAAe,EAAE,MAAM,EAAE,CAAC;IAC9E;;OAEG;IACH,UAAmB,YAAY,EAAE,CAAC,QAAQ,GAAG,QAAQ,CAAC,EAAE,CAAa;IAErE;;OAEG;cACgB,aAAa,CAAC,WAAW,EAAE,OAAO,GAAG,MAAM,EAAE;IAWhE;;OAEG;cACgB,OAAO,IAAI,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC;CAMtD"}
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 typebox_1 = require("@sinclair/typebox");
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 command_error_js_1 = require("../../exceptions/command-error.js");
8
- const graphQlQueryById = `
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 command_graphql_js_1.GraphQlCommand {
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
- const response = (0, parse_response_helper_js_1.parseResponseHelper)(responseSchema, rawResponse);
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 { GraphQlCommand } from "../../common/command-graphql.js";
2
- import type { Variable } from "../../contracts/variable.js";
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 GraphQlCommand<VariableCreateInput, Variable> {
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":"AACA,OAAO,EAAE,cAAc,EAAE,MAAM,iCAAiC,CAAA;AAEhE,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,6BAA6B,CAAA;AAG3D;;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;CACd;AA4BD;;GAEG;AACH,qBAAa,qBAAsB,SAAQ,cAAc,CAAC,mBAAmB,EAAE,QAAQ,CAAC;IACtF;;OAEG;IACH,UAAmB,YAAY,EAAE,CAAC,QAAQ,GAAG,QAAQ,CAAC,EAAE,CAAa;IAErE;;OAEG;cACgB,aAAa,CAAC,WAAW,EAAE,OAAO,GAAG,QAAQ;IAchE;;OAEG;cACgB,OAAO,IAAI,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC;CAMtD"}
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 typebox_1 = require("@sinclair/typebox");
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 command_error_js_1 = require("../../exceptions/command-error.js");
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 command_graphql_js_1.GraphQlCommand {
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
- const response = (0, parse_response_helper_js_1.parseResponseHelper)(responseSchema, rawResponse);
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 { GraphQlCommand } from "../../common/command-graphql.js";
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
- * Create a variable
12
+ * Delete a variable
13
13
  */
14
- export declare class VariableDeleteCommand extends GraphQlCommand<VariableDeleteInput, boolean> {
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(rawResponse: unknown): boolean;
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":"AACA,OAAO,EAAE,cAAc,EAAE,MAAM,iCAAiC,CAAA;AAIhE;;GAEG;AACH,MAAM,WAAW,mBAAmB;IAClC,oBAAoB;IACpB,QAAQ,EAAE,MAAM,CAAA;IAChB,8BAA8B;IAC9B,GAAG,EAAE,MAAM,CAAA;CACZ;AA4BD;;GAEG;AACH,qBAAa,qBAAsB,SAAQ,cAAc,CAAC,mBAAmB,EAAE,OAAO,CAAC;IACrF;;OAEG;IACH,UAAmB,YAAY,EAAE,CAAC,QAAQ,GAAG,QAAQ,CAAC,EAAE,CAAa;IAErE;;OAEG;cACgB,aAAa,CAAC,WAAW,EAAE,OAAO,GAAG,OAAO;IAW/D;;OAEG;cACgB,OAAO,IAAI,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC;CAMtD"}
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 typebox_1 = require("@sinclair/typebox");
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
- * Create a variable
6
+ * Delete a variable
30
7
  */
31
- class VariableDeleteCommand extends command_graphql_js_1.GraphQlCommand {
8
+ class VariableDeleteCommand extends command_js_1.Command {
32
9
  /**
33
- * The allowed modes for the command
10
+ * Whether the command should retry on failure
34
11
  */
35
- allowedModes = ["bearer"];
12
+ retryOnFailure = false;
36
13
  /**
37
- * Parse the response
14
+ * Get the method
38
15
  */
39
- parseResponse(rawResponse) {
40
- const response = (0, parse_response_helper_js_1.parseResponseHelper)(responseSchema, rawResponse);
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 body for the request
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
- getBody() {
53
- return {
54
- query: graphQlQueryById,
55
- variables: this.input,
56
- };
38
+ parseResponse() {
39
+ return true;
57
40
  }
58
41
  }
59
42
  exports.VariableDeleteCommand = VariableDeleteCommand;