@boxyhq/saml-jackson 1.11.1 → 1.11.3
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/dist/controller/admin.d.ts +2 -1
- package/dist/controller/admin.js +9 -0
- package/dist/controller/admin.js.map +1 -1
- package/dist/controller/api.d.ts +10 -136
- package/dist/controller/api.js +10 -136
- package/dist/controller/api.js.map +1 -1
- package/dist/controller/connection/saml.js +5 -2
- package/dist/controller/connection/saml.js.map +1 -1
- package/dist/controller/oauth.js +6 -1
- package/dist/controller/oauth.js.map +1 -1
- package/dist/controller/setup-link.d.ts +248 -4
- package/dist/controller/setup-link.js +297 -19
- package/dist/controller/setup-link.js.map +1 -1
- package/dist/controller/utils.d.ts +5 -4
- package/dist/controller/utils.js +5 -3
- package/dist/controller/utils.js.map +1 -1
- package/dist/directory-sync/scim/DirectoryConfig.d.ts +202 -0
- package/dist/directory-sync/scim/DirectoryConfig.js +202 -5
- package/dist/directory-sync/scim/DirectoryConfig.js.map +1 -1
- package/dist/directory-sync/scim/Groups.d.ts +60 -0
- package/dist/directory-sync/scim/Groups.js +60 -2
- package/dist/directory-sync/scim/Groups.js.map +1 -1
- package/dist/directory-sync/scim/Users.d.ts +69 -0
- package/dist/directory-sync/scim/Users.js +69 -2
- package/dist/directory-sync/scim/Users.js.map +1 -1
- package/dist/saml-tracer/index.d.ts +89 -0
- package/dist/saml-tracer/index.js +102 -0
- package/dist/saml-tracer/index.js.map +1 -1
- package/dist/typings.d.ts +1 -0
- package/package.json +14 -14
@@ -11,6 +11,55 @@ interface FilterByParams extends PaginationParams {
|
|
11
11
|
product?: string;
|
12
12
|
provider?: DirectoryType;
|
13
13
|
}
|
14
|
+
/**
|
15
|
+
* @swagger
|
16
|
+
* definitions:
|
17
|
+
* Directory:
|
18
|
+
* type: object
|
19
|
+
* properties:
|
20
|
+
* id:
|
21
|
+
* type: string
|
22
|
+
* description: Directory ID
|
23
|
+
* name:
|
24
|
+
* type: string
|
25
|
+
* description: name
|
26
|
+
* tenant:
|
27
|
+
* type: string
|
28
|
+
* description: Tenant
|
29
|
+
* product:
|
30
|
+
* type: string
|
31
|
+
* description: Product
|
32
|
+
* type:
|
33
|
+
* type: string
|
34
|
+
* description: Directory provider
|
35
|
+
* deactivated:
|
36
|
+
* type: boolean
|
37
|
+
* description: Status
|
38
|
+
* log_webhook_events:
|
39
|
+
* type: boolean
|
40
|
+
* description: If true, webhook requests will be logged
|
41
|
+
* scim:
|
42
|
+
* type: object
|
43
|
+
* properties:
|
44
|
+
* path:
|
45
|
+
* type: string
|
46
|
+
* description: SCIM path
|
47
|
+
* endpoint:
|
48
|
+
* type: string
|
49
|
+
* description: SCIM url
|
50
|
+
* secret:
|
51
|
+
* type: string
|
52
|
+
* description: SCIM secret
|
53
|
+
* webhook:
|
54
|
+
* type: object
|
55
|
+
* properties:
|
56
|
+
* endpoint:
|
57
|
+
* type: string
|
58
|
+
* description: Webhook url
|
59
|
+
* secret:
|
60
|
+
* type: string
|
61
|
+
* description: Webhook secret
|
62
|
+
*/
|
14
63
|
export declare class DirectoryConfig {
|
15
64
|
private _store;
|
16
65
|
private opts;
|
@@ -21,6 +70,78 @@ export declare class DirectoryConfig {
|
|
21
70
|
private eventController;
|
22
71
|
constructor({ db, opts, users, groups, logger, eventController }: DirectoryConfigParams);
|
23
72
|
private store;
|
73
|
+
/**
|
74
|
+
* @swagger
|
75
|
+
* parameters:
|
76
|
+
* tenant:
|
77
|
+
* name: tenant
|
78
|
+
* description: Tenant
|
79
|
+
* in: query
|
80
|
+
* required: true
|
81
|
+
* type: string
|
82
|
+
* product:
|
83
|
+
* name: product
|
84
|
+
* description: Product
|
85
|
+
* in: query
|
86
|
+
* required: true
|
87
|
+
* type: string
|
88
|
+
* directoryId:
|
89
|
+
* name: directory id
|
90
|
+
* description: Directory ID
|
91
|
+
* in: query
|
92
|
+
* required: false
|
93
|
+
* type: string
|
94
|
+
*/
|
95
|
+
/**
|
96
|
+
* @swagger
|
97
|
+
* /api/v1/dsync:
|
98
|
+
* post:
|
99
|
+
* summary: Create a directory connection
|
100
|
+
* parameters:
|
101
|
+
* - name: tenant
|
102
|
+
* description: Tenant
|
103
|
+
* in: formData
|
104
|
+
* required: true
|
105
|
+
* type: string
|
106
|
+
* - name: product
|
107
|
+
* description: Product
|
108
|
+
* in: formData
|
109
|
+
* required: true
|
110
|
+
* type: string
|
111
|
+
* - name: name
|
112
|
+
* description: Name
|
113
|
+
* in: formData
|
114
|
+
* required: false
|
115
|
+
* type: string
|
116
|
+
* - name: webhook_url
|
117
|
+
* description: Webhook URL
|
118
|
+
* in: formData
|
119
|
+
* required: false
|
120
|
+
* type: string
|
121
|
+
* - name: webhook_secret
|
122
|
+
* description: Webhook secret
|
123
|
+
* in: formData
|
124
|
+
* required: false
|
125
|
+
* type: string
|
126
|
+
* - name: type
|
127
|
+
* description: Directory provider. (Supported values are azure-scim-v2, onelogin-scim-v2, okta-scim-v2, jumpcloud-scim-v2, generic-scim-v2, google)
|
128
|
+
* in: formData
|
129
|
+
* required: false
|
130
|
+
* type: string
|
131
|
+
* tags: [Directory Sync]
|
132
|
+
* produces:
|
133
|
+
* - application/json
|
134
|
+
* consumes:
|
135
|
+
* - application/x-www-form-urlencoded
|
136
|
+
* - application/json
|
137
|
+
* responses:
|
138
|
+
* 200:
|
139
|
+
* description: Success
|
140
|
+
* schema:
|
141
|
+
* type: array
|
142
|
+
* items:
|
143
|
+
* $ref: '#/definitions/Directory'
|
144
|
+
*/
|
24
145
|
create(params: {
|
25
146
|
name?: string;
|
26
147
|
tenant: string;
|
@@ -32,14 +153,95 @@ export declare class DirectoryConfig {
|
|
32
153
|
google_access_token?: string;
|
33
154
|
google_refresh_token?: string;
|
34
155
|
}): Promise<Response<Directory>>;
|
156
|
+
/**
|
157
|
+
* @swagger
|
158
|
+
* /api/v1/dsync/{directoryId}:
|
159
|
+
* get:
|
160
|
+
* summary: Get a directory connection by id
|
161
|
+
* parameters:
|
162
|
+
* - name: directoryId
|
163
|
+
* description: Directory ID
|
164
|
+
* in: path
|
165
|
+
* required: true
|
166
|
+
* type: string
|
167
|
+
* tags:
|
168
|
+
* - Directory Sync
|
169
|
+
* produces:
|
170
|
+
* - application/json
|
171
|
+
* responses:
|
172
|
+
* '200':
|
173
|
+
* description: Success
|
174
|
+
* schema:
|
175
|
+
* $ref: '#/definitions/Directory'
|
176
|
+
*/
|
35
177
|
get(id: string): Promise<Response<Directory>>;
|
36
178
|
update(id: string, param: Omit<Partial<Directory>, 'id' | 'tenant' | 'prodct' | 'scim' | 'type'>): Promise<Response<Directory>>;
|
179
|
+
/**
|
180
|
+
* @swagger
|
181
|
+
* /api/v1/dsync:
|
182
|
+
* get:
|
183
|
+
* summary: Get a directory connection by tenant and product
|
184
|
+
* parameters:
|
185
|
+
* - $ref: '#/parameters/tenant'
|
186
|
+
* - $ref: '#/parameters/product'
|
187
|
+
* tags: [Directory Sync]
|
188
|
+
* produces:
|
189
|
+
* - application/json
|
190
|
+
* consumes:
|
191
|
+
* - application/x-www-form-urlencoded
|
192
|
+
* - application/json
|
193
|
+
* responses:
|
194
|
+
* 200:
|
195
|
+
* description: Success
|
196
|
+
* schema:
|
197
|
+
* type: array
|
198
|
+
* items:
|
199
|
+
* $ref: '#/definitions/Directory'
|
200
|
+
*/
|
37
201
|
getByTenantAndProduct(tenant: string, product: string): Promise<Response<Directory[]>>;
|
38
202
|
getAll(params?: PaginationParams): Promise<Response<Directory[]> & {
|
39
203
|
pageToken?: string;
|
40
204
|
}>;
|
205
|
+
/**
|
206
|
+
* @swagger
|
207
|
+
* /api/v1/dsync/{directoryId}:
|
208
|
+
* delete:
|
209
|
+
* summary: Delete a directory connection by id
|
210
|
+
* parameters:
|
211
|
+
* - name: directoryId
|
212
|
+
* description: Directory ID
|
213
|
+
* in: path
|
214
|
+
* required: true
|
215
|
+
* type: string
|
216
|
+
* tags:
|
217
|
+
* - Directory Sync
|
218
|
+
* produces:
|
219
|
+
* - application/json
|
220
|
+
* responses:
|
221
|
+
* '200':
|
222
|
+
* description: Success
|
223
|
+
*/
|
41
224
|
delete(id: string): Promise<Response<null>>;
|
42
225
|
private transform;
|
226
|
+
/**
|
227
|
+
* @swagger
|
228
|
+
* /api/v1/dsync/product:
|
229
|
+
* get:
|
230
|
+
* summary: Get directory connections by product
|
231
|
+
* parameters:
|
232
|
+
* - $ref: '#/parameters/product'
|
233
|
+
* tags:
|
234
|
+
* - Directory Sync
|
235
|
+
* produces:
|
236
|
+
* - application/json
|
237
|
+
* responses:
|
238
|
+
* '200':
|
239
|
+
* description: Success
|
240
|
+
* schema:
|
241
|
+
* type: array
|
242
|
+
* items:
|
243
|
+
* $ref: '#/definitions/Directory'
|
244
|
+
*/
|
43
245
|
filterBy(params?: FilterByParams): Promise<Response<Directory[]> & {
|
44
246
|
pageToken?: string;
|
45
247
|
}>;
|
@@ -38,6 +38,55 @@ const dbutils = __importStar(require("../../db/utils"));
|
|
38
38
|
const utils_1 = require("../../controller/utils");
|
39
39
|
const error_1 = require("../../controller/error");
|
40
40
|
const utils_2 = require("./utils");
|
41
|
+
/**
|
42
|
+
* @swagger
|
43
|
+
* definitions:
|
44
|
+
* Directory:
|
45
|
+
* type: object
|
46
|
+
* properties:
|
47
|
+
* id:
|
48
|
+
* type: string
|
49
|
+
* description: Directory ID
|
50
|
+
* name:
|
51
|
+
* type: string
|
52
|
+
* description: name
|
53
|
+
* tenant:
|
54
|
+
* type: string
|
55
|
+
* description: Tenant
|
56
|
+
* product:
|
57
|
+
* type: string
|
58
|
+
* description: Product
|
59
|
+
* type:
|
60
|
+
* type: string
|
61
|
+
* description: Directory provider
|
62
|
+
* deactivated:
|
63
|
+
* type: boolean
|
64
|
+
* description: Status
|
65
|
+
* log_webhook_events:
|
66
|
+
* type: boolean
|
67
|
+
* description: If true, webhook requests will be logged
|
68
|
+
* scim:
|
69
|
+
* type: object
|
70
|
+
* properties:
|
71
|
+
* path:
|
72
|
+
* type: string
|
73
|
+
* description: SCIM path
|
74
|
+
* endpoint:
|
75
|
+
* type: string
|
76
|
+
* description: SCIM url
|
77
|
+
* secret:
|
78
|
+
* type: string
|
79
|
+
* description: SCIM secret
|
80
|
+
* webhook:
|
81
|
+
* type: object
|
82
|
+
* properties:
|
83
|
+
* endpoint:
|
84
|
+
* type: string
|
85
|
+
* description: Webhook url
|
86
|
+
* secret:
|
87
|
+
* type: string
|
88
|
+
* description: Webhook secret
|
89
|
+
*/
|
41
90
|
class DirectoryConfig {
|
42
91
|
constructor({ db, opts, users, groups, logger, eventController }) {
|
43
92
|
this._store = null;
|
@@ -52,7 +101,78 @@ class DirectoryConfig {
|
|
52
101
|
store() {
|
53
102
|
return this._store || (this._store = this.db.store(utils_1.storeNamespacePrefix.dsync.config));
|
54
103
|
}
|
55
|
-
|
104
|
+
/**
|
105
|
+
* @swagger
|
106
|
+
* parameters:
|
107
|
+
* tenant:
|
108
|
+
* name: tenant
|
109
|
+
* description: Tenant
|
110
|
+
* in: query
|
111
|
+
* required: true
|
112
|
+
* type: string
|
113
|
+
* product:
|
114
|
+
* name: product
|
115
|
+
* description: Product
|
116
|
+
* in: query
|
117
|
+
* required: true
|
118
|
+
* type: string
|
119
|
+
* directoryId:
|
120
|
+
* name: directory id
|
121
|
+
* description: Directory ID
|
122
|
+
* in: query
|
123
|
+
* required: false
|
124
|
+
* type: string
|
125
|
+
*/
|
126
|
+
/**
|
127
|
+
* @swagger
|
128
|
+
* /api/v1/dsync:
|
129
|
+
* post:
|
130
|
+
* summary: Create a directory connection
|
131
|
+
* parameters:
|
132
|
+
* - name: tenant
|
133
|
+
* description: Tenant
|
134
|
+
* in: formData
|
135
|
+
* required: true
|
136
|
+
* type: string
|
137
|
+
* - name: product
|
138
|
+
* description: Product
|
139
|
+
* in: formData
|
140
|
+
* required: true
|
141
|
+
* type: string
|
142
|
+
* - name: name
|
143
|
+
* description: Name
|
144
|
+
* in: formData
|
145
|
+
* required: false
|
146
|
+
* type: string
|
147
|
+
* - name: webhook_url
|
148
|
+
* description: Webhook URL
|
149
|
+
* in: formData
|
150
|
+
* required: false
|
151
|
+
* type: string
|
152
|
+
* - name: webhook_secret
|
153
|
+
* description: Webhook secret
|
154
|
+
* in: formData
|
155
|
+
* required: false
|
156
|
+
* type: string
|
157
|
+
* - name: type
|
158
|
+
* description: Directory provider. (Supported values are azure-scim-v2, onelogin-scim-v2, okta-scim-v2, jumpcloud-scim-v2, generic-scim-v2, google)
|
159
|
+
* in: formData
|
160
|
+
* required: false
|
161
|
+
* type: string
|
162
|
+
* tags: [Directory Sync]
|
163
|
+
* produces:
|
164
|
+
* - application/json
|
165
|
+
* consumes:
|
166
|
+
* - application/x-www-form-urlencoded
|
167
|
+
* - application/json
|
168
|
+
* responses:
|
169
|
+
* 200:
|
170
|
+
* description: Success
|
171
|
+
* schema:
|
172
|
+
* type: array
|
173
|
+
* items:
|
174
|
+
* $ref: '#/definitions/Directory'
|
175
|
+
*/
|
56
176
|
create(params) {
|
57
177
|
return __awaiter(this, void 0, void 0, function* () {
|
58
178
|
try {
|
@@ -120,7 +240,27 @@ class DirectoryConfig {
|
|
120
240
|
}
|
121
241
|
});
|
122
242
|
}
|
123
|
-
|
243
|
+
/**
|
244
|
+
* @swagger
|
245
|
+
* /api/v1/dsync/{directoryId}:
|
246
|
+
* get:
|
247
|
+
* summary: Get a directory connection by id
|
248
|
+
* parameters:
|
249
|
+
* - name: directoryId
|
250
|
+
* description: Directory ID
|
251
|
+
* in: path
|
252
|
+
* required: true
|
253
|
+
* type: string
|
254
|
+
* tags:
|
255
|
+
* - Directory Sync
|
256
|
+
* produces:
|
257
|
+
* - application/json
|
258
|
+
* responses:
|
259
|
+
* '200':
|
260
|
+
* description: Success
|
261
|
+
* schema:
|
262
|
+
* $ref: '#/definitions/Directory'
|
263
|
+
*/
|
124
264
|
get(id) {
|
125
265
|
return __awaiter(this, void 0, void 0, function* () {
|
126
266
|
try {
|
@@ -165,7 +305,28 @@ class DirectoryConfig {
|
|
165
305
|
}
|
166
306
|
});
|
167
307
|
}
|
168
|
-
|
308
|
+
/**
|
309
|
+
* @swagger
|
310
|
+
* /api/v1/dsync:
|
311
|
+
* get:
|
312
|
+
* summary: Get a directory connection by tenant and product
|
313
|
+
* parameters:
|
314
|
+
* - $ref: '#/parameters/tenant'
|
315
|
+
* - $ref: '#/parameters/product'
|
316
|
+
* tags: [Directory Sync]
|
317
|
+
* produces:
|
318
|
+
* - application/json
|
319
|
+
* consumes:
|
320
|
+
* - application/x-www-form-urlencoded
|
321
|
+
* - application/json
|
322
|
+
* responses:
|
323
|
+
* 200:
|
324
|
+
* description: Success
|
325
|
+
* schema:
|
326
|
+
* type: array
|
327
|
+
* items:
|
328
|
+
* $ref: '#/definitions/Directory'
|
329
|
+
*/
|
169
330
|
getByTenantAndProduct(tenant, product) {
|
170
331
|
return __awaiter(this, void 0, void 0, function* () {
|
171
332
|
try {
|
@@ -204,7 +365,25 @@ class DirectoryConfig {
|
|
204
365
|
}
|
205
366
|
});
|
206
367
|
}
|
207
|
-
|
368
|
+
/**
|
369
|
+
* @swagger
|
370
|
+
* /api/v1/dsync/{directoryId}:
|
371
|
+
* delete:
|
372
|
+
* summary: Delete a directory connection by id
|
373
|
+
* parameters:
|
374
|
+
* - name: directoryId
|
375
|
+
* description: Directory ID
|
376
|
+
* in: path
|
377
|
+
* required: true
|
378
|
+
* type: string
|
379
|
+
* tags:
|
380
|
+
* - Directory Sync
|
381
|
+
* produces:
|
382
|
+
* - application/json
|
383
|
+
* responses:
|
384
|
+
* '200':
|
385
|
+
* description: Success
|
386
|
+
*/
|
208
387
|
delete(id) {
|
209
388
|
return __awaiter(this, void 0, void 0, function* () {
|
210
389
|
try {
|
@@ -246,7 +425,25 @@ class DirectoryConfig {
|
|
246
425
|
}
|
247
426
|
return directory;
|
248
427
|
}
|
249
|
-
|
428
|
+
/**
|
429
|
+
* @swagger
|
430
|
+
* /api/v1/dsync/product:
|
431
|
+
* get:
|
432
|
+
* summary: Get directory connections by product
|
433
|
+
* parameters:
|
434
|
+
* - $ref: '#/parameters/product'
|
435
|
+
* tags:
|
436
|
+
* - Directory Sync
|
437
|
+
* produces:
|
438
|
+
* - application/json
|
439
|
+
* responses:
|
440
|
+
* '200':
|
441
|
+
* description: Success
|
442
|
+
* schema:
|
443
|
+
* type: array
|
444
|
+
* items:
|
445
|
+
* $ref: '#/definitions/Directory'
|
446
|
+
*/
|
250
447
|
filterBy(params = {}) {
|
251
448
|
return __awaiter(this, void 0, void 0, function* () {
|
252
449
|
const { product, provider, pageOffset, pageLimit, pageToken } = params;
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"DirectoryConfig.js","sourceRoot":"","sources":["../../../src/directory-sync/scim/DirectoryConfig.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,mCAAoC;AAgBpC,wDAA0C;AAC1C,kDAMgC;AAChC,kDAAgE;AAChE,mCAA2E;AAgB3E,MAAa,eAAe;IAS1B,YAAY,EAAE,EAAE,EAAE,IAAI,EAAE,KAAK,EAAE,MAAM,EAAE,MAAM,EAAE,eAAe,EAAyB;QAR/E,WAAM,GAAoB,IAAI,CAAC;QASrC,IAAI,CAAC,IAAI,GAAG,IAAI,CAAC;QACjB,IAAI,CAAC,EAAE,GAAG,EAAE,CAAC;QACb,IAAI,CAAC,KAAK,GAAG,KAAK,CAAC;QACnB,IAAI,CAAC,MAAM,GAAG,MAAM,CAAC;QACrB,IAAI,CAAC,MAAM,GAAG,MAAM,CAAC;QACrB,IAAI,CAAC,eAAe,GAAG,eAAe,CAAC;IACzC,CAAC;IAED,4BAA4B;IACpB,KAAK;QACX,OAAO,IAAI,CAAC,MAAM,IAAI,CAAC,IAAI,CAAC,MAAM,GAAG,IAAI,CAAC,EAAE,CAAC,KAAK,CAAC,4BAAoB,CAAC,KAAK,CAAC,MAAM,CAAC,CAAC,CAAC;IACzF,CAAC;IAED
|
1
|
+
{"version":3,"file":"DirectoryConfig.js","sourceRoot":"","sources":["../../../src/directory-sync/scim/Directory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MAAM,EAAE,OAAO,EAAE,QAAQ,EAAE,UAAU,EAAE,SAAS,EAAE,SAAS,EAAE,GAAG,MAAM,CAAC;YACvE,IAAI,KAAK,GAAiB,IAAI,CAAC;YAE/B,IAAI,OAAO,EAAE;gBACX,oBAAoB;gBACpB,KAAK,GAAG;oBACN,IAAI,EAAE,kBAAU,CAAC,OAAO;oBACxB,KAAK,EAAE,OAAO;iBACf,CAAC;aACH;iBAAM,IAAI,QAAQ,EAAE;gBACnB,qBAAqB;gBACrB,KAAK,GAAG;oBACN,IAAI,EAAE,4BAAoB,CAAC,KAAK,CAAC,SAAS;oBAC1C,KAAK,EAAE,QAAQ;iBAChB,CAAC;aACH;YAED,IAAI;gBACF,IAAI,CAAC,KAAK,EAAE;oBACV,MAAM,IAAI,oBAAY,CAAC,wCAAwC,EAAE,GAAG,CAAC,CAAC;iBACvE;gBAED,MAAM,EAAE,IAAI,EAAE,WAAW,EAAE,SAAS,EAAE,aAAa,EAAE,GAAG,MAAM,IAAI,CAAC,KAAK,EAAE,CAAC,UAAU,CACnF,KAAK,EACL,UAAU,EACV,SAAS,EACT,SAAS,CACV,CAAC;gBAEF,OAAO;oBACL,IAAI,EAAE,WAAW,CAAC,GAAG,CAAC,CAAC,SAAS,EAAE,EAAE,CAAC,IAAI,CAAC,SAAS,CAAC,SAAS,CAAC,CAAC;oBAC/D,SAAS,EAAE,aAAa;oBACxB,KAAK,EAAE,IAAI;iBACZ,CAAC;aACH;YAAC,OAAO,GAAQ,EAAE;gBACjB,OAAO,IAAA,gBAAQ,EAAC,GAAG,CAAC,CAAC;aACtB;QACH,CAAC;KAAA;CACF;AAxeD,0CAweC"}
|
@@ -6,11 +6,50 @@ interface CreateGroupParams {
|
|
6
6
|
raw: any;
|
7
7
|
id?: string;
|
8
8
|
}
|
9
|
+
/**
|
10
|
+
* @swagger
|
11
|
+
* definitions:
|
12
|
+
* Group:
|
13
|
+
* type: object
|
14
|
+
* properties:
|
15
|
+
* id:
|
16
|
+
* type: string
|
17
|
+
* description: Group ID
|
18
|
+
* name:
|
19
|
+
* type: string
|
20
|
+
* description: Group name
|
21
|
+
* raw:
|
22
|
+
* type: object
|
23
|
+
* description: Raw group attributes from the Identity Provider
|
24
|
+
*/
|
9
25
|
export declare class Groups extends Base {
|
10
26
|
constructor({ db }: {
|
11
27
|
db: DatabaseStore;
|
12
28
|
});
|
13
29
|
create(params: CreateGroupParams): Promise<Response<Group>>;
|
30
|
+
/**
|
31
|
+
* @swagger
|
32
|
+
* /api/v1/dsync/groups/{groupId}:
|
33
|
+
* get:
|
34
|
+
* summary: Get group by id from a directory
|
35
|
+
* parameters:
|
36
|
+
* - $ref: '#/parameters/tenant'
|
37
|
+
* - $ref: '#/parameters/product'
|
38
|
+
* - name: groupId
|
39
|
+
* description: Group ID
|
40
|
+
* in: path
|
41
|
+
* required: true
|
42
|
+
* type: string
|
43
|
+
* tags:
|
44
|
+
* - Directory Sync
|
45
|
+
* produces:
|
46
|
+
* - application/json
|
47
|
+
* responses:
|
48
|
+
* 200:
|
49
|
+
* description: Success
|
50
|
+
* schema:
|
51
|
+
* $ref: '#/definitions/Group'
|
52
|
+
*/
|
14
53
|
get(id: string): Promise<Response<Group>>;
|
15
54
|
update(id: string, param: {
|
16
55
|
name: string;
|
@@ -21,6 +60,27 @@ export declare class Groups extends Base {
|
|
21
60
|
removeUserFromGroup(groupId: string, userId: string): Promise<void>;
|
22
61
|
isUserInGroup(groupId: string, userId: string): Promise<boolean>;
|
23
62
|
search(displayName: string, directoryId: string): Promise<Response<Group[]>>;
|
63
|
+
/**
|
64
|
+
* @swagger
|
65
|
+
* /api/v1/dsync/groups:
|
66
|
+
* get:
|
67
|
+
* summary: Get groups from a directory
|
68
|
+
* parameters:
|
69
|
+
* - $ref: '#/parameters/tenant'
|
70
|
+
* - $ref: '#/parameters/product'
|
71
|
+
* - $ref: '#/parameters/directoryId'
|
72
|
+
* tags:
|
73
|
+
* - Directory Sync
|
74
|
+
* produces:
|
75
|
+
* - application/json
|
76
|
+
* responses:
|
77
|
+
* 200:
|
78
|
+
* description: Success
|
79
|
+
* schema:
|
80
|
+
* type: array
|
81
|
+
* items:
|
82
|
+
* $ref: '#/definitions/Group'
|
83
|
+
*/
|
24
84
|
getAll(params: PaginationParams & {
|
25
85
|
directoryId?: string;
|
26
86
|
}): Promise<Response<Group[]>>;
|
@@ -41,6 +41,22 @@ const indexNames = {
|
|
41
41
|
directoryIdDisplayname: 'directoryIdDisplayname',
|
42
42
|
directoryId: 'directoryId',
|
43
43
|
};
|
44
|
+
/**
|
45
|
+
* @swagger
|
46
|
+
* definitions:
|
47
|
+
* Group:
|
48
|
+
* type: object
|
49
|
+
* properties:
|
50
|
+
* id:
|
51
|
+
* type: string
|
52
|
+
* description: Group ID
|
53
|
+
* name:
|
54
|
+
* type: string
|
55
|
+
* description: Group name
|
56
|
+
* raw:
|
57
|
+
* type: object
|
58
|
+
* description: Raw group attributes from the Identity Provider
|
59
|
+
*/
|
44
60
|
class Groups extends Base_1.Base {
|
45
61
|
constructor({ db }) {
|
46
62
|
super({ db });
|
@@ -71,7 +87,29 @@ class Groups extends Base_1.Base {
|
|
71
87
|
}
|
72
88
|
});
|
73
89
|
}
|
74
|
-
|
90
|
+
/**
|
91
|
+
* @swagger
|
92
|
+
* /api/v1/dsync/groups/{groupId}:
|
93
|
+
* get:
|
94
|
+
* summary: Get group by id from a directory
|
95
|
+
* parameters:
|
96
|
+
* - $ref: '#/parameters/tenant'
|
97
|
+
* - $ref: '#/parameters/product'
|
98
|
+
* - name: groupId
|
99
|
+
* description: Group ID
|
100
|
+
* in: path
|
101
|
+
* required: true
|
102
|
+
* type: string
|
103
|
+
* tags:
|
104
|
+
* - Directory Sync
|
105
|
+
* produces:
|
106
|
+
* - application/json
|
107
|
+
* responses:
|
108
|
+
* 200:
|
109
|
+
* description: Success
|
110
|
+
* schema:
|
111
|
+
* $ref: '#/definitions/Group'
|
112
|
+
*/
|
75
113
|
get(id) {
|
76
114
|
return __awaiter(this, void 0, void 0, function* () {
|
77
115
|
try {
|
@@ -164,7 +202,27 @@ class Groups extends Base_1.Base {
|
|
164
202
|
}
|
165
203
|
});
|
166
204
|
}
|
167
|
-
|
205
|
+
/**
|
206
|
+
* @swagger
|
207
|
+
* /api/v1/dsync/groups:
|
208
|
+
* get:
|
209
|
+
* summary: Get groups from a directory
|
210
|
+
* parameters:
|
211
|
+
* - $ref: '#/parameters/tenant'
|
212
|
+
* - $ref: '#/parameters/product'
|
213
|
+
* - $ref: '#/parameters/directoryId'
|
214
|
+
* tags:
|
215
|
+
* - Directory Sync
|
216
|
+
* produces:
|
217
|
+
* - application/json
|
218
|
+
* responses:
|
219
|
+
* 200:
|
220
|
+
* description: Success
|
221
|
+
* schema:
|
222
|
+
* type: array
|
223
|
+
* items:
|
224
|
+
* $ref: '#/definitions/Group'
|
225
|
+
*/
|
168
226
|
getAll(params) {
|
169
227
|
return __awaiter(this, void 0, void 0, function* () {
|
170
228
|
const { pageOffset, pageLimit, directoryId } = params;
|