@flowcore/sdk 1.48.0 → 1.50.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 (157) hide show
  1. package/CHANGELOG.md +35 -0
  2. package/README.md +47 -0
  3. package/esm/_dnt.shims.d.ts +1 -1
  4. package/esm/commands/adapter/reset-adapter.d.ts +52 -0
  5. package/esm/commands/adapter/reset-adapter.d.ts.map +1 -0
  6. package/esm/commands/adapter/reset-adapter.js +38 -0
  7. package/esm/commands/ai-agent-coordinator/conversation-stream.command.js +1 -6
  8. package/esm/commands/api-key/api-key.create.js +8 -21
  9. package/esm/commands/api-key/api-key.delete.js +4 -12
  10. package/esm/commands/api-key/api-key.list.js +4 -12
  11. package/esm/commands/data-core/data-core.create.js +4 -12
  12. package/esm/commands/data-core/data-core.request-delete.js +4 -12
  13. package/esm/commands/event-type/event-type.create.js +4 -12
  14. package/esm/commands/event-type/event-type.request-delete.js +4 -12
  15. package/esm/commands/event-type/event-type.request-truncate.js +4 -12
  16. package/esm/commands/events/event.list.js +4 -12
  17. package/esm/commands/events/events.fetch-time-buckets-by-names.js +4 -12
  18. package/esm/commands/events/events.fetch.js +4 -12
  19. package/esm/commands/events/time-bucket.list.js +4 -12
  20. package/esm/commands/flow-type/flow-type.create.js +4 -12
  21. package/esm/commands/flow-type/flow-type.request-delete.js +4 -12
  22. package/esm/commands/index.d.ts +1 -7
  23. package/esm/commands/index.d.ts.map +1 -1
  24. package/esm/commands/index.js +2 -8
  25. package/esm/commands/ingestion/ingest.batch.js +5 -18
  26. package/esm/commands/ingestion/ingest.event.js +5 -18
  27. package/esm/commands/scenario/scenario.create.js +4 -12
  28. package/esm/commands/scenario/scenario.delete.js +4 -12
  29. package/esm/commands/scenario/scenario.fetch.d.ts +22 -4
  30. package/esm/commands/scenario/scenario.fetch.d.ts.map +1 -1
  31. package/esm/commands/scenario/scenario.fetch.js +29 -13
  32. package/esm/commands/scenario/scenario.list.js +4 -12
  33. package/esm/commands/scenario/scenario.update.d.ts +4 -2
  34. package/esm/commands/scenario/scenario.update.d.ts.map +1 -1
  35. package/esm/commands/scenario/scenario.update.js +13 -12
  36. package/esm/commands/secret/secret.create.js +4 -12
  37. package/esm/commands/secret/secret.delete.js +4 -12
  38. package/esm/commands/secret/secret.list.js +4 -12
  39. package/esm/commands/security/pat.create.js +4 -12
  40. package/esm/commands/security/pat.delete.js +4 -12
  41. package/esm/commands/security/pat.exchange.js +4 -12
  42. package/esm/commands/security/pat.get.js +4 -12
  43. package/esm/commands/security/pat.list.js +4 -12
  44. package/esm/commands/tenant/tenant.list.js +4 -12
  45. package/esm/commands/variable/variable.create.js +4 -12
  46. package/esm/commands/variable/variable.delete.js +4 -12
  47. package/esm/commands/variable/variable.list.js +4 -12
  48. package/esm/common/command-graphql.js +4 -12
  49. package/esm/common/command.js +20 -45
  50. package/esm/common/flowcore-client.js +4 -18
  51. package/esm/common/notification-client.js +15 -72
  52. package/esm/common/websocket-client.js +16 -80
  53. package/esm/exceptions/client-error.js +6 -18
  54. package/esm/exceptions/invalid-response.js +2 -6
  55. package/esm/utils/local-cache.js +5 -19
  56. package/package.json +1 -1
  57. package/script/_dnt.shims.d.ts +1 -1
  58. package/script/commands/adapter/reset-adapter.d.ts +52 -0
  59. package/script/commands/adapter/reset-adapter.d.ts.map +1 -0
  60. package/script/commands/adapter/reset-adapter.js +42 -0
  61. package/script/commands/ai-agent-coordinator/conversation-stream.command.js +1 -6
  62. package/script/commands/api-key/api-key.create.js +8 -21
  63. package/script/commands/api-key/api-key.delete.js +4 -12
  64. package/script/commands/api-key/api-key.list.js +4 -12
  65. package/script/commands/data-core/data-core.create.js +4 -12
  66. package/script/commands/data-core/data-core.request-delete.js +4 -12
  67. package/script/commands/event-type/event-type.create.js +4 -12
  68. package/script/commands/event-type/event-type.request-delete.js +4 -12
  69. package/script/commands/event-type/event-type.request-truncate.js +4 -12
  70. package/script/commands/events/event.list.js +4 -12
  71. package/script/commands/events/events.fetch-time-buckets-by-names.js +4 -12
  72. package/script/commands/events/events.fetch.js +4 -12
  73. package/script/commands/events/time-bucket.list.js +4 -12
  74. package/script/commands/flow-type/flow-type.create.js +4 -12
  75. package/script/commands/flow-type/flow-type.request-delete.js +4 -12
  76. package/script/commands/index.d.ts +1 -7
  77. package/script/commands/index.d.ts.map +1 -1
  78. package/script/commands/index.js +2 -8
  79. package/script/commands/ingestion/ingest.batch.js +5 -18
  80. package/script/commands/ingestion/ingest.event.js +5 -18
  81. package/script/commands/scenario/scenario.create.js +4 -12
  82. package/script/commands/scenario/scenario.delete.js +4 -12
  83. package/script/commands/scenario/scenario.fetch.d.ts +22 -4
  84. package/script/commands/scenario/scenario.fetch.d.ts.map +1 -1
  85. package/script/commands/scenario/scenario.fetch.js +29 -13
  86. package/script/commands/scenario/scenario.list.js +4 -12
  87. package/script/commands/scenario/scenario.update.d.ts +4 -2
  88. package/script/commands/scenario/scenario.update.d.ts.map +1 -1
  89. package/script/commands/scenario/scenario.update.js +13 -12
  90. package/script/commands/secret/secret.create.js +4 -12
  91. package/script/commands/secret/secret.delete.js +4 -12
  92. package/script/commands/secret/secret.list.js +4 -12
  93. package/script/commands/security/pat.create.js +4 -12
  94. package/script/commands/security/pat.delete.js +4 -12
  95. package/script/commands/security/pat.exchange.js +4 -12
  96. package/script/commands/security/pat.get.js +4 -12
  97. package/script/commands/security/pat.list.js +4 -12
  98. package/script/commands/tenant/tenant.list.js +4 -12
  99. package/script/commands/variable/variable.create.js +4 -12
  100. package/script/commands/variable/variable.delete.js +4 -12
  101. package/script/commands/variable/variable.list.js +4 -12
  102. package/script/common/command-graphql.js +4 -12
  103. package/script/common/command.js +20 -45
  104. package/script/common/flowcore-client.js +4 -18
  105. package/script/common/notification-client.js +15 -72
  106. package/script/common/websocket-client.js +16 -80
  107. package/script/exceptions/client-error.js +6 -18
  108. package/script/exceptions/invalid-response.js +2 -6
  109. package/script/utils/local-cache.js +5 -19
  110. package/esm/commands/iam/api-key-role-association.create.d.ts +0 -45
  111. package/esm/commands/iam/api-key-role-association.create.d.ts.map +0 -1
  112. package/esm/commands/iam/api-key-role-association.create.js +0 -44
  113. package/esm/commands/iam/api-key-role-association.delete.d.ts +0 -45
  114. package/esm/commands/iam/api-key-role-association.delete.d.ts.map +0 -1
  115. package/esm/commands/iam/api-key-role-association.delete.js +0 -44
  116. package/esm/commands/iam/api-key-role-association.list.d.ts +0 -31
  117. package/esm/commands/iam/api-key-role-association.list.d.ts.map +0 -1
  118. package/esm/commands/iam/api-key-role-association.list.js +0 -37
  119. package/esm/commands/iam/role.list.d.ts +0 -33
  120. package/esm/commands/iam/role.list.d.ts.map +0 -1
  121. package/esm/commands/iam/role.list.js +0 -41
  122. package/esm/commands/iam/user-role-association.create.d.ts +0 -42
  123. package/esm/commands/iam/user-role-association.create.d.ts.map +0 -1
  124. package/esm/commands/iam/user-role-association.create.js +0 -40
  125. package/esm/commands/iam/user-role-association.delete.d.ts +0 -42
  126. package/esm/commands/iam/user-role-association.delete.d.ts.map +0 -1
  127. package/esm/commands/iam/user-role-association.delete.js +0 -40
  128. package/esm/commands/iam/user-role-association.list.d.ts +0 -33
  129. package/esm/commands/iam/user-role-association.list.d.ts.map +0 -1
  130. package/esm/commands/iam/user-role-association.list.js +0 -39
  131. package/esm/contracts/iam.d.ts +0 -13
  132. package/esm/contracts/iam.d.ts.map +0 -1
  133. package/esm/contracts/iam.js +0 -9
  134. package/script/commands/iam/api-key-role-association.create.d.ts +0 -45
  135. package/script/commands/iam/api-key-role-association.create.d.ts.map +0 -1
  136. package/script/commands/iam/api-key-role-association.create.js +0 -48
  137. package/script/commands/iam/api-key-role-association.delete.d.ts +0 -45
  138. package/script/commands/iam/api-key-role-association.delete.d.ts.map +0 -1
  139. package/script/commands/iam/api-key-role-association.delete.js +0 -48
  140. package/script/commands/iam/api-key-role-association.list.d.ts +0 -31
  141. package/script/commands/iam/api-key-role-association.list.d.ts.map +0 -1
  142. package/script/commands/iam/api-key-role-association.list.js +0 -41
  143. package/script/commands/iam/role.list.d.ts +0 -33
  144. package/script/commands/iam/role.list.d.ts.map +0 -1
  145. package/script/commands/iam/role.list.js +0 -45
  146. package/script/commands/iam/user-role-association.create.d.ts +0 -42
  147. package/script/commands/iam/user-role-association.create.d.ts.map +0 -1
  148. package/script/commands/iam/user-role-association.create.js +0 -44
  149. package/script/commands/iam/user-role-association.delete.d.ts +0 -42
  150. package/script/commands/iam/user-role-association.delete.d.ts.map +0 -1
  151. package/script/commands/iam/user-role-association.delete.js +0 -44
  152. package/script/commands/iam/user-role-association.list.d.ts +0 -33
  153. package/script/commands/iam/user-role-association.list.d.ts.map +0 -1
  154. package/script/commands/iam/user-role-association.list.js +0 -43
  155. package/script/contracts/iam.d.ts +0 -13
  156. package/script/contracts/iam.d.ts.map +0 -1
  157. package/script/contracts/iam.js +0 -12
@@ -1,45 +0,0 @@
1
- import { type Static, type TObject, type TString } from "@sinclair/typebox";
2
- import { Command } from "../../common/command.js";
3
- /**
4
- * The input for the api key role associations delete command
5
- */
6
- export interface ApiKeyRoleAssociationDeleteInput {
7
- /** the api key id */
8
- apiKeyId: string;
9
- /** the role id */
10
- roleId: string;
11
- }
12
- /**
13
- * The response for the api key role association delete command
14
- */
15
- declare const responseSchema: TObject<{
16
- roleId: TString;
17
- organizationId: TString;
18
- keyId: TString;
19
- }>;
20
- type ApiKeyRoleAssociationDeleteOutput = Omit<Static<typeof responseSchema>, "keyId"> & {
21
- apiKeyId: string;
22
- };
23
- /**
24
- * Delete a user role association
25
- */
26
- export declare class ApiKeyRoleAssociationDeleteCommand extends Command<ApiKeyRoleAssociationDeleteInput, ApiKeyRoleAssociationDeleteOutput> {
27
- /**
28
- * Get the method
29
- */
30
- protected getMethod(): string;
31
- /**
32
- * Get the base url
33
- */
34
- protected getBaseUrl(): string;
35
- /**
36
- * Get the path
37
- */
38
- protected getPath(): string;
39
- /**
40
- * Parse the response
41
- */
42
- protected parseResponse(rawResponse: unknown): ApiKeyRoleAssociationDeleteOutput;
43
- }
44
- export {};
45
- //# sourceMappingURL=api-key-role-association.delete.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"api-key-role-association.delete.d.ts","sourceRoot":"","sources":["../../../src/commands/iam/api-key-role-association.delete.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,MAAM,EAAE,KAAK,OAAO,EAAE,KAAK,OAAO,EAAQ,MAAM,mBAAmB,CAAA;AACjF,OAAO,EAAE,OAAO,EAAE,MAAM,yBAAyB,CAAA;AAGjD;;GAEG;AACH,MAAM,WAAW,gCAAgC;IAC/C,qBAAqB;IACrB,QAAQ,EAAE,MAAM,CAAA;IAChB,kBAAkB;IAClB,MAAM,EAAE,MAAM,CAAA;CACf;AAED;;GAEG;AACH,QAAA,MAAM,cAAc,EAAE,OAAO,CAAC;IAC5B,MAAM,EAAE,OAAO,CAAA;IACf,cAAc,EAAE,OAAO,CAAA;IACvB,KAAK,EAAE,OAAO,CAAA;CACf,CAIC,CAAA;AAEF,KAAK,iCAAiC,GAAG,IAAI,CAAC,MAAM,CAAC,OAAO,cAAc,CAAC,EAAE,OAAO,CAAC,GAAG;IACtF,QAAQ,EAAE,MAAM,CAAA;CACjB,CAAA;AAED;;GAEG;AACH,qBAAa,kCACX,SAAQ,OAAO,CAAC,gCAAgC,EAAE,iCAAiC,CAAC;IACpF;;OAEG;cACgB,SAAS,IAAI,MAAM;IAItC;;OAEG;cACgB,UAAU,IAAI,MAAM;IAIvC;;OAEG;cACgB,OAAO,IAAI,MAAM;IAIpC;;OAEG;cACgB,aAAa,CAAC,WAAW,EAAE,OAAO,GAAG,iCAAiC;CAO1F"}
@@ -1,44 +0,0 @@
1
- import { Type } from "@sinclair/typebox";
2
- import { Command } from "../../common/command.js";
3
- import { parseResponseHelper } from "../../utils/parse-response-helper.js";
4
- /**
5
- * The response for the api key role association delete command
6
- */
7
- const responseSchema = Type.Object({
8
- roleId: Type.String(),
9
- organizationId: Type.String(),
10
- keyId: Type.String(),
11
- });
12
- /**
13
- * Delete a user role association
14
- */
15
- export class ApiKeyRoleAssociationDeleteCommand extends Command {
16
- /**
17
- * Get the method
18
- */
19
- getMethod() {
20
- return "DELETE";
21
- }
22
- /**
23
- * Get the base url
24
- */
25
- getBaseUrl() {
26
- return "https://iam.api.flowcore.io";
27
- }
28
- /**
29
- * Get the path
30
- */
31
- getPath() {
32
- return `/api/v1/role-associations/key/${this.input.apiKeyId}`;
33
- }
34
- /**
35
- * Parse the response
36
- */
37
- parseResponse(rawResponse) {
38
- const { keyId, ...rest } = parseResponseHelper(responseSchema, rawResponse);
39
- return {
40
- ...rest,
41
- apiKeyId: keyId,
42
- };
43
- }
44
- }
@@ -1,31 +0,0 @@
1
- import { Command } from "../../common/command.js";
2
- import { type Role } from "../../contracts/iam.js";
3
- /**
4
- * The input for the api key role association list command
5
- */
6
- export interface ApiKeyRoleAssociationListInput {
7
- /** the api key id */
8
- apiKeyId: string;
9
- }
10
- /**
11
- * Fetch all user role associations
12
- */
13
- export declare class ApiKeyRoleAssociationListCommand extends Command<ApiKeyRoleAssociationListInput, Role[]> {
14
- /**
15
- * Get the method
16
- */
17
- protected getMethod(): string;
18
- /**
19
- * Get the base url
20
- */
21
- protected getBaseUrl(): string;
22
- /**
23
- * Get the path
24
- */
25
- protected getPath(): string;
26
- /**
27
- * Parse the response
28
- */
29
- protected parseResponse(rawResponse: unknown): Role[];
30
- }
31
- //# sourceMappingURL=api-key-role-association.list.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"api-key-role-association.list.d.ts","sourceRoot":"","sources":["../../../src/commands/iam/api-key-role-association.list.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,yBAAyB,CAAA;AAGjD,OAAO,EAAE,KAAK,IAAI,EAAc,MAAM,wBAAwB,CAAA;AAE9D;;GAEG;AACH,MAAM,WAAW,8BAA8B;IAC7C,qBAAqB;IACrB,QAAQ,EAAE,MAAM,CAAA;CACjB;AAED;;GAEG;AACH,qBAAa,gCAAiC,SAAQ,OAAO,CAAC,8BAA8B,EAAE,IAAI,EAAE,CAAC;IACnG;;OAEG;cACgB,SAAS,IAAI,MAAM;IAItC;;OAEG;cACgB,UAAU,IAAI,MAAM;IAIvC;;OAEG;cACgB,OAAO,IAAI,MAAM;IAIpC;;OAEG;cACgB,aAAa,CAAC,WAAW,EAAE,OAAO,GAAG,IAAI,EAAE;CAO/D"}
@@ -1,37 +0,0 @@
1
- import { Command } from "../../common/command.js";
2
- import { Type } from "@sinclair/typebox";
3
- import { parseResponseHelper } from "../../utils/parse-response-helper.js";
4
- import { RoleSchema } from "../../contracts/iam.js";
5
- /**
6
- * Fetch all user role associations
7
- */
8
- export class ApiKeyRoleAssociationListCommand extends Command {
9
- /**
10
- * Get the method
11
- */
12
- getMethod() {
13
- return "GET";
14
- }
15
- /**
16
- * Get the base url
17
- */
18
- getBaseUrl() {
19
- return "https://iam.api.flowcore.io";
20
- }
21
- /**
22
- * Get the path
23
- */
24
- getPath() {
25
- return `/api/v1/role-associations/key/${this.input.apiKeyId}`;
26
- }
27
- /**
28
- * Parse the response
29
- */
30
- parseResponse(rawResponse) {
31
- const response = parseResponseHelper(Type.Array(RoleSchema), rawResponse);
32
- return response.map((role) => ({
33
- ...role,
34
- tenantId: role.organizationId,
35
- }));
36
- }
37
- }
@@ -1,33 +0,0 @@
1
- import { Command } from "../../common/command.js";
2
- import { type Role } from "../../contracts/iam.js";
3
- /**
4
- * The input for the role list command
5
- */
6
- export interface RoleListInput {
7
- /** the tenant id */
8
- tenantId: string;
9
- /** the role name */
10
- name?: string;
11
- }
12
- /**
13
- * Fetch all roles for a tenant
14
- */
15
- export declare class RoleListCommand extends Command<RoleListInput, Role[]> {
16
- /**
17
- * Get the method
18
- */
19
- protected getMethod(): string;
20
- /**
21
- * Get the base url
22
- */
23
- protected getBaseUrl(): string;
24
- /**
25
- * Get the path
26
- */
27
- protected getPath(): string;
28
- /**
29
- * Parse the response
30
- */
31
- protected parseResponse(rawResponse: unknown): Role[];
32
- }
33
- //# sourceMappingURL=role.list.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"role.list.d.ts","sourceRoot":"","sources":["../../../src/commands/iam/role.list.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,yBAAyB,CAAA;AAGjD,OAAO,EAAE,KAAK,IAAI,EAAc,MAAM,wBAAwB,CAAA;AAE9D;;GAEG;AACH,MAAM,WAAW,aAAa;IAC5B,oBAAoB;IACpB,QAAQ,EAAE,MAAM,CAAA;IAChB,oBAAoB;IACpB,IAAI,CAAC,EAAE,MAAM,CAAA;CACd;AAED;;GAEG;AACH,qBAAa,eAAgB,SAAQ,OAAO,CAAC,aAAa,EAAE,IAAI,EAAE,CAAC;IACjE;;OAEG;cACgB,SAAS,IAAI,MAAM;IAItC;;OAEG;cACgB,UAAU,IAAI,MAAM;IAIvC;;OAEG;cACgB,OAAO,IAAI,MAAM;IAQpC;;OAEG;cACgB,aAAa,CAAC,WAAW,EAAE,OAAO,GAAG,IAAI,EAAE;CAO/D"}
@@ -1,41 +0,0 @@
1
- import { Command } from "../../common/command.js";
2
- import { Type } from "@sinclair/typebox";
3
- import { parseResponseHelper } from "../../utils/parse-response-helper.js";
4
- import { RoleSchema } from "../../contracts/iam.js";
5
- /**
6
- * Fetch all roles for a tenant
7
- */
8
- export class RoleListCommand extends Command {
9
- /**
10
- * Get the method
11
- */
12
- getMethod() {
13
- return "GET";
14
- }
15
- /**
16
- * Get the base url
17
- */
18
- getBaseUrl() {
19
- return "https://iam.api.flowcore.io";
20
- }
21
- /**
22
- * Get the path
23
- */
24
- getPath() {
25
- const query = new URLSearchParams();
26
- if (this.input.name) {
27
- query.set("name", this.input.name);
28
- }
29
- return `/api/v1/role-associations/organization/${this.input.tenantId}?${query.toString()}`;
30
- }
31
- /**
32
- * Parse the response
33
- */
34
- parseResponse(rawResponse) {
35
- const response = parseResponseHelper(Type.Array(RoleSchema), rawResponse);
36
- return response.map((role) => ({
37
- ...role,
38
- tenantId: role.organizationId,
39
- }));
40
- }
41
- }
@@ -1,42 +0,0 @@
1
- import { type Static, type TObject, type TString } from "@sinclair/typebox";
2
- import { Command } from "../../common/command.js";
3
- /**
4
- * The input for the user role associations create command
5
- */
6
- export interface UserRoleAssociationCreateInput {
7
- /** the user id */
8
- userId: string;
9
- /** the role id */
10
- roleId: string;
11
- }
12
- /**
13
- * The response for the user role associations delete command
14
- */
15
- declare const responseSchema: TObject<{
16
- roleId: TString;
17
- organizationId: TString;
18
- userId: TString;
19
- }>;
20
- /**
21
- * Create a user role association
22
- */
23
- export declare class UserRoleAssociationCreateCommand extends Command<UserRoleAssociationCreateInput, Static<typeof responseSchema>> {
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
- * Parse the response
38
- */
39
- protected parseResponse(rawResponse: unknown): Static<typeof responseSchema>;
40
- }
41
- export {};
42
- //# sourceMappingURL=user-role-association.create.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"user-role-association.create.d.ts","sourceRoot":"","sources":["../../../src/commands/iam/user-role-association.create.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,MAAM,EAAE,KAAK,OAAO,EAAE,KAAK,OAAO,EAAQ,MAAM,mBAAmB,CAAA;AACjF,OAAO,EAAE,OAAO,EAAE,MAAM,yBAAyB,CAAA;AAGjD;;GAEG;AACH,MAAM,WAAW,8BAA8B;IAC7C,kBAAkB;IAClB,MAAM,EAAE,MAAM,CAAA;IACd,kBAAkB;IAClB,MAAM,EAAE,MAAM,CAAA;CACf;AAED;;GAEG;AACH,QAAA,MAAM,cAAc,EAAE,OAAO,CAAC;IAC5B,MAAM,EAAE,OAAO,CAAA;IACf,cAAc,EAAE,OAAO,CAAA;IACvB,MAAM,EAAE,OAAO,CAAA;CAChB,CAIC,CAAA;AAEF;;GAEG;AACH,qBAAa,gCACX,SAAQ,OAAO,CAAC,8BAA8B,EAAE,MAAM,CAAC,OAAO,cAAc,CAAC,CAAC;IAC9E;;OAEG;cACgB,SAAS,IAAI,MAAM;IAItC;;OAEG;cACgB,UAAU,IAAI,MAAM;IAIvC;;OAEG;cACgB,OAAO,IAAI,MAAM;IAIpC;;OAEG;cACgB,aAAa,CAAC,WAAW,EAAE,OAAO,GAAG,MAAM,CAAC,OAAO,cAAc,CAAC;CAGtF"}
@@ -1,40 +0,0 @@
1
- import { Type } from "@sinclair/typebox";
2
- import { Command } from "../../common/command.js";
3
- import { parseResponseHelper } from "../../utils/parse-response-helper.js";
4
- /**
5
- * The response for the user role associations delete command
6
- */
7
- const responseSchema = Type.Object({
8
- roleId: Type.String(),
9
- organizationId: Type.String(),
10
- userId: Type.String(),
11
- });
12
- /**
13
- * Create a user role association
14
- */
15
- export class UserRoleAssociationCreateCommand extends Command {
16
- /**
17
- * Get the method
18
- */
19
- getMethod() {
20
- return "POST";
21
- }
22
- /**
23
- * Get the base url
24
- */
25
- getBaseUrl() {
26
- return "https://iam.api.flowcore.io";
27
- }
28
- /**
29
- * Get the path
30
- */
31
- getPath() {
32
- return `/api/v1/role-associations/user/${this.input.userId}`;
33
- }
34
- /**
35
- * Parse the response
36
- */
37
- parseResponse(rawResponse) {
38
- return parseResponseHelper(responseSchema, rawResponse);
39
- }
40
- }
@@ -1,42 +0,0 @@
1
- import { type Static, type TObject, type TString } from "@sinclair/typebox";
2
- import { Command } from "../../common/command.js";
3
- /**
4
- * The input for the user role associations delete command
5
- */
6
- export interface UserRoleAssociationDeleteInput {
7
- /** the user id */
8
- userId: string;
9
- /** the role id */
10
- roleId: string;
11
- }
12
- /**
13
- * The response for the user role associations delete command
14
- */
15
- declare const responseSchema: TObject<{
16
- roleId: TString;
17
- organizationId: TString;
18
- userId: TString;
19
- }>;
20
- /**
21
- * Delete a user role association
22
- */
23
- export declare class UserRoleAssociationDeleteCommand extends Command<UserRoleAssociationDeleteInput, Static<typeof responseSchema>> {
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
- * Parse the response
38
- */
39
- protected parseResponse(rawResponse: unknown): Static<typeof responseSchema>;
40
- }
41
- export {};
42
- //# sourceMappingURL=user-role-association.delete.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"user-role-association.delete.d.ts","sourceRoot":"","sources":["../../../src/commands/iam/user-role-association.delete.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,MAAM,EAAE,KAAK,OAAO,EAAE,KAAK,OAAO,EAAQ,MAAM,mBAAmB,CAAA;AACjF,OAAO,EAAE,OAAO,EAAE,MAAM,yBAAyB,CAAA;AAGjD;;GAEG;AACH,MAAM,WAAW,8BAA8B;IAC7C,kBAAkB;IAClB,MAAM,EAAE,MAAM,CAAA;IACd,kBAAkB;IAClB,MAAM,EAAE,MAAM,CAAA;CACf;AAED;;GAEG;AACH,QAAA,MAAM,cAAc,EAAE,OAAO,CAAC;IAC5B,MAAM,EAAE,OAAO,CAAA;IACf,cAAc,EAAE,OAAO,CAAA;IACvB,MAAM,EAAE,OAAO,CAAA;CAChB,CAIC,CAAA;AAEF;;GAEG;AACH,qBAAa,gCACX,SAAQ,OAAO,CAAC,8BAA8B,EAAE,MAAM,CAAC,OAAO,cAAc,CAAC,CAAC;IAC9E;;OAEG;cACgB,SAAS,IAAI,MAAM;IAItC;;OAEG;cACgB,UAAU,IAAI,MAAM;IAIvC;;OAEG;cACgB,OAAO,IAAI,MAAM;IAIpC;;OAEG;cACgB,aAAa,CAAC,WAAW,EAAE,OAAO,GAAG,MAAM,CAAC,OAAO,cAAc,CAAC;CAGtF"}
@@ -1,40 +0,0 @@
1
- import { Type } from "@sinclair/typebox";
2
- import { Command } from "../../common/command.js";
3
- import { parseResponseHelper } from "../../utils/parse-response-helper.js";
4
- /**
5
- * The response for the user role associations delete command
6
- */
7
- const responseSchema = Type.Object({
8
- roleId: Type.String(),
9
- organizationId: Type.String(),
10
- userId: Type.String(),
11
- });
12
- /**
13
- * Delete a user role association
14
- */
15
- export class UserRoleAssociationDeleteCommand extends Command {
16
- /**
17
- * Get the method
18
- */
19
- getMethod() {
20
- return "DELETE";
21
- }
22
- /**
23
- * Get the base url
24
- */
25
- getBaseUrl() {
26
- return "https://iam.api.flowcore.io";
27
- }
28
- /**
29
- * Get the path
30
- */
31
- getPath() {
32
- return `/api/v1/role-associations/user/${this.input.userId}`;
33
- }
34
- /**
35
- * Parse the response
36
- */
37
- parseResponse(rawResponse) {
38
- return parseResponseHelper(responseSchema, rawResponse);
39
- }
40
- }
@@ -1,33 +0,0 @@
1
- import { Command } from "../../common/command.js";
2
- import { type Role } from "../../contracts/iam.js";
3
- /**
4
- * The input for the user role associations list command
5
- */
6
- export interface UserRoleAssociationListInput {
7
- /** the user id */
8
- userId: string;
9
- /** the tenant id */
10
- tenantId?: string;
11
- }
12
- /**
13
- * Fetch all user role associations
14
- */
15
- export declare class UserRoleAssociationListCommand extends Command<UserRoleAssociationListInput, Role[]> {
16
- /**
17
- * Get the method
18
- */
19
- protected getMethod(): string;
20
- /**
21
- * Get the base url
22
- */
23
- protected getBaseUrl(): string;
24
- /**
25
- * Get the path
26
- */
27
- protected getPath(): string;
28
- /**
29
- * Parse the response
30
- */
31
- protected parseResponse(rawResponse: unknown): Role[];
32
- }
33
- //# sourceMappingURL=user-role-association.list.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"user-role-association.list.d.ts","sourceRoot":"","sources":["../../../src/commands/iam/user-role-association.list.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,yBAAyB,CAAA;AAGjD,OAAO,EAAE,KAAK,IAAI,EAAc,MAAM,wBAAwB,CAAA;AAE9D;;GAEG;AACH,MAAM,WAAW,4BAA4B;IAC3C,kBAAkB;IAClB,MAAM,EAAE,MAAM,CAAA;IACd,oBAAoB;IACpB,QAAQ,CAAC,EAAE,MAAM,CAAA;CAClB;AAED;;GAEG;AACH,qBAAa,8BAA+B,SAAQ,OAAO,CAAC,4BAA4B,EAAE,IAAI,EAAE,CAAC;IAC/F;;OAEG;cACgB,SAAS,IAAI,MAAM;IAItC;;OAEG;cACgB,UAAU,IAAI,MAAM;IAIvC;;OAEG;cACgB,OAAO,IAAI,MAAM;IAMpC;;OAEG;cACgB,aAAa,CAAC,WAAW,EAAE,OAAO,GAAG,IAAI,EAAE;CAO/D"}
@@ -1,39 +0,0 @@
1
- import { Command } from "../../common/command.js";
2
- import { Type } from "@sinclair/typebox";
3
- import { parseResponseHelper } from "../../utils/parse-response-helper.js";
4
- import { RoleSchema } from "../../contracts/iam.js";
5
- /**
6
- * Fetch all user role associations
7
- */
8
- export class UserRoleAssociationListCommand extends Command {
9
- /**
10
- * Get the method
11
- */
12
- getMethod() {
13
- return "GET";
14
- }
15
- /**
16
- * Get the base url
17
- */
18
- getBaseUrl() {
19
- return "https://iam.api.flowcore.io";
20
- }
21
- /**
22
- * Get the path
23
- */
24
- getPath() {
25
- const queryParams = new URLSearchParams();
26
- this.input.tenantId && queryParams.set("organizationId", this.input.tenantId);
27
- return `/api/v1/role-associations/user/${this.input.userId}?${queryParams.toString()}`;
28
- }
29
- /**
30
- * Parse the response
31
- */
32
- parseResponse(rawResponse) {
33
- const response = parseResponseHelper(Type.Array(RoleSchema), rawResponse);
34
- return response.map((role) => ({
35
- ...role,
36
- tenantId: role.organizationId,
37
- }));
38
- }
39
- }
@@ -1,13 +0,0 @@
1
- import { type Static, type TBoolean, type TObject, type TOptional, type TString } from "@sinclair/typebox";
2
- export declare const RoleSchema: TObject<{
3
- id: TString;
4
- organizationId: TString;
5
- name: TString;
6
- description: TOptional<TString>;
7
- flowcoreManaged: TOptional<TBoolean>;
8
- frn: TOptional<TString>;
9
- }>;
10
- export type Role = Omit<Static<typeof RoleSchema>, "organizationId"> & {
11
- tenantId: string;
12
- };
13
- //# sourceMappingURL=iam.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"iam.d.ts","sourceRoot":"","sources":["../../src/contracts/iam.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,MAAM,EAAE,KAAK,QAAQ,EAAE,KAAK,OAAO,EAAE,KAAK,SAAS,EAAE,KAAK,OAAO,EAAQ,MAAM,mBAAmB,CAAA;AAEhH,eAAO,MAAM,UAAU,EAAE,OAAO,CAAC;IAC/B,EAAE,EAAE,OAAO,CAAA;IACX,cAAc,EAAE,OAAO,CAAA;IACvB,IAAI,EAAE,OAAO,CAAA;IACb,WAAW,EAAE,SAAS,CAAC,OAAO,CAAC,CAAA;IAC/B,eAAe,EAAE,SAAS,CAAC,QAAQ,CAAC,CAAA;IACpC,GAAG,EAAE,SAAS,CAAC,OAAO,CAAC,CAAA;CACxB,CAOC,CAAA;AAEF,MAAM,MAAM,IAAI,GAAG,IAAI,CAAC,MAAM,CAAC,OAAO,UAAU,CAAC,EAAE,gBAAgB,CAAC,GAAG;IACrE,QAAQ,EAAE,MAAM,CAAA;CACjB,CAAA"}
@@ -1,9 +0,0 @@
1
- import { Type } from "@sinclair/typebox";
2
- export const RoleSchema = Type.Object({
3
- id: Type.String(),
4
- organizationId: Type.String(),
5
- name: Type.String(),
6
- description: Type.Optional(Type.String()),
7
- flowcoreManaged: Type.Optional(Type.Boolean()),
8
- frn: Type.Optional(Type.String()),
9
- });
@@ -1,45 +0,0 @@
1
- import { type Static, type TObject, type TString } from "@sinclair/typebox";
2
- import { Command } from "../../common/command.js";
3
- /**
4
- * The input for the api key role associations create command
5
- */
6
- export interface ApiKeyRoleAssociationCreateInput {
7
- /** the api key id */
8
- apiKeyId: string;
9
- /** the role id */
10
- roleId: string;
11
- }
12
- /**
13
- * The response for the api key role associations create command
14
- */
15
- declare const responseSchema: TObject<{
16
- roleId: TString;
17
- organizationId: TString;
18
- keyId: TString;
19
- }>;
20
- type ApiKeyRoleAssociationCreateOutput = Omit<Static<typeof responseSchema>, "keyId"> & {
21
- apiKeyId: string;
22
- };
23
- /**
24
- * Create a api key role association
25
- */
26
- export declare class ApiKeyRoleAssociationCreateCommand extends Command<ApiKeyRoleAssociationCreateInput, ApiKeyRoleAssociationCreateOutput> {
27
- /**
28
- * Get the method
29
- */
30
- protected getMethod(): string;
31
- /**
32
- * Get the base url
33
- */
34
- protected getBaseUrl(): string;
35
- /**
36
- * Get the path
37
- */
38
- protected getPath(): string;
39
- /**
40
- * Parse the response
41
- */
42
- protected parseResponse(rawResponse: unknown): ApiKeyRoleAssociationCreateOutput;
43
- }
44
- export {};
45
- //# sourceMappingURL=api-key-role-association.create.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"api-key-role-association.create.d.ts","sourceRoot":"","sources":["../../../src/commands/iam/api-key-role-association.create.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,MAAM,EAAE,KAAK,OAAO,EAAE,KAAK,OAAO,EAAQ,MAAM,mBAAmB,CAAA;AACjF,OAAO,EAAE,OAAO,EAAE,MAAM,yBAAyB,CAAA;AAGjD;;GAEG;AACH,MAAM,WAAW,gCAAgC;IAC/C,qBAAqB;IACrB,QAAQ,EAAE,MAAM,CAAA;IAChB,kBAAkB;IAClB,MAAM,EAAE,MAAM,CAAA;CACf;AAED;;GAEG;AACH,QAAA,MAAM,cAAc,EAAE,OAAO,CAAC;IAC5B,MAAM,EAAE,OAAO,CAAA;IACf,cAAc,EAAE,OAAO,CAAA;IACvB,KAAK,EAAE,OAAO,CAAA;CACf,CAIC,CAAA;AAEF,KAAK,iCAAiC,GAAG,IAAI,CAAC,MAAM,CAAC,OAAO,cAAc,CAAC,EAAE,OAAO,CAAC,GAAG;IACtF,QAAQ,EAAE,MAAM,CAAA;CACjB,CAAA;AAED;;GAEG;AACH,qBAAa,kCACX,SAAQ,OAAO,CAAC,gCAAgC,EAAE,iCAAiC,CAAC;IACpF;;OAEG;cACgB,SAAS,IAAI,MAAM;IAItC;;OAEG;cACgB,UAAU,IAAI,MAAM;IAIvC;;OAEG;cACgB,OAAO,IAAI,MAAM;IAIpC;;OAEG;cACgB,aAAa,CAAC,WAAW,EAAE,OAAO,GAAG,iCAAiC;CAO1F"}
@@ -1,48 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.ApiKeyRoleAssociationCreateCommand = void 0;
4
- const typebox_1 = require("@sinclair/typebox");
5
- const command_js_1 = require("../../common/command.js");
6
- const parse_response_helper_js_1 = require("../../utils/parse-response-helper.js");
7
- /**
8
- * The response for the api key role associations create command
9
- */
10
- const responseSchema = typebox_1.Type.Object({
11
- roleId: typebox_1.Type.String(),
12
- organizationId: typebox_1.Type.String(),
13
- keyId: typebox_1.Type.String(),
14
- });
15
- /**
16
- * Create a api key role association
17
- */
18
- class ApiKeyRoleAssociationCreateCommand extends command_js_1.Command {
19
- /**
20
- * Get the method
21
- */
22
- getMethod() {
23
- return "POST";
24
- }
25
- /**
26
- * Get the base url
27
- */
28
- getBaseUrl() {
29
- return "https://iam.api.flowcore.io";
30
- }
31
- /**
32
- * Get the path
33
- */
34
- getPath() {
35
- return `/api/v1/role-associations/key/${this.input.apiKeyId}`;
36
- }
37
- /**
38
- * Parse the response
39
- */
40
- parseResponse(rawResponse) {
41
- const { keyId, ...rest } = (0, parse_response_helper_js_1.parseResponseHelper)(responseSchema, rawResponse);
42
- return {
43
- ...rest,
44
- apiKeyId: keyId,
45
- };
46
- }
47
- }
48
- exports.ApiKeyRoleAssociationCreateCommand = ApiKeyRoleAssociationCreateCommand;