@mondaydotcomorg/monday-authorization 3.4.0-feature-bashanye-add-membership-create-delete-api-234505c → 3.5.0-feat-shaime-support-entity-attributes-in-authorization-sdk-397ce54

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 (48) hide show
  1. package/dist/authorization-attributes-ms-service.d.ts +37 -0
  2. package/dist/authorization-attributes-ms-service.d.ts.map +1 -0
  3. package/dist/authorization-attributes-ms-service.js +232 -0
  4. package/dist/authorization-attributes-service.d.ts +45 -1
  5. package/dist/authorization-attributes-service.d.ts.map +1 -1
  6. package/dist/authorization-attributes-service.js +262 -0
  7. package/dist/errors/argument-error.d.ts +4 -0
  8. package/dist/errors/argument-error.d.ts.map +1 -0
  9. package/dist/errors/argument-error.js +11 -0
  10. package/dist/esm/authorization-attributes-ms-service.d.ts +37 -0
  11. package/dist/esm/authorization-attributes-ms-service.d.ts.map +1 -0
  12. package/dist/esm/authorization-attributes-ms-service.mjs +230 -0
  13. package/dist/esm/authorization-attributes-service.d.ts +45 -1
  14. package/dist/esm/authorization-attributes-service.d.ts.map +1 -1
  15. package/dist/esm/authorization-attributes-service.mjs +263 -1
  16. package/dist/esm/errors/argument-error.d.ts +4 -0
  17. package/dist/esm/errors/argument-error.d.ts.map +1 -0
  18. package/dist/esm/errors/argument-error.mjs +9 -0
  19. package/dist/esm/index.d.ts +5 -0
  20. package/dist/esm/index.d.ts.map +1 -1
  21. package/dist/esm/index.mjs +4 -0
  22. package/dist/esm/resource-attribute-assignment.d.ts +25 -0
  23. package/dist/esm/resource-attribute-assignment.d.ts.map +1 -0
  24. package/dist/esm/resource-attribute-assignment.mjs +60 -0
  25. package/dist/esm/resource-attributes-constants.d.ts +25 -0
  26. package/dist/esm/resource-attributes-constants.d.ts.map +1 -0
  27. package/dist/esm/resource-attributes-constants.mjs +25 -0
  28. package/dist/esm/types/authorization-attributes-contracts.d.ts +19 -3
  29. package/dist/esm/types/authorization-attributes-contracts.d.ts.map +1 -1
  30. package/dist/index.d.ts +5 -0
  31. package/dist/index.d.ts.map +1 -1
  32. package/dist/index.js +9 -0
  33. package/dist/resource-attribute-assignment.d.ts +25 -0
  34. package/dist/resource-attribute-assignment.d.ts.map +1 -0
  35. package/dist/resource-attribute-assignment.js +62 -0
  36. package/dist/resource-attributes-constants.d.ts +25 -0
  37. package/dist/resource-attributes-constants.d.ts.map +1 -0
  38. package/dist/resource-attributes-constants.js +28 -0
  39. package/dist/types/authorization-attributes-contracts.d.ts +19 -3
  40. package/dist/types/authorization-attributes-contracts.d.ts.map +1 -1
  41. package/package.json +1 -1
  42. package/src/authorization-attributes-ms-service.ts +327 -0
  43. package/src/authorization-attributes-service.ts +325 -0
  44. package/src/errors/argument-error.ts +8 -0
  45. package/src/index.ts +16 -0
  46. package/src/resource-attribute-assignment.ts +70 -0
  47. package/src/resource-attributes-constants.ts +27 -0
  48. package/src/types/authorization-attributes-contracts.ts +49 -3
@@ -0,0 +1,37 @@
1
+ import { ResourceAttributeAssignment } from './resource-attribute-assignment';
2
+ interface Resource {
3
+ resourceType: string;
4
+ resourceId: number;
5
+ }
6
+ /**
7
+ * Service class for managing resource attributes in the authorization microservice.
8
+ * Provides synchronous HTTP operations to create/update and delete attributes on resources.
9
+ */
10
+ export declare class AuthorizationAttributesMsService {
11
+ private static LOG_TAG;
12
+ /**
13
+ * Gets request headers including Authorization, Content-Type, and optional attribution headers
14
+ */
15
+ private static getRequestHeaders;
16
+ /**
17
+ * Validates that all messages are instances of the specified message class
18
+ */
19
+ private static validateMessages;
20
+ /**
21
+ * Creates or updates resource attributes synchronously.
22
+ * @param accountId The account ID
23
+ * @param resourceAttributeAssignments Array of ResourceAttributeAssignment objects
24
+ * @returns Promise<void>
25
+ */
26
+ static upsertResourceAttributesSync(accountId: number, resourceAttributeAssignments: ResourceAttributeAssignment[]): Promise<void>;
27
+ /**
28
+ * Deletes specific attributes from a resource synchronously.
29
+ * @param accountId The account ID
30
+ * @param resource Object with resourceType (string) and resourceId (number)
31
+ * @param attributeKeys Array of attribute key strings to delete
32
+ * @returns Promise<void>
33
+ */
34
+ static deleteResourceAttributesSync(accountId: number, resource: Resource, attributeKeys: string[]): Promise<void>;
35
+ }
36
+ export {};
37
+ //# sourceMappingURL=authorization-attributes-ms-service.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"authorization-attributes-ms-service.d.ts","sourceRoot":"","sources":["../../src/authorization-attributes-ms-service.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,2BAA2B,EAAE,MAAM,iCAAiC,CAAC;AAW9E,UAAU,QAAQ;IAChB,YAAY,EAAE,MAAM,CAAC;IACrB,UAAU,EAAE,MAAM,CAAC;CACpB;AAeD;;;GAGG;AACH,qBAAa,gCAAgC;IAC3C,OAAO,CAAC,MAAM,CAAC,OAAO,CAAiC;IAEvD;;OAEG;IACH,OAAO,CAAC,MAAM,CAAC,iBAAiB;IA+ChC;;OAEG;IACH,OAAO,CAAC,MAAM,CAAC,gBAAgB;IAsB/B;;;;;OAKG;WACU,4BAA4B,CACvC,SAAS,EAAE,MAAM,EACjB,4BAA4B,EAAE,2BAA2B,EAAE,GAC1D,OAAO,CAAC,IAAI,CAAC;IAwFhB;;;;;;OAMG;WACU,4BAA4B,CACvC,SAAS,EAAE,MAAM,EACjB,QAAQ,EAAE,QAAQ,EAClB,aAAa,EAAE,MAAM,EAAE,GACtB,OAAO,CAAC,IAAI,CAAC;CAuGjB"}
@@ -0,0 +1,230 @@
1
+ import { Api } from '@mondaydotcomorg/trident-backend-api';
2
+ import { signAuthorizationHeader } from '@mondaydotcomorg/monday-jwt';
3
+ import { HttpFetcherError } from '@mondaydotcomorg/monday-fetch-api';
4
+ import { ResourceAttributeAssignment } from './resource-attribute-assignment.mjs';
5
+ import { ArgumentError } from './errors/argument-error.mjs';
6
+ import { logger, AuthorizationInternalService } from './authorization-internal-service.mjs';
7
+ import { getAttributionsFromApi } from './attributions-service.mjs';
8
+ import { APP_NAME } from './constants.mjs';
9
+
10
+ const INTERNAL_APP_NAME = 'internal_ms';
11
+ const UPSERT_RESOURCE_ATTRIBUTES_PATH = '/attributes/{accountId}/resource';
12
+ const DELETE_RESOURCE_ATTRIBUTES_PATH = '/attributes/{accountId}/resource/{resourceType}/{resourceId}';
13
+ /**
14
+ * Service class for managing resource attributes in the authorization microservice.
15
+ * Provides synchronous HTTP operations to create/update and delete attributes on resources.
16
+ */
17
+ class AuthorizationAttributesMsService {
18
+ static LOG_TAG = 'authorization_attributes_ms';
19
+ /**
20
+ * Gets request headers including Authorization, Content-Type, and optional attribution headers
21
+ */
22
+ static getRequestHeaders(accountId, userId) {
23
+ const headers = {
24
+ 'Content-Type': 'application/json',
25
+ };
26
+ // Generate Authorization token
27
+ const authToken = signAuthorizationHeader({
28
+ appName: INTERNAL_APP_NAME,
29
+ accountId,
30
+ userId,
31
+ });
32
+ headers.Authorization = authToken;
33
+ // Add attribution headers if available
34
+ const attributionHeaders = getAttributionsFromApi();
35
+ for (const key in attributionHeaders) {
36
+ if (attributionHeaders.hasOwnProperty(key)) {
37
+ headers[key] = attributionHeaders[key];
38
+ }
39
+ }
40
+ // Add X-REQUEST-ID if available from context
41
+ try {
42
+ const tridentContext = Api.getPart('context');
43
+ if (tridentContext?.runtimeAttributions) {
44
+ const outgoingHeaders = tridentContext.runtimeAttributions.buildOutgoingHeaders('HTTP_INTERNAL');
45
+ if (outgoingHeaders) {
46
+ const attributionHeadersMap = {};
47
+ for (const [key, value] of outgoingHeaders) {
48
+ attributionHeadersMap[key] = value;
49
+ }
50
+ if (attributionHeadersMap['x-request-id']) {
51
+ headers['X-REQUEST-ID'] = attributionHeadersMap['x-request-id'];
52
+ }
53
+ }
54
+ }
55
+ }
56
+ catch (error) {
57
+ // Silently fail if context is not available
58
+ logger.debug({ tag: this.LOG_TAG, error }, 'Failed to get request ID from context');
59
+ }
60
+ // Add X-REQUEST-START timestamp
61
+ headers['X-REQUEST-START'] = Math.floor(Date.now() / 1000).toString();
62
+ return headers;
63
+ }
64
+ /**
65
+ * Validates that all messages are instances of the specified message class
66
+ */
67
+ static validateMessages(attributesMessages, messageClass) {
68
+ if (typeof messageClass !== 'function') {
69
+ throw new ArgumentError('messageClass must be a class/constructor function');
70
+ }
71
+ if (!Array.isArray(attributesMessages)) {
72
+ throw new ArgumentError('attributesMessages must be an array');
73
+ }
74
+ for (let i = 0; i < attributesMessages.length; i++) {
75
+ if (!(attributesMessages[i] instanceof messageClass)) {
76
+ const className = messageClass.name || 'ResourceAttributeAssignment';
77
+ throw new ArgumentError(`All attributesMessages must be instances of ${className}, but item at index ${i} is not`);
78
+ }
79
+ }
80
+ }
81
+ /**
82
+ * Creates or updates resource attributes synchronously.
83
+ * @param accountId The account ID
84
+ * @param resourceAttributeAssignments Array of ResourceAttributeAssignment objects
85
+ * @returns Promise<void>
86
+ */
87
+ static async upsertResourceAttributesSync(accountId, resourceAttributeAssignments) {
88
+ // Skip HTTP requests in test environment
89
+ if (process.env.NODE_ENV === 'test') {
90
+ logger.debug({ tag: this.LOG_TAG, accountId, count: resourceAttributeAssignments.length }, 'Skipping upsertResourceAttributesSync in test environment');
91
+ return;
92
+ }
93
+ // Validate inputs
94
+ if (!Number.isInteger(accountId)) {
95
+ throw new ArgumentError(`accountId must be an integer, got: ${accountId}`);
96
+ }
97
+ if (!Array.isArray(resourceAttributeAssignments)) {
98
+ throw new ArgumentError('resourceAttributeAssignments must be an array');
99
+ }
100
+ if (resourceAttributeAssignments.length === 0) {
101
+ logger.warn({ tag: this.LOG_TAG, accountId }, 'upsertResourceAttributesSync called with empty array');
102
+ return;
103
+ }
104
+ // Validate all assignments are instances of ResourceAttributeAssignment
105
+ this.validateMessages(resourceAttributeAssignments, ResourceAttributeAssignment);
106
+ // Convert assignments to hash format
107
+ const assignmentsHash = resourceAttributeAssignments.map(assignment => assignment.toH());
108
+ // Build request body
109
+ const requestBody = {
110
+ resourceAttributeAssignments: assignmentsHash,
111
+ };
112
+ const httpClient = Api.getPart('httpClient');
113
+ if (!httpClient) {
114
+ throw new Error('AuthorizationAttributesMsService: HTTP client is not initialized');
115
+ }
116
+ const path = UPSERT_RESOURCE_ATTRIBUTES_PATH.replace('{accountId}', accountId.toString());
117
+ const headers = this.getRequestHeaders(accountId);
118
+ try {
119
+ logger.info({ tag: this.LOG_TAG, accountId, count: resourceAttributeAssignments.length }, 'Upserting resource attributes');
120
+ await httpClient.fetch({
121
+ url: {
122
+ appName: APP_NAME,
123
+ path,
124
+ },
125
+ method: 'POST',
126
+ headers,
127
+ body: JSON.stringify(requestBody),
128
+ }, {
129
+ timeout: AuthorizationInternalService.getRequestTimeout(),
130
+ retryPolicy: AuthorizationInternalService.getRetriesPolicy(),
131
+ });
132
+ logger.info({ tag: this.LOG_TAG, accountId, count: resourceAttributeAssignments.length }, 'Successfully upserted resource attributes');
133
+ }
134
+ catch (err) {
135
+ logger.error({
136
+ tag: this.LOG_TAG,
137
+ accountId,
138
+ method: 'upsertResourceAttributesSync',
139
+ error: err instanceof Error ? err.message : String(err),
140
+ }, 'Failed to upsert resource attributes');
141
+ if (err instanceof HttpFetcherError) {
142
+ throw new Error(`AuthorizationAttributesMsService: [upsertResourceAttributesSync] request failed with status ${err.status}: ${err.message}`);
143
+ }
144
+ throw err;
145
+ }
146
+ }
147
+ /**
148
+ * Deletes specific attributes from a resource synchronously.
149
+ * @param accountId The account ID
150
+ * @param resource Object with resourceType (string) and resourceId (number)
151
+ * @param attributeKeys Array of attribute key strings to delete
152
+ * @returns Promise<void>
153
+ */
154
+ static async deleteResourceAttributesSync(accountId, resource, attributeKeys) {
155
+ // Skip HTTP requests in test environment
156
+ if (process.env.NODE_ENV === 'test') {
157
+ logger.debug({ tag: this.LOG_TAG, accountId, resource, attributeKeys }, 'Skipping deleteResourceAttributesSync in test environment');
158
+ return;
159
+ }
160
+ // Validate inputs
161
+ if (!Number.isInteger(accountId)) {
162
+ throw new ArgumentError(`accountId must be an integer, got: ${accountId}`);
163
+ }
164
+ if (!resource || typeof resource !== 'object') {
165
+ throw new ArgumentError('resource must be an object');
166
+ }
167
+ if (!Number.isInteger(resource.resourceId)) {
168
+ throw new ArgumentError(`resource.resourceId must be an integer, got: ${resource.resourceId}`);
169
+ }
170
+ if (typeof resource.resourceType !== 'string') {
171
+ throw new ArgumentError(`resource.resourceType must be a string, got: ${typeof resource.resourceType}`);
172
+ }
173
+ if (!Array.isArray(attributeKeys)) {
174
+ throw new ArgumentError('attributeKeys must be an array');
175
+ }
176
+ if (attributeKeys.length === 0) {
177
+ logger.warn({ tag: this.LOG_TAG, accountId, resource }, 'deleteResourceAttributesSync called with empty keys array');
178
+ return;
179
+ }
180
+ // Validate all keys are strings
181
+ for (let i = 0; i < attributeKeys.length; i++) {
182
+ if (typeof attributeKeys[i] !== 'string') {
183
+ throw new ArgumentError(`All attributeKeys must be strings, but item at index ${i} is not`);
184
+ }
185
+ }
186
+ // Build request body
187
+ const requestBody = {
188
+ keys: attributeKeys,
189
+ };
190
+ const httpClient = Api.getPart('httpClient');
191
+ if (!httpClient) {
192
+ throw new Error('AuthorizationAttributesMsService: HTTP client is not initialized');
193
+ }
194
+ const path = DELETE_RESOURCE_ATTRIBUTES_PATH.replace('{accountId}', accountId.toString())
195
+ .replace('{resourceType}', resource.resourceType)
196
+ .replace('{resourceId}', resource.resourceId.toString());
197
+ const headers = this.getRequestHeaders(accountId);
198
+ try {
199
+ logger.info({ tag: this.LOG_TAG, accountId, resource, keys: attributeKeys }, 'Deleting resource attributes');
200
+ await httpClient.fetch({
201
+ url: {
202
+ appName: APP_NAME,
203
+ path,
204
+ },
205
+ method: 'DELETE',
206
+ headers,
207
+ body: JSON.stringify(requestBody),
208
+ }, {
209
+ timeout: AuthorizationInternalService.getRequestTimeout(),
210
+ retryPolicy: AuthorizationInternalService.getRetriesPolicy(),
211
+ });
212
+ logger.info({ tag: this.LOG_TAG, accountId, resource, keys: attributeKeys }, 'Successfully deleted resource attributes');
213
+ }
214
+ catch (err) {
215
+ logger.error({
216
+ tag: this.LOG_TAG,
217
+ accountId,
218
+ method: 'deleteResourceAttributesSync',
219
+ resource,
220
+ error: err instanceof Error ? err.message : String(err),
221
+ }, 'Failed to delete resource attributes');
222
+ if (err instanceof HttpFetcherError) {
223
+ throw new Error(`AuthorizationAttributesMsService: [deleteResourceAttributesSync] request failed with status ${err.status}: ${err.message}`);
224
+ }
225
+ throw err;
226
+ }
227
+ }
228
+ }
229
+
230
+ export { AuthorizationAttributesMsService };
@@ -1,6 +1,6 @@
1
1
  import { FetcherConfig, HttpClient } from '@mondaydotcomorg/trident-backend-api';
2
2
  import { RecursivePartial } from '@mondaydotcomorg/monday-fetch-api';
3
- import { ResourceAttributeAssignment, ResourceAttributeResponse, ResourceAttributesOperation } from './types/authorization-attributes-contracts';
3
+ import { ResourceAttributeAssignment, ResourceAttributeResponse, ResourceAttributesOperation, EntityAttributeAssignment, EntityAttributeResponse, ResourceType, EntityType, ResourceAttributeKeyType, EntityAttributeKeyType } from './types/authorization-attributes-contracts';
4
4
  import { Resource } from './types/general';
5
5
  export declare class AuthorizationAttributesService {
6
6
  private static LOG_TAG;
@@ -50,5 +50,49 @@ export declare class AuthorizationAttributesService {
50
50
  * @return {Promise<boolean>} - true if succeeded
51
51
  */
52
52
  asyncResourceAttributesHealthCheck(): Promise<boolean>;
53
+ /**
54
+ * Validates resource attribute assignments array
55
+ */
56
+ private static validateResourceAttributeAssignments;
57
+ /**
58
+ * Validates entity attribute assignments array
59
+ */
60
+ private static validateEntityAttributeAssignments;
61
+ /**
62
+ * Upsert resource attributes synchronously.
63
+ * Matches API endpoint: POST /attributes/:accountId/resource
64
+ * @param accountId The account ID
65
+ * @param resourceAttributeAssignments Array of ResourceAttributeAssignment objects (1-100 items)
66
+ * @returns Promise with response containing affected attributes
67
+ */
68
+ static upsertResourceAttributesSync(accountId: number, resourceAttributeAssignments: ResourceAttributeAssignment[]): Promise<ResourceAttributeResponse>;
69
+ /**
70
+ * Delete resource attributes synchronously.
71
+ * Matches API endpoint: DELETE /attributes/:accountId/resource/:resourceType/:resourceId
72
+ * @param accountId The account ID
73
+ * @param resourceType The resource type
74
+ * @param resourceId The resource ID
75
+ * @param keys Array of attribute keys to delete
76
+ * @returns Promise with response containing affected attributes
77
+ */
78
+ static deleteResourceAttributesSync(accountId: number, resourceType: ResourceType, resourceId: number, keys: ResourceAttributeKeyType[]): Promise<ResourceAttributeResponse>;
79
+ /**
80
+ * Upsert entity attributes synchronously.
81
+ * Matches API endpoint: POST /attributes/:accountId/entity
82
+ * @param accountId The account ID
83
+ * @param entityAttributeAssignments Array of EntityAttributeAssignment objects (1-100 items)
84
+ * @returns Promise with response containing affected attributes
85
+ */
86
+ static upsertEntityAttributesSync(accountId: number, entityAttributeAssignments: EntityAttributeAssignment[]): Promise<EntityAttributeResponse>;
87
+ /**
88
+ * Delete entity attributes synchronously.
89
+ * Matches API endpoint: DELETE /attributes/:accountId/entity/:entityType/:entityId
90
+ * @param accountId The account ID
91
+ * @param entityType The entity type
92
+ * @param entityId The entity ID
93
+ * @param keys Array of attribute keys to delete
94
+ * @returns Promise with response containing affected attributes
95
+ */
96
+ static deleteEntityAttributesSync(accountId: number, entityType: EntityType, entityId: number, keys: EntityAttributeKeyType[]): Promise<EntityAttributeResponse>;
53
97
  }
54
98
  //# sourceMappingURL=authorization-attributes-service.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"authorization-attributes-service.d.ts","sourceRoot":"","sources":["../../src/authorization-attributes-service.ts"],"names":[],"mappings":"AACA,OAAO,EAAO,aAAa,EAAE,UAAU,EAAE,MAAM,sCAAsC,CAAC;AAEtF,OAAO,EAAoB,gBAAgB,EAAE,MAAM,mCAAmC,CAAC;AACvF,OAAO,EACL,2BAA2B,EAC3B,yBAAyB,EACzB,2BAA2B,EAC5B,MAAM,4CAA4C,CAAC;AACpD,OAAO,EAAE,QAAQ,EAAE,MAAM,iBAAiB,CAAC;AAY3C,qBAAa,8BAA8B;IACzC,OAAO,CAAC,MAAM,CAAC,OAAO,CAA8B;IACpD,OAAO,CAAC,MAAM,CAAC,SAAS,CAGb;IACX,OAAO,CAAC,UAAU,CAAa;IAC/B,OAAO,CAAC,YAAY,CAAkC;IACtD,OAAO,CAAC,MAAM,CAAS;IAEvB;;;;OAIG;gBACS,UAAU,CAAC,EAAE,UAAU,EAAE,YAAY,CAAC,EAAE,gBAAgB,CAAC,aAAa,CAAC;IAqBnF;;;;;;OAMG;IACG,wBAAwB,CAC5B,SAAS,EAAE,MAAM,EACjB,4BAA4B,EAAE,2BAA2B,EAAE,GAC1D,OAAO,CAAC,yBAAyB,CAAC;IA6BrC;;;;;;OAMG;IACG,wBAAwB,CAC5B,SAAS,EAAE,MAAM,EACjB,QAAQ,EAAE,QAAQ,EAClB,aAAa,EAAE,MAAM,EAAE,GACtB,OAAO,CAAC,yBAAyB,CAAC;IAkCrC;;;;;;;UAOM;IACA,6BAA6B,CACjC,SAAS,EAAE,MAAM,EACjB,OAAO,EAAE,MAAM,EACf,sBAAsB,EAAE,MAAM,EAC9B,2BAA2B,EAAE,2BAA2B,EAAE,GACzD,OAAO,CAAC,2BAA2B,EAAE,CAAC;YAY3B,oBAAoB;IA4BlC,OAAO,CAAC,MAAM,CAAC,cAAc;IAW7B;;;;;;;OAOG;IACG,kCAAkC,IAAI,OAAO,CAAC,OAAO,CAAC;CAoB7D"}
1
+ {"version":3,"file":"authorization-attributes-service.d.ts","sourceRoot":"","sources":["../../src/authorization-attributes-service.ts"],"names":[],"mappings":"AACA,OAAO,EAAO,aAAa,EAAE,UAAU,EAAE,MAAM,sCAAsC,CAAC;AAEtF,OAAO,EAAoB,gBAAgB,EAAE,MAAM,mCAAmC,CAAC;AACvF,OAAO,EACL,2BAA2B,EAC3B,yBAAyB,EACzB,2BAA2B,EAC3B,yBAAyB,EACzB,uBAAuB,EACvB,YAAY,EACZ,UAAU,EACV,wBAAwB,EACxB,sBAAsB,EACvB,MAAM,4CAA4C,CAAC;AAEpD,OAAO,EAAE,QAAQ,EAAE,MAAM,iBAAiB,CAAC;AAY3C,qBA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AAE,GAC/B,OAAO,CAAC,yBAAyB,CAAC;IA0DrC;;;;;;OAMG;WACU,0BAA0B,CACrC,SAAS,EAAE,MAAM,EACjB,0BAA0B,EAAE,yBAAyB,EAAE,GACtD,OAAO,CAAC,uBAAuB,CAAC;IA6CnC;;;;;;;;OAQG;WACU,0BAA0B,CACrC,SAAS,EAAE,MAAM,EACjB,UAAU,EAAE,UAAU,EACtB,QAAQ,EAAE,MAAM,EAChB,IAAI,EAAE,sBAAsB,EAAE,GAC7B,OAAO,CAAC,uBAAuB,CAAC;CAyDpC"}
@@ -2,7 +2,7 @@ import chunk from 'lodash/chunk.js';
2
2
  import { Api } from '@mondaydotcomorg/trident-backend-api';
3
3
  import { sendToSns, getTopicAttributes } from '@mondaydotcomorg/monday-sns';
4
4
  import { HttpFetcherError } from '@mondaydotcomorg/monday-fetch-api';
5
- import { logger } from './authorization-internal-service.mjs';
5
+ import { logger, AuthorizationInternalService } from './authorization-internal-service.mjs';
6
6
  import { getAttributionsFromApi } from './attributions-service.mjs';
7
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
8
  import { ERROR_MESSAGES, DEFAULT_FETCH_OPTIONS, APP_NAME } from './constants.mjs';
@@ -12,6 +12,8 @@ class AuthorizationAttributesService {
12
12
  static API_PATHS = {
13
13
  UPSERT_RESOURCE_ATTRIBUTES: '/attributes/{accountId}/resource',
14
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}',
15
17
  };
16
18
  httpClient;
17
19
  fetchOptions;
@@ -175,6 +177,266 @@ class AuthorizationAttributesService {
175
177
  return false;
176
178
  }
177
179
  }
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
+ }
178
440
  }
179
441
 
180
442
  export { AuthorizationAttributesService };
@@ -0,0 +1,4 @@
1
+ export declare class ArgumentError extends Error {
2
+ constructor(message: string);
3
+ }
4
+ //# sourceMappingURL=argument-error.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"argument-error.d.ts","sourceRoot":"","sources":["../../../src/errors/argument-error.ts"],"names":[],"mappings":"AAAA,qBAAa,aAAc,SAAQ,KAAK;gBAC1B,OAAO,EAAE,MAAM;CAK5B"}
@@ -0,0 +1,9 @@
1
+ class ArgumentError extends Error {
2
+ constructor(message) {
3
+ super(message);
4
+ this.name = 'ArgumentError';
5
+ Object.setPrototypeOf(this, ArgumentError.prototype);
6
+ }
7
+ }
8
+
9
+ export { ArgumentError };
@@ -19,6 +19,11 @@ export declare function init(options?: InitOptions): Promise<void>;
19
19
  export { authorizationCheckMiddleware, getAuthorizationMiddleware, skipAuthorizationMiddleware, } from './authorization-middleware';
20
20
  export { AuthorizationService, AuthorizeResponse } from './authorization-service';
21
21
  export { AuthorizationAttributesService } from './authorization-attributes-service';
22
+ export { AuthorizationAttributesMsService } from './authorization-attributes-ms-service';
23
+ export { ResourceAttributeAssignment } from './resource-attribute-assignment';
24
+ export { RESOURCE_TYPES, RESOURCE_ATTRIBUTES_CONSTANTS } from './resource-attributes-constants';
25
+ export { ArgumentError } from './errors/argument-error';
26
+ export { EntityAttributeAssignment, ResourceAttributeResponse, EntityAttributeResponse, ResourceType, EntityType, ResourceAttributeKeyType, EntityAttributeKeyType, CommonAttributeKey, ResourceAttributeKey, EntityAttributeKey, } from './types/authorization-attributes-contracts';
22
27
  export { RolesService } from './roles-service';
23
28
  export { MembershipsService } from './memberships';
24
29
  export { AuthorizationObject, Resource, BaseRequest, ResourceGetter, ContextGetter } from './types/general';
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,kBAAkB,EAAE,MAAM,+BAA+B,CAAC;AAGnE,OAAO,EAAqB,aAAa,EAAE,MAAM,mBAAmB,CAAC;AACrE,OAAO,KAAK,OAAO,MAAM,WAAW,CAAC;AAErC,UAAU,kBAAkB;IAC1B,MAAM,CAAC,EAAE,aAAa,CAAC;IACvB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,IAAI,CAAC,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