@flowcore/sdk 1.9.2 → 1.10.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 (150) hide show
  1. package/CHANGELOG.md +20 -0
  2. package/esm/commands/api-key/api-key.create.d.ts +11 -3
  3. package/esm/commands/api-key/api-key.create.d.ts.map +1 -1
  4. package/esm/commands/api-key/api-key.create.js +22 -11
  5. package/esm/commands/api-key/api-key.delete.d.ts +1 -1
  6. package/esm/commands/api-key/api-key.delete.d.ts.map +1 -1
  7. package/esm/commands/api-key/api-key.delete.js +2 -2
  8. package/esm/commands/api-key/api-key.list.d.ts +1 -1
  9. package/esm/commands/api-key/api-key.list.d.ts.map +1 -1
  10. package/esm/commands/api-key/api-key.list.js +2 -2
  11. package/esm/commands/data-core/data-core.delete-request.d.ts +2 -6
  12. package/esm/commands/data-core/data-core.delete-request.d.ts.map +1 -1
  13. package/esm/commands/data-core/data-core.delete-request.js +4 -13
  14. package/esm/commands/data-core/data-core.fetch.d.ts +5 -0
  15. package/esm/commands/data-core/data-core.fetch.d.ts.map +1 -1
  16. package/esm/commands/data-core/data-core.fetch.js +12 -1
  17. package/esm/commands/data-core/data-core.update.d.ts +1 -1
  18. package/esm/commands/data-core/data-core.update.d.ts.map +1 -1
  19. package/esm/commands/data-core/data-core.update.js +1 -1
  20. package/esm/commands/event-type/event-type.delete-request.d.ts +2 -2
  21. package/esm/commands/event-type/event-type.delete-request.d.ts.map +1 -1
  22. package/esm/commands/event-type/event-type.delete-request.js +4 -4
  23. package/esm/commands/event-type/event-type.fetch.d.ts +5 -0
  24. package/esm/commands/event-type/event-type.fetch.d.ts.map +1 -1
  25. package/esm/commands/event-type/event-type.fetch.js +12 -1
  26. package/esm/commands/event-type/event-type.update.d.ts +2 -2
  27. package/esm/commands/event-type/event-type.update.d.ts.map +1 -1
  28. package/esm/commands/event-type/event-type.update.js +2 -2
  29. package/esm/commands/events/events.fetch-time-buckets-by-names.d.ts +1 -1
  30. package/esm/commands/events/events.fetch-time-buckets-by-names.d.ts.map +1 -1
  31. package/esm/commands/events/events.fetch-time-buckets-by-names.js +2 -1
  32. package/esm/commands/events/events.fetch.d.ts +1 -1
  33. package/esm/commands/events/events.fetch.d.ts.map +1 -1
  34. package/esm/commands/events/events.fetch.js +2 -2
  35. package/esm/commands/flow-type/flow-type.delete-request.d.ts +6 -4
  36. package/esm/commands/flow-type/flow-type.delete-request.d.ts.map +1 -1
  37. package/esm/commands/flow-type/flow-type.delete-request.js +4 -4
  38. package/esm/commands/flow-type/flow-type.fetch.d.ts +5 -0
  39. package/esm/commands/flow-type/flow-type.fetch.d.ts.map +1 -1
  40. package/esm/commands/flow-type/flow-type.fetch.js +12 -1
  41. package/esm/commands/flow-type/flow-type.update.d.ts +2 -2
  42. package/esm/commands/flow-type/flow-type.update.d.ts.map +1 -1
  43. package/esm/commands/flow-type/flow-type.update.js +1 -1
  44. package/esm/commands/secret/secret.create.d.ts +1 -1
  45. package/esm/commands/secret/secret.create.d.ts.map +1 -1
  46. package/esm/commands/secret/secret.create.js +2 -2
  47. package/esm/commands/secret/secret.delete.d.ts +1 -1
  48. package/esm/commands/secret/secret.delete.d.ts.map +1 -1
  49. package/esm/commands/secret/secret.delete.js +2 -3
  50. package/esm/commands/secret/secret.list.d.ts +1 -1
  51. package/esm/commands/secret/secret.list.d.ts.map +1 -1
  52. package/esm/commands/secret/secret.list.js +2 -2
  53. package/esm/commands/tenant/tenant.fetch.d.ts +1 -1
  54. package/esm/commands/tenant/tenant.fetch.d.ts.map +1 -1
  55. package/esm/commands/tenant/tenant.fetch.js +7 -5
  56. package/esm/commands/tenant/tenant.list.d.ts +1 -1
  57. package/esm/commands/tenant/tenant.list.d.ts.map +1 -1
  58. package/esm/commands/tenant/tenant.list.js +2 -2
  59. package/esm/commands/variable/variable.create.d.ts +1 -1
  60. package/esm/commands/variable/variable.create.d.ts.map +1 -1
  61. package/esm/commands/variable/variable.create.js +2 -2
  62. package/esm/commands/variable/variable.delete.d.ts +1 -1
  63. package/esm/commands/variable/variable.delete.d.ts.map +1 -1
  64. package/esm/commands/variable/variable.delete.js +2 -2
  65. package/esm/commands/variable/variable.list.d.ts +1 -1
  66. package/esm/commands/variable/variable.list.d.ts.map +1 -1
  67. package/esm/commands/variable/variable.list.js +2 -2
  68. package/esm/common/command.d.ts +23 -6
  69. package/esm/common/command.d.ts.map +1 -1
  70. package/esm/common/command.js +33 -5
  71. package/esm/common/flowcore-client.d.ts.map +1 -1
  72. package/esm/common/flowcore-client.js +15 -9
  73. package/esm/exceptions/not-found.d.ts +1 -1
  74. package/esm/exceptions/not-found.d.ts.map +1 -1
  75. package/esm/exceptions/not-found.js +2 -2
  76. package/package.json +1 -1
  77. package/script/commands/api-key/api-key.create.d.ts +11 -3
  78. package/script/commands/api-key/api-key.create.d.ts.map +1 -1
  79. package/script/commands/api-key/api-key.create.js +22 -11
  80. package/script/commands/api-key/api-key.delete.d.ts +1 -1
  81. package/script/commands/api-key/api-key.delete.d.ts.map +1 -1
  82. package/script/commands/api-key/api-key.delete.js +2 -2
  83. package/script/commands/api-key/api-key.list.d.ts +1 -1
  84. package/script/commands/api-key/api-key.list.d.ts.map +1 -1
  85. package/script/commands/api-key/api-key.list.js +2 -2
  86. package/script/commands/data-core/data-core.delete-request.d.ts +2 -6
  87. package/script/commands/data-core/data-core.delete-request.d.ts.map +1 -1
  88. package/script/commands/data-core/data-core.delete-request.js +4 -13
  89. package/script/commands/data-core/data-core.fetch.d.ts +5 -0
  90. package/script/commands/data-core/data-core.fetch.d.ts.map +1 -1
  91. package/script/commands/data-core/data-core.fetch.js +12 -1
  92. package/script/commands/data-core/data-core.update.d.ts +1 -1
  93. package/script/commands/data-core/data-core.update.d.ts.map +1 -1
  94. package/script/commands/data-core/data-core.update.js +1 -1
  95. package/script/commands/event-type/event-type.delete-request.d.ts +2 -2
  96. package/script/commands/event-type/event-type.delete-request.d.ts.map +1 -1
  97. package/script/commands/event-type/event-type.delete-request.js +4 -4
  98. package/script/commands/event-type/event-type.fetch.d.ts +5 -0
  99. package/script/commands/event-type/event-type.fetch.d.ts.map +1 -1
  100. package/script/commands/event-type/event-type.fetch.js +12 -1
  101. package/script/commands/event-type/event-type.update.d.ts +2 -2
  102. package/script/commands/event-type/event-type.update.d.ts.map +1 -1
  103. package/script/commands/event-type/event-type.update.js +2 -2
  104. package/script/commands/events/events.fetch-time-buckets-by-names.d.ts +1 -1
  105. package/script/commands/events/events.fetch-time-buckets-by-names.d.ts.map +1 -1
  106. package/script/commands/events/events.fetch-time-buckets-by-names.js +2 -1
  107. package/script/commands/events/events.fetch.d.ts +1 -1
  108. package/script/commands/events/events.fetch.d.ts.map +1 -1
  109. package/script/commands/events/events.fetch.js +2 -2
  110. package/script/commands/flow-type/flow-type.delete-request.d.ts +6 -4
  111. package/script/commands/flow-type/flow-type.delete-request.d.ts.map +1 -1
  112. package/script/commands/flow-type/flow-type.delete-request.js +4 -4
  113. package/script/commands/flow-type/flow-type.fetch.d.ts +5 -0
  114. package/script/commands/flow-type/flow-type.fetch.d.ts.map +1 -1
  115. package/script/commands/flow-type/flow-type.fetch.js +12 -1
  116. package/script/commands/flow-type/flow-type.update.d.ts +2 -2
  117. package/script/commands/flow-type/flow-type.update.d.ts.map +1 -1
  118. package/script/commands/flow-type/flow-type.update.js +1 -1
  119. package/script/commands/secret/secret.create.d.ts +1 -1
  120. package/script/commands/secret/secret.create.d.ts.map +1 -1
  121. package/script/commands/secret/secret.create.js +2 -2
  122. package/script/commands/secret/secret.delete.d.ts +1 -1
  123. package/script/commands/secret/secret.delete.d.ts.map +1 -1
  124. package/script/commands/secret/secret.delete.js +2 -3
  125. package/script/commands/secret/secret.list.d.ts +1 -1
  126. package/script/commands/secret/secret.list.d.ts.map +1 -1
  127. package/script/commands/secret/secret.list.js +2 -2
  128. package/script/commands/tenant/tenant.fetch.d.ts +1 -1
  129. package/script/commands/tenant/tenant.fetch.d.ts.map +1 -1
  130. package/script/commands/tenant/tenant.fetch.js +7 -5
  131. package/script/commands/tenant/tenant.list.d.ts +1 -1
  132. package/script/commands/tenant/tenant.list.d.ts.map +1 -1
  133. package/script/commands/tenant/tenant.list.js +2 -2
  134. package/script/commands/variable/variable.create.d.ts +1 -1
  135. package/script/commands/variable/variable.create.d.ts.map +1 -1
  136. package/script/commands/variable/variable.create.js +2 -2
  137. package/script/commands/variable/variable.delete.d.ts +1 -1
  138. package/script/commands/variable/variable.delete.d.ts.map +1 -1
  139. package/script/commands/variable/variable.delete.js +2 -2
  140. package/script/commands/variable/variable.list.d.ts +1 -1
  141. package/script/commands/variable/variable.list.d.ts.map +1 -1
  142. package/script/commands/variable/variable.list.js +2 -2
  143. package/script/common/command.d.ts +23 -6
  144. package/script/common/command.d.ts.map +1 -1
  145. package/script/common/command.js +33 -5
  146. package/script/common/flowcore-client.d.ts.map +1 -1
  147. package/script/common/flowcore-client.js +15 -9
  148. package/script/exceptions/not-found.d.ts +1 -1
  149. package/script/exceptions/not-found.d.ts.map +1 -1
  150. package/script/exceptions/not-found.js +2 -2
@@ -45,7 +45,7 @@ class ApiKeyCreateCommand extends command_js_1.GraphQlCommand {
45
45
  /**
46
46
  * Parse the response
47
47
  */
48
- async parseResponse(rawResponse, flowcoreClient) {
48
+ parseResponse(rawResponse) {
49
49
  const response = (0, parse_response_helper_js_1.parseResponseHelper)(responseSchema, rawResponse);
50
50
  if (response.errors) {
51
51
  throw new command_error_js_1.CommandError(this.constructor.name, response.errors[0].message);
@@ -53,15 +53,10 @@ class ApiKeyCreateCommand extends command_js_1.GraphQlCommand {
53
53
  if (!response.data || response.data?.organization.createApiKey === null) {
54
54
  throw new command_error_js_1.CommandError(this.constructor.name, "Failed to create API key");
55
55
  }
56
- const apiKeys = await flowcoreClient.execute(new api_key_list_js_1.ApiKeyListCommand({
57
- tenantId: this.input.tenantId,
58
- }));
59
- const apiKey = apiKeys.find((apiKey) => apiKey.name === this.input.name);
60
- if (!apiKey) {
61
- throw new Error("API key not found");
62
- }
63
56
  return {
64
- ...apiKey,
57
+ id: "",
58
+ name: "",
59
+ createdAt: "",
65
60
  value: response.data.organization.createApiKey,
66
61
  };
67
62
  }
@@ -69,10 +64,26 @@ class ApiKeyCreateCommand extends command_js_1.GraphQlCommand {
69
64
  * Get the body for the request
70
65
  */
71
66
  getBody() {
72
- return JSON.stringify({
67
+ return {
73
68
  query: graphQlQueryById,
74
69
  variables: this.input,
75
- });
70
+ };
71
+ }
72
+ /**
73
+ * Fill in the missing fields
74
+ */
75
+ async processResponse(flowcoreClient, response) {
76
+ const apiKeys = await flowcoreClient.execute(new api_key_list_js_1.ApiKeyListCommand({
77
+ tenantId: this.input.tenantId,
78
+ }));
79
+ const apiKey = apiKeys.find((apiKey) => apiKey.name === this.input.name);
80
+ if (!apiKey) {
81
+ throw new Error("API key not found");
82
+ }
83
+ return {
84
+ ...apiKey,
85
+ value: response.value,
86
+ };
76
87
  }
77
88
  }
78
89
  exports.ApiKeyCreateCommand = ApiKeyCreateCommand;
@@ -23,6 +23,6 @@ export declare class ApiKeyDeleteCommand extends GraphQlCommand<ApiKeyDeleteInpu
23
23
  /**
24
24
  * Get the body for the request
25
25
  */
26
- protected getBody(): string;
26
+ protected getBody(): Record<string, unknown>;
27
27
  }
28
28
  //# sourceMappingURL=api-key.delete.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"api-key.delete.d.ts","sourceRoot":"","sources":["../../../src/commands/api-key/api-key.delete.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,cAAc,EAAE,MAAM,yBAAyB,CAAA;AAIxD;;GAEG;AACH,MAAM,WAAW,iBAAiB;IAChC,2BAA2B;IAC3B,QAAQ,EAAE,MAAM,CAAA;IAChB,4BAA4B;IAC5B,QAAQ,EAAE,MAAM,CAAA;CACjB;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;CAMrC"}
1
+ {"version":3,"file":"api-key.delete.d.ts","sourceRoot":"","sources":["../../../src/commands/api-key/api-key.delete.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,cAAc,EAAE,MAAM,yBAAyB,CAAA;AAIxD;;GAEG;AACH,MAAM,WAAW,iBAAiB;IAChC,2BAA2B;IAC3B,QAAQ,EAAE,MAAM,CAAA;IAChB,4BAA4B;IAC5B,QAAQ,EAAE,MAAM,CAAA;CACjB;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"}
@@ -55,10 +55,10 @@ class ApiKeyDeleteCommand extends command_js_1.GraphQlCommand {
55
55
  * Get the body for the request
56
56
  */
57
57
  getBody() {
58
- return JSON.stringify({
58
+ return {
59
59
  query: graphQlQueryById,
60
60
  variables: this.input,
61
- });
61
+ };
62
62
  }
63
63
  }
64
64
  exports.ApiKeyDeleteCommand = ApiKeyDeleteCommand;
@@ -22,6 +22,6 @@ export declare class ApiKeyListCommand extends GraphQlCommand<ApiKeyListInput, A
22
22
  /**
23
23
  * Get the body for the request
24
24
  */
25
- protected getBody(): string;
25
+ protected getBody(): Record<string, unknown>;
26
26
  }
27
27
  //# sourceMappingURL=api-key.list.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"api-key.list.d.ts","sourceRoot":"","sources":["../../../src/commands/api-key/api-key.list.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,cAAc,EAAE,MAAM,yBAAyB,CAAA;AAExD,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,4BAA4B,CAAA;AAExD;;GAEG;AACH,MAAM,WAAW,eAAe;IAC9B,oBAAoB;IACpB,QAAQ,EAAE,MAAM,CAAA;CACjB;AA0BD;;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;IAKhE;;OAEG;cACgB,OAAO,IAAI,MAAM;CAMrC"}
1
+ {"version":3,"file":"api-key.list.d.ts","sourceRoot":"","sources":["../../../src/commands/api-key/api-key.list.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,cAAc,EAAE,MAAM,yBAAyB,CAAA;AAExD,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,4BAA4B,CAAA;AAExD;;GAEG;AACH,MAAM,WAAW,eAAe;IAC9B,oBAAoB;IACpB,QAAQ,EAAE,MAAM,CAAA;CACjB;AA0BD;;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;IAKhE;;OAEG;cACgB,OAAO,IAAI,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC;CAMtD"}
@@ -53,10 +53,10 @@ class ApiKeyListCommand extends command_js_1.GraphQlCommand {
53
53
  * Get the body for the request
54
54
  */
55
55
  getBody() {
56
- return JSON.stringify({
56
+ return {
57
57
  query: graphQlQueryById,
58
58
  variables: this.input,
59
- });
59
+ };
60
60
  }
61
61
  }
62
62
  exports.ApiKeyListCommand = ApiKeyListCommand;
@@ -13,10 +13,6 @@ export type DataCoreDeleteRequestInput = {
13
13
  * Request to delete a data core
14
14
  */
15
15
  export declare class DataCoreDeleteRequestCommand extends GraphQlCommand<DataCoreDeleteRequestInput, boolean> {
16
- /**
17
- * The allowed modes for the command
18
- */
19
- protected allowedModes: ("apiKey" | "bearer")[];
20
16
  /**
21
17
  * Create a new data core delete request command
22
18
  */
@@ -28,10 +24,10 @@ export declare class DataCoreDeleteRequestCommand extends GraphQlCommand<DataCor
28
24
  /**
29
25
  * Get the body for the request
30
26
  */
31
- protected getBody(): string;
27
+ protected getBody(): Record<string, unknown>;
32
28
  /**
33
29
  * Wait for the response (timeout: 25 seconds)
34
30
  */
35
- protected waitForResponse(client: FlowcoreClient, response: boolean): Promise<boolean>;
31
+ protected processResponse(client: FlowcoreClient, response: boolean): Promise<boolean>;
36
32
  }
37
33
  //# sourceMappingURL=data-core.delete-request.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"data-core.delete-request.d.ts","sourceRoot":"","sources":["../../../src/commands/data-core/data-core.delete-request.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,cAAc,EAAE,MAAM,yBAAyB,CAAA;AAKxD,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,iCAAiC,CAAA;AAErE;;GAEG;AACH,MAAM,MAAM,0BAA0B,GAAG;IACvC,8BAA8B;IAC9B,UAAU,EAAE,MAAM,CAAA;IAClB,2DAA2D;IAC3D,aAAa,CAAC,EAAE,OAAO,CAAA;CACxB,CAAA;AA4BD;;GAEG;AACH,qBAAa,4BAA6B,SAAQ,cAAc,CAAC,0BAA0B,EAAE,OAAO,CAAC;IACnG;;OAEG;IACH,UAAmB,YAAY,EAAE,CAAC,QAAQ,GAAG,QAAQ,CAAC,EAAE,CAAa;IAErE;;OAEG;gBACS,KAAK,EAAE,0BAA0B;IAO7C;;OAEG;cACgB,aAAa,CAAC,QAAQ,EAAE,OAAO,GAAG,OAAO;IAW5D;;OAEG;cACgB,OAAO,IAAI,MAAM;IAOpC;;OAEG;cACsB,eAAe,CAAC,MAAM,EAAE,cAAc,EAAE,QAAQ,EAAE,OAAO,GAAG,OAAO,CAAC,OAAO,CAAC;CAkBtG"}
1
+ {"version":3,"file":"data-core.delete-request.d.ts","sourceRoot":"","sources":["../../../src/commands/data-core/data-core.delete-request.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,cAAc,EAAE,MAAM,yBAAyB,CAAA;AAKxD,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,iCAAiC,CAAA;AAErE;;GAEG;AACH,MAAM,MAAM,0BAA0B,GAAG;IACvC,8BAA8B;IAC9B,UAAU,EAAE,MAAM,CAAA;IAClB,2DAA2D;IAC3D,aAAa,CAAC,EAAE,OAAO,CAAA;CACxB,CAAA;AA4BD;;GAEG;AACH,qBAAa,4BAA6B,SAAQ,cAAc,CAAC,0BAA0B,EAAE,OAAO,CAAC;IACnG;;OAEG;gBACS,KAAK,EAAE,0BAA0B;IAO7C;;OAEG;cACgB,aAAa,CAAC,QAAQ,EAAE,OAAO,GAAG,OAAO;IAW5D;;OAEG;cACgB,OAAO,IAAI,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC;IAOrD;;OAEG;cACsB,eAAe,CAAC,MAAM,EAAE,cAAc,EAAE,QAAQ,EAAE,OAAO,GAAG,OAAO,CAAC,OAAO,CAAC;CAkBtG"}
@@ -43,15 +43,6 @@ class DataCoreDeleteRequestCommand extends command_js_1.GraphQlCommand {
43
43
  ...input,
44
44
  waitForDelete: input.waitForDelete ?? true,
45
45
  });
46
- /**
47
- * The allowed modes for the command
48
- */
49
- Object.defineProperty(this, "allowedModes", {
50
- enumerable: true,
51
- configurable: true,
52
- writable: true,
53
- value: ["bearer"]
54
- });
55
46
  }
56
47
  /**
57
48
  * Parse the response
@@ -62,7 +53,7 @@ class DataCoreDeleteRequestCommand extends command_js_1.GraphQlCommand {
62
53
  throw new command_error_js_1.CommandError(this.constructor.name, parsedResponse.errors[0].message);
63
54
  }
64
55
  if (!parsedResponse.data.datacore?.requestDelete) {
65
- throw new not_found_js_1.NotFoundException("DataCore", this.input.dataCoreId);
56
+ throw new not_found_js_1.NotFoundException("DataCore", { id: this.input.dataCoreId });
66
57
  }
67
58
  return parsedResponse.data.datacore.requestDelete.deleting;
68
59
  }
@@ -70,15 +61,15 @@ class DataCoreDeleteRequestCommand extends command_js_1.GraphQlCommand {
70
61
  * Get the body for the request
71
62
  */
72
63
  getBody() {
73
- return JSON.stringify({
64
+ return {
74
65
  query: graphQlQuery,
75
66
  variables: this.input,
76
- });
67
+ };
77
68
  }
78
69
  /**
79
70
  * Wait for the response (timeout: 25 seconds)
80
71
  */
81
- async waitForResponse(client, response) {
72
+ async processResponse(client, response) {
82
73
  if (!this.input.waitForDelete) {
83
74
  return response;
84
75
  }
@@ -1,5 +1,6 @@
1
1
  import { Command } from "../../common/command.js";
2
2
  import { type DataCore } from "../../contracts/data-core.js";
3
+ import type { ClientError } from "../../exceptions/client-error.js";
3
4
  /**
4
5
  * The input for the data core fetch by id command
5
6
  */
@@ -46,6 +47,10 @@ export declare class DataCoreFetchCommand extends Command<DataCoreFetchInput, Da
46
47
  * Parse the response
47
48
  */
48
49
  protected parseResponse(rawResponse: unknown): DataCore;
50
+ /**
51
+ * Handle the client error
52
+ */
53
+ protected handleClientError(error: ClientError): void;
49
54
  }
50
55
  export {};
51
56
  //# sourceMappingURL=data-core.fetch.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"data-core.fetch.d.ts","sourceRoot":"","sources":["../../../src/commands/data-core/data-core.fetch.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,OAAO,EAAE,MAAM,yBAAyB,CAAA;AACjD,OAAO,EAAE,KAAK,QAAQ,EAAkB,MAAM,8BAA8B,CAAA;AAI5E;;GAEG;AACH,KAAK,sBAAsB,GAAG;IAC5B,8BAA8B;IAC9B,UAAU,EAAE,MAAM,CAAA;IAClB,gCAAgC;IAChC,QAAQ,CAAC,EAAE,KAAK,CAAA;IAChB,oBAAoB;IACpB,QAAQ,CAAC,EAAE,KAAK,CAAA;CACjB,CAAA;AAED;;GAEG;AACH,UAAU,wBAAwB;IAChC,oBAAoB;IACpB,QAAQ,EAAE,MAAM,CAAA;IAChB,gCAAgC;IAChC,QAAQ,EAAE,MAAM,CAAA;IAChB,8BAA8B;IAC9B,UAAU,CAAC,EAAE,KAAK,CAAA;CACnB;AAED;;GAEG;AACH,MAAM,MAAM,kBAAkB,GAAG,sBAAsB,GAAG,wBAAwB,CAAA;AAElF;;GAEG;AACH,qBAAa,oBAAqB,SAAQ,OAAO,CAAC,kBAAkB,EAAE,QAAQ,CAAC;IAC7E;;OAEG;cACgB,SAAS,IAAI,MAAM;IAItC;;OAEG;cACgB,UAAU,IAAI,MAAM;IAIvC;;OAEG;cACgB,OAAO,IAAI,MAAM;IAUpC;;OAEG;cACgB,aAAa,CAAC,WAAW,EAAE,OAAO,GAAG,QAAQ;CAWjE"}
1
+ {"version":3,"file":"data-core.fetch.d.ts","sourceRoot":"","sources":["../../../src/commands/data-core/data-core.fetch.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,OAAO,EAAE,MAAM,yBAAyB,CAAA;AACjD,OAAO,EAAE,KAAK,QAAQ,EAAkB,MAAM,8BAA8B,CAAA;AAG5E,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,kCAAkC,CAAA;AAEnE;;GAEG;AACH,KAAK,sBAAsB,GAAG;IAC5B,8BAA8B;IAC9B,UAAU,EAAE,MAAM,CAAA;IAClB,gCAAgC;IAChC,QAAQ,CAAC,EAAE,KAAK,CAAA;IAChB,oBAAoB;IACpB,QAAQ,CAAC,EAAE,KAAK,CAAA;CACjB,CAAA;AAED;;GAEG;AACH,UAAU,wBAAwB;IAChC,oBAAoB;IACpB,QAAQ,EAAE,MAAM,CAAA;IAChB,gCAAgC;IAChC,QAAQ,EAAE,MAAM,CAAA;IAChB,8BAA8B;IAC9B,UAAU,CAAC,EAAE,KAAK,CAAA;CACnB;AAED;;GAEG;AACH,MAAM,MAAM,kBAAkB,GAAG,sBAAsB,GAAG,wBAAwB,CAAA;AAElF;;GAEG;AACH,qBAAa,oBAAqB,SAAQ,OAAO,CAAC,kBAAkB,EAAE,QAAQ,CAAC;IAC7E;;OAEG;cACgB,SAAS,IAAI,MAAM;IAItC;;OAEG;cACgB,UAAU,IAAI,MAAM;IAIvC;;OAEG;cACgB,OAAO,IAAI,MAAM;IAUpC;;OAEG;cACgB,aAAa,CAAC,WAAW,EAAE,OAAO,GAAG,QAAQ;IAYhE;;OAEG;cACgB,iBAAiB,CAAC,KAAK,EAAE,WAAW,GAAG,IAAI;CAQ/D"}
@@ -44,9 +44,20 @@ class DataCoreFetchCommand extends command_js_1.Command {
44
44
  }
45
45
  const response = (0, parse_response_helper_js_1.parseResponseHelper)(typebox_1.Type.Array(data_core_js_1.DataCoreSchema), rawResponse);
46
46
  if (response.length === 0) {
47
- throw new not_found_js_1.NotFoundException("DataCore", this.input.dataCore);
47
+ throw new not_found_js_1.NotFoundException("DataCore", { name: this.input.dataCore });
48
48
  }
49
49
  return response[0];
50
50
  }
51
+ /**
52
+ * Handle the client error
53
+ */
54
+ handleClientError(error) {
55
+ if (error.status === 404) {
56
+ throw new not_found_js_1.NotFoundException("DataCore", {
57
+ [this.input.dataCoreId ? "id" : "name"]: this.input.dataCoreId ?? this.input.dataCore,
58
+ });
59
+ }
60
+ throw error;
61
+ }
51
62
  }
52
63
  exports.DataCoreFetchCommand = DataCoreFetchCommand;
@@ -32,7 +32,7 @@ export declare class DataCoreUpdateCommand extends Command<DataCoreUpdateInput,
32
32
  /**
33
33
  * Get the body for the request
34
34
  */
35
- protected getBody(): string | undefined;
35
+ protected getBody(): Record<string, unknown>;
36
36
  /**
37
37
  * Parse the response
38
38
  */
@@ -1 +1 @@
1
- {"version":3,"file":"data-core.update.d.ts","sourceRoot":"","sources":["../../../src/commands/data-core/data-core.update.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,yBAAyB,CAAA;AACjD,OAAO,EAAE,KAAK,QAAQ,EAAkB,MAAM,8BAA8B,CAAA;AAG5E;;GAEG;AACH,MAAM,MAAM,mBAAmB,GAAG;IAChC,8BAA8B;IAC9B,UAAU,EAAE,MAAM,CAAA;IAClB,uCAAuC;IACvC,WAAW,CAAC,EAAE,MAAM,CAAA;IACpB,0CAA0C;IAC1C,aAAa,CAAC,EAAE,QAAQ,GAAG,SAAS,CAAA;IACpC,gDAAgD;IAChD,gBAAgB,CAAC,EAAE,OAAO,CAAA;CAC3B,CAAA;AAED;;GAEG;AACH,qBAAa,qBAAsB,SAAQ,OAAO,CAAC,mBAAmB,EAAE,QAAQ,CAAC;IAC/E;;OAEG;cACgB,SAAS,IAAI,MAAM;IAGtC;;OAEG;cACgB,UAAU,IAAI,MAAM;IAIvC;;OAEG;cACgB,OAAO,IAAI,MAAM;IAIpC;;OAEG;cACgB,OAAO,IAAI,MAAM,GAAG,SAAS;IAQhD;;OAEG;cACgB,aAAa,CAAC,WAAW,EAAE,OAAO,GAAG,QAAQ;CAGjE"}
1
+ {"version":3,"file":"data-core.update.d.ts","sourceRoot":"","sources":["../../../src/commands/data-core/data-core.update.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,yBAAyB,CAAA;AACjD,OAAO,EAAE,KAAK,QAAQ,EAAkB,MAAM,8BAA8B,CAAA;AAG5E;;GAEG;AACH,MAAM,MAAM,mBAAmB,GAAG;IAChC,8BAA8B;IAC9B,UAAU,EAAE,MAAM,CAAA;IAClB,uCAAuC;IACvC,WAAW,CAAC,EAAE,MAAM,CAAA;IACpB,0CAA0C;IAC1C,aAAa,CAAC,EAAE,QAAQ,GAAG,SAAS,CAAA;IACpC,gDAAgD;IAChD,gBAAgB,CAAC,EAAE,OAAO,CAAA;CAC3B,CAAA;AAED;;GAEG;AACH,qBAAa,qBAAsB,SAAQ,OAAO,CAAC,mBAAmB,EAAE,QAAQ,CAAC;IAC/E;;OAEG;cACgB,SAAS,IAAI,MAAM;IAGtC;;OAEG;cACgB,UAAU,IAAI,MAAM;IAIvC;;OAEG;cACgB,OAAO,IAAI,MAAM;IAIpC;;OAEG;cACgB,OAAO,IAAI,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC;IAQrD;;OAEG;cACgB,aAAa,CAAC,WAAW,EAAE,OAAO,GAAG,QAAQ;CAGjE"}
@@ -35,7 +35,7 @@ class DataCoreUpdateCommand extends command_js_1.Command {
35
35
  if (Object.keys(payload).length === 0) {
36
36
  throw new command_error_js_1.CommandError(this.constructor.name, "No fields to update");
37
37
  }
38
- return JSON.stringify(payload);
38
+ return payload;
39
39
  }
40
40
  /**
41
41
  * Parse the response
@@ -28,10 +28,10 @@ export declare class EventTypeDeleteRequestCommand extends GraphQlCommand<EventT
28
28
  /**
29
29
  * Get the body for the request
30
30
  */
31
- protected getBody(): string;
31
+ protected getBody(): Record<string, unknown>;
32
32
  /**
33
33
  * Wait for the response (timeout: 25 seconds)
34
34
  */
35
- protected waitForResponse(client: FlowcoreClient, response: boolean): Promise<boolean>;
35
+ protected processResponse(client: FlowcoreClient, response: boolean): Promise<boolean>;
36
36
  }
37
37
  //# sourceMappingURL=event-type.delete-request.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"event-type.delete-request.d.ts","sourceRoot":"","sources":["../../../src/commands/event-type/event-type.delete-request.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,cAAc,EAAE,MAAM,yBAAyB,CAAA;AAIxD,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,iCAAiC,CAAA;AAGrE;;GAEG;AACH,MAAM,MAAM,2BAA2B,GAAG;IACxC,+BAA+B;IAC/B,WAAW,EAAE,MAAM,CAAA;IAEnB,4DAA4D;IAC5D,aAAa,CAAC,EAAE,OAAO,CAAA;CACxB,CAAA;AA+BD;;GAEG;AACH,qBAAa,6BAA8B,SAAQ,cAAc,CAAC,2BAA2B,EAAE,OAAO,CAAC;IACrG;;OAEG;IACH,UAAmB,YAAY,EAAE,CAAC,QAAQ,GAAG,QAAQ,CAAC,EAAE,CAAa;IAErE;;OAEG;gBACS,KAAK,EAAE,2BAA2B;IAO9C;;OAEG;cACgB,aAAa,CAAC,QAAQ,EAAE,OAAO,GAAG,OAAO;IAW5D;;OAEG;cACgB,OAAO,IAAI,MAAM;IAQpC;;OAEG;cACsB,eAAe,CAAC,MAAM,EAAE,cAAc,EAAE,QAAQ,EAAE,OAAO,GAAG,OAAO,CAAC,OAAO,CAAC;CAkBtG"}
1
+ {"version":3,"file":"event-type.delete-request.d.ts","sourceRoot":"","sources":["../../../src/commands/event-type/event-type.delete-request.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,cAAc,EAAE,MAAM,yBAAyB,CAAA;AAIxD,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,iCAAiC,CAAA;AAGrE;;GAEG;AACH,MAAM,MAAM,2BAA2B,GAAG;IACxC,+BAA+B;IAC/B,WAAW,EAAE,MAAM,CAAA;IAEnB,4DAA4D;IAC5D,aAAa,CAAC,EAAE,OAAO,CAAA;CACxB,CAAA;AA+BD;;GAEG;AACH,qBAAa,6BAA8B,SAAQ,cAAc,CAAC,2BAA2B,EAAE,OAAO,CAAC;IACrG;;OAEG;IACH,UAAmB,YAAY,EAAE,CAAC,QAAQ,GAAG,QAAQ,CAAC,EAAE,CAAa;IAErE;;OAEG;gBACS,KAAK,EAAE,2BAA2B;IAO9C;;OAEG;cACgB,aAAa,CAAC,QAAQ,EAAE,OAAO,GAAG,OAAO;IAW5D;;OAEG;cACgB,OAAO,IAAI,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC;IAQrD;;OAEG;cACsB,eAAe,CAAC,MAAM,EAAE,cAAc,EAAE,QAAQ,EAAE,OAAO,GAAG,OAAO,CAAC,OAAO,CAAC;CAkBtG"}
@@ -65,7 +65,7 @@ class EventTypeDeleteRequestCommand extends command_js_1.GraphQlCommand {
65
65
  throw new command_error_js_1.CommandError(this.constructor.name, parsedResponse.errors[0].message);
66
66
  }
67
67
  if (!parsedResponse.data?.eventType?.requestDelete) {
68
- throw new not_found_js_1.NotFoundException("EventType", this.input.eventTypeId);
68
+ throw new not_found_js_1.NotFoundException("EventType", { id: this.input.eventTypeId });
69
69
  }
70
70
  return parsedResponse.data.eventType.requestDelete.deleting;
71
71
  }
@@ -74,15 +74,15 @@ class EventTypeDeleteRequestCommand extends command_js_1.GraphQlCommand {
74
74
  */
75
75
  getBody() {
76
76
  const { waitForDelete: _, ...rest } = this.input;
77
- return JSON.stringify({
77
+ return {
78
78
  query: graphQlQuery,
79
79
  variables: rest,
80
- });
80
+ };
81
81
  }
82
82
  /**
83
83
  * Wait for the response (timeout: 25 seconds)
84
84
  */
85
- async waitForResponse(client, response) {
85
+ async processResponse(client, response) {
86
86
  if (!this.input.waitForDelete) {
87
87
  return response;
88
88
  }
@@ -1,5 +1,6 @@
1
1
  import { Command } from "../../common/command.js";
2
2
  import { type EventType } from "../../contracts/event-type.js";
3
+ import type { ClientError } from "../../exceptions/client-error.js";
3
4
  interface EventTypeFetchByIdInput {
4
5
  /** The id of the event type */
5
6
  eventTypeId: string;
@@ -40,6 +41,10 @@ export declare class EventTypeFetchCommand extends Command<EventTypeFetchInput,
40
41
  * Parse the response
41
42
  */
42
43
  protected parseResponse(rawResponse: unknown): EventType;
44
+ /**
45
+ * Handle the client error
46
+ */
47
+ protected handleClientError(error: ClientError): void;
43
48
  }
44
49
  export {};
45
50
  //# sourceMappingURL=event-type.fetch.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"event-type.fetch.d.ts","sourceRoot":"","sources":["../../../src/commands/event-type/event-type.fetch.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,OAAO,EAAE,MAAM,yBAAyB,CAAA;AACjD,OAAO,EAAE,KAAK,SAAS,EAAmB,MAAM,+BAA+B,CAAA;AAI/E,UAAU,uBAAuB;IAC/B,+BAA+B;IAC/B,WAAW,EAAE,MAAM,CAAA;IACnB,8BAA8B;IAC9B,UAAU,CAAC,EAAE,KAAK,CAAA;IAClB,iCAAiC;IACjC,SAAS,CAAC,EAAE,KAAK,CAAA;CAClB;AAED,UAAU,yBAAyB;IACjC,8BAA8B;IAC9B,UAAU,EAAE,MAAM,CAAA;IAClB,iCAAiC;IACjC,SAAS,EAAE,MAAM,CAAA;IACjB,+BAA+B;IAC/B,WAAW,CAAC,EAAE,KAAK,CAAA;CACpB;AAED;;GAEG;AACH,MAAM,MAAM,mBAAmB,GAAG,uBAAuB,GAAG,yBAAyB,CAAA;AAErF;;GAEG;AACH,qBAAa,qBAAsB,SAAQ,OAAO,CAAC,mBAAmB,EAAE,SAAS,CAAC;IAChF;;OAEG;cACgB,SAAS,IAAI,MAAM;IAItC;;OAEG;cACgB,UAAU,IAAI,MAAM;IAIvC;;OAEG;cACgB,OAAO,IAAI,MAAM;IAUpC;;OAEG;cACgB,aAAa,CAAC,WAAW,EAAE,OAAO,GAAG,SAAS;CAWlE"}
1
+ {"version":3,"file":"event-type.fetch.d.ts","sourceRoot":"","sources":["../../../src/commands/event-type/event-type.fetch.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,OAAO,EAAE,MAAM,yBAAyB,CAAA;AACjD,OAAO,EAAE,KAAK,SAAS,EAAmB,MAAM,+BAA+B,CAAA;AAG/E,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,kCAAkC,CAAA;AAEnE,UAAU,uBAAuB;IAC/B,+BAA+B;IAC/B,WAAW,EAAE,MAAM,CAAA;IACnB,8BAA8B;IAC9B,UAAU,CAAC,EAAE,KAAK,CAAA;IAClB,iCAAiC;IACjC,SAAS,CAAC,EAAE,KAAK,CAAA;CAClB;AAED,UAAU,yBAAyB;IACjC,8BAA8B;IAC9B,UAAU,EAAE,MAAM,CAAA;IAClB,iCAAiC;IACjC,SAAS,EAAE,MAAM,CAAA;IACjB,+BAA+B;IAC/B,WAAW,CAAC,EAAE,KAAK,CAAA;CACpB;AAED;;GAEG;AACH,MAAM,MAAM,mBAAmB,GAAG,uBAAuB,GAAG,yBAAyB,CAAA;AAErF;;GAEG;AACH,qBAAa,qBAAsB,SAAQ,OAAO,CAAC,mBAAmB,EAAE,SAAS,CAAC;IAChF;;OAEG;cACgB,SAAS,IAAI,MAAM;IAItC;;OAEG;cACgB,UAAU,IAAI,MAAM;IAIvC;;OAEG;cACgB,OAAO,IAAI,MAAM;IAUpC;;OAEG;cACgB,aAAa,CAAC,WAAW,EAAE,OAAO,GAAG,SAAS;IAYjE;;OAEG;cACgB,iBAAiB,CAAC,KAAK,EAAE,WAAW,GAAG,IAAI;CAQ/D"}
@@ -44,9 +44,20 @@ class EventTypeFetchCommand extends command_js_1.Command {
44
44
  }
45
45
  const response = (0, parse_response_helper_js_1.parseResponseHelper)(typebox_1.Type.Array(event_type_js_1.EventTypeSchema), rawResponse);
46
46
  if (response.length === 0) {
47
- throw new not_found_js_1.NotFoundException("EventType", this.input.eventType);
47
+ throw new not_found_js_1.NotFoundException("EventType", { name: this.input.eventType });
48
48
  }
49
49
  return response[0];
50
50
  }
51
+ /**
52
+ * Handle the client error
53
+ */
54
+ handleClientError(error) {
55
+ if (error.status === 404) {
56
+ throw new not_found_js_1.NotFoundException("EventType", {
57
+ [this.input.eventTypeId ? "id" : "name"]: this.input.eventTypeId ?? this.input.eventType,
58
+ });
59
+ }
60
+ throw error;
61
+ }
51
62
  }
52
63
  exports.EventTypeFetchCommand = EventTypeFetchCommand;
@@ -7,7 +7,7 @@ export type EventTypeUpdateInput = {
7
7
  /** The id of the event type */
8
8
  eventTypeId: string;
9
9
  /** The description of the event type */
10
- description: string;
10
+ description?: string;
11
11
  };
12
12
  /**
13
13
  * Update an event type
@@ -28,7 +28,7 @@ export declare class EventTypeUpdateCommand extends Command<EventTypeUpdateInput
28
28
  /**
29
29
  * Get the body for the request
30
30
  */
31
- protected getBody(): string | undefined;
31
+ protected getBody(): Record<string, unknown>;
32
32
  /**
33
33
  * Parse the response
34
34
  */
@@ -1 +1 @@
1
- {"version":3,"file":"event-type.update.d.ts","sourceRoot":"","sources":["../../../src/commands/event-type/event-type.update.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,yBAAyB,CAAA;AACjD,OAAO,EAAE,KAAK,SAAS,EAAmB,MAAM,+BAA+B,CAAA;AAG/E;;GAEG;AACH,MAAM,MAAM,oBAAoB,GAAG;IACjC,+BAA+B;IAC/B,WAAW,EAAE,MAAM,CAAA;IACnB,wCAAwC;IACxC,WAAW,EAAE,MAAM,CAAA;CACpB,CAAA;AAED;;GAEG;AACH,qBAAa,sBAAuB,SAAQ,OAAO,CAAC,oBAAoB,EAAE,SAAS,CAAC;IAClF;;OAEG;cACgB,SAAS,IAAI,MAAM;IAGtC;;OAEG;cACgB,UAAU,IAAI,MAAM;IAIvC;;OAEG;cACgB,OAAO,IAAI,MAAM;IAIpC;;OAEG;cACgB,OAAO,IAAI,MAAM,GAAG,SAAS;IAKhD;;OAEG;cACgB,aAAa,CAAC,WAAW,EAAE,OAAO,GAAG,SAAS;CAGlE"}
1
+ {"version":3,"file":"event-type.update.d.ts","sourceRoot":"","sources":["../../../src/commands/event-type/event-type.update.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,yBAAyB,CAAA;AACjD,OAAO,EAAE,KAAK,SAAS,EAAmB,MAAM,+BAA+B,CAAA;AAG/E;;GAEG;AACH,MAAM,MAAM,oBAAoB,GAAG;IACjC,+BAA+B;IAC/B,WAAW,EAAE,MAAM,CAAA;IACnB,wCAAwC;IACxC,WAAW,CAAC,EAAE,MAAM,CAAA;CACrB,CAAA;AAED;;GAEG;AACH,qBAAa,sBAAuB,SAAQ,OAAO,CAAC,oBAAoB,EAAE,SAAS,CAAC;IAClF;;OAEG;cACgB,SAAS,IAAI,MAAM;IAGtC;;OAEG;cACgB,UAAU,IAAI,MAAM;IAIvC;;OAEG;cACgB,OAAO,IAAI,MAAM;IAIpC;;OAEG;cACgB,OAAO,IAAI,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC;IAKrD;;OAEG;cACgB,aAAa,CAAC,WAAW,EAAE,OAAO,GAAG,SAAS;CAGlE"}
@@ -30,8 +30,8 @@ class EventTypeUpdateCommand extends command_js_1.Command {
30
30
  * Get the body for the request
31
31
  */
32
32
  getBody() {
33
- const { eventTypeId: _eventTypeId, ...payload } = this.input;
34
- return JSON.stringify(payload);
33
+ const { eventTypeId: _, ...payload } = this.input;
34
+ return payload;
35
35
  }
36
36
  /**
37
37
  * Parse the response
@@ -48,6 +48,6 @@ export declare class EventsFetchTimeBucketsByNamesCommand extends Command<Events
48
48
  /**
49
49
  * Get the body for the request
50
50
  */
51
- protected getBody(): string;
51
+ protected getBody(): Record<string, unknown>;
52
52
  }
53
53
  //# sourceMappingURL=events.fetch-time-buckets-by-names.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"events.fetch-time-buckets-by-names.d.ts","sourceRoot":"","sources":["../../../src/commands/events/events.fetch-time-buckets-by-names.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,OAAO,EAAE,MAAM,yBAAyB,CAAA;AAEjD;;GAEG;AACH,MAAM,WAAW,kCAAkC;IACjD,sBAAsB;IACtB,MAAM,EAAE,MAAM,CAAA;IACd,uBAAuB;IACvB,UAAU,EAAE,MAAM,CAAA;IAClB,yBAAyB;IACzB,QAAQ,EAAE,MAAM,CAAA;IAChB,2BAA2B;IAC3B,UAAU,EAAE,MAAM,EAAE,CAAA;IACpB,wBAAwB;IACxB,MAAM,CAAC,EAAE,MAAM,CAAA;IACf,wCAAwC;IACxC,QAAQ,CAAC,EAAE,MAAM,CAAA;IACjB,kCAAkC;IAClC,cAAc,CAAC,EAAE,MAAM,CAAA;IACvB,8BAA8B;IAC9B,YAAY,CAAC,EAAE,MAAM,CAAA;CACtB;AAED;;GAEG;AACH,MAAM,WAAW,mCAAmC;IAClD,uBAAuB;IACvB,WAAW,EAAE,MAAM,EAAE,CAAA;IACrB,2BAA2B;IAC3B,UAAU,CAAC,EAAE,MAAM,CAAA;CACpB;AAUD;;GAEG;AACH,qBAAa,oCAAqC,SAAQ,OAAO,CAC/D,kCAAkC,EAClC,mCAAmC,CACpC;IACC;;OAEG;cACgB,UAAU,IAAI,MAAM;IAGvC;;OAEG;cACgB,OAAO,IAAI,MAAM;IAGpC;;OAEG;cACgB,aAAa,CAAC,WAAW,EAAE,OAAO,GAAG,mCAAmC;IAK3F;;OAEG;cACgB,OAAO,IAAI,MAAM;CAGrC"}
1
+ {"version":3,"file":"events.fetch-time-buckets-by-names.d.ts","sourceRoot":"","sources":["../../../src/commands/events/events.fetch-time-buckets-by-names.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,OAAO,EAAE,MAAM,yBAAyB,CAAA;AAEjD;;GAEG;AACH,MAAM,WAAW,kCAAkC;IACjD,sBAAsB;IACtB,MAAM,EAAE,MAAM,CAAA;IACd,uBAAuB;IACvB,UAAU,EAAE,MAAM,CAAA;IAClB,yBAAyB;IACzB,QAAQ,EAAE,MAAM,CAAA;IAChB,2BAA2B;IAC3B,UAAU,EAAE,MAAM,EAAE,CAAA;IACpB,wBAAwB;IACxB,MAAM,CAAC,EAAE,MAAM,CAAA;IACf,wCAAwC;IACxC,QAAQ,CAAC,EAAE,MAAM,CAAA;IACjB,kCAAkC;IAClC,cAAc,CAAC,EAAE,MAAM,CAAA;IACvB,8BAA8B;IAC9B,YAAY,CAAC,EAAE,MAAM,CAAA;CACtB;AAED;;GAEG;AACH,MAAM,WAAW,mCAAmC;IAClD,uBAAuB;IACvB,WAAW,EAAE,MAAM,EAAE,CAAA;IACrB,2BAA2B;IAC3B,UAAU,CAAC,EAAE,MAAM,CAAA;CACpB;AAUD;;GAEG;AACH,qBAAa,oCAAqC,SAAQ,OAAO,CAC/D,kCAAkC,EAClC,mCAAmC,CACpC;IACC;;OAEG;cACgB,UAAU,IAAI,MAAM;IAGvC;;OAEG;cACgB,OAAO,IAAI,MAAM;IAGpC;;OAEG;cACgB,aAAa,CAAC,WAAW,EAAE,OAAO,GAAG,mCAAmC;IAK3F;;OAEG;cACgB,OAAO,IAAI,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC;CAItD"}
@@ -38,7 +38,8 @@ class EventsFetchTimeBucketsByNamesCommand extends command_js_1.Command {
38
38
  * Get the body for the request
39
39
  */
40
40
  getBody() {
41
- return JSON.stringify(this.input);
41
+ const { ...rest } = this.input;
42
+ return rest;
42
43
  }
43
44
  }
44
45
  exports.EventsFetchTimeBucketsByNamesCommand = EventsFetchTimeBucketsByNamesCommand;
@@ -53,6 +53,6 @@ export declare class EventsFetchCommand extends Command<EventsFetchEventsInput,
53
53
  /**
54
54
  * Get the body for the request
55
55
  */
56
- protected getBody(): string;
56
+ protected getBody(): Record<string, unknown>;
57
57
  }
58
58
  //# sourceMappingURL=events.fetch.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"events.fetch.d.ts","sourceRoot":"","sources":["../../../src/commands/events/events.fetch.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,OAAO,EAAE,MAAM,yBAAyB,CAAA;AAEjD,OAAO,EAAE,KAAK,aAAa,EAAuB,MAAM,0BAA0B,CAAA;AAElF;;GAEG;AACH,MAAM,WAAW,sBAAsB;IACrC,iBAAiB;IACjB,MAAM,EAAE,MAAM,CAAA;IACd,uBAAuB;IACvB,UAAU,EAAE,MAAM,CAAA;IAClB,yBAAyB;IACzB,QAAQ,EAAE,MAAM,CAAA;IAChB,2BAA2B;IAC3B,UAAU,EAAE,MAAM,EAAE,CAAA;IACpB,sBAAsB;IACtB,UAAU,EAAE,MAAM,CAAA;IAClB,wBAAwB;IACxB,MAAM,CAAC,EAAE,MAAM,CAAA;IACf,wCAAwC;IACxC,QAAQ,CAAC,EAAE,MAAM,CAAA;IACjB,+BAA+B;IAC/B,WAAW,CAAC,EAAE,MAAM,CAAA;IACpB,0BAA0B;IAC1B,YAAY,CAAC,EAAE,MAAM,CAAA;IACrB,2BAA2B;IAC3B,SAAS,CAAC,EAAE,MAAM,CAAA;CACnB;AAED;;GAEG;AACH,MAAM,WAAW,uBAAuB;IACtC,iBAAiB;IACjB,MAAM,EAAE,aAAa,EAAE,CAAA;IACvB,2BAA2B;IAC3B,UAAU,CAAC,EAAE,MAAM,CAAA;CACpB;AAUD;;GAEG;AACH,qBAAa,kBAAmB,SAAQ,OAAO,CAAC,sBAAsB,EAAE,uBAAuB,CAAC;IAC9F;;OAEG;cACgB,UAAU,IAAI,MAAM;IAGvC;;OAEG;cACgB,OAAO,IAAI,MAAM;IAUpC;;OAEG;cACgB,aAAa,CAAC,WAAW,EAAE,OAAO,GAAG,uBAAuB;IAK/E;;OAEG;cACgB,OAAO,IAAI,MAAM;CASrC"}
1
+ {"version":3,"file":"events.fetch.d.ts","sourceRoot":"","sources":["../../../src/commands/events/events.fetch.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,OAAO,EAAE,MAAM,yBAAyB,CAAA;AAEjD,OAAO,EAAE,KAAK,aAAa,EAAuB,MAAM,0BAA0B,CAAA;AAElF;;GAEG;AACH,MAAM,WAAW,sBAAsB;IACrC,iBAAiB;IACjB,MAAM,EAAE,MAAM,CAAA;IACd,uBAAuB;IACvB,UAAU,EAAE,MAAM,CAAA;IAClB,yBAAyB;IACzB,QAAQ,EAAE,MAAM,CAAA;IAChB,2BAA2B;IAC3B,UAAU,EAAE,MAAM,EAAE,CAAA;IACpB,sBAAsB;IACtB,UAAU,EAAE,MAAM,CAAA;IAClB,wBAAwB;IACxB,MAAM,CAAC,EAAE,MAAM,CAAA;IACf,wCAAwC;IACxC,QAAQ,CAAC,EAAE,MAAM,CAAA;IACjB,+BAA+B;IAC/B,WAAW,CAAC,EAAE,MAAM,CAAA;IACpB,0BAA0B;IAC1B,YAAY,CAAC,EAAE,MAAM,CAAA;IACrB,2BAA2B;IAC3B,SAAS,CAAC,EAAE,MAAM,CAAA;CACnB;AAED;;GAEG;AACH,MAAM,WAAW,uBAAuB;IACtC,iBAAiB;IACjB,MAAM,EAAE,aAAa,EAAE,CAAA;IACvB,2BAA2B;IAC3B,UAAU,CAAC,EAAE,MAAM,CAAA;CACpB;AAUD;;GAEG;AACH,qBAAa,kBAAmB,SAAQ,OAAO,CAAC,sBAAsB,EAAE,uBAAuB,CAAC;IAC9F;;OAEG;cACgB,UAAU,IAAI,MAAM;IAGvC;;OAEG;cACgB,OAAO,IAAI,MAAM;IAUpC;;OAEG;cACgB,aAAa,CAAC,WAAW,EAAE,OAAO,GAAG,uBAAuB;IAK/E;;OAEG;cACgB,OAAO,IAAI,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC;CAStD"}
@@ -46,13 +46,13 @@ class EventsFetchCommand extends command_js_1.Command {
46
46
  * Get the body for the request
47
47
  */
48
48
  getBody() {
49
- return JSON.stringify({
49
+ return {
50
50
  tenant: this.input.tenant,
51
51
  dataCoreId: this.input.dataCoreId,
52
52
  flowType: this.input.flowType,
53
53
  eventTypes: this.input.eventTypes,
54
54
  timeBucket: this.input.timeBucket,
55
- });
55
+ };
56
56
  }
57
57
  }
58
58
  exports.EventsFetchCommand = EventsFetchCommand;
@@ -1,5 +1,6 @@
1
1
  import { GraphQlCommand } from "../../common/command.js";
2
2
  import type { FlowcoreClient } from "../../common/flowcore-client.js";
3
+ import type { ClientError } from "../../exceptions/client-error.js";
3
4
  /**
4
5
  * The input for the flow type delete request command
5
6
  */
@@ -32,16 +33,17 @@ export declare class FlowTypeDeleteRequestCommand extends GraphQlCommand<FlowTyp
32
33
  baseUrl: string;
33
34
  path: string;
34
35
  method: string;
35
- parseResponse: (response: unknown, flowcoreClient: FlowcoreClient) => boolean | Promise<boolean>;
36
- waitForResponse: (client: FlowcoreClient, response: boolean) => Promise<boolean>;
36
+ parseResponse: (response: unknown) => boolean | Promise<boolean>;
37
+ processResponse: (client: FlowcoreClient, response: boolean) => Promise<boolean>;
38
+ handleClientError: (error: ClientError) => void;
37
39
  }>;
38
40
  /**
39
41
  * Get the body for the request
40
42
  */
41
- protected getBody(): string;
43
+ protected getBody(): Record<string, unknown>;
42
44
  /**
43
45
  * Wait for the response (timeout: 25 seconds)
44
46
  */
45
- protected waitForResponse(client: FlowcoreClient, response: boolean): Promise<boolean>;
47
+ protected processResponse(client: FlowcoreClient, response: boolean): Promise<boolean>;
46
48
  }
47
49
  //# sourceMappingURL=flow-type.delete-request.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"flow-type.delete-request.d.ts","sourceRoot":"","sources":["../../../src/commands/flow-type/flow-type.delete-request.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,cAAc,EAAE,MAAM,yBAAyB,CAAA;AACxD,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,iCAAiC,CAAA;AAOrE;;GAEG;AACH,MAAM,MAAM,0BAA0B,GAAG;IACvC,8BAA8B;IAC9B,UAAU,EAAE,MAAM,CAAA;IAClB,sDAAsD;IACtD,aAAa,CAAC,EAAE,OAAO,CAAA;CACxB,CAAA;AAmCD;;GAEG;AACH,qBAAa,4BAA6B,SAAQ,cAAc,CAAC,0BAA0B,EAAE,OAAO,CAAC;IACnG;;OAEG;IACH,UAAmB,YAAY,EAAE,CAAC,QAAQ,GAAG,QAAQ,CAAC,EAAE,CAAa;IAErE;;OAEG;gBACS,KAAK,EAAE,0BAA0B;IAO7C;;OAEG;cACgB,aAAa,CAAC,QAAQ,EAAE,OAAO,GAAG,OAAO;IAWtC,UAAU,CAAC,MAAM,EAAE,cAAc,GAAG,OAAO,CAC/D;QACE,YAAY,EAAE,CAAC,QAAQ,GAAG,QAAQ,CAAC,EAAE,CAAA;QACrC,IAAI,EAAE,MAAM,GAAG,SAAS,CAAA;QACxB,OAAO,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAA;QAC/B,OAAO,EAAE,MAAM,CAAA;QACf,IAAI,EAAE,MAAM,CAAA;QACZ,MAAM,EAAE,MAAM,CAAA;QACd,aAAa,EAAE,CAAC,QAAQ,EAAE,OAAO,EAAE,cAAc,EAAE,cAAc,KAAK,OAAO,GAAG,OAAO,CAAC,OAAO,CAAC,CAAA;QAChG,eAAe,EAAE,CAAC,MAAM,EAAE,cAAc,EAAE,QAAQ,EAAE,OAAO,KAAK,OAAO,CAAC,OAAO,CAAC,CAAA;KACjF,CACF;IAqBD;;OAEG;cACgB,OAAO,IAAI,MAAM;IAOpC;;OAEG;cACsB,eAAe,CAAC,MAAM,EAAE,cAAc,EAAE,QAAQ,EAAE,OAAO,GAAG,OAAO,CAAC,OAAO,CAAC;CAkBtG"}
1
+ {"version":3,"file":"flow-type.delete-request.d.ts","sourceRoot":"","sources":["../../../src/commands/flow-type/flow-type.delete-request.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,cAAc,EAAE,MAAM,yBAAyB,CAAA;AACxD,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,iCAAiC,CAAA;AAMrE,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,kCAAkC,CAAA;AAEnE;;GAEG;AACH,MAAM,MAAM,0BAA0B,GAAG;IACvC,8BAA8B;IAC9B,UAAU,EAAE,MAAM,CAAA;IAClB,sDAAsD;IACtD,aAAa,CAAC,EAAE,OAAO,CAAA;CACxB,CAAA;AAmCD;;GAEG;AACH,qBAAa,4BAA6B,SAAQ,cAAc,CAAC,0BAA0B,EAAE,OAAO,CAAC;IACnG;;OAEG;IACH,UAAmB,YAAY,EAAE,CAAC,QAAQ,GAAG,QAAQ,CAAC,EAAE,CAAa;IAErE;;OAEG;gBACS,KAAK,EAAE,0BAA0B;IAO7C;;OAEG;cACgB,aAAa,CAAC,QAAQ,EAAE,OAAO,GAAG,OAAO;IAWtC,UAAU,CAAC,MAAM,EAAE,cAAc,GAAG,OAAO,CAC/D;QACE,YAAY,EAAE,CAAC,QAAQ,GAAG,QAAQ,CAAC,EAAE,CAAA;QACrC,IAAI,EAAE,MAAM,GAAG,SAAS,CAAA;QACxB,OAAO,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAA;QAC/B,OAAO,EAAE,MAAM,CAAA;QACf,IAAI,EAAE,MAAM,CAAA;QACZ,MAAM,EAAE,MAAM,CAAA;QACd,aAAa,EAAE,CAAC,QAAQ,EAAE,OAAO,KAAK,OAAO,GAAG,OAAO,CAAC,OAAO,CAAC,CAAA;QAChE,eAAe,EAAE,CAAC,MAAM,EAAE,cAAc,EAAE,QAAQ,EAAE,OAAO,KAAK,OAAO,CAAC,OAAO,CAAC,CAAA;QAChF,iBAAiB,EAAE,CAAC,KAAK,EAAE,WAAW,KAAK,IAAI,CAAA;KAChD,CACF;IAqBD;;OAEG;cACgB,OAAO,IAAI,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC;IAOrD;;OAEG;cACsB,eAAe,CAAC,MAAM,EAAE,cAAc,EAAE,QAAQ,EAAE,OAAO,GAAG,OAAO,CAAC,OAAO,CAAC;CAkBtG"}
@@ -70,7 +70,7 @@ class FlowTypeDeleteRequestCommand extends command_js_1.GraphQlCommand {
70
70
  throw new command_error_js_1.CommandError(this.constructor.name, parsedResponse.errors[0].message);
71
71
  }
72
72
  if (!parsedResponse.data?.datacore?.flowtype?.requestDelete) {
73
- throw new not_found_js_1.NotFoundException("FlowType", this.input.flowTypeId);
73
+ throw new not_found_js_1.NotFoundException("FlowType", { id: this.input.flowTypeId });
74
74
  }
75
75
  return parsedResponse.data.datacore.flowtype.requestDelete.deleting;
76
76
  }
@@ -94,15 +94,15 @@ class FlowTypeDeleteRequestCommand extends command_js_1.GraphQlCommand {
94
94
  * Get the body for the request
95
95
  */
96
96
  getBody() {
97
- return JSON.stringify({
97
+ return {
98
98
  query: graphQlQuery,
99
99
  variables: this.input,
100
- });
100
+ };
101
101
  }
102
102
  /**
103
103
  * Wait for the response (timeout: 25 seconds)
104
104
  */
105
- async waitForResponse(client, response) {
105
+ async processResponse(client, response) {
106
106
  if (!this.input.waitForDelete) {
107
107
  return response;
108
108
  }
@@ -1,5 +1,6 @@
1
1
  import { Command } from "../../common/command.js";
2
2
  import { type FlowType } from "../../contracts/flow-type.js";
3
+ import type { ClientError } from "../../exceptions/client-error.js";
3
4
  /**
4
5
  * The input for the flow type fetch by name command
5
6
  */
@@ -46,6 +47,10 @@ export declare class FlowTypeFetchCommand extends Command<FlowTypeFetchInput, Fl
46
47
  * Parse the response
47
48
  */
48
49
  protected parseResponse(rawResponse: unknown): FlowType;
50
+ /**
51
+ * Handle the client error
52
+ */
53
+ protected handleClientError(error: ClientError): void;
49
54
  }
50
55
  export {};
51
56
  //# sourceMappingURL=flow-type.fetch.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"flow-type.fetch.d.ts","sourceRoot":"","sources":["../../../src/commands/flow-type/flow-type.fetch.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,OAAO,EAAE,MAAM,yBAAyB,CAAA;AACjD,OAAO,EAAE,KAAK,QAAQ,EAAkB,MAAM,8BAA8B,CAAA;AAI5E;;GAEG;AACH,KAAK,wBAAwB,GAAG;IAC9B,8BAA8B;IAC9B,UAAU,EAAE,MAAM,CAAA;IAClB,gCAAgC;IAChC,QAAQ,EAAE,MAAM,CAAA;IAChB,8BAA8B;IAC9B,UAAU,CAAC,EAAE,KAAK,CAAA;CACnB,CAAA;AAED;;GAEG;AACH,KAAK,sBAAsB,GAAG;IAC5B,8BAA8B;IAC9B,UAAU,EAAE,MAAM,CAAA;IAClB,8BAA8B;IAC9B,UAAU,CAAC,EAAE,KAAK,CAAA;IAClB,gCAAgC;IAChC,QAAQ,CAAC,EAAE,KAAK,CAAA;CACjB,CAAA;AAED;;GAEG;AACH,MAAM,MAAM,kBAAkB,GAAG,sBAAsB,GAAG,wBAAwB,CAAA;AAElF;;GAEG;AACH,qBAAa,oBAAqB,SAAQ,OAAO,CAAC,kBAAkB,EAAE,QAAQ,CAAC;IAC7E;;OAEG;cACgB,SAAS,IAAI,MAAM;IAItC;;OAEG;cACgB,UAAU,IAAI,MAAM;IAIvC;;OAEG;cACgB,OAAO,IAAI,MAAM;IAUpC;;OAEG;cACgB,aAAa,CAAC,WAAW,EAAE,OAAO,GAAG,QAAQ;CAWjE"}
1
+ {"version":3,"file":"flow-type.fetch.d.ts","sourceRoot":"","sources":["../../../src/commands/flow-type/flow-type.fetch.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,OAAO,EAAE,MAAM,yBAAyB,CAAA;AACjD,OAAO,EAAE,KAAK,QAAQ,EAAkB,MAAM,8BAA8B,CAAA;AAG5E,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,kCAAkC,CAAA;AAEnE;;GAEG;AACH,KAAK,wBAAwB,GAAG;IAC9B,8BAA8B;IAC9B,UAAU,EAAE,MAAM,CAAA;IAClB,gCAAgC;IAChC,QAAQ,EAAE,MAAM,CAAA;IAChB,8BAA8B;IAC9B,UAAU,CAAC,EAAE,KAAK,CAAA;CACnB,CAAA;AAED;;GAEG;AACH,KAAK,sBAAsB,GAAG;IAC5B,8BAA8B;IAC9B,UAAU,EAAE,MAAM,CAAA;IAClB,8BAA8B;IAC9B,UAAU,CAAC,EAAE,KAAK,CAAA;IAClB,gCAAgC;IAChC,QAAQ,CAAC,EAAE,KAAK,CAAA;CACjB,CAAA;AAED;;GAEG;AACH,MAAM,MAAM,kBAAkB,GAAG,sBAAsB,GAAG,wBAAwB,CAAA;AAElF;;GAEG;AACH,qBAAa,oBAAqB,SAAQ,OAAO,CAAC,kBAAkB,EAAE,QAAQ,CAAC;IAC7E;;OAEG;cACgB,SAAS,IAAI,MAAM;IAItC;;OAEG;cACgB,UAAU,IAAI,MAAM;IAIvC;;OAEG;cACgB,OAAO,IAAI,MAAM;IAUpC;;OAEG;cACgB,aAAa,CAAC,WAAW,EAAE,OAAO,GAAG,QAAQ;IAYhE;;OAEG;cACgB,iBAAiB,CAAC,KAAK,EAAE,WAAW,GAAG,IAAI;CAQ/D"}
@@ -44,9 +44,20 @@ class FlowTypeFetchCommand extends command_js_1.Command {
44
44
  }
45
45
  const response = (0, parse_response_helper_js_1.parseResponseHelper)(typebox_1.Type.Array(flow_type_js_1.FlowTypeSchema), rawResponse);
46
46
  if (response.length === 0) {
47
- throw new not_found_js_1.NotFoundException("FlowType", this.input.flowType);
47
+ throw new not_found_js_1.NotFoundException("FlowType", { name: this.input.flowType });
48
48
  }
49
49
  return response[0];
50
50
  }
51
+ /**
52
+ * Handle the client error
53
+ */
54
+ handleClientError(error) {
55
+ if (error.status === 404) {
56
+ throw new not_found_js_1.NotFoundException("FlowType", {
57
+ [this.input.flowTypeId ? "id" : "name"]: this.input.flowTypeId ?? this.input.flowType,
58
+ });
59
+ }
60
+ throw error;
61
+ }
51
62
  }
52
63
  exports.FlowTypeFetchCommand = FlowTypeFetchCommand;
@@ -7,7 +7,7 @@ export type FlowTypeUpdateInput = {
7
7
  /** The id of the data core */
8
8
  flowTypeId: string;
9
9
  /** The description of the flow type */
10
- description: string;
10
+ description?: string;
11
11
  };
12
12
  /**
13
13
  * Update a flow type
@@ -28,7 +28,7 @@ export declare class FlowTypeUpdateCommand extends Command<FlowTypeUpdateInput,
28
28
  /**
29
29
  * Get the body for the request
30
30
  */
31
- protected getBody(): string | undefined;
31
+ protected getBody(): Record<string, unknown>;
32
32
  /**
33
33
  * Parse the response
34
34
  */
@@ -1 +1 @@
1
- {"version":3,"file":"flow-type.update.d.ts","sourceRoot":"","sources":["../../../src/commands/flow-type/flow-type.update.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,yBAAyB,CAAA;AACjD,OAAO,EAAE,KAAK,QAAQ,EAAkB,MAAM,8BAA8B,CAAA;AAG5E;;GAEG;AACH,MAAM,MAAM,mBAAmB,GAAG;IAChC,8BAA8B;IAC9B,UAAU,EAAE,MAAM,CAAA;IAClB,uCAAuC;IACvC,WAAW,EAAE,MAAM,CAAA;CACpB,CAAA;AAED;;GAEG;AACH,qBAAa,qBAAsB,SAAQ,OAAO,CAAC,mBAAmB,EAAE,QAAQ,CAAC;IAC/E;;OAEG;cACgB,SAAS,IAAI,MAAM;IAGtC;;OAEG;cACgB,UAAU,IAAI,MAAM;IAIvC;;OAEG;cACgB,OAAO,IAAI,MAAM;IAIpC;;OAEG;cACgB,OAAO,IAAI,MAAM,GAAG,SAAS;IAKhD;;OAEG;cACgB,aAAa,CAAC,WAAW,EAAE,OAAO,GAAG,QAAQ;CAGjE"}
1
+ {"version":3,"file":"flow-type.update.d.ts","sourceRoot":"","sources":["../../../src/commands/flow-type/flow-type.update.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,yBAAyB,CAAA;AACjD,OAAO,EAAE,KAAK,QAAQ,EAAkB,MAAM,8BAA8B,CAAA;AAG5E;;GAEG;AACH,MAAM,MAAM,mBAAmB,GAAG;IAChC,8BAA8B;IAC9B,UAAU,EAAE,MAAM,CAAA;IAClB,uCAAuC;IACvC,WAAW,CAAC,EAAE,MAAM,CAAA;CACrB,CAAA;AAED;;GAEG;AACH,qBAAa,qBAAsB,SAAQ,OAAO,CAAC,mBAAmB,EAAE,QAAQ,CAAC;IAC/E;;OAEG;cACgB,SAAS,IAAI,MAAM;IAGtC;;OAEG;cACgB,UAAU,IAAI,MAAM;IAIvC;;OAEG;cACgB,OAAO,IAAI,MAAM;IAIpC;;OAEG;cACgB,OAAO,IAAI,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC;IAKrD;;OAEG;cACgB,aAAa,CAAC,WAAW,EAAE,OAAO,GAAG,QAAQ;CAGjE"}
@@ -31,7 +31,7 @@ class FlowTypeUpdateCommand extends command_js_1.Command {
31
31
  */
32
32
  getBody() {
33
33
  const { flowTypeId: _flowTypeId, ...payload } = this.input;
34
- return JSON.stringify(payload);
34
+ return payload;
35
35
  }
36
36
  /**
37
37
  * Parse the response