@axinom/mosaic-id-utils 0.27.0 → 0.28.0-rc.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 +9 -3
- package/dist/{check-permissions → cjs/check-permissions}/check-permissions.d.ts +1 -1
- package/dist/cjs/check-permissions/check-permissions.d.ts.map +1 -0
- package/dist/cjs/check-permissions/check-permissions.js.map +1 -0
- package/dist/cjs/check-permissions/index.d.ts +2 -0
- package/dist/cjs/check-permissions/index.d.ts.map +1 -0
- package/dist/{check-permissions → cjs/check-permissions}/index.js +1 -1
- package/dist/cjs/check-permissions/index.js.map +1 -0
- package/dist/cjs/common/enums.d.ts.map +1 -0
- package/dist/cjs/common/enums.js.map +1 -0
- package/dist/{common → cjs/common}/functions.d.ts +1 -1
- package/dist/cjs/common/functions.d.ts.map +1 -0
- package/dist/{common → cjs/common}/functions.js +14 -14
- package/dist/cjs/common/functions.js.map +1 -0
- package/dist/{common → cjs/common}/types.d.ts +2 -2
- package/dist/cjs/common/types.d.ts.map +1 -0
- package/dist/cjs/common/types.js.map +1 -0
- package/dist/cjs/end-user-authorization/end-user-authorization-config-definition.d.ts.map +1 -0
- package/dist/cjs/end-user-authorization/end-user-authorization-config-definition.js.map +1 -0
- package/dist/cjs/end-user-authorization/index.d.ts +2 -0
- package/dist/cjs/end-user-authorization/index.d.ts.map +1 -0
- package/dist/{end-user-authorization → cjs/end-user-authorization}/index.js +1 -1
- package/dist/cjs/end-user-authorization/index.js.map +1 -0
- package/dist/cjs/index.d.ts +8 -0
- package/dist/cjs/index.d.ts.map +1 -0
- package/dist/{index.js → cjs/index.js} +6 -6
- package/dist/cjs/index.js.map +1 -0
- package/dist/cjs/operation-to-permission-mapping/index.d.ts +4 -0
- package/dist/cjs/operation-to-permission-mapping/index.d.ts.map +1 -0
- package/dist/{operation-to-permission-mapping → cjs/operation-to-permission-mapping}/index.js +3 -3
- package/dist/cjs/operation-to-permission-mapping/index.js.map +1 -0
- package/dist/{operation-to-permission-mapping → cjs/operation-to-permission-mapping}/mappings-helpers.d.ts +1 -1
- package/dist/cjs/operation-to-permission-mapping/mappings-helpers.d.ts.map +1 -0
- package/dist/{operation-to-permission-mapping → cjs/operation-to-permission-mapping}/mappings-helpers.js +3 -5
- package/dist/cjs/operation-to-permission-mapping/mappings-helpers.js.map +1 -0
- package/dist/cjs/operation-to-permission-mapping/permission-definition-interface.d.ts.map +1 -0
- package/dist/cjs/operation-to-permission-mapping/permission-definition-interface.js.map +1 -0
- package/dist/cjs/operation-to-permission-mapping/permission-structure-interface.d.ts.map +1 -0
- package/dist/cjs/operation-to-permission-mapping/permission-structure-interface.js.map +1 -0
- package/dist/cjs/package.json +1 -0
- package/dist/esm/check-permissions/check-permissions.d.ts +16 -0
- package/dist/esm/check-permissions/check-permissions.d.ts.map +1 -0
- package/dist/esm/check-permissions/check-permissions.js +23 -0
- package/dist/esm/check-permissions/check-permissions.js.map +1 -0
- package/dist/esm/check-permissions/index.d.ts +2 -0
- package/dist/esm/check-permissions/index.d.ts.map +1 -0
- package/dist/esm/check-permissions/index.js +2 -0
- package/dist/esm/check-permissions/index.js.map +1 -0
- package/dist/esm/common/enums.d.ts +25 -0
- package/dist/esm/common/enums.d.ts.map +1 -0
- package/dist/esm/common/enums.js +29 -0
- package/dist/esm/common/enums.js.map +1 -0
- package/dist/esm/common/functions.d.ts +10 -0
- package/dist/esm/common/functions.d.ts.map +1 -0
- package/dist/esm/common/functions.js +81 -0
- package/dist/esm/common/functions.js.map +1 -0
- package/dist/esm/common/types.d.ts +72 -0
- package/dist/esm/common/types.d.ts.map +1 -0
- package/dist/esm/common/types.js +17 -0
- package/dist/esm/common/types.js.map +1 -0
- package/dist/esm/end-user-authorization/end-user-authorization-config-definition.d.ts +19 -0
- package/dist/esm/end-user-authorization/end-user-authorization-config-definition.d.ts.map +1 -0
- package/dist/esm/end-user-authorization/end-user-authorization-config-definition.js +2 -0
- package/dist/esm/end-user-authorization/end-user-authorization-config-definition.js.map +1 -0
- package/dist/esm/end-user-authorization/index.d.ts +2 -0
- package/dist/esm/end-user-authorization/index.d.ts.map +1 -0
- package/dist/esm/end-user-authorization/index.js +2 -0
- package/dist/esm/end-user-authorization/index.js.map +1 -0
- package/dist/esm/index.d.ts +8 -0
- package/dist/esm/index.d.ts.map +1 -0
- package/dist/esm/index.js +7 -0
- package/dist/esm/index.js.map +1 -0
- package/dist/esm/operation-to-permission-mapping/index.d.ts +4 -0
- package/dist/esm/operation-to-permission-mapping/index.d.ts.map +1 -0
- package/dist/esm/operation-to-permission-mapping/index.js +4 -0
- package/dist/esm/operation-to-permission-mapping/index.js.map +1 -0
- package/dist/esm/operation-to-permission-mapping/mappings-helpers.d.ts +24 -0
- package/dist/esm/operation-to-permission-mapping/mappings-helpers.d.ts.map +1 -0
- package/dist/esm/operation-to-permission-mapping/mappings-helpers.js +38 -0
- package/dist/esm/operation-to-permission-mapping/mappings-helpers.js.map +1 -0
- package/dist/esm/operation-to-permission-mapping/permission-definition-interface.d.ts +68 -0
- package/dist/esm/operation-to-permission-mapping/permission-definition-interface.d.ts.map +1 -0
- package/dist/esm/operation-to-permission-mapping/permission-definition-interface.js +2 -0
- package/dist/esm/operation-to-permission-mapping/permission-definition-interface.js.map +1 -0
- package/dist/esm/operation-to-permission-mapping/permission-structure-interface.d.ts +10 -0
- package/dist/esm/operation-to-permission-mapping/permission-structure-interface.d.ts.map +1 -0
- package/dist/esm/operation-to-permission-mapping/permission-structure-interface.js +2 -0
- package/dist/esm/operation-to-permission-mapping/permission-structure-interface.js.map +1 -0
- package/dist/esm/package.json +1 -0
- package/package.json +17 -7
- package/src/check-permissions/check-permissions.spec.ts +2 -2
- package/src/check-permissions/check-permissions.ts +1 -1
- package/src/check-permissions/index.ts +1 -1
- package/src/common/functions.ts +1 -1
- package/src/common/types.ts +2 -2
- package/src/end-user-authorization/index.ts +1 -1
- package/src/index.ts +7 -7
- package/src/operation-to-permission-mapping/index.ts +3 -3
- package/src/operation-to-permission-mapping/mappings-helpers.spec.ts +2 -2
- package/src/operation-to-permission-mapping/mappings-helpers.ts +1 -1
- package/dist/check-permissions/check-permissions.d.ts.map +0 -1
- package/dist/check-permissions/check-permissions.js.map +0 -1
- package/dist/check-permissions/index.d.ts +0 -2
- package/dist/check-permissions/index.d.ts.map +0 -1
- package/dist/check-permissions/index.js.map +0 -1
- package/dist/common/enums.d.ts.map +0 -1
- package/dist/common/enums.js.map +0 -1
- package/dist/common/functions.d.ts.map +0 -1
- package/dist/common/functions.js.map +0 -1
- package/dist/common/types.d.ts.map +0 -1
- package/dist/common/types.js.map +0 -1
- package/dist/end-user-authorization/end-user-authorization-config-definition.d.ts.map +0 -1
- package/dist/end-user-authorization/end-user-authorization-config-definition.js.map +0 -1
- package/dist/end-user-authorization/index.d.ts +0 -2
- package/dist/end-user-authorization/index.d.ts.map +0 -1
- package/dist/end-user-authorization/index.js.map +0 -1
- package/dist/index.d.ts +0 -8
- package/dist/index.d.ts.map +0 -1
- package/dist/index.js.map +0 -1
- package/dist/operation-to-permission-mapping/index.d.ts +0 -4
- package/dist/operation-to-permission-mapping/index.d.ts.map +0 -1
- package/dist/operation-to-permission-mapping/index.js.map +0 -1
- package/dist/operation-to-permission-mapping/mappings-helpers.d.ts.map +0 -1
- package/dist/operation-to-permission-mapping/mappings-helpers.js.map +0 -1
- package/dist/operation-to-permission-mapping/permission-definition-interface.d.ts.map +0 -1
- package/dist/operation-to-permission-mapping/permission-definition-interface.js.map +0 -1
- package/dist/operation-to-permission-mapping/permission-structure-interface.d.ts.map +0 -1
- package/dist/operation-to-permission-mapping/permission-structure-interface.js.map +0 -1
- /package/dist/{check-permissions → cjs/check-permissions}/check-permissions.js +0 -0
- /package/dist/{common → cjs/common}/enums.d.ts +0 -0
- /package/dist/{common → cjs/common}/enums.js +0 -0
- /package/dist/{common → cjs/common}/types.js +0 -0
- /package/dist/{end-user-authorization → cjs/end-user-authorization}/end-user-authorization-config-definition.d.ts +0 -0
- /package/dist/{end-user-authorization → cjs/end-user-authorization}/end-user-authorization-config-definition.js +0 -0
- /package/dist/{operation-to-permission-mapping → cjs/operation-to-permission-mapping}/permission-definition-interface.d.ts +0 -0
- /package/dist/{operation-to-permission-mapping → cjs/operation-to-permission-mapping}/permission-definition-interface.js +0 -0
- /package/dist/{operation-to-permission-mapping → cjs/operation-to-permission-mapping}/permission-structure-interface.d.ts +0 -0
- /package/dist/{operation-to-permission-mapping → cjs/operation-to-permission-mapping}/permission-structure-interface.js +0 -0
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
import type { User } from '@axinom/mosaic-core';
|
|
2
|
+
import { ConfigStatusResponseCode, IdentityProvider, LogoutResponseCode, TokenResponseCode } from './enums.js';
|
|
3
|
+
export interface TokenResponse {
|
|
4
|
+
code: TokenResponseCode;
|
|
5
|
+
message?: string;
|
|
6
|
+
user?: User;
|
|
7
|
+
}
|
|
8
|
+
export interface LogoutResponse {
|
|
9
|
+
code: LogoutResponseCode;
|
|
10
|
+
message?: string;
|
|
11
|
+
idpLogoutUrl?: string;
|
|
12
|
+
}
|
|
13
|
+
interface IdpConfigBase {
|
|
14
|
+
idProvider: IdentityProvider;
|
|
15
|
+
idProviderId: string;
|
|
16
|
+
enabled: boolean;
|
|
17
|
+
customBrandingConfig: IdpCustomBrandingConfig;
|
|
18
|
+
}
|
|
19
|
+
export interface IdpCustomBrandingConfig {
|
|
20
|
+
displayName: string | undefined;
|
|
21
|
+
idpImageUrl: string | undefined;
|
|
22
|
+
}
|
|
23
|
+
export interface AxAuthIdpConfig extends IdpConfigBase {
|
|
24
|
+
idProvider: IdentityProvider.AX_AUTH;
|
|
25
|
+
clientId: string;
|
|
26
|
+
}
|
|
27
|
+
export interface GoogleIdpConfig extends IdpConfigBase {
|
|
28
|
+
idProvider: IdentityProvider.GOOGLE;
|
|
29
|
+
}
|
|
30
|
+
export interface AzureIdpConfig extends IdpConfigBase {
|
|
31
|
+
idProvider: IdentityProvider.AZURE_AD;
|
|
32
|
+
}
|
|
33
|
+
export interface AxinomIdpConfig extends IdpConfigBase {
|
|
34
|
+
idProvider: IdentityProvider.AXINOM;
|
|
35
|
+
}
|
|
36
|
+
export interface CustomIdpConfig extends IdpConfigBase {
|
|
37
|
+
idProvider: IdentityProvider.CUSTOM;
|
|
38
|
+
}
|
|
39
|
+
export interface ConfigStatusResponse {
|
|
40
|
+
code: ConfigStatusResponseCode;
|
|
41
|
+
tenantId: string;
|
|
42
|
+
environmentId: string;
|
|
43
|
+
enabledIdentityProviders: (AxAuthIdpConfig | GoogleIdpConfig | AzureIdpConfig | AxinomIdpConfig | CustomIdpConfig)[];
|
|
44
|
+
}
|
|
45
|
+
export interface IdentityServiceConfig {
|
|
46
|
+
idServiceAuthBaseUrl: string;
|
|
47
|
+
tenantId: string;
|
|
48
|
+
environmentId: string;
|
|
49
|
+
}
|
|
50
|
+
export interface TokenResult {
|
|
51
|
+
accessToken: string;
|
|
52
|
+
expiresInSeconds: number;
|
|
53
|
+
tokenType: string;
|
|
54
|
+
}
|
|
55
|
+
export declare const ManagedServiceId: {
|
|
56
|
+
readonly ID_SERVICE: "ax-id-service";
|
|
57
|
+
readonly MICRO_FRONTEND_SERVICE: "ax-micro-frontend-service";
|
|
58
|
+
readonly PORTAL_SERVICE: "ax-portal-service";
|
|
59
|
+
readonly AXAUTH_SERVICE: "ax-auth-service";
|
|
60
|
+
readonly IMAGE_SERVICE: "ax-image-service";
|
|
61
|
+
readonly VIDEO_SERVICE: "ax-video-service";
|
|
62
|
+
readonly USER_SERVICE: "ax-user-service";
|
|
63
|
+
readonly PERSONALIZATION_SERVICE: "ax-personalization-service";
|
|
64
|
+
readonly HOSTING_SERVICE: "ax-hosting-service";
|
|
65
|
+
readonly LOCALIZATION_SERVICE: "ax-localization-service";
|
|
66
|
+
readonly KEY_SERVICE: "ax-key-service";
|
|
67
|
+
readonly ENTITLEMENT_SERVICE: "ax-entitlement-service";
|
|
68
|
+
readonly DRM_SERVICE: "ax-drm-service";
|
|
69
|
+
};
|
|
70
|
+
export type ManagedServiceId = (typeof ManagedServiceId)[keyof typeof ManagedServiceId];
|
|
71
|
+
export {};
|
|
72
|
+
//# sourceMappingURL=types.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/common/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,qBAAqB,CAAC;AAChD,OAAO,EACL,wBAAwB,EACxB,gBAAgB,EAChB,kBAAkB,EAClB,iBAAiB,EAClB,MAAM,YAAY,CAAC;AAGpB,MAAM,WAAW,aAAa;IAC5B,IAAI,EAAE,iBAAiB,CAAC;IACxB,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,IAAI,CAAC,EAAE,IAAI,CAAC;CACb;AAGD,MAAM,WAAW,cAAc;IAC7B,IAAI,EAAE,kBAAkB,CAAC;IACzB,OAAO,CAAC,EAAE,MAAM,CAAC;IAGjB,YAAY,CAAC,EAAE,MAAM,CAAC;CACvB;AAED,UAAU,aAAa;IACrB,UAAU,EAAE,gBAAgB,CAAC;IAC7B,YAAY,EAAE,MAAM,CAAC;IACrB,OAAO,EAAE,OAAO,CAAC;IACjB,oBAAoB,EAAE,uBAAuB,CAAC;CAC/C;AAED,MAAM,WAAW,uBAAuB;IACtC,WAAW,EAAE,MAAM,GAAG,SAAS,CAAC;IAChC,WAAW,EAAE,MAAM,GAAG,SAAS,CAAC;CACjC;AAED,MAAM,WAAW,eAAgB,SAAQ,aAAa;IACpD,UAAU,EAAE,gBAAgB,CAAC,OAAO,CAAC;IACrC,QAAQ,EAAE,MAAM,CAAC;CAClB;AAED,MAAM,WAAW,eAAgB,SAAQ,aAAa;IACpD,UAAU,EAAE,gBAAgB,CAAC,MAAM,CAAC;CACrC;AAED,MAAM,WAAW,cAAe,SAAQ,aAAa;IACnD,UAAU,EAAE,gBAAgB,CAAC,QAAQ,CAAC;CACvC;AAED,MAAM,WAAW,eAAgB,SAAQ,aAAa;IACpD,UAAU,EAAE,gBAAgB,CAAC,MAAM,CAAC;CACrC;AAED,MAAM,WAAW,eAAgB,SAAQ,aAAa;IACpD,UAAU,EAAE,gBAAgB,CAAC,MAAM,CAAC;CACrC;AAGD,MAAM,WAAW,oBAAoB;IACnC,IAAI,EAAE,wBAAwB,CAAC;IAC/B,QAAQ,EAAE,MAAM,CAAC;IACjB,aAAa,EAAE,MAAM,CAAC;IACtB,wBAAwB,EAAE,CACtB,eAAe,GACf,eAAe,GACf,cAAc,GACd,eAAe,GACf,eAAe,CAClB,EAAE,CAAC;CACL;AAGD,MAAM,WAAW,qBAAqB;IACpC,oBAAoB,EAAE,MAAM,CAAC;IAC7B,QAAQ,EAAE,MAAM,CAAC;IACjB,aAAa,EAAE,MAAM,CAAC;CACvB;AAGD,MAAM,WAAW,WAAW;IAC1B,WAAW,EAAE,MAAM,CAAC;IACpB,gBAAgB,EAAE,MAAM,CAAC;IACzB,SAAS,EAAE,MAAM,CAAC;CACnB;AAED,eAAO,MAAM,gBAAgB;;;;;;;;;;;;;;CAcnB,CAAC;AAEX,MAAM,MAAM,gBAAgB,GAC1B,CAAC,OAAO,gBAAgB,CAAC,CAAC,MAAM,OAAO,gBAAgB,CAAC,CAAC"}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { ConfigStatusResponseCode, IdentityProvider, LogoutResponseCode, TokenResponseCode, } from './enums.js';
|
|
2
|
+
export const ManagedServiceId = {
|
|
3
|
+
ID_SERVICE: 'ax-id-service',
|
|
4
|
+
MICRO_FRONTEND_SERVICE: 'ax-micro-frontend-service',
|
|
5
|
+
PORTAL_SERVICE: 'ax-portal-service',
|
|
6
|
+
AXAUTH_SERVICE: 'ax-auth-service',
|
|
7
|
+
IMAGE_SERVICE: 'ax-image-service',
|
|
8
|
+
VIDEO_SERVICE: 'ax-video-service',
|
|
9
|
+
USER_SERVICE: 'ax-user-service',
|
|
10
|
+
PERSONALIZATION_SERVICE: 'ax-personalization-service',
|
|
11
|
+
HOSTING_SERVICE: 'ax-hosting-service',
|
|
12
|
+
LOCALIZATION_SERVICE: 'ax-localization-service',
|
|
13
|
+
KEY_SERVICE: 'ax-key-service',
|
|
14
|
+
ENTITLEMENT_SERVICE: 'ax-entitlement-service',
|
|
15
|
+
DRM_SERVICE: 'ax-drm-service',
|
|
16
|
+
};
|
|
17
|
+
//# sourceMappingURL=types.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.js","sourceRoot":"","sources":["../../../src/common/types.ts"],"names":[],"mappings":"AACA,OAAO,EACL,wBAAwB,EACxB,gBAAgB,EAChB,kBAAkB,EAClB,iBAAiB,GAClB,MAAM,YAAY,CAAC;AA+EpB,MAAM,CAAC,MAAM,gBAAgB,GAAG;IAC9B,UAAU,EAAE,eAAe;IAC3B,sBAAsB,EAAE,2BAA2B;IACnD,cAAc,EAAE,mBAAmB;IACnC,cAAc,EAAE,iBAAiB;IACjC,aAAa,EAAE,kBAAkB;IACjC,aAAa,EAAE,kBAAkB;IACjC,YAAY,EAAE,iBAAiB;IAC/B,uBAAuB,EAAE,4BAA4B;IACrD,eAAe,EAAE,oBAAoB;IACrC,oBAAoB,EAAE,yBAAyB;IAC/C,WAAW,EAAE,gBAAgB;IAC7B,mBAAmB,EAAE,wBAAwB;IAC7C,WAAW,EAAE,gBAAgB;CACrB,CAAC"}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Defines configuration related to End User Authorization.
|
|
3
|
+
* This must be passed to Postgraphile Build Options for all End User facing APIs.
|
|
4
|
+
*/
|
|
5
|
+
export interface EndUserAuthorizationConfig {
|
|
6
|
+
/**
|
|
7
|
+
* The list of anonymous GraphQL operations.
|
|
8
|
+
* These operations can be consumed without being authenticated.
|
|
9
|
+
*/
|
|
10
|
+
anonymousGqlOperations: string[];
|
|
11
|
+
/**
|
|
12
|
+
* The list of operations that can be consumed through a End User Application token.
|
|
13
|
+
*
|
|
14
|
+
* Application-tokens are by default not authorized to invoke any end-user API operation,
|
|
15
|
+
* and the required operations must be explicitly whitelisted using this option.
|
|
16
|
+
*/
|
|
17
|
+
applicationTokenAllowedGqlOperations: string[];
|
|
18
|
+
}
|
|
19
|
+
//# sourceMappingURL=end-user-authorization-config-definition.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"end-user-authorization-config-definition.d.ts","sourceRoot":"","sources":["../../../src/end-user-authorization/end-user-authorization-config-definition.ts"],"names":[],"mappings":"AAAA;;;GAGG;AACH,MAAM,WAAW,0BAA0B;IACzC;;;OAGG;IACH,sBAAsB,EAAE,MAAM,EAAE,CAAC;IACjC;;;;;OAKG;IACH,oCAAoC,EAAE,MAAM,EAAE,CAAC;CAChD"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"end-user-authorization-config-definition.js","sourceRoot":"","sources":["../../../src/end-user-authorization/end-user-authorization-config-definition.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/end-user-authorization/index.ts"],"names":[],"mappings":"AAAA,cAAc,+CAA+C,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/end-user-authorization/index.ts"],"names":[],"mappings":"AAAA,cAAc,+CAA+C,CAAC"}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
export type { User, UserToken } from '@axinom/mosaic-core';
|
|
2
|
+
export * from './check-permissions/index.js';
|
|
3
|
+
export * from './common/enums.js';
|
|
4
|
+
export * from './common/functions.js';
|
|
5
|
+
export * from './common/types.js';
|
|
6
|
+
export * from './end-user-authorization/index.js';
|
|
7
|
+
export * from './operation-to-permission-mapping/index.js';
|
|
8
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,YAAY,EAAE,IAAI,EAAE,SAAS,EAAE,MAAM,qBAAqB,CAAC;AAC3D,cAAc,8BAA8B,CAAC;AAC7C,cAAc,mBAAmB,CAAC;AAClC,cAAc,uBAAuB,CAAC;AACtC,cAAc,mBAAmB,CAAC;AAClC,cAAc,mCAAmC,CAAC;AAClD,cAAc,4CAA4C,CAAC"}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
export * from './check-permissions/index.js';
|
|
2
|
+
export * from './common/enums.js';
|
|
3
|
+
export * from './common/functions.js';
|
|
4
|
+
export * from './common/types.js';
|
|
5
|
+
export * from './end-user-authorization/index.js';
|
|
6
|
+
export * from './operation-to-permission-mapping/index.js';
|
|
7
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AACA,cAAc,8BAA8B,CAAC;AAC7C,cAAc,mBAAmB,CAAC;AAClC,cAAc,uBAAuB,CAAC;AACtC,cAAc,mBAAmB,CAAC;AAClC,cAAc,mCAAmC,CAAC;AAClD,cAAc,4CAA4C,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/operation-to-permission-mapping/index.ts"],"names":[],"mappings":"AAAA,cAAc,uBAAuB,CAAC;AACtC,cAAc,sCAAsC,CAAC;AACrD,cAAc,qCAAqC,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/operation-to-permission-mapping/index.ts"],"names":[],"mappings":"AAAA,cAAc,uBAAuB,CAAC;AACtC,cAAc,sCAAsC,CAAC;AACrD,cAAc,qCAAqC,CAAC"}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import type { PermissionDefinition } from './permission-definition-interface.js';
|
|
2
|
+
/**
|
|
3
|
+
*
|
|
4
|
+
* @param operation The GQL operation name which will be used to find associated Permissions for
|
|
5
|
+
* @param permissionDefinition An object of type PermissionDefinition
|
|
6
|
+
* @returns An array of permission-keys (strings) which contain the given operation
|
|
7
|
+
*/
|
|
8
|
+
export declare const getPermissionsForOperation: (operation: string, permissionDefinition: PermissionDefinition) => string[];
|
|
9
|
+
/**
|
|
10
|
+
* The function reads and returns all mapped operations in the permission definition object except which are marked as IGNORE.
|
|
11
|
+
* @param permissionDefinition An object of type PermissionDefinition
|
|
12
|
+
*/
|
|
13
|
+
export declare const getMappedOperations: (permissionDefinition: PermissionDefinition) => string[];
|
|
14
|
+
/**
|
|
15
|
+
* The function reads and returns operations in the permission definition object which are marked as IGNORE.
|
|
16
|
+
* @param permissionDefinition An object of type PermissionDefinition
|
|
17
|
+
*/
|
|
18
|
+
export declare const getIgnoredOperations: (permissionDefinition: PermissionDefinition) => string[] | undefined;
|
|
19
|
+
/**
|
|
20
|
+
* Returns all permission keys.
|
|
21
|
+
* @param permissionDefinition An object of type PermissionDefinition
|
|
22
|
+
*/
|
|
23
|
+
export declare const getPermissionsFromDefinition: (permissionDefinition: PermissionDefinition) => string[];
|
|
24
|
+
//# sourceMappingURL=mappings-helpers.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"mappings-helpers.d.ts","sourceRoot":"","sources":["../../../src/operation-to-permission-mapping/mappings-helpers.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,sCAAsC,CAAC;AAEjF;;;;;GAKG;AACH,eAAO,MAAM,0BAA0B,GACrC,WAAW,MAAM,EACjB,sBAAsB,oBAAoB,KACzC,MAAM,EAIR,CAAC;AAEF;;;GAGG;AACH,eAAO,MAAM,mBAAmB,GAC9B,sBAAsB,oBAAoB,KACzC,MAAM,EAgBR,CAAC;AAEF;;;GAGG;AACH,eAAO,MAAM,oBAAoB,GAC/B,sBAAsB,oBAAoB,KACzC,MAAM,EAAE,GAAG,SAEb,CAAC;AAEF;;;GAGG;AACH,eAAO,MAAM,4BAA4B,GACvC,sBAAsB,oBAAoB,KACzC,MAAM,EAER,CAAC"}
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
/**
|
|
2
|
+
*
|
|
3
|
+
* @param operation The GQL operation name which will be used to find associated Permissions for
|
|
4
|
+
* @param permissionDefinition An object of type PermissionDefinition
|
|
5
|
+
* @returns An array of permission-keys (strings) which contain the given operation
|
|
6
|
+
*/
|
|
7
|
+
export const getPermissionsForOperation = (operation, permissionDefinition) => {
|
|
8
|
+
return permissionDefinition.permissions
|
|
9
|
+
.filter((permission) => permission.gqlOperations?.includes(operation))
|
|
10
|
+
.map((permission) => permission.key);
|
|
11
|
+
};
|
|
12
|
+
/**
|
|
13
|
+
* The function reads and returns all mapped operations in the permission definition object except which are marked as IGNORE.
|
|
14
|
+
* @param permissionDefinition An object of type PermissionDefinition
|
|
15
|
+
*/
|
|
16
|
+
export const getMappedOperations = (permissionDefinition) => {
|
|
17
|
+
const otherOperations = permissionDefinition.permissions.map((permission) => permission.gqlOperations);
|
|
18
|
+
const anonymousOperations = permissionDefinition.gqlOptions?.anonymousGqlOperations ||
|
|
19
|
+
new Array();
|
|
20
|
+
return [
|
|
21
|
+
...new Set(Array().concat(...otherOperations.filter(Array.isArray), anonymousOperations)),
|
|
22
|
+
];
|
|
23
|
+
};
|
|
24
|
+
/**
|
|
25
|
+
* The function reads and returns operations in the permission definition object which are marked as IGNORE.
|
|
26
|
+
* @param permissionDefinition An object of type PermissionDefinition
|
|
27
|
+
*/
|
|
28
|
+
export const getIgnoredOperations = (permissionDefinition) => {
|
|
29
|
+
return permissionDefinition.gqlOptions?.ignoredGqlOperations;
|
|
30
|
+
};
|
|
31
|
+
/**
|
|
32
|
+
* Returns all permission keys.
|
|
33
|
+
* @param permissionDefinition An object of type PermissionDefinition
|
|
34
|
+
*/
|
|
35
|
+
export const getPermissionsFromDefinition = (permissionDefinition) => {
|
|
36
|
+
return permissionDefinition.permissions.map((permission) => permission.key);
|
|
37
|
+
};
|
|
38
|
+
//# sourceMappingURL=mappings-helpers.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"mappings-helpers.js","sourceRoot":"","sources":["../../../src/operation-to-permission-mapping/mappings-helpers.ts"],"names":[],"mappings":"AAEA;;;;;GAKG;AACH,MAAM,CAAC,MAAM,0BAA0B,GAAG,CACxC,SAAiB,EACjB,oBAA0C,EAChC,EAAE;IACZ,OAAO,oBAAoB,CAAC,WAAW;SACpC,MAAM,CAAC,CAAC,UAAU,EAAE,EAAE,CAAC,UAAU,CAAC,aAAa,EAAE,QAAQ,CAAC,SAAS,CAAC,CAAC;SACrE,GAAG,CAAC,CAAC,UAAU,EAAE,EAAE,CAAC,UAAU,CAAC,GAAG,CAAC,CAAC;AACzC,CAAC,CAAC;AAEF;;;GAGG;AACH,MAAM,CAAC,MAAM,mBAAmB,GAAG,CACjC,oBAA0C,EAChC,EAAE;IACZ,MAAM,eAAe,GAAG,oBAAoB,CAAC,WAAW,CAAC,GAAG,CAC1D,CAAC,UAAU,EAAE,EAAE,CAAC,UAAU,CAAC,aAAa,CACzC,CAAC;IACF,MAAM,mBAAmB,GACvB,oBAAoB,CAAC,UAAU,EAAE,sBAAsB;QACvD,IAAI,KAAK,EAAU,CAAC;IAEtB,OAAO;QACL,GAAG,IAAI,GAAG,CACR,KAAK,EAAU,CAAC,MAAM,CACpB,GAAG,eAAe,CAAC,MAAM,CAAC,KAAK,CAAC,OAAO,CAAC,EACxC,mBAAmB,CACpB,CACF;KACF,CAAC;AACJ,CAAC,CAAC;AAEF;;;GAGG;AACH,MAAM,CAAC,MAAM,oBAAoB,GAAG,CAClC,oBAA0C,EACpB,EAAE;IACxB,OAAO,oBAAoB,CAAC,UAAU,EAAE,oBAAoB,CAAC;AAC/D,CAAC,CAAC;AAEF;;;GAGG;AACH,MAAM,CAAC,MAAM,4BAA4B,GAAG,CAC1C,oBAA0C,EAChC,EAAE;IACZ,OAAO,oBAAoB,CAAC,WAAW,CAAC,GAAG,CAAC,CAAC,UAAU,EAAE,EAAE,CAAC,UAAU,CAAC,GAAG,CAAC,CAAC;AAC9E,CAAC,CAAC"}
|
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* This interface is define the structure of a permission array of PermissionDefinition.
|
|
3
|
+
*
|
|
4
|
+
*/
|
|
5
|
+
export interface Permission {
|
|
6
|
+
/**
|
|
7
|
+
* Key of the permission.
|
|
8
|
+
* @property
|
|
9
|
+
*/
|
|
10
|
+
key: string;
|
|
11
|
+
/**
|
|
12
|
+
* Title of the permission.
|
|
13
|
+
* @property
|
|
14
|
+
*/
|
|
15
|
+
title: string;
|
|
16
|
+
/**
|
|
17
|
+
* True for only permission is used for manage services.
|
|
18
|
+
* @property
|
|
19
|
+
*/
|
|
20
|
+
usedByManagedServiceOnly?: boolean;
|
|
21
|
+
/**
|
|
22
|
+
* True for only permission is used for development.
|
|
23
|
+
* @property
|
|
24
|
+
*/
|
|
25
|
+
usedForDevelopment?: boolean;
|
|
26
|
+
/**
|
|
27
|
+
* Defines the intended assignment scope metadata for the permission.
|
|
28
|
+
* 'ANY' (default) - available to general permission-assignment flows.
|
|
29
|
+
* 'SERVICE' - intended for service-account usage and may be hidden from user-role UI flows.
|
|
30
|
+
* Note: this flag does not by itself enforce server-side assignment restrictions; any such
|
|
31
|
+
* validation must be implemented by the consumer of this definition.
|
|
32
|
+
* @property
|
|
33
|
+
*/
|
|
34
|
+
usageScope?: 'ANY' | 'SERVICE';
|
|
35
|
+
/**
|
|
36
|
+
* List of gqlOperations.
|
|
37
|
+
* @property
|
|
38
|
+
*/
|
|
39
|
+
gqlOperations?: readonly string[];
|
|
40
|
+
}
|
|
41
|
+
/**
|
|
42
|
+
* This interface is define the structure of a PermissionDefinition array for permission structure V2..
|
|
43
|
+
*
|
|
44
|
+
*/
|
|
45
|
+
export interface PermissionDefinition {
|
|
46
|
+
gqlOptions?: {
|
|
47
|
+
/**
|
|
48
|
+
* Any operations defined under ANONYMOUS will be ignored while checking for Authorization.
|
|
49
|
+
* @property
|
|
50
|
+
*/
|
|
51
|
+
anonymousGqlOperations?: string[];
|
|
52
|
+
/**
|
|
53
|
+
* Any operations defined under IGNORE will not be logged as disabled operations
|
|
54
|
+
* as they are known to be intentionally removed.
|
|
55
|
+
* @property
|
|
56
|
+
*/
|
|
57
|
+
ignoredGqlOperations?: string[];
|
|
58
|
+
};
|
|
59
|
+
/**
|
|
60
|
+
* Map of service specific permissions.
|
|
61
|
+
* This is a permission array.
|
|
62
|
+
* This is specially useful in authorizing REST APIs where a route could be authorized if an access-token
|
|
63
|
+
* contains a specific permission, but there is no real need for mapping any GraphQL operations to that permission.
|
|
64
|
+
* @property
|
|
65
|
+
*/
|
|
66
|
+
permissions: readonly Permission[];
|
|
67
|
+
}
|
|
68
|
+
//# sourceMappingURL=permission-definition-interface.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"permission-definition-interface.d.ts","sourceRoot":"","sources":["../../../src/operation-to-permission-mapping/permission-definition-interface.ts"],"names":[],"mappings":"AAAA;;;GAGG;AACH,MAAM,WAAW,UAAU;IACzB;;;OAGG;IACH,GAAG,EAAE,MAAM,CAAC;IACZ;;;OAGG;IACH,KAAK,EAAE,MAAM,CAAC;IACd;;;OAGG;IACH,wBAAwB,CAAC,EAAE,OAAO,CAAC;IACnC;;;OAGG;IACH,kBAAkB,CAAC,EAAE,OAAO,CAAC;IAC7B;;;;;;;OAOG;IACH,UAAU,CAAC,EAAE,KAAK,GAAG,SAAS,CAAC;IAC/B;;;OAGG;IACH,aAAa,CAAC,EAAE,SAAS,MAAM,EAAE,CAAC;CACnC;AAED;;;GAGG;AACH,MAAM,WAAW,oBAAoB;IACnC,UAAU,CAAC,EAAE;QACX;;;WAGG;QACH,sBAAsB,CAAC,EAAE,MAAM,EAAE,CAAC;QAClC;;;;WAIG;QACH,oBAAoB,CAAC,EAAE,MAAM,EAAE,CAAC;KACjC,CAAC;IAEF;;;;;;OAMG;IACH,WAAW,EAAE,SAAS,UAAU,EAAE,CAAC;CACpC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"permission-definition-interface.js","sourceRoot":"","sources":["../../../src/operation-to-permission-mapping/permission-definition-interface.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* This interface represents the Permission Structure that's used to assign permissions to service accounts.
|
|
3
|
+
*
|
|
4
|
+
* @interface
|
|
5
|
+
*/
|
|
6
|
+
export interface PermissionStructure {
|
|
7
|
+
serviceId: string;
|
|
8
|
+
permissions: string[];
|
|
9
|
+
}
|
|
10
|
+
//# sourceMappingURL=permission-structure-interface.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"permission-structure-interface.d.ts","sourceRoot":"","sources":["../../../src/operation-to-permission-mapping/permission-structure-interface.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AACH,MAAM,WAAW,mBAAmB;IAClC,SAAS,EAAE,MAAM,CAAC;IAClB,WAAW,EAAE,MAAM,EAAE,CAAC;CACvB"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"permission-structure-interface.js","sourceRoot":"","sources":["../../../src/operation-to-permission-mapping/permission-structure-interface.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"type":"module"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@axinom/mosaic-id-utils",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.28.0-rc.3",
|
|
4
4
|
"description": "Shared types used by id-service for integration clients",
|
|
5
5
|
"author": "Axinom",
|
|
6
6
|
"license": "PROPRIETARY",
|
|
@@ -13,21 +13,31 @@
|
|
|
13
13
|
"dist",
|
|
14
14
|
"src"
|
|
15
15
|
],
|
|
16
|
-
"
|
|
17
|
-
|
|
16
|
+
"exports": {
|
|
17
|
+
".": {
|
|
18
|
+
"types": "./dist/cjs/index.d.ts",
|
|
19
|
+
"import": "./dist/esm/index.js",
|
|
20
|
+
"require": "./dist/cjs/index.js"
|
|
21
|
+
}
|
|
22
|
+
},
|
|
23
|
+
"main": "dist/cjs/index.js",
|
|
24
|
+
"module": "dist/esm/index.js",
|
|
25
|
+
"types": "dist/cjs/index.d.ts",
|
|
18
26
|
"scripts": {
|
|
19
27
|
"clean": "rimraf dist",
|
|
20
|
-
"build": "yarn clean && tsc",
|
|
28
|
+
"build": "yarn clean && tsc --project tsconfig.build.json && tsc --project tsconfig.build.esm.json && node ../../../scripts/write-esm-markers.js",
|
|
21
29
|
"build:ci": "yarn workspaces focus && yarn build",
|
|
22
|
-
"dev": "tsc -w",
|
|
30
|
+
"dev": "tsc -w --project tsconfig.build.json",
|
|
23
31
|
"test": "vitest run --silent --passWithNoTests",
|
|
24
32
|
"test:watch": "vitest watch --silent --passWithNoTests",
|
|
25
33
|
"test:cov": "vitest run --coverage --silent",
|
|
26
34
|
"test:ci": "vitest run --reporter=default --reporter=junit --coverage --coverage.reporter=cobertura --coverage.reporter=html",
|
|
35
|
+
"ts:validate": "tsc && yarn build && yarn check:esm-interop",
|
|
36
|
+
"check:esm-interop": "node scripts/check-esm-interop.mjs",
|
|
27
37
|
"lint": "eslint . --ext .ts,.tsx,.js --color --cache"
|
|
28
38
|
},
|
|
29
39
|
"dependencies": {
|
|
30
|
-
"@axinom/mosaic-core": "^0.4.
|
|
40
|
+
"@axinom/mosaic-core": "^0.4.34-rc.3"
|
|
31
41
|
},
|
|
32
42
|
"devDependencies": {
|
|
33
43
|
"@types/node": "^22.0.0",
|
|
@@ -38,5 +48,5 @@
|
|
|
38
48
|
"publishConfig": {
|
|
39
49
|
"access": "public"
|
|
40
50
|
},
|
|
41
|
-
"gitHead": "
|
|
51
|
+
"gitHead": "9c7831acd6fcced9a09f97ffd4c9d67ee1b3b640"
|
|
42
52
|
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { UserToken } from '@axinom/mosaic-core';
|
|
1
|
+
import type { UserToken } from '@axinom/mosaic-core';
|
|
2
2
|
import { describe, expect, it } from 'vitest';
|
|
3
|
-
import { requiredPermissionsExists } from './check-permissions';
|
|
3
|
+
import { requiredPermissionsExists } from './check-permissions.js';
|
|
4
4
|
|
|
5
5
|
type UserPermissions = UserToken['permissions'];
|
|
6
6
|
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export * from './check-permissions';
|
|
1
|
+
export * from './check-permissions.js';
|
package/src/common/functions.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
// Custom path join code to work both on node & browser
|
|
2
2
|
|
|
3
|
-
import { ManagedServiceId } from './types';
|
|
3
|
+
import { ManagedServiceId } from './types.js';
|
|
4
4
|
|
|
5
5
|
// Ref: https://stackoverflow.com/questions/29855098/is-there-a-built-in-javascript-function-similar-to-os-path-join
|
|
6
6
|
const joinPath = (...paths: string[]): string => {
|
package/src/common/types.ts
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import { User } from '@axinom/mosaic-core';
|
|
1
|
+
import type { User } from '@axinom/mosaic-core';
|
|
2
2
|
import {
|
|
3
3
|
ConfigStatusResponseCode,
|
|
4
4
|
IdentityProvider,
|
|
5
5
|
LogoutResponseCode,
|
|
6
6
|
TokenResponseCode,
|
|
7
|
-
} from './enums';
|
|
7
|
+
} from './enums.js';
|
|
8
8
|
|
|
9
9
|
// Used by id-link to get new access token
|
|
10
10
|
export interface TokenResponse {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export * from './end-user-authorization-config-definition';
|
|
1
|
+
export * from './end-user-authorization-config-definition.js';
|
package/src/index.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
export { User, UserToken } from '@axinom/mosaic-core';
|
|
2
|
-
export * from './check-permissions';
|
|
3
|
-
export * from './common/enums';
|
|
4
|
-
export * from './common/functions';
|
|
5
|
-
export * from './common/types';
|
|
6
|
-
export * from './end-user-authorization';
|
|
7
|
-
export * from './operation-to-permission-mapping';
|
|
1
|
+
export type { User, UserToken } from '@axinom/mosaic-core';
|
|
2
|
+
export * from './check-permissions/index.js';
|
|
3
|
+
export * from './common/enums.js';
|
|
4
|
+
export * from './common/functions.js';
|
|
5
|
+
export * from './common/types.js';
|
|
6
|
+
export * from './end-user-authorization/index.js';
|
|
7
|
+
export * from './operation-to-permission-mapping/index.js';
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
export * from './mappings-helpers';
|
|
2
|
-
export * from './permission-definition-interface';
|
|
3
|
-
export * from './permission-structure-interface';
|
|
1
|
+
export * from './mappings-helpers.js';
|
|
2
|
+
export * from './permission-definition-interface.js';
|
|
3
|
+
export * from './permission-structure-interface.js';
|
|
@@ -3,8 +3,8 @@ import {
|
|
|
3
3
|
getIgnoredOperations,
|
|
4
4
|
getMappedOperations,
|
|
5
5
|
getPermissionsFromDefinition,
|
|
6
|
-
} from './mappings-helpers';
|
|
7
|
-
import { PermissionDefinition } from './permission-definition-interface';
|
|
6
|
+
} from './mappings-helpers.js';
|
|
7
|
+
import type { PermissionDefinition } from './permission-definition-interface.js';
|
|
8
8
|
|
|
9
9
|
describe('Endpoints to Permission Definition', () => {
|
|
10
10
|
describe('getMappedEndpoints', () => {
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"check-permissions.d.ts","sourceRoot":"","sources":["../../src/check-permissions/check-permissions.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,qBAAqB,CAAC;AAMhD;;;;;GAKG;AACH,wBAAgB,yBAAyB,CACvC,mBAAmB,EAAE,MAAM,EAAE,EAC7B,kBAAkB,EAAE,MAAM,EAAE,GAC3B,OAAO,CAAC;AAEX;;;;;GAKG;AACH,wBAAgB,yBAAyB,CACvC,mBAAmB,EAAE,SAAS,CAAC,aAAa,CAAC,EAC7C,kBAAkB,EAAE,SAAS,CAAC,aAAa,CAAC,GAC3C,OAAO,CAAC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"check-permissions.js","sourceRoot":"","sources":["../../src/check-permissions/check-permissions.ts"],"names":[],"mappings":";;AA4BA,8DAiCC;AAjCD,SAAgB,yBAAyB,CACvC,GAAG,IAA6B;IAEhC,MAAM,CAAC,mBAAmB,EAAE,kBAAkB,CAAC,GAAG,IAAI,CAAC;IAEvD,IAAI,KAAK,CAAC,OAAO,CAAC,mBAAmB,CAAC,IAAI,KAAK,CAAC,OAAO,CAAC,kBAAkB,CAAC,EAAE,CAAC;QAC5E,OAAO,mBAAmB,CAAC,IAAI,CAAC,CAAC,UAAU,EAAE,EAAE,CAC7C,kBAAkB,CAAC,QAAQ,CAAC,UAAU,CAAC,CACxC,CAAC;IACJ,CAAC;IAED,IACE,CAAC,KAAK,CAAC,OAAO,CAAC,mBAAmB,CAAC;QACnC,CAAC,KAAK,CAAC,OAAO,CAAC,kBAAkB,CAAC,EAClC,CAAC;QACD,MAAM,QAAQ,GAAG,MAAM,CAAC,IAAI,CAAC,mBAAmB,CAAC,CAAC;QAClD,IAAI,QAAQ,CAAC,MAAM,KAAK,CAAC,EAAE,CAAC;YAC1B,OAAO,IAAI,CAAC;QACd,CAAC;QACD,KAAK,MAAM,OAAO,IAAI,QAAQ,EAAE,CAAC;YAC/B,MAAM,WAAW,GAAG,QAAQ,CAAC,OAAO,CAAC,CAAC;YACtC,IAAI,kBAAkB,CAAC,WAAW,CAAC,EAAE,CAAC;gBACpC,OAAO,yBAAyB,CAC9B,mBAAmB,CAAC,WAAW,CAAC,EAChC,kBAAkB,CAAC,WAAW,CAAC,CAChC,CAAC;YACJ,CAAC;QACH,CAAC;QACD,OAAO,KAAK,CAAC;IACf,CAAC;IAED,2EAA2E;IAC3E,OAAO,KAAK,CAAC;AACf,CAAC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/check-permissions/index.ts"],"names":[],"mappings":"AAAA,cAAc,qBAAqB,CAAC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/check-permissions/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,sDAAoC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"enums.d.ts","sourceRoot":"","sources":["../../src/common/enums.ts"],"names":[],"mappings":"AAAA,oBAAY,gBAAgB;IAC1B,OAAO,YAAY;IACnB,QAAQ,aAAa;IACrB,MAAM,WAAW;IACjB,MAAM,WAAW;IACjB,MAAM,WAAW;CAClB;AAED,oBAAY,iBAAiB;IAC3B,OAAO,IAAA;IACP,WAAW,IAAA;IACX,kBAAkB,IAAA;IAClB,KAAK,IAAA;CACN;AAED,oBAAY,kBAAkB;IAC5B,OAAO,IAAA;IACP,KAAK,IAAA;CACN;AAED,oBAAY,wBAAwB;IAClC,OAAO,YAAY;IACnB,iBAAiB,sBAAsB;IACvC,sBAAsB,2BAA2B;IACjD,oBAAoB,yBAAyB;IAC7C,KAAK,UAAU;CAChB"}
|
package/dist/common/enums.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"enums.js","sourceRoot":"","sources":["../../src/common/enums.ts"],"names":[],"mappings":";;;AAAA,IAAY,gBAMX;AAND,WAAY,gBAAgB;IAC1B,uCAAmB,CAAA;IACnB,yCAAqB,CAAA;IACrB,qCAAiB,CAAA;IACjB,qCAAiB,CAAA;IACjB,qCAAiB,CAAA;AACnB,CAAC,EANW,gBAAgB,gCAAhB,gBAAgB,QAM3B;AAED,IAAY,iBAKX;AALD,WAAY,iBAAiB;IAC3B,+DAAO,CAAA;IACP,uEAAW,CAAA;IACX,qFAAkB,CAAA;IAClB,2DAAK,CAAA;AACP,CAAC,EALW,iBAAiB,iCAAjB,iBAAiB,QAK5B;AAED,IAAY,kBAGX;AAHD,WAAY,kBAAkB;IAC5B,iEAAO,CAAA;IACP,6DAAK,CAAA;AACP,CAAC,EAHW,kBAAkB,kCAAlB,kBAAkB,QAG7B;AAED,IAAY,wBAMX;AAND,WAAY,wBAAwB;IAClC,+CAAmB,CAAA;IACnB,mEAAuC,CAAA;IACvC,6EAAiD,CAAA;IACjD,yEAA6C,CAAA;IAC7C,2CAAe,CAAA;AACjB,CAAC,EANW,wBAAwB,wCAAxB,wBAAwB,QAMnC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"functions.d.ts","sourceRoot":"","sources":["../../src/common/functions.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,gBAAgB,EAAE,MAAM,SAAS,CAAC;AAgB3C;;;;;GAKG;AACH,eAAO,MAAM,SAAS,GAAI,MAAM,MAAM,EAAE,GAAG,OAAO,MAAM,EAAE,KAAG,GAK5D,CAAC;AAWF,eAAO,MAAM,2BAA2B,GACtC,WAAW,gBAAgB,GAAG,MAAM,EACpC,WAAW,OAAO,GAAG,SAAS,KAC7B,MA6CF,CAAC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"functions.js","sourceRoot":"","sources":["../../src/common/functions.ts"],"names":[],"mappings":";AAAA,uDAAuD;;;AAEvD,mCAA2C;AAE3C,oHAAoH;AACpH,MAAM,QAAQ,GAAG,CAAC,GAAG,KAAe,EAAU,EAAE;IAC9C,OAAO,KAAK;SACT,GAAG,CAAC,CAAC,IAAI,EAAE,KAAK,EAAE,EAAE;QACnB,IAAI,KAAK,KAAK,CAAC,EAAE,CAAC;YAChB,OAAO,IAAI,CAAC,IAAI,EAAE,CAAC,OAAO,CAAC,UAAU,EAAE,EAAE,CAAC,CAAC;QAC7C,CAAC;aAAM,CAAC;YACN,OAAO,IAAI,CAAC,IAAI,EAAE,CAAC,OAAO,CAAC,oBAAoB,EAAE,EAAE,CAAC,CAAC;QACvD,CAAC;IACH,CAAC,CAAC;SACD,MAAM,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,MAAM,CAAC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gB,EAAE,MAAM,CAAC;IACzB,SAAS,EAAE,MAAM,CAAC;CACnB;AAED,eAAO,MAAM,gBAAgB;;;;;;;;;;;;;;CAcnB,CAAC;AAEX,MAAM,MAAM,gBAAgB,GAC1B,CAAC,OAAO,gBAAgB,CAAC,CAAC,MAAM,OAAO,gBAAgB,CAAC,CAAC"}
|
package/dist/common/types.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"types.js","sourceRoot":"","sources":["../../src/common/types.ts"],"names":[],"mappings":";;;AAqFa,QAAA,gBAAgB,GAAG;IAC9B,UAAU,EAAE,eAAe;IAC3B,sBAAsB,EAAE,2BAA2B;IACnD,cAAc,EAAE,mBAAmB;IACnC,cAAc,EAAE,iBAAiB;IACjC,aAAa,EAAE,kBAAkB;IACjC,aAAa,EAAE,kBAAkB;IACjC,YAAY,EAAE,iBAAiB;IAC/B,uBAAuB,EAAE,4BAA4B;IACrD,eAAe,EAAE,oBAAoB;IACrC,oBAAoB,EAAE,yBAAyB;IAC/C,WAAW,EAAE,gBAAgB;IAC7B,mBAAmB,EAAE,wBAAwB;IAC7C,WAAW,EAAE,gBAAgB;CACrB,CAAC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"end-user-authorization-config-definition.d.ts","sourceRoot":"","sources":["../../src/end-user-authorization/end-user-authorization-config-definition.ts"],"names":[],"mappings":"AAAA;;;GAGG;AACH,MAAM,WAAW,0BAA0B;IACzC;;;OAGG;IACH,sBAAsB,EAAE,MAAM,EAAE,CAAC;IACjC;;;;;OAKG;IACH,oCAAoC,EAAE,MAAM,EAAE,CAAC;CAChD"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"end-user-authorization-config-definition.js","sourceRoot":"","sources":["../../src/end-user-authorization/end-user-authorization-config-definition.ts"],"names":[],"mappings":""}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/end-user-authorization/index.ts"],"names":[],"mappings":"AAAA,cAAc,4CAA4C,CAAC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/end-user-authorization/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,6EAA2D"}
|
package/dist/index.d.ts
DELETED
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
export { User, UserToken } from '@axinom/mosaic-core';
|
|
2
|
-
export * from './check-permissions';
|
|
3
|
-
export * from './common/enums';
|
|
4
|
-
export * from './common/functions';
|
|
5
|
-
export * from './common/types';
|
|
6
|
-
export * from './end-user-authorization';
|
|
7
|
-
export * from './operation-to-permission-mapping';
|
|
8
|
-
//# sourceMappingURL=index.d.ts.map
|
package/dist/index.d.ts.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,SAAS,EAAE,MAAM,qBAAqB,CAAC;AACtD,cAAc,qBAAqB,CAAC;AACpC,cAAc,gBAAgB,CAAC;AAC/B,cAAc,oBAAoB,CAAC;AACnC,cAAc,gBAAgB,CAAC;AAC/B,cAAc,0BAA0B,CAAC;AACzC,cAAc,mCAAmC,CAAC"}
|
package/dist/index.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AACA,sDAAoC;AACpC,iDAA+B;AAC/B,qDAAmC;AACnC,iDAA+B;AAC/B,2DAAyC;AACzC,oEAAkD"}
|