@enterprisestandard/react 0.0.5-beta.20260115.3 → 0.0.5-beta.20260115.4

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.
Files changed (77) hide show
  1. package/dist/index.d.ts +2573 -41
  2. package/dist/index.js +3732 -144
  3. package/dist/index.js.map +1 -0
  4. package/package.json +3 -1
  5. package/dist/group-store.d.ts +0 -164
  6. package/dist/group-store.d.ts.map +0 -1
  7. package/dist/group-store.js +0 -127
  8. package/dist/iam.d.ts +0 -206
  9. package/dist/iam.d.ts.map +0 -1
  10. package/dist/iam.js +0 -680
  11. package/dist/index.d.ts.map +0 -1
  12. package/dist/session-store.d.ts +0 -179
  13. package/dist/session-store.d.ts.map +0 -1
  14. package/dist/session-store.js +0 -105
  15. package/dist/sso-server.d.ts +0 -13
  16. package/dist/sso-server.d.ts.map +0 -1
  17. package/dist/sso-server.js +0 -46
  18. package/dist/sso.d.ts +0 -104
  19. package/dist/sso.d.ts.map +0 -1
  20. package/dist/sso.js +0 -820
  21. package/dist/tenant-server.d.ts +0 -8
  22. package/dist/tenant-server.d.ts.map +0 -1
  23. package/dist/tenant-server.js +0 -6
  24. package/dist/tenant.d.ts +0 -280
  25. package/dist/tenant.d.ts.map +0 -1
  26. package/dist/tenant.js +0 -324
  27. package/dist/types/base-user.d.ts +0 -27
  28. package/dist/types/base-user.d.ts.map +0 -1
  29. package/dist/types/base-user.js +0 -1
  30. package/dist/types/enterprise-user.d.ts +0 -158
  31. package/dist/types/enterprise-user.d.ts.map +0 -1
  32. package/dist/types/enterprise-user.js +0 -1
  33. package/dist/types/oidc-schema.d.ts +0 -86
  34. package/dist/types/oidc-schema.d.ts.map +0 -1
  35. package/dist/types/oidc-schema.js +0 -328
  36. package/dist/types/scim-schema.d.ts +0 -419
  37. package/dist/types/scim-schema.d.ts.map +0 -1
  38. package/dist/types/scim-schema.js +0 -519
  39. package/dist/types/standard-schema.d.ts +0 -56
  40. package/dist/types/standard-schema.d.ts.map +0 -1
  41. package/dist/types/standard-schema.js +0 -1
  42. package/dist/types/user.d.ts +0 -41
  43. package/dist/types/user.d.ts.map +0 -1
  44. package/dist/types/user.js +0 -1
  45. package/dist/types/workload-schema.d.ts +0 -106
  46. package/dist/types/workload-schema.d.ts.map +0 -1
  47. package/dist/types/workload-schema.js +0 -208
  48. package/dist/ui/sign-in-loading.d.ts +0 -5
  49. package/dist/ui/sign-in-loading.d.ts.map +0 -1
  50. package/dist/ui/sign-in-loading.js +0 -8
  51. package/dist/ui/signed-in.d.ts +0 -3
  52. package/dist/ui/signed-in.d.ts.map +0 -1
  53. package/dist/ui/signed-in.js +0 -8
  54. package/dist/ui/signed-out.d.ts +0 -3
  55. package/dist/ui/signed-out.d.ts.map +0 -1
  56. package/dist/ui/signed-out.js +0 -8
  57. package/dist/ui/sso-provider.d.ts +0 -35
  58. package/dist/ui/sso-provider.d.ts.map +0 -1
  59. package/dist/ui/sso-provider.js +0 -275
  60. package/dist/user-store.d.ts +0 -161
  61. package/dist/user-store.d.ts.map +0 -1
  62. package/dist/user-store.js +0 -114
  63. package/dist/utils.d.ts +0 -9
  64. package/dist/utils.d.ts.map +0 -1
  65. package/dist/utils.js +0 -23
  66. package/dist/vault.d.ts +0 -18
  67. package/dist/vault.d.ts.map +0 -1
  68. package/dist/vault.js +0 -22
  69. package/dist/workload-server.d.ts +0 -127
  70. package/dist/workload-server.d.ts.map +0 -1
  71. package/dist/workload-server.js +0 -167
  72. package/dist/workload-token-store.d.ts +0 -187
  73. package/dist/workload-token-store.d.ts.map +0 -1
  74. package/dist/workload-token-store.js +0 -95
  75. package/dist/workload.d.ts +0 -227
  76. package/dist/workload.d.ts.map +0 -1
  77. package/dist/workload.js +0 -691
package/package.json CHANGED
@@ -1,13 +1,15 @@
1
1
  {
2
2
  "name": "@enterprisestandard/react",
3
- "version": "0.0.5-beta.20260115.3",
3
+ "version": "0.0.5-beta.20260115.4",
4
4
  "description": "Enterprise Standard React Components",
5
5
  "private": false,
6
+ "type": "module",
6
7
  "main": "dist/index.js",
7
8
  "types": "./dist/index.d.ts",
8
9
  "exports": {
9
10
  ".": {
10
11
  "types": "./dist/index.d.ts",
12
+ "import": "./dist/index.js",
11
13
  "default": "./dist/index.js"
12
14
  }
13
15
  },
@@ -1,164 +0,0 @@
1
- /**
2
- * Group storage for persisting group data.
3
- *
4
- * Group stores are an optional extension for the IAM Groups functionality.
5
- * They enable:
6
- * - Caching group data locally for fast lookups
7
- * - Receiving group provisioning from external IAM providers (SCIM server)
8
- * - Storing groups close to your application (in-memory, Redis, database)
9
- *
10
- * ## Example Usage
11
- *
12
- * ```typescript
13
- * import { InMemoryGroupStore } from '@enterprisestandard/react';
14
- *
15
- * const groupStore = new InMemoryGroupStore();
16
- *
17
- * // Store a group
18
- * await groupStore.upsert({
19
- * id: 'group-123',
20
- * displayName: 'Administrators',
21
- * createdAt: new Date(),
22
- * updatedAt: new Date(),
23
- * });
24
- *
25
- * // Look up groups
26
- * const group = await groupStore.get('group-123');
27
- * const allGroups = await groupStore.list();
28
- * ```
29
- */
30
- import type { GroupMember } from './types/scim-schema';
31
- /**
32
- * Stored group data with required id and tracking metadata.
33
- *
34
- * @template TExtended - Type-safe custom data that consumers can add to groups
35
- */
36
- export type StoredGroup<TExtended = {}> = {
37
- /**
38
- * Required unique identifier for the group.
39
- * This is the primary key for group storage.
40
- */
41
- id: string;
42
- /**
43
- * Required human-readable name for the group.
44
- */
45
- displayName: string;
46
- /**
47
- * Optional external identifier from provisioning client.
48
- */
49
- externalId?: string;
50
- /**
51
- * List of members in the group.
52
- */
53
- members?: GroupMember[];
54
- /**
55
- * Timestamp when the group was first stored.
56
- */
57
- createdAt: Date;
58
- /**
59
- * Timestamp when the group was last updated.
60
- */
61
- updatedAt: Date;
62
- } & TExtended;
63
- /**
64
- * Abstract interface for group storage backends.
65
- *
66
- * Consumers can implement this interface to use different storage backends:
67
- * - In-memory (for development/testing)
68
- * - Redis (for production with fast lookups)
69
- * - Database (PostgreSQL, MySQL, etc.)
70
- *
71
- * @template TExtended - Type-safe custom data that consumers can add to groups
72
- */
73
- export interface GroupStore<TExtended = {}> {
74
- /**
75
- * Retrieve a group by its unique identifier.
76
- *
77
- * @param id - The group's unique identifier
78
- * @returns The group if found, null otherwise
79
- */
80
- get(id: string): Promise<StoredGroup<TExtended> | null>;
81
- /**
82
- * Retrieve a group by its external identifier.
83
- *
84
- * @param externalId - The external identifier from the provisioning client
85
- * @returns The group if found, null otherwise
86
- */
87
- getByExternalId(externalId: string): Promise<StoredGroup<TExtended> | null>;
88
- /**
89
- * Retrieve a group by its display name.
90
- *
91
- * @param displayName - The group's display name
92
- * @returns The group if found, null otherwise
93
- */
94
- getByDisplayName(displayName: string): Promise<StoredGroup<TExtended> | null>;
95
- /**
96
- * List all groups in the store.
97
- *
98
- * @returns Array of all stored groups
99
- */
100
- list(): Promise<StoredGroup<TExtended>[]>;
101
- /**
102
- * Create or update a group in the store.
103
- *
104
- * If a group with the same `id` exists, it will be updated.
105
- * Otherwise, a new group will be created.
106
- *
107
- * @param group - The group data to store
108
- */
109
- upsert(group: StoredGroup<TExtended>): Promise<void>;
110
- /**
111
- * Delete a group by its unique identifier.
112
- *
113
- * @param id - The group's unique identifier to delete
114
- */
115
- delete(id: string): Promise<void>;
116
- /**
117
- * Add a member to a group.
118
- *
119
- * @param groupId - The group's unique identifier
120
- * @param member - The member to add
121
- */
122
- addMember(groupId: string, member: GroupMember): Promise<void>;
123
- /**
124
- * Remove a member from a group.
125
- *
126
- * @param groupId - The group's unique identifier
127
- * @param memberId - The member's value/id to remove
128
- */
129
- removeMember(groupId: string, memberId: string): Promise<void>;
130
- }
131
- /**
132
- * In-memory group store implementation using Maps.
133
- *
134
- * Suitable for:
135
- * - Development and testing
136
- * - Single-server deployments
137
- * - Applications without high availability requirements
138
- *
139
- * NOT suitable for:
140
- * - Multi-server deployments (groups not shared)
141
- * - High availability scenarios (groups lost on restart)
142
- * - Production applications with distributed architecture
143
- *
144
- * For production, implement GroupStore with Redis or a database.
145
- *
146
- * @template TExtended - Type-safe custom data that consumers can add to groups
147
- */
148
- export declare class InMemoryGroupStore<TExtended = {}> implements GroupStore<TExtended> {
149
- /** Primary storage: id -> group */
150
- private groups;
151
- /** Secondary index: externalId -> id */
152
- private externalIdIndex;
153
- /** Secondary index: displayName (lowercase) -> id */
154
- private displayNameIndex;
155
- get(id: string): Promise<StoredGroup<TExtended> | null>;
156
- getByExternalId(externalId: string): Promise<StoredGroup<TExtended> | null>;
157
- getByDisplayName(displayName: string): Promise<StoredGroup<TExtended> | null>;
158
- list(): Promise<StoredGroup<TExtended>[]>;
159
- upsert(group: StoredGroup<TExtended>): Promise<void>;
160
- delete(id: string): Promise<void>;
161
- addMember(groupId: string, member: GroupMember): Promise<void>;
162
- removeMember(groupId: string, memberId: string): Promise<void>;
163
- }
164
- //# sourceMappingURL=group-store.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"group-store.d.ts","sourceRoot":"","sources":["../src/group-store.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA4BG;AAEH,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,qBAAqB,CAAC;AAEvD;;;;GAIG;AACH,MAAM,MAAM,WAAW,CAAC,SAAS,GAAG,EAAE,IAAI;IACxC;;;OAGG;IACH,EAAE,EAAE,MAAM,CAAC;IAEX;;OAEG;IACH,WAAW,EAAE,MAAM,CAAC;IAEpB;;OAEG;IACH,UAAU,CAAC,EAAE,MAAM,CAAC;IAEpB;;OAEG;IACH,OAAO,CAAC,EAAE,WAAW,EAAE,CAAC;IAExB;;OAEG;IACH,SAAS,EAAE,IAAI,CAAC;IAEhB;;OAEG;IACH,SAAS,EAAE,IAAI,CAAC;CACjB,GAAG,SAAS,CAAC;AAEd;;;;;;;;;GASG;AACH,MAAM,WAAW,UAAU,CAAC,SAAS,GAAG,EAAE;IACxC;;;;;OAKG;IACH,GAAG,CAAC,EAAE,EAAE,MAAM,GAAG,OAA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AAS,CAAC,GAAG,IAAI,CAAC;IAM3E,gBAAgB,CAAC,WAAW,EAAE,MAAM,GAAG,OAAO,CAAC,WAAW,CAAC,SAAS,CAAC,GAAG,IAAI,CAAC;IAM7E,IAAI,IAAI,OAAO,CAAC,WAAW,CAAC,SAAS,CAAC,EAAE,CAAC;IAIzC,MAAM,CAAC,KAAK,EAAE,WAAW,CAAC,SAAS,CAAC,GAAG,OAAO,CAAC,IAAI,CAAC;IAuBpD,MAAM,CAAC,EAAE,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC;IAYjC,SAAS,CAAC,OAAO,EAAE,MAAM,EAAE,MAAM,EAAE,WAAW,GAAG,OAAO,CAAC,IAAI,CAAC;IAgB9D,YAAY,CAAC,OAAO,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC;CAWrE"}
@@ -1,127 +0,0 @@
1
- /**
2
- * Group storage for persisting group data.
3
- *
4
- * Group stores are an optional extension for the IAM Groups functionality.
5
- * They enable:
6
- * - Caching group data locally for fast lookups
7
- * - Receiving group provisioning from external IAM providers (SCIM server)
8
- * - Storing groups close to your application (in-memory, Redis, database)
9
- *
10
- * ## Example Usage
11
- *
12
- * ```typescript
13
- * import { InMemoryGroupStore } from '@enterprisestandard/react';
14
- *
15
- * const groupStore = new InMemoryGroupStore();
16
- *
17
- * // Store a group
18
- * await groupStore.upsert({
19
- * id: 'group-123',
20
- * displayName: 'Administrators',
21
- * createdAt: new Date(),
22
- * updatedAt: new Date(),
23
- * });
24
- *
25
- * // Look up groups
26
- * const group = await groupStore.get('group-123');
27
- * const allGroups = await groupStore.list();
28
- * ```
29
- */
30
- /**
31
- * In-memory group store implementation using Maps.
32
- *
33
- * Suitable for:
34
- * - Development and testing
35
- * - Single-server deployments
36
- * - Applications without high availability requirements
37
- *
38
- * NOT suitable for:
39
- * - Multi-server deployments (groups not shared)
40
- * - High availability scenarios (groups lost on restart)
41
- * - Production applications with distributed architecture
42
- *
43
- * For production, implement GroupStore with Redis or a database.
44
- *
45
- * @template TExtended - Type-safe custom data that consumers can add to groups
46
- */
47
- export class InMemoryGroupStore {
48
- constructor() {
49
- /** Primary storage: id -> group */
50
- this.groups = new Map();
51
- /** Secondary index: externalId -> id */
52
- this.externalIdIndex = new Map();
53
- /** Secondary index: displayName (lowercase) -> id */
54
- this.displayNameIndex = new Map();
55
- }
56
- async get(id) {
57
- return this.groups.get(id) ?? null;
58
- }
59
- async getByExternalId(externalId) {
60
- const id = this.externalIdIndex.get(externalId);
61
- if (!id)
62
- return null;
63
- return this.groups.get(id) ?? null;
64
- }
65
- async getByDisplayName(displayName) {
66
- const id = this.displayNameIndex.get(displayName.toLowerCase());
67
- if (!id)
68
- return null;
69
- return this.groups.get(id) ?? null;
70
- }
71
- async list() {
72
- return Array.from(this.groups.values());
73
- }
74
- async upsert(group) {
75
- const existing = this.groups.get(group.id);
76
- // Clean up old indexes if externalId or displayName changed
77
- if (existing) {
78
- if (existing.externalId && existing.externalId !== group.externalId) {
79
- this.externalIdIndex.delete(existing.externalId);
80
- }
81
- if (existing.displayName.toLowerCase() !== group.displayName.toLowerCase()) {
82
- this.displayNameIndex.delete(existing.displayName.toLowerCase());
83
- }
84
- }
85
- // Store the group
86
- this.groups.set(group.id, group);
87
- // Update indexes
88
- if (group.externalId) {
89
- this.externalIdIndex.set(group.externalId, group.id);
90
- }
91
- this.displayNameIndex.set(group.displayName.toLowerCase(), group.id);
92
- }
93
- async delete(id) {
94
- const group = this.groups.get(id);
95
- if (group) {
96
- // Clean up indexes
97
- if (group.externalId) {
98
- this.externalIdIndex.delete(group.externalId);
99
- }
100
- this.displayNameIndex.delete(group.displayName.toLowerCase());
101
- }
102
- this.groups.delete(id);
103
- }
104
- async addMember(groupId, member) {
105
- const group = this.groups.get(groupId);
106
- if (!group) {
107
- throw new Error(`Group ${groupId} not found`);
108
- }
109
- const members = group.members ?? [];
110
- // Check if member already exists
111
- if (!members.some((m) => m.value === member.value)) {
112
- members.push(member);
113
- group.members = members;
114
- group.updatedAt = new Date();
115
- }
116
- }
117
- async removeMember(groupId, memberId) {
118
- const group = this.groups.get(groupId);
119
- if (!group) {
120
- throw new Error(`Group ${groupId} not found`);
121
- }
122
- if (group.members) {
123
- group.members = group.members.filter((m) => m.value !== memberId);
124
- group.updatedAt = new Date();
125
- }
126
- }
127
- }
package/dist/iam.d.ts DELETED
@@ -1,206 +0,0 @@
1
- import type { GroupStore } from './group-store';
2
- import type { GroupMember, GroupResource, User } from './types/scim-schema';
3
- import type { StandardSchemaV1 } from './types/standard-schema';
4
- import type { UserStore } from './user-store';
5
- import type { Workload } from './workload';
6
- /**
7
- * SCIM Error response structure
8
- */
9
- export interface ScimError {
10
- schemas: string[];
11
- status: string;
12
- scimType?: string;
13
- detail?: string;
14
- }
15
- /**
16
- * SCIM List Response for bulk operations
17
- */
18
- export interface ScimListResponse<T> {
19
- schemas: string[];
20
- totalResults: number;
21
- startIndex?: number;
22
- itemsPerPage?: number;
23
- Resources: T[];
24
- }
25
- /**
26
- * Result of a SCIM operation
27
- */
28
- export interface ScimResult<T> {
29
- success: boolean;
30
- data?: T;
31
- error?: ScimError;
32
- status: number;
33
- }
34
- /**
35
- * Handler configuration for IAM
36
- */
37
- export interface IAMHandlerConfig {
38
- /**
39
- * Base path for the SCIM Users endpoints (e.g., '/api/iam/Users')
40
- */
41
- usersUrl?: string;
42
- /**
43
- * Base path for the SCIM Groups endpoints (e.g., '/api/iam/Groups')
44
- */
45
- groupsUrl?: string;
46
- }
47
- /**
48
- * IAM configuration
49
- *
50
- * - If `url` is provided, groups_outbound is enabled (app calls external IAM)
51
- * - If `group_store` is provided, groups_inbound is enabled (external IAM calls app)
52
- * - If `user_store` is provided, users_inbound is enabled (external IAM calls app)
53
- */
54
- export type IAMConfig = {
55
- /**
56
- * Base URL of the external SCIM endpoint (e.g., https://sailpoint.example.com/scim/v2)
57
- * If provided, enables outbound SCIM operations (app -> external IAM)
58
- */
59
- url?: string;
60
- /**
61
- * Store for inbound user provisioning from external IAM providers.
62
- * When configured, the app can receive user CRUD operations via SCIM.
63
- */
64
- user_store?: UserStore;
65
- /**
66
- * Store for inbound group provisioning from external IAM providers.
67
- * When configured, enables groups_inbound (external IAM -> app).
68
- */
69
- group_store?: GroupStore;
70
- /**
71
- * Optional handler defaults. These are merged with per-call overrides in
72
- * `iam.handler`, with per-call values taking precedence.
73
- */
74
- usersUrl?: string;
75
- groupsUrl?: string;
76
- };
77
- /**
78
- * Options for creating a group
79
- */
80
- export interface CreateGroupOptions {
81
- /**
82
- * External identifier for the group
83
- */
84
- externalId?: string;
85
- /**
86
- * Initial members to add to the group
87
- */
88
- members?: GroupMember[];
89
- /**
90
- * Custom validation schema for the response
91
- */
92
- validation?: StandardSchemaV1<unknown, GroupResource>;
93
- }
94
- /**
95
- * Options for creating a user
96
- */
97
- export interface CreateUserOptions {
98
- /**
99
- * Custom validation schema for the response
100
- */
101
- validation?: StandardSchemaV1<unknown, User>;
102
- }
103
- /**
104
- * Handler configuration for groups_inbound
105
- */
106
- export interface GroupsInboundHandlerConfig {
107
- /**
108
- * Base path for the SCIM Groups endpoints (e.g., '/api/iam/Groups')
109
- */
110
- basePath?: string;
111
- }
112
- /**
113
- * Handler configuration for users_inbound
114
- */
115
- export interface UsersInboundHandlerConfig {
116
- /**
117
- * Base path for the SCIM Users endpoints (e.g., '/api/iam/Users')
118
- */
119
- basePath?: string;
120
- }
121
- /**
122
- * Groups Outbound extension - for creating groups in external IAM providers.
123
- * Enabled when `url` is configured in IAMConfig.
124
- */
125
- export type IAMGroupsOutbound = {
126
- /**
127
- * Create a new group in the external IAM provider
128
- * @param displayName - The display name for the group
129
- * @param options - Optional configuration for the group creation
130
- * @returns The created group resource from the provider
131
- */
132
- createGroup: (displayName: string, options?: CreateGroupOptions) => Promise<ScimResult<GroupResource>>;
133
- };
134
- /**
135
- * Groups Inbound extension - for receiving group provisioning from external IAM providers.
136
- * Enabled when `group_store` is configured in IAMConfig.
137
- */
138
- export type IAMGroupsInbound = {
139
- /**
140
- * Handle inbound SCIM requests for group management.
141
- * Routes: GET/POST /Groups, GET/PUT/PATCH/DELETE /Groups/:id
142
- */
143
- handler: (request: Request, config?: GroupsInboundHandlerConfig) => Promise<Response>;
144
- };
145
- /**
146
- * Users Inbound extension - for receiving user provisioning from external IAM providers.
147
- * Enabled when `user_store` is configured in IAMConfig.
148
- */
149
- export type IAMUsersInbound = {
150
- /**
151
- * Handle inbound SCIM requests for user management.
152
- * Routes: GET/POST /Users, GET/PUT/PATCH/DELETE /Users/:id
153
- */
154
- handler: (request: Request, config?: UsersInboundHandlerConfig) => Promise<Response>;
155
- };
156
- /**
157
- * Core IAM service interface.
158
- *
159
- * - Core functions are user-related (outbound to external IAM)
160
- * - `groups_outbound` is available when `url` is configured
161
- * - `groups_inbound` is available when `group_store` is configured
162
- * - `users_inbound` is available when `user_store` is configured
163
- */
164
- export type IAM = IAMConfig & {
165
- /**
166
- * Create a new user/account in the external IAM provider
167
- * Only available when `url` is configured.
168
- */
169
- createUser?: (user: User, options?: CreateUserOptions) => Promise<ScimResult<User>>;
170
- /**
171
- * Get the configured external SCIM base URL
172
- */
173
- getBaseUrl: () => string | undefined;
174
- /**
175
- * Groups Outbound extension - create groups in external IAM provider.
176
- * Available when `url` is configured in IAMConfig.
177
- */
178
- groups_outbound?: IAMGroupsOutbound;
179
- /**
180
- * Groups Inbound extension - receive group provisioning from external IAM.
181
- * Available when `group_store` is configured in IAMConfig.
182
- */
183
- groups_inbound?: IAMGroupsInbound;
184
- /**
185
- * Users Inbound extension - receive user provisioning from external IAM.
186
- * Available when `user_store` is configured in IAMConfig.
187
- */
188
- users_inbound?: IAMUsersInbound;
189
- /**
190
- * Framework-agnostic request handler for IAM endpoints.
191
- * Routes to users_inbound or groups_inbound handlers based on the request path.
192
- */
193
- handler: (request: Request, config?: IAMHandlerConfig) => Promise<Response>;
194
- };
195
- /**
196
- * Creates an IAM service instance.
197
- *
198
- * - If `url` is configured, enables outbound SCIM operations to external IAM
199
- * - If `group_store` is configured, enables inbound SCIM operations from external IAM
200
- *
201
- * @param config - IAM configuration
202
- * @param workload - Workload instance for authentication
203
- * @returns IAM service instance
204
- */
205
- export declare function iam(config: IAMConfig, workload: Workload): IAM;
206
- //# sourceMappingURL=iam.d.ts.map
package/dist/iam.d.ts.map DELETED
@@ -1 +0,0 @@
1
- {"version":3,"file":"iam.d.ts","sourceRoot":"","sources":["../src/iam.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAe,MAAM,eAAe,CAAC;AAC7D,OAAO,KAAK,EAAE,WAAW,EAAE,aAAa,EAAE,IAAI,EAAE,MAAM,qBAAqB,CAAC;AAE5E,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,yBAAyB,CAAC;AAChE,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AAC9C,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAC;AAE3C;;GAEG;AACH,MAAM,WAAW,SAAS;IACxB,OAAO,EAAE,MAAM,EAAE,CAAC;IAClB,MAAM,EAAE,MAAM,CAAC;IACf,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,MAAM,CAAC,EAAE,MAAM,CAAC;CACjB;AAED;;GAEG;AACH,MAAM,WAAW,gBAAgB,CAAC,CAAC;IACjC,OAAO,EAAE,MAAM,EAAE,CAAC;IAClB,YAAY,EAAE,MAAM,CAAC;IACrB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,SAAS,EAAE,CAAC,EAAE,CAAC;CAChB;AAED;;GAEG;AACH,MAAM,WAAW,UAAU,CAAC,CAAC;IAC3B,OAAO,EAAE,OAAO,CAAC;IACjB,IAAI,CAAC,EAAE,CAAC,CAAC;IACT,KAAK,CAAC,EAAE,SAAS,CAAC;IAClB,MAAM,EAAE,MAAM,CAAC;CAChB;AAED;;GAEG;AACH,MAAM,WAAW,gBAAgB;IAC/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