@blimu/nestjs 0.4.0 → 0.4.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/package.json +1 -1
- package/dist/services/blimu-runtime.service.d.ts +0 -149
- package/dist/services/blimu-runtime.service.d.ts.map +0 -1
- package/dist/services/blimu-runtime.service.js +0 -199
- package/dist/services/blimu-runtime.service.js.map +0 -1
- package/dist/types/request.types.d.ts +0 -31
- package/dist/types/request.types.d.ts.map +0 -1
- package/dist/types/request.types.js +0 -2
- package/dist/types/request.types.js.map +0 -1
package/package.json
CHANGED
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
"type": "git",
|
|
5
5
|
"url": "git+https://github.com/blimu/blimu-nestjs.git"
|
|
6
6
|
},
|
|
7
|
-
"version": "0.4.
|
|
7
|
+
"version": "0.4.1",
|
|
8
8
|
"description": "NestJS integration library for Blimu authorization and entitlement system",
|
|
9
9
|
"main": "dist/index.js",
|
|
10
10
|
"types": "dist/index.d.ts",
|
|
@@ -1,149 +0,0 @@
|
|
|
1
|
-
import { BlimuRuntime, Schema } from '@blimu/runtime-sdk';
|
|
2
|
-
import type { BlimuConfig } from '../config/blimu.config';
|
|
3
|
-
/**
|
|
4
|
-
* Injectable service that provides access to the Blimu Runtime SDK
|
|
5
|
-
*
|
|
6
|
-
* This service creates and manages a configured instance of the Blimu Runtime client,
|
|
7
|
-
* making it easy to interact with Blimu APIs from within your NestJS services.
|
|
8
|
-
*/
|
|
9
|
-
export declare class BlimuRuntimeService {
|
|
10
|
-
private readonly config;
|
|
11
|
-
private readonly client;
|
|
12
|
-
constructor(config: BlimuConfig);
|
|
13
|
-
/**
|
|
14
|
-
* Get the configured Blimu Runtime client
|
|
15
|
-
*
|
|
16
|
-
* @returns The configured BlimuRuntime instance
|
|
17
|
-
*
|
|
18
|
-
* @example
|
|
19
|
-
* ```typescript
|
|
20
|
-
* @Injectable()
|
|
21
|
-
* export class MyService {
|
|
22
|
-
* constructor(private readonly blimuRuntime: BlimuRuntimeService) {}
|
|
23
|
-
*
|
|
24
|
-
* async checkUserEntitlement(userId: string, entitlement: string, resourceId: string) {
|
|
25
|
-
* const client = this.blimuRuntime.getClient();
|
|
26
|
-
* return await client.entitlements.checkEntitlement({
|
|
27
|
-
* userId,
|
|
28
|
-
* entitlement,
|
|
29
|
-
* resourceId,
|
|
30
|
-
* });
|
|
31
|
-
* }
|
|
32
|
-
* }
|
|
33
|
-
* ```
|
|
34
|
-
*/
|
|
35
|
-
getClient(): BlimuRuntime;
|
|
36
|
-
/**
|
|
37
|
-
* Convenience method to check entitlements
|
|
38
|
-
*
|
|
39
|
-
* @param userId - The user ID to check entitlements for
|
|
40
|
-
* @param entitlement - The entitlement key to check
|
|
41
|
-
* @param resourceId - The resource ID to check entitlements on
|
|
42
|
-
* @returns Promise resolving to the entitlement check result
|
|
43
|
-
*
|
|
44
|
-
* @example
|
|
45
|
-
* ```typescript
|
|
46
|
-
* const result = await this.blimuRuntime.checkEntitlement(
|
|
47
|
-
* 'user123',
|
|
48
|
-
* 'workspace:read',
|
|
49
|
-
* 'workspace456'
|
|
50
|
-
* );
|
|
51
|
-
*
|
|
52
|
-
* if (result.allowed) {
|
|
53
|
-
* // User has permission
|
|
54
|
-
* }
|
|
55
|
-
* ```
|
|
56
|
-
*/
|
|
57
|
-
checkEntitlement(userId: string, entitlement: Schema.EntitlementType, resourceId: string): Promise<Schema.EntitlementCheckResultDto_Output>;
|
|
58
|
-
/**
|
|
59
|
-
* Convenience method to assign a role to a user on a resource
|
|
60
|
-
*
|
|
61
|
-
* @param userId - The user ID to assign the role to
|
|
62
|
-
* @param role - The role to assign
|
|
63
|
-
* @param resourceType - The type of resource
|
|
64
|
-
* @param resourceId - The ID of the resource
|
|
65
|
-
* @returns Promise resolving to the role assignment result
|
|
66
|
-
*
|
|
67
|
-
* @example
|
|
68
|
-
* ```typescript
|
|
69
|
-
* await this.blimuRuntime.assignRole(
|
|
70
|
-
* 'user123',
|
|
71
|
-
* 'admin',
|
|
72
|
-
* 'workspace',
|
|
73
|
-
* 'workspace456'
|
|
74
|
-
* );
|
|
75
|
-
* ```
|
|
76
|
-
*/
|
|
77
|
-
assignRole(userId: string, role: string, resourceType: Schema.ResourceType, resourceId: string): Promise<Schema.RoleDto_Output>;
|
|
78
|
-
/**
|
|
79
|
-
* Convenience method to remove a role from a user on a resource
|
|
80
|
-
*
|
|
81
|
-
* @param userId - The user ID to remove the role from
|
|
82
|
-
* @param resourceType - The type of resource
|
|
83
|
-
* @param resourceId - The ID of the resource
|
|
84
|
-
* @returns Promise resolving to the role removal result
|
|
85
|
-
*
|
|
86
|
-
* @example
|
|
87
|
-
* ```typescript
|
|
88
|
-
* await this.blimuRuntime.removeRole(
|
|
89
|
-
* 'user123',
|
|
90
|
-
* 'workspace',
|
|
91
|
-
* 'workspace456'
|
|
92
|
-
* );
|
|
93
|
-
* ```
|
|
94
|
-
*/
|
|
95
|
-
removeRole(userId: string, resourceType: Schema.ResourceType, resourceId: string): Promise<unknown>;
|
|
96
|
-
/**
|
|
97
|
-
* Convenience method to create workspace resources in bulk
|
|
98
|
-
*
|
|
99
|
-
* @param resources - Array of workspace resource data to create
|
|
100
|
-
* @returns Promise resolving to the bulk creation result
|
|
101
|
-
*
|
|
102
|
-
* @example
|
|
103
|
-
* ```typescript
|
|
104
|
-
* await this.blimuRuntime.bulkCreateWorkspaces([
|
|
105
|
-
* { id: 'workspace456', extraFields: { name: 'My Workspace' } }
|
|
106
|
-
* ]);
|
|
107
|
-
* ```
|
|
108
|
-
*/
|
|
109
|
-
bulkCreateWorkspaces(resources: Schema.WorkspaceBulkCreateBodyDto['resources']): Promise<Schema.ResourceBulkResultDto_Output>;
|
|
110
|
-
/**
|
|
111
|
-
* Convenience method to delete a workspace resource
|
|
112
|
-
*
|
|
113
|
-
* @param resourceId - The ID of the workspace to delete
|
|
114
|
-
* @returns Promise resolving to the deletion result
|
|
115
|
-
*
|
|
116
|
-
* @example
|
|
117
|
-
* ```typescript
|
|
118
|
-
* await this.blimuRuntime.deleteWorkspace('workspace456');
|
|
119
|
-
* ```
|
|
120
|
-
*/
|
|
121
|
-
deleteWorkspace(resourceId: string): Promise<unknown>;
|
|
122
|
-
/**
|
|
123
|
-
* Convenience method to create environment resources in bulk
|
|
124
|
-
*
|
|
125
|
-
* @param resources - Array of environment resource data to create
|
|
126
|
-
* @returns Promise resolving to the bulk creation result
|
|
127
|
-
*
|
|
128
|
-
* @example
|
|
129
|
-
* ```typescript
|
|
130
|
-
* await this.blimuRuntime.bulkCreateEnvironments([
|
|
131
|
-
* { id: 'env123', workspaceId: 'workspace456', extraFields: { name: 'Production' } }
|
|
132
|
-
* ]);
|
|
133
|
-
* ```
|
|
134
|
-
*/
|
|
135
|
-
bulkCreateEnvironments(resources: Schema.EnvironmentBulkCreateBodyDto['resources']): Promise<Schema.ResourceBulkResultDto_Output>;
|
|
136
|
-
/**
|
|
137
|
-
* Convenience method to delete an environment resource
|
|
138
|
-
*
|
|
139
|
-
* @param resourceId - The ID of the environment to delete
|
|
140
|
-
* @returns Promise resolving to the deletion result
|
|
141
|
-
*
|
|
142
|
-
* @example
|
|
143
|
-
* ```typescript
|
|
144
|
-
* await this.blimuRuntime.deleteEnvironment('env123');
|
|
145
|
-
* ```
|
|
146
|
-
*/
|
|
147
|
-
deleteEnvironment(resourceId: string): Promise<unknown>;
|
|
148
|
-
}
|
|
149
|
-
//# sourceMappingURL=blimu-runtime.service.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"blimu-runtime.service.d.ts","sourceRoot":"","sources":["../../src/services/blimu-runtime.service.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,YAAY,EAAE,MAAM,EAAE,MAAM,oBAAoB,CAAC;AAC1D,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,wBAAwB,CAAC;AAG1D;;;;;GAKG;AACH,qBACa,mBAAmB;IAK5B,OAAO,CAAC,QAAQ,CAAC,MAAM;IAJzB,OAAO,CAAC,QAAQ,CAAC,MAAM,CAAe;gBAInB,MAAM,EAAE,WAAW;IAStC;;;;;;;;;;;;;;;;;;;;;OAqBG;IACH,SAAS,IAAI,YAAY;IAIzB;;;;;;;;;;;;;;;;;;;;OAoBG;IACG,gBAAgB,CACpB,MAAM,EAAE,MAAM,EACd,WAAW,EAAE,MAAM,CAAC,eAAe,EACnC,UAAU,EAAE,MAAM,GACjB,OAAO,CAAC,MAAM,CAAC,gCAAgC,CAAC;IAQnD;;;;;;;;;;;;;;;;;;OAkBG;IACG,UAAU,CACd,MAAM,EAAE,MAAM,EACd,IAAI,EAAE,MAAM,EACZ,YAAY,EAAE,MAAM,CAAC,YAAY,EACjC,UAAU,EAAE,MAAM,GACjB,OAAO,CAAC,MAAM,CAAC,cAAc,CAAC;IAQjC;;;;;;;;;;;;;;;;OAgBG;IACG,UAAU,CACd,MAAM,EAAE,MAAM,EACd,YAAY,EAAE,MAAM,CAAC,YAAY,EACjC,UAAU,EAAE,MAAM,GACjB,OAAO,CAAC,OAAO,CAAC;IAInB;;;;;;;;;;;;OAYG;IACG,oBAAoB,CACxB,SAAS,EAAE,MAAM,CAAC,0BAA0B,CAAC,WAAW,CAAC,GACxD,OAAO,CAAC,MAAM,CAAC,4BAA4B,CAAC;IAI/C;;;;;;;;;;OAUG;IACG,eAAe,CAAC,UAAU,EAAE,MAAM,GAAG,OAAO,CAAC,OAAO,CAAC;IAI3D;;;;;;;;;;;;OAYG;IACG,sBAAsB,CAC1B,SAAS,EAAE,MAAM,CAAC,4BAA4B,CAAC,WAAW,CAAC,GAC1D,OAAO,CAAC,MAAM,CAAC,4BAA4B,CAAC;IAI/C;;;;;;;;;;OAUG;IACG,iBAAiB,CAAC,UAAU,EAAE,MAAM,GAAG,OAAO,CAAC,OAAO,CAAC;CAG9D"}
|
|
@@ -1,199 +0,0 @@
|
|
|
1
|
-
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
2
|
-
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
3
|
-
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
4
|
-
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
5
|
-
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
6
|
-
};
|
|
7
|
-
var __metadata = (this && this.__metadata) || function (k, v) {
|
|
8
|
-
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
9
|
-
};
|
|
10
|
-
var __param = (this && this.__param) || function (paramIndex, decorator) {
|
|
11
|
-
return function (target, key) { decorator(target, key, paramIndex); }
|
|
12
|
-
};
|
|
13
|
-
import { Injectable, Inject } from '@nestjs/common';
|
|
14
|
-
import { BlimuRuntime } from '@blimu/runtime-sdk';
|
|
15
|
-
import { BLIMU_CONFIG } from '../config/blimu.config';
|
|
16
|
-
/**
|
|
17
|
-
* Injectable service that provides access to the Blimu Runtime SDK
|
|
18
|
-
*
|
|
19
|
-
* This service creates and manages a configured instance of the Blimu Runtime client,
|
|
20
|
-
* making it easy to interact with Blimu APIs from within your NestJS services.
|
|
21
|
-
*/
|
|
22
|
-
let BlimuRuntimeService = class BlimuRuntimeService {
|
|
23
|
-
config;
|
|
24
|
-
client;
|
|
25
|
-
constructor(config) {
|
|
26
|
-
this.config = config;
|
|
27
|
-
this.client = new BlimuRuntime({
|
|
28
|
-
apiKeyAuth: this.config.apiSecretKey,
|
|
29
|
-
baseURL: this.config.baseURL || 'https://runtime.blimu.com',
|
|
30
|
-
timeoutMs: this.config.timeoutMs || 30000,
|
|
31
|
-
});
|
|
32
|
-
}
|
|
33
|
-
/**
|
|
34
|
-
* Get the configured Blimu Runtime client
|
|
35
|
-
*
|
|
36
|
-
* @returns The configured BlimuRuntime instance
|
|
37
|
-
*
|
|
38
|
-
* @example
|
|
39
|
-
* ```typescript
|
|
40
|
-
* @Injectable()
|
|
41
|
-
* export class MyService {
|
|
42
|
-
* constructor(private readonly blimuRuntime: BlimuRuntimeService) {}
|
|
43
|
-
*
|
|
44
|
-
* async checkUserEntitlement(userId: string, entitlement: string, resourceId: string) {
|
|
45
|
-
* const client = this.blimuRuntime.getClient();
|
|
46
|
-
* return await client.entitlements.checkEntitlement({
|
|
47
|
-
* userId,
|
|
48
|
-
* entitlement,
|
|
49
|
-
* resourceId,
|
|
50
|
-
* });
|
|
51
|
-
* }
|
|
52
|
-
* }
|
|
53
|
-
* ```
|
|
54
|
-
*/
|
|
55
|
-
getClient() {
|
|
56
|
-
return this.client;
|
|
57
|
-
}
|
|
58
|
-
/**
|
|
59
|
-
* Convenience method to check entitlements
|
|
60
|
-
*
|
|
61
|
-
* @param userId - The user ID to check entitlements for
|
|
62
|
-
* @param entitlement - The entitlement key to check
|
|
63
|
-
* @param resourceId - The resource ID to check entitlements on
|
|
64
|
-
* @returns Promise resolving to the entitlement check result
|
|
65
|
-
*
|
|
66
|
-
* @example
|
|
67
|
-
* ```typescript
|
|
68
|
-
* const result = await this.blimuRuntime.checkEntitlement(
|
|
69
|
-
* 'user123',
|
|
70
|
-
* 'workspace:read',
|
|
71
|
-
* 'workspace456'
|
|
72
|
-
* );
|
|
73
|
-
*
|
|
74
|
-
* if (result.allowed) {
|
|
75
|
-
* // User has permission
|
|
76
|
-
* }
|
|
77
|
-
* ```
|
|
78
|
-
*/
|
|
79
|
-
async checkEntitlement(userId, entitlement, resourceId) {
|
|
80
|
-
return await this.client.entitlements.checkEntitlement({
|
|
81
|
-
userId,
|
|
82
|
-
entitlement,
|
|
83
|
-
resourceId,
|
|
84
|
-
});
|
|
85
|
-
}
|
|
86
|
-
/**
|
|
87
|
-
* Convenience method to assign a role to a user on a resource
|
|
88
|
-
*
|
|
89
|
-
* @param userId - The user ID to assign the role to
|
|
90
|
-
* @param role - The role to assign
|
|
91
|
-
* @param resourceType - The type of resource
|
|
92
|
-
* @param resourceId - The ID of the resource
|
|
93
|
-
* @returns Promise resolving to the role assignment result
|
|
94
|
-
*
|
|
95
|
-
* @example
|
|
96
|
-
* ```typescript
|
|
97
|
-
* await this.blimuRuntime.assignRole(
|
|
98
|
-
* 'user123',
|
|
99
|
-
* 'admin',
|
|
100
|
-
* 'workspace',
|
|
101
|
-
* 'workspace456'
|
|
102
|
-
* );
|
|
103
|
-
* ```
|
|
104
|
-
*/
|
|
105
|
-
async assignRole(userId, role, resourceType, resourceId) {
|
|
106
|
-
return await this.client.roles.create(userId, {
|
|
107
|
-
role,
|
|
108
|
-
resourceType,
|
|
109
|
-
resourceId,
|
|
110
|
-
});
|
|
111
|
-
}
|
|
112
|
-
/**
|
|
113
|
-
* Convenience method to remove a role from a user on a resource
|
|
114
|
-
*
|
|
115
|
-
* @param userId - The user ID to remove the role from
|
|
116
|
-
* @param resourceType - The type of resource
|
|
117
|
-
* @param resourceId - The ID of the resource
|
|
118
|
-
* @returns Promise resolving to the role removal result
|
|
119
|
-
*
|
|
120
|
-
* @example
|
|
121
|
-
* ```typescript
|
|
122
|
-
* await this.blimuRuntime.removeRole(
|
|
123
|
-
* 'user123',
|
|
124
|
-
* 'workspace',
|
|
125
|
-
* 'workspace456'
|
|
126
|
-
* );
|
|
127
|
-
* ```
|
|
128
|
-
*/
|
|
129
|
-
async removeRole(userId, resourceType, resourceId) {
|
|
130
|
-
return await this.client.roles.delete(userId, resourceType, resourceId);
|
|
131
|
-
}
|
|
132
|
-
/**
|
|
133
|
-
* Convenience method to create workspace resources in bulk
|
|
134
|
-
*
|
|
135
|
-
* @param resources - Array of workspace resource data to create
|
|
136
|
-
* @returns Promise resolving to the bulk creation result
|
|
137
|
-
*
|
|
138
|
-
* @example
|
|
139
|
-
* ```typescript
|
|
140
|
-
* await this.blimuRuntime.bulkCreateWorkspaces([
|
|
141
|
-
* { id: 'workspace456', extraFields: { name: 'My Workspace' } }
|
|
142
|
-
* ]);
|
|
143
|
-
* ```
|
|
144
|
-
*/
|
|
145
|
-
async bulkCreateWorkspaces(resources) {
|
|
146
|
-
return await this.client.resources.workspace.bulkCreate({ resources });
|
|
147
|
-
}
|
|
148
|
-
/**
|
|
149
|
-
* Convenience method to delete a workspace resource
|
|
150
|
-
*
|
|
151
|
-
* @param resourceId - The ID of the workspace to delete
|
|
152
|
-
* @returns Promise resolving to the deletion result
|
|
153
|
-
*
|
|
154
|
-
* @example
|
|
155
|
-
* ```typescript
|
|
156
|
-
* await this.blimuRuntime.deleteWorkspace('workspace456');
|
|
157
|
-
* ```
|
|
158
|
-
*/
|
|
159
|
-
async deleteWorkspace(resourceId) {
|
|
160
|
-
return await this.client.resources.workspace.delete(resourceId);
|
|
161
|
-
}
|
|
162
|
-
/**
|
|
163
|
-
* Convenience method to create environment resources in bulk
|
|
164
|
-
*
|
|
165
|
-
* @param resources - Array of environment resource data to create
|
|
166
|
-
* @returns Promise resolving to the bulk creation result
|
|
167
|
-
*
|
|
168
|
-
* @example
|
|
169
|
-
* ```typescript
|
|
170
|
-
* await this.blimuRuntime.bulkCreateEnvironments([
|
|
171
|
-
* { id: 'env123', workspaceId: 'workspace456', extraFields: { name: 'Production' } }
|
|
172
|
-
* ]);
|
|
173
|
-
* ```
|
|
174
|
-
*/
|
|
175
|
-
async bulkCreateEnvironments(resources) {
|
|
176
|
-
return await this.client.resources.environment.bulkCreate({ resources });
|
|
177
|
-
}
|
|
178
|
-
/**
|
|
179
|
-
* Convenience method to delete an environment resource
|
|
180
|
-
*
|
|
181
|
-
* @param resourceId - The ID of the environment to delete
|
|
182
|
-
* @returns Promise resolving to the deletion result
|
|
183
|
-
*
|
|
184
|
-
* @example
|
|
185
|
-
* ```typescript
|
|
186
|
-
* await this.blimuRuntime.deleteEnvironment('env123');
|
|
187
|
-
* ```
|
|
188
|
-
*/
|
|
189
|
-
async deleteEnvironment(resourceId) {
|
|
190
|
-
return await this.client.resources.environment.delete(resourceId);
|
|
191
|
-
}
|
|
192
|
-
};
|
|
193
|
-
BlimuRuntimeService = __decorate([
|
|
194
|
-
Injectable(),
|
|
195
|
-
__param(0, Inject(BLIMU_CONFIG)),
|
|
196
|
-
__metadata("design:paramtypes", [Object])
|
|
197
|
-
], BlimuRuntimeService);
|
|
198
|
-
export { BlimuRuntimeService };
|
|
199
|
-
//# sourceMappingURL=blimu-runtime.service.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"blimu-runtime.service.js","sourceRoot":"","sources":["../../src/services/blimu-runtime.service.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,EAAE,MAAM,gBAAgB,CAAC;AACpD,OAAO,EAAE,YAAY,EAAU,MAAM,oBAAoB,CAAC;AAE1D,OAAO,EAAE,YAAY,EAAE,MAAM,wBAAwB,CAAC;AAEtD;;;;;GAKG;AAEI,IAAM,mBAAmB,GAAzB,MAAM,mBAAmB;IAKX;IAJF,MAAM,CAAe;IAEtC,YAEmB,MAAmB;QAAnB,WAAM,GAAN,MAAM,CAAa;QAEpC,IAAI,CAAC,MAAM,GAAG,IAAI,YAAY,CAAC;YAC7B,UAAU,EAAE,IAAI,CAAC,MAAM,CAAC,YAAY;YACpC,OAAO,EAAE,IAAI,CAAC,MAAM,CAAC,OAAO,IAAI,2BAA2B;YAC3D,SAAS,EAAE,IAAI,CAAC,MAAM,CAAC,SAAS,IAAI,KAAK;SAC1C,CAAC,CAAC;IACL,CAAC;IAED;;;;;;;;;;;;;;;;;;;;;OAqBG;IACH,SAAS;QACP,OAAO,IAAI,CAAC,MAAM,CAAC;IACrB,CAAC;IAED;;;;;;;;;;;;;;;;;;;;OAoBG;IACH,KAAK,CAAC,gBAAgB,CACpB,MAAc,EACd,WAAmC,EACnC,UAAkB;QAElB,OAAO,MAAM,IAAI,CAAC,MAAM,CAAC,YAAY,CAAC,gBAAgB,CAAC;YACrD,MAAM;YACN,WAAW;YACX,UAAU;SACX,CAAC,CAAC;IACL,CAAC;IAED;;;;;;;;;;;;;;;;;;OAkBG;IACH,KAAK,CAAC,UAAU,CACd,MAAc,EACd,IAAY,EACZ,YAAiC,EACjC,UAAkB;QAElB,OAAO,MAAM,IAAI,CAAC,MAAM,CAAC,KAAK,CAAC,MAAM,CAAC,MAAM,EAAE;YAC5C,IAAI;YACJ,YAAY;YACZ,UAAU;SACX,CAAC,CAAC;IACL,CAAC;IAED;;;;;;;;;;;;;;;;OAgBG;IACH,KAAK,CAAC,UAAU,CACd,MAAc,EACd,YAAiC,EACjC,UAAkB;QAElB,OAAO,MAAM,IAAI,CAAC,MAAM,CAAC,KAAK,CAAC,MAAM,CAAC,MAAM,EAAE,YAAY,EAAE,UAAU,CAAC,CAAC;IAC1E,CAAC;IAED;;;;;;;;;;;;OAYG;IACH,KAAK,CAAC,oBAAoB,CACxB,SAAyD;QAEzD,OAAO,MAAM,IAAI,CAAC,MAAM,CAAC,SAAS,CAAC,SAAS,CAAC,UAAU,CAAC,EAAE,SAAS,EAAE,CAAC,CAAC;IACzE,CAAC;IAED;;;;;;;;;;OAUG;IACH,KAAK,CAAC,eAAe,CAAC,UAAkB;QACtC,OAAO,MAAM,IAAI,CAAC,MAAM,CAAC,SAAS,CAAC,SAAS,CAAC,MAAM,CAAC,UAAU,CAAC,CAAC;IAClE,CAAC;IAED;;;;;;;;;;;;OAYG;IACH,KAAK,CAAC,sBAAsB,CAC1B,SAA2D;QAE3D,OAAO,MAAM,IAAI,CAAC,MAAM,CAAC,SAAS,CAAC,WAAW,CAAC,UAAU,CAAC,EAAE,SAAS,EAAE,CAAC,CAAC;IAC3E,CAAC;IAED;;;;;;;;;;OAUG;IACH,KAAK,CAAC,iBAAiB,CAAC,UAAkB;QACxC,OAAO,MAAM,IAAI,CAAC,MAAM,CAAC,SAAS,CAAC,WAAW,CAAC,MAAM,CAAC,UAAU,CAAC,CAAC;IACpE,CAAC;CACF,CAAA;AArMY,mBAAmB;IAD/B,UAAU,EAAE;IAKR,WAAA,MAAM,CAAC,YAAY,CAAC,CAAA;;GAJZ,mBAAmB,CAqM/B"}
|
|
@@ -1,31 +0,0 @@
|
|
|
1
|
-
import { Request } from 'express';
|
|
2
|
-
/**
|
|
3
|
-
* Interface for authenticated user information
|
|
4
|
-
*/
|
|
5
|
-
export interface AuthenticatedUser {
|
|
6
|
-
id: string;
|
|
7
|
-
email: string;
|
|
8
|
-
firstName?: string | null;
|
|
9
|
-
lastName?: string | null;
|
|
10
|
-
scopes?: string[];
|
|
11
|
-
}
|
|
12
|
-
/**
|
|
13
|
-
* Generic authenticated request interface that can be extended by consumers
|
|
14
|
-
* This interface provides the minimum required fields for Blimu entitlement checks
|
|
15
|
-
*/
|
|
16
|
-
export interface BlimuAuthenticatedRequest extends Request {
|
|
17
|
-
/**
|
|
18
|
-
* The authenticated user information
|
|
19
|
-
* Required for entitlement checks
|
|
20
|
-
*/
|
|
21
|
-
user?: AuthenticatedUser;
|
|
22
|
-
/**
|
|
23
|
-
* Optional authentication type information
|
|
24
|
-
*/
|
|
25
|
-
authType?: 'api_key' | 'bearer_token' | 'oauth2_token' | string;
|
|
26
|
-
}
|
|
27
|
-
/**
|
|
28
|
-
* Type alias for backward compatibility and cleaner imports
|
|
29
|
-
*/
|
|
30
|
-
export type AuthenticatedRequest = BlimuAuthenticatedRequest;
|
|
31
|
-
//# sourceMappingURL=request.types.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"request.types.d.ts","sourceRoot":"","sources":["../../src/types/request.types.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,SAAS,CAAC;AAElC;;GAEG;AACH,MAAM,WAAW,iBAAiB;IAChC,EAAE,EAAE,MAAM,CAAC;IACX,KAAK,EAAE,MAAM,CAAC;IACd,SAAS,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAC1B,QAAQ,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IACzB,MAAM,CAAC,EAAE,MAAM,EAAE,CAAC;CACnB;AAED;;;GAGG;AACH,MAAM,WAAW,yBAA0B,SAAQ,OAAO;IACxD;;;OAGG;IACH,IAAI,CAAC,EAAE,iBAAiB,CAAC;IAEzB;;OAEG;IACH,QAAQ,CAAC,EAAE,SAAS,GAAG,cAAc,GAAG,cAAc,GAAG,MAAM,CAAC;CACjE;AAED;;GAEG;AACH,MAAM,MAAM,oBAAoB,GAAG,yBAAyB,CAAC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"request.types.js","sourceRoot":"","sources":["../../src/types/request.types.ts"],"names":[],"mappings":""}
|