@mondaydotcomorg/monday-authorization 3.5.0-feat-shaime-support-entity-attributes-in-authorization-sdk-c9e4cfc → 3.5.0-feat-shaime-support-entity-attributes-in-authorization-sdk-8d846f1
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/dist/authorization-attributes-ms-service.d.ts +17 -0
- package/dist/authorization-attributes-ms-service.d.ts.map +1 -1
- package/dist/authorization-attributes-ms-service.js +166 -1
- package/dist/authorization-attributes-service.d.ts +52 -66
- package/dist/authorization-attributes-service.d.ts.map +1 -1
- package/dist/authorization-attributes-service.js +105 -353
- package/dist/constants/sns.d.ts +2 -0
- package/dist/constants/sns.d.ts.map +1 -1
- package/dist/constants/sns.js +4 -0
- package/dist/esm/authorization-attributes-ms-service.d.ts +17 -0
- package/dist/esm/authorization-attributes-ms-service.d.ts.map +1 -1
- package/dist/esm/authorization-attributes-ms-service.mjs +166 -1
- package/dist/esm/authorization-attributes-service.d.ts +52 -66
- package/dist/esm/authorization-attributes-service.d.ts.map +1 -1
- package/dist/esm/authorization-attributes-service.mjs +107 -355
- package/dist/esm/constants/sns.d.ts +2 -0
- package/dist/esm/constants/sns.d.ts.map +1 -1
- package/dist/esm/constants/sns.mjs +3 -1
- package/dist/esm/resource-attribute-assignment.d.ts.map +1 -1
- package/dist/esm/resource-attributes-constants.d.ts +1 -1
- package/dist/esm/resource-attributes-constants.d.ts.map +1 -1
- package/dist/esm/types/authorization-attributes-contracts.d.ts +16 -0
- package/dist/esm/types/authorization-attributes-contracts.d.ts.map +1 -1
- package/dist/esm/types/authorization-attributes-contracts.mjs +6 -1
- package/dist/resource-attribute-assignment.d.ts.map +1 -1
- package/dist/resource-attributes-constants.d.ts +1 -1
- package/dist/resource-attributes-constants.d.ts.map +1 -1
- package/dist/types/authorization-attributes-contracts.d.ts +16 -0
- package/dist/types/authorization-attributes-contracts.d.ts.map +1 -1
- package/dist/types/authorization-attributes-contracts.js +5 -0
- package/package.json +1 -1
- package/src/authorization-attributes-ms-service.ts +258 -17
- package/src/authorization-attributes-service.ts +146 -428
- package/src/constants/sns.ts +2 -0
- package/src/errors/argument-error.ts +1 -2
- package/src/resource-attribute-assignment.ts +1 -4
- package/src/resource-attributes-constants.ts +1 -2
- package/src/types/authorization-attributes-contracts.ts +22 -5
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { Resource } from './general';
|
|
2
2
|
|
|
3
3
|
// Resource Types - matching the API
|
|
4
|
-
export type ResourceType =
|
|
4
|
+
export type ResourceType =
|
|
5
5
|
| 'account'
|
|
6
6
|
| 'account_product'
|
|
7
7
|
| 'workspace'
|
|
@@ -13,10 +13,7 @@ export type ResourceType =
|
|
|
13
13
|
| 'crm';
|
|
14
14
|
|
|
15
15
|
// Entity Types - matching the API
|
|
16
|
-
export type EntityType =
|
|
17
|
-
| 'user'
|
|
18
|
-
| 'team'
|
|
19
|
-
| 'account';
|
|
16
|
+
export type EntityType = 'user' | 'team' | 'account';
|
|
20
17
|
|
|
21
18
|
// Common attribute keys that can be used for both resources and entities
|
|
22
19
|
export type CommonAttributeKey = string;
|
|
@@ -63,11 +60,22 @@ export interface ResourceAttributeDelete {
|
|
|
63
60
|
key: string;
|
|
64
61
|
}
|
|
65
62
|
|
|
63
|
+
export interface EntityAttributeDelete {
|
|
64
|
+
entityType: EntityType;
|
|
65
|
+
entityId: number;
|
|
66
|
+
key: string;
|
|
67
|
+
}
|
|
68
|
+
|
|
66
69
|
export enum ResourceAttributeOperationEnum {
|
|
67
70
|
UPSERT = 'upsert',
|
|
68
71
|
DELETE = 'delete',
|
|
69
72
|
}
|
|
70
73
|
|
|
74
|
+
export enum EntityAttributeOperationEnum {
|
|
75
|
+
UPSERT = 'upsert',
|
|
76
|
+
DELETE = 'delete',
|
|
77
|
+
}
|
|
78
|
+
|
|
71
79
|
interface UpsertResourceAttributeOperation extends ResourceAttributeAssignment {
|
|
72
80
|
operationType: ResourceAttributeOperationEnum.UPSERT;
|
|
73
81
|
}
|
|
@@ -76,4 +84,13 @@ interface DeleteResourceAttributeOperation extends ResourceAttributeDelete {
|
|
|
76
84
|
operationType: ResourceAttributeOperationEnum.DELETE;
|
|
77
85
|
}
|
|
78
86
|
|
|
87
|
+
interface UpsertEntityAttributeOperation extends EntityAttributeAssignment {
|
|
88
|
+
operationType: EntityAttributeOperationEnum.UPSERT;
|
|
89
|
+
}
|
|
90
|
+
|
|
91
|
+
interface DeleteEntityAttributeOperation extends EntityAttributeDelete {
|
|
92
|
+
operationType: EntityAttributeOperationEnum.DELETE;
|
|
93
|
+
}
|
|
94
|
+
|
|
79
95
|
export type ResourceAttributesOperation = UpsertResourceAttributeOperation | DeleteResourceAttributeOperation;
|
|
96
|
+
export type EntityAttributesOperation = UpsertEntityAttributeOperation | DeleteEntityAttributeOperation;
|