@boxyhq/saml-jackson 1.6.0 → 1.7.1
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/oauth.js +2 -6
- package/dist/controller/oauth.js.map +1 -1
- package/dist/directory-sync/DirectoryConfig.d.ts +3 -6
- package/dist/directory-sync/DirectoryConfig.js +19 -5
- package/dist/directory-sync/DirectoryConfig.js.map +1 -1
- package/dist/directory-sync/DirectoryGroups.d.ts +6 -5
- package/dist/directory-sync/DirectoryGroups.js +12 -3
- package/dist/directory-sync/DirectoryGroups.js.map +1 -1
- package/dist/directory-sync/DirectoryUsers.d.ts +5 -4
- package/dist/directory-sync/DirectoryUsers.js +9 -4
- package/dist/directory-sync/DirectoryUsers.js.map +1 -1
- package/dist/directory-sync/Groups.d.ts +6 -6
- package/dist/directory-sync/Groups.js +27 -11
- package/dist/directory-sync/Groups.js.map +1 -1
- package/dist/directory-sync/Users.d.ts +15 -13
- package/dist/directory-sync/Users.js +32 -11
- package/dist/directory-sync/Users.js.map +1 -1
- package/dist/directory-sync/WebhookEventsLogger.d.ts +4 -5
- package/dist/directory-sync/WebhookEventsLogger.js +11 -2
- package/dist/directory-sync/WebhookEventsLogger.js.map +1 -1
- package/dist/directory-sync/events.d.ts +2 -2
- package/dist/directory-sync/events.js.map +1 -1
- package/dist/directory-sync/index.d.ts +20 -3
- package/dist/directory-sync/index.js +2 -2
- package/dist/directory-sync/index.js.map +1 -1
- package/dist/directory-sync/request.d.ts +1 -1
- package/dist/directory-sync/request.js +6 -5
- package/dist/directory-sync/request.js.map +1 -1
- package/dist/directory-sync/types.d.ts +103 -0
- package/dist/directory-sync/types.js +12 -0
- package/dist/directory-sync/types.js.map +1 -0
- package/dist/typings.d.ts +2 -264
- package/dist/typings.js +1 -9
- package/dist/typings.js.map +1 -1
- package/package.json +4 -4
package/dist/typings.d.ts
CHANGED
@@ -1,5 +1,6 @@
|
|
1
1
|
import { type JWK } from 'jose';
|
2
2
|
export * from './ee/federated-saml/types';
|
3
|
+
export * from './directory-sync/types';
|
3
4
|
interface SSOConnection {
|
4
5
|
defaultRedirectUrl: string;
|
5
6
|
redirectUrl: string[] | string;
|
@@ -172,7 +173,7 @@ export interface OAuthReqBody {
|
|
172
173
|
scope?: string;
|
173
174
|
nonce?: string;
|
174
175
|
idp_hint?: string;
|
175
|
-
|
176
|
+
forceAuthn?: string;
|
176
177
|
}
|
177
178
|
export interface OAuthReqBodyWithClientId extends OAuthReqBody {
|
178
179
|
client_id: string;
|
@@ -357,273 +358,10 @@ export interface ISPSAMLConfig {
|
|
357
358
|
toHTML(): string;
|
358
359
|
toXMLMetadata(): Promise<string>;
|
359
360
|
}
|
360
|
-
export type DirectorySyncEventType = 'user.created' | 'user.updated' | 'user.deleted' | 'group.created' | 'group.updated' | 'group.deleted' | 'group.user_added' | 'group.user_removed';
|
361
|
-
export interface Base {
|
362
|
-
store(type: 'groups' | 'members' | 'users'): Storable;
|
363
|
-
setTenant(tenant: string): this;
|
364
|
-
setProduct(product: string): this;
|
365
|
-
setTenantAndProduct(tenant: string, product: string): this;
|
366
|
-
with(tenant: string, product: string): this;
|
367
|
-
createId(): string;
|
368
|
-
}
|
369
|
-
export interface Users extends Base {
|
370
|
-
list({ pageOffset, pageLimit, }: {
|
371
|
-
pageOffset?: number;
|
372
|
-
pageLimit?: number;
|
373
|
-
}): Promise<{
|
374
|
-
data: User[] | null;
|
375
|
-
error: ApiError | null;
|
376
|
-
}>;
|
377
|
-
get(id: string): Promise<{
|
378
|
-
data: User | null;
|
379
|
-
error: ApiError | null;
|
380
|
-
}>;
|
381
|
-
search(userName: string): Promise<{
|
382
|
-
data: User[] | null;
|
383
|
-
error: ApiError | null;
|
384
|
-
}>;
|
385
|
-
delete(id: string): Promise<{
|
386
|
-
data: null;
|
387
|
-
error: ApiError | null;
|
388
|
-
}>;
|
389
|
-
clear(): Promise<void>;
|
390
|
-
create(param: {
|
391
|
-
first_name: string;
|
392
|
-
last_name: string;
|
393
|
-
email: string;
|
394
|
-
active: boolean;
|
395
|
-
raw: any;
|
396
|
-
}): Promise<{
|
397
|
-
data: User | null;
|
398
|
-
error: ApiError | null;
|
399
|
-
}>;
|
400
|
-
update(id: string, param: {
|
401
|
-
first_name: string;
|
402
|
-
last_name: string;
|
403
|
-
email: string;
|
404
|
-
active: boolean;
|
405
|
-
raw: object;
|
406
|
-
}): Promise<{
|
407
|
-
data: User | null;
|
408
|
-
error: ApiError | null;
|
409
|
-
}>;
|
410
|
-
}
|
411
|
-
export interface Groups extends Base {
|
412
|
-
create(param: {
|
413
|
-
name: string;
|
414
|
-
raw: any;
|
415
|
-
}): Promise<{
|
416
|
-
data: Group | null;
|
417
|
-
error: ApiError | null;
|
418
|
-
}>;
|
419
|
-
removeAllUsers(groupId: string): Promise<void>;
|
420
|
-
list({ pageOffset, pageLimit, }: {
|
421
|
-
pageOffset?: number;
|
422
|
-
pageLimit?: number;
|
423
|
-
}): Promise<{
|
424
|
-
data: Group[] | null;
|
425
|
-
error: ApiError | null;
|
426
|
-
}>;
|
427
|
-
get(id: string): Promise<{
|
428
|
-
data: Group | null;
|
429
|
-
error: ApiError | null;
|
430
|
-
}>;
|
431
|
-
getAllUsers(groupId: string): Promise<{
|
432
|
-
user_id: string;
|
433
|
-
}[]>;
|
434
|
-
delete(id: string): Promise<{
|
435
|
-
data: null;
|
436
|
-
error: ApiError | null;
|
437
|
-
}>;
|
438
|
-
addUserToGroup(groupId: string, userId: string): Promise<void>;
|
439
|
-
isUserInGroup(groupId: string, userId: string): Promise<boolean>;
|
440
|
-
removeUserFromGroup(groupId: string, userId: string): Promise<void>;
|
441
|
-
search(displayName: string): Promise<{
|
442
|
-
data: Group[] | null;
|
443
|
-
error: ApiError | null;
|
444
|
-
}>;
|
445
|
-
update(id: string, param: {
|
446
|
-
name: string;
|
447
|
-
raw: any;
|
448
|
-
}): Promise<{
|
449
|
-
data: Group | null;
|
450
|
-
error: ApiError | null;
|
451
|
-
}>;
|
452
|
-
}
|
453
|
-
export type User = {
|
454
|
-
id: string;
|
455
|
-
email: string;
|
456
|
-
first_name: string;
|
457
|
-
last_name: string;
|
458
|
-
active: boolean;
|
459
|
-
raw?: any;
|
460
|
-
};
|
461
|
-
export type Group = {
|
462
|
-
id: string;
|
463
|
-
name: string;
|
464
|
-
raw?: any;
|
465
|
-
};
|
466
|
-
export declare enum DirectorySyncProviders {
|
467
|
-
'azure-scim-v2' = "Azure SCIM v2.0",
|
468
|
-
'onelogin-scim-v2' = "OneLogin SCIM v2.0",
|
469
|
-
'okta-scim-v2' = "Okta SCIM v2.0",
|
470
|
-
'jumpcloud-scim-v2' = "JumpCloud v2.0",
|
471
|
-
'generic-scim-v2' = "SCIM Generic v2.0"
|
472
|
-
}
|
473
|
-
export type DirectoryType = keyof typeof DirectorySyncProviders;
|
474
|
-
export type HTTPMethod = 'POST' | 'PUT' | 'DELETE' | 'GET' | 'PATCH';
|
475
|
-
export type Directory = {
|
476
|
-
id: string;
|
477
|
-
name: string;
|
478
|
-
tenant: string;
|
479
|
-
product: string;
|
480
|
-
type: DirectoryType;
|
481
|
-
log_webhook_events: boolean;
|
482
|
-
scim: {
|
483
|
-
path: string;
|
484
|
-
endpoint?: string;
|
485
|
-
secret: string;
|
486
|
-
};
|
487
|
-
webhook: {
|
488
|
-
endpoint: string;
|
489
|
-
secret: string;
|
490
|
-
};
|
491
|
-
};
|
492
|
-
export type DirectorySyncGroupMember = {
|
493
|
-
value: string;
|
494
|
-
email?: string;
|
495
|
-
};
|
496
|
-
export interface DirectoryConfig {
|
497
|
-
create({ name, tenant, product, webhook_url, webhook_secret, type, }: {
|
498
|
-
name?: string;
|
499
|
-
tenant: string;
|
500
|
-
product: string;
|
501
|
-
webhook_url?: string;
|
502
|
-
webhook_secret?: string;
|
503
|
-
type?: DirectoryType;
|
504
|
-
}): Promise<{
|
505
|
-
data: Directory | null;
|
506
|
-
error: ApiError | null;
|
507
|
-
}>;
|
508
|
-
update(id: string, param: Omit<Partial<Directory>, 'id' | 'tenant' | 'prodct' | 'scim'>): Promise<{
|
509
|
-
data: Directory | null;
|
510
|
-
error: ApiError | null;
|
511
|
-
}>;
|
512
|
-
get(id: string): Promise<{
|
513
|
-
data: Directory | null;
|
514
|
-
error: ApiError | null;
|
515
|
-
}>;
|
516
|
-
getByTenantAndProduct(tenant: string, product: string): Promise<{
|
517
|
-
data: Directory | null;
|
518
|
-
error: ApiError | null;
|
519
|
-
}>;
|
520
|
-
list({ pageOffset, pageLimit, }: {
|
521
|
-
pageOffset?: number;
|
522
|
-
pageLimit?: number;
|
523
|
-
}): Promise<{
|
524
|
-
data: Directory[] | null;
|
525
|
-
error: ApiError | null;
|
526
|
-
}>;
|
527
|
-
delete(id: string): Promise<void>;
|
528
|
-
}
|
529
|
-
export interface IDirectoryUsers {
|
530
|
-
create(directory: Directory, body: any): Promise<DirectorySyncResponse>;
|
531
|
-
get(user: User): Promise<DirectorySyncResponse>;
|
532
|
-
update(directory: Directory, user: User, body: any): Promise<DirectorySyncResponse>;
|
533
|
-
patch(directory: Directory, user: User, body: any): Promise<DirectorySyncResponse>;
|
534
|
-
delete(directory: Directory, user: User, active: boolean): Promise<DirectorySyncResponse>;
|
535
|
-
getAll(queryParams: {
|
536
|
-
count: number;
|
537
|
-
startIndex: number;
|
538
|
-
filter?: string;
|
539
|
-
}): Promise<DirectorySyncResponse>;
|
540
|
-
handleRequest(request: DirectorySyncRequest, eventCallback?: EventCallback): Promise<DirectorySyncResponse>;
|
541
|
-
}
|
542
|
-
export interface IDirectoryGroups {
|
543
|
-
create(directory: Directory, body: any): Promise<DirectorySyncResponse>;
|
544
|
-
get(group: Group): Promise<DirectorySyncResponse>;
|
545
|
-
updateDisplayName(directory: Directory, group: Group, body: any): Promise<Group>;
|
546
|
-
delete(directory: Directory, group: Group): Promise<DirectorySyncResponse>;
|
547
|
-
getAll(queryParams: {
|
548
|
-
filter?: string;
|
549
|
-
}): Promise<DirectorySyncResponse>;
|
550
|
-
addGroupMembers(directory: Directory, group: Group, members: DirectorySyncGroupMember[] | undefined, sendWebhookEvent: boolean): Promise<void>;
|
551
|
-
removeGroupMembers(directory: Directory, group: Group, members: DirectorySyncGroupMember[], sendWebhookEvent: boolean): Promise<void>;
|
552
|
-
addOrRemoveGroupMembers(directory: Directory, group: Group, members: DirectorySyncGroupMember[]): Promise<void>;
|
553
|
-
update(directory: Directory, group: Group, body: any): Promise<DirectorySyncResponse>;
|
554
|
-
patch(directory: Directory, group: Group, body: any): Promise<DirectorySyncResponse>;
|
555
|
-
handleRequest(request: DirectorySyncRequest, eventCallback?: EventCallback): Promise<DirectorySyncResponse>;
|
556
|
-
}
|
557
|
-
export interface IWebhookEventsLogger extends Base {
|
558
|
-
log(directory: Directory, event: DirectorySyncEvent): Promise<WebhookEventLog>;
|
559
|
-
getAll({ pageOffset, pageLimit }: {
|
560
|
-
pageOffset?: number;
|
561
|
-
pageLimit?: number;
|
562
|
-
}): Promise<WebhookEventLog[]>;
|
563
|
-
get(id: string): Promise<WebhookEventLog>;
|
564
|
-
clear(): Promise<void>;
|
565
|
-
delete(id: string): Promise<void>;
|
566
|
-
updateStatus(log: WebhookEventLog, statusCode: number): Promise<WebhookEventLog>;
|
567
|
-
}
|
568
|
-
export type DirectorySyncResponse = {
|
569
|
-
status: number;
|
570
|
-
data?: any;
|
571
|
-
};
|
572
|
-
export interface DirectorySyncRequestHandler {
|
573
|
-
handle(request: DirectorySyncRequest, callback?: EventCallback): Promise<DirectorySyncResponse>;
|
574
|
-
}
|
575
|
-
export interface Events {
|
576
|
-
handle(event: DirectorySyncEvent): Promise<void>;
|
577
|
-
}
|
578
|
-
export interface DirectorySyncRequest {
|
579
|
-
method: HTTPMethod;
|
580
|
-
body: any | undefined;
|
581
|
-
directoryId: Directory['id'];
|
582
|
-
resourceType: 'users' | 'groups';
|
583
|
-
resourceId: string | undefined;
|
584
|
-
apiSecret: string | null;
|
585
|
-
query: {
|
586
|
-
count?: number;
|
587
|
-
startIndex?: number;
|
588
|
-
filter?: string;
|
589
|
-
};
|
590
|
-
}
|
591
|
-
export type IDirectorySyncController = {
|
592
|
-
requests: DirectorySyncRequestHandler;
|
593
|
-
directories: DirectoryConfig;
|
594
|
-
groups: Groups;
|
595
|
-
users: Users;
|
596
|
-
events: {
|
597
|
-
callback: EventCallback;
|
598
|
-
};
|
599
|
-
webhookLogs: IWebhookEventsLogger;
|
600
|
-
providers: () => {
|
601
|
-
[K in string]: string;
|
602
|
-
};
|
603
|
-
};
|
604
361
|
export interface ApiError {
|
605
362
|
message: string;
|
606
363
|
code: number;
|
607
364
|
}
|
608
|
-
export interface DirectorySyncEvent {
|
609
|
-
directory_id: Directory['id'];
|
610
|
-
event: DirectorySyncEventType;
|
611
|
-
data: User | Group | (User & {
|
612
|
-
group: Group;
|
613
|
-
});
|
614
|
-
tenant: string;
|
615
|
-
product: string;
|
616
|
-
}
|
617
|
-
export interface EventCallback {
|
618
|
-
(event: DirectorySyncEvent): Promise<void>;
|
619
|
-
}
|
620
|
-
export interface WebhookEventLog extends DirectorySyncEvent {
|
621
|
-
id: string;
|
622
|
-
webhook_endpoint: string;
|
623
|
-
created_at: Date;
|
624
|
-
status_code?: number;
|
625
|
-
delivered?: boolean;
|
626
|
-
}
|
627
365
|
export type SetupLinkCreatePayload = {
|
628
366
|
tenant: string;
|
629
367
|
product: string;
|
package/dist/typings.js
CHANGED
@@ -14,14 +14,6 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
14
|
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
15
15
|
};
|
16
16
|
Object.defineProperty(exports, "__esModule", { value: true });
|
17
|
-
exports.DirectorySyncProviders = void 0;
|
18
17
|
__exportStar(require("./ee/federated-saml/types"), exports);
|
19
|
-
|
20
|
-
(function (DirectorySyncProviders) {
|
21
|
-
DirectorySyncProviders["azure-scim-v2"] = "Azure SCIM v2.0";
|
22
|
-
DirectorySyncProviders["onelogin-scim-v2"] = "OneLogin SCIM v2.0";
|
23
|
-
DirectorySyncProviders["okta-scim-v2"] = "Okta SCIM v2.0";
|
24
|
-
DirectorySyncProviders["jumpcloud-scim-v2"] = "JumpCloud v2.0";
|
25
|
-
DirectorySyncProviders["generic-scim-v2"] = "SCIM Generic v2.0";
|
26
|
-
})(DirectorySyncProviders = exports.DirectorySyncProviders || (exports.DirectorySyncProviders = {}));
|
18
|
+
__exportStar(require("./directory-sync/types"), exports);
|
27
19
|
//# sourceMappingURL=typings.js.map
|
package/dist/typings.js.map
CHANGED
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"typings.js","sourceRoot":"","sources":["../src/typings.ts"],"names":[],"mappings":"
|
1
|
+
{"version":3,"file":"typings.js","sourceRoot":"","sources":["../src/typings.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAEA,4DAA0C;AAC1C,yDAAuC"}
|
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "@boxyhq/saml-jackson",
|
3
|
-
"version": "1.
|
3
|
+
"version": "1.7.1",
|
4
4
|
"description": "SAML Jackson library",
|
5
5
|
"keywords": [
|
6
6
|
"SAML 2.0"
|
@@ -44,11 +44,11 @@
|
|
44
44
|
"@opentelemetry/api": "1.4.0",
|
45
45
|
"axios": "1.2.2",
|
46
46
|
"jose": "4.11.2",
|
47
|
-
"marked": "4.2.
|
47
|
+
"marked": "4.2.12",
|
48
48
|
"mixpanel": "0.17.0",
|
49
49
|
"mongodb": "4.13.0",
|
50
50
|
"mssql": "9.0.1",
|
51
|
-
"mysql2": "3.0.
|
51
|
+
"mysql2": "3.0.1",
|
52
52
|
"node-forge": "1.3.1",
|
53
53
|
"openid-client": "5.3.1",
|
54
54
|
"pg": "8.8.0",
|
@@ -66,7 +66,7 @@
|
|
66
66
|
"@types/tap": "15.0.7",
|
67
67
|
"cross-env": "7.0.3",
|
68
68
|
"sinon": "15.0.1",
|
69
|
-
"tap": "16.3.
|
69
|
+
"tap": "16.3.4",
|
70
70
|
"ts-node": "10.9.1",
|
71
71
|
"tsconfig-paths": "4.1.2",
|
72
72
|
"typescript": "4.9.4"
|