@mondaydotcomorg/monday-authorization 3.7.0-feat-shaime-support-entity-attributes-4-49e1de0 → 3.7.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +7 -1
- package/dist/authorization-attributes-ms-service.d.ts +20 -40
- package/dist/authorization-attributes-ms-service.d.ts.map +1 -1
- package/dist/authorization-attributes-ms-service.js +48 -103
- package/dist/authorization-attributes-service.d.ts +12 -10
- package/dist/authorization-attributes-service.d.ts.map +1 -1
- package/dist/authorization-attributes-service.js +17 -15
- package/dist/authorization-attributes-sns-service.d.ts +37 -44
- package/dist/authorization-attributes-sns-service.d.ts.map +1 -1
- package/dist/authorization-attributes-sns-service.js +53 -90
- package/dist/authorization-service.d.ts +0 -1
- package/dist/authorization-service.d.ts.map +1 -1
- package/dist/authorization-service.js +2 -22
- package/dist/base-attribute-assignment.d.ts +6 -7
- package/dist/base-attribute-assignment.d.ts.map +1 -1
- package/dist/base-attribute-assignment.js +5 -7
- package/dist/base-authorization-attributes-service.d.ts +32 -0
- package/dist/base-authorization-attributes-service.d.ts.map +1 -0
- package/dist/base-authorization-attributes-service.js +63 -0
- package/dist/entity-attribute-assignment.d.ts +4 -8
- package/dist/entity-attribute-assignment.d.ts.map +1 -1
- package/dist/entity-attribute-assignment.js +3 -4
- package/dist/esm/authorization-attributes-ms-service.d.ts +20 -40
- package/dist/esm/authorization-attributes-ms-service.d.ts.map +1 -1
- package/dist/esm/authorization-attributes-ms-service.mjs +48 -103
- package/dist/esm/authorization-attributes-service.d.ts +12 -10
- package/dist/esm/authorization-attributes-service.d.ts.map +1 -1
- package/dist/esm/authorization-attributes-service.mjs +17 -15
- package/dist/esm/authorization-attributes-sns-service.d.ts +37 -44
- package/dist/esm/authorization-attributes-sns-service.d.ts.map +1 -1
- package/dist/esm/authorization-attributes-sns-service.mjs +53 -90
- package/dist/esm/authorization-service.d.ts +0 -1
- package/dist/esm/authorization-service.d.ts.map +1 -1
- package/dist/esm/authorization-service.mjs +3 -23
- package/dist/esm/base-attribute-assignment.d.ts +6 -7
- package/dist/esm/base-attribute-assignment.d.ts.map +1 -1
- package/dist/esm/base-attribute-assignment.mjs +5 -7
- package/dist/esm/base-authorization-attributes-service.d.ts +32 -0
- package/dist/esm/base-authorization-attributes-service.d.ts.map +1 -0
- package/dist/esm/base-authorization-attributes-service.mjs +61 -0
- package/dist/esm/entity-attribute-assignment.d.ts +4 -8
- package/dist/esm/entity-attribute-assignment.d.ts.map +1 -1
- package/dist/esm/entity-attribute-assignment.mjs +3 -4
- package/dist/esm/index.d.ts +6 -0
- package/dist/esm/index.d.ts.map +1 -1
- package/dist/esm/index.mjs +6 -0
- package/dist/esm/resource-attribute-assignment.d.ts +3 -7
- package/dist/esm/resource-attribute-assignment.d.ts.map +1 -1
- package/dist/esm/resource-attribute-assignment.mjs +8 -2
- package/dist/esm/resource-attributes-constants.d.ts +13 -10
- package/dist/esm/resource-attributes-constants.d.ts.map +1 -1
- package/dist/esm/resource-attributes-constants.mjs +5 -2
- package/dist/esm/testKit/index.d.ts +4 -4
- package/dist/esm/testKit/index.d.ts.map +1 -1
- package/dist/esm/types/authorization-attributes-contracts.d.ts +7 -21
- package/dist/esm/types/authorization-attributes-contracts.d.ts.map +1 -1
- package/dist/esm/types/general.d.ts +4 -3
- package/dist/esm/types/general.d.ts.map +1 -1
- package/dist/esm/utils/assignment-schema.d.ts +51 -0
- package/dist/esm/utils/assignment-schema.d.ts.map +1 -0
- package/dist/esm/utils/assignment-schema.mjs +54 -0
- package/dist/esm/utils/resource-schema.d.ts +9 -0
- package/dist/esm/utils/resource-schema.d.ts.map +1 -0
- package/dist/esm/utils/resource-schema.mjs +16 -0
- package/dist/esm/utils/validation.d.ts +11 -28
- package/dist/esm/utils/validation.d.ts.map +1 -1
- package/dist/esm/utils/validation.mjs +61 -118
- package/dist/index.d.ts +6 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +24 -0
- package/dist/resource-attribute-assignment.d.ts +3 -7
- package/dist/resource-attribute-assignment.d.ts.map +1 -1
- package/dist/resource-attribute-assignment.js +8 -2
- package/dist/resource-attributes-constants.d.ts +13 -10
- package/dist/resource-attributes-constants.d.ts.map +1 -1
- package/dist/resource-attributes-constants.js +5 -2
- package/dist/testKit/index.d.ts +4 -4
- package/dist/testKit/index.d.ts.map +1 -1
- package/dist/types/authorization-attributes-contracts.d.ts +7 -21
- package/dist/types/authorization-attributes-contracts.d.ts.map +1 -1
- package/dist/types/general.d.ts +4 -3
- package/dist/types/general.d.ts.map +1 -1
- package/dist/utils/assignment-schema.d.ts +51 -0
- package/dist/utils/assignment-schema.d.ts.map +1 -0
- package/dist/utils/assignment-schema.js +63 -0
- package/dist/utils/resource-schema.d.ts +9 -0
- package/dist/utils/resource-schema.d.ts.map +1 -0
- package/dist/utils/resource-schema.js +22 -0
- package/dist/utils/validation.d.ts +11 -28
- package/dist/utils/validation.d.ts.map +1 -1
- package/dist/utils/validation.js +61 -118
- package/package.json +2 -3
- package/src/authorization-attributes-ms-service.ts +92 -154
- package/src/authorization-attributes-service.ts +18 -16
- package/src/authorization-attributes-sns-service.ts +132 -131
- package/src/authorization-service.ts +3 -28
- package/src/base-attribute-assignment.ts +10 -26
- package/src/base-authorization-attributes-service.ts +90 -0
- package/src/entity-attribute-assignment.ts +7 -6
- package/src/index.ts +17 -0
- package/src/resource-attribute-assignment.ts +13 -10
- package/src/resource-attributes-constants.ts +5 -2
- package/src/testKit/index.ts +5 -5
- package/src/types/authorization-attributes-contracts.ts +7 -27
- package/src/types/general.ts +4 -3
- package/src/utils/assignment-schema.ts +56 -0
- package/src/utils/resource-schema.ts +16 -0
- package/src/utils/validation.ts +90 -137
- package/dist/esm/types/authorization-attributes-service.interface.d.ts +0 -57
- package/dist/esm/types/authorization-attributes-service.interface.d.ts.map +0 -1
- package/dist/esm/types/authorization-attributes-service.interface.mjs +0 -1
- package/dist/types/authorization-attributes-service.interface.d.ts +0 -57
- package/dist/types/authorization-attributes-service.interface.d.ts.map +0 -1
- package/dist/types/authorization-attributes-service.interface.js +0 -1
- package/src/types/authorization-attributes-service.interface.ts +0 -101
|
@@ -1,101 +0,0 @@
|
|
|
1
|
-
import {
|
|
2
|
-
ResourceAttributeAssignment as ResourceAttributeAssignmentContract,
|
|
3
|
-
EntityAttributeAssignment as EntityAttributeAssignmentContract,
|
|
4
|
-
ResourceAttributeOperation,
|
|
5
|
-
EntityAttributeOperation,
|
|
6
|
-
} from './authorization-attributes-contracts';
|
|
7
|
-
import { ResourceAttributeAssignment } from '../resource-attribute-assignment';
|
|
8
|
-
import { EntityAttributeAssignment } from '../entity-attribute-assignment';
|
|
9
|
-
import { Resource } from './general';
|
|
10
|
-
import { EntityType } from '../entity-attributes-constants';
|
|
11
|
-
|
|
12
|
-
/**
|
|
13
|
-
* Resource type compatible with both MS and SNS services
|
|
14
|
-
*/
|
|
15
|
-
export interface CompatibleResource {
|
|
16
|
-
resourceType?: string;
|
|
17
|
-
resourceId?: number;
|
|
18
|
-
type?: string;
|
|
19
|
-
id?: number;
|
|
20
|
-
}
|
|
21
|
-
|
|
22
|
-
/**
|
|
23
|
-
* Interface for authorization attributes operations.
|
|
24
|
-
* Both MS (direct) and SNS (async) services implement this interface.
|
|
25
|
-
*/
|
|
26
|
-
export interface AuthorizationAttributesService {
|
|
27
|
-
/**authorization-attributes-service.ts
|
|
28
|
-
* Upserts resource attributes.
|
|
29
|
-
* For MS service: returns Promise<void>
|
|
30
|
-
* For SNS service: requires appName and callerActionIdentifier, returns Promise<ResourceAttributesOperation[]>
|
|
31
|
-
*/
|
|
32
|
-
upsertResourceAttributes(
|
|
33
|
-
accountId: number,
|
|
34
|
-
resourceAttributeAssignments: ResourceAttributeAssignment[] | ResourceAttributeAssignmentContract[],
|
|
35
|
-
appName?: string,
|
|
36
|
-
callerActionIdentifier?: string
|
|
37
|
-
): Promise<void | ResourceAttributeOperation[]>;
|
|
38
|
-
|
|
39
|
-
/**
|
|
40
|
-
* Deletes resource attributes.
|
|
41
|
-
* For MS service: returns Promise<void>
|
|
42
|
-
* For SNS service: requires appName and callerActionIdentifier, returns Promise<ResourceAttributesOperation[]>
|
|
43
|
-
*/
|
|
44
|
-
deleteResourceAttributes(
|
|
45
|
-
accountId: number,
|
|
46
|
-
resource: CompatibleResource | Resource,
|
|
47
|
-
attributeKeys: string[],
|
|
48
|
-
appName?: string,
|
|
49
|
-
callerActionIdentifier?: string
|
|
50
|
-
): Promise<void | ResourceAttributeOperation[]>;
|
|
51
|
-
|
|
52
|
-
/**
|
|
53
|
-
* Upserts entity attributes.
|
|
54
|
-
* For MS service: returns Promise<void>
|
|
55
|
-
* For SNS service: requires appName and callerActionIdentifier, returns Promise<EntityAttributesOperation[]>
|
|
56
|
-
*/
|
|
57
|
-
upsertEntityAttributes(
|
|
58
|
-
accountId: number,
|
|
59
|
-
entityAttributeAssignments: EntityAttributeAssignment[] | EntityAttributeAssignmentContract[],
|
|
60
|
-
appName?: string,
|
|
61
|
-
callerActionIdentifier?: string
|
|
62
|
-
): Promise<void | EntityAttributeOperation[]>;
|
|
63
|
-
|
|
64
|
-
/**
|
|
65
|
-
* Deletes entity attributes.
|
|
66
|
-
* For MS service: returns Promise<void>
|
|
67
|
-
* For SNS service: requires appName and callerActionIdentifier, returns Promise<EntityAttributesOperation[]>
|
|
68
|
-
*/
|
|
69
|
-
deleteEntityAttributes(
|
|
70
|
-
accountId: number,
|
|
71
|
-
entityType: EntityType | string,
|
|
72
|
-
entityId: number,
|
|
73
|
-
attributeKeys: string[],
|
|
74
|
-
appName?: string,
|
|
75
|
-
callerActionIdentifier?: string
|
|
76
|
-
): Promise<void | EntityAttributeOperation[]>;
|
|
77
|
-
|
|
78
|
-
/**
|
|
79
|
-
* Updates resource attributes (batch operations).
|
|
80
|
-
* For MS service: may throw error or delegate to upsert/delete
|
|
81
|
-
* For SNS service: returns Promise<ResourceAttributesOperation[]>
|
|
82
|
-
*/
|
|
83
|
-
updateResourceAttributes(
|
|
84
|
-
accountId: number,
|
|
85
|
-
appName: string,
|
|
86
|
-
callerActionIdentifier: string,
|
|
87
|
-
resourceAttributeOperations: ResourceAttributeOperation[]
|
|
88
|
-
): Promise<ResourceAttributeOperation[]>;
|
|
89
|
-
|
|
90
|
-
/**
|
|
91
|
-
* Updates entity attributes (batch operations).
|
|
92
|
-
* For MS service: may throw error or delegate to upsert/delete
|
|
93
|
-
* For SNS service: returns Promise<EntityAttributesOperation[]>
|
|
94
|
-
*/
|
|
95
|
-
updateEntityAttributes(
|
|
96
|
-
accountId: number,
|
|
97
|
-
appName: string,
|
|
98
|
-
callerActionIdentifier: string,
|
|
99
|
-
entityAttributeOperations: EntityAttributeOperation[]
|
|
100
|
-
): Promise<EntityAttributeOperation[]>;
|
|
101
|
-
}
|