@mondaydotcomorg/monday-authorization 3.5.0-feat-shaime-support-entity-attributes-in-authorization-sdk-c9e4cfc → 3.5.0-feat-shaime-support-entity-attributes-in-authorization-sdk-8d846f1
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/authorization-attributes-ms-service.d.ts +17 -0
- package/dist/authorization-attributes-ms-service.d.ts.map +1 -1
- package/dist/authorization-attributes-ms-service.js +166 -1
- package/dist/authorization-attributes-service.d.ts +52 -66
- package/dist/authorization-attributes-service.d.ts.map +1 -1
- package/dist/authorization-attributes-service.js +105 -353
- package/dist/constants/sns.d.ts +2 -0
- package/dist/constants/sns.d.ts.map +1 -1
- package/dist/constants/sns.js +4 -0
- package/dist/esm/authorization-attributes-ms-service.d.ts +17 -0
- package/dist/esm/authorization-attributes-ms-service.d.ts.map +1 -1
- package/dist/esm/authorization-attributes-ms-service.mjs +166 -1
- package/dist/esm/authorization-attributes-service.d.ts +52 -66
- package/dist/esm/authorization-attributes-service.d.ts.map +1 -1
- package/dist/esm/authorization-attributes-service.mjs +107 -355
- package/dist/esm/constants/sns.d.ts +2 -0
- package/dist/esm/constants/sns.d.ts.map +1 -1
- package/dist/esm/constants/sns.mjs +3 -1
- package/dist/esm/resource-attribute-assignment.d.ts.map +1 -1
- package/dist/esm/resource-attributes-constants.d.ts +1 -1
- package/dist/esm/resource-attributes-constants.d.ts.map +1 -1
- package/dist/esm/types/authorization-attributes-contracts.d.ts +16 -0
- package/dist/esm/types/authorization-attributes-contracts.d.ts.map +1 -1
- package/dist/esm/types/authorization-attributes-contracts.mjs +6 -1
- package/dist/resource-attribute-assignment.d.ts.map +1 -1
- package/dist/resource-attributes-constants.d.ts +1 -1
- package/dist/resource-attributes-constants.d.ts.map +1 -1
- package/dist/types/authorization-attributes-contracts.d.ts +16 -0
- package/dist/types/authorization-attributes-contracts.d.ts.map +1 -1
- package/dist/types/authorization-attributes-contracts.js +5 -0
- package/package.json +1 -1
- package/src/authorization-attributes-ms-service.ts +258 -17
- package/src/authorization-attributes-service.ts +146 -428
- package/src/constants/sns.ts +2 -0
- package/src/errors/argument-error.ts +1 -2
- package/src/resource-attribute-assignment.ts +1 -4
- package/src/resource-attributes-constants.ts +1 -2
- package/src/types/authorization-attributes-contracts.ts +22 -5
|
@@ -1,112 +1,88 @@
|
|
|
1
1
|
import chunk from 'lodash/chunk.js';
|
|
2
|
-
import { Api } from '@mondaydotcomorg/trident-backend-api';
|
|
3
2
|
import { sendToSns, getTopicAttributes } from '@mondaydotcomorg/monday-sns';
|
|
4
|
-
import {
|
|
5
|
-
import { logger
|
|
6
|
-
import {
|
|
7
|
-
import { ASYNC_RESOURCE_ATTRIBUTES_MAX_OPERATIONS_PER_MESSAGE, SNS_ARN_ENV_VAR_NAME, SNS_DEV_TEST_NAME, RESOURCE_ATTRIBUTES_SNS_UPDATE_OPERATION_MESSAGE_KIND } from './constants/sns.mjs';
|
|
8
|
-
import { ERROR_MESSAGES, DEFAULT_FETCH_OPTIONS, APP_NAME } from './constants.mjs';
|
|
3
|
+
import { ResourceAttributeOperationEnum, EntityAttributeOperationEnum } from './types/authorization-attributes-contracts.mjs';
|
|
4
|
+
import { logger } from './authorization-internal-service.mjs';
|
|
5
|
+
import { ASYNC_RESOURCE_ATTRIBUTES_MAX_OPERATIONS_PER_MESSAGE, ASYNC_ENTITY_ATTRIBUTES_MAX_OPERATIONS_PER_MESSAGE, SNS_ARN_ENV_VAR_NAME, SNS_DEV_TEST_NAME, RESOURCE_ATTRIBUTES_SNS_UPDATE_OPERATION_MESSAGE_KIND, ENTITY_ATTRIBUTES_SNS_UPDATE_OPERATION_MESSAGE_KIND } from './constants/sns.mjs';
|
|
9
6
|
|
|
10
7
|
class AuthorizationAttributesService {
|
|
11
8
|
static LOG_TAG = 'authorization_attributes';
|
|
12
|
-
static API_PATHS = {
|
|
13
|
-
UPSERT_RESOURCE_ATTRIBUTES: '/attributes/{accountId}/resource',
|
|
14
|
-
DELETE_RESOURCE_ATTRIBUTES: '/attributes/{accountId}/resource/{resourceType}/{resourceId}',
|
|
15
|
-
UPSERT_ENTITY_ATTRIBUTES: '/attributes/{accountId}/entity',
|
|
16
|
-
DELETE_ENTITY_ATTRIBUTES: '/attributes/{accountId}/entity/{entityType}/{entityId}',
|
|
17
|
-
};
|
|
18
|
-
httpClient;
|
|
19
|
-
fetchOptions;
|
|
20
9
|
snsArn;
|
|
21
10
|
/**
|
|
22
11
|
* Public constructor to create the AuthorizationAttributesService instance.
|
|
23
|
-
* @param httpClient The HTTP client to use for API requests, if not provided, the default HTTP client from Api will be used.
|
|
24
|
-
* @param fetchOptions The fetch options to use for API requests, if not provided, the default fetch options will be used.
|
|
25
12
|
*/
|
|
26
|
-
constructor(
|
|
27
|
-
if (!httpClient) {
|
|
28
|
-
httpClient = Api.getPart('httpClient');
|
|
29
|
-
if (!httpClient) {
|
|
30
|
-
throw new Error(ERROR_MESSAGES.HTTP_CLIENT_NOT_INITIALIZED);
|
|
31
|
-
}
|
|
32
|
-
}
|
|
33
|
-
if (!fetchOptions) {
|
|
34
|
-
fetchOptions = DEFAULT_FETCH_OPTIONS;
|
|
35
|
-
}
|
|
36
|
-
else {
|
|
37
|
-
fetchOptions = {
|
|
38
|
-
...DEFAULT_FETCH_OPTIONS,
|
|
39
|
-
...fetchOptions,
|
|
40
|
-
};
|
|
41
|
-
}
|
|
42
|
-
this.httpClient = httpClient;
|
|
43
|
-
this.fetchOptions = fetchOptions;
|
|
13
|
+
constructor() {
|
|
44
14
|
this.snsArn = AuthorizationAttributesService.getSnsTopicArn();
|
|
45
15
|
}
|
|
46
16
|
/**
|
|
47
|
-
*
|
|
48
|
-
*
|
|
49
|
-
* @param
|
|
50
|
-
*
|
|
51
|
-
* @
|
|
17
|
+
* Async function to upsert resource attributes using SNS.
|
|
18
|
+
* Sends the updates request to SNS and returns before the change actually took place.
|
|
19
|
+
* @param accountId The account ID
|
|
20
|
+
* @param appName App name of the calling app
|
|
21
|
+
* @param callerActionIdentifier Action identifier
|
|
22
|
+
* @param resourceAttributeAssignments Array of resource attribute assignments to upsert
|
|
23
|
+
* @return Promise with array of sent operations
|
|
52
24
|
*/
|
|
53
|
-
async
|
|
54
|
-
const
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
path: AuthorizationAttributesService.API_PATHS.UPSERT_RESOURCE_ATTRIBUTES.replace('{accountId}', accountId.toString()),
|
|
60
|
-
},
|
|
61
|
-
method: 'POST',
|
|
62
|
-
headers: {
|
|
63
|
-
'Content-Type': 'application/json',
|
|
64
|
-
...attributionHeaders,
|
|
65
|
-
},
|
|
66
|
-
body: JSON.stringify({ resourceAttributeAssignments }),
|
|
67
|
-
}, this.fetchOptions);
|
|
68
|
-
}
|
|
69
|
-
catch (err) {
|
|
70
|
-
if (err instanceof HttpFetcherError) {
|
|
71
|
-
throw new Error(ERROR_MESSAGES.REQUEST_FAILED('upsertResourceAttributes', err.status, err.message));
|
|
72
|
-
}
|
|
73
|
-
throw err;
|
|
74
|
-
}
|
|
25
|
+
async upsertResourceAttributesAsync(accountId, appName, callerActionIdentifier, resourceAttributeAssignments) {
|
|
26
|
+
const operations = resourceAttributeAssignments.map(assignment => ({
|
|
27
|
+
...assignment,
|
|
28
|
+
operationType: ResourceAttributeOperationEnum.UPSERT,
|
|
29
|
+
}));
|
|
30
|
+
return this.updateResourceAttributesAsync(accountId, appName, callerActionIdentifier, operations);
|
|
75
31
|
}
|
|
76
32
|
/**
|
|
77
|
-
*
|
|
78
|
-
*
|
|
79
|
-
* @param
|
|
80
|
-
* @param
|
|
81
|
-
* @
|
|
33
|
+
* Async function to delete resource attributes using SNS.
|
|
34
|
+
* Sends the updates request to SNS and returns before the change actually took place.
|
|
35
|
+
* @param accountId The account ID
|
|
36
|
+
* @param appName App name of the calling app
|
|
37
|
+
* @param callerActionIdentifier Action identifier
|
|
38
|
+
* @param resource The resource (resourceType, resourceId)
|
|
39
|
+
* @param attributeKeys Array of attribute keys to delete
|
|
40
|
+
* @return Promise with array of sent operations
|
|
82
41
|
*/
|
|
83
|
-
async
|
|
84
|
-
const
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
42
|
+
async deleteResourceAttributesAsync(accountId, appName, callerActionIdentifier, resource, attributeKeys) {
|
|
43
|
+
const operations = attributeKeys.map(key => ({
|
|
44
|
+
resourceType: resource.type,
|
|
45
|
+
resourceId: resource.id,
|
|
46
|
+
key,
|
|
47
|
+
operationType: ResourceAttributeOperationEnum.DELETE,
|
|
48
|
+
}));
|
|
49
|
+
return this.updateResourceAttributesAsync(accountId, appName, callerActionIdentifier, operations);
|
|
50
|
+
}
|
|
51
|
+
/**
|
|
52
|
+
* Async function to upsert entity attributes using SNS.
|
|
53
|
+
* Sends the updates request to SNS and returns before the change actually took place.
|
|
54
|
+
* @param accountId The account ID
|
|
55
|
+
* @param appName App name of the calling app
|
|
56
|
+
* @param callerActionIdentifier Action identifier
|
|
57
|
+
* @param entityAttributeAssignments Array of entity attribute assignments to upsert
|
|
58
|
+
* @return Promise with array of sent operations
|
|
59
|
+
*/
|
|
60
|
+
async upsertEntityAttributesAsync(accountId, appName, callerActionIdentifier, entityAttributeAssignments) {
|
|
61
|
+
const operations = entityAttributeAssignments.map(assignment => ({
|
|
62
|
+
...assignment,
|
|
63
|
+
operationType: EntityAttributeOperationEnum.UPSERT,
|
|
64
|
+
}));
|
|
65
|
+
return this.updateEntityAttributesAsync(accountId, appName, callerActionIdentifier, operations);
|
|
66
|
+
}
|
|
67
|
+
/**
|
|
68
|
+
* Async function to delete entity attributes using SNS.
|
|
69
|
+
* Sends the updates request to SNS and returns before the change actually took place.
|
|
70
|
+
* @param accountId The account ID
|
|
71
|
+
* @param appName App name of the calling app
|
|
72
|
+
* @param callerActionIdentifier Action identifier
|
|
73
|
+
* @param entityType The entity type
|
|
74
|
+
* @param entityId The entity ID
|
|
75
|
+
* @param attributeKeys Array of attribute keys to delete
|
|
76
|
+
* @return Promise with array of sent operations
|
|
77
|
+
*/
|
|
78
|
+
async deleteEntityAttributesAsync(accountId, appName, callerActionIdentifier, entityType, entityId, attributeKeys) {
|
|
79
|
+
const operations = attributeKeys.map(key => ({
|
|
80
|
+
entityType: entityType,
|
|
81
|
+
entityId,
|
|
82
|
+
key,
|
|
83
|
+
operationType: EntityAttributeOperationEnum.DELETE,
|
|
84
|
+
}));
|
|
85
|
+
return this.updateEntityAttributesAsync(accountId, appName, callerActionIdentifier, operations);
|
|
110
86
|
}
|
|
111
87
|
/**
|
|
112
88
|
* Async function, this function only send the updates request to SNS and return before the change actually took place
|
|
@@ -121,11 +97,28 @@ class AuthorizationAttributesService {
|
|
|
121
97
|
const sendToSnsPromises = [];
|
|
122
98
|
const operationChucks = chunk(resourceAttributeOperations, ASYNC_RESOURCE_ATTRIBUTES_MAX_OPERATIONS_PER_MESSAGE);
|
|
123
99
|
for (const operationsChunk of operationChucks) {
|
|
124
|
-
sendToSnsPromises.push(this.
|
|
100
|
+
sendToSnsPromises.push(this.sendSingleResourceSnsMessage(topicArn, accountId, appName, callerActionIdentifier, operationsChunk));
|
|
101
|
+
}
|
|
102
|
+
return (await Promise.all(sendToSnsPromises)).flat();
|
|
103
|
+
}
|
|
104
|
+
/**
|
|
105
|
+
* Async function, this function only send the updates request to SNS and return before the change actually took place
|
|
106
|
+
* @param accountId
|
|
107
|
+
* @param appName - App name of the calling app
|
|
108
|
+
* @param callerActionIdentifier - action identifier
|
|
109
|
+
* @param entityAttributeOperations - Array of operations to do on entity attributes.
|
|
110
|
+
* @return {Promise<EntityAttributesOperation[]>} Array of sent operations
|
|
111
|
+
* */
|
|
112
|
+
async updateEntityAttributesAsync(accountId, appName, callerActionIdentifier, entityAttributeOperations) {
|
|
113
|
+
const topicArn = this.snsArn;
|
|
114
|
+
const sendToSnsPromises = [];
|
|
115
|
+
const operationChucks = chunk(entityAttributeOperations, ASYNC_ENTITY_ATTRIBUTES_MAX_OPERATIONS_PER_MESSAGE);
|
|
116
|
+
for (const operationsChunk of operationChucks) {
|
|
117
|
+
sendToSnsPromises.push(this.sendSingleEntitySnsMessage(topicArn, accountId, appName, callerActionIdentifier, operationsChunk));
|
|
125
118
|
}
|
|
126
119
|
return (await Promise.all(sendToSnsPromises)).flat();
|
|
127
120
|
}
|
|
128
|
-
async
|
|
121
|
+
async sendSingleResourceSnsMessage(topicArn, accountId, appName, callerActionIdentifier, operations) {
|
|
129
122
|
const payload = {
|
|
130
123
|
kind: RESOURCE_ATTRIBUTES_SNS_UPDATE_OPERATION_MESSAGE_KIND,
|
|
131
124
|
payload: {
|
|
@@ -144,6 +137,25 @@ class AuthorizationAttributesService {
|
|
|
144
137
|
return [];
|
|
145
138
|
}
|
|
146
139
|
}
|
|
140
|
+
async sendSingleEntitySnsMessage(topicArn, accountId, appName, callerActionIdentifier, operations) {
|
|
141
|
+
const payload = {
|
|
142
|
+
kind: ENTITY_ATTRIBUTES_SNS_UPDATE_OPERATION_MESSAGE_KIND,
|
|
143
|
+
payload: {
|
|
144
|
+
accountId: accountId,
|
|
145
|
+
callerAppName: appName,
|
|
146
|
+
callerActionIdentifier: callerActionIdentifier,
|
|
147
|
+
operations: operations,
|
|
148
|
+
},
|
|
149
|
+
};
|
|
150
|
+
try {
|
|
151
|
+
await sendToSns(payload, topicArn);
|
|
152
|
+
return operations;
|
|
153
|
+
}
|
|
154
|
+
catch (error) {
|
|
155
|
+
logger.error({ error, tag: AuthorizationAttributesService.LOG_TAG }, 'Authorization entity attributes async update: failed to send operations to SNS');
|
|
156
|
+
return [];
|
|
157
|
+
}
|
|
158
|
+
}
|
|
147
159
|
static getSnsTopicArn() {
|
|
148
160
|
const arnFromEnv = process.env[SNS_ARN_ENV_VAR_NAME];
|
|
149
161
|
if (arnFromEnv) {
|
|
@@ -177,266 +189,6 @@ class AuthorizationAttributesService {
|
|
|
177
189
|
return false;
|
|
178
190
|
}
|
|
179
191
|
}
|
|
180
|
-
/**
|
|
181
|
-
* Validates resource attribute assignments array
|
|
182
|
-
*/
|
|
183
|
-
static validateResourceAttributeAssignments(assignments) {
|
|
184
|
-
if (!Array.isArray(assignments)) {
|
|
185
|
-
throw new Error('resourceAttributeAssignments must be an array');
|
|
186
|
-
}
|
|
187
|
-
if (assignments.length === 0) {
|
|
188
|
-
throw new Error('resourceAttributeAssignments must contain at least 1 item');
|
|
189
|
-
}
|
|
190
|
-
if (assignments.length > 100) {
|
|
191
|
-
throw new Error('resourceAttributeAssignments must contain at most 100 items');
|
|
192
|
-
}
|
|
193
|
-
for (let i = 0; i < assignments.length; i++) {
|
|
194
|
-
const assignment = assignments[i];
|
|
195
|
-
if (!assignment.resourceId || typeof assignment.resourceId !== 'number') {
|
|
196
|
-
throw new Error(`resourceAttributeAssignments[${i}].resourceId is required and must be a number`);
|
|
197
|
-
}
|
|
198
|
-
if (!assignment.resourceType || typeof assignment.resourceType !== 'string') {
|
|
199
|
-
throw new Error(`resourceAttributeAssignments[${i}].resourceType is required and must be a string`);
|
|
200
|
-
}
|
|
201
|
-
if (!assignment.key || typeof assignment.key !== 'string') {
|
|
202
|
-
throw new Error(`resourceAttributeAssignments[${i}].key is required and must be a string`);
|
|
203
|
-
}
|
|
204
|
-
if (assignment.value === undefined || typeof assignment.value !== 'string') {
|
|
205
|
-
throw new Error(`resourceAttributeAssignments[${i}].value is required and must be a string`);
|
|
206
|
-
}
|
|
207
|
-
}
|
|
208
|
-
}
|
|
209
|
-
/**
|
|
210
|
-
* Validates entity attribute assignments array
|
|
211
|
-
*/
|
|
212
|
-
static validateEntityAttributeAssignments(assignments) {
|
|
213
|
-
if (!Array.isArray(assignments)) {
|
|
214
|
-
throw new Error('entityAttributeAssignments must be an array');
|
|
215
|
-
}
|
|
216
|
-
if (assignments.length === 0) {
|
|
217
|
-
throw new Error('entityAttributeAssignments must contain at least 1 item');
|
|
218
|
-
}
|
|
219
|
-
if (assignments.length > 100) {
|
|
220
|
-
throw new Error('entityAttributeAssignments must contain at most 100 items');
|
|
221
|
-
}
|
|
222
|
-
for (let i = 0; i < assignments.length; i++) {
|
|
223
|
-
const assignment = assignments[i];
|
|
224
|
-
if (!assignment.entityId || typeof assignment.entityId !== 'number') {
|
|
225
|
-
throw new Error(`entityAttributeAssignments[${i}].entityId is required and must be a number`);
|
|
226
|
-
}
|
|
227
|
-
if (!assignment.entityType || typeof assignment.entityType !== 'string') {
|
|
228
|
-
throw new Error(`entityAttributeAssignments[${i}].entityType is required and must be a string`);
|
|
229
|
-
}
|
|
230
|
-
if (!assignment.key || typeof assignment.key !== 'string') {
|
|
231
|
-
throw new Error(`entityAttributeAssignments[${i}].key is required and must be a string`);
|
|
232
|
-
}
|
|
233
|
-
if (assignment.value === undefined || typeof assignment.value !== 'string') {
|
|
234
|
-
throw new Error(`entityAttributeAssignments[${i}].value is required and must be a string`);
|
|
235
|
-
}
|
|
236
|
-
}
|
|
237
|
-
}
|
|
238
|
-
/**
|
|
239
|
-
* Upsert resource attributes synchronously.
|
|
240
|
-
* Matches API endpoint: POST /attributes/:accountId/resource
|
|
241
|
-
* @param accountId The account ID
|
|
242
|
-
* @param resourceAttributeAssignments Array of ResourceAttributeAssignment objects (1-100 items)
|
|
243
|
-
* @returns Promise with response containing affected attributes
|
|
244
|
-
*/
|
|
245
|
-
static async upsertResourceAttributesSync(accountId, resourceAttributeAssignments) {
|
|
246
|
-
// Validate inputs
|
|
247
|
-
if (!Number.isInteger(accountId)) {
|
|
248
|
-
throw new Error(`accountId must be an integer, got: ${accountId}`);
|
|
249
|
-
}
|
|
250
|
-
AuthorizationAttributesService.validateResourceAttributeAssignments(resourceAttributeAssignments);
|
|
251
|
-
const httpClient = Api.getPart('httpClient');
|
|
252
|
-
if (!httpClient) {
|
|
253
|
-
throw new Error(ERROR_MESSAGES.HTTP_CLIENT_NOT_INITIALIZED);
|
|
254
|
-
}
|
|
255
|
-
const attributionHeaders = getAttributionsFromApi();
|
|
256
|
-
const path = AuthorizationAttributesService.API_PATHS.UPSERT_RESOURCE_ATTRIBUTES.replace('{accountId}', accountId.toString());
|
|
257
|
-
try {
|
|
258
|
-
return await httpClient.fetch({
|
|
259
|
-
url: {
|
|
260
|
-
appName: APP_NAME,
|
|
261
|
-
path,
|
|
262
|
-
},
|
|
263
|
-
method: 'POST',
|
|
264
|
-
headers: {
|
|
265
|
-
'Content-Type': 'application/json',
|
|
266
|
-
...attributionHeaders,
|
|
267
|
-
},
|
|
268
|
-
body: JSON.stringify({ resourceAttributeAssignments }),
|
|
269
|
-
}, {
|
|
270
|
-
timeout: AuthorizationInternalService.getRequestTimeout(),
|
|
271
|
-
retryPolicy: AuthorizationInternalService.getRetriesPolicy(),
|
|
272
|
-
});
|
|
273
|
-
}
|
|
274
|
-
catch (err) {
|
|
275
|
-
if (err instanceof HttpFetcherError) {
|
|
276
|
-
throw new Error(ERROR_MESSAGES.REQUEST_FAILED('upsertResourceAttributesSync', err.status, err.message));
|
|
277
|
-
}
|
|
278
|
-
throw err;
|
|
279
|
-
}
|
|
280
|
-
}
|
|
281
|
-
/**
|
|
282
|
-
* Delete resource attributes synchronously.
|
|
283
|
-
* Matches API endpoint: DELETE /attributes/:accountId/resource/:resourceType/:resourceId
|
|
284
|
-
* @param accountId The account ID
|
|
285
|
-
* @param resourceType The resource type
|
|
286
|
-
* @param resourceId The resource ID
|
|
287
|
-
* @param keys Array of attribute keys to delete
|
|
288
|
-
* @returns Promise with response containing affected attributes
|
|
289
|
-
*/
|
|
290
|
-
static async deleteResourceAttributesSync(accountId, resourceType, resourceId, keys) {
|
|
291
|
-
// Validate inputs
|
|
292
|
-
if (!Number.isInteger(accountId)) {
|
|
293
|
-
throw new Error(`accountId must be an integer, got: ${accountId}`);
|
|
294
|
-
}
|
|
295
|
-
if (!resourceType || typeof resourceType !== 'string') {
|
|
296
|
-
throw new Error(`resourceType must be a string, got: ${typeof resourceType}`);
|
|
297
|
-
}
|
|
298
|
-
if (!Number.isInteger(resourceId)) {
|
|
299
|
-
throw new Error(`resourceId must be an integer, got: ${resourceId}`);
|
|
300
|
-
}
|
|
301
|
-
if (!Array.isArray(keys)) {
|
|
302
|
-
throw new Error('keys must be an array');
|
|
303
|
-
}
|
|
304
|
-
if (keys.length === 0) {
|
|
305
|
-
throw new Error('keys must contain at least 1 item');
|
|
306
|
-
}
|
|
307
|
-
const httpClient = Api.getPart('httpClient');
|
|
308
|
-
if (!httpClient) {
|
|
309
|
-
throw new Error(ERROR_MESSAGES.HTTP_CLIENT_NOT_INITIALIZED);
|
|
310
|
-
}
|
|
311
|
-
const attributionHeaders = getAttributionsFromApi();
|
|
312
|
-
const path = AuthorizationAttributesService.API_PATHS.DELETE_RESOURCE_ATTRIBUTES.replace('{accountId}', accountId.toString())
|
|
313
|
-
.replace('{resourceType}', resourceType)
|
|
314
|
-
.replace('{resourceId}', resourceId.toString());
|
|
315
|
-
try {
|
|
316
|
-
return await httpClient.fetch({
|
|
317
|
-
url: {
|
|
318
|
-
appName: APP_NAME,
|
|
319
|
-
path,
|
|
320
|
-
},
|
|
321
|
-
method: 'DELETE',
|
|
322
|
-
headers: {
|
|
323
|
-
'Content-Type': 'application/json',
|
|
324
|
-
...attributionHeaders,
|
|
325
|
-
},
|
|
326
|
-
body: JSON.stringify({ keys }),
|
|
327
|
-
}, {
|
|
328
|
-
timeout: AuthorizationInternalService.getRequestTimeout(),
|
|
329
|
-
retryPolicy: AuthorizationInternalService.getRetriesPolicy(),
|
|
330
|
-
});
|
|
331
|
-
}
|
|
332
|
-
catch (err) {
|
|
333
|
-
if (err instanceof HttpFetcherError) {
|
|
334
|
-
throw new Error(ERROR_MESSAGES.REQUEST_FAILED('deleteResourceAttributesSync', err.status, err.message));
|
|
335
|
-
}
|
|
336
|
-
throw err;
|
|
337
|
-
}
|
|
338
|
-
}
|
|
339
|
-
/**
|
|
340
|
-
* Upsert entity attributes synchronously.
|
|
341
|
-
* Matches API endpoint: POST /attributes/:accountId/entity
|
|
342
|
-
* @param accountId The account ID
|
|
343
|
-
* @param entityAttributeAssignments Array of EntityAttributeAssignment objects (1-100 items)
|
|
344
|
-
* @returns Promise with response containing affected attributes
|
|
345
|
-
*/
|
|
346
|
-
static async upsertEntityAttributesSync(accountId, entityAttributeAssignments) {
|
|
347
|
-
// Validate inputs
|
|
348
|
-
if (!Number.isInteger(accountId)) {
|
|
349
|
-
throw new Error(`accountId must be an integer, got: ${accountId}`);
|
|
350
|
-
}
|
|
351
|
-
AuthorizationAttributesService.validateEntityAttributeAssignments(entityAttributeAssignments);
|
|
352
|
-
const httpClient = Api.getPart('httpClient');
|
|
353
|
-
if (!httpClient) {
|
|
354
|
-
throw new Error(ERROR_MESSAGES.HTTP_CLIENT_NOT_INITIALIZED);
|
|
355
|
-
}
|
|
356
|
-
const attributionHeaders = getAttributionsFromApi();
|
|
357
|
-
const path = AuthorizationAttributesService.API_PATHS.UPSERT_ENTITY_ATTRIBUTES.replace('{accountId}', accountId.toString());
|
|
358
|
-
try {
|
|
359
|
-
return await httpClient.fetch({
|
|
360
|
-
url: {
|
|
361
|
-
appName: APP_NAME,
|
|
362
|
-
path,
|
|
363
|
-
},
|
|
364
|
-
method: 'POST',
|
|
365
|
-
headers: {
|
|
366
|
-
'Content-Type': 'application/json',
|
|
367
|
-
...attributionHeaders,
|
|
368
|
-
},
|
|
369
|
-
body: JSON.stringify({ entityAttributeAssignments }),
|
|
370
|
-
}, {
|
|
371
|
-
timeout: AuthorizationInternalService.getRequestTimeout(),
|
|
372
|
-
retryPolicy: AuthorizationInternalService.getRetriesPolicy(),
|
|
373
|
-
});
|
|
374
|
-
}
|
|
375
|
-
catch (err) {
|
|
376
|
-
if (err instanceof HttpFetcherError) {
|
|
377
|
-
throw new Error(ERROR_MESSAGES.REQUEST_FAILED('upsertEntityAttributesSync', err.status, err.message));
|
|
378
|
-
}
|
|
379
|
-
throw err;
|
|
380
|
-
}
|
|
381
|
-
}
|
|
382
|
-
/**
|
|
383
|
-
* Delete entity attributes synchronously.
|
|
384
|
-
* Matches API endpoint: DELETE /attributes/:accountId/entity/:entityType/:entityId
|
|
385
|
-
* @param accountId The account ID
|
|
386
|
-
* @param entityType The entity type
|
|
387
|
-
* @param entityId The entity ID
|
|
388
|
-
* @param keys Array of attribute keys to delete
|
|
389
|
-
* @returns Promise with response containing affected attributes
|
|
390
|
-
*/
|
|
391
|
-
static async deleteEntityAttributesSync(accountId, entityType, entityId, keys) {
|
|
392
|
-
// Validate inputs
|
|
393
|
-
if (!Number.isInteger(accountId)) {
|
|
394
|
-
throw new Error(`accountId must be an integer, got: ${accountId}`);
|
|
395
|
-
}
|
|
396
|
-
if (!entityType || typeof entityType !== 'string') {
|
|
397
|
-
throw new Error(`entityType must be a string, got: ${typeof entityType}`);
|
|
398
|
-
}
|
|
399
|
-
if (!Number.isInteger(entityId)) {
|
|
400
|
-
throw new Error(`entityId must be an integer, got: ${entityId}`);
|
|
401
|
-
}
|
|
402
|
-
if (!Array.isArray(keys)) {
|
|
403
|
-
throw new Error('keys must be an array');
|
|
404
|
-
}
|
|
405
|
-
if (keys.length === 0) {
|
|
406
|
-
throw new Error('keys must contain at least 1 item');
|
|
407
|
-
}
|
|
408
|
-
const httpClient = Api.getPart('httpClient');
|
|
409
|
-
if (!httpClient) {
|
|
410
|
-
throw new Error(ERROR_MESSAGES.HTTP_CLIENT_NOT_INITIALIZED);
|
|
411
|
-
}
|
|
412
|
-
const attributionHeaders = getAttributionsFromApi();
|
|
413
|
-
const path = AuthorizationAttributesService.API_PATHS.DELETE_ENTITY_ATTRIBUTES.replace('{accountId}', accountId.toString())
|
|
414
|
-
.replace('{entityType}', entityType)
|
|
415
|
-
.replace('{entityId}', entityId.toString());
|
|
416
|
-
try {
|
|
417
|
-
return await httpClient.fetch({
|
|
418
|
-
url: {
|
|
419
|
-
appName: APP_NAME,
|
|
420
|
-
path,
|
|
421
|
-
},
|
|
422
|
-
method: 'DELETE',
|
|
423
|
-
headers: {
|
|
424
|
-
'Content-Type': 'application/json',
|
|
425
|
-
...attributionHeaders,
|
|
426
|
-
},
|
|
427
|
-
body: JSON.stringify({ keys }),
|
|
428
|
-
}, {
|
|
429
|
-
timeout: AuthorizationInternalService.getRequestTimeout(),
|
|
430
|
-
retryPolicy: AuthorizationInternalService.getRetriesPolicy(),
|
|
431
|
-
});
|
|
432
|
-
}
|
|
433
|
-
catch (err) {
|
|
434
|
-
if (err instanceof HttpFetcherError) {
|
|
435
|
-
throw new Error(ERROR_MESSAGES.REQUEST_FAILED('deleteEntityAttributesSync', err.status, err.message));
|
|
436
|
-
}
|
|
437
|
-
throw err;
|
|
438
|
-
}
|
|
439
|
-
}
|
|
440
192
|
}
|
|
441
193
|
|
|
442
194
|
export { AuthorizationAttributesService };
|
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
export declare const SNS_ARN_ENV_VAR_NAME = "SHARED_AUTHORIZATION_SNS_ENDPOINT_RESOURCE_ATTRIBUTES";
|
|
2
2
|
export declare const SNS_DEV_TEST_NAME = "arn:aws:sns:us-east-1:000000000000:monday-authorization-resource-attributes-sns-local";
|
|
3
3
|
export declare const RESOURCE_ATTRIBUTES_SNS_UPDATE_OPERATION_MESSAGE_KIND = "resourceAttributeModification";
|
|
4
|
+
export declare const ENTITY_ATTRIBUTES_SNS_UPDATE_OPERATION_MESSAGE_KIND = "entityAttributeModification";
|
|
4
5
|
export declare const ASYNC_RESOURCE_ATTRIBUTES_MAX_OPERATIONS_PER_MESSAGE = 100;
|
|
6
|
+
export declare const ASYNC_ENTITY_ATTRIBUTES_MAX_OPERATIONS_PER_MESSAGE = 100;
|
|
5
7
|
//# sourceMappingURL=sns.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"sns.d.ts","sourceRoot":"","sources":["../../../src/constants/sns.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,oBAAoB,0DAA0D,CAAC;AAC5F,eAAO,MAAM,iBAAiB,0FAC2D,CAAC;AAC1F,eAAO,MAAM,qDAAqD,kCAAkC,CAAC;AACrG,eAAO,MAAM,oDAAoD,MAAM,CAAC"}
|
|
1
|
+
{"version":3,"file":"sns.d.ts","sourceRoot":"","sources":["../../../src/constants/sns.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,oBAAoB,0DAA0D,CAAC;AAC5F,eAAO,MAAM,iBAAiB,0FAC2D,CAAC;AAC1F,eAAO,MAAM,qDAAqD,kCAAkC,CAAC;AACrG,eAAO,MAAM,mDAAmD,gCAAgC,CAAC;AACjG,eAAO,MAAM,oDAAoD,MAAM,CAAC;AACxE,eAAO,MAAM,kDAAkD,MAAM,CAAC"}
|
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
const SNS_ARN_ENV_VAR_NAME = 'SHARED_AUTHORIZATION_SNS_ENDPOINT_RESOURCE_ATTRIBUTES';
|
|
2
2
|
const SNS_DEV_TEST_NAME = 'arn:aws:sns:us-east-1:000000000000:monday-authorization-resource-attributes-sns-local';
|
|
3
3
|
const RESOURCE_ATTRIBUTES_SNS_UPDATE_OPERATION_MESSAGE_KIND = 'resourceAttributeModification';
|
|
4
|
+
const ENTITY_ATTRIBUTES_SNS_UPDATE_OPERATION_MESSAGE_KIND = 'entityAttributeModification';
|
|
4
5
|
const ASYNC_RESOURCE_ATTRIBUTES_MAX_OPERATIONS_PER_MESSAGE = 100;
|
|
6
|
+
const ASYNC_ENTITY_ATTRIBUTES_MAX_OPERATIONS_PER_MESSAGE = 100;
|
|
5
7
|
|
|
6
|
-
export { ASYNC_RESOURCE_ATTRIBUTES_MAX_OPERATIONS_PER_MESSAGE, RESOURCE_ATTRIBUTES_SNS_UPDATE_OPERATION_MESSAGE_KIND, SNS_ARN_ENV_VAR_NAME, SNS_DEV_TEST_NAME };
|
|
8
|
+
export { ASYNC_ENTITY_ATTRIBUTES_MAX_OPERATIONS_PER_MESSAGE, ASYNC_RESOURCE_ATTRIBUTES_MAX_OPERATIONS_PER_MESSAGE, ENTITY_ATTRIBUTES_SNS_UPDATE_OPERATION_MESSAGE_KIND, RESOURCE_ATTRIBUTES_SNS_UPDATE_OPERATION_MESSAGE_KIND, SNS_ARN_ENV_VAR_NAME, SNS_DEV_TEST_NAME };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"resource-attribute-assignment.d.ts","sourceRoot":"","sources":["../../src/resource-attribute-assignment.ts"],"names":[],"mappings":"AAAA,OAAO,EAAkB,YAAY,EAAE,MAAM,iCAAiC,CAAC;AAG/E,qBAAa,2BAA2B;IACtC,SAAgB,UAAU,EAAE,MAAM,CAAC;IACnC,SAAgB,YAAY,EAAE,YAAY,CAAC;IAC3C,SAAgB,YAAY,EAAE,MAAM,CAAC;IACrC,SAAgB,cAAc,EAAE,MAAM,CAAC;gBAE3B,UAAU,EAAE,MAAM,EAAE,YAAY,EAAE,MAAM,EAAE,YAAY,EAAE,MAAM,EAAE,cAAc,EAAE,MAAM;
|
|
1
|
+
{"version":3,"file":"resource-attribute-assignment.d.ts","sourceRoot":"","sources":["../../src/resource-attribute-assignment.ts"],"names":[],"mappings":"AAAA,OAAO,EAAkB,YAAY,EAAE,MAAM,iCAAiC,CAAC;AAG/E,qBAAa,2BAA2B;IACtC,SAAgB,UAAU,EAAE,MAAM,CAAC;IACnC,SAAgB,YAAY,EAAE,YAAY,CAAC;IAC3C,SAAgB,YAAY,EAAE,MAAM,CAAC;IACrC,SAAgB,cAAc,EAAE,MAAM,CAAC;gBAE3B,UAAU,EAAE,MAAM,EAAE,YAAY,EAAE,MAAM,EAAE,YAAY,EAAE,MAAM,EAAE,cAAc,EAAE,MAAM;IA4BlG;;;OAGG;IACH,GAAG,IAAI;QAAE,UAAU,EAAE,MAAM,CAAC;QAAC,YAAY,EAAE,MAAM,CAAC;QAAC,GAAG,EAAE,MAAM,CAAC;QAAC,KAAK,EAAE,MAAM,CAAA;KAAE;IAS/E;;;;OAIG;IACH,MAAM,CAAC,KAAK,EAAE,2BAA2B,GAAG,OAAO;CAWpD"}
|
|
@@ -21,5 +21,5 @@ export declare const RESOURCE_ATTRIBUTES_CONSTANTS: {
|
|
|
21
21
|
readonly SYSTEM_ENTITY_TYPE: "system_entity_type";
|
|
22
22
|
};
|
|
23
23
|
};
|
|
24
|
-
export type ResourceType = typeof RESOURCE_TYPES[keyof typeof RESOURCE_TYPES];
|
|
24
|
+
export type ResourceType = (typeof RESOURCE_TYPES)[keyof typeof RESOURCE_TYPES];
|
|
25
25
|
//# sourceMappingURL=resource-attributes-constants.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"resource-attributes-constants.d.ts","sourceRoot":"","sources":["../../src/resource-attributes-constants.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,cAAc;;;;;;;;;;CAUjB,CAAC;AAEX,eAAO,MAAM,6BAA6B;;;;;;;;;;;CAWhC,CAAC;AAEX,MAAM,MAAM,YAAY,GAAG,OAAO,cAAc,CAAC,MAAM,OAAO,cAAc,CAAC,CAAC"}
|
|
1
|
+
{"version":3,"file":"resource-attributes-constants.d.ts","sourceRoot":"","sources":["../../src/resource-attributes-constants.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,cAAc;;;;;;;;;;CAUjB,CAAC;AAEX,eAAO,MAAM,6BAA6B;;;;;;;;;;;CAWhC,CAAC;AAEX,MAAM,MAAM,YAAY,GAAG,CAAC,OAAO,cAAc,CAAC,CAAC,MAAM,OAAO,cAAc,CAAC,CAAC"}
|
|
@@ -29,16 +29,32 @@ export interface ResourceAttributeDelete {
|
|
|
29
29
|
resourceId: Resource['id'];
|
|
30
30
|
key: string;
|
|
31
31
|
}
|
|
32
|
+
export interface EntityAttributeDelete {
|
|
33
|
+
entityType: EntityType;
|
|
34
|
+
entityId: number;
|
|
35
|
+
key: string;
|
|
36
|
+
}
|
|
32
37
|
export declare enum ResourceAttributeOperationEnum {
|
|
33
38
|
UPSERT = "upsert",
|
|
34
39
|
DELETE = "delete"
|
|
35
40
|
}
|
|
41
|
+
export declare enum EntityAttributeOperationEnum {
|
|
42
|
+
UPSERT = "upsert",
|
|
43
|
+
DELETE = "delete"
|
|
44
|
+
}
|
|
36
45
|
interface UpsertResourceAttributeOperation extends ResourceAttributeAssignment {
|
|
37
46
|
operationType: ResourceAttributeOperationEnum.UPSERT;
|
|
38
47
|
}
|
|
39
48
|
interface DeleteResourceAttributeOperation extends ResourceAttributeDelete {
|
|
40
49
|
operationType: ResourceAttributeOperationEnum.DELETE;
|
|
41
50
|
}
|
|
51
|
+
interface UpsertEntityAttributeOperation extends EntityAttributeAssignment {
|
|
52
|
+
operationType: EntityAttributeOperationEnum.UPSERT;
|
|
53
|
+
}
|
|
54
|
+
interface DeleteEntityAttributeOperation extends EntityAttributeDelete {
|
|
55
|
+
operationType: EntityAttributeOperationEnum.DELETE;
|
|
56
|
+
}
|
|
42
57
|
export type ResourceAttributesOperation = UpsertResourceAttributeOperation | DeleteResourceAttributeOperation;
|
|
58
|
+
export type EntityAttributesOperation = UpsertEntityAttributeOperation | DeleteEntityAttributeOperation;
|
|
43
59
|
export {};
|
|
44
60
|
//# sourceMappingURL=authorization-attributes-contracts.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"authorization-attributes-contracts.d.ts","sourceRoot":"","sources":["../../../src/types/authorization-attributes-contracts.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,WAAW,CAAC;AAGrC,MAAM,MAAM,YAAY,GACpB,SAAS,GACT,iBAAiB,GACjB,WAAW,GACX,OAAO,GACP,MAAM,GACN,MAAM,GACN,UAAU,GACV,UAAU,GACV,KAAK,CAAC;AAGV,MAAM,MAAM,UAAU,
|
|
1
|
+
{"version":3,"file":"authorization-attributes-contracts.d.ts","sourceRoot":"","sources":["../../../src/types/authorization-attributes-contracts.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,WAAW,CAAC;AAGrC,MAAM,MAAM,YAAY,GACpB,SAAS,GACT,iBAAiB,GACjB,WAAW,GACX,OAAO,GACP,MAAM,GACN,MAAM,GACN,UAAU,GACV,UAAU,GACV,KAAK,CAAC;AAGV,MAAM,MAAM,UAAU,GAAG,MAAM,GAAG,MAAM,GAAG,SAAS,CAAC;AAGrD,MAAM,MAAM,kBAAkB,GAAG,MAAM,CAAC;AAGxC,MAAM,MAAM,oBAAoB,GAAG,MAAM,CAAC;AAG1C,MAAM,MAAM,kBAAkB,GAAG,MAAM,CAAC;AAGxC,MAAM,MAAM,wBAAwB,GAAG,kBAAkB,GAAG,oBAAoB,CAAC;AACjF,MAAM,MAAM,sBAAsB,GAAG,kBAAkB,GAAG,kBAAkB,CAAC;AAG7E,MAAM,WAAW,2BAA2B;IAC1C,UAAU,EAAE,MAAM,CAAC;IACnB,YAAY,EAAE,YAAY,CAAC;IAC3B,GAAG,EAAE,wBAAwB,CAAC;IAC9B,KAAK,EAAE,MAAM,CAAC;CACf;AAGD,MAAM,WAAW,yBAAyB;IACxC,QAAQ,EAAE,MAAM,CAAC;IACjB,UAAU,EAAE,UAAU,CAAC;IACvB,GAAG,EAAE,sBAAsB,CAAC;IAC5B,KAAK,EAAE,MAAM,CAAC;CACf;AAGD,MAAM,WAAW,yBAAyB;IACxC,UAAU,EAAE,2BAA2B,EAAE,CAAC;CAC3C;AAED,MAAM,WAAW,uBAAuB;IACtC,UAAU,EAAE,yBAAyB,EAAE,CAAC;CACzC;AAGD,MAAM,WAAW,uBAAuB;IACtC,YAAY,EAAE,QAAQ,CAAC,MAAM,CAAC,CAAC;IAC/B,UAAU,EAAE,QAAQ,CAAC,IAAI,CAAC,CAAC;IAC3B,GAAG,EAAE,MAAM,CAAC;CACb;AAED,MAAM,WAAW,qBAAqB;IACpC,UAAU,EAAE,UAAU,CAAC;IACvB,QAAQ,EAAE,MAAM,CAAC;IACjB,GAAG,EAAE,MAAM,CAAC;CACb;AAED,oBAAY,8BAA8B;IACxC,MAAM,WAAW;IACjB,MAAM,WAAW;CAClB;AAED,oBAAY,4BAA4B;IACtC,MAAM,WAAW;IACjB,MAAM,WAAW;CAClB;AAED,UAAU,gCAAiC,SAAQ,2BAA2B;IAC5E,aAAa,EAAE,8BAA8B,CAAC,MAAM,CAAC;CACtD;AAED,UAAU,gCAAiC,SAAQ,uBAAuB;IACxE,aAAa,EAAE,8BAA8B,CAAC,MAAM,CAAC;CACtD;AAED,UAAU,8BAA+B,SAAQ,yBAAyB;IACxE,aAAa,EAAE,4BAA4B,CAAC,MAAM,CAAC;CACpD;AAED,UAAU,8BAA+B,SAAQ,qBAAqB;IACpE,aAAa,EAAE,4BAA4B,CAAC,MAAM,CAAC;CACpD;AAED,MAAM,MAAM,2BAA2B,GAAG,gCAAgC,GAAG,gCAAgC,CAAC;AAC9G,MAAM,MAAM,yBAAyB,GAAG,8BAA8B,GAAG,8BAA8B,CAAC"}
|
|
@@ -3,5 +3,10 @@ var ResourceAttributeOperationEnum;
|
|
|
3
3
|
ResourceAttributeOperationEnum["UPSERT"] = "upsert";
|
|
4
4
|
ResourceAttributeOperationEnum["DELETE"] = "delete";
|
|
5
5
|
})(ResourceAttributeOperationEnum || (ResourceAttributeOperationEnum = {}));
|
|
6
|
+
var EntityAttributeOperationEnum;
|
|
7
|
+
(function (EntityAttributeOperationEnum) {
|
|
8
|
+
EntityAttributeOperationEnum["UPSERT"] = "upsert";
|
|
9
|
+
EntityAttributeOperationEnum["DELETE"] = "delete";
|
|
10
|
+
})(EntityAttributeOperationEnum || (EntityAttributeOperationEnum = {}));
|
|
6
11
|
|
|
7
|
-
export { ResourceAttributeOperationEnum };
|
|
12
|
+
export { EntityAttributeOperationEnum, ResourceAttributeOperationEnum };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"resource-attribute-assignment.d.ts","sourceRoot":"","sources":["../src/resource-attribute-assignment.ts"],"names":[],"mappings":"AAAA,OAAO,EAAkB,YAAY,EAAE,MAAM,iCAAiC,CAAC;AAG/E,qBAAa,2BAA2B;IACtC,SAAgB,UAAU,EAAE,MAAM,CAAC;IACnC,SAAgB,YAAY,EAAE,YAAY,CAAC;IAC3C,SAAgB,YAAY,EAAE,MAAM,CAAC;IACrC,SAAgB,cAAc,EAAE,MAAM,CAAC;gBAE3B,UAAU,EAAE,MAAM,EAAE,YAAY,EAAE,MAAM,EAAE,YAAY,EAAE,MAAM,EAAE,cAAc,EAAE,MAAM;
|
|
1
|
+
{"version":3,"file":"resource-attribute-assignment.d.ts","sourceRoot":"","sources":["../src/resource-attribute-assignment.ts"],"names":[],"mappings":"AAAA,OAAO,EAAkB,YAAY,EAAE,MAAM,iCAAiC,CAAC;AAG/E,qBAAa,2BAA2B;IACtC,SAAgB,UAAU,EAAE,MAAM,CAAC;IACnC,SAAgB,YAAY,EAAE,YAAY,CAAC;IAC3C,SAAgB,YAAY,EAAE,MAAM,CAAC;IACrC,SAAgB,cAAc,EAAE,MAAM,CAAC;gBAE3B,UAAU,EAAE,MAAM,EAAE,YAAY,EAAE,MAAM,EAAE,YAAY,EAAE,MAAM,EAAE,cAAc,EAAE,MAAM;IA4BlG;;;OAGG;IACH,GAAG,IAAI;QAAE,UAAU,EAAE,MAAM,CAAC;QAAC,YAAY,EAAE,MAAM,CAAC;QAAC,GAAG,EAAE,MAAM,CAAC;QAAC,KAAK,EAAE,MAAM,CAAA;KAAE;IAS/E;;;;OAIG;IACH,MAAM,CAAC,KAAK,EAAE,2BAA2B,GAAG,OAAO;CAWpD"}
|
|
@@ -21,5 +21,5 @@ export declare const RESOURCE_ATTRIBUTES_CONSTANTS: {
|
|
|
21
21
|
readonly SYSTEM_ENTITY_TYPE: "system_entity_type";
|
|
22
22
|
};
|
|
23
23
|
};
|
|
24
|
-
export type ResourceType = typeof RESOURCE_TYPES[keyof typeof RESOURCE_TYPES];
|
|
24
|
+
export type ResourceType = (typeof RESOURCE_TYPES)[keyof typeof RESOURCE_TYPES];
|
|
25
25
|
//# sourceMappingURL=resource-attributes-constants.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"resource-attributes-constants.d.ts","sourceRoot":"","sources":["../src/resource-attributes-constants.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,cAAc;;;;;;;;;;CAUjB,CAAC;AAEX,eAAO,MAAM,6BAA6B;;;;;;;;;;;CAWhC,CAAC;AAEX,MAAM,MAAM,YAAY,GAAG,OAAO,cAAc,CAAC,MAAM,OAAO,cAAc,CAAC,CAAC"}
|
|
1
|
+
{"version":3,"file":"resource-attributes-constants.d.ts","sourceRoot":"","sources":["../src/resource-attributes-constants.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,cAAc;;;;;;;;;;CAUjB,CAAC;AAEX,eAAO,MAAM,6BAA6B;;;;;;;;;;;CAWhC,CAAC;AAEX,MAAM,MAAM,YAAY,GAAG,CAAC,OAAO,cAAc,CAAC,CAAC,MAAM,OAAO,cAAc,CAAC,CAAC"}
|