@mondaydotcomorg/monday-authorization 3.7.0-feat-shaime-support-entity-attributes-4-49e1de0 → 3.7.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.
Files changed (115) hide show
  1. package/README.md +7 -1
  2. package/dist/authorization-attributes-ms-service.d.ts +20 -40
  3. package/dist/authorization-attributes-ms-service.d.ts.map +1 -1
  4. package/dist/authorization-attributes-ms-service.js +48 -103
  5. package/dist/authorization-attributes-service.d.ts +12 -10
  6. package/dist/authorization-attributes-service.d.ts.map +1 -1
  7. package/dist/authorization-attributes-service.js +17 -15
  8. package/dist/authorization-attributes-sns-service.d.ts +37 -44
  9. package/dist/authorization-attributes-sns-service.d.ts.map +1 -1
  10. package/dist/authorization-attributes-sns-service.js +53 -90
  11. package/dist/authorization-service.d.ts +0 -1
  12. package/dist/authorization-service.d.ts.map +1 -1
  13. package/dist/authorization-service.js +2 -22
  14. package/dist/base-attribute-assignment.d.ts +6 -7
  15. package/dist/base-attribute-assignment.d.ts.map +1 -1
  16. package/dist/base-attribute-assignment.js +5 -7
  17. package/dist/base-authorization-attributes-service.d.ts +32 -0
  18. package/dist/base-authorization-attributes-service.d.ts.map +1 -0
  19. package/dist/base-authorization-attributes-service.js +63 -0
  20. package/dist/entity-attribute-assignment.d.ts +4 -8
  21. package/dist/entity-attribute-assignment.d.ts.map +1 -1
  22. package/dist/entity-attribute-assignment.js +3 -4
  23. package/dist/esm/authorization-attributes-ms-service.d.ts +20 -40
  24. package/dist/esm/authorization-attributes-ms-service.d.ts.map +1 -1
  25. package/dist/esm/authorization-attributes-ms-service.mjs +48 -103
  26. package/dist/esm/authorization-attributes-service.d.ts +12 -10
  27. package/dist/esm/authorization-attributes-service.d.ts.map +1 -1
  28. package/dist/esm/authorization-attributes-service.mjs +17 -15
  29. package/dist/esm/authorization-attributes-sns-service.d.ts +37 -44
  30. package/dist/esm/authorization-attributes-sns-service.d.ts.map +1 -1
  31. package/dist/esm/authorization-attributes-sns-service.mjs +53 -90
  32. package/dist/esm/authorization-service.d.ts +0 -1
  33. package/dist/esm/authorization-service.d.ts.map +1 -1
  34. package/dist/esm/authorization-service.mjs +3 -23
  35. package/dist/esm/base-attribute-assignment.d.ts +6 -7
  36. package/dist/esm/base-attribute-assignment.d.ts.map +1 -1
  37. package/dist/esm/base-attribute-assignment.mjs +5 -7
  38. package/dist/esm/base-authorization-attributes-service.d.ts +32 -0
  39. package/dist/esm/base-authorization-attributes-service.d.ts.map +1 -0
  40. package/dist/esm/base-authorization-attributes-service.mjs +61 -0
  41. package/dist/esm/entity-attribute-assignment.d.ts +4 -8
  42. package/dist/esm/entity-attribute-assignment.d.ts.map +1 -1
  43. package/dist/esm/entity-attribute-assignment.mjs +3 -4
  44. package/dist/esm/index.d.ts +6 -0
  45. package/dist/esm/index.d.ts.map +1 -1
  46. package/dist/esm/index.mjs +6 -0
  47. package/dist/esm/resource-attribute-assignment.d.ts +3 -7
  48. package/dist/esm/resource-attribute-assignment.d.ts.map +1 -1
  49. package/dist/esm/resource-attribute-assignment.mjs +8 -2
  50. package/dist/esm/resource-attributes-constants.d.ts +12 -10
  51. package/dist/esm/resource-attributes-constants.d.ts.map +1 -1
  52. package/dist/esm/resource-attributes-constants.mjs +4 -2
  53. package/dist/esm/testKit/index.d.ts +4 -4
  54. package/dist/esm/testKit/index.d.ts.map +1 -1
  55. package/dist/esm/types/authorization-attributes-contracts.d.ts +7 -21
  56. package/dist/esm/types/authorization-attributes-contracts.d.ts.map +1 -1
  57. package/dist/esm/types/general.d.ts +4 -3
  58. package/dist/esm/types/general.d.ts.map +1 -1
  59. package/dist/esm/utils/assignment-schema.d.ts +51 -0
  60. package/dist/esm/utils/assignment-schema.d.ts.map +1 -0
  61. package/dist/esm/utils/assignment-schema.mjs +54 -0
  62. package/dist/esm/utils/resource-schema.d.ts +9 -0
  63. package/dist/esm/utils/resource-schema.d.ts.map +1 -0
  64. package/dist/esm/utils/resource-schema.mjs +16 -0
  65. package/dist/esm/utils/validation.d.ts +11 -28
  66. package/dist/esm/utils/validation.d.ts.map +1 -1
  67. package/dist/esm/utils/validation.mjs +61 -118
  68. package/dist/index.d.ts +6 -0
  69. package/dist/index.d.ts.map +1 -1
  70. package/dist/index.js +24 -0
  71. package/dist/resource-attribute-assignment.d.ts +3 -7
  72. package/dist/resource-attribute-assignment.d.ts.map +1 -1
  73. package/dist/resource-attribute-assignment.js +8 -2
  74. package/dist/resource-attributes-constants.d.ts +12 -10
  75. package/dist/resource-attributes-constants.d.ts.map +1 -1
  76. package/dist/resource-attributes-constants.js +4 -2
  77. package/dist/testKit/index.d.ts +4 -4
  78. package/dist/testKit/index.d.ts.map +1 -1
  79. package/dist/types/authorization-attributes-contracts.d.ts +7 -21
  80. package/dist/types/authorization-attributes-contracts.d.ts.map +1 -1
  81. package/dist/types/general.d.ts +4 -3
  82. package/dist/types/general.d.ts.map +1 -1
  83. package/dist/utils/assignment-schema.d.ts +51 -0
  84. package/dist/utils/assignment-schema.d.ts.map +1 -0
  85. package/dist/utils/assignment-schema.js +63 -0
  86. package/dist/utils/resource-schema.d.ts +9 -0
  87. package/dist/utils/resource-schema.d.ts.map +1 -0
  88. package/dist/utils/resource-schema.js +22 -0
  89. package/dist/utils/validation.d.ts +11 -28
  90. package/dist/utils/validation.d.ts.map +1 -1
  91. package/dist/utils/validation.js +61 -118
  92. package/package.json +2 -3
  93. package/src/authorization-attributes-ms-service.ts +92 -154
  94. package/src/authorization-attributes-service.ts +18 -16
  95. package/src/authorization-attributes-sns-service.ts +132 -131
  96. package/src/authorization-service.ts +3 -28
  97. package/src/base-attribute-assignment.ts +10 -26
  98. package/src/base-authorization-attributes-service.ts +90 -0
  99. package/src/entity-attribute-assignment.ts +7 -6
  100. package/src/index.ts +17 -0
  101. package/src/resource-attribute-assignment.ts +13 -10
  102. package/src/resource-attributes-constants.ts +4 -2
  103. package/src/testKit/index.ts +5 -5
  104. package/src/types/authorization-attributes-contracts.ts +7 -27
  105. package/src/types/general.ts +4 -3
  106. package/src/utils/assignment-schema.ts +56 -0
  107. package/src/utils/resource-schema.ts +16 -0
  108. package/src/utils/validation.ts +90 -137
  109. package/dist/esm/types/authorization-attributes-service.interface.d.ts +0 -57
  110. package/dist/esm/types/authorization-attributes-service.interface.d.ts.map +0 -1
  111. package/dist/esm/types/authorization-attributes-service.interface.mjs +0 -1
  112. package/dist/types/authorization-attributes-service.interface.d.ts +0 -57
  113. package/dist/types/authorization-attributes-service.interface.d.ts.map +0 -1
  114. package/dist/types/authorization-attributes-service.interface.js +0 -1
  115. package/src/types/authorization-attributes-service.interface.ts +0 -101
package/README.md CHANGED
@@ -127,6 +127,13 @@ const isAuthorizedResponse = await AuthorizationService.isAuthorized(accountId,
127
127
  const isAuthorized = isAuthorizedResponse.isAuthorized;
128
128
  ```
129
129
 
130
+ **Platform Profile Routing (v3.7.0+)**
131
+
132
+ - **Simplified Routing**: Platform profile routing logic in `AuthorizationService.getProfile()` has been simplified
133
+ - **Context-Aware Profiles**: All authorization requests now use context-aware profiles (`API_INTERNAL`, `SLOW`, or `INTERNAL`) based on request context
134
+ - **Removed Conditional Logic**: Conditional logic that would route certain apps through `PlatformProfile.APP` has been removed
135
+ - **Feature Flags Removed**: Feature flag-controlled routing for `allowed-sdk-platform-profiles` and `in-release-sdk-platform-profile` configurations has been removed
136
+
130
137
  ### canActionInScope API
131
138
 
132
139
  ```ts
@@ -535,7 +542,6 @@ This package includes an `ignite-local-overrides.json` file for local developmen
535
542
 
536
543
  The file enables feature flags for testing:
537
544
 
538
- - `sdk-platform-profiles`: Platform profile routing
539
545
  - `navigate-can-action-in-scope-to-graph`: Graph API routing for `canActionInScope` methods
540
546
 
541
547
  Modify this file for different local test scenarios, but remember changes only affect this package's development/testing.
@@ -1,70 +1,50 @@
1
- import { ResourceAttributeAssignment } from './resource-attribute-assignment';
2
- import { EntityAttributeAssignment } from './entity-attribute-assignment';
3
- import { ResourceAttributeOperation, EntityAttributeOperation } from './types/authorization-attributes-contracts';
1
+ import { ResourceAttributeUpsertOperation, ResourceAttributeDeleteOperation, EntityAttributeUpsertOperation, EntityAttributeDeleteOperation } from './types/authorization-attributes-contracts';
4
2
  import { EntityType } from './entity-attributes-constants';
5
- import { AuthorizationAttributesService } from './types/authorization-attributes-service.interface';
3
+ import { BaseAuthorizationAttributesService } from './base-authorization-attributes-service';
6
4
  import { Resource } from './types/general';
7
5
  /**
8
6
  * Service class for managing resource attributes in the authorization microservice.
9
7
  * Provides synchronous HTTP operations to create/update and delete attributes on resources.
10
8
  */
11
- export declare class AuthorizationAttributesMsService implements AuthorizationAttributesService {
9
+ export declare class AuthorizationAttributesMsService extends BaseAuthorizationAttributesService {
12
10
  private static LOG_TAG;
13
11
  private static httpClient;
14
- static destroyHttpClient(): void;
12
+ constructor();
15
13
  /**
16
- * Creates or updates resource attributes synchronously.
17
- * @param accountId The account ID
18
- * @param resourceAttributeAssignments Array of ResourceAttributeAssignment objects
19
- * @returns Promise<void>
20
- */
21
- upsertResourceAttributes(accountId: number, resourceAttributeAssignments: ResourceAttributeAssignment[], _appName?: string, _callerActionIdentifier?: string): Promise<void>;
22
- /**
23
- * Deletes specific attributes from a resource synchronously.
14
+ * Deletes a specific attribute from a resource synchronously.
24
15
  * @param accountId The account ID
25
16
  * @param resource Object with resourceType (string) and resourceId (number)
26
- * @param attributeKeys Array of attribute key strings to delete
27
- * @returns Promise<void>
28
- */
29
- deleteResourceAttributes(accountId: number, resource: Resource, attributeKeys: string[], _appName?: string, _callerActionIdentifier?: string): Promise<void>;
30
- /**
31
- * Creates or updates entity attributes synchronously.
32
- * @param accountId The account ID
33
- * @param entityAttributeAssignments Array of EntityAttributeAssignment objects
34
- * @returns Promise<void>
17
+ * @param attributeKey Attribute key string to delete
18
+ * @returns Promise<ResourceAttributeDeleteOperation>
35
19
  */
36
- upsertEntityAttributes(accountId: number, entityAttributeAssignments: EntityAttributeAssignment[], _appName?: string, _callerActionIdentifier?: string): Promise<void>;
20
+ deleteResourceAttributes(accountId: number, resource: Resource, attributeKey: string, _appName?: string, _callerActionIdentifier?: string): Promise<ResourceAttributeDeleteOperation>;
37
21
  /**
38
- * Deletes specific attributes from an entity synchronously.
22
+ * Deletes a specific attribute from an entity synchronously.
39
23
  * @param accountId The account ID
40
24
  * @param entityType The entity type
41
25
  * @param entityId The entity ID
42
- * @param attributeKeys Array of attribute key strings to delete
43
- * @returns Promise<void>
26
+ * @param attributeKey Attribute key string to delete
27
+ * @returns Promise<EntityAttributeDeleteOperation>
44
28
  */
45
- deleteEntityAttributes(accountId: number, entityType: EntityType, entityId: number, attributeKeys: string[], _appName?: string, _callerActionIdentifier?: string): Promise<void>;
29
+ deleteEntityAttributes(accountId: number, entityType: EntityType, entityId: number, attributeKey: string, _appName?: string, _callerActionIdentifier?: string): Promise<EntityAttributeDeleteOperation>;
46
30
  /**
47
- * Updates resource attributes (batch operations).
48
- * Note: MS service does not support batch operations directly.
49
- * This method processes operations sequentially using upsert/delete methods.
31
+ * Updates a resource attribute (single operation - upsert only).
50
32
  * @param accountId The account ID
51
33
  * @param appName App name (required for interface compatibility, but not used in MS service)
52
34
  * @param callerActionIdentifier Action identifier (required for interface compatibility, but not used in MS service)
53
- * @param resourceAttributeOperations Array of operations to perform
54
- * @returns Promise<ResourceAttributesOperation[]> Array of processed operations
35
+ * @param resourceAttributeOperation Operation to perform (must be UPSERT)
36
+ * @returns Promise<ResourceAttributeUpsertOperation> Processed operation
55
37
  */
56
- updateResourceAttributes(accountId: number, _appName: string, _callerActionIdentifier: string, resourceAttributeOperations: ResourceAttributeOperation[]): Promise<ResourceAttributeOperation[]>;
38
+ updateResourceAttributes(accountId: number, _appName: string, _callerActionIdentifier: string, resourceAttributeOperation: ResourceAttributeUpsertOperation): Promise<ResourceAttributeUpsertOperation>;
57
39
  /**
58
- * Updates entity attributes (batch operations).
59
- * Note: MS service does not support batch operations directly.
60
- * This method processes operations sequentially using upsert/delete methods.
40
+ * Updates an entity attribute (single operation - upsert only).
61
41
  * @param accountId The account ID
62
42
  * @param appName App name (required for interface compatibility, but not used in MS service)
63
43
  * @param callerActionIdentifier Action identifier (required for interface compatibility, but not used in MS service)
64
- * @param entityAttributeOperations Array of operations to perform
65
- * @returns Promise<EntityAttributesOperation[]> Array of processed operations
44
+ * @param entityAttributeOperation Operation to perform (must be UPSERT)
45
+ * @returns Promise<EntityAttributeUpsertOperation> Processed operation
66
46
  */
67
- updateEntityAttributes(accountId: number, _appName: string, _callerActionIdentifier: string, entityAttributeOperations: EntityAttributeOperation[]): Promise<EntityAttributeOperation[]>;
47
+ updateEntityAttributes(accountId: number, _appName: string, _callerActionIdentifier: string, entityAttributeOperation: EntityAttributeUpsertOperation): Promise<EntityAttributeUpsertOperation>;
68
48
  /**
69
49
  * Replaces path template parameters with actual values
70
50
  * @param template Path template with placeholders like {accountId}
@@ -1 +1 @@
1
- {"version":3,"file":"authorization-attributes-ms-service.d.ts","sourceRoot":"","sources":["../src/authorization-attributes-ms-service.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,2BAA2B,EAAE,MAAM,iCAAiC,CAAC;AAC9E,OAAO,EAAE,yBAAyB,EAAE,MAAM,+BAA+B,CAAC;AAC1E,OAAO,EAEL,0BAA0B,EAC1B,wBAAwB,EACzB,MAAM,4CAA4C,CAAC;AACpD,OAAO,EAAE,UAAU,EAAE,MAAM,+BAA+B,CAAC;AAM3D,OAAO,EAAE,8BAA8B,EAAE,MAAM,oDAAoD,CAAC;AACpG,OAAO,EAAE,QAAQ,EAAE,MAAM,iBAAiB,CAAC;AAW3C;;;GAGG;AACH,qBAAa,gCAAiC,YAAW,8BAA8B;IACrF,OAAO,CAAC,MAAM,CAAC,OAAO,CAAiC;IACvD,OAAO,CAAC,MAAM,CAAC,UAAU,CAAwD;WAEnE,iBAAiB,IAAI,IAAI;IAIvC;;;;;OAKG;IACG,wBAAwB,CAC5B,SAAS,EAAE,MAAM,EACjB,4BAA4B,EAAE,2BAA2B,EAAE,EAC3D,QAAQ,CAAC,EAAE,MAAM,EACjB,uBAAuB,CAAC,EAAE,MAAM,GAC/B,OAAO,CAAC,IAAI,CAAC;IAYhB;;;;;;OAMG;IACG,wBAAwB,CAC5B,SAAS,EAAE,MAAM,EACjB,QAAQ,EAAE,QAAQ,EAClB,aAAa,EAAE,MAAM,EAAE,EACvB,QAAQ,CAAC,EAAE,MAAM,EACjB,uBAAuB,CAAC,EAAE,MAAM,GAC/B,OAAO,CAAC,IAAI,CAAC;IAiBhB;;;;;OAKG;IACG,sBAAsB,CAC1B,SAAS,EAAE,MAAM,EACjB,0BAA0B,EAAE,yBAAyB,EAAE,EACvD,QAAQ,CAAC,EAAE,MAAM,EACjB,uBAAuB,CAAC,EAAE,MAAM,GAC/B,OAAO,CAAC,IAAI,CAAC;IAYhB;;;;;;;OAOG;IACG,sBAAsB,CAC1B,SAAS,EAAE,MAAM,EACjB,UAAU,EAAE,UAAU,EACtB,QAAQ,EAAE,MAAM,EAChB,aAAa,EAAE,MAAM,EAAE,EACvB,QAAQ,CAAC,EAAE,MAAM,EACjB,uBAAuB,CAAC,EAAE,MAAM,GAC/B,OAAO,CAAC,IAAI,CAAC;IAoBhB;;;;;;;;;OASG;IACG,wBAAwB,CAC5B,SAAS,EAAE,MAAM,EACjB,QAAQ,EAAE,MAAM,EAChB,uBAAuB,EAAE,MAAM,EAC/B,2BAA2B,EAAE,0BAA0B,EAAE,GACxD,OAAO,CAAC,0BAA0B,EAAE,CAAC;IAoCxC;;;;;;;;;OASG;IACG,sBAAsB,CAC1B,SAAS,EAAE,MAAM,EACjB,QAAQ,EAAE,MAAM,EAChB,uBAAuB,EAAE,MAAM,EAC/B,yBAAyB,EAAE,wBAAwB,EAAE,GACpD,OAAO,CAAC,wBAAwB,EAAE,CAAC;IAiBtC;;;;;OAKG;IACH,OAAO,CAAC,MAAM,CAAC,iBAAiB;IAQhC;;OAEG;mBACkB,oBAAoB;IAmEzC;;OAEG;IACH,OAAO,CAAC,MAAM,CAAC,iBAAiB;IA+ChC;;OAEG;mBACkB,oBAAoB;CAkE1C"}
1
+ {"version":3,"file":"authorization-attributes-ms-service.d.ts","sourceRoot":"","sources":["../src/authorization-attributes-ms-service.ts"],"names":[],"mappings":"AAIA,OAAO,EACL,gCAAgC,EAChC,gCAAgC,EAChC,8BAA8B,EAC9B,8BAA8B,EAC/B,MAAM,4CAA4C,CAAC;AACpD,OAAO,EAAE,UAAU,EAAE,MAAM,+BAA+B,CAAC;AAI3D,OAAO,EAAE,kCAAkC,EAAE,MAAM,yCAAyC,CAAC;AAC7F,OAAO,EAAE,QAAQ,EAAE,MAAM,iBAAiB,CAAC;AAY3C;;;GAGG;AACH,qBAAa,gCAAiC,SAAQ,kCAAkC;IACtF,OAAO,CAAC,MAAM,CAAC,OAAO,CAAiC;IACvD,OAAO,CAAC,MAAM,CAAC,UAAU,CAAqD;;IAY9E;;;;;;OAMG;IACG,wBAAwB,CAC5B,SAAS,EAAE,MAAM,EACjB,QAAQ,EAAE,QAAQ,EAClB,YAAY,EAAE,MAAM,EACpB,QAAQ,CAAC,EAAE,MAAM,EACjB,uBAAuB,CAAC,EAAE,MAAM,GAC/B,OAAO,CAAC,gCAAgC,CAAC;IAoB5C;;;;;;;OAOG;IACG,sBAAsB,CAC1B,SAAS,EAAE,MAAM,EACjB,UAAU,EAAE,UAAU,EACtB,QAAQ,EAAE,MAAM,EAChB,YAAY,EAAE,MAAM,EACpB,QAAQ,CAAC,EAAE,MAAM,EACjB,uBAAuB,CAAC,EAAE,MAAM,GAC/B,OAAO,CAAC,8BAA8B,CAAC;IAqB1C;;;;;;;OAOG;IACG,wBAAwB,CAC5B,SAAS,EAAE,MAAM,EACjB,QAAQ,EAAE,MAAM,EAChB,uBAAuB,EAAE,MAAM,EAC/B,0BAA0B,EAAE,gCAAgC,GAC3D,OAAO,CAAC,gCAAgC,CAAC;IAqB5C;;;;;;;OAOG;IACG,sBAAsB,CAC1B,SAAS,EAAE,MAAM,EACjB,QAAQ,EAAE,MAAM,EAChB,uBAAuB,EAAE,MAAM,EAC/B,wBAAwB,EAAE,8BAA8B,GACvD,OAAO,CAAC,8BAA8B,CAAC;IAsB1C;;;;;OAKG;IACH,OAAO,CAAC,MAAM,CAAC,iBAAiB;IAQhC;;OAEG;mBACkB,oBAAoB;IA6DzC;;OAEG;IACH,OAAO,CAAC,MAAM,CAAC,iBAAiB;IA+ChC;;OAEG;mBACkB,oBAAoB;CA4D1C"}
@@ -4,12 +4,10 @@ const tridentBackendApi = require('@mondaydotcomorg/trident-backend-api');
4
4
  const mondayJwt = require('@mondaydotcomorg/monday-jwt');
5
5
  const resourceAttributeAssignment = require('./resource-attribute-assignment.js');
6
6
  const entityAttributeAssignment = require('./entity-attribute-assignment.js');
7
- const types_authorizationAttributesContracts = require('./types/authorization-attributes-contracts.js');
8
- const errors_argumentError = require('./errors/argument-error.js');
9
7
  const authorizationInternalService = require('./authorization-internal-service.js');
10
8
  const attributionsService = require('./attributions-service.js');
11
9
  const constants = require('./constants.js');
12
- const utils_validation = require('./utils/validation.js');
10
+ const baseAuthorizationAttributesService = require('./base-authorization-attributes-service.js');
13
11
 
14
12
  const INTERNAL_APP_NAME = 'internal_ms';
15
13
  const UPSERT_RESOURCE_ATTRIBUTES_PATH = '/attributes/{accountId}/resource';
@@ -20,123 +18,79 @@ const DELETE_ENTITY_ATTRIBUTES_PATH = '/attributes/{accountId}/entity/{entityTyp
20
18
  * Service class for managing resource attributes in the authorization microservice.
21
19
  * Provides synchronous HTTP operations to create/update and delete attributes on resources.
22
20
  */
23
- class AuthorizationAttributesMsService {
21
+ class AuthorizationAttributesMsService extends baseAuthorizationAttributesService.BaseAuthorizationAttributesService {
24
22
  static LOG_TAG = 'authorization_attributes_ms';
25
- static httpClient = tridentBackendApi.Api.getPart('httpClient') ?? null;
26
- static destroyHttpClient() {
27
- AuthorizationAttributesMsService.httpClient = null;
28
- }
29
- /**
30
- * Creates or updates resource attributes synchronously.
31
- * @param accountId The account ID
32
- * @param resourceAttributeAssignments Array of ResourceAttributeAssignment objects
33
- * @returns Promise<void>
34
- */
35
- async upsertResourceAttributes(accountId, resourceAttributeAssignments, _appName, _callerActionIdentifier) {
36
- return AuthorizationAttributesMsService.executeUpsertRequest(accountId, resourceAttributeAssignments, UPSERT_RESOURCE_ATTRIBUTES_PATH, 'resourceAttributeAssignments', resourceAttributeAssignment.ResourceAttributeAssignment, 'resource', 'upsertResourceAttributes');
23
+ static httpClient = tridentBackendApi.Api.getPart('httpClient');
24
+ constructor() {
25
+ super();
26
+ if (!AuthorizationAttributesMsService.httpClient) {
27
+ AuthorizationAttributesMsService.httpClient = tridentBackendApi.Api.getPart('httpClient');
28
+ if (!AuthorizationAttributesMsService.httpClient) {
29
+ throw new Error('HTTP client is not initialized');
30
+ }
31
+ }
37
32
  }
38
33
  /**
39
- * Deletes specific attributes from a resource synchronously.
34
+ * Deletes a specific attribute from a resource synchronously.
40
35
  * @param accountId The account ID
41
36
  * @param resource Object with resourceType (string) and resourceId (number)
42
- * @param attributeKeys Array of attribute key strings to delete
43
- * @returns Promise<void>
37
+ * @param attributeKey Attribute key string to delete
38
+ * @returns Promise<ResourceAttributeDeleteOperation>
44
39
  */
45
- async deleteResourceAttributes(accountId, resource, attributeKeys, _appName, _callerActionIdentifier) {
46
- utils_validation.ValidationUtils.validateResource(resource);
47
- utils_validation.ValidationUtils.validateStringArray(attributeKeys);
48
- return AuthorizationAttributesMsService.executeDeleteRequest(accountId, DELETE_RESOURCE_ATTRIBUTES_PATH, {
40
+ async deleteResourceAttributes(accountId, resource, attributeKey, _appName, _callerActionIdentifier) {
41
+ const operation = await super.deleteResourceAttributes(accountId, resource, attributeKey);
42
+ await AuthorizationAttributesMsService.executeDeleteRequest(accountId, DELETE_RESOURCE_ATTRIBUTES_PATH, {
49
43
  resourceType: resource.type,
50
44
  resourceId: resource.id,
51
- }, attributeKeys, 'resource', 'deleteResourceAttributesSync', { resource });
52
- }
53
- /**
54
- * Creates or updates entity attributes synchronously.
55
- * @param accountId The account ID
56
- * @param entityAttributeAssignments Array of EntityAttributeAssignment objects
57
- * @returns Promise<void>
58
- */
59
- async upsertEntityAttributes(accountId, entityAttributeAssignments, _appName, _callerActionIdentifier) {
60
- return AuthorizationAttributesMsService.executeUpsertRequest(accountId, entityAttributeAssignments, UPSERT_ENTITY_ATTRIBUTES_PATH, 'entityAttributeAssignments', entityAttributeAssignment.EntityAttributeAssignment, 'entity', 'upsertEntityAttributesSync');
45
+ }, [attributeKey], 'resource', 'deleteResourceAttributesSync');
46
+ return operation;
61
47
  }
62
48
  /**
63
- * Deletes specific attributes from an entity synchronously.
49
+ * Deletes a specific attribute from an entity synchronously.
64
50
  * @param accountId The account ID
65
51
  * @param entityType The entity type
66
52
  * @param entityId The entity ID
67
- * @param attributeKeys Array of attribute key strings to delete
68
- * @returns Promise<void>
53
+ * @param attributeKey Attribute key string to delete
54
+ * @returns Promise<EntityAttributeDeleteOperation>
69
55
  */
70
- async deleteEntityAttributes(accountId, entityType, entityId, attributeKeys, _appName, _callerActionIdentifier) {
71
- if (!entityType || typeof entityType !== 'string' || entityType.trim() === '') {
72
- throw new errors_argumentError.ArgumentError(`entityType must be a non-empty string, got: ${entityType}`);
73
- }
74
- utils_validation.ValidationUtils.validateInteger(entityId);
75
- return AuthorizationAttributesMsService.executeDeleteRequest(accountId, DELETE_ENTITY_ATTRIBUTES_PATH, {
56
+ async deleteEntityAttributes(accountId, entityType, entityId, attributeKey, _appName, _callerActionIdentifier) {
57
+ const operation = await super.deleteEntityAttributes(accountId, entityType, entityId, attributeKey);
58
+ await AuthorizationAttributesMsService.executeDeleteRequest(accountId, DELETE_ENTITY_ATTRIBUTES_PATH, {
76
59
  entityType,
77
60
  entityId,
78
- }, attributeKeys, 'entity', 'deleteEntityAttributesSync', { entityType, entityId });
61
+ }, [attributeKey], 'entity', 'deleteEntityAttributesSync');
62
+ return operation;
79
63
  }
80
64
  /**
81
- * Updates resource attributes (batch operations).
82
- * Note: MS service does not support batch operations directly.
83
- * This method processes operations sequentially using upsert/delete methods.
65
+ * Updates a resource attribute (single operation - upsert only).
84
66
  * @param accountId The account ID
85
67
  * @param appName App name (required for interface compatibility, but not used in MS service)
86
68
  * @param callerActionIdentifier Action identifier (required for interface compatibility, but not used in MS service)
87
- * @param resourceAttributeOperations Array of operations to perform
88
- * @returns Promise<ResourceAttributesOperation[]> Array of processed operations
69
+ * @param resourceAttributeOperation Operation to perform (must be UPSERT)
70
+ * @returns Promise<ResourceAttributeUpsertOperation> Processed operation
89
71
  */
90
- async updateResourceAttributes(accountId, _appName, _callerActionIdentifier, resourceAttributeOperations) {
91
- const processedOperations = [];
92
- for (const operation of resourceAttributeOperations) {
93
- if (operation.operationType === types_authorizationAttributesContracts.AttributeOperation.UPSERT) {
94
- if (!operation.resourceId) {
95
- throw new errors_argumentError.ArgumentError('resourceId is required for upsert operation');
96
- }
97
- await this.upsertResourceAttributes(accountId, [
98
- new resourceAttributeAssignment.ResourceAttributeAssignment(operation.resourceId, operation.resourceType, operation.key, operation.value || ''),
99
- ]);
100
- processedOperations.push(operation);
101
- }
102
- else if (operation.operationType === types_authorizationAttributesContracts.AttributeOperation.DELETE) {
103
- if (!operation.resourceId) {
104
- throw new errors_argumentError.ArgumentError('resourceId is required for delete operation');
105
- }
106
- await this.deleteResourceAttributes(accountId, {
107
- type: operation.resourceType,
108
- id: operation.resourceId,
109
- }, [operation.key]);
110
- processedOperations.push(operation);
111
- }
112
- }
113
- return processedOperations;
72
+ async updateResourceAttributes(accountId, _appName, _callerActionIdentifier, resourceAttributeOperation) {
73
+ await super.updateResourceAttributes(accountId, _appName, _callerActionIdentifier, resourceAttributeOperation);
74
+ await AuthorizationAttributesMsService.executeUpsertRequest(accountId, [
75
+ new resourceAttributeAssignment.ResourceAttributeAssignment(resourceAttributeOperation.resourceId, resourceAttributeOperation.resourceType, resourceAttributeOperation.key, resourceAttributeOperation.value),
76
+ ], UPSERT_RESOURCE_ATTRIBUTES_PATH, 'resourceAttributeAssignments', 'resource', 'updateResourceAttributesSync');
77
+ return resourceAttributeOperation;
114
78
  }
115
79
  /**
116
- * Updates entity attributes (batch operations).
117
- * Note: MS service does not support batch operations directly.
118
- * This method processes operations sequentially using upsert/delete methods.
80
+ * Updates an entity attribute (single operation - upsert only).
119
81
  * @param accountId The account ID
120
82
  * @param appName App name (required for interface compatibility, but not used in MS service)
121
83
  * @param callerActionIdentifier Action identifier (required for interface compatibility, but not used in MS service)
122
- * @param entityAttributeOperations Array of operations to perform
123
- * @returns Promise<EntityAttributesOperation[]> Array of processed operations
84
+ * @param entityAttributeOperation Operation to perform (must be UPSERT)
85
+ * @returns Promise<EntityAttributeUpsertOperation> Processed operation
124
86
  */
125
- async updateEntityAttributes(accountId, _appName, _callerActionIdentifier, entityAttributeOperations) {
126
- const processedOperations = [];
127
- for (const operation of entityAttributeOperations) {
128
- if (operation.operationType === 'upsert') {
129
- await this.upsertEntityAttributes(accountId, [
130
- new entityAttributeAssignment.EntityAttributeAssignment(operation.entityId, operation.entityType, operation.key, operation.value || ''),
131
- ]);
132
- processedOperations.push(operation);
133
- }
134
- else if (operation.operationType === 'delete') {
135
- await this.deleteEntityAttributes(accountId, operation.entityType, operation.entityId, [operation.key]);
136
- processedOperations.push(operation);
137
- }
138
- }
139
- return processedOperations;
87
+ async updateEntityAttributes(accountId, _appName, _callerActionIdentifier, entityAttributeOperation) {
88
+ // Validate before processing
89
+ await super.updateEntityAttributes(accountId, _appName, _callerActionIdentifier, entityAttributeOperation);
90
+ await AuthorizationAttributesMsService.executeUpsertRequest(accountId, [
91
+ new entityAttributeAssignment.EntityAttributeAssignment(entityAttributeOperation.entityId, entityAttributeOperation.entityType, entityAttributeOperation.key, entityAttributeOperation.value),
92
+ ], UPSERT_ENTITY_ATTRIBUTES_PATH, 'entityAttributeAssignments', 'entity', 'upsertEntityAttributesSync');
93
+ return entityAttributeOperation;
140
94
  }
141
95
  /**
142
96
  * Replaces path template parameters with actual values
@@ -154,10 +108,7 @@ class AuthorizationAttributesMsService {
154
108
  /**
155
109
  * Generic helper for executing delete requests
156
110
  */
157
- static async executeDeleteRequest(accountId, pathTemplate, pathParams, keys, logPrefix, methodName, context = {}) {
158
- // Validate inputs
159
- utils_validation.ValidationUtils.validateInteger(accountId);
160
- utils_validation.ValidationUtils.validateStringArray(keys);
111
+ static async executeDeleteRequest(accountId, pathTemplate, pathParams, keys, logPrefix, methodName) {
161
112
  if (!keys.length) {
162
113
  authorizationInternalService.logger.warn({ tag: this.LOG_TAG, accountId, ...pathParams }, `${methodName} called with empty keys array`);
163
114
  return;
@@ -190,7 +141,6 @@ class AuthorizationAttributesMsService {
190
141
  method: methodName,
191
142
  accountId,
192
143
  ...pathParams,
193
- ...context,
194
144
  error: err instanceof Error ? err.message : String(err),
195
145
  }, `Failed in ${methodName}`);
196
146
  throw err;
@@ -244,12 +194,7 @@ class AuthorizationAttributesMsService {
244
194
  /**
245
195
  * Generic helper for executing upsert requests
246
196
  */
247
- static async executeUpsertRequest(accountId, assignments, pathTemplate, requestBodyKey, assignmentClass, logPrefix, methodName) {
248
- utils_validation.ValidationUtils.validateInteger(accountId);
249
- utils_validation.ValidationUtils.validateArrayTypeOf(assignments, assignmentClass);
250
- if (!assignments.length) {
251
- return;
252
- }
197
+ static async executeUpsertRequest(accountId, assignments, pathTemplate, requestBodyKey, logPrefix, methodName) {
253
198
  const assignmentDto = assignments.map(assignment => assignment.toDataTransferObject());
254
199
  const requestBody = requestBodyKey === 'resourceAttributeAssignments'
255
200
  ? { resourceAttributeAssignments: assignmentDto }
@@ -1,29 +1,31 @@
1
- import { AuthorizationAttributesService as IAuthorizationAttributesService } from './types/authorization-attributes-service.interface';
1
+ import { BaseAuthorizationAttributesService as IAuthorizationAttributesService } from './base-authorization-attributes-service';
2
2
  /**
3
3
  * Main service class for managing resource and entity attributes.
4
- * Provides access to both direct (MS) and SNS operations.
4
+ * Provides access to both HTTP (direct microservice) and SNS (async messaging) operations.
5
5
  *
6
6
  * @example
7
7
  * const service = new AuthorizationAttributesService();
8
8
  *
9
- * // Use direct operations
10
- * await service.direct().upsertResourceAttributes(accountId, assignments);
9
+ * // Use HTTP operations (direct calls to microservice)
10
+ * await service.http().updateResourceAttributes(accountId, appName, actionId, operation);
11
11
  *
12
- * // Use SNS operations
13
- * await service.sns().upsertResourceAttributes(accountId, assignments, appName, actionId);
12
+ * // Use SNS operations (async messaging, then to microservice)
13
+ * await service.sns().updateResourceAttributes(accountId, appName, actionId, operation);
14
14
  * ```
15
15
  */
16
16
  export declare class AuthorizationAttributesService {
17
- private _directService;
18
- private _snsService;
17
+ private httpService;
18
+ private snsService;
19
19
  /**
20
- * Gets the direct (MS) service instance.
20
+ * Gets the HTTP service instance.
21
+ * Performs direct HTTP calls to the authorization microservice.
21
22
  * Initializes the service on first access (lazy initialization).
22
23
  * @returns IAuthorizationAttributesService instance
23
24
  */
24
- direct(): IAuthorizationAttributesService;
25
+ http(): IAuthorizationAttributesService;
25
26
  /**
26
27
  * Gets the SNS service instance.
28
+ * Sends operations via SNS messaging, which are then processed by the microservice asynchronously.
27
29
  * Initializes the service on first access (lazy initialization).
28
30
  * @returns IAuthorizationAttributesService instance
29
31
  */
@@ -1 +1 @@
1
- {"version":3,"file":"authorization-attributes-service.d.ts","sourceRoot":"","sources":["../src/authorization-attributes-service.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,8BAA8B,IAAI,+BAA+B,EAAE,MAAM,oDAAoD,CAAC;AAEvI;;;;;;;;;;;;;GAaG;AACH,qBAAa,8BAA8B;IACzC,OAAO,CAAC,cAAc,CAAiD;IACvE,OAAO,CAAC,WAAW,CAAkD;IAErE;;;;OAIG;IACH,MAAM,IAAI,+BAA+B;IAOzC;;;;OAIG;IACH,GAAG,IAAI,+BAA+B;CAMvC"}
1
+ {"version":3,"file":"authorization-attributes-service.d.ts","sourceRoot":"","sources":["../src/authorization-attributes-service.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,kCAAkC,IAAI,+BAA+B,EAAE,MAAM,yCAAyC,CAAC;AAEhI;;;;;;;;;;;;;GAaG;AACH,qBAAa,8BAA8B;IACzC,OAAO,CAAC,WAAW,CAAiD;IACpE,OAAO,CAAC,UAAU,CAAkD;IAEpE;;;;;OAKG;IACH,IAAI,IAAI,+BAA+B;IAOvC;;;;;OAKG;IACH,GAAG,IAAI,+BAA+B;CAMvC"}
@@ -5,42 +5,44 @@ const authorizationAttributesSnsService = require('./authorization-attributes-sn
5
5
 
6
6
  /**
7
7
  * Main service class for managing resource and entity attributes.
8
- * Provides access to both direct (MS) and SNS operations.
8
+ * Provides access to both HTTP (direct microservice) and SNS (async messaging) operations.
9
9
  *
10
10
  * @example
11
11
  * const service = new AuthorizationAttributesService();
12
12
  *
13
- * // Use direct operations
14
- * await service.direct().upsertResourceAttributes(accountId, assignments);
13
+ * // Use HTTP operations (direct calls to microservice)
14
+ * await service.http().updateResourceAttributes(accountId, appName, actionId, operation);
15
15
  *
16
- * // Use SNS operations
17
- * await service.sns().upsertResourceAttributes(accountId, assignments, appName, actionId);
16
+ * // Use SNS operations (async messaging, then to microservice)
17
+ * await service.sns().updateResourceAttributes(accountId, appName, actionId, operation);
18
18
  * ```
19
19
  */
20
20
  class AuthorizationAttributesService {
21
- _directService = null;
22
- _snsService = null;
21
+ httpService = null;
22
+ snsService = null;
23
23
  /**
24
- * Gets the direct (MS) service instance.
24
+ * Gets the HTTP service instance.
25
+ * Performs direct HTTP calls to the authorization microservice.
25
26
  * Initializes the service on first access (lazy initialization).
26
27
  * @returns IAuthorizationAttributesService instance
27
28
  */
28
- direct() {
29
- if (this._directService === null) {
30
- this._directService = new authorizationAttributesMsService.AuthorizationAttributesMsService();
29
+ http() {
30
+ if (this.httpService === null) {
31
+ this.httpService = new authorizationAttributesMsService.AuthorizationAttributesMsService();
31
32
  }
32
- return this._directService;
33
+ return this.httpService;
33
34
  }
34
35
  /**
35
36
  * Gets the SNS service instance.
37
+ * Sends operations via SNS messaging, which are then processed by the microservice asynchronously.
36
38
  * Initializes the service on first access (lazy initialization).
37
39
  * @returns IAuthorizationAttributesService instance
38
40
  */
39
41
  sns() {
40
- if (this._snsService === null) {
41
- this._snsService = new authorizationAttributesSnsService.AuthorizationAttributesSnsService();
42
+ if (this.snsService === null) {
43
+ this.snsService = new authorizationAttributesSnsService.AuthorizationAttributesSnsService();
42
44
  }
43
- return this._snsService;
45
+ return this.snsService;
44
46
  }
45
47
  }
46
48
 
@@ -1,13 +1,12 @@
1
- import { ResourceAttributeAssignment, ResourceAttributeOperation, EntityAttributeOperation } from './types/authorization-attributes-contracts';
2
- import { EntityAttributeAssignment } from './entity-attribute-assignment';
1
+ import { ResourceAttributeUpsertOperation, EntityAttributeUpsertOperation, EntityAttributeDeleteOperation, ResourceAttributeDeleteOperation } from './types/authorization-attributes-contracts';
3
2
  import { Resource } from './types/general';
4
- import { AuthorizationAttributesService } from './types/authorization-attributes-service.interface';
3
+ import { BaseAuthorizationAttributesService } from './base-authorization-attributes-service';
5
4
  import { EntityType } from './entity-attributes-constants';
6
5
  /**
7
6
  * Service class for managing resource attributes asynchronously via SNS.
8
7
  * Provides asynchronous operations to create/update and delete attributes on resources.
9
8
  */
10
- export declare class AuthorizationAttributesSnsService implements AuthorizationAttributesService {
9
+ export declare class AuthorizationAttributesSnsService extends BaseAuthorizationAttributesService {
11
10
  private static LOG_TAG;
12
11
  private resourceSnsArn;
13
12
  private entitySnsArn;
@@ -16,66 +15,60 @@ export declare class AuthorizationAttributesSnsService implements AuthorizationA
16
15
  */
17
16
  constructor();
18
17
  /**
19
- * Async function to upsert resource attributes using SNS.
20
- * Sends the updates request to SNS and returns before the change actually took place.
18
+ * Async function to delete a resource attribute using SNS.
19
+ * Sends the delete request to SNS and returns before the change actually took place.
21
20
  * @param accountId The account ID
22
- * @param appName App name of the calling app
23
- * @param callerActionIdentifier Action identifier
24
- * @param resourceAttributeAssignments Array of resource attribute assignments to upsert
25
- * @return Promise with array of sent operations
26
- */
27
- upsertResourceAttributes(accountId: number, resourceAttributeAssignments: ResourceAttributeAssignment[], appName?: string, callerActionIdentifier?: string): Promise<ResourceAttributeOperation[]>;
28
- /**
29
- * Async function to delete resource attributes using SNS.
30
- * Sends the updates request to SNS and returns before the change actually took place.
31
- * @param accountId The account ID
32
- * @param appName App name of the calling app
33
- * @param callerActionIdentifier Action identifier
34
21
  * @param resource The resource (resourceType, resourceId)
35
- * @param attributeKeys Array of attribute keys to delete
36
- * @return Promise with array of sent operations
37
- */
38
- deleteResourceAttributes(accountId: number, resource: Resource, attributeKeys: string[], appName?: string, callerActionIdentifier?: string): Promise<ResourceAttributeOperation[]>;
39
- /**
40
- * Async function to upsert entity attributes using SNS.
41
- * Sends the updates request to SNS and returns before the change actually took place.
42
- * @param accountId The account ID
22
+ * @param attributeKey Attribute key to delete
43
23
  * @param appName App name of the calling app
44
24
  * @param callerActionIdentifier Action identifier
45
- * @param entityAttributeAssignments Array of entity attribute assignments to upsert
46
- * @return Promise with array of sent operations
25
+ * @return Promise with sent operation
47
26
  */
48
- upsertEntityAttributes(accountId: number, entityAttributeAssignments: EntityAttributeAssignment[], appName?: string, callerActionIdentifier?: string): Promise<EntityAttributeOperation[]>;
27
+ deleteResourceAttributes(accountId: number, resource: Resource, attributeKey: string, appName?: string, callerActionIdentifier?: string): Promise<ResourceAttributeDeleteOperation>;
49
28
  /**
50
- * Async function to delete entity attributes using SNS.
51
- * Sends the updates request to SNS and returns before the change actually took place.
29
+ * Async function to delete an entity attribute using SNS.
30
+ * Sends the delete request to SNS and returns before the change actually took place.
52
31
  * @param accountId The account ID
53
- * @param appName App name of the calling app
54
- * @param callerActionIdentifier Action identifier
55
32
  * @param entityType The entity type
56
33
  * @param entityId The entity ID
57
- * @param attributeKeys Array of attribute keys to delete
58
- * @return Promise with array of sent operations
34
+ * @param attributeKey Attribute key to delete
35
+ * @param appName App name of the calling app
36
+ * @param callerActionIdentifier Action identifier
37
+ * @return Promise with sent operation
59
38
  */
60
- deleteEntityAttributes(accountId: number, entityType: EntityType | string, entityId: number, attributeKeys: string[], appName?: string, callerActionIdentifier?: string): Promise<EntityAttributeOperation[]>;
39
+ deleteEntityAttributes(accountId: number, entityType: EntityType, entityId: number, attributeKey: string, appName?: string, callerActionIdentifier?: string): Promise<EntityAttributeDeleteOperation>;
61
40
  /**
62
- * Async function, this function only send the updates request to SNS and return before the change actually took place
41
+ * Async function, this function only send the update request to SNS and return before the change actually took place
63
42
  * @param accountId
64
43
  * @param appName - App name of the calling app
65
44
  * @param callerActionIdentifier - action identifier
66
- * @param resourceAttributeOperations - Array of operations to do on resource attributes.
67
- * @return {Promise<ResourceAttributesOperation[]>} Array of sent operations
45
+ * @param resourceAttributeOperation - Operation to do on resource attribute.
46
+ * @return {Promise<ResourceAttributeUpsertOperation>} Sent operation
68
47
  * */
69
- updateResourceAttributes(accountId: number, appName: string, callerActionIdentifier: string, resourceAttributeOperations: ResourceAttributeOperation[]): Promise<ResourceAttributeOperation[]>;
48
+ updateResourceAttributes(accountId: number, appName: string, callerActionIdentifier: string, resourceAttributeOperation: ResourceAttributeUpsertOperation): Promise<ResourceAttributeUpsertOperation>;
70
49
  /**
71
- * Async function, this function only send the updates request to SNS and return before the change actually took place
50
+ * Async function, this function only send the update request to SNS and return before the change actually took place
72
51
  * @param accountId
73
52
  * @param appName - App name of the calling app
74
53
  * @param callerActionIdentifier - action identifier
75
- * @param entityAttributeOperations - Array of operations to do on entity attributes.
76
- * @return {Promise<EntityAttributeOperation[]>} Array of sent operations
54
+ * @param entityAttributeOperation - Operation to do on entity attribute.
55
+ * @return {Promise<EntityAttributeUpsertOperation>} Sent operation
77
56
  * */
78
- updateEntityAttributes(accountId: number, appName: string, callerActionIdentifier: string, entityAttributeOperations: EntityAttributeOperation[]): Promise<EntityAttributeOperation[]>;
57
+ updateEntityAttributes(accountId: number, appName: string, callerActionIdentifier: string, entityAttributeOperation: EntityAttributeUpsertOperation): Promise<EntityAttributeUpsertOperation>;
58
+ /**
59
+ * Base function to send attribute operations to SNS.
60
+ * Chunks operations and sends them in parallel.
61
+ * @param topicArn The SNS topic ARN to send messages to
62
+ * @param accountId The account ID
63
+ * @param appName App name of the calling app
64
+ * @param callerActionIdentifier Action identifier
65
+ * @param operations Array of operations to send
66
+ * @param chunkSize Maximum number of operations per message
67
+ * @param messageKind The kind of message being sent
68
+ * @param errorLogMessage Error message to log if sending fails
69
+ * @return Promise with array of sent operations
70
+ */
71
+ private sendOperationsToSns;
79
72
  private sendSingleSnsMessage;
80
73
  private static getSnsTopicArn;
81
74
  /**
@@ -1 +1 @@
1
- {"version":3,"file":"authorization-attributes-sns-service.d.ts","sourceRoot":"","sources":["../src/authorization-attributes-sns-service.ts"],"names":[],"mappings":"AAEA,OAAO,EACL,2BAA2B,EAC3B,0BAA0B,EAC1B,wBAAwB,EAEzB,MAAM,4CAA4C,CAAC;AACpD,OAAO,EAAE,yBAAyB,EAAE,MAAM,+BAA+B,CAAC;AAC1E,OAAO,EAAE,QAAQ,EAAE,MAAM,iBAAiB,CAAC;AAc3C,OAAO,EAAE,8BAA8B,EAAE,MAAM,oDAAoD,CAAC;AACpG,OAAO,EAAE,UAAU,EAAE,MAAM,+BAA+B,CAAC;AAE3D;;;GAGG;AACH,qBAAa,iCAAkC,YAAW,8BAA8B;IACtF,OAAO,CAAC,MAAM,CAAC,OAAO,CAA8B;IACpD,OAAO,CAAC,cAAc,CAAS;IAC/B,OAAO,CAAC,YAAY,CAAS;IAE7B;;OAEG;;IAMH;;;;;;;;OAQG;IACG,wBAAwB,CAC5B,SAAS,EAAE,MAAM,EACjB,4BAA4B,EAAE,2BAA2B,EAAE,EAC3D,OAAO,CAAC,EAAE,MAAM,EAChB,sBAAsB,CAAC,EAAE,MAAM,GAC9B,OAAO,CAAC,0BAA0B,EAAE,CAAC;IAWxC;;;;;;;;;OASG;IACG,wBAAwB,CAC5B,SAAS,EAAE,MAAM,EACjB,QAAQ,EAAE,QAAQ,EAClB,aAAa,EAAE,MAAM,EAAE,EACvB,OAAO,CAAC,EAAE,MAAM,EAChB,sBAAsB,CAAC,EAAE,MAAM,GAC9B,OAAO,CAAC,0BAA0B,EAAE,CAAC;IAgBxC;;;;;;;;OAQG;IACG,sBAAsB,CAC1B,SAAS,EAAE,MAAM,EACjB,0BAA0B,EAAE,yBAAyB,EAAE,EACvD,OAAO,CAAC,EAAE,MAAM,EAChB,sBAAsB,CAAC,EAAE,MAAM,GAC9B,OAAO,CAAC,wBAAwB,EAAE,CAAC;IAgBtC;;;;;;;;;;OAUG;IACG,sBAAsB,CAC1B,SAAS,EAAE,MAAM,EACjB,UAAU,EAAE,UAAU,GAAG,MAAM,EAC/B,QAAQ,EAAE,MAAM,EAChB,aAAa,EAAE,MAAM,EAAE,EACvB,OAAO,CAAC,EAAE,MAAM,EAChB,sBAAsB,CAAC,EAAE,MAAM,GAC9B,OAAO,CAAC,wBAAwB,EAAE,CAAC;IAgBtC;;;;;;;UAOM;IACA,wBAAwB,CAC5B,SAAS,EAAE,MAAM,EACjB,OAAO,EAAE,MAAM,EACf,sBAAsB,EAAE,MAAM,EAC9B,2BAA2B,EAAE,0BAA0B,EAAE,GACxD,OAAO,CAAC,0BAA0B,EAAE,CAAC;IAoBxC;;;;;;;UAOM;IACA,sBAAsB,CAC1B,SAAS,EAAE,MAAM,EACjB,OAAO,EAAE,MAAM,EACf,sBAAsB,EAAE,MAAM,EAC9B,yBAAyB,EAAE,wBAAwB,EAAE,GACpD,OAAO,CAAC,wBAAwB,EAAE,CAAC;YAoBxB,oBAAoB;IA2BlC,OAAO,CAAC,MAAM,CAAC,cAAc;IA0B7B;;;;;;;OAOG;IACG,kCAAkC,IAAI,OAAO,CAAC,OAAO,CAAC;CAoB7D"}
1
+ {"version":3,"file":"authorization-attributes-sns-service.d.ts","sourceRoot":"","sources":["../src/authorization-attributes-sns-service.ts"],"names":[],"mappings":"AAEA,OAAO,EACL,gCAAgC,EAChC,8BAA8B,EAC9B,8BAA8B,EAC9B,gCAAgC,EACjC,MAAM,4CAA4C,CAAC;AACpD,OAAO,EAAE,QAAQ,EAAE,MAAM,iBAAiB,CAAC;AAa3C,OAAO,EAAE,kCAAkC,EAAE,MAAM,yCAAyC,CAAC;AAC7F,OAAO,EAAE,UAAU,EAAE,MAAM,+BAA+B,CAAC;AAG3D;;;GAGG;AACH,qBAAa,iCAAkC,SAAQ,kCAAkC;IACvF,OAAO,CAAC,MAAM,CAAC,OAAO,CAA8B;IACpD,OAAO,CAAC,cAAc,CAAS;IAC/B,OAAO,CAAC,YAAY,CAAS;IAE7B;;OAEG;;IAOH;;;;;;;;;OASG;IACG,wBAAwB,CAC5B,SAAS,EAAE,MAAM,EACjB,QAAQ,EAAE,QAAQ,EAClB,YAAY,EAAE,MAAM,EACpB,OAAO,CAAC,EAAE,MAAM,EAChB,sBAAsB,CAAC,EAAE,MAAM,GAC9B,OAAO,CAAC,gCAAgC,CAAC;IAsB5C;;;;;;;;;;OAUG;IACG,sBAAsB,CAC1B,SAAS,EAAE,MAAM,EACjB,UAAU,EAAE,UAAU,EACtB,QAAQ,EAAE,MAAM,EAChB,YAAY,EAAE,MAAM,EACpB,OAAO,CAAC,EAAE,MAAM,EAChB,sBAAsB,CAAC,EAAE,MAAM,GAC9B,OAAO,CAAC,8BAA8B,CAAC;IAuB1C;;;;;;;UAOM;IACA,wBAAwB,CAC5B,SAAS,EAAE,MAAM,EACjB,OAAO,EAAE,MAAM,EACf,sBAAsB,EAAE,MAAM,EAC9B,0BAA0B,EAAE,gCAAgC,GAC3D,OAAO,CAAC,gCAAgC,CAAC;IAe5C;;;;;;;UAOM;IACA,sBAAsB,CAC1B,SAAS,EAAE,MAAM,EACjB,OAAO,EAAE,MAAM,EACf,sBAAsB,EAAE,MAAM,EAC9B,wBAAwB,EAAE,8BAA8B,GACvD,OAAO,CAAC,8BAA8B,CAAC;IAe1C;;;;;;;;;;;;OAYG;YACW,mBAAmB;YAkCnB,oBAAoB;IAiClC,OAAO,CAAC,MAAM,CAAC,cAAc;IA0B7B;;;;;;;OAOG;IACG,kCAAkC,IAAI,OAAO,CAAC,OAAO,CAAC;CAoB7D"}