@maroonedsoftware/scim 0.1.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/LICENSE +21 -0
- package/README.md +62 -0
- package/dist/errors/scim.error.d.ts +42 -0
- package/dist/errors/scim.error.d.ts.map +1 -0
- package/dist/filter/filter.ast.d.ts +40 -0
- package/dist/filter/filter.ast.d.ts.map +1 -0
- package/dist/filter/filter.parser.d.ts +13 -0
- package/dist/filter/filter.parser.d.ts.map +1 -0
- package/dist/filter/filter.tokenizer.d.ts +14 -0
- package/dist/filter/filter.tokenizer.d.ts.map +1 -0
- package/dist/filter/index.d.ts +4 -0
- package/dist/filter/index.d.ts.map +1 -0
- package/dist/index.d.ts +14 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +2153 -0
- package/dist/index.js.map +1 -0
- package/dist/middleware/index.d.ts +4 -0
- package/dist/middleware/index.d.ts.map +1 -0
- package/dist/middleware/require.scim.scope.middleware.d.ts +11 -0
- package/dist/middleware/require.scim.scope.middleware.d.ts.map +1 -0
- package/dist/middleware/scim.content.type.middleware.d.ts +10 -0
- package/dist/middleware/scim.content.type.middleware.d.ts.map +1 -0
- package/dist/middleware/scim.error.middleware.d.ts +12 -0
- package/dist/middleware/scim.error.middleware.d.ts.map +1 -0
- package/dist/patch/index.d.ts +2 -0
- package/dist/patch/index.d.ts.map +1 -0
- package/dist/patch/patch.applier.d.ts +11 -0
- package/dist/patch/patch.applier.d.ts.map +1 -0
- package/dist/repositories/index.d.ts +4 -0
- package/dist/repositories/index.d.ts.map +1 -0
- package/dist/repositories/repository.types.d.ts +35 -0
- package/dist/repositories/repository.types.d.ts.map +1 -0
- package/dist/repositories/scim.group.repository.d.ts +23 -0
- package/dist/repositories/scim.group.repository.d.ts.map +1 -0
- package/dist/repositories/scim.user.repository.d.ts +34 -0
- package/dist/repositories/scim.user.repository.d.ts.map +1 -0
- package/dist/router/index.d.ts +2 -0
- package/dist/router/index.d.ts.map +1 -0
- package/dist/router/scim.router.d.ts +46 -0
- package/dist/router/scim.router.d.ts.map +1 -0
- package/dist/schemas/enterprise.user.schema.d.ts +8 -0
- package/dist/schemas/enterprise.user.schema.d.ts.map +1 -0
- package/dist/schemas/group.schema.d.ts +8 -0
- package/dist/schemas/group.schema.d.ts.map +1 -0
- package/dist/schemas/index.d.ts +9 -0
- package/dist/schemas/index.d.ts.map +1 -0
- package/dist/schemas/resource.type.schema.d.ts +21 -0
- package/dist/schemas/resource.type.schema.d.ts.map +1 -0
- package/dist/schemas/schema.types.d.ts +33 -0
- package/dist/schemas/schema.types.d.ts.map +1 -0
- package/dist/schemas/service.provider.config.schema.d.ts +53 -0
- package/dist/schemas/service.provider.config.schema.d.ts.map +1 -0
- package/dist/schemas/user.schema.d.ts +9 -0
- package/dist/schemas/user.schema.d.ts.map +1 -0
- package/dist/services/index.d.ts +4 -0
- package/dist/services/index.d.ts.map +1 -0
- package/dist/services/scim.group.service.d.ts +59 -0
- package/dist/services/scim.group.service.d.ts.map +1 -0
- package/dist/services/scim.service.provider.service.d.ts +33 -0
- package/dist/services/scim.service.provider.service.d.ts.map +1 -0
- package/dist/services/scim.user.service.d.ts +62 -0
- package/dist/services/scim.user.service.d.ts.map +1 -0
- package/dist/types/list.response.d.ts +15 -0
- package/dist/types/list.response.d.ts.map +1 -0
- package/dist/types/patch.op.d.ts +25 -0
- package/dist/types/patch.op.d.ts.map +1 -0
- package/dist/types/scim.group.d.ts +14 -0
- package/dist/types/scim.group.d.ts.map +1 -0
- package/dist/types/scim.meta.d.ts +30 -0
- package/dist/types/scim.meta.d.ts.map +1 -0
- package/dist/types/scim.user.d.ts +75 -0
- package/dist/types/scim.user.d.ts.map +1 -0
- package/package.json +64 -0
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
export * from './schema.types.js';
|
|
2
|
+
export * from './user.schema.js';
|
|
3
|
+
export * from './group.schema.js';
|
|
4
|
+
export * from './enterprise.user.schema.js';
|
|
5
|
+
export * from './resource.type.schema.js';
|
|
6
|
+
export * from './service.provider.config.schema.js';
|
|
7
|
+
/** All SCIM core + extension schemas this package ships. */
|
|
8
|
+
export declare const coreSchemas: import("./schema.types.js").ScimSchema[];
|
|
9
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/schemas/index.ts"],"names":[],"mappings":"AAAA,cAAc,mBAAmB,CAAC;AAClC,cAAc,kBAAkB,CAAC;AACjC,cAAc,mBAAmB,CAAC;AAClC,cAAc,6BAA6B,CAAC;AAC5C,cAAc,2BAA2B,CAAC;AAC1C,cAAc,qCAAqC,CAAC;AAMpD,4DAA4D;AAC5D,eAAO,MAAM,WAAW,0CAAkD,CAAC"}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
/** Schema URI for the SCIM ResourceType resource. */
|
|
2
|
+
export declare const ResourceTypeSchemaId = "urn:ietf:params:scim:schemas:core:2.0:ResourceType";
|
|
3
|
+
export interface ScimResourceType {
|
|
4
|
+
schemas: [typeof ResourceTypeSchemaId];
|
|
5
|
+
id: string;
|
|
6
|
+
name: string;
|
|
7
|
+
endpoint: string;
|
|
8
|
+
description: string;
|
|
9
|
+
schema: string;
|
|
10
|
+
schemaExtensions?: Array<{
|
|
11
|
+
schema: string;
|
|
12
|
+
required: boolean;
|
|
13
|
+
}>;
|
|
14
|
+
meta: {
|
|
15
|
+
resourceType: 'ResourceType';
|
|
16
|
+
location?: string;
|
|
17
|
+
};
|
|
18
|
+
}
|
|
19
|
+
export declare const userResourceType: ScimResourceType;
|
|
20
|
+
export declare const groupResourceType: ScimResourceType;
|
|
21
|
+
//# sourceMappingURL=resource.type.schema.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"resource.type.schema.d.ts","sourceRoot":"","sources":["../../src/schemas/resource.type.schema.ts"],"names":[],"mappings":"AAIA,qDAAqD;AACrD,eAAO,MAAM,oBAAoB,uDAAuD,CAAC;AAEzF,MAAM,WAAW,gBAAgB;IAC/B,OAAO,EAAE,CAAC,OAAO,oBAAoB,CAAC,CAAC;IACvC,EAAE,EAAE,MAAM,CAAC;IACX,IAAI,EAAE,MAAM,CAAC;IACb,QAAQ,EAAE,MAAM,CAAC;IACjB,WAAW,EAAE,MAAM,CAAC;IACpB,MAAM,EAAE,MAAM,CAAC;IACf,gBAAgB,CAAC,EAAE,KAAK,CAAC;QAAE,MAAM,EAAE,MAAM,CAAC;QAAC,QAAQ,EAAE,OAAO,CAAA;KAAE,CAAC,CAAC;IAChE,IAAI,EAAE;QACJ,YAAY,EAAE,cAAc,CAAC;QAC7B,QAAQ,CAAC,EAAE,MAAM,CAAC;KACnB,CAAC;CACH;AAED,eAAO,MAAM,gBAAgB,EAAE,gBAS9B,CAAC;AAEF,eAAO,MAAM,iBAAiB,EAAE,gBAQ/B,CAAC"}
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Shape of a SCIM schema document (RFC 7643 §7).
|
|
3
|
+
* Used for the `/Schemas` discovery endpoint output and to describe
|
|
4
|
+
* resource extensions.
|
|
5
|
+
*/
|
|
6
|
+
export interface ScimSchema {
|
|
7
|
+
id: string;
|
|
8
|
+
name: string;
|
|
9
|
+
description: string;
|
|
10
|
+
attributes: ScimAttributeDefinition[];
|
|
11
|
+
meta: {
|
|
12
|
+
resourceType: 'Schema';
|
|
13
|
+
location?: string;
|
|
14
|
+
};
|
|
15
|
+
}
|
|
16
|
+
/**
|
|
17
|
+
* Definition of a single attribute on a SCIM schema.
|
|
18
|
+
*/
|
|
19
|
+
export interface ScimAttributeDefinition {
|
|
20
|
+
name: string;
|
|
21
|
+
type: 'string' | 'boolean' | 'decimal' | 'integer' | 'dateTime' | 'reference' | 'binary' | 'complex';
|
|
22
|
+
subAttributes?: ScimAttributeDefinition[];
|
|
23
|
+
multiValued: boolean;
|
|
24
|
+
description: string;
|
|
25
|
+
required: boolean;
|
|
26
|
+
caseExact?: boolean;
|
|
27
|
+
mutability: 'readOnly' | 'readWrite' | 'immutable' | 'writeOnly';
|
|
28
|
+
returned: 'always' | 'never' | 'default' | 'request';
|
|
29
|
+
uniqueness: 'none' | 'server' | 'global';
|
|
30
|
+
canonicalValues?: string[];
|
|
31
|
+
referenceTypes?: string[];
|
|
32
|
+
}
|
|
33
|
+
//# sourceMappingURL=schema.types.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"schema.types.d.ts","sourceRoot":"","sources":["../../src/schemas/schema.types.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AACH,MAAM,WAAW,UAAU;IACzB,EAAE,EAAE,MAAM,CAAC;IACX,IAAI,EAAE,MAAM,CAAC;IACb,WAAW,EAAE,MAAM,CAAC;IACpB,UAAU,EAAE,uBAAuB,EAAE,CAAC;IACtC,IAAI,EAAE;QACJ,YAAY,EAAE,QAAQ,CAAC;QACvB,QAAQ,CAAC,EAAE,MAAM,CAAC;KACnB,CAAC;CACH;AAED;;GAEG;AACH,MAAM,WAAW,uBAAuB;IACtC,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,QAAQ,GAAG,SAAS,GAAG,SAAS,GAAG,SAAS,GAAG,UAAU,GAAG,WAAW,GAAG,QAAQ,GAAG,SAAS,CAAC;IACrG,aAAa,CAAC,EAAE,uBAAuB,EAAE,CAAC;IAC1C,WAAW,EAAE,OAAO,CAAC;IACrB,WAAW,EAAE,MAAM,CAAC;IACpB,QAAQ,EAAE,OAAO,CAAC;IAClB,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,UAAU,EAAE,UAAU,GAAG,WAAW,GAAG,WAAW,GAAG,WAAW,CAAC;IACjE,QAAQ,EAAE,QAAQ,GAAG,OAAO,GAAG,SAAS,GAAG,SAAS,CAAC;IACrD,UAAU,EAAE,MAAM,GAAG,QAAQ,GAAG,QAAQ,CAAC;IACzC,eAAe,CAAC,EAAE,MAAM,EAAE,CAAC;IAC3B,cAAc,CAAC,EAAE,MAAM,EAAE,CAAC;CAC3B"}
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
/** Schema URI for the SCIM ServiceProviderConfig resource. */
|
|
2
|
+
export declare const ServiceProviderConfigSchemaId = "urn:ietf:params:scim:schemas:core:2.0:ServiceProviderConfig";
|
|
3
|
+
/** Authentication scheme advertised by `/ServiceProviderConfig`. */
|
|
4
|
+
export interface ScimAuthenticationScheme {
|
|
5
|
+
type: 'oauth' | 'oauth2' | 'oauthbearertoken' | 'httpbasic' | 'httpdigest';
|
|
6
|
+
name: string;
|
|
7
|
+
description: string;
|
|
8
|
+
specUri?: string;
|
|
9
|
+
documentationUri?: string;
|
|
10
|
+
primary?: boolean;
|
|
11
|
+
}
|
|
12
|
+
/** Optional features the service provider supports (RFC 7643 §5). */
|
|
13
|
+
export interface ScimServiceProviderConfigOptions {
|
|
14
|
+
documentationUri?: string;
|
|
15
|
+
patch?: {
|
|
16
|
+
supported: boolean;
|
|
17
|
+
};
|
|
18
|
+
bulk?: {
|
|
19
|
+
supported: boolean;
|
|
20
|
+
maxOperations: number;
|
|
21
|
+
maxPayloadSize: number;
|
|
22
|
+
};
|
|
23
|
+
filter?: {
|
|
24
|
+
supported: boolean;
|
|
25
|
+
maxResults: number;
|
|
26
|
+
};
|
|
27
|
+
changePassword?: {
|
|
28
|
+
supported: boolean;
|
|
29
|
+
};
|
|
30
|
+
sort?: {
|
|
31
|
+
supported: boolean;
|
|
32
|
+
};
|
|
33
|
+
etag?: {
|
|
34
|
+
supported: boolean;
|
|
35
|
+
};
|
|
36
|
+
authenticationSchemes?: ScimAuthenticationScheme[];
|
|
37
|
+
}
|
|
38
|
+
/** Materialised ServiceProviderConfig response. */
|
|
39
|
+
export interface ScimServiceProviderConfig extends Required<Omit<ScimServiceProviderConfigOptions, 'documentationUri' | 'authenticationSchemes'>> {
|
|
40
|
+
schemas: [typeof ServiceProviderConfigSchemaId];
|
|
41
|
+
documentationUri?: string;
|
|
42
|
+
authenticationSchemes: ScimAuthenticationScheme[];
|
|
43
|
+
meta: {
|
|
44
|
+
resourceType: 'ServiceProviderConfig';
|
|
45
|
+
location?: string;
|
|
46
|
+
};
|
|
47
|
+
}
|
|
48
|
+
/**
|
|
49
|
+
* Build a SCIM ServiceProviderConfig response object, layering caller options
|
|
50
|
+
* over the toolkit's defaults (PATCH on, filter on, sort on; bulk/changePassword/etag off).
|
|
51
|
+
*/
|
|
52
|
+
export declare const buildServiceProviderConfig: (options?: ScimServiceProviderConfigOptions) => ScimServiceProviderConfig;
|
|
53
|
+
//# sourceMappingURL=service.provider.config.schema.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"service.provider.config.schema.d.ts","sourceRoot":"","sources":["../../src/schemas/service.provider.config.schema.ts"],"names":[],"mappings":"AAAA,8DAA8D;AAC9D,eAAO,MAAM,6BAA6B,gEAAgE,CAAC;AAE3G,oEAAoE;AACpE,MAAM,WAAW,wBAAwB;IACvC,IAAI,EAAE,OAAO,GAAG,QAAQ,GAAG,kBAAkB,GAAG,WAAW,GAAG,YAAY,CAAC;IAC3E,IAAI,EAAE,MAAM,CAAC;IACb,WAAW,EAAE,MAAM,CAAC;IACpB,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAC1B,OAAO,CAAC,EAAE,OAAO,CAAC;CACnB;AAED,qEAAqE;AACrE,MAAM,WAAW,gCAAgC;IAC/C,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAC1B,KAAK,CAAC,EAAE;QAAE,SAAS,EAAE,OAAO,CAAA;KAAE,CAAC;IAC/B,IAAI,CAAC,EAAE;QAAE,SAAS,EAAE,OAAO,CAAC;QAAC,aAAa,EAAE,MAAM,CAAC;QAAC,cAAc,EAAE,MAAM,CAAA;KAAE,CAAC;IAC7E,MAAM,CAAC,EAAE;QAAE,SAAS,EAAE,OAAO,CAAC;QAAC,UAAU,EAAE,MAAM,CAAA;KAAE,CAAC;IACpD,cAAc,CAAC,EAAE;QAAE,SAAS,EAAE,OAAO,CAAA;KAAE,CAAC;IACxC,IAAI,CAAC,EAAE;QAAE,SAAS,EAAE,OAAO,CAAA;KAAE,CAAC;IAC9B,IAAI,CAAC,EAAE;QAAE,SAAS,EAAE,OAAO,CAAA;KAAE,CAAC;IAC9B,qBAAqB,CAAC,EAAE,wBAAwB,EAAE,CAAC;CACpD;AAED,mDAAmD;AACnD,MAAM,WAAW,yBAA0B,SAAQ,QAAQ,CAAC,IAAI,CAAC,gCAAgC,EAAE,kBAAkB,GAAG,uBAAuB,CAAC,CAAC;IAC/I,OAAO,EAAE,CAAC,OAAO,6BAA6B,CAAC,CAAC;IAChD,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAC1B,qBAAqB,EAAE,wBAAwB,EAAE,CAAC;IAClD,IAAI,EAAE;QACJ,YAAY,EAAE,uBAAuB,CAAC;QACtC,QAAQ,CAAC,EAAE,MAAM,CAAC;KACnB,CAAC;CACH;AAUD;;;GAGG;AACH,eAAO,MAAM,0BAA0B,GAAI,UAAS,gCAAqC,KAAG,yBAW1F,CAAC"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import type { ScimSchema } from './schema.types.js';
|
|
2
|
+
/** Schema URI for the SCIM core User resource. */
|
|
3
|
+
export declare const UserSchemaId = "urn:ietf:params:scim:schemas:core:2.0:User";
|
|
4
|
+
/**
|
|
5
|
+
* RFC 7643 §4.1: SCIM core User schema definition. A condensed but
|
|
6
|
+
* spec-compliant subset suitable for `/Schemas` discovery.
|
|
7
|
+
*/
|
|
8
|
+
export declare const userSchema: ScimSchema;
|
|
9
|
+
//# sourceMappingURL=user.schema.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"user.schema.d.ts","sourceRoot":"","sources":["../../src/schemas/user.schema.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAA2B,UAAU,EAAE,MAAM,mBAAmB,CAAC;AAE7E,kDAAkD;AAClD,eAAO,MAAM,YAAY,+CAA+C,CAAC;AAEzE;;;GAGG;AACH,eAAO,MAAM,UAAU,EAAE,UAoFxB,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/services/index.ts"],"names":[],"mappings":"AAAA,cAAc,wBAAwB,CAAC;AACvC,cAAc,yBAAyB,CAAC;AACxC,cAAc,oCAAoC,CAAC"}
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
import { Logger } from '@maroonedsoftware/logger';
|
|
2
|
+
import { ScimGroupRepository } from '../repositories/scim.group.repository.js';
|
|
3
|
+
import type { ScimListQuery, ScimListResult } from '../repositories/repository.types.js';
|
|
4
|
+
import type { ScimGroup } from '../types/scim.group.js';
|
|
5
|
+
import type { ScimPatchOp } from '../types/patch.op.js';
|
|
6
|
+
/**
|
|
7
|
+
* Application service wrapping a {@link ScimGroupRepository}. Mirrors
|
|
8
|
+
* {@link ScimUserService}: id/meta assignment, uniqueness on `displayName`,
|
|
9
|
+
* and PATCH application.
|
|
10
|
+
*/
|
|
11
|
+
export declare class ScimGroupService {
|
|
12
|
+
private readonly repository;
|
|
13
|
+
private readonly logger;
|
|
14
|
+
constructor(repository: ScimGroupRepository, logger: Logger);
|
|
15
|
+
/**
|
|
16
|
+
* Fetch a single group by id.
|
|
17
|
+
*
|
|
18
|
+
* @throws {ScimError} 404 when no group exists with the given id.
|
|
19
|
+
*/
|
|
20
|
+
get(id: string): Promise<ScimGroup>;
|
|
21
|
+
/**
|
|
22
|
+
* List groups matching a parsed SCIM query, returning the page plus the
|
|
23
|
+
* total number of matches.
|
|
24
|
+
*/
|
|
25
|
+
list(query: ScimListQuery): Promise<ScimListResult<ScimGroup>>;
|
|
26
|
+
/**
|
|
27
|
+
* Create a new group. Assigns a server-generated `id` and fills `meta`
|
|
28
|
+
* timestamps.
|
|
29
|
+
*
|
|
30
|
+
* @throws {ScimError} 400 `invalidValue` when `displayName` is missing.
|
|
31
|
+
* @throws {ScimError} 409 `uniqueness` when `displayName` already exists.
|
|
32
|
+
*/
|
|
33
|
+
create(payload: Partial<ScimGroup>): Promise<ScimGroup>;
|
|
34
|
+
/**
|
|
35
|
+
* Replace an existing group wholesale (PUT semantics). Preserves `id` and
|
|
36
|
+
* `meta.created`; updates `meta.lastModified`.
|
|
37
|
+
*
|
|
38
|
+
* @throws {ScimError} 404 when no group exists with the given id.
|
|
39
|
+
* @throws {ScimError} 400 `invalidValue` when `displayName` is missing.
|
|
40
|
+
* @throws {ScimError} 409 `uniqueness` when changing `displayName` would collide.
|
|
41
|
+
*/
|
|
42
|
+
replace(id: string, payload: Partial<ScimGroup>): Promise<ScimGroup>;
|
|
43
|
+
/**
|
|
44
|
+
* Apply a sequence of SCIM PATCH ops and persist the result. Updates
|
|
45
|
+
* `meta.lastModified`.
|
|
46
|
+
*
|
|
47
|
+
* @throws {ScimError} 404 when no group exists with the given id.
|
|
48
|
+
* @throws {ScimError} 400 propagated from {@link applyScimPatch}.
|
|
49
|
+
*/
|
|
50
|
+
patch(id: string, ops: ScimPatchOp[]): Promise<ScimGroup>;
|
|
51
|
+
/**
|
|
52
|
+
* Delete a group by id.
|
|
53
|
+
*
|
|
54
|
+
* @throws {ScimError} 404 when no group exists with the given id.
|
|
55
|
+
*/
|
|
56
|
+
delete(id: string): Promise<void>;
|
|
57
|
+
private normaliseSchemas;
|
|
58
|
+
}
|
|
59
|
+
//# sourceMappingURL=scim.group.service.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"scim.group.service.d.ts","sourceRoot":"","sources":["../../src/services/scim.group.service.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,MAAM,EAAE,MAAM,0BAA0B,CAAC;AAClD,OAAO,EAAE,mBAAmB,EAAE,MAAM,0CAA0C,CAAC;AAC/E,OAAO,KAAK,EAAE,aAAa,EAAE,cAAc,EAAE,MAAM,qCAAqC,CAAC;AACzF,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,wBAAwB,CAAC;AACxD,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,sBAAsB,CAAC;AAKxD;;;;GAIG;AACH,qBACa,gBAAgB;IAEzB,OAAO,CAAC,QAAQ,CAAC,UAAU;IAC3B,OAAO,CAAC,QAAQ,CAAC,MAAM;gBADN,UAAU,EAAE,mBAAmB,EAC/B,MAAM,EAAE,MAAM;IAGjC;;;;OAIG;IACG,GAAG,CAAC,EAAE,EAAE,MAAM,GAAG,OAAO,CAAC,SAAS,CAAC;IAMzC;;;OAGG;IACG,IAAI,CAAC,KAAK,EAAE,aAAa,GAAG,OAAO,CAAC,cAAc,CAAC,SAAS,CAAC,CAAC;IAIpE;;;;;;OAMG;IACG,MAAM,CAAC,OAAO,EAAE,OAAO,CAAC,SAAS,CAAC,GAAG,OAAO,CAAC,SAAS,CAAC;IA0B7D;;;;;;;OAOG;IACG,OAAO,CAAC,EAAE,EAAE,MAAM,EAAE,OAAO,EAAE,OAAO,CAAC,SAAS,CAAC,GAAG,OAAO,CAAC,SAAS,CAAC;IA2B1E;;;;;;OAMG;IACG,KAAK,CAAC,EAAE,EAAE,MAAM,EAAE,GAAG,EAAE,WAAW,EAAE,GAAG,OAAO,CAAC,SAAS,CAAC;IAY/D;;;;OAIG;IACG,MAAM,CAAC,EAAE,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC;IAMvC,OAAO,CAAC,gBAAgB;CAKzB"}
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import { type ScimServiceProviderConfig, type ScimServiceProviderConfigOptions } from '../schemas/service.provider.config.schema.js';
|
|
2
|
+
import { type ScimResourceType } from '../schemas/resource.type.schema.js';
|
|
3
|
+
import type { ScimSchema } from '../schemas/schema.types.js';
|
|
4
|
+
/**
|
|
5
|
+
* Serves the SCIM discovery endpoints: `/ServiceProviderConfig`, `/Schemas`,
|
|
6
|
+
* and `/ResourceTypes`. The config is fixed at construction time — what the
|
|
7
|
+
* server advertises must match what the router actually implements.
|
|
8
|
+
*/
|
|
9
|
+
export declare class ScimServiceProviderService {
|
|
10
|
+
private readonly config;
|
|
11
|
+
private readonly schemas;
|
|
12
|
+
private readonly resourceTypes;
|
|
13
|
+
constructor(options?: ScimServiceProviderConfigOptions);
|
|
14
|
+
/** The materialised `/ServiceProviderConfig` response. */
|
|
15
|
+
getServiceProviderConfig(): ScimServiceProviderConfig;
|
|
16
|
+
/** Every schema known to this server, served from `/Schemas`. */
|
|
17
|
+
listSchemas(): ScimSchema[];
|
|
18
|
+
/**
|
|
19
|
+
* Look up a single schema by its URN.
|
|
20
|
+
*
|
|
21
|
+
* @throws {ScimError} 404 if the URN is not registered.
|
|
22
|
+
*/
|
|
23
|
+
getSchema(id: string): ScimSchema;
|
|
24
|
+
/** Every resource type known to this server, served from `/ResourceTypes`. */
|
|
25
|
+
listResourceTypes(): ScimResourceType[];
|
|
26
|
+
/**
|
|
27
|
+
* Look up a single resource type by id (e.g. `User`, `Group`).
|
|
28
|
+
*
|
|
29
|
+
* @throws {ScimError} 404 if the id is not registered.
|
|
30
|
+
*/
|
|
31
|
+
getResourceType(id: string): ScimResourceType;
|
|
32
|
+
}
|
|
33
|
+
//# sourceMappingURL=scim.service.provider.service.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"scim.service.provider.service.d.ts","sourceRoot":"","sources":["../../src/services/scim.service.provider.service.ts"],"names":[],"mappings":"AACA,OAAO,EAA8B,KAAK,yBAAyB,EAAE,KAAK,gCAAgC,EAAE,MAAM,8CAA8C,CAAC;AAEjK,OAAO,EAAuC,KAAK,gBAAgB,EAAE,MAAM,oCAAoC,CAAC;AAChH,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,4BAA4B,CAAC;AAG7D;;;;GAIG;AACH,qBACa,0BAA0B;IACrC,OAAO,CAAC,QAAQ,CAAC,MAAM,CAA4B;IACnD,OAAO,CAAC,QAAQ,CAAC,OAAO,CAAe;IACvC,OAAO,CAAC,QAAQ,CAAC,aAAa,CAAqB;gBAEvC,OAAO,GAAE,gCAAqC;IAM1D,0DAA0D;IAC1D,wBAAwB,IAAI,yBAAyB;IAIrD,iEAAiE;IACjE,WAAW,IAAI,UAAU,EAAE;IAI3B;;;;OAIG;IACH,SAAS,CAAC,EAAE,EAAE,MAAM,GAAG,UAAU;IAMjC,8EAA8E;IAC9E,iBAAiB,IAAI,gBAAgB,EAAE;IAIvC;;;;OAIG;IACH,eAAe,CAAC,EAAE,EAAE,MAAM,GAAG,gBAAgB;CAK9C"}
|
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
import { Logger } from '@maroonedsoftware/logger';
|
|
2
|
+
import { ScimUserRepository } from '../repositories/scim.user.repository.js';
|
|
3
|
+
import type { ScimListQuery, ScimListResult } from '../repositories/repository.types.js';
|
|
4
|
+
import type { ScimUser } from '../types/scim.user.js';
|
|
5
|
+
import type { ScimPatchOp } from '../types/patch.op.js';
|
|
6
|
+
/**
|
|
7
|
+
* Application service wrapping a {@link ScimUserRepository}. Owns id and meta
|
|
8
|
+
* assignment, uniqueness enforcement, and PATCH application — keeping the
|
|
9
|
+
* repository focused on storage concerns.
|
|
10
|
+
*/
|
|
11
|
+
export declare class ScimUserService {
|
|
12
|
+
private readonly repository;
|
|
13
|
+
private readonly logger;
|
|
14
|
+
constructor(repository: ScimUserRepository, logger: Logger);
|
|
15
|
+
/**
|
|
16
|
+
* Fetch a single user by id.
|
|
17
|
+
*
|
|
18
|
+
* @throws {ScimError} 404 if no user exists with the given id.
|
|
19
|
+
*/
|
|
20
|
+
get(id: string): Promise<ScimUser>;
|
|
21
|
+
/**
|
|
22
|
+
* List users matching a parsed SCIM query, returning the page plus the
|
|
23
|
+
* total number of matches (for the `totalResults` envelope field).
|
|
24
|
+
*/
|
|
25
|
+
list(query: ScimListQuery): Promise<ScimListResult<ScimUser>>;
|
|
26
|
+
/**
|
|
27
|
+
* Create a new user. Assigns a server-generated `id`, fills `meta.created`
|
|
28
|
+
* and `meta.lastModified`, and ensures the resource's `schemas` includes the
|
|
29
|
+
* core User URN (and the EnterpriseUser URN when the extension is present).
|
|
30
|
+
*
|
|
31
|
+
* @throws {ScimError} 400 `invalidValue` when `userName` is missing.
|
|
32
|
+
* @throws {ScimError} 409 `uniqueness` when `userName` already exists.
|
|
33
|
+
*/
|
|
34
|
+
create(payload: Partial<ScimUser>): Promise<ScimUser>;
|
|
35
|
+
/**
|
|
36
|
+
* Replace an existing user wholesale (PUT semantics). Preserves the original
|
|
37
|
+
* `id` and `meta.created`; updates `meta.lastModified`.
|
|
38
|
+
*
|
|
39
|
+
* @throws {ScimError} 404 when no user exists with the given id.
|
|
40
|
+
* @throws {ScimError} 400 `invalidValue` when `userName` is missing.
|
|
41
|
+
* @throws {ScimError} 409 `uniqueness` when changing `userName` would collide
|
|
42
|
+
* with another existing user.
|
|
43
|
+
*/
|
|
44
|
+
replace(id: string, payload: Partial<ScimUser>): Promise<ScimUser>;
|
|
45
|
+
/**
|
|
46
|
+
* Apply a sequence of SCIM PATCH ops (RFC 7644 §3.5.2) and persist the
|
|
47
|
+
* result via `replace`. Updates `meta.lastModified`.
|
|
48
|
+
*
|
|
49
|
+
* @throws {ScimError} 404 when no user exists with the given id.
|
|
50
|
+
* @throws {ScimError} 400 propagated from {@link applyScimPatch} for invalid
|
|
51
|
+
* paths, unknown ops, or no-target failures.
|
|
52
|
+
*/
|
|
53
|
+
patch(id: string, ops: ScimPatchOp[]): Promise<ScimUser>;
|
|
54
|
+
/**
|
|
55
|
+
* Delete a user by id.
|
|
56
|
+
*
|
|
57
|
+
* @throws {ScimError} 404 when no user exists with the given id.
|
|
58
|
+
*/
|
|
59
|
+
delete(id: string): Promise<void>;
|
|
60
|
+
private normaliseSchemas;
|
|
61
|
+
}
|
|
62
|
+
//# sourceMappingURL=scim.user.service.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"scim.user.service.d.ts","sourceRoot":"","sources":["../../src/services/scim.user.service.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,MAAM,EAAE,MAAM,0BAA0B,CAAC;AAClD,OAAO,EAAE,kBAAkB,EAAE,MAAM,yCAAyC,CAAC;AAC7E,OAAO,KAAK,EAAE,aAAa,EAAE,cAAc,EAAE,MAAM,qCAAqC,CAAC;AACzF,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,uBAAuB,CAAC;AACtD,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,sBAAsB,CAAC;AAMxD;;;;GAIG;AACH,qBACa,eAAe;IAExB,OAAO,CAAC,QAAQ,CAAC,UAAU;IAC3B,OAAO,CAAC,QAAQ,CAAC,MAAM;gBADN,UAAU,EAAE,kBAAkB,EAC9B,MAAM,EAAE,MAAM;IAGjC;;;;OAIG;IACG,GAAG,CAAC,EAAE,EAAE,MAAM,GAAG,OAAO,CAAC,QAAQ,CAAC;IAMxC;;;OAGG;IACG,IAAI,CAAC,KAAK,EAAE,aAAa,GAAG,OAAO,CAAC,cAAc,CAAC,QAAQ,CAAC,CAAC;IAInE;;;;;;;OAOG;IACG,MAAM,CAAC,OAAO,EAAE,OAAO,CAAC,QAAQ,CAAC,GAAG,OAAO,CAAC,QAAQ,CAAC;IA0B3D;;;;;;;;OAQG;IACG,OAAO,CAAC,EAAE,EAAE,MAAM,EAAE,OAAO,EAAE,OAAO,CAAC,QAAQ,CAAC,GAAG,OAAO,CAAC,QAAQ,CAAC;IA2BxE;;;;;;;OAOG;IACG,KAAK,CAAC,EAAE,EAAE,MAAM,EAAE,GAAG,EAAE,WAAW,EAAE,GAAG,OAAO,CAAC,QAAQ,CAAC;IAY9D;;;;OAIG;IACG,MAAM,CAAC,EAAE,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC;IAMvC,OAAO,CAAC,gBAAgB;CAQzB"}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Schema URI for the SCIM ListResponse message (RFC 7644 §3.4.2).
|
|
3
|
+
*/
|
|
4
|
+
export declare const ListResponseSchema = "urn:ietf:params:scim:api:messages:2.0:ListResponse";
|
|
5
|
+
/**
|
|
6
|
+
* SCIM ListResponse envelope returned from list/search endpoints.
|
|
7
|
+
*/
|
|
8
|
+
export interface ScimListResponse<TResource> {
|
|
9
|
+
schemas: [typeof ListResponseSchema];
|
|
10
|
+
totalResults: number;
|
|
11
|
+
startIndex?: number;
|
|
12
|
+
itemsPerPage?: number;
|
|
13
|
+
Resources?: TResource[];
|
|
14
|
+
}
|
|
15
|
+
//# sourceMappingURL=list.response.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"list.response.d.ts","sourceRoot":"","sources":["../../src/types/list.response.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,eAAO,MAAM,kBAAkB,uDAAuD,CAAC;AAEvF;;GAEG;AACH,MAAM,WAAW,gBAAgB,CAAC,SAAS;IACzC,OAAO,EAAE,CAAC,OAAO,kBAAkB,CAAC,CAAC;IACrC,YAAY,EAAE,MAAM,CAAC;IACrB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,SAAS,CAAC,EAAE,SAAS,EAAE,CAAC;CACzB"}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Schema URI for the SCIM PatchOp message (RFC 7644 §3.5.2).
|
|
3
|
+
*/
|
|
4
|
+
export declare const PatchOpSchema = "urn:ietf:params:scim:api:messages:2.0:PatchOp";
|
|
5
|
+
/**
|
|
6
|
+
* Operation kinds permitted in a SCIM PATCH request.
|
|
7
|
+
* Case-insensitive on the wire; normalised internally.
|
|
8
|
+
*/
|
|
9
|
+
export type ScimPatchOpKind = 'add' | 'replace' | 'remove';
|
|
10
|
+
/**
|
|
11
|
+
* A single PATCH operation as it appears in a PatchOp request body.
|
|
12
|
+
*/
|
|
13
|
+
export interface ScimPatchOp {
|
|
14
|
+
op: ScimPatchOpKind | Uppercase<ScimPatchOpKind> | Capitalize<ScimPatchOpKind>;
|
|
15
|
+
path?: string;
|
|
16
|
+
value?: unknown;
|
|
17
|
+
}
|
|
18
|
+
/**
|
|
19
|
+
* The full PatchOp request envelope.
|
|
20
|
+
*/
|
|
21
|
+
export interface ScimPatchRequest {
|
|
22
|
+
schemas: [typeof PatchOpSchema];
|
|
23
|
+
Operations: ScimPatchOp[];
|
|
24
|
+
}
|
|
25
|
+
//# sourceMappingURL=patch.op.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"patch.op.d.ts","sourceRoot":"","sources":["../../src/types/patch.op.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,eAAO,MAAM,aAAa,kDAAkD,CAAC;AAE7E;;;GAGG;AACH,MAAM,MAAM,eAAe,GAAG,KAAK,GAAG,SAAS,GAAG,QAAQ,CAAC;AAE3D;;GAEG;AACH,MAAM,WAAW,WAAW;IAC1B,EAAE,EAAE,eAAe,GAAG,SAAS,CAAC,eAAe,CAAC,GAAG,UAAU,CAAC,eAAe,CAAC,CAAC;IAC/E,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,KAAK,CAAC,EAAE,OAAO,CAAC;CACjB;AAED;;GAEG;AACH,MAAM,WAAW,gBAAgB;IAC/B,OAAO,EAAE,CAAC,OAAO,aAAa,CAAC,CAAC;IAChC,UAAU,EAAE,WAAW,EAAE,CAAC;CAC3B"}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import type { ScimCommonAttributes } from './scim.meta.js';
|
|
2
|
+
/** Member reference embedded in a Group. */
|
|
3
|
+
export interface ScimGroupMember {
|
|
4
|
+
value: string;
|
|
5
|
+
$ref?: string;
|
|
6
|
+
display?: string;
|
|
7
|
+
type?: 'User' | 'Group';
|
|
8
|
+
}
|
|
9
|
+
/** RFC 7643 §4.2: Group resource. */
|
|
10
|
+
export interface ScimGroup extends ScimCommonAttributes {
|
|
11
|
+
displayName: string;
|
|
12
|
+
members?: ScimGroupMember[];
|
|
13
|
+
}
|
|
14
|
+
//# sourceMappingURL=scim.group.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"scim.group.d.ts","sourceRoot":"","sources":["../../src/types/scim.group.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,gBAAgB,CAAC;AAE3D,4CAA4C;AAC5C,MAAM,WAAW,eAAe;IAC9B,KAAK,EAAE,MAAM,CAAC;IACd,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,IAAI,CAAC,EAAE,MAAM,GAAG,OAAO,CAAC;CACzB;AAED,qCAAqC;AACrC,MAAM,WAAW,SAAU,SAAQ,oBAAoB;IACrD,WAAW,EAAE,MAAM,CAAC;IACpB,OAAO,CAAC,EAAE,eAAe,EAAE,CAAC;CAC7B"}
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The `meta` complex attribute attached to every SCIM resource.
|
|
3
|
+
* See RFC 7643 §3.1.
|
|
4
|
+
*/
|
|
5
|
+
export interface ScimMeta {
|
|
6
|
+
/** The name of the resource type (e.g. `User`, `Group`). */
|
|
7
|
+
resourceType: string;
|
|
8
|
+
/** ISO 8601 timestamp when the resource was first created. */
|
|
9
|
+
created?: string;
|
|
10
|
+
/** ISO 8601 timestamp when the resource was last modified. */
|
|
11
|
+
lastModified?: string;
|
|
12
|
+
/** Absolute URI for the resource. */
|
|
13
|
+
location?: string;
|
|
14
|
+
/** Opaque entity tag for optimistic concurrency. */
|
|
15
|
+
version?: string;
|
|
16
|
+
}
|
|
17
|
+
/**
|
|
18
|
+
* Common properties shared by every SCIM resource (RFC 7643 §3).
|
|
19
|
+
*/
|
|
20
|
+
export interface ScimCommonAttributes {
|
|
21
|
+
/** Server-assigned unique identifier. */
|
|
22
|
+
id: string;
|
|
23
|
+
/** Identifier supplied by the provisioning client. */
|
|
24
|
+
externalId?: string;
|
|
25
|
+
/** Schema URIs declared by this resource. */
|
|
26
|
+
schemas: string[];
|
|
27
|
+
/** Resource metadata (`resourceType`, `created`, `lastModified`, etc.). */
|
|
28
|
+
meta: ScimMeta;
|
|
29
|
+
}
|
|
30
|
+
//# sourceMappingURL=scim.meta.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"scim.meta.d.ts","sourceRoot":"","sources":["../../src/types/scim.meta.ts"],"names":[],"mappings":"AAAA;;;GAGG;AACH,MAAM,WAAW,QAAQ;IACvB,4DAA4D;IAC5D,YAAY,EAAE,MAAM,CAAC;IACrB,8DAA8D;IAC9D,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,8DAA8D;IAC9D,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,qCAAqC;IACrC,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,oDAAoD;IACpD,OAAO,CAAC,EAAE,MAAM,CAAC;CAClB;AAED;;GAEG;AACH,MAAM,WAAW,oBAAoB;IACnC,yCAAyC;IACzC,EAAE,EAAE,MAAM,CAAC;IACX,sDAAsD;IACtD,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,6CAA6C;IAC7C,OAAO,EAAE,MAAM,EAAE,CAAC;IAClB,2EAA2E;IAC3E,IAAI,EAAE,QAAQ,CAAC;CAChB"}
|
|
@@ -0,0 +1,75 @@
|
|
|
1
|
+
import type { ScimCommonAttributes } from './scim.meta.js';
|
|
2
|
+
/** RFC 7643 §4.1.2: complex `name` attribute. */
|
|
3
|
+
export interface ScimUserName {
|
|
4
|
+
formatted?: string;
|
|
5
|
+
familyName?: string;
|
|
6
|
+
givenName?: string;
|
|
7
|
+
middleName?: string;
|
|
8
|
+
honorificPrefix?: string;
|
|
9
|
+
honorificSuffix?: string;
|
|
10
|
+
}
|
|
11
|
+
/** Generic multi-valued attribute shape (email, phone, IM, photo, address, etc.). */
|
|
12
|
+
export interface ScimMultiValuedAttribute<TValue = string> {
|
|
13
|
+
value: TValue;
|
|
14
|
+
display?: string;
|
|
15
|
+
type?: string;
|
|
16
|
+
primary?: boolean;
|
|
17
|
+
}
|
|
18
|
+
/** RFC 7643 §4.1.2: postal address. */
|
|
19
|
+
export interface ScimAddress {
|
|
20
|
+
formatted?: string;
|
|
21
|
+
streetAddress?: string;
|
|
22
|
+
locality?: string;
|
|
23
|
+
region?: string;
|
|
24
|
+
postalCode?: string;
|
|
25
|
+
country?: string;
|
|
26
|
+
type?: string;
|
|
27
|
+
primary?: boolean;
|
|
28
|
+
}
|
|
29
|
+
/** Group membership reference embedded in a User. */
|
|
30
|
+
export interface ScimUserGroupRef {
|
|
31
|
+
value: string;
|
|
32
|
+
$ref?: string;
|
|
33
|
+
display?: string;
|
|
34
|
+
type?: 'direct' | 'indirect';
|
|
35
|
+
}
|
|
36
|
+
/** RFC 7643 §4.3: Enterprise User extension. */
|
|
37
|
+
export interface ScimEnterpriseUser {
|
|
38
|
+
employeeNumber?: string;
|
|
39
|
+
costCenter?: string;
|
|
40
|
+
organization?: string;
|
|
41
|
+
division?: string;
|
|
42
|
+
department?: string;
|
|
43
|
+
manager?: {
|
|
44
|
+
value?: string;
|
|
45
|
+
$ref?: string;
|
|
46
|
+
displayName?: string;
|
|
47
|
+
};
|
|
48
|
+
}
|
|
49
|
+
/** RFC 7643 §4.1: User resource. */
|
|
50
|
+
export interface ScimUser extends ScimCommonAttributes {
|
|
51
|
+
userName: string;
|
|
52
|
+
name?: ScimUserName;
|
|
53
|
+
displayName?: string;
|
|
54
|
+
nickName?: string;
|
|
55
|
+
profileUrl?: string;
|
|
56
|
+
title?: string;
|
|
57
|
+
userType?: string;
|
|
58
|
+
preferredLanguage?: string;
|
|
59
|
+
locale?: string;
|
|
60
|
+
timezone?: string;
|
|
61
|
+
active?: boolean;
|
|
62
|
+
password?: string;
|
|
63
|
+
emails?: ScimMultiValuedAttribute[];
|
|
64
|
+
phoneNumbers?: ScimMultiValuedAttribute[];
|
|
65
|
+
ims?: ScimMultiValuedAttribute[];
|
|
66
|
+
photos?: ScimMultiValuedAttribute[];
|
|
67
|
+
addresses?: ScimAddress[];
|
|
68
|
+
groups?: ScimUserGroupRef[];
|
|
69
|
+
entitlements?: ScimMultiValuedAttribute[];
|
|
70
|
+
roles?: ScimMultiValuedAttribute[];
|
|
71
|
+
x509Certificates?: ScimMultiValuedAttribute[];
|
|
72
|
+
/** EnterpriseUser extension keyed by its schema URI. */
|
|
73
|
+
'urn:ietf:params:scim:schemas:extension:enterprise:2.0:User'?: ScimEnterpriseUser;
|
|
74
|
+
}
|
|
75
|
+
//# sourceMappingURL=scim.user.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"scim.user.d.ts","sourceRoot":"","sources":["../../src/types/scim.user.ts"],"names":[],"mappings":"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"}
|
package/package.json
ADDED
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@maroonedsoftware/scim",
|
|
3
|
+
"version": "0.1.0",
|
|
4
|
+
"description": "SCIM 2.0 (RFC 7643/7644) server toolkit for ServerKit — schemas, filter parser, PATCH applier, error envelope, and a Koa router with abstract repositories.",
|
|
5
|
+
"author": {
|
|
6
|
+
"name": "Marooned Software",
|
|
7
|
+
"url": "https://github.com/MaroonedSoftware/serverkit"
|
|
8
|
+
},
|
|
9
|
+
"bugs": {
|
|
10
|
+
"url": "https://github.com/MaroonedSoftware/serverkit/issues"
|
|
11
|
+
},
|
|
12
|
+
"homepage": "https://github.com/MaroonedSoftware/serverkit/packages/scim#readme",
|
|
13
|
+
"keywords": [
|
|
14
|
+
"backend",
|
|
15
|
+
"scim",
|
|
16
|
+
"scim2",
|
|
17
|
+
"provisioning",
|
|
18
|
+
"identity",
|
|
19
|
+
"serverkit",
|
|
20
|
+
"typescript"
|
|
21
|
+
],
|
|
22
|
+
"repository": {
|
|
23
|
+
"type": "git",
|
|
24
|
+
"url": "https://github.com/MaroonedSoftware/serverkit.git"
|
|
25
|
+
},
|
|
26
|
+
"private": false,
|
|
27
|
+
"type": "module",
|
|
28
|
+
"main": "./dist/index.js",
|
|
29
|
+
"module": "./dist/index.js",
|
|
30
|
+
"types": "./dist/index.d.ts",
|
|
31
|
+
"license": "MIT",
|
|
32
|
+
"files": [
|
|
33
|
+
"dist/**"
|
|
34
|
+
],
|
|
35
|
+
"dependencies": {
|
|
36
|
+
"injectkit": "^1.2.0",
|
|
37
|
+
"@maroonedsoftware/authentication": "4.11.0",
|
|
38
|
+
"@maroonedsoftware/logger": "1.1.0",
|
|
39
|
+
"@maroonedsoftware/koa": "2.1.13",
|
|
40
|
+
"@maroonedsoftware/utilities": "1.7.0",
|
|
41
|
+
"@maroonedsoftware/errors": "1.6.0"
|
|
42
|
+
},
|
|
43
|
+
"peerDependencies": {
|
|
44
|
+
"@koa/router": "^15.2.0",
|
|
45
|
+
"koa": "^3.1.1"
|
|
46
|
+
},
|
|
47
|
+
"devDependencies": {
|
|
48
|
+
"@koa/router": "^15.5.0",
|
|
49
|
+
"@types/koa": "^3.0.2",
|
|
50
|
+
"@types/supertest": "^6.0.3",
|
|
51
|
+
"koa": "^3.2.0",
|
|
52
|
+
"supertest": "^7.1.4",
|
|
53
|
+
"@repo/config-eslint": "0.2.1",
|
|
54
|
+
"@repo/config-typescript": "0.1.0"
|
|
55
|
+
},
|
|
56
|
+
"scripts": {
|
|
57
|
+
"build": "tsup src/index.ts --format esm --sourcemap --dts && tsc --emitDeclarationOnly --declaration",
|
|
58
|
+
"build:ci": "eslint --max-warnings=0 && pnpm run build",
|
|
59
|
+
"lint": "eslint --fix",
|
|
60
|
+
"format": "prettier --write .",
|
|
61
|
+
"test": "vitest run",
|
|
62
|
+
"test:ci": "vitest run --coverage"
|
|
63
|
+
}
|
|
64
|
+
}
|