@flowcore/sdk 1.65.0 → 1.67.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +29 -0
- package/esm/commands/index.d.ts +2 -0
- package/esm/commands/index.d.ts.map +1 -1
- package/esm/commands/index.js +2 -0
- package/esm/commands/user/user.delete.d.ts +41 -0
- package/esm/commands/user/user.delete.d.ts.map +1 -0
- package/esm/commands/user/user.delete.js +40 -0
- package/esm/commands/user/user.invite-to-tenant.d.ts +49 -0
- package/esm/commands/user/user.invite-to-tenant.d.ts.map +1 -0
- package/esm/commands/user/user.invite-to-tenant.js +51 -0
- package/package.json +1 -1
- package/script/commands/index.d.ts +2 -0
- package/script/commands/index.d.ts.map +1 -1
- package/script/commands/index.js +2 -0
- package/script/commands/user/user.delete.d.ts +41 -0
- package/script/commands/user/user.delete.d.ts.map +1 -0
- package/script/commands/user/user.delete.js +44 -0
- package/script/commands/user/user.invite-to-tenant.d.ts +49 -0
- package/script/commands/user/user.invite-to-tenant.d.ts.map +1 -0
- package/script/commands/user/user.invite-to-tenant.js +55 -0
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,34 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## [1.67.0](https://github.com/flowcore-io/flowcore-sdk/compare/v1.66.0...v1.67.0) (2026-01-27)
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
### Features
|
|
7
|
+
|
|
8
|
+
* add UserInviteToTenantCommand to invite existing users to a tenant ([1d013a1](https://github.com/flowcore-io/flowcore-sdk/commit/1d013a1b2c35d3aeb46d709dd99961ff83076191))
|
|
9
|
+
* add UserInviteToTenantCommand to invite existing users to a tenant ([4220e32](https://github.com/flowcore-io/flowcore-sdk/commit/4220e32d78dc4b1e730e7fbcbee37c3a2f3f6e1e))
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
### Bug Fixes
|
|
13
|
+
|
|
14
|
+
* remove duplicate command ([000a93d](https://github.com/flowcore-io/flowcore-sdk/commit/000a93df9fe2e53ef7ecf061c1fb5eaca81cb3d9))
|
|
15
|
+
|
|
16
|
+
## [1.66.0](https://github.com/flowcore-io/flowcore-sdk/compare/v1.65.0...v1.66.0) (2026-01-19)
|
|
17
|
+
|
|
18
|
+
|
|
19
|
+
### Features
|
|
20
|
+
|
|
21
|
+
* add UserDeleteCommand and corresponding tests for user deletion functionality ([85fc50e](https://github.com/flowcore-io/flowcore-sdk/commit/85fc50ed90d5df49267ae0b25ab171bcae5117b3))
|
|
22
|
+
* add UserDeleteCommand to handle deletion of the authenticated user ([a674ef8](https://github.com/flowcore-io/flowcore-sdk/commit/a674ef8a59bec94917dd8aefc6f31431afa9ffb2))
|
|
23
|
+
* add UserDeleteCommand to handle deletion of the authenticated user ([96c931b](https://github.com/flowcore-io/flowcore-sdk/commit/96c931b3ff0d16be6b157f0f09f9fb5fffb7d6ab))
|
|
24
|
+
|
|
25
|
+
|
|
26
|
+
### Bug Fixes
|
|
27
|
+
|
|
28
|
+
* remove trailing slash from user deletion API endpoint and update corresponding test ([b1c1ea4](https://github.com/flowcore-io/flowcore-sdk/commit/b1c1ea467218ab97d2b4c6263ebe14eabe0eb94f))
|
|
29
|
+
* update UserDeleteInput type description to clarify it represents the input for deleting the current authenticated user ([2f092dd](https://github.com/flowcore-io/flowcore-sdk/commit/2f092ddb96ea7cdbf88b4862453dbb0508e381c6))
|
|
30
|
+
* update UserDeleteOutput type description to clarify it represents the output for deleting the authenticated user ([4c5ac23](https://github.com/flowcore-io/flowcore-sdk/commit/4c5ac23d29b178cbce56e75e60ca728db8a42598))
|
|
31
|
+
|
|
3
32
|
## [1.65.0](https://github.com/flowcore-io/flowcore-sdk/compare/v1.64.3...v1.65.0) (2026-01-09)
|
|
4
33
|
|
|
5
34
|
|
package/esm/commands/index.d.ts
CHANGED
|
@@ -62,6 +62,8 @@ export * from "./security/pat.get.js";
|
|
|
62
62
|
export * from "./security/pat.list.js";
|
|
63
63
|
export * from "./security/permissions.list.js";
|
|
64
64
|
export * from "./user/user.initialize-in-keycloak.js";
|
|
65
|
+
export * from "./user/user.delete.js";
|
|
66
|
+
export * from "./user/user.invite-to-tenant.js";
|
|
65
67
|
export * from "./scenario/scenario.create.js";
|
|
66
68
|
export * from "./scenario/scenario.delete.js";
|
|
67
69
|
export * from "./scenario/scenario.fetch.js";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/commands/index.ts"],"names":[],"mappings":"AACA,cAAc,2CAA2C,CAAA;AACzD,cAAc,0CAA0C,CAAA;AACxD,cAAc,2BAA2B,CAAA;AACzC,cAAc,0BAA0B,CAAA;AACxC,cAAc,yBAAyB,CAAA;AACvC,cAAc,2BAA2B,CAAA;AACzC,cAAc,6BAA6B,CAAA;AAC3C,cAAc,gCAAgC,CAAA;AAC9C,cAAc,8BAA8B,CAAA;AAC5C,cAAc,yCAAyC,CAAA;AACvD,cAAc,4BAA4B,CAAA;AAG1C,cAAc,4BAA4B,CAAA;AAG1C,cAAc,6BAA6B,CAAA;AAC3C,cAAc,2BAA2B,CAAA;AACzC,cAAc,6BAA6B,CAAA;AAC3C,cAAc,2BAA2B,CAAA;AAGzC,cAAc,2BAA2B,CAAA;AACzC,cAAc,2BAA2B,CAAA;AACzC,cAAc,yBAAyB,CAAA;AACvC,cAAc,yBAAyB,CAAA;AAGvC,cAAc,+BAA+B,CAAA;AAC7C,cAAc,+BAA+B,CAAA;AAC7C,cAAc,6BAA6B,CAAA;AAC3C,cAAc,6BAA6B,CAAA;AAG3C,cAAc,iCAAiC,CAAA;AAC/C,cAAc,iCAAiC,CAAA;AAC/C,cAAc,gCAAgC,CAAA;AAC9C,cAAc,+BAA+B,CAAA;AAC7C,cAAc,yCAAyC,CAAA;AACvD,cAAc,iCAAiC,CAAA;AAG/C,cAAc,iCAAiC,CAAA;AAC/C,cAAc,iCAAiC,CAAA;AAC/C,cAAc,gCAAgC,CAAA;AAC9C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AA0B,CAAA;AACxC,cAAc,gCAAgC,CAAA;AAC9C,cAAc,4BAA4B,CAAA;AAC1C,cAAc,+BAA+B,CAAA;AAE7C,cAAc,gDAAgD,CAAA;AAE9D,cAAc,gCAAgC,CAAA;AAC9C,cAAc,iCAAiC,CAAA"}
|
package/esm/commands/index.js
CHANGED
|
@@ -75,6 +75,8 @@ export * from "./security/pat.list.js";
|
|
|
75
75
|
export * from "./security/permissions.list.js";
|
|
76
76
|
// User
|
|
77
77
|
export * from "./user/user.initialize-in-keycloak.js";
|
|
78
|
+
export * from "./user/user.delete.js";
|
|
79
|
+
export * from "./user/user.invite-to-tenant.js";
|
|
78
80
|
// Scenario
|
|
79
81
|
export * from "./scenario/scenario.create.js";
|
|
80
82
|
export * from "./scenario/scenario.delete.js";
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
import { Command } from "../../common/command.js";
|
|
2
|
+
import type { Static, TObject, TString } from "@sinclair/typebox";
|
|
3
|
+
/**
|
|
4
|
+
* The input for deleting the current authenticated user
|
|
5
|
+
* No input parameters needed - checks current authenticated user
|
|
6
|
+
*/
|
|
7
|
+
export type UserDeleteInput = Record<PropertyKey, never>;
|
|
8
|
+
/**
|
|
9
|
+
* The output for deleting the current authenticated user
|
|
10
|
+
*/
|
|
11
|
+
export type UserDeleteOutput = Static<typeof responseSchema>;
|
|
12
|
+
declare const responseSchema: TObject<{
|
|
13
|
+
id: TString;
|
|
14
|
+
}>;
|
|
15
|
+
/**
|
|
16
|
+
* Delete current authenticated user
|
|
17
|
+
*/
|
|
18
|
+
export declare class UserDeleteCommand extends Command<UserDeleteInput, UserDeleteOutput> {
|
|
19
|
+
/**
|
|
20
|
+
* The allowed modes for the command
|
|
21
|
+
*/
|
|
22
|
+
protected allowedModes: ("apiKey" | "bearer")[];
|
|
23
|
+
/**
|
|
24
|
+
* Get the base URL for the request
|
|
25
|
+
*/
|
|
26
|
+
protected getBaseUrl(): string;
|
|
27
|
+
/**
|
|
28
|
+
* Get the method
|
|
29
|
+
*/
|
|
30
|
+
protected getMethod(): string;
|
|
31
|
+
/**
|
|
32
|
+
* Get the path for the request
|
|
33
|
+
*/
|
|
34
|
+
protected getPath(): string;
|
|
35
|
+
/**
|
|
36
|
+
* Parse the response
|
|
37
|
+
*/
|
|
38
|
+
protected parseResponse(rawResponse: unknown): UserDeleteOutput;
|
|
39
|
+
}
|
|
40
|
+
export {};
|
|
41
|
+
//# sourceMappingURL=user.delete.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"user.delete.d.ts","sourceRoot":"","sources":["../../../src/commands/user/user.delete.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,OAAO,EAAE,MAAM,yBAAyB,CAAA;AAEjD,OAAO,KAAK,EAAE,MAAM,EAAE,OAAO,EAAE,OAAO,EAAE,MAAM,mBAAmB,CAAA;AAEjE;;;GAGG;AACH,MAAM,MAAM,eAAe,GAAG,MAAM,CAAC,WAAW,EAAE,KAAK,CAAC,CAAA;AAExD;;GAEG;AACH,MAAM,MAAM,gBAAgB,GAAG,MAAM,CAAC,OAAO,cAAc,CAAC,CAAA;AAE5D,QAAA,MAAM,cAAc,EAAE,OAAO,CAAC;IAC5B,EAAE,EAAE,OAAO,CAAA;CACZ,CAEC,CAAA;AAEF;;GAEG;AACH,qBAAa,iBAAkB,SAAQ,OAAO,CAC5C,eAAe,EACf,gBAAgB,CACjB;IACC;;OAEG;IACH,UAAmB,YAAY,EAAE,CAAC,QAAQ,GAAG,QAAQ,CAAC,EAAE,CAAa;IAErE;;OAEG;cACgB,UAAU,IAAI,MAAM;IAIvC;;OAEG;cACgB,SAAS,IAAI,MAAM;IAItC;;OAEG;cACgB,OAAO,IAAI,MAAM;IAIpC;;OAEG;cACgB,aAAa,CAAC,WAAW,EAAE,OAAO,GAAG,gBAAgB;CAIzE"}
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
import { Type } from "@sinclair/typebox";
|
|
2
|
+
import { Command } from "../../common/command.js";
|
|
3
|
+
import { parseResponseHelper } from "../../utils/parse-response-helper.js";
|
|
4
|
+
const responseSchema = Type.Object({
|
|
5
|
+
id: Type.String(),
|
|
6
|
+
});
|
|
7
|
+
/**
|
|
8
|
+
* Delete current authenticated user
|
|
9
|
+
*/
|
|
10
|
+
export class UserDeleteCommand extends Command {
|
|
11
|
+
/**
|
|
12
|
+
* The allowed modes for the command
|
|
13
|
+
*/
|
|
14
|
+
allowedModes = ["bearer"];
|
|
15
|
+
/**
|
|
16
|
+
* Get the base URL for the request
|
|
17
|
+
*/
|
|
18
|
+
getBaseUrl() {
|
|
19
|
+
return "https://user-2.api.flowcore.io";
|
|
20
|
+
}
|
|
21
|
+
/**
|
|
22
|
+
* Get the method
|
|
23
|
+
*/
|
|
24
|
+
getMethod() {
|
|
25
|
+
return "DELETE";
|
|
26
|
+
}
|
|
27
|
+
/**
|
|
28
|
+
* Get the path for the request
|
|
29
|
+
*/
|
|
30
|
+
getPath() {
|
|
31
|
+
return `/api/users`;
|
|
32
|
+
}
|
|
33
|
+
/**
|
|
34
|
+
* Parse the response
|
|
35
|
+
*/
|
|
36
|
+
parseResponse(rawResponse) {
|
|
37
|
+
const response = parseResponseHelper(responseSchema, rawResponse);
|
|
38
|
+
return response;
|
|
39
|
+
}
|
|
40
|
+
}
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
import { Command } from "../../common/command.js";
|
|
2
|
+
import type { Static, TBoolean, TObject, TString } from "@sinclair/typebox";
|
|
3
|
+
/**
|
|
4
|
+
* The input for inviting an existing user to a tenant
|
|
5
|
+
*/
|
|
6
|
+
export interface UserInviteToTenantInput {
|
|
7
|
+
tenantName: string;
|
|
8
|
+
userEmail: string;
|
|
9
|
+
}
|
|
10
|
+
/**
|
|
11
|
+
* The output for inviting an existing user to a tenant
|
|
12
|
+
*/
|
|
13
|
+
export type UserInviteToTenantOutput = Static<typeof responseSchema>;
|
|
14
|
+
declare const responseSchema: TObject<{
|
|
15
|
+
success: TBoolean;
|
|
16
|
+
tenantName: TString;
|
|
17
|
+
invitedEmail: TString;
|
|
18
|
+
}>;
|
|
19
|
+
/**
|
|
20
|
+
* Invite an existing user (by email) to a tenant
|
|
21
|
+
*/
|
|
22
|
+
export declare class UserInviteToTenantCommand extends Command<UserInviteToTenantInput, UserInviteToTenantOutput> {
|
|
23
|
+
/**
|
|
24
|
+
* The allowed modes for the command
|
|
25
|
+
*/
|
|
26
|
+
protected allowedModes: ("apiKey" | "bearer")[];
|
|
27
|
+
/**
|
|
28
|
+
* Get the base URL for the request
|
|
29
|
+
*/
|
|
30
|
+
protected getBaseUrl(): string;
|
|
31
|
+
/**
|
|
32
|
+
* Get the method
|
|
33
|
+
*/
|
|
34
|
+
protected getMethod(): string;
|
|
35
|
+
/**
|
|
36
|
+
* Get the path for the request
|
|
37
|
+
*/
|
|
38
|
+
protected getPath(): string;
|
|
39
|
+
/**
|
|
40
|
+
* Get the body for the request
|
|
41
|
+
*/
|
|
42
|
+
protected getBody(): Record<string, unknown>;
|
|
43
|
+
/**
|
|
44
|
+
* Parse the response
|
|
45
|
+
*/
|
|
46
|
+
protected parseResponse(rawResponse: unknown): UserInviteToTenantOutput;
|
|
47
|
+
}
|
|
48
|
+
export {};
|
|
49
|
+
//# sourceMappingURL=user.invite-to-tenant.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"user.invite-to-tenant.d.ts","sourceRoot":"","sources":["../../../src/commands/user/user.invite-to-tenant.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,OAAO,EAAE,MAAM,yBAAyB,CAAA;AAEjD,OAAO,KAAK,EAAE,MAAM,EAAE,QAAQ,EAAE,OAAO,EAAE,OAAO,EAAE,MAAM,mBAAmB,CAAA;AAE3E;;GAEG;AACH,MAAM,WAAW,uBAAuB;IACtC,UAAU,EAAE,MAAM,CAAA;IAClB,SAAS,EAAE,MAAM,CAAA;CAClB;AAED;;GAEG;AACH,MAAM,MAAM,wBAAwB,GAAG,MAAM,CAAC,OAAO,cAAc,CAAC,CAAA;AAEpE,QAAA,MAAM,cAAc,EAAE,OAAO,CAAC;IAC5B,OAAO,EAAE,QAAQ,CAAA;IACjB,UAAU,EAAE,OAAO,CAAA;IACnB,YAAY,EAAE,OAAO,CAAA;CACtB,CAIC,CAAA;AAEF;;GAEG;AACH,qBAAa,yBAA0B,SAAQ,OAAO,CACpD,uBAAuB,EACvB,wBAAwB,CACzB;IACC;;OAEG;IACH,UAAmB,YAAY,EAAE,CAAC,QAAQ,GAAG,QAAQ,CAAC,EAAE,CAAa;IAErE;;OAEG;cACgB,UAAU,IAAI,MAAM;IAIvC;;OAEG;cACgB,SAAS,IAAI,MAAM;IAItC;;OAEG;cACgB,OAAO,IAAI,MAAM;IAIpC;;OAEG;cACgB,OAAO,IAAI,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC;IAOrD;;OAEG;cACgB,aAAa,CAAC,WAAW,EAAE,OAAO,GAAG,wBAAwB;CAIjF"}
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
import { Type } from "@sinclair/typebox";
|
|
2
|
+
import { Command } from "../../common/command.js";
|
|
3
|
+
import { parseResponseHelper } from "../../utils/parse-response-helper.js";
|
|
4
|
+
const responseSchema = Type.Object({
|
|
5
|
+
success: Type.Boolean(),
|
|
6
|
+
tenantName: Type.String(),
|
|
7
|
+
invitedEmail: Type.String(),
|
|
8
|
+
});
|
|
9
|
+
/**
|
|
10
|
+
* Invite an existing user (by email) to a tenant
|
|
11
|
+
*/
|
|
12
|
+
export class UserInviteToTenantCommand extends Command {
|
|
13
|
+
/**
|
|
14
|
+
* The allowed modes for the command
|
|
15
|
+
*/
|
|
16
|
+
allowedModes = ["bearer"];
|
|
17
|
+
/**
|
|
18
|
+
* Get the base URL for the request
|
|
19
|
+
*/
|
|
20
|
+
getBaseUrl() {
|
|
21
|
+
return "https://user-2.api.flowcore.io";
|
|
22
|
+
}
|
|
23
|
+
/**
|
|
24
|
+
* Get the method
|
|
25
|
+
*/
|
|
26
|
+
getMethod() {
|
|
27
|
+
return "POST";
|
|
28
|
+
}
|
|
29
|
+
/**
|
|
30
|
+
* Get the path for the request
|
|
31
|
+
*/
|
|
32
|
+
getPath() {
|
|
33
|
+
return "/api/users/invitations";
|
|
34
|
+
}
|
|
35
|
+
/**
|
|
36
|
+
* Get the body for the request
|
|
37
|
+
*/
|
|
38
|
+
getBody() {
|
|
39
|
+
return {
|
|
40
|
+
tenantName: this.input.tenantName,
|
|
41
|
+
userEmail: this.input.userEmail,
|
|
42
|
+
};
|
|
43
|
+
}
|
|
44
|
+
/**
|
|
45
|
+
* Parse the response
|
|
46
|
+
*/
|
|
47
|
+
parseResponse(rawResponse) {
|
|
48
|
+
const response = parseResponseHelper(responseSchema, rawResponse);
|
|
49
|
+
return response;
|
|
50
|
+
}
|
|
51
|
+
}
|
package/package.json
CHANGED
|
@@ -62,6 +62,8 @@ export * from "./security/pat.get.js";
|
|
|
62
62
|
export * from "./security/pat.list.js";
|
|
63
63
|
export * from "./security/permissions.list.js";
|
|
64
64
|
export * from "./user/user.initialize-in-keycloak.js";
|
|
65
|
+
export * from "./user/user.delete.js";
|
|
66
|
+
export * from "./user/user.invite-to-tenant.js";
|
|
65
67
|
export * from "./scenario/scenario.create.js";
|
|
66
68
|
export * from "./scenario/scenario.delete.js";
|
|
67
69
|
export * from "./scenario/scenario.fetch.js";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/commands/index.ts"],"names":[],"mappings":"AACA,cAAc,2CAA2C,CAAA;AACzD,cAAc,0CAA0C,CAAA;AACxD,cAAc,2BAA2B,CAAA;AACzC,cAAc,0BAA0B,CAAA;AACxC,cAAc,yBAAyB,CAAA;AACvC,cAAc,2BAA2B,CAAA;AACzC,cAAc,6BAA6B,CAAA;AAC3C,cAAc,gCAAgC,CAAA;AAC9C,cAAc,8BAA8B,CAAA;AAC5C,cAAc,yCAAyC,CAAA;AACvD,cAAc,4BAA4B,CAAA;AA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cAAc,iCAAiC,CAAA;AAC/C,cAAc,oCAAoC,CAAA;AAElD,cAAc,+CAA+C,CAAA;AAC7D,cAAc,wDAAwD,CAAA;AACtE,cAAc,sDAAsD,CAAA;AACpE,cAAc,gDAAgD,CAAA;AAC9D,cAAc,gDAAgD,CAAA;AAC9D,cAAc,8CAA8C,CAAA;AAC5D,cAAc,+CAA+C,CAAA;AAC7D,cAAc,+CAA+C,CAAA;AAC7D,cAAc,gDAAgD,CAAA;AAC9D,cAAc,iDAAiD,CAAA;AAC/D,cAAc,iDAAiD,CAAA;AAE/D,cAAc,0CAA0C,CAAA;AACxD,cAAc,mDAAmD,CAAA;AACjE,cAAc,kDAAkD,CAAA;AAChE,cAAc,2CAA2C,CAAA;AACzD,cAAc,0CAA0C,CAAA;AACxD,cAAc,2CAA2C,CAAA;AACzD,cAAc,4CAA4C,CAAA;AAC1D,cAAc,6CAA6C,CAAA;AAE3D,cAAc,4BAA4B,CAAA;AAC1C,cAAc,0BAA0B,CAAA;AACxC,cAAc,gCAAgC,CAAA;AAC9C,cAAc,4BAA4B,CAAA;AAC1C,cAAc,+BAA+B,CAAA;AAE7C,cAAc,gDAAgD,CAAA;AAE9D,cAAc,gCAAgC,CAAA;AAC9C,cAAc,iCAAiC,CAAA"}
|
package/script/commands/index.js
CHANGED
|
@@ -91,6 +91,8 @@ __exportStar(require("./security/pat.list.js"), exports);
|
|
|
91
91
|
__exportStar(require("./security/permissions.list.js"), exports);
|
|
92
92
|
// User
|
|
93
93
|
__exportStar(require("./user/user.initialize-in-keycloak.js"), exports);
|
|
94
|
+
__exportStar(require("./user/user.delete.js"), exports);
|
|
95
|
+
__exportStar(require("./user/user.invite-to-tenant.js"), exports);
|
|
94
96
|
// Scenario
|
|
95
97
|
__exportStar(require("./scenario/scenario.create.js"), exports);
|
|
96
98
|
__exportStar(require("./scenario/scenario.delete.js"), exports);
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
import { Command } from "../../common/command.js";
|
|
2
|
+
import type { Static, TObject, TString } from "@sinclair/typebox";
|
|
3
|
+
/**
|
|
4
|
+
* The input for deleting the current authenticated user
|
|
5
|
+
* No input parameters needed - checks current authenticated user
|
|
6
|
+
*/
|
|
7
|
+
export type UserDeleteInput = Record<PropertyKey, never>;
|
|
8
|
+
/**
|
|
9
|
+
* The output for deleting the current authenticated user
|
|
10
|
+
*/
|
|
11
|
+
export type UserDeleteOutput = Static<typeof responseSchema>;
|
|
12
|
+
declare const responseSchema: TObject<{
|
|
13
|
+
id: TString;
|
|
14
|
+
}>;
|
|
15
|
+
/**
|
|
16
|
+
* Delete current authenticated user
|
|
17
|
+
*/
|
|
18
|
+
export declare class UserDeleteCommand extends Command<UserDeleteInput, UserDeleteOutput> {
|
|
19
|
+
/**
|
|
20
|
+
* The allowed modes for the command
|
|
21
|
+
*/
|
|
22
|
+
protected allowedModes: ("apiKey" | "bearer")[];
|
|
23
|
+
/**
|
|
24
|
+
* Get the base URL for the request
|
|
25
|
+
*/
|
|
26
|
+
protected getBaseUrl(): string;
|
|
27
|
+
/**
|
|
28
|
+
* Get the method
|
|
29
|
+
*/
|
|
30
|
+
protected getMethod(): string;
|
|
31
|
+
/**
|
|
32
|
+
* Get the path for the request
|
|
33
|
+
*/
|
|
34
|
+
protected getPath(): string;
|
|
35
|
+
/**
|
|
36
|
+
* Parse the response
|
|
37
|
+
*/
|
|
38
|
+
protected parseResponse(rawResponse: unknown): UserDeleteOutput;
|
|
39
|
+
}
|
|
40
|
+
export {};
|
|
41
|
+
//# sourceMappingURL=user.delete.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"user.delete.d.ts","sourceRoot":"","sources":["../../../src/commands/user/user.delete.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,OAAO,EAAE,MAAM,yBAAyB,CAAA;AAEjD,OAAO,KAAK,EAAE,MAAM,EAAE,OAAO,EAAE,OAAO,EAAE,MAAM,mBAAmB,CAAA;AAEjE;;;GAGG;AACH,MAAM,MAAM,eAAe,GAAG,MAAM,CAAC,WAAW,EAAE,KAAK,CAAC,CAAA;AAExD;;GAEG;AACH,MAAM,MAAM,gBAAgB,GAAG,MAAM,CAAC,OAAO,cAAc,CAAC,CAAA;AAE5D,QAAA,MAAM,cAAc,EAAE,OAAO,CAAC;IAC5B,EAAE,EAAE,OAAO,CAAA;CACZ,CAEC,CAAA;AAEF;;GAEG;AACH,qBAAa,iBAAkB,SAAQ,OAAO,CAC5C,eAAe,EACf,gBAAgB,CACjB;IACC;;OAEG;IACH,UAAmB,YAAY,EAAE,CAAC,QAAQ,GAAG,QAAQ,CAAC,EAAE,CAAa;IAErE;;OAEG;cACgB,UAAU,IAAI,MAAM;IAIvC;;OAEG;cACgB,SAAS,IAAI,MAAM;IAItC;;OAEG;cACgB,OAAO,IAAI,MAAM;IAIpC;;OAEG;cACgB,aAAa,CAAC,WAAW,EAAE,OAAO,GAAG,gBAAgB;CAIzE"}
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.UserDeleteCommand = 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
|
+
const responseSchema = typebox_1.Type.Object({
|
|
8
|
+
id: typebox_1.Type.String(),
|
|
9
|
+
});
|
|
10
|
+
/**
|
|
11
|
+
* Delete current authenticated user
|
|
12
|
+
*/
|
|
13
|
+
class UserDeleteCommand extends command_js_1.Command {
|
|
14
|
+
/**
|
|
15
|
+
* The allowed modes for the command
|
|
16
|
+
*/
|
|
17
|
+
allowedModes = ["bearer"];
|
|
18
|
+
/**
|
|
19
|
+
* Get the base URL for the request
|
|
20
|
+
*/
|
|
21
|
+
getBaseUrl() {
|
|
22
|
+
return "https://user-2.api.flowcore.io";
|
|
23
|
+
}
|
|
24
|
+
/**
|
|
25
|
+
* Get the method
|
|
26
|
+
*/
|
|
27
|
+
getMethod() {
|
|
28
|
+
return "DELETE";
|
|
29
|
+
}
|
|
30
|
+
/**
|
|
31
|
+
* Get the path for the request
|
|
32
|
+
*/
|
|
33
|
+
getPath() {
|
|
34
|
+
return `/api/users`;
|
|
35
|
+
}
|
|
36
|
+
/**
|
|
37
|
+
* Parse the response
|
|
38
|
+
*/
|
|
39
|
+
parseResponse(rawResponse) {
|
|
40
|
+
const response = (0, parse_response_helper_js_1.parseResponseHelper)(responseSchema, rawResponse);
|
|
41
|
+
return response;
|
|
42
|
+
}
|
|
43
|
+
}
|
|
44
|
+
exports.UserDeleteCommand = UserDeleteCommand;
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
import { Command } from "../../common/command.js";
|
|
2
|
+
import type { Static, TBoolean, TObject, TString } from "@sinclair/typebox";
|
|
3
|
+
/**
|
|
4
|
+
* The input for inviting an existing user to a tenant
|
|
5
|
+
*/
|
|
6
|
+
export interface UserInviteToTenantInput {
|
|
7
|
+
tenantName: string;
|
|
8
|
+
userEmail: string;
|
|
9
|
+
}
|
|
10
|
+
/**
|
|
11
|
+
* The output for inviting an existing user to a tenant
|
|
12
|
+
*/
|
|
13
|
+
export type UserInviteToTenantOutput = Static<typeof responseSchema>;
|
|
14
|
+
declare const responseSchema: TObject<{
|
|
15
|
+
success: TBoolean;
|
|
16
|
+
tenantName: TString;
|
|
17
|
+
invitedEmail: TString;
|
|
18
|
+
}>;
|
|
19
|
+
/**
|
|
20
|
+
* Invite an existing user (by email) to a tenant
|
|
21
|
+
*/
|
|
22
|
+
export declare class UserInviteToTenantCommand extends Command<UserInviteToTenantInput, UserInviteToTenantOutput> {
|
|
23
|
+
/**
|
|
24
|
+
* The allowed modes for the command
|
|
25
|
+
*/
|
|
26
|
+
protected allowedModes: ("apiKey" | "bearer")[];
|
|
27
|
+
/**
|
|
28
|
+
* Get the base URL for the request
|
|
29
|
+
*/
|
|
30
|
+
protected getBaseUrl(): string;
|
|
31
|
+
/**
|
|
32
|
+
* Get the method
|
|
33
|
+
*/
|
|
34
|
+
protected getMethod(): string;
|
|
35
|
+
/**
|
|
36
|
+
* Get the path for the request
|
|
37
|
+
*/
|
|
38
|
+
protected getPath(): string;
|
|
39
|
+
/**
|
|
40
|
+
* Get the body for the request
|
|
41
|
+
*/
|
|
42
|
+
protected getBody(): Record<string, unknown>;
|
|
43
|
+
/**
|
|
44
|
+
* Parse the response
|
|
45
|
+
*/
|
|
46
|
+
protected parseResponse(rawResponse: unknown): UserInviteToTenantOutput;
|
|
47
|
+
}
|
|
48
|
+
export {};
|
|
49
|
+
//# sourceMappingURL=user.invite-to-tenant.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"user.invite-to-tenant.d.ts","sourceRoot":"","sources":["../../../src/commands/user/user.invite-to-tenant.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,OAAO,EAAE,MAAM,yBAAyB,CAAA;AAEjD,OAAO,KAAK,EAAE,MAAM,EAAE,QAAQ,EAAE,OAAO,EAAE,OAAO,EAAE,MAAM,mBAAmB,CAAA;AAE3E;;GAEG;AACH,MAAM,WAAW,uBAAuB;IACtC,UAAU,EAAE,MAAM,CAAA;IAClB,SAAS,EAAE,MAAM,CAAA;CAClB;AAED;;GAEG;AACH,MAAM,MAAM,wBAAwB,GAAG,MAAM,CAAC,OAAO,cAAc,CAAC,CAAA;AAEpE,QAAA,MAAM,cAAc,EAAE,OAAO,CAAC;IAC5B,OAAO,EAAE,QAAQ,CAAA;IACjB,UAAU,EAAE,OAAO,CAAA;IACnB,YAAY,EAAE,OAAO,CAAA;CACtB,CAIC,CAAA;AAEF;;GAEG;AACH,qBAAa,yBAA0B,SAAQ,OAAO,CACpD,uBAAuB,EACvB,wBAAwB,CACzB;IACC;;OAEG;IACH,UAAmB,YAAY,EAAE,CAAC,QAAQ,GAAG,QAAQ,CAAC,EAAE,CAAa;IAErE;;OAEG;cACgB,UAAU,IAAI,MAAM;IAIvC;;OAEG;cACgB,SAAS,IAAI,MAAM;IAItC;;OAEG;cACgB,OAAO,IAAI,MAAM;IAIpC;;OAEG;cACgB,OAAO,IAAI,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC;IAOrD;;OAEG;cACgB,aAAa,CAAC,WAAW,EAAE,OAAO,GAAG,wBAAwB;CAIjF"}
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.UserInviteToTenantCommand = 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
|
+
const responseSchema = typebox_1.Type.Object({
|
|
8
|
+
success: typebox_1.Type.Boolean(),
|
|
9
|
+
tenantName: typebox_1.Type.String(),
|
|
10
|
+
invitedEmail: typebox_1.Type.String(),
|
|
11
|
+
});
|
|
12
|
+
/**
|
|
13
|
+
* Invite an existing user (by email) to a tenant
|
|
14
|
+
*/
|
|
15
|
+
class UserInviteToTenantCommand extends command_js_1.Command {
|
|
16
|
+
/**
|
|
17
|
+
* The allowed modes for the command
|
|
18
|
+
*/
|
|
19
|
+
allowedModes = ["bearer"];
|
|
20
|
+
/**
|
|
21
|
+
* Get the base URL for the request
|
|
22
|
+
*/
|
|
23
|
+
getBaseUrl() {
|
|
24
|
+
return "https://user-2.api.flowcore.io";
|
|
25
|
+
}
|
|
26
|
+
/**
|
|
27
|
+
* Get the method
|
|
28
|
+
*/
|
|
29
|
+
getMethod() {
|
|
30
|
+
return "POST";
|
|
31
|
+
}
|
|
32
|
+
/**
|
|
33
|
+
* Get the path for the request
|
|
34
|
+
*/
|
|
35
|
+
getPath() {
|
|
36
|
+
return "/api/users/invitations";
|
|
37
|
+
}
|
|
38
|
+
/**
|
|
39
|
+
* Get the body for the request
|
|
40
|
+
*/
|
|
41
|
+
getBody() {
|
|
42
|
+
return {
|
|
43
|
+
tenantName: this.input.tenantName,
|
|
44
|
+
userEmail: this.input.userEmail,
|
|
45
|
+
};
|
|
46
|
+
}
|
|
47
|
+
/**
|
|
48
|
+
* Parse the response
|
|
49
|
+
*/
|
|
50
|
+
parseResponse(rawResponse) {
|
|
51
|
+
const response = (0, parse_response_helper_js_1.parseResponseHelper)(responseSchema, rawResponse);
|
|
52
|
+
return response;
|
|
53
|
+
}
|
|
54
|
+
}
|
|
55
|
+
exports.UserInviteToTenantCommand = UserInviteToTenantCommand;
|