@api-client/core 0.12.12 → 0.12.13
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/build/src/mocking/lib/User.d.ts +2 -0
- package/build/src/mocking/lib/User.d.ts.map +1 -1
- package/build/src/mocking/lib/User.js +6 -0
- package/build/src/mocking/lib/User.js.map +1 -1
- package/build/src/models/store/User.d.ts +23 -2
- package/build/src/models/store/User.d.ts.map +1 -1
- package/build/src/models/store/User.js.map +1 -1
- package/build/src/runtime/store/OrganizationsSdk.d.ts +101 -70
- package/build/src/runtime/store/OrganizationsSdk.d.ts.map +1 -1
- package/build/src/runtime/store/OrganizationsSdk.js +358 -275
- package/build/src/runtime/store/OrganizationsSdk.js.map +1 -1
- package/build/src/runtime/store/RouteBuilder.d.ts +3 -0
- package/build/src/runtime/store/RouteBuilder.d.ts.map +1 -1
- package/build/src/runtime/store/RouteBuilder.js +9 -0
- package/build/src/runtime/store/RouteBuilder.js.map +1 -1
- package/package.json +1 -1
- package/src/mocking/lib/User.ts +6 -0
- package/src/models/store/User.ts +23 -2
- package/src/runtime/store/OrganizationsSdk.ts +359 -275
- package/src/runtime/store/RouteBuilder.ts +12 -0
- package/tests/unit/mocking/current/User.spec.ts +1 -1
- package/tests/unit/models/File/setDeleted.spec.ts +6 -0
- package/tests/unit/models/File/setLastModified.spec.ts +6 -0
|
@@ -4,6 +4,7 @@ import { Person } from '@pawel-up/data-mock/Person.js';
|
|
|
4
4
|
import { Internet } from '@pawel-up/data-mock/Internet.js';
|
|
5
5
|
import { Random } from '@pawel-up/data-mock/Random.js';
|
|
6
6
|
import { IUser } from '../../models/store/User.js';
|
|
7
|
+
import { Time } from '@pawel-up/data-mock/Time.js';
|
|
7
8
|
export interface IUserInit {
|
|
8
9
|
noEmail?: boolean;
|
|
9
10
|
noPicture?: boolean;
|
|
@@ -14,6 +15,7 @@ export declare class User {
|
|
|
14
15
|
types: Types;
|
|
15
16
|
internet: Internet;
|
|
16
17
|
random: Random;
|
|
18
|
+
time: Time;
|
|
17
19
|
constructor(init?: IDataMockInit);
|
|
18
20
|
user(init?: IUserInit): IUser;
|
|
19
21
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"User.d.ts","sourceRoot":"","sources":["../../../../src/mocking/lib/User.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,8BAA8B,CAAA;AACjE,OAAO,EAAE,KAAK,EAAE,MAAM,8BAA8B,CAAA;AACpD,OAAO,EAAE,MAAM,EAAE,MAAM,+BAA+B,CAAA;AACtD,OAAO,EAAE,QAAQ,EAAE,MAAM,iCAAiC,CAAA;AAC1D,OAAO,EAAE,MAAM,EAAE,MAAM,+BAA+B,CAAA;AACtD,OAAO,EAAE,KAAK,EAAoB,MAAM,4BAA4B,CAAA;
|
|
1
|
+
{"version":3,"file":"User.d.ts","sourceRoot":"","sources":["../../../../src/mocking/lib/User.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,8BAA8B,CAAA;AACjE,OAAO,EAAE,KAAK,EAAE,MAAM,8BAA8B,CAAA;AACpD,OAAO,EAAE,MAAM,EAAE,MAAM,+BAA+B,CAAA;AACtD,OAAO,EAAE,QAAQ,EAAE,MAAM,iCAAiC,CAAA;AAC1D,OAAO,EAAE,MAAM,EAAE,MAAM,+BAA+B,CAAA;AACtD,OAAO,EAAE,KAAK,EAAoB,MAAM,4BAA4B,CAAA;AACpE,OAAO,EAAE,IAAI,EAAE,MAAM,6BAA6B,CAAA;AAElD,MAAM,WAAW,SAAS;IACxB,OAAO,CAAC,EAAE,OAAO,CAAA;IACjB,SAAS,CAAC,EAAE,OAAO,CAAA;IACnB,UAAU,CAAC,EAAE,OAAO,CAAA;CACrB;AAED,qBAAa,IAAI;IACf,MAAM,EAAE,MAAM,CAAA;IACd,KAAK,EAAE,KAAK,CAAA;IACZ,QAAQ,EAAE,QAAQ,CAAA;IAClB,MAAM,EAAE,MAAM,CAAA;IACd,IAAI,EAAE,IAAI,CAAA;gBAEE,IAAI,GAAE,aAAkB;IAQpC,IAAI,CAAC,IAAI,GAAE,SAAc,GAAG,KAAK;CA8BlC"}
|
|
@@ -3,16 +3,19 @@ import { Person } from '@pawel-up/data-mock/Person.js';
|
|
|
3
3
|
import { Internet } from '@pawel-up/data-mock/Internet.js';
|
|
4
4
|
import { Random } from '@pawel-up/data-mock/Random.js';
|
|
5
5
|
import { Kind as UserKind } from '../../models/store/User.js';
|
|
6
|
+
import { Time } from '@pawel-up/data-mock/Time.js';
|
|
6
7
|
export class User {
|
|
7
8
|
person;
|
|
8
9
|
types;
|
|
9
10
|
internet;
|
|
10
11
|
random;
|
|
12
|
+
time;
|
|
11
13
|
constructor(init = {}) {
|
|
12
14
|
this.person = new Person(init);
|
|
13
15
|
this.types = new Types(init.seed);
|
|
14
16
|
this.internet = new Internet(init);
|
|
15
17
|
this.random = new Random(init.seed);
|
|
18
|
+
this.time = new Time(init);
|
|
16
19
|
}
|
|
17
20
|
user(init = {}) {
|
|
18
21
|
const result = {
|
|
@@ -20,6 +23,9 @@ export class User {
|
|
|
20
23
|
key: this.types.string(21),
|
|
21
24
|
name: this.person.name(),
|
|
22
25
|
status: this.random.pickOne(['active', 'deleted', 'suspended', 'pending']),
|
|
26
|
+
email: [],
|
|
27
|
+
created: this.time.timestamp(),
|
|
28
|
+
updated: this.time.timestamp(),
|
|
23
29
|
};
|
|
24
30
|
if (!init.noEmail) {
|
|
25
31
|
result.email = [
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"User.js","sourceRoot":"","sources":["../../../../src/mocking/lib/User.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,KAAK,EAAE,MAAM,8BAA8B,CAAA;AACpD,OAAO,EAAE,MAAM,EAAE,MAAM,+BAA+B,CAAA;AACtD,OAAO,EAAE,QAAQ,EAAE,MAAM,iCAAiC,CAAA;AAC1D,OAAO,EAAE,MAAM,EAAE,MAA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C,OAAO,CAAC,CAAC,QAAQ,EAAE,SAAS,EAAE,WAAW,EAAE,SAAS,CAAC,CAAC;YAC1E,KAAK,EAAE,EAAE;YACT,OAAO,EAAE,IAAI,CAAC,IAAI,CAAC,SAAS,EAAE;YAC9B,OAAO,EAAE,IAAI,CAAC,IAAI,CAAC,SAAS,EAAE;SAC/B,CAAA;QACD,IAAI,CAAC,IAAI,CAAC,OAAO,EAAE,CAAC;YAClB,MAAM,CAAC,KAAK,GAAG;gBACb;oBACE,KAAK,EAAE,IAAI,CAAC,QAAQ,CAAC,KAAK,EAAE;oBAC5B,QAAQ,EAAE,IAAI,CAAC,KAAK,CAAC,OAAO,EAAE;iBAC/B;aACF,CAAA;QACH,CAAC;QACD,IAAI,CAAC,IAAI,CAAC,SAAS,EAAE,CAAC;YACpB,MAAM,CAAC,OAAO,GAAG;gBACf,GAAG,EAAE,IAAI,CAAC,QAAQ,CAAC,MAAM,EAAE;aAC5B,CAAA;QACH,CAAC;QACD,IAAI,CAAC,IAAI,CAAC,UAAU,EAAE,CAAC;YACrB,MAAM,CAAC,QAAQ,GAAG;gBAChB,YAAY,EAAE,IAAI,CAAC,KAAK,CAAC,MAAM,CAAC,EAAE,CAAC;aACpC,CAAA;QACH,CAAC;QACD,OAAO,MAAM,CAAA;IACf,CAAC;CACF","sourcesContent":["import type { IDataMockInit } from '@pawel-up/data-mock/types.js'\nimport { Types } from '@pawel-up/data-mock/Types.js'\nimport { Person } from '@pawel-up/data-mock/Person.js'\nimport { Internet } from '@pawel-up/data-mock/Internet.js'\nimport { Random } from '@pawel-up/data-mock/Random.js'\nimport { IUser, Kind as UserKind } from '../../models/store/User.js'\nimport { Time } from '@pawel-up/data-mock/Time.js'\n\nexport interface IUserInit {\n noEmail?: boolean\n noPicture?: boolean\n noProvider?: boolean\n}\n\nexport class User {\n person: Person\n types: Types\n internet: Internet\n random: Random\n time: Time\n\n constructor(init: IDataMockInit = {}) {\n this.person = new Person(init)\n this.types = new Types(init.seed)\n this.internet = new Internet(init)\n this.random = new Random(init.seed)\n this.time = new Time(init)\n }\n\n user(init: IUserInit = {}): IUser {\n const result: IUser = {\n kind: UserKind,\n key: this.types.string(21),\n name: this.person.name(),\n status: this.random.pickOne(['active', 'deleted', 'suspended', 'pending']),\n email: [],\n created: this.time.timestamp(),\n updated: this.time.timestamp(),\n }\n if (!init.noEmail) {\n result.email = [\n {\n email: this.internet.email(),\n verified: this.types.boolean(),\n },\n ]\n }\n if (!init.noPicture) {\n result.picture = {\n url: this.internet.avatar(),\n }\n }\n if (!init.noProvider) {\n result.provider = {\n refreshToken: this.types.string(21),\n }\n }\n return result\n }\n}\n"]}
|
|
@@ -1,9 +1,10 @@
|
|
|
1
|
+
import type { IDeletion } from './Deletion.js';
|
|
1
2
|
import type { UserOrganizationGrantType } from './Organization.js';
|
|
2
3
|
export interface IEmail {
|
|
3
4
|
/**
|
|
4
5
|
* When available the email of the user.
|
|
5
6
|
*/
|
|
6
|
-
email
|
|
7
|
+
email: string;
|
|
7
8
|
/**
|
|
8
9
|
* Whether the `email` was verified.
|
|
9
10
|
* Not verified emails should have limited use in the system.
|
|
@@ -43,7 +44,7 @@ export interface IUser {
|
|
|
43
44
|
/**
|
|
44
45
|
* When available the email of the user.
|
|
45
46
|
*/
|
|
46
|
-
email
|
|
47
|
+
email: IEmail[];
|
|
47
48
|
/**
|
|
48
49
|
* The user picture to render.
|
|
49
50
|
*/
|
|
@@ -67,10 +68,12 @@ export interface IUser {
|
|
|
67
68
|
deleted?: boolean;
|
|
68
69
|
/**
|
|
69
70
|
* The timestamp of when the user was deleted.
|
|
71
|
+
* @deprecated
|
|
70
72
|
*/
|
|
71
73
|
deletedTime?: number;
|
|
72
74
|
/**
|
|
73
75
|
* The id of the user that deleted the user.
|
|
76
|
+
* @deprecated
|
|
74
77
|
*/
|
|
75
78
|
deletingUser?: string;
|
|
76
79
|
/**
|
|
@@ -84,5 +87,23 @@ export interface IUser {
|
|
|
84
87
|
* This is used to determine the user's role in the organization.
|
|
85
88
|
*/
|
|
86
89
|
grantType?: UserOrganizationGrantType;
|
|
90
|
+
/**
|
|
91
|
+
* Populated when the user object is considered in the context of an organization.
|
|
92
|
+
* The timestamp of when the user joined the organization.
|
|
93
|
+
*/
|
|
94
|
+
joined?: number;
|
|
95
|
+
/**
|
|
96
|
+
* The timestamp of when the user was created.
|
|
97
|
+
*/
|
|
98
|
+
created: number;
|
|
99
|
+
/**
|
|
100
|
+
* The timestamp of when the user was last updated.
|
|
101
|
+
*/
|
|
102
|
+
updated: number;
|
|
103
|
+
/**
|
|
104
|
+
* The information about the delete information.
|
|
105
|
+
* Always set when the `delete` is true.
|
|
106
|
+
*/
|
|
107
|
+
deletedInfo?: IDeletion;
|
|
87
108
|
}
|
|
88
109
|
//# sourceMappingURL=User.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"User.d.ts","sourceRoot":"","sources":["../../../../src/models/store/User.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,yBAAyB,EAAE,MAAM,mBAAmB,CAAA;AAElE,MAAM,WAAW,MAAM;IACrB;;OAEG;IACH,KAAK,
|
|
1
|
+
{"version":3,"file":"User.d.ts","sourceRoot":"","sources":["../../../../src/models/store/User.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,eAAe,CAAA;AAC9C,OAAO,KAAK,EAAE,yBAAyB,EAAE,MAAM,mBAAmB,CAAA;AAElE,MAAM,WAAW,MAAM;IACrB;;OAEG;IACH,KAAK,EAAE,MAAM,CAAA;IACb;;;OAGG;IACH,QAAQ,CAAC,EAAE,OAAO,CAAA;CACnB;AAED,MAAM,WAAW,YAAY;IAC3B;;OAEG;IACH,GAAG,CAAC,EAAE,MAAM,CAAA;IACZ;;OAEG;IACH,IAAI,CAAC,EAAE,MAAM,CAAA;CACd;AAED,eAAO,MAAM,IAAI,cAAc,CAAA;AAE/B,MAAM,MAAM,UAAU,GAAG,QAAQ,GAAG,SAAS,GAAG,WAAW,GAAG,SAAS,CAAA;AAEvE;;;;;;;GAOG;AACH,MAAM,WAAW,KAAK;IACpB,IAAI,EAAE,OAAO,IAAI,CAAA;IACjB;;OAEG;IACH,GAAG,EAAE,MAAM,CAAA;IACX;;OAEG;IACH,IAAI,EAAE,MAAM,CAAA;IACZ;;OAEG;IACH,KAAK,EAAE,MAAM,EAAE,CAAA;IACf;;OAEG;IACH,OAAO,CAAC,EAAE,YAAY,CAAA;IACtB;;OAEG;IACH,IAAI,CAAC,EAAE,MAAM,EAAE,CAAA;IACf;;OAEG;IACH,MAAM,CAAC,EAAE,MAAM,CAAA;IACf;;OAEG;IACH,QAAQ,CAAC,EAAE,OAAO,CAAA;IAClB;;;OAGG;IACH,OAAO,CAAC,EAAE,OAAO,CAAA;IACjB;;;OAGG;IACH,WAAW,CAAC,EAAE,MAAM,CAAA;IACpB;;;OAGG;IACH,YAAY,CAAC,EAAE,MAAM,CAAA;IACrB;;;;OAIG;IACH,MAAM,CAAC,EAAE,UAAU,CAAA;IACnB;;;OAGG;IACH,SAAS,CAAC,EAAE,yBAAyB,CAAA;IACrC;;;OAGG;IACH,MAAM,CAAC,EAAE,MAAM,CAAA;IACf;;OAEG;IACH,OAAO,EAAE,MAAM,CAAA;IACf;;OAEG;IACH,OAAO,EAAE,MAAM,CAAA;IACf;;;OAGG;IACH,WAAW,CAAC,EAAE,SAAS,CAAA;CACxB"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"User.js","sourceRoot":"","sources":["../../../../src/models/store/User.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"User.js","sourceRoot":"","sources":["../../../../src/models/store/User.ts"],"names":[],"mappings":"AA0BA,MAAM,CAAC,MAAM,IAAI,GAAG,WAAW,CAAA","sourcesContent":["import type { IDeletion } from './Deletion.js'\nimport type { UserOrganizationGrantType } from './Organization.js'\n\nexport interface IEmail {\n /**\n * When available the email of the user.\n */\n email: string\n /**\n * Whether the `email` was verified.\n * Not verified emails should have limited use in the system.\n */\n verified?: boolean\n}\n\nexport interface IUserPicture {\n /**\n * When available, the URL to the user's picture image.\n */\n url?: string\n /**\n * Alternative to the `url`. When set it is a data URL value of the image.\n */\n data?: string\n}\n\nexport const Kind = 'Core#User'\n\nexport type UserStatus = 'active' | 'deleted' | 'suspended' | 'pending'\n\n/**\n * Represents a user in the system.\n * This can be embedded in various situations like project's revision history,\n * ACL, Authorization, etc.\n *\n * Note, the store implementation may have additional fields that support external\n * identity providers. However, this is not exposed to the user through the API.\n */\nexport interface IUser {\n kind: typeof Kind\n /**\n * The data store key of the user.\n */\n key: string\n /**\n * The display name of the user.\n */\n name: string\n /**\n * When available the email of the user.\n */\n email: IEmail[]\n /**\n * The user picture to render.\n */\n picture?: IUserPicture\n /**\n * A general purpose tags field.\n */\n tags?: string[]\n /**\n * Optional user locale information.\n */\n locale?: string\n /**\n * Optional metadata related to the auth provider.\n */\n provider?: unknown\n /**\n * Whether the user is deleted from the system.\n * @deprecated Use `status` instead.\n */\n deleted?: boolean\n /**\n * The timestamp of when the user was deleted.\n * @deprecated\n */\n deletedTime?: number\n /**\n * The id of the user that deleted the user.\n * @deprecated\n */\n deletingUser?: string\n /**\n * The status of the user.\n * May not be populated in all cases.\n * @default 'active'\n */\n status?: UserStatus\n /**\n * Populated when the user object is considered in the context of an organization.\n * This is used to determine the user's role in the organization.\n */\n grantType?: UserOrganizationGrantType\n /**\n * Populated when the user object is considered in the context of an organization.\n * The timestamp of when the user joined the organization.\n */\n joined?: number\n /**\n * The timestamp of when the user was created.\n */\n created: number\n /**\n * The timestamp of when the user was last updated.\n */\n updated: number\n /**\n * The information about the delete information.\n * Always set when the `delete` is true.\n */\n deletedInfo?: IDeletion\n}\n"]}
|
|
@@ -9,78 +9,109 @@ export declare class OrganizationsSdk extends SdkBase {
|
|
|
9
9
|
* Lists all user organizations.
|
|
10
10
|
*/
|
|
11
11
|
list(request?: SdkOptions): Promise<ContextListResult<IOrganization>>;
|
|
12
|
-
create(orgName: string, request?: SdkOptions): Promise<IOrganization>;
|
|
13
|
-
/**
|
|
14
|
-
* Lists all invitations for a given organization.
|
|
15
|
-
* @param oid The organization ID.
|
|
16
|
-
* @param request The request options.
|
|
17
|
-
* @returns A promise that resolves to a list of invitations.
|
|
18
|
-
*/
|
|
19
|
-
listInvitations(oid: string, request?: SdkOptions): Promise<ContextListResult<InvitationSchema>>;
|
|
20
12
|
/**
|
|
21
|
-
* Creates
|
|
22
|
-
* @param
|
|
23
|
-
* @param email The email address of the user to invite.
|
|
24
|
-
* @param grant_type The type of grant for the user.
|
|
25
|
-
* @param name The name of the user (optional).
|
|
13
|
+
* Creates a new organization.
|
|
14
|
+
* @param orgName The name of the organization to create.
|
|
26
15
|
* @param request The request options.
|
|
27
|
-
* @returns A promise that resolves to the created
|
|
16
|
+
* @returns A promise that resolves to the created organization.
|
|
28
17
|
*/
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
18
|
+
create(orgName: string, request?: SdkOptions): Promise<IOrganization>;
|
|
19
|
+
invitations: {
|
|
20
|
+
/**
|
|
21
|
+
* Lists all invitations for a given organization.
|
|
22
|
+
* @param oid The organization ID.
|
|
23
|
+
* @param request The request options.
|
|
24
|
+
* @returns A promise that resolves to a list of invitations.
|
|
25
|
+
*/
|
|
26
|
+
list: (oid: string, request?: SdkOptions) => Promise<ContextListResult<InvitationSchema>>;
|
|
27
|
+
/**
|
|
28
|
+
* Creates an invitation for a user to join an organization.
|
|
29
|
+
* @param oid The organization ID.
|
|
30
|
+
* @param email The email address of the user to invite.
|
|
31
|
+
* @param grant_type The type of grant for the user.
|
|
32
|
+
* @param name The name of the user (optional).
|
|
33
|
+
* @param request The request options.
|
|
34
|
+
* @returns A promise that resolves to the created invitation.
|
|
35
|
+
*/
|
|
36
|
+
create: (oid: string, email: string, grant_type: UserOrganizationGrantType, name?: string, request?: SdkOptions) => Promise<InvitationSchema>;
|
|
37
|
+
/**
|
|
38
|
+
* Finds an invitation by its token.
|
|
39
|
+
* @param oid The organization ID.
|
|
40
|
+
* @param token The invitation token.
|
|
41
|
+
* @param request The request options.
|
|
42
|
+
* @returns A promise that resolves to the found invitation.
|
|
43
|
+
*/
|
|
44
|
+
findByToken: (oid: string, token: string, request?: SdkOptions) => Promise<InvitationSchema>;
|
|
45
|
+
/**
|
|
46
|
+
* Declines an invitation.
|
|
47
|
+
* @param oid The organization ID.
|
|
48
|
+
* @param id The invitation ID.
|
|
49
|
+
* @param request The request options.
|
|
50
|
+
* @returns A promise that resolves when the invitation is declined.
|
|
51
|
+
*/
|
|
52
|
+
decline: (oid: string, id: string, request?: SdkOptions) => Promise<InvitationSchema>;
|
|
53
|
+
/**
|
|
54
|
+
* Soft-deletes an invitation.
|
|
55
|
+
* @param oid The organization ID.
|
|
56
|
+
* @param id The invitation ID.
|
|
57
|
+
* @param request The request options.
|
|
58
|
+
* @returns A promise that resolves to the deleted invitation.
|
|
59
|
+
*/
|
|
60
|
+
delete: (oid: string, id: string, request?: SdkOptions) => Promise<InvitationSchema>;
|
|
61
|
+
/**
|
|
62
|
+
* Patches an invitation. The server performs the patch validation.
|
|
63
|
+
* The API only allows to patch some of the invitation properties:
|
|
64
|
+
* - name
|
|
65
|
+
* - expires_at
|
|
66
|
+
* - grant_type
|
|
67
|
+
* @param oid The organization ID.
|
|
68
|
+
* @param id The invitation ID.
|
|
69
|
+
* @param info The patch information.
|
|
70
|
+
* @param request The request options.
|
|
71
|
+
* @returns A promise that resolves to the patched invitation.
|
|
72
|
+
*/
|
|
73
|
+
patch: (oid: string, id: string, info: PatchInfo, request?: SdkOptions) => Promise<InvitationSchema>;
|
|
74
|
+
};
|
|
75
|
+
users: {
|
|
76
|
+
/**
|
|
77
|
+
* Lists users in the organization.
|
|
78
|
+
*
|
|
79
|
+
* @param oid The key of the organization we want to read the user from.
|
|
80
|
+
* @param options Optional query options.
|
|
81
|
+
* @param request Optional request options.
|
|
82
|
+
*/
|
|
83
|
+
list: (oid: string, options?: ContextListOptions, request?: SdkOptions) => Promise<ContextListResult<IUser>>;
|
|
84
|
+
/**
|
|
85
|
+
* Gets a user by its key in the organization.
|
|
86
|
+
*
|
|
87
|
+
* @param oid The key of the organization parent organization.
|
|
88
|
+
* @param key The user key.
|
|
89
|
+
* @param request Optional request options.
|
|
90
|
+
* @returns The user object
|
|
91
|
+
*/
|
|
92
|
+
read: (oid: string, key: string, request?: SdkOptions) => Promise<IUser>;
|
|
93
|
+
/**
|
|
94
|
+
* Activates a user in the organization.
|
|
95
|
+
* If the user is already active the API will respond with an error.
|
|
96
|
+
* @param oid The key of the organization parent organization.
|
|
97
|
+
* @param key The user key.
|
|
98
|
+
*/
|
|
99
|
+
activate: (oid: string, key: string, request?: SdkOptions) => Promise<IUser>;
|
|
100
|
+
/**
|
|
101
|
+
* Deactivates a user in the organization.
|
|
102
|
+
* If the user is already deactivated the API will respond with an error.
|
|
103
|
+
* @param oid The key of the organization parent organization.
|
|
104
|
+
* @param key The user key.
|
|
105
|
+
*/
|
|
106
|
+
deactivate: (oid: string, key: string, request?: SdkOptions) => Promise<IUser>;
|
|
107
|
+
/**
|
|
108
|
+
* Deletes a user from the organization.
|
|
109
|
+
* @param oid The key of the organization parent organization.
|
|
110
|
+
* @param key The user
|
|
111
|
+
* @param request Optional request options.
|
|
112
|
+
* @returns A promise that resolves when the user is deleted.
|
|
113
|
+
*/
|
|
114
|
+
delete: (oid: string, key: string, request?: SdkOptions) => Promise<void>;
|
|
115
|
+
};
|
|
85
116
|
}
|
|
86
117
|
//# sourceMappingURL=OrganizationsSdk.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"OrganizationsSdk.d.ts","sourceRoot":"","sources":["../../../../src/runtime/store/OrganizationsSdk.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,OAAO,EAKP,UAAU,EACX,MAAM,cAAc,CAAA;AAErB,OAAO,KAAK,EAAE,kBAAkB,EAAE,iBAAiB,EAAE,MAAM,4BAA4B,CAAA;AACvF,OAAO,KAAK,EAAE,aAAa,EAAE,yBAAyB,EAAE,MAAM,oCAAoC,CAAA;AAClG,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,kCAAkC,CAAA;AACxE,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,sBAAsB,CAAA;AACrD,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,4BAA4B,CAAA;AAGvD,qBAAa,gBAAiB,SAAQ,OAAO;IAC3C;;OAEG;IACG,IAAI,CAAC,OAAO,GAAE,UAAe,GAAG,OAAO,CAAC,iBAAiB,CAAC,aAAa,CAAC,CAAC;
|
|
1
|
+
{"version":3,"file":"OrganizationsSdk.d.ts","sourceRoot":"","sources":["../../../../src/runtime/store/OrganizationsSdk.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,OAAO,EAKP,UAAU,EACX,MAAM,cAAc,CAAA;AAErB,OAAO,KAAK,EAAE,kBAAkB,EAAE,iBAAiB,EAAE,MAAM,4BAA4B,CAAA;A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