@aptly-as/types 1.5.1 → 1.6.0
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/core/api.d.ts +7 -0
- package/core/api.ts +8 -0
- package/core/app.d.ts +27 -0
- package/core/app.js +3 -0
- package/core/app.js.map +1 -0
- package/core/app.ts +32 -0
- package/core/fields.d.ts +17 -0
- package/core/fields.js +3 -0
- package/core/fields.js.map +1 -0
- package/core/fields.ts +19 -0
- package/core/index.d.ts +5 -0
- package/core/index.js +19 -7
- package/core/index.js.map +1 -1
- package/core/index.ts +5 -0
- package/core/permission.d.ts +109 -2
- package/core/permission.js +93 -0
- package/core/permission.js.map +1 -1
- package/core/permission.ts +115 -1
- package/core/scope.d.ts +12 -0
- package/core/scope.js +9 -0
- package/core/scope.js.map +1 -0
- package/core/scope.ts +12 -0
- package/enums/document.js +1 -0
- package/enums/document.js.map +1 -1
- package/enums/fields.d.ts +25 -0
- package/enums/fields.js +30 -0
- package/enums/fields.js.map +1 -0
- package/enums/fields.ts +26 -0
- package/enums/index.d.ts +1 -0
- package/enums/index.js +15 -6
- package/enums/index.js.map +1 -1
- package/enums/index.ts +1 -0
- package/enums/unit-template.js +1 -0
- package/enums/unit-template.js.map +1 -1
- package/enums/webhook.d.ts +3 -1
- package/enums/webhook.js +3 -0
- package/enums/webhook.js.map +1 -1
- package/enums/webhook.ts +3 -1
- package/index.js +13 -6
- package/index.js.map +1 -1
- package/models/app.d.ts +66 -0
- package/models/app.js +28 -0
- package/models/app.js.map +1 -0
- package/models/app.ts +75 -0
- package/models/client.d.ts +2 -1
- package/models/client.ts +2 -1
- package/models/document.d.ts +3 -3
- package/models/document.ts +3 -3
- package/models/index.d.ts +1 -0
- package/models/index.js +38 -30
- package/models/index.js.map +1 -1
- package/models/index.ts +1 -0
- package/models/media.d.ts +4 -0
- package/models/media.ts +5 -0
- package/models/organization.d.ts +12 -2
- package/models/organization.ts +25 -3
- package/models/page.d.ts +1 -1
- package/models/page.ts +1 -1
- package/models/product.d.ts +1 -0
- package/models/product.ts +1 -0
- package/models/project.d.ts +3 -3
- package/models/project.ts +3 -3
- package/models/unit-email.js +1 -0
- package/models/unit-email.js.map +1 -1
- package/models/unit-template.d.ts +1 -1
- package/models/unit-template.ts +1 -1
- package/models/unit.d.ts +3 -3
- package/models/unit.ts +3 -3
- package/models/webhook-event.d.ts +5 -2
- package/models/webhook-event.ts +5 -2
- package/models/webhook.d.ts +1 -0
- package/models/webhook.ts +1 -0
- package/package.json +8 -6
package/core/api.d.ts
CHANGED
package/core/api.ts
CHANGED
|
@@ -4,4 +4,12 @@ export interface AptlySearchPaginateResponse<T> {
|
|
|
4
4
|
skip: number;
|
|
5
5
|
data: T[];
|
|
6
6
|
count: number;
|
|
7
|
+
}
|
|
8
|
+
|
|
9
|
+
export interface AptlyApiQueries {
|
|
10
|
+
limit?: number; // Limit documents
|
|
11
|
+
skip?: number; // skip document for pagination
|
|
12
|
+
text?: string; // search all fields
|
|
13
|
+
select?: string; // Split with spaces
|
|
14
|
+
populate?: string; // user:_id,fullName;organization
|
|
7
15
|
}
|
package/core/app.d.ts
ADDED
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import { AptlyScope } from './scope';
|
|
2
|
+
import { AptlyApp, AptlyOrganization, AptlyOrganizationAppConfig } from '../models';
|
|
3
|
+
export interface AptlyAppJWT {
|
|
4
|
+
exp: number;
|
|
5
|
+
}
|
|
6
|
+
export interface AptlyAppAuthorizeCode {
|
|
7
|
+
scope: AptlyScope[];
|
|
8
|
+
aud: string;
|
|
9
|
+
sub: string;
|
|
10
|
+
jti: string;
|
|
11
|
+
iss: 'aptly.as';
|
|
12
|
+
}
|
|
13
|
+
export interface AptlyAppAuthorizeToken {
|
|
14
|
+
iss: string;
|
|
15
|
+
aud: string;
|
|
16
|
+
sub: string;
|
|
17
|
+
}
|
|
18
|
+
export interface AptlyAppWebContext {
|
|
19
|
+
organization: Pick<AptlyOrganization, '_id' | 'slug' | 'name'>;
|
|
20
|
+
app: AptlyApp;
|
|
21
|
+
config: AptlyOrganizationAppConfig;
|
|
22
|
+
theme: any;
|
|
23
|
+
media: AptlyAppWebContextMedia;
|
|
24
|
+
}
|
|
25
|
+
export interface AptlyAppWebContextMedia {
|
|
26
|
+
cloudinaryKey: string;
|
|
27
|
+
}
|
package/core/app.js
ADDED
package/core/app.js.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"app.js","sourceRoot":"","sources":["app.ts"],"names":[],"mappings":""}
|
package/core/app.ts
ADDED
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import { AptlyScope } from './scope';
|
|
2
|
+
import { AptlyApp, AptlyOrganization, AptlyOrganizationAppConfig } from '../models';
|
|
3
|
+
|
|
4
|
+
export interface AptlyAppJWT {
|
|
5
|
+
exp: number;
|
|
6
|
+
}
|
|
7
|
+
|
|
8
|
+
export interface AptlyAppAuthorizeCode {
|
|
9
|
+
scope: AptlyScope[];
|
|
10
|
+
aud: string; // organization_id
|
|
11
|
+
sub: string; // app_id
|
|
12
|
+
jti: string; // user_id
|
|
13
|
+
iss: 'aptly.as';
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
export interface AptlyAppAuthorizeToken {
|
|
17
|
+
iss: string; // client_id
|
|
18
|
+
aud: string; // organization_id
|
|
19
|
+
sub: string; // app_id
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
export interface AptlyAppWebContext {
|
|
23
|
+
organization: Pick<AptlyOrganization, '_id' | 'slug' | 'name'>;
|
|
24
|
+
app: AptlyApp;
|
|
25
|
+
config: AptlyOrganizationAppConfig;
|
|
26
|
+
theme: any;
|
|
27
|
+
media: AptlyAppWebContextMedia;
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
export interface AptlyAppWebContextMedia {
|
|
31
|
+
cloudinaryKey: string;
|
|
32
|
+
}
|
package/core/fields.d.ts
ADDED
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { AptlyFieldType } from '../enums';
|
|
2
|
+
export interface AptlyField {
|
|
3
|
+
type: AptlyFieldType;
|
|
4
|
+
label: string;
|
|
5
|
+
placeholder?: string;
|
|
6
|
+
required?: boolean;
|
|
7
|
+
pattern?: string;
|
|
8
|
+
autoComplete?: string;
|
|
9
|
+
disabled?: boolean;
|
|
10
|
+
multiple?: boolean;
|
|
11
|
+
autoFocus?: boolean;
|
|
12
|
+
options: AptlyFieldOption[];
|
|
13
|
+
}
|
|
14
|
+
export interface AptlyFieldOption<V extends string = string> {
|
|
15
|
+
value: V;
|
|
16
|
+
label: string;
|
|
17
|
+
}
|
package/core/fields.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"fields.js","sourceRoot":"","sources":["fields.ts"],"names":[],"mappings":""}
|
package/core/fields.ts
ADDED
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { AptlyFieldType } from '../enums';
|
|
2
|
+
|
|
3
|
+
export interface AptlyField {
|
|
4
|
+
type: AptlyFieldType;
|
|
5
|
+
label: string;
|
|
6
|
+
placeholder?: string;
|
|
7
|
+
required?: boolean;
|
|
8
|
+
pattern?: string;
|
|
9
|
+
autoComplete?: string;
|
|
10
|
+
disabled?: boolean;
|
|
11
|
+
multiple?: boolean;
|
|
12
|
+
autoFocus?: boolean;
|
|
13
|
+
options: AptlyFieldOption[];
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
export interface AptlyFieldOption<V extends string = string> {
|
|
17
|
+
value: V;
|
|
18
|
+
label: string;
|
|
19
|
+
}
|
package/core/index.d.ts
CHANGED
|
@@ -1,7 +1,12 @@
|
|
|
1
1
|
import { AptlyCloudinaryFile } from './cloudinary';
|
|
2
2
|
export * from './api';
|
|
3
|
+
export * from './app';
|
|
4
|
+
export * from './cloudinary';
|
|
3
5
|
export * from './permission';
|
|
4
6
|
export * from './error';
|
|
7
|
+
export * from './fields';
|
|
8
|
+
export * from './scope';
|
|
9
|
+
export * from './signage';
|
|
5
10
|
export * from './webhook-event-data';
|
|
6
11
|
export interface AptlySchemaFile extends Pick<AptlyCloudinaryFile, 'public_id' | 'url' | 'format' | 'resource_type' | 'bytes'> {
|
|
7
12
|
filename: string;
|
package/core/index.js
CHANGED
|
@@ -1,10 +1,22 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
function
|
|
3
|
-
|
|
4
|
-
}
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
|
|
5
|
+
}) : (function(o, m, k, k2) {
|
|
6
|
+
if (k2 === undefined) k2 = k;
|
|
7
|
+
o[k2] = m[k];
|
|
8
|
+
}));
|
|
9
|
+
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
10
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
11
|
+
};
|
|
5
12
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
13
|
+
__exportStar(require("./api"), exports);
|
|
14
|
+
__exportStar(require("./app"), exports);
|
|
15
|
+
__exportStar(require("./cloudinary"), exports);
|
|
16
|
+
__exportStar(require("./permission"), exports);
|
|
17
|
+
__exportStar(require("./error"), exports);
|
|
18
|
+
__exportStar(require("./fields"), exports);
|
|
19
|
+
__exportStar(require("./scope"), exports);
|
|
20
|
+
__exportStar(require("./signage"), exports);
|
|
21
|
+
__exportStar(require("./webhook-event-data"), exports);
|
|
10
22
|
//# sourceMappingURL=index.js.map
|
package/core/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["index.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["index.ts"],"names":[],"mappings":";;;;;;;;;;;;AAEA,wCAAsB;AACtB,wCAAsB;AACtB,+CAA6B;AAC7B,+CAA6B;AAC7B,0CAAwB;AACxB,2CAAyB;AACzB,0CAAwB;AACxB,4CAA0B;AAC1B,uDAAqC"}
|
package/core/index.ts
CHANGED
|
@@ -1,8 +1,13 @@
|
|
|
1
1
|
import { AptlyCloudinaryFile } from './cloudinary';
|
|
2
2
|
|
|
3
3
|
export * from './api';
|
|
4
|
+
export * from './app';
|
|
5
|
+
export * from './cloudinary';
|
|
4
6
|
export * from './permission';
|
|
5
7
|
export * from './error';
|
|
8
|
+
export * from './fields';
|
|
9
|
+
export * from './scope';
|
|
10
|
+
export * from './signage';
|
|
6
11
|
export * from './webhook-event-data';
|
|
7
12
|
|
|
8
13
|
export interface AptlySchemaFile
|
package/core/permission.d.ts
CHANGED
|
@@ -1,5 +1,112 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @deprecated use AptlyPermissionGlobalModel enum
|
|
3
|
+
*/
|
|
1
4
|
export declare type AptlyPermissionGlobalModels = 'superAdmin' | 'admin' | 'beta' | 'default';
|
|
5
|
+
export declare enum AptlyPermissionGlobalModel {
|
|
6
|
+
Admin = "admin",
|
|
7
|
+
Beta = "beta",
|
|
8
|
+
Default = "default",
|
|
9
|
+
SuperAdmin = "superAdmin"
|
|
10
|
+
}
|
|
11
|
+
/**
|
|
12
|
+
* @deprecated Dont think this is used?
|
|
13
|
+
*/
|
|
2
14
|
export declare type AptlyPermissionModules = 'projectBooking' | 'projectSupport' | 'projectRecommendations';
|
|
3
|
-
|
|
15
|
+
/**
|
|
16
|
+
* @deprecated use AptlyPermissionOrganizationModel enum
|
|
17
|
+
*/
|
|
18
|
+
export declare type AptlyPermissionModulesModels = 'default' | 'core' | 'algorithms' | 'departments' | 'booking' | 'unitExtraOptions' | 'unitExtraFields' | 'pages' | 'recommendations' | 'subcontractor' | 'optionLabels' | 'support' | 'productsExtended' | 'testing';
|
|
19
|
+
export declare enum AptlyPermissionModulesModel {
|
|
20
|
+
Algorithms = "algorithms",
|
|
21
|
+
Booking = "booking",
|
|
22
|
+
Core = "core",
|
|
23
|
+
Default = "default",
|
|
24
|
+
Departments = "departments",
|
|
25
|
+
OptionLabels = "optionLabels",
|
|
26
|
+
Pages = "pages",
|
|
27
|
+
ProductsExtended = "productsExtended",
|
|
28
|
+
Recommendations = "recommendations",
|
|
29
|
+
Subcontractor = "subcontractor",
|
|
30
|
+
Support = "support",
|
|
31
|
+
Testing = "testing",
|
|
32
|
+
UnitExtraOptions = "unitExtraOptions",
|
|
33
|
+
UnitExtraFields = "unitExtraFields"
|
|
34
|
+
}
|
|
35
|
+
/**
|
|
36
|
+
* @deprecated use AptlyPermissionOrganizationModel enum
|
|
37
|
+
*/
|
|
4
38
|
export declare type AptlyPermissionOrganizationModels = 'testingAdmin' | 'admin' | 'content' | 'reports' | 'support' | 'thirdParty' | 'default';
|
|
5
|
-
export declare
|
|
39
|
+
export declare enum AptlyPermissionOrganizationModel {
|
|
40
|
+
Admin = "admin",
|
|
41
|
+
Content = "content",
|
|
42
|
+
Default = "default",
|
|
43
|
+
TestingAdmin = "testingAdmin",
|
|
44
|
+
Reports = "reports",
|
|
45
|
+
Support = "support",
|
|
46
|
+
ThirdParty = "thirdParty"
|
|
47
|
+
}
|
|
48
|
+
/**
|
|
49
|
+
* @deprecated use AptlyPermissionModel enum
|
|
50
|
+
*/
|
|
51
|
+
export declare type AptlyPermissionModels = 'admin' | 'adminBilling' | 'adminProducers' | 'adminProducts' | 'adminReport' | 'adminStats' | 'adminSuppliers' | 'adminTags' | 'adminTesting' | 'adminUsers' | 'adminOrganizations' | 'beta' | 'organization' | 'organizationBooking' | 'organizationClients' | 'organizationDepartments' | 'organizationMembers' | 'organizationOptionLabels' | 'organizationOrders' | 'organizationProducts' | 'organizationProductsExtended' | 'organizationReport' | 'organizationStats' | 'organizationLogo' | 'organizationWebhooks' | 'project' | 'projectAlgorithms' | 'projectBooking' | 'projectDocuments' | 'projectInquiry' | 'projectOrders' | 'projectPages' | 'projectPeriods' | 'projectProducts' | 'projectRecommendations' | 'projectReport' | 'projectReportPrice' | 'projectTheme' | 'projectSigning' | 'projectSubcontractor' | 'projectUnits' | 'projectUnitInvites' | 'projectUnitExtraFields' | 'projectUnitExtraOptions' | 'projectUnitTemplates' | 'projectUnitTemplatesAlgorithms' | 'projectUnitTemplatesPrices' | 'projectUpsellTemplates' | 'unit' | 'unitBooking' | 'unitInquiry' | 'unitOrders' | 'unitPages' | 'unitProducts' | 'unitReport';
|
|
52
|
+
export declare enum AptlyPermissionModel {
|
|
53
|
+
Admin = "admin",
|
|
54
|
+
AdminBilling = "adminBilling",
|
|
55
|
+
AdminProducers = "adminProducers",
|
|
56
|
+
AdminProducts = "adminProducts",
|
|
57
|
+
AdminReport = "adminReport",
|
|
58
|
+
AdminStats = "adminStats",
|
|
59
|
+
AdminSuppliers = "adminSuppliers",
|
|
60
|
+
AdminTags = "adminTags",
|
|
61
|
+
AdminTesting = "adminTesting",
|
|
62
|
+
AdminUsers = "adminUsers",
|
|
63
|
+
AdminOrganizations = "adminOrganizations",
|
|
64
|
+
Beta = "beta",
|
|
65
|
+
Organization = "organization",
|
|
66
|
+
OrganizationBooking = "organizationBooking",
|
|
67
|
+
OrganizationClients = "organizationClients",
|
|
68
|
+
OrganizationDepartments = "organizationDepartments",
|
|
69
|
+
OrganizationMembers = "organizationMembers",
|
|
70
|
+
OrganizationOptionLabels = "organizationOptionLabels",
|
|
71
|
+
OrganizationOrders = "organizationOrders",
|
|
72
|
+
OrganizationProducts = "organizationProducts",
|
|
73
|
+
OrganizationProductsExtended = "organizationProductsExtended",
|
|
74
|
+
OrganizationReport = "organizationReport",
|
|
75
|
+
OrganizationStats = "organizationStats",
|
|
76
|
+
OrganizationLogo = "organizationLogo",
|
|
77
|
+
OrganizationWebhooks = "organizationWebhooks",
|
|
78
|
+
Project = "project",
|
|
79
|
+
ProjectAlgorithms = "projectAlgorithms",
|
|
80
|
+
ProjectBooking = "projectBooking",
|
|
81
|
+
ProjectDocuments = "projectDocuments",
|
|
82
|
+
ProjectInquiry = "projectInquiry",
|
|
83
|
+
ProjectOrders = "projectOrders",
|
|
84
|
+
ProjectPages = "projectPages",
|
|
85
|
+
ProjectPeriods = "projectPeriods",
|
|
86
|
+
ProjectProducts = "projectProducts",
|
|
87
|
+
ProjectRecommendations = "projectRecommendations",
|
|
88
|
+
ProjectReport = "projectReport",
|
|
89
|
+
ProjectReportPrice = "projectReportPrice",
|
|
90
|
+
ProjectTheme = "projectTheme",
|
|
91
|
+
ProjectSigning = "projectSigning",
|
|
92
|
+
ProjectSubcontractor = "projectSubcontractor",
|
|
93
|
+
ProjectUnits = "projectUnits",
|
|
94
|
+
ProjectUnitInvites = "projectUnitInvites",
|
|
95
|
+
ProjectUnitExtraFields = "projectUnitExtraFields",
|
|
96
|
+
ProjectUnitExtraOptions = "projectUnitExtraOptions",
|
|
97
|
+
ProjectUnitTemplates = "projectUnitTemplates",
|
|
98
|
+
ProjectUnitTemplatesAlgorithms = "projectUnitTemplatesAlgorithms",
|
|
99
|
+
ProjectUnitTemplatesPrices = "projectUnitTemplatesPrices",
|
|
100
|
+
ProjectUpsellTemplates = "projectUpsellTemplates",
|
|
101
|
+
Unit = "unit",
|
|
102
|
+
UnitBooking = "unitBooking",
|
|
103
|
+
UnitInquiry = "unitInquiry",
|
|
104
|
+
UnitOrders = "unitOrders",
|
|
105
|
+
UnitPages = "unitPages",
|
|
106
|
+
UnitProducts = "unitProducts",
|
|
107
|
+
UnitReport = "unitReport"
|
|
108
|
+
}
|
|
109
|
+
export declare type AptlyPermissionCrud = 'C' | 'R' | 'U' | 'D';
|
|
110
|
+
export declare type AptlyPermissionSchema = {
|
|
111
|
+
[key in AptlyPermissionModels]: 'R' | 'CR' | 'CRU' | 'RU' | 'CRUD';
|
|
112
|
+
};
|
package/core/permission.js
CHANGED
|
@@ -1,3 +1,96 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.AptlyPermissionModel = exports.AptlyPermissionOrganizationModel = exports.AptlyPermissionModulesModel = exports.AptlyPermissionGlobalModel = void 0;
|
|
4
|
+
var AptlyPermissionGlobalModel;
|
|
5
|
+
(function (AptlyPermissionGlobalModel) {
|
|
6
|
+
AptlyPermissionGlobalModel["Admin"] = "admin";
|
|
7
|
+
AptlyPermissionGlobalModel["Beta"] = "beta";
|
|
8
|
+
AptlyPermissionGlobalModel["Default"] = "default";
|
|
9
|
+
AptlyPermissionGlobalModel["SuperAdmin"] = "superAdmin";
|
|
10
|
+
})(AptlyPermissionGlobalModel = exports.AptlyPermissionGlobalModel || (exports.AptlyPermissionGlobalModel = {}));
|
|
11
|
+
var AptlyPermissionModulesModel;
|
|
12
|
+
(function (AptlyPermissionModulesModel) {
|
|
13
|
+
AptlyPermissionModulesModel["Algorithms"] = "algorithms";
|
|
14
|
+
AptlyPermissionModulesModel["Booking"] = "booking";
|
|
15
|
+
AptlyPermissionModulesModel["Core"] = "core";
|
|
16
|
+
AptlyPermissionModulesModel["Default"] = "default";
|
|
17
|
+
AptlyPermissionModulesModel["Departments"] = "departments";
|
|
18
|
+
AptlyPermissionModulesModel["OptionLabels"] = "optionLabels";
|
|
19
|
+
AptlyPermissionModulesModel["Pages"] = "pages";
|
|
20
|
+
AptlyPermissionModulesModel["ProductsExtended"] = "productsExtended";
|
|
21
|
+
AptlyPermissionModulesModel["Recommendations"] = "recommendations";
|
|
22
|
+
AptlyPermissionModulesModel["Subcontractor"] = "subcontractor";
|
|
23
|
+
AptlyPermissionModulesModel["Support"] = "support";
|
|
24
|
+
AptlyPermissionModulesModel["Testing"] = "testing";
|
|
25
|
+
AptlyPermissionModulesModel["UnitExtraOptions"] = "unitExtraOptions";
|
|
26
|
+
AptlyPermissionModulesModel["UnitExtraFields"] = "unitExtraFields";
|
|
27
|
+
})(AptlyPermissionModulesModel = exports.AptlyPermissionModulesModel || (exports.AptlyPermissionModulesModel = {}));
|
|
28
|
+
var AptlyPermissionOrganizationModel;
|
|
29
|
+
(function (AptlyPermissionOrganizationModel) {
|
|
30
|
+
AptlyPermissionOrganizationModel["Admin"] = "admin";
|
|
31
|
+
AptlyPermissionOrganizationModel["Content"] = "content";
|
|
32
|
+
AptlyPermissionOrganizationModel["Default"] = "default";
|
|
33
|
+
AptlyPermissionOrganizationModel["TestingAdmin"] = "testingAdmin";
|
|
34
|
+
AptlyPermissionOrganizationModel["Reports"] = "reports";
|
|
35
|
+
AptlyPermissionOrganizationModel["Support"] = "support";
|
|
36
|
+
AptlyPermissionOrganizationModel["ThirdParty"] = "thirdParty";
|
|
37
|
+
})(AptlyPermissionOrganizationModel = exports.AptlyPermissionOrganizationModel || (exports.AptlyPermissionOrganizationModel = {}));
|
|
38
|
+
var AptlyPermissionModel;
|
|
39
|
+
(function (AptlyPermissionModel) {
|
|
40
|
+
AptlyPermissionModel["Admin"] = "admin";
|
|
41
|
+
AptlyPermissionModel["AdminBilling"] = "adminBilling";
|
|
42
|
+
AptlyPermissionModel["AdminProducers"] = "adminProducers";
|
|
43
|
+
AptlyPermissionModel["AdminProducts"] = "adminProducts";
|
|
44
|
+
AptlyPermissionModel["AdminReport"] = "adminReport";
|
|
45
|
+
AptlyPermissionModel["AdminStats"] = "adminStats";
|
|
46
|
+
AptlyPermissionModel["AdminSuppliers"] = "adminSuppliers";
|
|
47
|
+
AptlyPermissionModel["AdminTags"] = "adminTags";
|
|
48
|
+
AptlyPermissionModel["AdminTesting"] = "adminTesting";
|
|
49
|
+
AptlyPermissionModel["AdminUsers"] = "adminUsers";
|
|
50
|
+
AptlyPermissionModel["AdminOrganizations"] = "adminOrganizations";
|
|
51
|
+
AptlyPermissionModel["Beta"] = "beta";
|
|
52
|
+
AptlyPermissionModel["Organization"] = "organization";
|
|
53
|
+
AptlyPermissionModel["OrganizationBooking"] = "organizationBooking";
|
|
54
|
+
AptlyPermissionModel["OrganizationClients"] = "organizationClients";
|
|
55
|
+
AptlyPermissionModel["OrganizationDepartments"] = "organizationDepartments";
|
|
56
|
+
AptlyPermissionModel["OrganizationMembers"] = "organizationMembers";
|
|
57
|
+
AptlyPermissionModel["OrganizationOptionLabels"] = "organizationOptionLabels";
|
|
58
|
+
AptlyPermissionModel["OrganizationOrders"] = "organizationOrders";
|
|
59
|
+
AptlyPermissionModel["OrganizationProducts"] = "organizationProducts";
|
|
60
|
+
AptlyPermissionModel["OrganizationProductsExtended"] = "organizationProductsExtended";
|
|
61
|
+
AptlyPermissionModel["OrganizationReport"] = "organizationReport";
|
|
62
|
+
AptlyPermissionModel["OrganizationStats"] = "organizationStats";
|
|
63
|
+
AptlyPermissionModel["OrganizationLogo"] = "organizationLogo";
|
|
64
|
+
AptlyPermissionModel["OrganizationWebhooks"] = "organizationWebhooks";
|
|
65
|
+
AptlyPermissionModel["Project"] = "project";
|
|
66
|
+
AptlyPermissionModel["ProjectAlgorithms"] = "projectAlgorithms";
|
|
67
|
+
AptlyPermissionModel["ProjectBooking"] = "projectBooking";
|
|
68
|
+
AptlyPermissionModel["ProjectDocuments"] = "projectDocuments";
|
|
69
|
+
AptlyPermissionModel["ProjectInquiry"] = "projectInquiry";
|
|
70
|
+
AptlyPermissionModel["ProjectOrders"] = "projectOrders";
|
|
71
|
+
AptlyPermissionModel["ProjectPages"] = "projectPages";
|
|
72
|
+
AptlyPermissionModel["ProjectPeriods"] = "projectPeriods";
|
|
73
|
+
AptlyPermissionModel["ProjectProducts"] = "projectProducts";
|
|
74
|
+
AptlyPermissionModel["ProjectRecommendations"] = "projectRecommendations";
|
|
75
|
+
AptlyPermissionModel["ProjectReport"] = "projectReport";
|
|
76
|
+
AptlyPermissionModel["ProjectReportPrice"] = "projectReportPrice";
|
|
77
|
+
AptlyPermissionModel["ProjectTheme"] = "projectTheme";
|
|
78
|
+
AptlyPermissionModel["ProjectSigning"] = "projectSigning";
|
|
79
|
+
AptlyPermissionModel["ProjectSubcontractor"] = "projectSubcontractor";
|
|
80
|
+
AptlyPermissionModel["ProjectUnits"] = "projectUnits";
|
|
81
|
+
AptlyPermissionModel["ProjectUnitInvites"] = "projectUnitInvites";
|
|
82
|
+
AptlyPermissionModel["ProjectUnitExtraFields"] = "projectUnitExtraFields";
|
|
83
|
+
AptlyPermissionModel["ProjectUnitExtraOptions"] = "projectUnitExtraOptions";
|
|
84
|
+
AptlyPermissionModel["ProjectUnitTemplates"] = "projectUnitTemplates";
|
|
85
|
+
AptlyPermissionModel["ProjectUnitTemplatesAlgorithms"] = "projectUnitTemplatesAlgorithms";
|
|
86
|
+
AptlyPermissionModel["ProjectUnitTemplatesPrices"] = "projectUnitTemplatesPrices";
|
|
87
|
+
AptlyPermissionModel["ProjectUpsellTemplates"] = "projectUpsellTemplates";
|
|
88
|
+
AptlyPermissionModel["Unit"] = "unit";
|
|
89
|
+
AptlyPermissionModel["UnitBooking"] = "unitBooking";
|
|
90
|
+
AptlyPermissionModel["UnitInquiry"] = "unitInquiry";
|
|
91
|
+
AptlyPermissionModel["UnitOrders"] = "unitOrders";
|
|
92
|
+
AptlyPermissionModel["UnitPages"] = "unitPages";
|
|
93
|
+
AptlyPermissionModel["UnitProducts"] = "unitProducts";
|
|
94
|
+
AptlyPermissionModel["UnitReport"] = "unitReport";
|
|
95
|
+
})(AptlyPermissionModel = exports.AptlyPermissionModel || (exports.AptlyPermissionModel = {}));
|
|
3
96
|
//# sourceMappingURL=permission.js.map
|
package/core/permission.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"permission.js","sourceRoot":"","sources":["permission.ts"],"names":[],"mappings":""}
|
|
1
|
+
{"version":3,"file":"permission.js","sourceRoot":"","sources":["permission.ts"],"names":[],"mappings":";;;AAMA,IAAY,0BAKX;AALD,WAAY,0BAA0B;IACpC,6CAAe,CAAA;IACf,2CAAa,CAAA;IACb,iDAAmB,CAAA;IACnB,uDAAyB,CAAA;AAC3B,CAAC,EALW,0BAA0B,GAA1B,kCAA0B,KAA1B,kCAA0B,QAKrC;AA0BD,IAAY,2BAeX;AAfD,WAAY,2BAA2B;IACrC,wDAAyB,CAAA;IACzB,kDAAmB,CAAA;IACnB,4CAAa,CAAA;IACb,kDAAmB,CAAA;IACnB,0DAA2B,CAAA;IAC3B,4DAA6B,CAAA;IAC7B,8CAAe,CAAA;IACf,oEAAqC,CAAA;IACrC,kEAAmC,CAAA;IACnC,8DAA+B,CAAA;IAC/B,kDAAmB,CAAA;IACnB,kDAAmB,CAAA;IACnB,oEAAqC,CAAA;IACrC,kEAAmC,CAAA;AACrC,CAAC,EAfW,2BAA2B,GAA3B,mCAA2B,KAA3B,mCAA2B,QAetC;AAcD,IAAY,gCAQX;AARD,WAAY,gCAAgC;IAC1C,mDAAe,CAAA;IACf,uDAAmB,CAAA;IACnB,uDAAmB,CAAA;IACnB,iEAA6B,CAAA;IAC7B,uDAAmB,CAAA;IACnB,uDAAmB,CAAA;IACnB,6DAAyB,CAAA;AAC3B,CAAC,EARW,gCAAgC,GAAhC,wCAAgC,KAAhC,wCAAgC,QAQ3C;AA8DD,IAAY,oBAwDX;AAxDD,WAAY,oBAAoB;IAC9B,uCAAe,CAAA;IACf,qDAA6B,CAAA;IAC7B,yDAAiC,CAAA;IACjC,uDAA+B,CAAA;IAC/B,mDAA2B,CAAA;IAC3B,iDAAyB,CAAA;IACzB,yDAAiC,CAAA;IACjC,+CAAuB,CAAA;IACvB,qDAA6B,CAAA;IAC7B,iDAAyB,CAAA;IACzB,iEAAyC,CAAA;IACzC,qCAAa,CAAA;IACb,qDAA6B,CAAA;IAC7B,mEAA2C,CAAA;IAC3C,mEAA2C,CAAA;IAC3C,2EAAmD,CAAA;IACnD,mEAA2C,CAAA;IAC3C,6EAAqD,CAAA;IACrD,iEAAyC,CAAA;IACzC,qEAA6C,CAAA;IAC7C,qFAA6D,CAAA;IAC7D,iEAAyC,CAAA;IACzC,+DAAuC,CAAA;IACvC,6DAAqC,CAAA;IACrC,qEAA6C,CAAA;IAC7C,2CAAmB,CAAA;IACnB,+DAAuC,CAAA;IACvC,yDAAiC,CAAA;IACjC,6DAAqC,CAAA;IACrC,yDAAiC,CAAA;IACjC,uDAA+B,CAAA;IAC/B,qDAA6B,CAAA;IAC7B,yDAAiC,CAAA;IACjC,2DAAmC,CAAA;IACnC,yEAAiD,CAAA;IACjD,uDAA+B,CAAA;IAC/B,iEAAyC,CAAA;IACzC,qDAA6B,CAAA;IAC7B,yDAAiC,CAAA;IACjC,qEAA6C,CAAA;IAC7C,qDAA6B,CAAA;IAC7B,iEAAyC,CAAA;IACzC,yEAAiD,CAAA;IACjD,2EAAmD,CAAA;IACnD,qEAA6C,CAAA;IAC7C,yFAAiE,CAAA;IACjE,iFAAyD,CAAA;IACzD,yEAAiD,CAAA;IACjD,qCAAa,CAAA;IACb,mDAA2B,CAAA;IAC3B,mDAA2B,CAAA;IAC3B,iDAAyB,CAAA;IACzB,+CAAuB,CAAA;IACvB,qDAA6B,CAAA;IAC7B,iDAAyB,CAAA;AAC3B,CAAC,EAxDW,oBAAoB,GAApB,4BAAoB,KAApB,4BAAoB,QAwD/B"}
|
package/core/permission.ts
CHANGED
|
@@ -1,8 +1,24 @@
|
|
|
1
1
|
|
|
2
|
+
/**
|
|
3
|
+
* @deprecated use AptlyPermissionGlobalModel enum
|
|
4
|
+
*/
|
|
2
5
|
export type AptlyPermissionGlobalModels = 'superAdmin' | 'admin' | 'beta' | 'default';
|
|
3
6
|
|
|
7
|
+
export enum AptlyPermissionGlobalModel {
|
|
8
|
+
Admin = 'admin',
|
|
9
|
+
Beta = 'beta',
|
|
10
|
+
Default = 'default',
|
|
11
|
+
SuperAdmin = 'superAdmin',
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
/**
|
|
15
|
+
* @deprecated Dont think this is used?
|
|
16
|
+
*/
|
|
4
17
|
export type AptlyPermissionModules = 'projectBooking' | 'projectSupport' | 'projectRecommendations';
|
|
5
18
|
|
|
19
|
+
/**
|
|
20
|
+
* @deprecated use AptlyPermissionOrganizationModel enum
|
|
21
|
+
*/
|
|
6
22
|
export type AptlyPermissionModulesModels =
|
|
7
23
|
| 'default'
|
|
8
24
|
| 'core'
|
|
@@ -16,8 +32,29 @@ export type AptlyPermissionModulesModels =
|
|
|
16
32
|
| 'subcontractor'
|
|
17
33
|
| 'optionLabels'
|
|
18
34
|
| 'support'
|
|
35
|
+
| 'productsExtended'
|
|
19
36
|
| 'testing';
|
|
20
37
|
|
|
38
|
+
export enum AptlyPermissionModulesModel {
|
|
39
|
+
Algorithms = 'algorithms',
|
|
40
|
+
Booking = 'booking',
|
|
41
|
+
Core = 'core',
|
|
42
|
+
Default = 'default',
|
|
43
|
+
Departments = 'departments',
|
|
44
|
+
OptionLabels = 'optionLabels',
|
|
45
|
+
Pages = 'pages',
|
|
46
|
+
ProductsExtended = 'productsExtended',
|
|
47
|
+
Recommendations = 'recommendations',
|
|
48
|
+
Subcontractor = 'subcontractor',
|
|
49
|
+
Support = 'support',
|
|
50
|
+
Testing = 'testing',
|
|
51
|
+
UnitExtraOptions = 'unitExtraOptions',
|
|
52
|
+
UnitExtraFields = 'unitExtraFields',
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
/**
|
|
56
|
+
* @deprecated use AptlyPermissionOrganizationModel enum
|
|
57
|
+
*/
|
|
21
58
|
export type AptlyPermissionOrganizationModels =
|
|
22
59
|
| 'testingAdmin'
|
|
23
60
|
| 'admin'
|
|
@@ -27,6 +64,19 @@ export type AptlyPermissionOrganizationModels =
|
|
|
27
64
|
| 'thirdParty'
|
|
28
65
|
| 'default';
|
|
29
66
|
|
|
67
|
+
export enum AptlyPermissionOrganizationModel {
|
|
68
|
+
Admin = 'admin',
|
|
69
|
+
Content = 'content',
|
|
70
|
+
Default = 'default',
|
|
71
|
+
TestingAdmin = 'testingAdmin',
|
|
72
|
+
Reports = 'reports',
|
|
73
|
+
Support = 'support',
|
|
74
|
+
ThirdParty = 'thirdParty',
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
/**
|
|
78
|
+
* @deprecated use AptlyPermissionModel enum
|
|
79
|
+
*/
|
|
30
80
|
export type AptlyPermissionModels =
|
|
31
81
|
| 'admin'
|
|
32
82
|
| 'adminBilling'
|
|
@@ -48,6 +98,7 @@ export type AptlyPermissionModels =
|
|
|
48
98
|
| 'organizationOptionLabels'
|
|
49
99
|
| 'organizationOrders'
|
|
50
100
|
| 'organizationProducts'
|
|
101
|
+
| 'organizationProductsExtended'
|
|
51
102
|
| 'organizationReport'
|
|
52
103
|
| 'organizationStats'
|
|
53
104
|
| 'organizationLogo'
|
|
@@ -81,4 +132,67 @@ export type AptlyPermissionModels =
|
|
|
81
132
|
| 'unitOrders'
|
|
82
133
|
| 'unitPages'
|
|
83
134
|
| 'unitProducts'
|
|
84
|
-
| 'unitReport'
|
|
135
|
+
| 'unitReport';
|
|
136
|
+
|
|
137
|
+
export enum AptlyPermissionModel {
|
|
138
|
+
Admin = 'admin',
|
|
139
|
+
AdminBilling = 'adminBilling',
|
|
140
|
+
AdminProducers = 'adminProducers',
|
|
141
|
+
AdminProducts = 'adminProducts',
|
|
142
|
+
AdminReport = 'adminReport',
|
|
143
|
+
AdminStats = 'adminStats',
|
|
144
|
+
AdminSuppliers = 'adminSuppliers',
|
|
145
|
+
AdminTags = 'adminTags',
|
|
146
|
+
AdminTesting = 'adminTesting',
|
|
147
|
+
AdminUsers = 'adminUsers',
|
|
148
|
+
AdminOrganizations = 'adminOrganizations',
|
|
149
|
+
Beta = 'beta',
|
|
150
|
+
Organization = 'organization',
|
|
151
|
+
OrganizationBooking = 'organizationBooking',
|
|
152
|
+
OrganizationClients = 'organizationClients',
|
|
153
|
+
OrganizationDepartments = 'organizationDepartments',
|
|
154
|
+
OrganizationMembers = 'organizationMembers',
|
|
155
|
+
OrganizationOptionLabels = 'organizationOptionLabels',
|
|
156
|
+
OrganizationOrders = 'organizationOrders',
|
|
157
|
+
OrganizationProducts = 'organizationProducts',
|
|
158
|
+
OrganizationProductsExtended = 'organizationProductsExtended',
|
|
159
|
+
OrganizationReport = 'organizationReport',
|
|
160
|
+
OrganizationStats = 'organizationStats',
|
|
161
|
+
OrganizationLogo = 'organizationLogo',
|
|
162
|
+
OrganizationWebhooks = 'organizationWebhooks',
|
|
163
|
+
Project = 'project',
|
|
164
|
+
ProjectAlgorithms = 'projectAlgorithms',
|
|
165
|
+
ProjectBooking = 'projectBooking',
|
|
166
|
+
ProjectDocuments = 'projectDocuments',
|
|
167
|
+
ProjectInquiry = 'projectInquiry',
|
|
168
|
+
ProjectOrders = 'projectOrders',
|
|
169
|
+
ProjectPages = 'projectPages',
|
|
170
|
+
ProjectPeriods = 'projectPeriods',
|
|
171
|
+
ProjectProducts = 'projectProducts',
|
|
172
|
+
ProjectRecommendations = 'projectRecommendations',
|
|
173
|
+
ProjectReport = 'projectReport',
|
|
174
|
+
ProjectReportPrice = 'projectReportPrice',
|
|
175
|
+
ProjectTheme = 'projectTheme',
|
|
176
|
+
ProjectSigning = 'projectSigning',
|
|
177
|
+
ProjectSubcontractor = 'projectSubcontractor',
|
|
178
|
+
ProjectUnits = 'projectUnits',
|
|
179
|
+
ProjectUnitInvites = 'projectUnitInvites',
|
|
180
|
+
ProjectUnitExtraFields = 'projectUnitExtraFields',
|
|
181
|
+
ProjectUnitExtraOptions = 'projectUnitExtraOptions',
|
|
182
|
+
ProjectUnitTemplates = 'projectUnitTemplates',
|
|
183
|
+
ProjectUnitTemplatesAlgorithms = 'projectUnitTemplatesAlgorithms',
|
|
184
|
+
ProjectUnitTemplatesPrices = 'projectUnitTemplatesPrices',
|
|
185
|
+
ProjectUpsellTemplates = 'projectUpsellTemplates',
|
|
186
|
+
Unit = 'unit',
|
|
187
|
+
UnitBooking = 'unitBooking',
|
|
188
|
+
UnitInquiry = 'unitInquiry',
|
|
189
|
+
UnitOrders = 'unitOrders',
|
|
190
|
+
UnitPages = 'unitPages',
|
|
191
|
+
UnitProducts = 'unitProducts',
|
|
192
|
+
UnitReport = 'unitReport',
|
|
193
|
+
}
|
|
194
|
+
|
|
195
|
+
export type AptlyPermissionCrud = 'C' | 'R' | 'U' | 'D';
|
|
196
|
+
export type AptlyPermissionSchema = {
|
|
197
|
+
[key in AptlyPermissionModels]: 'R' | 'CR' | 'CRU' | 'RU' | 'CRUD';
|
|
198
|
+
}
|
package/core/scope.d.ts
ADDED
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { AptlyPermissionModel } from './permission';
|
|
2
|
+
export declare enum AptlyScopeAction {
|
|
3
|
+
Read = "read",
|
|
4
|
+
Write = "write"
|
|
5
|
+
}
|
|
6
|
+
export declare type AptlyScope = `aptly.${AptlyPermissionModel}` | `aptly.${AptlyPermissionModel}.${AptlyScopeAction}`;
|
|
7
|
+
export declare type AptlyScopeTranslations = {
|
|
8
|
+
[key in AptlyScope]: {
|
|
9
|
+
label: string;
|
|
10
|
+
description?: string;
|
|
11
|
+
};
|
|
12
|
+
};
|
package/core/scope.js
ADDED
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.AptlyScopeAction = void 0;
|
|
4
|
+
var AptlyScopeAction;
|
|
5
|
+
(function (AptlyScopeAction) {
|
|
6
|
+
AptlyScopeAction["Read"] = "read";
|
|
7
|
+
AptlyScopeAction["Write"] = "write";
|
|
8
|
+
})(AptlyScopeAction = exports.AptlyScopeAction || (exports.AptlyScopeAction = {}));
|
|
9
|
+
//# sourceMappingURL=scope.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"scope.js","sourceRoot":"","sources":["scope.ts"],"names":[],"mappings":";;;AAEA,IAAY,gBAGX;AAHD,WAAY,gBAAgB;IAC1B,iCAAa,CAAA;IACb,mCAAe,CAAA;AACjB,CAAC,EAHW,gBAAgB,GAAhB,wBAAgB,KAAhB,wBAAgB,QAG3B"}
|
package/core/scope.ts
ADDED
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { AptlyPermissionModel } from './permission';
|
|
2
|
+
|
|
3
|
+
export enum AptlyScopeAction {
|
|
4
|
+
Read = 'read',
|
|
5
|
+
Write = 'write',
|
|
6
|
+
}
|
|
7
|
+
|
|
8
|
+
export type AptlyScope = `aptly.${AptlyPermissionModel}` | `aptly.${AptlyPermissionModel}.${AptlyScopeAction}`;
|
|
9
|
+
export type AptlyScopeTranslations = { [key in AptlyScope]: {
|
|
10
|
+
label: string;
|
|
11
|
+
description?: string;
|
|
12
|
+
}; };
|
package/enums/document.js
CHANGED
package/enums/document.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"document.js","sourceRoot":"","sources":["document.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"document.js","sourceRoot":"","sources":["document.ts"],"names":[],"mappings":";;;AACA,IAAY,iBAoBX;AApBD,WAAY,iBAAiB;IAC3B,0CAAqB,CAAA;IACrB,gEAA2C,CAAA;IAC3C,0CAAqB,CAAA;IACrB,4CAAuB,CAAA;IACvB,8CAAyB,CAAA;IACzB,wDAAmC,CAAA;IACnC,gCAAW,CAAA;IACX,sCAAiB,CAAA;IACjB,sDAAiC,CAAA;IACjC,wCAAmB,CAAA;IACnB,4DAAuC,CAAA;IACvC,oDAA+B,CAAA;IAC/B,wDAAmC,CAAA;IACnC,0DAAqC,CAAA;IACrC,sCAAiB,CAAA;IACjB,0CAAqB,CAAA;IACrB,4CAAuB,CAAA;IACvB,0CAAqB,CAAA;IACrB,oCAAe,CAAA;AACjB,CAAC,EApBW,iBAAiB,GAAjB,yBAAiB,KAAjB,yBAAiB,QAoB5B;AAED,IAAY,gBAOX;AAPD,WAAY,gBAAgB;IAC1B,mCAAe,CAAA;IACf,uCAAmB,CAAA;IACnB,uCAAmB,CAAA;IACnB,mCAAe,CAAA;IACf,qCAAiB,CAAA;IACjB,yCAAqB,CAAA;AACvB,CAAC,EAPW,gBAAgB,GAAhB,wBAAgB,KAAhB,wBAAgB,QAO3B"}
|