@mondaydotcomorg/monday-authorization 3.3.0-feat-add-graph-api-routing-support-cb899c0 → 3.3.0-feat-add-graph-api-routing-support-c37c919

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 (50) hide show
  1. package/README.md +4 -0
  2. package/dist/authorization-service.d.ts +4 -0
  3. package/dist/authorization-service.d.ts.map +1 -1
  4. package/dist/authorization-service.js +21 -5
  5. package/dist/clients/graph-api.d.ts +27 -0
  6. package/dist/clients/graph-api.d.ts.map +1 -0
  7. package/dist/clients/{graph-api.client.js → graph-api.js} +34 -30
  8. package/dist/clients/platform-api.d.ts +26 -0
  9. package/dist/clients/platform-api.d.ts.map +1 -0
  10. package/dist/clients/{platform-api.client.js → platform-api.js} +19 -13
  11. package/dist/esm/authorization-service.d.ts +4 -0
  12. package/dist/esm/authorization-service.d.ts.map +1 -1
  13. package/dist/esm/authorization-service.mjs +22 -6
  14. package/dist/esm/clients/graph-api.d.ts +27 -0
  15. package/dist/esm/clients/graph-api.d.ts.map +1 -0
  16. package/dist/esm/clients/{graph-api.client.mjs → graph-api.mjs} +34 -30
  17. package/dist/esm/clients/platform-api.d.ts +26 -0
  18. package/dist/esm/clients/platform-api.d.ts.map +1 -0
  19. package/dist/esm/clients/{platform-api.client.mjs → platform-api.mjs} +20 -14
  20. package/dist/esm/index.d.ts +6 -0
  21. package/dist/esm/index.d.ts.map +1 -1
  22. package/dist/esm/index.mjs +7 -0
  23. package/dist/esm/metrics-service.d.ts +13 -0
  24. package/dist/esm/metrics-service.d.ts.map +1 -0
  25. package/dist/esm/metrics-service.mjs +65 -0
  26. package/dist/esm/prometheus-service.d.ts +0 -2
  27. package/dist/esm/prometheus-service.d.ts.map +1 -1
  28. package/dist/esm/prometheus-service.mjs +4 -50
  29. package/dist/esm/types/graph-api.types.d.ts +8 -7
  30. package/dist/esm/types/graph-api.types.d.ts.map +1 -1
  31. package/dist/index.d.ts +6 -0
  32. package/dist/index.d.ts.map +1 -1
  33. package/dist/index.js +7 -0
  34. package/dist/metrics-service.d.ts +13 -0
  35. package/dist/metrics-service.d.ts.map +1 -0
  36. package/dist/metrics-service.js +70 -0
  37. package/dist/prometheus-service.d.ts +0 -2
  38. package/dist/prometheus-service.d.ts.map +1 -1
  39. package/dist/prometheus-service.js +3 -51
  40. package/dist/types/graph-api.types.d.ts +8 -7
  41. package/dist/types/graph-api.types.d.ts.map +1 -1
  42. package/package.json +2 -1
  43. package/dist/clients/graph-api.client.d.ts +0 -24
  44. package/dist/clients/graph-api.client.d.ts.map +0 -1
  45. package/dist/clients/platform-api.client.d.ts +0 -31
  46. package/dist/clients/platform-api.client.d.ts.map +0 -1
  47. package/dist/esm/clients/graph-api.client.d.ts +0 -24
  48. package/dist/esm/clients/graph-api.client.d.ts.map +0 -1
  49. package/dist/esm/clients/platform-api.client.d.ts +0 -31
  50. package/dist/esm/clients/platform-api.client.d.ts.map +0 -1
@@ -1,31 +0,0 @@
1
- import { ScopedAction, ScopedActionResponseObject } from '../types/scoped-actions-contracts';
2
- import { PlatformProfile } from '../attributions-service';
3
- type ScopedActionPlatformPayload = Omit<ScopedAction, 'scope'> & {
4
- scope: Record<string, number>;
5
- };
6
- interface CanActionsInScopesResponse {
7
- result: ScopedActionResponseObject[];
8
- }
9
- /**
10
- * Client for handling Platform API authorization operations
11
- */
12
- export declare class PlatformApiClient {
13
- /**
14
- * Builds the request payload for Platform API calls
15
- */
16
- static buildRequestPayload(scopedActions: ScopedAction[]): ScopedActionPlatformPayload[];
17
- /**
18
- * Fetches authorization data from the Platform API
19
- */
20
- static fetchPermissions(profile: PlatformProfile, internalAuthToken: string, userId: number, scopedActionsPayload: ScopedActionPlatformPayload[]): Promise<CanActionsInScopesResponse>;
21
- /**
22
- * Maps Platform API response to the expected format
23
- */
24
- static mapResponse(response: CanActionsInScopesResponse): ScopedActionResponseObject[];
25
- /**
26
- * Performs a complete authorization check using the Platform API
27
- */
28
- static checkPermissions(profile: PlatformProfile, internalAuthToken: string, userId: number, scopedActions: ScopedAction[]): Promise<ScopedActionResponseObject[]>;
29
- }
30
- export {};
31
- //# sourceMappingURL=platform-api.client.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"platform-api.client.d.ts","sourceRoot":"","sources":["../../src/clients/platform-api.client.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,YAAY,EAAE,0BAA0B,EAAE,MAAM,mCAAmC,CAAC;AAE7F,OAAO,EAA0B,eAAe,EAAE,MAAM,yBAAyB,CAAC;AAOlF,KAAK,2BAA2B,GAAG,IAAI,CAAC,YAAY,EAAE,OAAO,CAAC,GAAG;IAC/D,KAAK,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;CAC/B,CAAC;AAEF,UAAU,0BAA0B;IAClC,MAAM,EAAE,0BAA0B,EAAE,CAAC;CACtC;AAED;;GAEG;AACH,qBAAa,iBAAiB;IAC5B;;OAEG;IACH,MAAM,CAAC,mBAAmB,CAAC,aAAa,EAAE,YAAY,EAAE,GAAG,2BAA2B,EAAE;IAOxF;;OAEG;WACU,gBAAgB,CAC3B,OAAO,EAAE,eAAe,EACxB,iBAAiB,EAAE,MAAM,EACzB,MAAM,EAAE,MAAM,EACd,oBAAoB,EAAE,2BAA2B,EAAE,GAClD,OAAO,CAAC,0BAA0B,CAAC;IAuCtC;;OAEG;IACH,MAAM,CAAC,WAAW,CAAC,QAAQ,EAAE,0BAA0B,GAAG,0BAA0B,EAAE;IAkBtF;;OAEG;WACU,gBAAgB,CAC3B,OAAO,EAAE,eAAe,EACxB,iBAAiB,EAAE,MAAM,EACzB,MAAM,EAAE,MAAM,EACd,aAAa,EAAE,YAAY,EAAE,GAC5B,OAAO,CAAC,0BAA0B,EAAE,CAAC;CAKzC"}
@@ -1,24 +0,0 @@
1
- import { ScopedAction, ScopedActionResponseObject } from '../types/scoped-actions-contracts';
2
- import { GraphIsAllowedDto, GraphIsAllowedResponse } from '../types/graph-api.types';
3
- /**
4
- * Client for handling Graph API authorization operations
5
- */
6
- export declare class GraphApiClient {
7
- /**
8
- * Builds the request body for Graph API calls
9
- */
10
- static buildRequestBody(scopedActions: ScopedAction[]): GraphIsAllowedDto;
11
- /**
12
- * Fetches authorization data from the Graph API
13
- */
14
- static fetchPermissions(internalAuthToken: string, scopedActions: ScopedAction[]): Promise<GraphIsAllowedResponse>;
15
- /**
16
- * Maps Graph API response to the expected format
17
- */
18
- static mapResponse(scopedActions: ScopedAction[], graphResponse: GraphIsAllowedResponse): ScopedActionResponseObject[];
19
- /**
20
- * Performs a complete authorization check using the Graph API
21
- */
22
- static checkPermissions(internalAuthToken: string, scopedActions: ScopedAction[]): Promise<ScopedActionResponseObject[]>;
23
- }
24
- //# sourceMappingURL=graph-api.client.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"graph-api.client.d.ts","sourceRoot":"","sources":["../../../src/clients/graph-api.client.ts"],"names":[],"mappings":"AAEA,OAAO,EACL,YAAY,EACZ,0BAA0B,EAG3B,MAAM,mCAAmC,CAAC;AAG3C,OAAO,EACL,iBAAiB,EACjB,sBAAsB,EAIvB,MAAM,0BAA0B,CAAC;AAMlC;;GAEG;AACH,qBAAa,cAAc;IACzB;;OAEG;IACH,MAAM,CAAC,gBAAgB,CAAC,aAAa,EAAE,YAAY,EAAE,GAAG,iBAAiB;IAyBzE;;OAEG;WACU,gBAAgB,CAC3B,iBAAiB,EAAE,MAAM,EACzB,aAAa,EAAE,YAAY,EAAE,GAC5B,OAAO,CAAC,sBAAsB,CAAC;IA2ClC;;OAEG;IACH,MAAM,CAAC,WAAW,CAChB,aAAa,EAAE,YAAY,EAAE,EAC7B,aAAa,EAAE,sBAAsB,GACpC,0BAA0B,EAAE;IAsC/B;;OAEG;WACU,gBAAgB,CAC3B,iBAAiB,EAAE,MAAM,EACzB,aAAa,EAAE,YAAY,EAAE,GAC5B,OAAO,CAAC,0BAA0B,EAAE,CAAC;CAIzC"}
@@ -1,31 +0,0 @@
1
- import { ScopedAction, ScopedActionResponseObject } from '../types/scoped-actions-contracts';
2
- import { PlatformProfile } from '../attributions-service';
3
- type ScopedActionPlatformPayload = Omit<ScopedAction, 'scope'> & {
4
- scope: Record<string, number>;
5
- };
6
- interface CanActionsInScopesResponse {
7
- result: ScopedActionResponseObject[];
8
- }
9
- /**
10
- * Client for handling Platform API authorization operations
11
- */
12
- export declare class PlatformApiClient {
13
- /**
14
- * Builds the request payload for Platform API calls
15
- */
16
- static buildRequestPayload(scopedActions: ScopedAction[]): ScopedActionPlatformPayload[];
17
- /**
18
- * Fetches authorization data from the Platform API
19
- */
20
- static fetchPermissions(profile: PlatformProfile, internalAuthToken: string, userId: number, scopedActionsPayload: ScopedActionPlatformPayload[]): Promise<CanActionsInScopesResponse>;
21
- /**
22
- * Maps Platform API response to the expected format
23
- */
24
- static mapResponse(response: CanActionsInScopesResponse): ScopedActionResponseObject[];
25
- /**
26
- * Performs a complete authorization check using the Platform API
27
- */
28
- static checkPermissions(profile: PlatformProfile, internalAuthToken: string, userId: number, scopedActions: ScopedAction[]): Promise<ScopedActionResponseObject[]>;
29
- }
30
- export {};
31
- //# sourceMappingURL=platform-api.client.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"platform-api.client.d.ts","sourceRoot":"","sources":["../../../src/clients/platform-api.client.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,YAAY,EAAE,0BAA0B,EAAE,MAAM,mCAAmC,CAAC;AAE7F,OAAO,EAA0B,eAAe,EAAE,MAAM,yBAAyB,CAAC;AAOlF,KAAK,2BAA2B,GAAG,IAAI,CAAC,YAAY,EAAE,OAAO,CAAC,GAAG;IAC/D,KAAK,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;CAC/B,CAAC;AAEF,UAAU,0BAA0B;IAClC,MAAM,EAAE,0BAA0B,EAAE,CAAC;CACtC;AAED;;GAEG;AACH,qBAAa,iBAAiB;IAC5B;;OAEG;IACH,MAAM,CAAC,mBAAmB,CAAC,aAAa,EAAE,YAAY,EAAE,GAAG,2BAA2B,EAAE;IAOxF;;OAEG;WACU,gBAAgB,CAC3B,OAAO,EAAE,eAAe,EACxB,iBAAiB,EAAE,MAAM,EACzB,MAAM,EAAE,MAAM,EACd,oBAAoB,EAAE,2BAA2B,EAAE,GAClD,OAAO,CAAC,0BAA0B,CAAC;IAuCtC;;OAEG;IACH,MAAM,CAAC,WAAW,CAAC,QAAQ,EAAE,0BAA0B,GAAG,0BAA0B,EAAE;IAkBtF;;OAEG;WACU,gBAAgB,CAC3B,OAAO,EAAE,eAAe,EACxB,iBAAiB,EAAE,MAAM,EACzB,MAAM,EAAE,MAAM,EACd,aAAa,EAAE,YAAY,EAAE,GAC5B,OAAO,CAAC,0BAA0B,EAAE,CAAC;CAKzC"}