@mondaydotcomorg/monday-authorization 3.5.1-fix-authorize-profile-picker-7481de0 → 3.5.3-feat-shaime-support-entity-attributes-in-authorization-sdk-e355942

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 (126) hide show
  1. package/dist/authorization-attributes-ms-service.d.ts +95 -0
  2. package/dist/authorization-attributes-ms-service.d.ts.map +1 -0
  3. package/dist/authorization-attributes-ms-service.js +362 -0
  4. package/dist/authorization-attributes-service.d.ts +26 -47
  5. package/dist/authorization-attributes-service.d.ts.map +1 -1
  6. package/dist/authorization-attributes-service.js +33 -171
  7. package/dist/authorization-attributes-sns-service.d.ts +91 -0
  8. package/dist/authorization-attributes-sns-service.d.ts.map +1 -0
  9. package/dist/authorization-attributes-sns-service.js +217 -0
  10. package/dist/authorization-middleware.d.ts +2 -2
  11. package/dist/authorization-middleware.d.ts.map +1 -1
  12. package/dist/authorization-service.d.ts +3 -3
  13. package/dist/authorization-service.d.ts.map +1 -1
  14. package/dist/authorization-service.js +7 -34
  15. package/dist/base-attribute-assignment.d.ts +18 -0
  16. package/dist/base-attribute-assignment.d.ts.map +1 -0
  17. package/dist/base-attribute-assignment.js +43 -0
  18. package/dist/constants/sns.d.ts +12 -2
  19. package/dist/constants/sns.d.ts.map +1 -1
  20. package/dist/constants/sns.js +22 -2
  21. package/dist/entity-attribute-assignment.d.ts +14 -0
  22. package/dist/entity-attribute-assignment.d.ts.map +1 -0
  23. package/dist/entity-attribute-assignment.js +24 -0
  24. package/dist/entity-attributes-constants.d.ts +7 -0
  25. package/dist/entity-attributes-constants.d.ts.map +1 -0
  26. package/dist/entity-attributes-constants.js +9 -0
  27. package/dist/errors/argument-error.d.ts +4 -0
  28. package/dist/errors/argument-error.d.ts.map +1 -0
  29. package/dist/errors/argument-error.js +11 -0
  30. package/dist/esm/authorization-attributes-ms-service.d.ts +95 -0
  31. package/dist/esm/authorization-attributes-ms-service.d.ts.map +1 -0
  32. package/dist/esm/authorization-attributes-ms-service.mjs +360 -0
  33. package/dist/esm/authorization-attributes-service.d.ts +26 -47
  34. package/dist/esm/authorization-attributes-service.d.ts.map +1 -1
  35. package/dist/esm/authorization-attributes-service.mjs +33 -167
  36. package/dist/esm/authorization-attributes-sns-service.d.ts +91 -0
  37. package/dist/esm/authorization-attributes-sns-service.d.ts.map +1 -0
  38. package/dist/esm/authorization-attributes-sns-service.mjs +211 -0
  39. package/dist/esm/authorization-middleware.d.ts +2 -2
  40. package/dist/esm/authorization-middleware.d.ts.map +1 -1
  41. package/dist/esm/authorization-service.d.ts +3 -3
  42. package/dist/esm/authorization-service.d.ts.map +1 -1
  43. package/dist/esm/authorization-service.mjs +7 -34
  44. package/dist/esm/base-attribute-assignment.d.ts +18 -0
  45. package/dist/esm/base-attribute-assignment.d.ts.map +1 -0
  46. package/dist/esm/base-attribute-assignment.mjs +41 -0
  47. package/dist/esm/constants/sns.d.ts +12 -2
  48. package/dist/esm/constants/sns.d.ts.map +1 -1
  49. package/dist/esm/constants/sns.mjs +17 -3
  50. package/dist/esm/entity-attribute-assignment.d.ts +14 -0
  51. package/dist/esm/entity-attribute-assignment.d.ts.map +1 -0
  52. package/dist/esm/entity-attribute-assignment.mjs +22 -0
  53. package/dist/esm/entity-attributes-constants.d.ts +7 -0
  54. package/dist/esm/entity-attributes-constants.d.ts.map +1 -0
  55. package/dist/esm/entity-attributes-constants.mjs +7 -0
  56. package/dist/esm/errors/argument-error.d.ts +4 -0
  57. package/dist/esm/errors/argument-error.d.ts.map +1 -0
  58. package/dist/esm/errors/argument-error.mjs +9 -0
  59. package/dist/esm/index.d.ts +9 -0
  60. package/dist/esm/index.d.ts.map +1 -1
  61. package/dist/esm/index.mjs +7 -0
  62. package/dist/esm/prometheus-service.d.ts +1 -2
  63. package/dist/esm/prometheus-service.d.ts.map +1 -1
  64. package/dist/esm/resource-attribute-assignment.d.ts +24 -0
  65. package/dist/esm/resource-attribute-assignment.d.ts.map +1 -0
  66. package/dist/esm/resource-attribute-assignment.mjs +34 -0
  67. package/dist/esm/resource-attributes-constants.d.ts +15 -0
  68. package/dist/esm/resource-attributes-constants.d.ts.map +1 -0
  69. package/dist/esm/resource-attributes-constants.mjs +25 -0
  70. package/dist/esm/testKit/index.d.ts +4 -4
  71. package/dist/esm/testKit/index.d.ts.map +1 -1
  72. package/dist/esm/types/authorization-attributes-contracts.d.ts +27 -12
  73. package/dist/esm/types/authorization-attributes-contracts.d.ts.map +1 -1
  74. package/dist/esm/types/authorization-attributes-contracts.mjs +6 -6
  75. package/dist/esm/types/authorization-attributes-service.interface.d.ts +57 -0
  76. package/dist/esm/types/authorization-attributes-service.interface.d.ts.map +1 -0
  77. package/dist/esm/types/authorization-attributes-service.interface.mjs +1 -0
  78. package/dist/esm/types/general.d.ts +1 -2
  79. package/dist/esm/types/general.d.ts.map +1 -1
  80. package/dist/esm/utils/validation.d.ts +45 -0
  81. package/dist/esm/utils/validation.d.ts.map +1 -0
  82. package/dist/esm/utils/validation.mjs +117 -0
  83. package/dist/index.d.ts +9 -0
  84. package/dist/index.d.ts.map +1 -1
  85. package/dist/index.js +15 -0
  86. package/dist/prometheus-service.d.ts +1 -2
  87. package/dist/prometheus-service.d.ts.map +1 -1
  88. package/dist/resource-attribute-assignment.d.ts +24 -0
  89. package/dist/resource-attribute-assignment.d.ts.map +1 -0
  90. package/dist/resource-attribute-assignment.js +36 -0
  91. package/dist/resource-attributes-constants.d.ts +15 -0
  92. package/dist/resource-attributes-constants.d.ts.map +1 -0
  93. package/dist/resource-attributes-constants.js +28 -0
  94. package/dist/testKit/index.d.ts +4 -4
  95. package/dist/testKit/index.d.ts.map +1 -1
  96. package/dist/types/authorization-attributes-contracts.d.ts +27 -12
  97. package/dist/types/authorization-attributes-contracts.d.ts.map +1 -1
  98. package/dist/types/authorization-attributes-contracts.js +5 -5
  99. package/dist/types/authorization-attributes-service.interface.d.ts +57 -0
  100. package/dist/types/authorization-attributes-service.interface.d.ts.map +1 -0
  101. package/dist/types/authorization-attributes-service.interface.js +1 -0
  102. package/dist/types/general.d.ts +1 -2
  103. package/dist/types/general.d.ts.map +1 -1
  104. package/dist/utils/validation.d.ts +45 -0
  105. package/dist/utils/validation.d.ts.map +1 -0
  106. package/dist/utils/validation.js +119 -0
  107. package/package.json +3 -2
  108. package/src/authorization-attributes-ms-service.ts +528 -0
  109. package/src/authorization-attributes-service.ts +35 -222
  110. package/src/authorization-attributes-sns-service.ts +312 -0
  111. package/src/authorization-middleware.ts +2 -2
  112. package/src/authorization-service.ts +15 -75
  113. package/src/base-attribute-assignment.ts +55 -0
  114. package/src/constants/sns.ts +19 -2
  115. package/src/entity-attribute-assignment.ts +21 -0
  116. package/src/entity-attributes-constants.ts +7 -0
  117. package/src/errors/argument-error.ts +7 -0
  118. package/src/index.ts +9 -0
  119. package/src/prometheus-service.ts +1 -2
  120. package/src/resource-attribute-assignment.ts +43 -0
  121. package/src/resource-attributes-constants.ts +35 -0
  122. package/src/testKit/index.ts +5 -5
  123. package/src/types/authorization-attributes-contracts.ts +36 -11
  124. package/src/types/authorization-attributes-service.interface.ts +100 -0
  125. package/src/types/general.ts +3 -2
  126. package/src/utils/validation.ts +114 -0
@@ -0,0 +1,24 @@
1
+ import { ResourceType } from './resource-attributes-constants';
2
+ import { BaseAttributeAssignment } from './base-attribute-assignment';
3
+ export declare class ResourceAttributeAssignment extends BaseAttributeAssignment<number, ResourceType> {
4
+ readonly resourceId: number;
5
+ readonly resourceType: ResourceType;
6
+ constructor(resourceId: number, resourceType: string, attributeKey: string, attributeValue: string);
7
+ /**
8
+ * Converts the assignment to a plain object with camelCase keys
9
+ * @returns Plain object with camelCase keys: { resourceId, resourceType, key, value }
10
+ */
11
+ toPlainObject(): {
12
+ resourceId: number;
13
+ resourceType: string;
14
+ key: string;
15
+ value: string;
16
+ };
17
+ /**
18
+ * Compares two assignments for equality
19
+ * @param other Another ResourceAttributeAssignment instance
20
+ * @returns true if all properties are equal
21
+ */
22
+ equals(other: ResourceAttributeAssignment): boolean;
23
+ }
24
+ //# sourceMappingURL=resource-attribute-assignment.d.ts.map
@@ -0,0 +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;IAclG;;;OAGG;IACH,aAAa,IAAI;QAAE,UAAU,EAAE,MAAM,CAAC;QAAC,YAAY,EAAE,MAAM,CAAC;QAAC,GAAG,EAAE,MAAM,CAAC;QAAC,KAAK,EAAE,MAAM,CAAA;KAAE;IASzF;;;;OAIG;IACH,MAAM,CAAC,KAAK,EAAE,2BAA2B,GAAG,OAAO;CAGpD"}
@@ -0,0 +1,36 @@
1
+ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
2
+
3
+ const resourceAttributesConstants = require('./resource-attributes-constants.js');
4
+ const baseAttributeAssignment = require('./base-attribute-assignment.js');
5
+
6
+ class ResourceAttributeAssignment extends baseAttributeAssignment.BaseAttributeAssignment {
7
+ resourceId;
8
+ resourceType;
9
+ constructor(resourceId, resourceType, attributeKey, attributeValue) {
10
+ super(resourceId, resourceType, attributeKey, attributeValue, Object.values(resourceAttributesConstants.RESOURCE_TYPES), 'resourceId', 'resourceType');
11
+ this.resourceId = resourceId;
12
+ this.resourceType = this.type;
13
+ }
14
+ /**
15
+ * Converts the assignment to a plain object with camelCase keys
16
+ * @returns Plain object with camelCase keys: { resourceId, resourceType, key, value }
17
+ */
18
+ toPlainObject() {
19
+ return {
20
+ resourceId: this.resourceId,
21
+ resourceType: this.resourceType,
22
+ key: this.attributeKey,
23
+ value: this.attributeValue,
24
+ };
25
+ }
26
+ /**
27
+ * Compares two assignments for equality
28
+ * @param other Another ResourceAttributeAssignment instance
29
+ * @returns true if all properties are equal
30
+ */
31
+ equals(other) {
32
+ return super.equals(other);
33
+ }
34
+ }
35
+
36
+ exports.ResourceAttributeAssignment = ResourceAttributeAssignment;
@@ -0,0 +1,15 @@
1
+ export declare const RESOURCE_TYPES: Record<string, ResourceType>;
2
+ export declare const RESOURCE_ATTRIBUTES_CONSTANTS: {
3
+ readonly ACCOUNT_RESOURCE_ATTRIBUTES: {
4
+ readonly ENABLE_MEMBERS_INVITE_FROM_NON_AUTH_DOMAIN: "enable_members_invite_from_non_auth_domain";
5
+ };
6
+ readonly WORKSPACE_RESOURCE_ATTRIBUTES: {
7
+ readonly IS_DEFAULT_WORKSPACE: "is_default_workspace";
8
+ };
9
+ readonly BOARD_RESOURCE_ATTRIBUTES: {
10
+ readonly IS_SYNCABLE_CHILD_ENTITY: "is_syncable_child_entity";
11
+ readonly SYSTEM_ENTITY_TYPE: "system_entity_type";
12
+ };
13
+ };
14
+ export type ResourceType = 'account' | 'account_product' | 'workspace' | 'board' | 'item' | 'team' | 'overview' | 'document' | 'crm';
15
+ //# sourceMappingURL=resource-attributes-constants.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"resource-attributes-constants.d.ts","sourceRoot":"","sources":["../src/resource-attributes-constants.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,cAAc,EAUtB,MAAM,CAAC,MAAM,EAAE,YAAY,CAAC,CAAC;AAElC,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"}
@@ -0,0 +1,28 @@
1
+ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
2
+
3
+ const RESOURCE_TYPES = {
4
+ ACCOUNT: 'account',
5
+ ACCOUNT_PRODUCT: 'account_product',
6
+ WORKSPACE: 'workspace',
7
+ BOARD: 'board',
8
+ ITEM: 'item',
9
+ TEAM: 'team',
10
+ OVERVIEW: 'overview',
11
+ DOCUMENT: 'document',
12
+ CRM: 'crm',
13
+ };
14
+ const RESOURCE_ATTRIBUTES_CONSTANTS = {
15
+ ACCOUNT_RESOURCE_ATTRIBUTES: {
16
+ ENABLE_MEMBERS_INVITE_FROM_NON_AUTH_DOMAIN: 'enable_members_invite_from_non_auth_domain',
17
+ },
18
+ WORKSPACE_RESOURCE_ATTRIBUTES: {
19
+ IS_DEFAULT_WORKSPACE: 'is_default_workspace',
20
+ },
21
+ BOARD_RESOURCE_ATTRIBUTES: {
22
+ IS_SYNCABLE_CHILD_ENTITY: 'is_syncable_child_entity',
23
+ SYSTEM_ENTITY_TYPE: 'system_entity_type',
24
+ },
25
+ };
26
+
27
+ exports.RESOURCE_ATTRIBUTES_CONSTANTS = RESOURCE_ATTRIBUTES_CONSTANTS;
28
+ exports.RESOURCE_TYPES = RESOURCE_TYPES;
@@ -1,12 +1,12 @@
1
- import { Action, BaseRequest, BaseResponse, ContextGetter, Resource, ResourceGetter } from '../types/general';
1
+ import { BaseRequest, BaseResponse, ContextGetter, Resource, ResourceGetter } from '../types/general';
2
2
  import type { NextFunction } from 'express';
3
3
  export type TestPermittedAction = {
4
4
  accountId: number;
5
5
  userId: number;
6
6
  resources: Resource[];
7
- action: Action;
7
+ action: string;
8
8
  };
9
- export declare const addTestPermittedAction: (accountId: number, userId: number, resources: Resource[], action: Action) => void;
9
+ export declare const addTestPermittedAction: (accountId: number, userId: number, resources: Resource[], action: string) => void;
10
10
  export declare const clearTestPermittedActions: () => void;
11
- export declare const getTestAuthorizationMiddleware: (action: Action, resourceGetter: ResourceGetter, contextGetter?: ContextGetter) => (request: BaseRequest, response: BaseResponse, next: NextFunction) => Promise<void>;
11
+ export declare const getTestAuthorizationMiddleware: (action: string, resourceGetter: ResourceGetter, contextGetter?: ContextGetter) => (request: BaseRequest, response: BaseResponse, next: NextFunction) => Promise<void>;
12
12
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/testKit/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,WAAW,EAAE,YAAY,EAAE,aAAa,EAAE,QAAQ,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAG9G,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,SAAS,CAAC;AAE5C,MAAM,MAAM,mBAAmB,GAAG;IAChC,SAAS,EAAE,MAAM,CAAC;IAClB,MAAM,EAAE,MAAM,CAAC;IACf,SAAS,EAAE,QAAQ,EAAE,CAAC;IACtB,MAAM,EAAE,MAAM,CAAC;CAChB,CAAC;AAGF,eAAO,MAAM,sBAAsB,GAAI,WAAW,MAAM,EAAE,QAAQ,MAAM,EAAE,WAAW,QAAQ,EAAE,EAAE,QAAQ,MAAM,SAE9G,CAAC;AAEF,eAAO,MAAM,yBAAyB,YAErC,CAAC;AA4BF,eAAO,MAAM,8BAA8B,GACzC,QAAQ,MAAM,EACd,gBAAgB,cAAc,EAC9B,gBAAgB,aAAa,MAG3B,SAAS,WAAW,EACpB,UAAU,YAAY,EACtB,MAAM,YAAY,KACjB,OAAO,CAAC,IAAI,CAYhB,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/testKit/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,YAAY,EAAE,aAAa,EAAE,QAAQ,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAGtG,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,SAAS,CAAC;AAE5C,MAAM,MAAM,mBAAmB,GAAG;IAChC,SAAS,EAAE,MAAM,CAAC;IAClB,MAAM,EAAE,MAAM,CAAC;IACf,SAAS,EAAE,QAAQ,EAAE,CAAC;IACtB,MAAM,EAAE,MAAM,CAAC;CAChB,CAAC;AAGF,eAAO,MAAM,sBAAsB,GAAI,WAAW,MAAM,EAAE,QAAQ,MAAM,EAAE,WAAW,QAAQ,EAAE,EAAE,QAAQ,MAAM,SAE9G,CAAC;AAEF,eAAO,MAAM,yBAAyB,YAErC,CAAC;AA4BF,eAAO,MAAM,8BAA8B,GACzC,QAAQ,MAAM,EACd,gBAAgB,cAAc,EAC9B,gBAAgB,aAAa,MAG3B,SAAS,WAAW,EACpB,UAAU,YAAY,EACtB,MAAM,YAAY,KACjB,OAAO,CAAC,IAAI,CAYhB,CAAC"}
@@ -1,28 +1,43 @@
1
1
  import { Resource } from './general';
2
- export interface ResourceAttributeAssignment {
3
- resourceType: Resource['type'];
4
- resourceId: Resource['id'];
2
+ import type { EntityType } from '../entity-attributes-constants';
3
+ import type { ResourceType } from '../resource-attributes-constants';
4
+ export type { EntityType, ResourceType };
5
+ interface AttributeAssignment {
5
6
  key: string;
6
7
  value: string;
7
8
  }
8
- export interface ResourceAttributeResponse {
9
- attributes: ResourceAttributeAssignment[];
9
+ export interface ResourceAttributeAssignment extends AttributeAssignment {
10
+ resourceId: number;
11
+ resourceType: ResourceType;
12
+ }
13
+ export interface EntityAttributeAssignment extends AttributeAssignment {
14
+ entityId: number;
15
+ entityType: EntityType;
10
16
  }
11
17
  export interface ResourceAttributeDelete {
12
18
  resourceType: Resource['type'];
13
19
  resourceId: Resource['id'];
14
20
  key: string;
15
21
  }
16
- export declare enum ResourceAttributeOperationEnum {
22
+ export interface EntityAttributeDelete {
23
+ entityType: EntityType;
24
+ entityId: number;
25
+ key: string;
26
+ }
27
+ export declare enum AttributeOperation {
17
28
  UPSERT = "upsert",
18
29
  DELETE = "delete"
19
30
  }
20
- interface UpsertResourceAttributeOperation extends ResourceAttributeAssignment {
21
- operationType: ResourceAttributeOperationEnum.UPSERT;
31
+ export interface ResourceAttributeResponse {
32
+ attributes: ResourceAttributeAssignment[];
33
+ }
34
+ export interface EntityAttributeResponse {
35
+ attributes: EntityAttributeAssignment[];
36
+ }
37
+ export interface ResourceAttributeOperation extends ResourceAttributeAssignment {
38
+ operationType: AttributeOperation;
22
39
  }
23
- interface DeleteResourceAttributeOperation extends ResourceAttributeDelete {
24
- operationType: ResourceAttributeOperationEnum.DELETE;
40
+ export interface EntityAttributeOperation extends EntityAttributeAssignment {
41
+ operationType: AttributeOperation;
25
42
  }
26
- export type ResourceAttributesOperation = UpsertResourceAttributeOperation | DeleteResourceAttributeOperation;
27
- export {};
28
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;AAErC,MAAM,WAAW,2BAA2B;IAC1C,YAAY,EAAE,QAAQ,CAAC,MAAM,CAAC,CAAC;IAC/B,UAAU,EAAE,QAAQ,CAAC,IAAI,CAAC,CAAC;IAC3B,GAAG,EAAE,MAAM,CAAC;IACZ,KAAK,EAAE,MAAM,CAAC;CACf;AAED,MAAM,WAAW,yBAAyB;IACxC,UAAU,EAAE,2BAA2B,EAAE,CAAC;CAC3C;AAED,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,oBAAY,8BAA8B;IACxC,MAAM,WAAW;IACjB,MAAM,WAAW;CAClB;AAED,UAAU,gCAAiC,SAAQ,2BAA2B;IAC5E,aAAa,EAAE,8BAA8B,CAAC,MAAM,CAAC;CACtD;AAED,UAAU,gCAAiC,SAAQ,uBAAuB;IACxE,aAAa,EAAE,8BAA8B,CAAC,MAAM,CAAC;CACtD;AAED,MAAM,MAAM,2BAA2B,GAAG,gCAAgC,GAAG,gCAAgC,CAAC"}
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,7 +1,7 @@
1
1
  Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
2
2
 
3
- exports.ResourceAttributeOperationEnum = void 0;
4
- (function (ResourceAttributeOperationEnum) {
5
- ResourceAttributeOperationEnum["UPSERT"] = "upsert";
6
- ResourceAttributeOperationEnum["DELETE"] = "delete";
7
- })(exports.ResourceAttributeOperationEnum || (exports.ResourceAttributeOperationEnum = {}));
3
+ exports.AttributeOperation = void 0;
4
+ (function (AttributeOperation) {
5
+ AttributeOperation["UPSERT"] = "upsert";
6
+ AttributeOperation["DELETE"] = "delete";
7
+ })(exports.AttributeOperation || (exports.AttributeOperation = {}));
@@ -0,0 +1,57 @@
1
+ import { ResourceAttributeAssignment as ResourceAttributeAssignmentContract, EntityAttributeAssignment as EntityAttributeAssignmentContract, EntityType } from './authorization-attributes-contracts';
2
+ import { ResourceAttributeOperation, EntityAttributeOperation } from './authorization-attributes-contracts';
3
+ import { ResourceAttributeAssignment } from '../resource-attribute-assignment';
4
+ import { EntityAttributeAssignment } from '../entity-attribute-assignment';
5
+ import { Resource } from './general';
6
+ /**
7
+ * Resource type compatible with both MS and SNS services
8
+ */
9
+ export interface CompatibleResource {
10
+ resourceType?: string;
11
+ resourceId?: number;
12
+ type?: string;
13
+ id?: number;
14
+ }
15
+ /**
16
+ * Interface for authorization attributes operations.
17
+ * Both MS (direct) and SNS (async) services implement this interface.
18
+ */
19
+ export interface IAuthorizationAttributesService {
20
+ /**
21
+ * Upserts resource attributes.
22
+ * For MS service: returns Promise<void>
23
+ * For SNS service: requires appName and callerActionIdentifier, returns Promise<ResourceAttributesOperation[]>
24
+ */
25
+ upsertResourceAttributes(accountId: number, resourceAttributeAssignments: ResourceAttributeAssignment[] | ResourceAttributeAssignmentContract[], appName?: string, callerActionIdentifier?: string): Promise<void | ResourceAttributeOperation[]>;
26
+ /**
27
+ * Deletes resource attributes.
28
+ * For MS service: returns Promise<void>
29
+ * For SNS service: requires appName and callerActionIdentifier, returns Promise<ResourceAttributesOperation[]>
30
+ */
31
+ deleteResourceAttributes(accountId: number, resource: CompatibleResource | Resource, attributeKeys: string[], appName?: string, callerActionIdentifier?: string): Promise<void | ResourceAttributeOperation[]>;
32
+ /**
33
+ * Upserts entity attributes.
34
+ * For MS service: returns Promise<void>
35
+ * For SNS service: requires appName and callerActionIdentifier, returns Promise<EntityAttributesOperation[]>
36
+ */
37
+ upsertEntityAttributes(accountId: number, entityAttributeAssignments: EntityAttributeAssignment[] | EntityAttributeAssignmentContract[], appName?: string, callerActionIdentifier?: string): Promise<void | EntityAttributeOperation[]>;
38
+ /**
39
+ * Deletes entity attributes.
40
+ * For MS service: returns Promise<void>
41
+ * For SNS service: requires appName and callerActionIdentifier, returns Promise<EntityAttributesOperation[]>
42
+ */
43
+ deleteEntityAttributes(accountId: number, entityType: EntityType | string, entityId: number, attributeKeys: string[], appName?: string, callerActionIdentifier?: string): Promise<void | EntityAttributeOperation[]>;
44
+ /**
45
+ * Updates resource attributes (batch operations).
46
+ * For MS service: may throw error or delegate to upsert/delete
47
+ * For SNS service: returns Promise<ResourceAttributesOperation[]>
48
+ */
49
+ updateResourceAttributes(accountId: number, appName: string, callerActionIdentifier: string, resourceAttributeOperations: ResourceAttributeOperation[]): Promise<ResourceAttributeOperation[]>;
50
+ /**
51
+ * Updates entity attributes (batch operations).
52
+ * For MS service: may throw error or delegate to upsert/delete
53
+ * For SNS service: returns Promise<EntityAttributesOperation[]>
54
+ */
55
+ updateEntityAttributes(accountId: number, appName: string, callerActionIdentifier: string, entityAttributeOperations: EntityAttributeOperation[]): Promise<EntityAttributeOperation[]>;
56
+ }
57
+ //# sourceMappingURL=authorization-attributes-service.interface.d.ts.map
@@ -0,0 +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,EACX,MAAM,sCAAsC,CAAC;AAC9C,OAAO,EAAE,0BAA0B,EAAE,wBAAwB,EAAE,MAAM,sCAAsC,CAAC;AAC5G,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,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,+BAA+B;IAC9C;;;;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,7 +4,6 @@ export interface Resource {
4
4
  type: string;
5
5
  wrapperData?: object;
6
6
  }
7
- export type Action = string;
8
7
  export interface Context {
9
8
  accountId: number;
10
9
  userId: number;
@@ -13,7 +12,7 @@ export interface AuthorizationObject {
13
12
  resource_id?: Resource['id'];
14
13
  resource_type: Resource['type'];
15
14
  wrapper_data?: Resource['wrapperData'];
16
- action: Action;
15
+ action: string;
17
16
  }
18
17
  export interface AuthorizationParams {
19
18
  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;AACD,MAAM,MAAM,MAAM,GAAG,MAAM,CAAC;AAC5B,MAAM,WAAW,OAAO;IACtB,SAAS,EAAE,MAAM,CAAC;IAClB,MAAM,EAAE,MAAM,CAAC;CAChB;AACD,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;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
+ {"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;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"}
@@ -0,0 +1,45 @@
1
+ /**
2
+ * Utility class for common validation operations using Zod
3
+ */
4
+ export declare class ValidationUtils {
5
+ /**
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
10
+ */
11
+ static validateInteger(value: any, fieldName: string): void;
12
+ /**
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
17
+ */
18
+ static validateString(value: any, fieldName: string): void;
19
+ /**
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
26
+ */
27
+ static validateArray<T>(value: any, fieldName: string, minLength?: number): T[];
28
+ /**
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
35
+ */
36
+ static validateEnum<T extends string>(value: string, validValues: readonly T[], fieldName: string): T;
37
+ /**
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
42
+ */
43
+ static validateStringArray(value: any[], fieldName: string): void;
44
+ }
45
+ //# sourceMappingURL=validation.d.ts.map
@@ -0,0 +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;IACH,MAAM,CAAC,mBAAmB,CAAC,KAAK,EAAE,GAAG,EAAE,EAAE,SAAS,EAAE,MAAM,GAAG,IAAI;CAkBlE"}
@@ -0,0 +1,119 @@
1
+ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
2
+
3
+ const zod = require('zod');
4
+ const errors_argumentError = require('../errors/argument-error.js');
5
+
6
+ /**
7
+ * Utility class for common validation operations using Zod
8
+ */
9
+ class ValidationUtils {
10
+ /**
11
+ * Validates that a value is an integer
12
+ * @param value The value to validate
13
+ * @param fieldName The name of the field for error messages
14
+ * @throws ArgumentError if value is not an integer
15
+ */
16
+ static validateInteger(value, fieldName) {
17
+ const schema = zod.z.number().int();
18
+ try {
19
+ schema.parse(value);
20
+ }
21
+ catch (error) {
22
+ if (error instanceof zod.z.ZodError) {
23
+ throw new errors_argumentError.ArgumentError(`${fieldName} must be an integer, got: ${value}`);
24
+ }
25
+ throw error;
26
+ }
27
+ }
28
+ /**
29
+ * Validates that a value is a non-empty string
30
+ * @param value The value to validate
31
+ * @param fieldName The name of the field for error messages
32
+ * @throws ArgumentError if value is not a string or is empty
33
+ */
34
+ static validateString(value, fieldName) {
35
+ const schema = zod.z.string().min(1);
36
+ try {
37
+ schema.parse(value);
38
+ }
39
+ catch (error) {
40
+ if (error instanceof zod.z.ZodError) {
41
+ if (typeof value !== 'string') {
42
+ throw new errors_argumentError.ArgumentError(`${fieldName} must be a string, got: ${typeof value}`);
43
+ }
44
+ throw new errors_argumentError.ArgumentError(`${fieldName} must be a non-empty string`);
45
+ }
46
+ throw error;
47
+ }
48
+ }
49
+ /**
50
+ * Validates that a value is an array and optionally checks minimum length
51
+ * @param value The value to validate
52
+ * @param fieldName The name of the field for error messages
53
+ * @param minLength Minimum required length (default: 0)
54
+ * @returns The validated array
55
+ * @throws ArgumentError if value is not an array or doesn't meet minimum length
56
+ */
57
+ static validateArray(value, fieldName, minLength = 0) {
58
+ const schema = zod.z.array(zod.z.any()).min(minLength);
59
+ try {
60
+ return schema.parse(value);
61
+ }
62
+ catch (error) {
63
+ if (error instanceof zod.z.ZodError) {
64
+ if (!Array.isArray(value)) {
65
+ throw new errors_argumentError.ArgumentError(`${fieldName} must be an array`);
66
+ }
67
+ throw new errors_argumentError.ArgumentError(`${fieldName} must have at least ${minLength} items`);
68
+ }
69
+ throw error;
70
+ }
71
+ }
72
+ /**
73
+ * Validates that a value is one of the allowed enum values
74
+ * @param value The value to validate
75
+ * @param validValues Array of valid values
76
+ * @param fieldName The name of the field for error messages
77
+ * @returns The validated value as the enum type
78
+ * @throws ArgumentError if value is not in validValues
79
+ */
80
+ static validateEnum(value, validValues, fieldName) {
81
+ const schema = zod.z.enum(validValues);
82
+ try {
83
+ return schema.parse(value);
84
+ }
85
+ catch (error) {
86
+ if (error instanceof zod.z.ZodError) {
87
+ throw new errors_argumentError.ArgumentError(`${fieldName} must be one of [${validValues.join(', ')}], got: ${value}`);
88
+ }
89
+ throw error;
90
+ }
91
+ }
92
+ /**
93
+ * Validates that all items in an array are strings
94
+ * @param value Array to validate
95
+ * @param fieldName The name of the field for error messages
96
+ * @throws ArgumentError if any item is not a string
97
+ */
98
+ static validateStringArray(value, fieldName) {
99
+ const schema = zod.z.array(zod.z.string());
100
+ try {
101
+ schema.parse(value);
102
+ }
103
+ catch (error) {
104
+ if (error instanceof zod.z.ZodError) {
105
+ const zodError = error;
106
+ const firstError = zodError.issues[0];
107
+ // Check if it's an array item validation error
108
+ if (firstError.path.length > 0 && typeof firstError.path[0] === 'number') {
109
+ const index = firstError.path[0];
110
+ throw new errors_argumentError.ArgumentError(`All ${fieldName} must be strings, but item at index ${index} is not`);
111
+ }
112
+ throw new errors_argumentError.ArgumentError(`${fieldName} must be an array`);
113
+ }
114
+ throw error;
115
+ }
116
+ }
117
+ }
118
+
119
+ exports.ValidationUtils = ValidationUtils;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mondaydotcomorg/monday-authorization",
3
- "version": "3.5.1-fix-authorize-profile-picker-7481de0",
3
+ "version": "3.5.3-feat-shaime-support-entity-attributes-in-authorization-sdk-e355942",
4
4
  "main": "dist/index.js",
5
5
  "types": "dist/index.d.ts",
6
6
  "license": "BSD-3-Clause",
@@ -31,7 +31,8 @@
31
31
  "lodash": "^4.17.21",
32
32
  "node-fetch": "^2.6.7",
33
33
  "on-headers": "^1.0.2",
34
- "ts-node": "^10.0.0"
34
+ "ts-node": "^10.0.0",
35
+ "zod": "^4.1.13"
35
36
  },
36
37
  "devDependencies": {
37
38
  "@mondaydotcomorg/trident-library": "^1.1.44",