@mondaydotcomorg/monday-authorization 3.5.3-feat-shaime-support-entity-attributes-in-authorization-sdk-ade64f6 → 3.7.0-feat-shaime-support-entity-attributes-4-49e1de0

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 (104) hide show
  1. package/dist/authorization-attributes-ms-service.d.ts +6 -8
  2. package/dist/authorization-attributes-ms-service.d.ts.map +1 -1
  3. package/dist/authorization-attributes-ms-service.js +16 -95
  4. package/dist/authorization-attributes-service.d.ts +1 -2
  5. package/dist/authorization-attributes-service.d.ts.map +1 -1
  6. package/dist/authorization-attributes-service.js +0 -1
  7. package/dist/authorization-attributes-sns-service.d.ts +4 -3
  8. package/dist/authorization-attributes-sns-service.d.ts.map +1 -1
  9. package/dist/authorization-middleware.d.ts +2 -2
  10. package/dist/authorization-middleware.d.ts.map +1 -1
  11. package/dist/authorization-service.d.ts +3 -3
  12. package/dist/authorization-service.d.ts.map +1 -1
  13. package/dist/base-attribute-assignment.d.ts +2 -0
  14. package/dist/base-attribute-assignment.d.ts.map +1 -1
  15. package/dist/base-attribute-assignment.js +11 -18
  16. package/dist/entity-attribute-assignment.d.ts +6 -0
  17. package/dist/entity-attribute-assignment.d.ts.map +1 -1
  18. package/dist/entity-attribute-assignment.js +9 -1
  19. package/dist/entity-attributes-constants.d.ts +6 -6
  20. package/dist/entity-attributes-constants.d.ts.map +1 -1
  21. package/dist/entity-attributes-constants.js +7 -5
  22. package/dist/errors/argument-error.d.ts.map +1 -1
  23. package/dist/errors/argument-error.js +0 -1
  24. package/dist/esm/authorization-attributes-ms-service.d.ts +6 -8
  25. package/dist/esm/authorization-attributes-ms-service.d.ts.map +1 -1
  26. package/dist/esm/authorization-attributes-ms-service.mjs +16 -95
  27. package/dist/esm/authorization-attributes-service.d.ts +1 -2
  28. package/dist/esm/authorization-attributes-service.d.ts.map +1 -1
  29. package/dist/esm/authorization-attributes-service.mjs +0 -1
  30. package/dist/esm/authorization-attributes-sns-service.d.ts +4 -3
  31. package/dist/esm/authorization-attributes-sns-service.d.ts.map +1 -1
  32. package/dist/esm/authorization-middleware.d.ts +2 -2
  33. package/dist/esm/authorization-middleware.d.ts.map +1 -1
  34. package/dist/esm/authorization-service.d.ts +3 -3
  35. package/dist/esm/authorization-service.d.ts.map +1 -1
  36. package/dist/esm/base-attribute-assignment.d.ts +2 -0
  37. package/dist/esm/base-attribute-assignment.d.ts.map +1 -1
  38. package/dist/esm/base-attribute-assignment.mjs +7 -18
  39. package/dist/esm/entity-attribute-assignment.d.ts +6 -0
  40. package/dist/esm/entity-attribute-assignment.d.ts.map +1 -1
  41. package/dist/esm/entity-attribute-assignment.mjs +9 -1
  42. package/dist/esm/entity-attributes-constants.d.ts +6 -6
  43. package/dist/esm/entity-attributes-constants.d.ts.map +1 -1
  44. package/dist/esm/entity-attributes-constants.mjs +8 -6
  45. package/dist/esm/errors/argument-error.d.ts.map +1 -1
  46. package/dist/esm/errors/argument-error.mjs +0 -1
  47. package/dist/esm/index.d.ts +0 -9
  48. package/dist/esm/index.d.ts.map +1 -1
  49. package/dist/esm/index.mjs +0 -7
  50. package/dist/esm/prometheus-service.d.ts +2 -1
  51. package/dist/esm/prometheus-service.d.ts.map +1 -1
  52. package/dist/esm/resource-attribute-assignment.d.ts +7 -1
  53. package/dist/esm/resource-attribute-assignment.d.ts.map +1 -1
  54. package/dist/esm/resource-attribute-assignment.mjs +8 -0
  55. package/dist/esm/resource-attributes-constants.d.ts +12 -2
  56. package/dist/esm/resource-attributes-constants.d.ts.map +1 -1
  57. package/dist/esm/resource-attributes-constants.mjs +15 -12
  58. package/dist/esm/types/authorization-attributes-contracts.d.ts +1 -1
  59. package/dist/esm/types/authorization-attributes-contracts.d.ts.map +1 -1
  60. package/dist/esm/types/authorization-attributes-service.interface.d.ts +4 -3
  61. package/dist/esm/types/authorization-attributes-service.interface.d.ts.map +1 -1
  62. package/dist/esm/types/general.d.ts +2 -1
  63. package/dist/esm/types/general.d.ts.map +1 -1
  64. package/dist/esm/utils/validation.d.ts +30 -30
  65. package/dist/esm/utils/validation.d.ts.map +1 -1
  66. package/dist/esm/utils/validation.mjs +121 -86
  67. package/dist/index.d.ts +0 -9
  68. package/dist/index.d.ts.map +1 -1
  69. package/dist/index.js +0 -15
  70. package/dist/prometheus-service.d.ts +2 -1
  71. package/dist/prometheus-service.d.ts.map +1 -1
  72. package/dist/resource-attribute-assignment.d.ts +7 -1
  73. package/dist/resource-attribute-assignment.d.ts.map +1 -1
  74. package/dist/resource-attribute-assignment.js +8 -0
  75. package/dist/resource-attributes-constants.d.ts +12 -2
  76. package/dist/resource-attributes-constants.d.ts.map +1 -1
  77. package/dist/resource-attributes-constants.js +14 -11
  78. package/dist/types/authorization-attributes-contracts.d.ts +1 -1
  79. package/dist/types/authorization-attributes-contracts.d.ts.map +1 -1
  80. package/dist/types/authorization-attributes-service.interface.d.ts +4 -3
  81. package/dist/types/authorization-attributes-service.interface.d.ts.map +1 -1
  82. package/dist/types/general.d.ts +2 -1
  83. package/dist/types/general.d.ts.map +1 -1
  84. package/dist/utils/validation.d.ts +30 -30
  85. package/dist/utils/validation.d.ts.map +1 -1
  86. package/dist/utils/validation.js +125 -86
  87. package/package.json +4 -3
  88. package/src/authorization-attributes-ms-service.ts +23 -117
  89. package/src/authorization-attributes-service.ts +1 -2
  90. package/src/authorization-attributes-sns-service.ts +3 -3
  91. package/src/authorization-middleware.ts +2 -2
  92. package/src/authorization-service.ts +4 -4
  93. package/src/base-attribute-assignment.ts +14 -23
  94. package/src/entity-attribute-assignment.ts +10 -1
  95. package/src/entity-attributes-constants.ts +6 -6
  96. package/src/errors/argument-error.ts +0 -1
  97. package/src/index.ts +0 -9
  98. package/src/prometheus-service.ts +3 -1
  99. package/src/resource-attribute-assignment.ts +10 -1
  100. package/src/resource-attributes-constants.ts +13 -21
  101. package/src/types/authorization-attributes-contracts.ts +0 -2
  102. package/src/types/authorization-attributes-service.interface.ts +3 -3
  103. package/src/types/general.ts +2 -3
  104. package/src/utils/validation.ts +139 -82
@@ -1,7 +1,8 @@
1
- import { ResourceAttributeAssignment as ResourceAttributeAssignmentContract, EntityAttributeAssignment as EntityAttributeAssignmentContract, EntityType, ResourceAttributeOperation, EntityAttributeOperation } from './authorization-attributes-contracts';
1
+ import { ResourceAttributeAssignment as ResourceAttributeAssignmentContract, EntityAttributeAssignment as EntityAttributeAssignmentContract, ResourceAttributeOperation, EntityAttributeOperation } from './authorization-attributes-contracts';
2
2
  import { ResourceAttributeAssignment } from '../resource-attribute-assignment';
3
3
  import { EntityAttributeAssignment } from '../entity-attribute-assignment';
4
4
  import { Resource } from './general';
5
+ import { EntityType } from '../entity-attributes-constants';
5
6
  /**
6
7
  * Resource type compatible with both MS and SNS services
7
8
  */
@@ -15,8 +16,8 @@ export interface CompatibleResource {
15
16
  * Interface for authorization attributes operations.
16
17
  * Both MS (direct) and SNS (async) services implement this interface.
17
18
  */
18
- export interface IAuthorizationAttributesService {
19
- /**
19
+ export interface AuthorizationAttributesService {
20
+ /**authorization-attributes-service.ts
20
21
  * Upserts resource attributes.
21
22
  * For MS service: returns Promise<void>
22
23
  * For SNS service: requires appName and callerActionIdentifier, returns Promise<ResourceAttributesOperation[]>
@@ -1 +1 @@
1
- {"version":3,"file":"authorization-attributes-service.interface.d.ts","sourceRoot":"","sources":["../../../src/types/authorization-attributes-service.interface.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,2BAA2B,IAAI,mCAAmC,EAClE,yBAAyB,IAAI,iCAAiC,EAC9D,UAAU,EACV,0BAA0B,EAC1B,wBAAwB,EACzB,MAAM,sCAAsC,CAAC;AAC9C,OAAO,EAAE,2BAA2B,EAAE,MAAM,kCAAkC,CAAC;AAC/E,OAAO,EAAE,yBAAyB,EAAE,MAAM,gCAAgC,CAAC;AAC3E,OAAO,EAAE,QAAQ,EAAE,MAAM,WAAW,CAAC;AAErC;;GAEG;AACH,MAAM,WAAW,kBAAkB;IACjC,YAAY,CAAC,EAAE,MAAM,CA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AC9B,2BAA2B,EAAE,0BAA0B,EAAE,GACxD,OAAO,CAAC,0BAA0B,EAAE,CAAC,CAAC;IAEzC;;;;OAIG;IACH,sBAAsB,CACpB,SAAS,EAAE,MAAM,EACjB,OAAO,EAAE,MAAM,EACf,sBAAsB,EAAE,MAAM,EAC9B,yBAAyB,EAAE,wBAAwB,EAAE,GACpD,OAAO,CAAC,wBAAwB,EAAE,CAAC,CAAC;CACxC"}
1
+ {"version":3,"file":"authorization-attributes-service.interface.d.ts","sourceRoot":"","sources":["../../../src/types/authorization-attributes-service.interface.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,2BAA2B,IAAI,mCAAmC,EAClE,yBAAyB,IAAI,iCAAiC,EAC9D,0BAA0B,EAC1B,wBAAwB,EACzB,MAAM,sCAAsC,CAAC;AAC9C,OAAO,EAAE,2BAA2B,EAAE,MAAM,kCAAkC,CAAC;AAC/E,OAAO,EAAE,yBAAyB,EAAE,MAAM,gCAAgC,CAAC;AAC3E,OAAO,EAAE,QAAQ,EAAE,MAAM,WAAW,CAAC;AACrC,OAAO,EAAE,UAAU,EAAE,MAAM,gCAAgC,CAAC;AAE5D;;GAEG;AACH,MAAM,WAAW,kBAAkB;IACjC,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,EAAE,CAAC,EAAE,MAAM,CAAC;CACb;AAED;;;GAGG;AACH,MAAM,WAAW,8BAA8B;IAC7C;;;;OAIG;IACH,wBAAwB,CACtB,SAAS,EAAE,MAAM,EACjB,4BAA4B,EAAE,2BAA2B,EAAE,GAAG,mCAAmC,EAAE,EACnG,OAAO,CAAC,EAAE,MAAM,EAChB,sBAAsB,CAAC,EAAE,MAAM,GAC9B,OAAO,CAAC,IAAI,GAAG,0BAA0B,EAAE,CAAC,CAAC;IAEhD;;;;OAIG;IACH,wBAAwB,CACtB,SAAS,EAAE,MAAM,EACjB,QAAQ,EAAE,kBAAkB,GAAG,QAAQ,EACvC,aAAa,EAAE,MAAM,EAAE,EACvB,OAAO,CAAC,EAAE,MAAM,EAChB,sBAAsB,CAAC,EAAE,MAAM,GAC9B,OAAO,CAAC,IAAI,GAAG,0BAA0B,EAAE,CAAC,CAAC;IAEhD;;;;OAIG;IACH,sBAAsB,CACpB,SAAS,EAAE,MAAM,EACjB,0BAA0B,EAAE,yBAAyB,EAAE,GAAG,iCAAiC,EAAE,EAC7F,OAAO,CAAC,EAAE,MAAM,EAChB,sBAAsB,CAAC,EAAE,MAAM,GAC9B,OAAO,CAAC,IAAI,GAAG,wBAAwB,EAAE,CAAC,CAAC;IAE9C;;;;OAIG;IACH,sBAAsB,CACpB,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,IAAI,GAAG,wBAAwB,EAAE,CAAC,CAAC;IAE9C;;;;OAIG;IACH,wBAAwB,CACtB,SAAS,EAAE,MAAM,EACjB,OAAO,EAAE,MAAM,EACf,sBAAsB,EAAE,MAAM,EAC9B,2BAA2B,EAAE,0BAA0B,EAAE,GACxD,OAAO,CAAC,0BAA0B,EAAE,CAAC,CAAC;IAEzC;;;;OAIG;IACH,sBAAsB,CACpB,SAAS,EAAE,MAAM,EACjB,OAAO,EAAE,MAAM,EACf,sBAAsB,EAAE,MAAM,EAC9B,yBAAyB,EAAE,wBAAwB,EAAE,GACpD,OAAO,CAAC,wBAAwB,EAAE,CAAC,CAAC;CACxC"}
@@ -4,6 +4,7 @@ export interface Resource {
4
4
  type: string;
5
5
  wrapperData?: object;
6
6
  }
7
+ export type Action = string;
7
8
  export interface Context {
8
9
  accountId: number;
9
10
  userId: number;
@@ -12,7 +13,7 @@ export interface AuthorizationObject {
12
13
  resource_id?: Resource['id'];
13
14
  resource_type: Resource['type'];
14
15
  wrapper_data?: Resource['wrapperData'];
15
- action: string;
16
+ action: Action;
16
17
  }
17
18
  export interface AuthorizationParams {
18
19
  authorizationObjects: AuthorizationObject[];
@@ -1 +1 @@
1
- {"version":3,"file":"general.d.ts","sourceRoot":"","sources":["../../../src/types/general.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,QAAQ,EAAE,MAAM,SAAS,CAAC;AAEjD,MAAM,WAAW,QAAQ;IACvB,EAAE,CAAC,EAAE,MAAM,CAAC;IACZ,IAAI,EAAE,MAAM,CAAC;IACb,WAAW,CAAC,EAAE,MAAM,CAAC;CACtB;AAED,MAAM,WAAW,OAAO;IACtB,SAAS,EAAE,MAAM,CAAC;IAClB,MAAM,EAAE,MAAM,CAAC;CAChB;AAED,MAAM,WAAW,mBAAmB;IAClC,WAAW,CAAC,EAAE,QAAQ,CAAC,IAAI,CAAC,CAAC;IAC7B,aAAa,EAAE,QAAQ,CAAC,MAAM,CAAC,CAAC;IAChC,YAAY,CAAC,EAAE,QAAQ,CAAC,aAAa,CAAC,CAAC;IACvC,MAAM,EAAE,MAAM,CAAC;CAChB;AACD,MAAM,WAAW,mBAAmB;IAClC,oBAAoB,EAAE,mBAAmB,EAAE,CAAC;CAC7C;AAED,KAAK,WAAW,GAAG;IAAE,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAA;CAAE,CAAC;AAE9C,MAAM,MAAM,cAAc,GAAG,WAAW,CAAC;AACzC,MAAM,MAAM,gBAAgB,GAAG,WAAW,CAAC;AAC3C,MAAM,MAAM,kBAAkB,GAAG,WAAW,CAAC;AAC7C,MAAM,MAAM,mBAAmB,GAAG,WAAW,CAAC;AAC9C,MAAM,MAAM,WAAW,GAAG,OAAO,CAAC,cAAc,EAAE,gBAAgB,EAAE,kBAAkB,EAAE,mBAAmB,CAAC,CAAC;AAC7G,MAAM,MAAM,YAAY,GAAG,QAAQ,CAAC,gBAAgB,CAAC,CAAC;A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MAAM,YAAY,GAAG,QAAQ,CAAC,gBAAgB,CAAC,CAAC;AACtD,MAAM,MAAM,cAAc,GAAG,CAAC,OAAO,EAAE,WAAW,KAAK,QAAQ,EAAE,CAAC;AAClE,MAAM,MAAM,aAAa,GAAG,CAAC,OAAO,EAAE,WAAW,KAAK,OAAO,CAAC"}
@@ -1,45 +1,45 @@
1
+ import { Resource } from '../types/general';
1
2
  /**
2
- * Utility class for common validation operations using Zod
3
+ * Utility class for common validation operations using AJV
3
4
  */
4
5
  export declare class ValidationUtils {
6
+ private static ajv;
5
7
  /**
6
- * Validates that a value is an integer
7
- * @param value The value to validate
8
- * @param fieldName The name of the field for error messages
9
- * @throws ArgumentError if value is not an integer
8
+ * Validates that a value is an integer. Throws ArgumentError with a descriptive message on failure.
10
9
  */
11
- static validateInteger(value: any, fieldName: string): void;
10
+ static validateInteger(value: number): void;
12
11
  /**
13
- * Validates that a value is a non-empty string
14
- * @param value The value to validate
15
- * @param fieldName The name of the field for error messages
16
- * @throws ArgumentError if value is not a string or is empty
12
+ * Validates that a value is a non-empty string. Throws ArgumentError on failure.
17
13
  */
18
- static validateString(value: any, fieldName: string): void;
14
+ static validateString(value: string): void;
19
15
  /**
20
- * Validates that a value is an array and optionally checks minimum length
21
- * @param value The value to validate
22
- * @param fieldName The name of the field for error messages
23
- * @param minLength Minimum required length (default: 0)
24
- * @returns The validated array
25
- * @throws ArgumentError if value is not an array or doesn't meet minimum length
16
+ * Validates that a value is an array of non-empty strings. Throws ArgumentError on failure.
17
+ * Allows empty arrays - caller should handle early return.
26
18
  */
27
- static validateArray<T>(value: any, fieldName: string, minLength?: number): T[];
19
+ static validateStringArray(value: string[]): void;
28
20
  /**
29
- * Validates that a value is one of the allowed enum values
30
- * @param value The value to validate
31
- * @param validValues Array of valid values
32
- * @param fieldName The name of the field for error messages
33
- * @returns The validated value as the enum type
34
- * @throws ArgumentError if value is not in validValues
21
+ * Validates an attribute assignment object using a single AJV schema.
22
+ * Preserves legacy error messages for each field.
35
23
  */
36
- static validateEnum<T extends string>(value: string, validValues: readonly T[], fieldName: string): T;
24
+ static validateAssignment<TType extends string>(data: {
25
+ id: any;
26
+ type: string;
27
+ attributeKey: any;
28
+ attributeValue: any;
29
+ }, validTypes: readonly TType[], fieldNames: {
30
+ id: string;
31
+ type: string;
32
+ }): {
33
+ id: number;
34
+ type: TType;
35
+ attributeKey: string;
36
+ attributeValue: string;
37
+ };
37
38
  /**
38
- * Validates that all items in an array are strings
39
- * @param value Array to validate
40
- * @param fieldName The name of the field for error messages
41
- * @throws ArgumentError if any item is not a string
39
+ * Validates a Resource-like object shape: { id: number; type: string }.
40
+ * Throws ArgumentError with legacy-compatible messages.
42
41
  */
43
- static validateStringArray(value: any[], fieldName: string): void;
42
+ static validateResource(resource: Resource): void;
43
+ static validateArrayTypeOf<T>(attributesMessages: T[], messageClass: abstract new (...args: any[]) => T): void;
44
44
  }
45
45
  //# sourceMappingURL=validation.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"validation.d.ts","sourceRoot":"","sources":["../../../src/utils/validation.ts"],"names":[],"mappings":"AAGA;;GAEG;AACH,qBAAa,eAAe;IAC1B;;;;;OAKG;IACH,MAAM,CAAC,eAAe,CAAC,KAAK,EAAE,GAAG,EAAE,SAAS,EAAE,MAAM,GAAG,IAAI;IAY3D;;;;;OAKG;IACH,MAAM,CAAC,cAAc,CAAC,KAAK,EAAE,GAAG,EAAE,SAAS,EAAE,MAAM,GAAG,IAAI;IAe1D;;;;;;;OAOG;IACH,MAAM,CAAC,aAAa,CAAC,CAAC,EAAE,KAAK,EAAE,GAAG,EAAE,SAAS,EAAE,MAAM,EAAE,SAAS,SAAI,GAAG,CAAC,EAAE;IAe1E;;;;;;;OAOG;IACH,MAAM,CAAC,YAAY,CAAC,CAAC,SAAS,MAAM,EAAE,KAAK,EAAE,MAAM,EAAE,WAAW,EAAE,SAAS,CAAC,EAAE,EAAE,SAAS,EAAE,MAAM,GAAG,CAAC;IAYrG;;;;;OAKG;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IAAI;CAoB/G"}
@@ -1,115 +1,150 @@
1
- import { z } from 'zod';
1
+ import Ajv from 'ajv';
2
2
  import { ArgumentError } from '../errors/argument-error.mjs';
3
3
 
4
4
  /**
5
- * Utility class for common validation operations using Zod
5
+ * Utility class for common validation operations using AJV
6
6
  */
7
7
  class ValidationUtils {
8
+ static ajv = new Ajv({ allErrors: true });
8
9
  /**
9
- * Validates that a value is an integer
10
- * @param value The value to validate
11
- * @param fieldName The name of the field for error messages
12
- * @throws ArgumentError if value is not an integer
10
+ * Validates that a value is an integer. Throws ArgumentError with a descriptive message on failure.
13
11
  */
14
- static validateInteger(value, fieldName) {
15
- const schema = z.number().int();
16
- try {
17
- schema.parse(value);
18
- }
19
- catch (error) {
20
- if (error instanceof z.ZodError) {
21
- throw new ArgumentError(`${fieldName} must be an integer, got: ${value}`);
22
- }
23
- throw error;
12
+ static validateInteger(value) {
13
+ const numberSchema = { type: 'number', multipleOf: 1 };
14
+ const validate = ValidationUtils.ajv.compile(numberSchema);
15
+ const isValid = validate(value);
16
+ if (!isValid) {
17
+ throw new ArgumentError(`Value must be an integer, got: ${value}`);
24
18
  }
25
19
  }
26
20
  /**
27
- * Validates that a value is a non-empty string
28
- * @param value The value to validate
29
- * @param fieldName The name of the field for error messages
30
- * @throws ArgumentError if value is not a string or is empty
21
+ * Validates that a value is a non-empty string. Throws ArgumentError on failure.
31
22
  */
32
- static validateString(value, fieldName) {
33
- const schema = z.string().min(1);
34
- try {
35
- schema.parse(value);
36
- }
37
- catch (error) {
38
- if (error instanceof z.ZodError) {
39
- if (typeof value !== 'string') {
40
- throw new ArgumentError(`${fieldName} must be a string, got: ${typeof value}`);
41
- }
42
- throw new ArgumentError(`${fieldName} must be a non-empty string`);
43
- }
44
- throw error;
23
+ static validateString(value) {
24
+ const non_empty_string_schema = {
25
+ type: 'string',
26
+ minLength: 1,
27
+ pattern: '\\S',
28
+ };
29
+ const validate = ValidationUtils.ajv.compile(non_empty_string_schema);
30
+ const isValid = validate(value);
31
+ if (!isValid) {
32
+ throw new ArgumentError(`Value must be a non-empty string, got: ${value}`);
45
33
  }
46
34
  }
47
35
  /**
48
- * Validates that a value is an array and optionally checks minimum length
49
- * @param value The value to validate
50
- * @param fieldName The name of the field for error messages
51
- * @param minLength Minimum required length (default: 0)
52
- * @returns The validated array
53
- * @throws ArgumentError if value is not an array or doesn't meet minimum length
36
+ * Validates that a value is an array of non-empty strings. Throws ArgumentError on failure.
37
+ * Allows empty arrays - caller should handle early return.
54
38
  */
55
- static validateArray(value, fieldName, minLength = 0) {
56
- const schema = z.array(z.any()).min(minLength);
57
- try {
58
- return schema.parse(value);
59
- }
60
- catch (error) {
61
- if (error instanceof z.ZodError) {
62
- if (!Array.isArray(value)) {
63
- throw new ArgumentError(`${fieldName} must be an array`);
64
- }
65
- throw new ArgumentError(`${fieldName} must have at least ${minLength} items`);
66
- }
67
- throw error;
39
+ static validateStringArray(value) {
40
+ const string_array_schema = {
41
+ type: 'array',
42
+ items: {
43
+ type: 'string',
44
+ minLength: 1,
45
+ pattern: '\\S',
46
+ },
47
+ };
48
+ const validateStringArray = ValidationUtils.ajv.compile(string_array_schema);
49
+ const isValid = validateStringArray(value);
50
+ if (!isValid) {
51
+ throw new ArgumentError(`Value must be an array of non-empty strings, got: ${value}`);
68
52
  }
53
+ // Allow empty arrays to pass validation - caller should handle early return
54
+ // Non-empty arrays will be validated for string content above
69
55
  }
70
56
  /**
71
- * Validates that a value is one of the allowed enum values
72
- * @param value The value to validate
73
- * @param validValues Array of valid values
74
- * @param fieldName The name of the field for error messages
75
- * @returns The validated value as the enum type
76
- * @throws ArgumentError if value is not in validValues
57
+ * Validates an attribute assignment object using a single AJV schema.
58
+ * Preserves legacy error messages for each field.
77
59
  */
78
- static validateEnum(value, validValues, fieldName) {
79
- const schema = z.enum(validValues);
80
- try {
81
- return schema.parse(value);
82
- }
83
- catch (error) {
84
- if (error instanceof z.ZodError) {
85
- throw new ArgumentError(`${fieldName} must be one of [${validValues.join(', ')}], got: ${value}`);
60
+ static validateAssignment(data, validTypes, fieldNames) {
61
+ const schema = {
62
+ type: 'object',
63
+ properties: {
64
+ id: { type: 'number', multipleOf: 1 },
65
+ type: { type: 'string', enum: validTypes },
66
+ attributeKey: { type: 'string', minLength: 1 },
67
+ attributeValue: { type: 'string', minLength: 1 },
68
+ },
69
+ required: ['id', 'type', 'attributeKey', 'attributeValue'],
70
+ additionalProperties: false,
71
+ };
72
+ const validate = this.ajv.compile(schema);
73
+ const valid = validate(data);
74
+ if (!valid) {
75
+ // Map to legacy error messages deterministically
76
+ const { id, type, attributeKey, attributeValue } = data;
77
+ // id must be integer
78
+ const isInteger = typeof id === 'number' && Number.isFinite(id) && Math.floor(id) === id;
79
+ if (!isInteger) {
80
+ throw new ArgumentError(`${fieldNames.id} must be an integer, got: ${id}`);
81
+ }
82
+ // type must be within enum
83
+ if (typeof type !== 'string' || !validTypes.includes(type)) {
84
+ throw new ArgumentError(`${fieldNames.type} must be one of [${validTypes.join(', ')}], got: ${type}`);
86
85
  }
87
- throw error;
86
+ // attributeKey
87
+ if (typeof attributeKey !== 'string') {
88
+ throw new ArgumentError(`attributeKey must be a string, got: ${typeof attributeKey}`);
89
+ }
90
+ if (!attributeKey) {
91
+ throw new ArgumentError('attributeKey must be a non-empty string');
92
+ }
93
+ // attributeValue
94
+ if (typeof attributeValue !== 'string') {
95
+ throw new ArgumentError(`attributeValue must be a string, got: ${typeof attributeValue}`);
96
+ }
97
+ if (!attributeValue) {
98
+ throw new ArgumentError('attributeValue must be a non-empty string');
99
+ }
100
+ // Fallback
101
+ throw new ArgumentError('Invalid attribute assignment');
88
102
  }
103
+ return {
104
+ id: data.id,
105
+ type: data.type,
106
+ attributeKey: data.attributeKey,
107
+ attributeValue: data.attributeValue,
108
+ };
89
109
  }
90
110
  /**
91
- * Validates that all items in an array are strings
92
- * @param value Array to validate
93
- * @param fieldName The name of the field for error messages
94
- * @throws ArgumentError if any item is not a string
111
+ * Validates a Resource-like object shape: { id: number; type: string }.
112
+ * Throws ArgumentError with legacy-compatible messages.
95
113
  */
96
- static validateStringArray(value, fieldName) {
97
- const schema = z.array(z.string());
98
- try {
99
- schema.parse(value);
114
+ static validateResource(resource) {
115
+ if (!resource || typeof resource !== 'object') {
116
+ throw new ArgumentError('resource must be an object');
117
+ }
118
+ const schema = {
119
+ type: 'object',
120
+ properties: {
121
+ id: { type: 'number', multipleOf: 1 },
122
+ type: { type: 'string', minLength: 1 },
123
+ wrapperData: { type: 'string' },
124
+ },
125
+ required: ['type', 'id'],
126
+ additionalProperties: false,
127
+ };
128
+ const validate = this.ajv.compile(schema);
129
+ const isValid = validate(resource);
130
+ if (!isValid) {
131
+ throw new ArgumentError('Invalid resource');
132
+ }
133
+ }
134
+ static validateArrayTypeOf(attributesMessages, messageClass) {
135
+ const arraySchema = {
136
+ type: 'array',
137
+ };
138
+ const validateArray = ValidationUtils.ajv.compile(arraySchema);
139
+ const isArrayValid = validateArray(attributesMessages);
140
+ if (!isArrayValid) {
141
+ throw new ArgumentError(`attributesMessages must be an array`);
100
142
  }
101
- catch (error) {
102
- if (error instanceof z.ZodError) {
103
- const zodError = error;
104
- const firstError = zodError.issues[0];
105
- // Check if it's an array item validation error
106
- if (firstError.path.length > 0 && typeof firstError.path[0] === 'number') {
107
- const index = firstError.path[0];
108
- throw new ArgumentError(`All ${fieldName} must be strings, but item at index ${index} is not`);
109
- }
110
- throw new ArgumentError(`${fieldName} must be an array`);
143
+ for (let i = 0; i < attributesMessages.length; i++) {
144
+ const item = attributesMessages[i];
145
+ if (!(item instanceof messageClass)) {
146
+ throw new ArgumentError(`attributesMessages[${i}] must be an instance of ${messageClass.name}, got: ${item?.constructor?.name || typeof item}`);
111
147
  }
112
- throw error;
113
148
  }
114
149
  }
115
150
  }
package/dist/index.d.ts CHANGED
@@ -19,15 +19,6 @@ 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 { AuthorizationAttributesSnsService } from './authorization-attributes-sns-service';
23
- export { AuthorizationAttributesMsService } from './authorization-attributes-ms-service';
24
- export { IAuthorizationAttributesService } from './types/authorization-attributes-service.interface';
25
- export { ResourceAttributeAssignment } from './resource-attribute-assignment';
26
- export { RESOURCE_TYPES, RESOURCE_ATTRIBUTES_CONSTANTS } from './resource-attributes-constants';
27
- export { EntityAttributeAssignment } from './entity-attribute-assignment';
28
- export { ENTITY_TYPES } from './entity-attributes-constants';
29
- export { ArgumentError } from './errors/argument-error';
30
- export type { EntityType } from './entity-attributes-constants';
31
22
  export { RolesService } from './roles-service';
32
23
  export { MembershipsService } from './memberships';
33
24
  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,EAAE,MAAM,CAAC;IACd,QAAQ,CAAC,EAAE,OAAO,CAAC;CACpB;AAED,MAAM,WAAW,WAAW;IAC1B,UAAU,CAAC,EAAE,GAAG,CAAC;IACjB,kBAAkB,CAAC,EAAE,kBAAkB,CAAC;IACxC,WAAW,CAAC,EAAE,GAAG,CAAC;IAClB,sCAAsC,CAAC,EAAE,MAAM,CAAC;IAChD,OAAO,CAAC,EAAE,kBAAkB,CAAC;CAC9B;AAED,wBAAsB,IAAI,CAAC,OAAO,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e,CAAC;AAErH,OAAO,EAAE,OAAO,EAAE,CAAC"}
package/dist/index.js CHANGED
@@ -6,13 +6,6 @@ const metricsService = require('./metrics-service.js');
6
6
  const testKit_index = require('./testKit/index.js');
7
7
  const authorizationMiddleware = require('./authorization-middleware.js');
8
8
  const authorizationAttributesService = require('./authorization-attributes-service.js');
9
- const authorizationAttributesSnsService = require('./authorization-attributes-sns-service.js');
10
- const authorizationAttributesMsService = require('./authorization-attributes-ms-service.js');
11
- const resourceAttributeAssignment = require('./resource-attribute-assignment.js');
12
- const resourceAttributesConstants = require('./resource-attributes-constants.js');
13
- const entityAttributeAssignment = require('./entity-attribute-assignment.js');
14
- const entityAttributesConstants = require('./entity-attributes-constants.js');
15
- const errors_argumentError = require('./errors/argument-error.js');
16
9
  const rolesService = require('./roles-service.js');
17
10
  const memberships = require('./memberships.js');
18
11
  const types_roles = require('./types/roles.js');
@@ -51,14 +44,6 @@ exports.authorizationCheckMiddleware = authorizationMiddleware.authorizationChec
51
44
  exports.getAuthorizationMiddleware = authorizationMiddleware.getAuthorizationMiddleware;
52
45
  exports.skipAuthorizationMiddleware = authorizationMiddleware.skipAuthorizationMiddleware;
53
46
  exports.AuthorizationAttributesService = authorizationAttributesService.AuthorizationAttributesService;
54
- exports.AuthorizationAttributesSnsService = authorizationAttributesSnsService.AuthorizationAttributesSnsService;
55
- exports.AuthorizationAttributesMsService = authorizationAttributesMsService.AuthorizationAttributesMsService;
56
- exports.ResourceAttributeAssignment = resourceAttributeAssignment.ResourceAttributeAssignment;
57
- exports.RESOURCE_ATTRIBUTES_CONSTANTS = resourceAttributesConstants.RESOURCE_ATTRIBUTES_CONSTANTS;
58
- exports.RESOURCE_TYPES = resourceAttributesConstants.RESOURCE_TYPES;
59
- exports.EntityAttributeAssignment = entityAttributeAssignment.EntityAttributeAssignment;
60
- exports.ENTITY_TYPES = entityAttributesConstants.ENTITY_TYPES;
61
- exports.ArgumentError = errors_argumentError.ArgumentError;
62
47
  exports.RolesService = rolesService.RolesService;
63
48
  exports.MembershipsService = memberships.MembershipsService;
64
49
  Object.defineProperty(exports, 'RoleType', {
@@ -1,3 +1,4 @@
1
+ import { Action } from './types/general';
1
2
  export declare const METRICS: {
2
3
  AUTHORIZATION_CHECK: string;
3
4
  AUTHORIZATION_CHECKS_PER_REQUEST: string;
@@ -5,5 +6,5 @@ export declare const METRICS: {
5
6
  };
6
7
  export declare function setPrometheus(customPrometheus: any): void;
7
8
  export declare function getMetricsManager(): any;
8
- export declare function sendAuthorizationCheckResponseTimeMetric(resourceType: string, action: string, isAuthorized: boolean, responseStatus: number, time: number): void;
9
+ export declare function sendAuthorizationCheckResponseTimeMetric(resourceType: string, action: Action, isAuthorized: boolean, responseStatus: number, time: number): void;
9
10
  //# sourceMappingURL=prometheus-service.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"prometheus-service.d.ts","sourceRoot":"","sources":["../src/prometheus-service.ts"],"names":[],"mappings":"AAGA,eAAO,MAAM,OAAO;;;;CAInB,CAAC;AAQF,wBAAgB,aAAa,CAAC,gBAAgB,KAAA,QAa7C;AAED,wBAAgB,iBAAiB,QAEhC;AAED,wBAAgB,wCAAwC,CACtD,YAAY,EAAE,MAAM,EACpB,MAAM,EAAE,MAAM,EACd,YAAY,EAAE,OAAO,EACrB,cAAc,EAAE,MAAM,EACtB,IAAI,EAAE,MAAM,QASb"}
1
+ {"version":3,"file":"prometheus-service.d.ts","sourceRoot":"","sources":["../src/prometheus-service.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,iBAAiB,CAAC;AAKzC,eAAO,MAAM,OAAO;;;;CAInB,CAAC;AAQF,wBAAgB,aAAa,CAAC,gBAAgB,KAAA,QAa7C;AAED,wBAAgB,iBAAiB,QAEhC;AAED,wBAAgB,wCAAwC,CACtD,YAAY,EAAE,MAAM,EACpB,MAAM,EAAE,MAAM,EACd,YAAY,EAAE,OAAO,EACrB,cAAc,EAAE,MAAM,EACtB,IAAI,EAAE,MAAM,QASb"}
@@ -3,7 +3,13 @@ import { BaseAttributeAssignment } from './base-attribute-assignment';
3
3
  export declare class ResourceAttributeAssignment extends BaseAttributeAssignment<number, ResourceType> {
4
4
  readonly resourceId: number;
5
5
  readonly resourceType: ResourceType;
6
- constructor(resourceId: number, resourceType: string, attributeKey: string, attributeValue: string);
6
+ constructor(resourceId: number, resourceType: ResourceType, attributeKey: string, attributeValue: string);
7
+ toDataTransferObject(): {
8
+ resourceId: number;
9
+ resourceType: ResourceType;
10
+ key: string;
11
+ value: string;
12
+ };
7
13
  /**
8
14
  * Compares two assignments for equality
9
15
  * @param other Another ResourceAttributeAssignment instance
@@ -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;AAC/E,OAAO,EAAE,uBAAuB,EAAE,MAAM,6BAA6B,CAAC;AAEtE,qBAAa,2BAA4B,SAAQ,uBAAuB,CAAC,MAAM,EAAE,YAAY,CAAC;IAC5F,SAAgB,UAAU,EAAE,MAAM,CAAC;IACnC,SAAgB,YAAY,EAAE,YAAY,CAAC;gBAE/B,UAAU,EAAE,MAAM,EAAE,YAAY,EAAE,MAAM,EAAE,YAAY,EAAE,MAAM,EAAE,cAAc,EAAE,MAAM;IAalG;;;;OAIG;IACH,MAAM,CAAC,KAAK,EAAE,2BAA2B,GAAG,OAAO;CAGpD"}
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;AAC/E,OAAO,EAAE,uBAAuB,EAAE,MAAM,6BAA6B,CAAC;AAEtE,qBAAa,2BAA4B,SAAQ,uBAAuB,CAAC,MAAM,EAAE,YAAY,CAAC;IAC5F,SAAgB,UAAU,EAAE,MAAM,CAAC;IACnC,SAAgB,YAAY,EAAE,YAAY,CAAC;gBAE/B,UAAU,EAAE,MAAM,EAAE,YAAY,EAAE,YAAY,EAAE,YAAY,EAAE,MAAM,EAAE,cAAc,EAAE,MAAM;IAcxG,oBAAoB;;;;;;IAQpB;;;;OAIG;IACH,MAAM,CAAC,KAAK,EAAE,2BAA2B,GAAG,OAAO;CAGpD"}
@@ -11,6 +11,14 @@ class ResourceAttributeAssignment extends baseAttributeAssignment.BaseAttributeA
11
11
  this.resourceId = resourceId;
12
12
  this.resourceType = this.type;
13
13
  }
14
+ toDataTransferObject() {
15
+ return {
16
+ resourceId: this.resourceId,
17
+ resourceType: this.resourceType,
18
+ key: this.attributeKey,
19
+ value: this.attributeValue,
20
+ };
21
+ }
14
22
  /**
15
23
  * Compares two assignments for equality
16
24
  * @param other Another ResourceAttributeAssignment instance
@@ -10,6 +10,16 @@ export declare const RESOURCE_ATTRIBUTES_CONSTANTS: {
10
10
  readonly SYSTEM_ENTITY_TYPE: "system_entity_type";
11
11
  };
12
12
  };
13
- export type ResourceType = 'account' | 'account_product' | 'workspace' | 'board' | 'item' | 'team' | 'overview' | 'document' | 'crm';
14
- export declare const RESOURCE_TYPES: Record<string, ResourceType>;
13
+ export declare enum ResourceType {
14
+ Account = "account",
15
+ AccountProduct = "account_product",
16
+ Workspace = "workspace",
17
+ Board = "board",
18
+ Item = "item",
19
+ Team = "team",
20
+ Overview = "overview",
21
+ Document = "document",
22
+ Crm = "crm"
23
+ }
24
+ export declare const RESOURCE_TYPES: readonly ResourceType[];
15
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,6BAA6B;;;;;;;;;;;CAWhC,CAAC;AAEX,MAAM,MAAM,YAAY,GACpB,SAAS,GACT,iBAAiB,GACjB,WAAW,GACX,OAAO,GACP,MAAM,GACN,MAAM,GACN,UAAU,GACV,UAAU,GACV,KAAK,CAAC;AAEV,eAAO,MAAM,cAAc,EAUtB,MAAM,CAAC,MAAM,EAAE,YAAY,CAAC,CAAC"}
1
+ {"version":3,"file":"resource-attributes-constants.d.ts","sourceRoot":"","sources":["../src/resource-attributes-constants.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,6BAA6B;;;;;;;;;;;CAWhC,CAAC;AAEX,oBAAY,YAAY;IACtB,OAAO,YAAY;IACnB,cAAc,oBAAoB;IAClC,SAAS,cAAc;IACvB,KAAK,UAAU;IACf,IAAI,SAAS;IACb,IAAI,SAAS;IACb,QAAQ,aAAa;IACrB,QAAQ,aAAa;IACrB,GAAG,QAAQ;CACZ;AAGD,eAAO,MAAM,cAAc,yBAA6C,CAAC"}
@@ -12,17 +12,20 @@ const RESOURCE_ATTRIBUTES_CONSTANTS = {
12
12
  SYSTEM_ENTITY_TYPE: 'system_entity_type',
13
13
  },
14
14
  };
15
- const RESOURCE_TYPES = {
16
- ACCOUNT: 'account',
17
- ACCOUNT_PRODUCT: 'account_product',
18
- WORKSPACE: 'workspace',
19
- BOARD: 'board',
20
- ITEM: 'item',
21
- TEAM: 'team',
22
- OVERVIEW: 'overview',
23
- DOCUMENT: 'document',
24
- CRM: 'crm',
25
- };
15
+ exports.ResourceType = void 0;
16
+ (function (ResourceType) {
17
+ ResourceType["Account"] = "account";
18
+ ResourceType["AccountProduct"] = "account_product";
19
+ ResourceType["Workspace"] = "workspace";
20
+ ResourceType["Board"] = "board";
21
+ ResourceType["Item"] = "item";
22
+ ResourceType["Team"] = "team";
23
+ ResourceType["Overview"] = "overview";
24
+ ResourceType["Document"] = "document";
25
+ ResourceType["Crm"] = "crm";
26
+ })(exports.ResourceType || (exports.ResourceType = {}));
27
+ // Define the array of strings and use 'as const' to make its contents literal types
28
+ const RESOURCE_TYPES = Object.freeze(Object.values(exports.ResourceType));
26
29
 
27
30
  exports.RESOURCE_ATTRIBUTES_CONSTANTS = RESOURCE_ATTRIBUTES_CONSTANTS;
28
31
  exports.RESOURCE_TYPES = RESOURCE_TYPES;
@@ -1,7 +1,6 @@
1
1
  import { Resource } from './general';
2
2
  import type { EntityType } from '../entity-attributes-constants';
3
3
  import type { ResourceType } from '../resource-attributes-constants';
4
- export type { EntityType, ResourceType };
5
4
  interface AttributeAssignment {
6
5
  key: string;
7
6
  value: string;
@@ -40,4 +39,5 @@ export interface ResourceAttributeOperation extends ResourceAttributeAssignment
40
39
  export interface EntityAttributeOperation extends EntityAttributeAssignment {
41
40
  operationType: AttributeOperation;
42
41
  }
42
+ export {};
43
43
  //# 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;AACrC,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,gCAAgC,CAAC;AACjE,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,kCAAkC,CAAC;AAErE,YAAY,EAAE,UAAU,EAAE,YAAY,EAAE,CAAC;AAEzC,UAAU,mBAAmB;IAC3B,GAAG,EAAE,MAAM,CAAC;IACZ,KAAK,EAAE,MAAM,CAAC;CACf;AAGD,MAAM,WAAW,2BAA4B,SAAQ,mBAAmB;IACtE,UAAU,EAAE,MAAM,CAAC;IACnB,YAAY,EAAE,YAAY,CAAC;CAC5B;AAID,MAAM,WAAW,yBAA0B,SAAQ,mBAAmB;IACpE,QAAQ,EAAE,MAAM,CAAC;IACjB,UAAU,EAAE,UAAU,CAAC;CACxB;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,kBAAkB;IAC5B,MAAM,WAAW;IACjB,MAAM,WAAW;CAClB;AAGD,MAAM,WAAW,yBAAyB;IACxC,UAAU,EAAE,2BAA2B,EAAE,CAAC;CAC3C;AAED,MAAM,WAAW,uBAAuB;IACtC,UAAU,EAAE,yBAAyB,EAAE,CAAC;CACzC;AAED,MAAM,WAAW,0BAA2B,SAAQ,2BAA2B;IAC7E,aAAa,EAAE,kBAAkB,CAAC;CACnC;AAED,MAAM,WAAW,wBAAyB,SAAQ,yBAAyB;IACzE,aAAa,EAAE,kBAAkB,CAAC;CACnC"}
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;AACrC,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,gCAAgC,CAAC;AACjE,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,kCAAkC,CAAC;AAErE,UAAU,mBAAmB;IAC3B,GAAG,EAAE,MAAM,CAAC;IACZ,KAAK,EAAE,MAAM,CAAC;CACf;AAGD,MAAM,WAAW,2BAA4B,SAAQ,mBAAmB;IACtE,UAAU,EAAE,MAAM,CAAC;IACnB,YAAY,EAAE,YAAY,CAAC;CAC5B;AAID,MAAM,WAAW,yBAA0B,SAAQ,mBAAmB;IACpE,QAAQ,EAAE,MAAM,CAAC;IACjB,UAAU,EAAE,UAAU,CAAC;CACxB;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,kBAAkB;IAC5B,MAAM,WAAW;IACjB,MAAM,WAAW;CAClB;AAGD,MAAM,WAAW,yBAAyB;IACxC,UAAU,EAAE,2BAA2B,EAAE,CAAC;CAC3C;AAED,MAAM,WAAW,uBAAuB;IACtC,UAAU,EAAE,yBAAyB,EAAE,CAAC;CACzC;AAED,MAAM,WAAW,0BAA2B,SAAQ,2BAA2B;IAC7E,aAAa,EAAE,kBAAkB,CAAC;CACnC;AAED,MAAM,WAAW,wBAAyB,SAAQ,yBAAyB;IACzE,aAAa,EAAE,kBAAkB,CAAC;CACnC"}
@@ -1,7 +1,8 @@
1
- import { ResourceAttributeAssignment as ResourceAttributeAssignmentContract, EntityAttributeAssignment as EntityAttributeAssignmentContract, EntityType, ResourceAttributeOperation, EntityAttributeOperation } from './authorization-attributes-contracts';
1
+ import { ResourceAttributeAssignment as ResourceAttributeAssignmentContract, EntityAttributeAssignment as EntityAttributeAssignmentContract, ResourceAttributeOperation, EntityAttributeOperation } from './authorization-attributes-contracts';
2
2
  import { ResourceAttributeAssignment } from '../resource-attribute-assignment';
3
3
  import { EntityAttributeAssignment } from '../entity-attribute-assignment';
4
4
  import { Resource } from './general';
5
+ import { EntityType } from '../entity-attributes-constants';
5
6
  /**
6
7
  * Resource type compatible with both MS and SNS services
7
8
  */
@@ -15,8 +16,8 @@ export interface CompatibleResource {
15
16
  * Interface for authorization attributes operations.
16
17
  * Both MS (direct) and SNS (async) services implement this interface.
17
18
  */
18
- export interface IAuthorizationAttributesService {
19
- /**
19
+ export interface AuthorizationAttributesService {
20
+ /**authorization-attributes-service.ts
20
21
  * Upserts resource attributes.
21
22
  * For MS service: returns Promise<void>
22
23
  * For SNS service: requires appName and callerActionIdentifier, returns Promise<ResourceAttributesOperation[]>
@@ -1 +1 @@
1
- {"version":3,"file":"authorization-attributes-service.interface.d.ts","sourceRoot":"","sources":["../../src/types/authorization-attributes-service.interface.ts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AAC,CAAC;IAE9C;;;;OAIG;IACH,sBAAsB,CACpB,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,IAAI,GAAG,wBAAwB,EAAE,CAAC,CAAC;IAE9C;;;;OAIG;IACH,wBAAwB,CACtB,SAAS,EAAE,MAAM,EACjB,OAAO,EAAE,MAAM,EACf,sBAAsB,EAAE,MAAM,EAC9B,2BAA2B,EAAE,0BAA0B,EAAE,GACxD,OAAO,CAAC,0BAA0B,EAAE,CAAC,CAAC;IAEzC;;;;OAIG;IACH,sBAAsB,CACpB,SAAS,EAAE,MAAM,EACjB,OAAO,EAAE,MAAM,EACf,sBAAsB,EAAE,MAAM,EAC9B,yBAAyB,EAAE,wBAAwB,EAAE,GACpD,OAAO,CAAC,wBAAwB,EAAE,CAAC,CAAC;CACxC"}
1
+ {"version":3,"file":"authorization-attributes-service.interface.d.ts","sourceRoot":"","sources":["../../src/types/authorization-attributes-service.interface.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,2BAA2B,IAAI,mCAAmC,EAClE,yBAAyB,IAAI,iCAAiC,EAC9D,0BAA0B,EAC1B,wBAAwB,EACzB,MAAM,sCAAsC,CAAC;AAC9C,OAAO,EAAE,2BAA2B,EAAE,MAAM,kCAAkC,CAAC;AAC/E,OAAO,EAAE,yBAAyB,EAAE,MAAM,gCAAgC,CAAC;AAC3E,OAAO,EAAE,QAAQ,EAAE,MAAM,WAAW,CAAC;AACrC,OAAO,EAAE,UAAU,EAAE,MAAM,gCAAgC,CAAC;AAE5D;;GAEG;AACH,MAAM,WAAW,kBAAkB;IACjC,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,IAAI,CAAC,EAAE,MAAM,CAAC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