@aptly-as/types 1.4.1 → 1.5.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/permission.d.ts +2 -2
- package/core/permission.ts +2 -0
- package/models/department.d.ts +28 -0
- package/models/department.js +3 -0
- package/models/department.js.map +1 -0
- package/models/department.ts +31 -0
- package/models/extends.ts +1 -1
- package/models/index.d.ts +1 -0
- package/models/index.js +1 -0
- package/models/index.js.map +1 -1
- package/models/index.ts +1 -0
- package/models/organization.d.ts +20 -0
- package/models/organization.ts +21 -0
- package/package.json +1 -1
package/core/permission.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
export declare type AptlyPermissionGlobalModels = 'superAdmin' | 'admin' | 'beta' | 'default';
|
|
2
2
|
export declare type AptlyPermissionModules = 'projectBooking' | 'projectSupport' | 'projectRecommendations';
|
|
3
|
-
export declare type AptlyPermissionModulesModels = 'default' | 'core' | 'algorithms' | 'booking' | 'unitExtraOptions' | 'unitExtraFields' | 'pages' | 'recommendations' | 'subcontractor' | 'optionLabels' | 'support' | 'testing';
|
|
3
|
+
export declare type AptlyPermissionModulesModels = 'default' | 'core' | 'algorithms' | 'departments' | 'booking' | 'unitExtraOptions' | 'unitExtraFields' | 'pages' | 'recommendations' | 'subcontractor' | 'optionLabels' | 'support' | 'testing';
|
|
4
4
|
export declare type AptlyPermissionOrganizationModels = 'testingAdmin' | 'admin' | 'content' | 'reports' | 'support' | 'thirdParty' | 'default';
|
|
5
|
-
export declare type AptlyPermissionModels = 'admin' | 'adminBilling' | 'adminProducers' | 'adminProducts' | 'adminReport' | 'adminStats' | 'adminSuppliers' | 'adminTags' | 'adminTesting' | 'adminUsers' | 'adminOrganizations' | 'beta' | 'organization' | 'organizationBooking' | 'organizationClients' | 'organizationMembers' | 'organizationOptionLabels' | 'organizationOrders' | 'organizationProducts' | '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';
|
|
5
|
+
export declare type AptlyPermissionModels = 'admin' | 'adminBilling' | 'adminProducers' | 'adminProducts' | 'adminReport' | 'adminStats' | 'adminSuppliers' | 'adminTags' | 'adminTesting' | 'adminUsers' | 'adminOrganizations' | 'beta' | 'organization' | 'organizationBooking' | 'organizationClients' | 'organizationDepartments' | 'organizationMembers' | 'organizationOptionLabels' | 'organizationOrders' | 'organizationProducts' | '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';
|
package/core/permission.ts
CHANGED
|
@@ -7,6 +7,7 @@ export type AptlyPermissionModulesModels =
|
|
|
7
7
|
| 'default'
|
|
8
8
|
| 'core'
|
|
9
9
|
| 'algorithms'
|
|
10
|
+
| 'departments'
|
|
10
11
|
| 'booking'
|
|
11
12
|
| 'unitExtraOptions'
|
|
12
13
|
| 'unitExtraFields'
|
|
@@ -42,6 +43,7 @@ export type AptlyPermissionModels =
|
|
|
42
43
|
| 'organization'
|
|
43
44
|
| 'organizationBooking'
|
|
44
45
|
| 'organizationClients'
|
|
46
|
+
| 'organizationDepartments'
|
|
45
47
|
| 'organizationMembers'
|
|
46
48
|
| 'organizationOptionLabels'
|
|
47
49
|
| 'organizationOrders'
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import { AptlyPermissionOrganizationModels } from '../core';
|
|
2
|
+
import { AptlyOrganizationSchema } from './organization';
|
|
3
|
+
import { AptlyProjectSchema } from './project';
|
|
4
|
+
import { AptlyUserSchema } from './user';
|
|
5
|
+
import { AptlyBaseSchema } from './extends';
|
|
6
|
+
import { AptlyUnitSchema } from './unit';
|
|
7
|
+
export declare type AptlyDepartment = AptlyDepartmentGeneric<string, string>;
|
|
8
|
+
export interface AptlyDepartmentGeneric<ID, DATE> extends Omit<AptlyBaseSchema<ID, DATE>, 'archived'> {
|
|
9
|
+
organization: ID | AptlyOrganizationSchema<ID, DATE>;
|
|
10
|
+
projects: AptlyDepartmentProjectGeneric<ID, DATE>[];
|
|
11
|
+
users: AptlyDepartmentUserGeneric<ID, DATE>[];
|
|
12
|
+
}
|
|
13
|
+
export declare type AptlyDepartmentProject = AptlyDepartmentProjectGeneric<string, string>;
|
|
14
|
+
export interface AptlyDepartmentProjectGeneric<ID, DATE> {
|
|
15
|
+
_id: ID;
|
|
16
|
+
project: (ID | AptlyProjectSchema<ID, DATE>);
|
|
17
|
+
units: (ID | AptlyUnitSchema<ID, DATE>)[] | null;
|
|
18
|
+
createdAt: DATE;
|
|
19
|
+
updatedAt: DATE;
|
|
20
|
+
}
|
|
21
|
+
export declare type AptlyDepartmentUser = AptlyDepartmentUserGeneric<string, string>;
|
|
22
|
+
export interface AptlyDepartmentUserGeneric<ID, DATE> {
|
|
23
|
+
_id: ID;
|
|
24
|
+
user: (ID | AptlyUserSchema<ID, DATE>);
|
|
25
|
+
permissions: AptlyPermissionOrganizationModels[];
|
|
26
|
+
createdAt: DATE;
|
|
27
|
+
updatedAt: DATE;
|
|
28
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"department.js","sourceRoot":"","sources":["department.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import { AptlyPermissionOrganizationModels } from '../core';
|
|
2
|
+
import { AptlyOrganizationSchema } from './organization';
|
|
3
|
+
import { AptlyProjectSchema } from './project';
|
|
4
|
+
import { AptlyUserSchema } from './user';
|
|
5
|
+
import { AptlyBaseSchema } from './extends';
|
|
6
|
+
import { AptlyUnitSchema } from './unit';
|
|
7
|
+
|
|
8
|
+
export type AptlyDepartment = AptlyDepartmentGeneric<string, string>;
|
|
9
|
+
export interface AptlyDepartmentGeneric<ID, DATE> extends Omit<AptlyBaseSchema<ID, DATE>, 'archived'> {
|
|
10
|
+
organization: ID | AptlyOrganizationSchema<ID, DATE>;
|
|
11
|
+
projects: AptlyDepartmentProjectGeneric<ID, DATE>[];
|
|
12
|
+
users: AptlyDepartmentUserGeneric<ID, DATE>[];
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
export type AptlyDepartmentProject = AptlyDepartmentProjectGeneric<string, string>;
|
|
16
|
+
export interface AptlyDepartmentProjectGeneric<ID, DATE> {
|
|
17
|
+
_id: ID;
|
|
18
|
+
project: (ID | AptlyProjectSchema<ID, DATE>);
|
|
19
|
+
units: (ID | AptlyUnitSchema<ID, DATE>)[] | null;
|
|
20
|
+
createdAt: DATE;
|
|
21
|
+
updatedAt: DATE;
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
export type AptlyDepartmentUser = AptlyDepartmentUserGeneric<string, string>;
|
|
25
|
+
export interface AptlyDepartmentUserGeneric<ID, DATE> {
|
|
26
|
+
_id: ID;
|
|
27
|
+
user: (ID | AptlyUserSchema<ID, DATE>);
|
|
28
|
+
permissions: AptlyPermissionOrganizationModels[];
|
|
29
|
+
createdAt: DATE;
|
|
30
|
+
updatedAt: DATE;
|
|
31
|
+
}
|
package/models/extends.ts
CHANGED
package/models/index.d.ts
CHANGED
package/models/index.js
CHANGED
|
@@ -5,6 +5,7 @@ function __export(m) {
|
|
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
6
|
__export(require("./booking"));
|
|
7
7
|
__export(require("./client"));
|
|
8
|
+
__export(require("./department"));
|
|
8
9
|
__export(require("./document"));
|
|
9
10
|
__export(require("./extends"));
|
|
10
11
|
__export(require("./inquiry"));
|
package/models/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["index.ts"],"names":[],"mappings":";;;;;AACA,+BAA0B;AAC1B,8BAAyB;AACzB,gCAA2B;AAC3B,+BAA0B;AAC1B,+BAA0B;AAC1B,6BAAwB;AACxB,4CAAuC;AACvC,oCAA+B;AAC/B,6BAAwB;AACxB,oCAA+B;AAC/B,4BAAuB;AACvB,gCAA2B;AAC3B,+BAA0B;AAC1B,qCAAgC;AAChC,+BAA0B;AAC1B,sCAAiC;AACjC,sCAAiC;AACjC,gCAA2B;AAC3B,2BAAsB;AACtB,4BAAuB;AACvB,qCAAgC;AAChC,kCAA6B;AAC7B,uCAAkC;AAClC,4BAAuB;AACvB,+BAA0B;AAC1B,qCAAgC"}
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["index.ts"],"names":[],"mappings":";;;;;AACA,+BAA0B;AAC1B,8BAAyB;AACzB,kCAA6B;AAC7B,gCAA2B;AAC3B,+BAA0B;AAC1B,+BAA0B;AAC1B,6BAAwB;AACxB,4CAAuC;AACvC,oCAA+B;AAC/B,6BAAwB;AACxB,oCAA+B;AAC/B,4BAAuB;AACvB,gCAA2B;AAC3B,+BAA0B;AAC1B,qCAAgC;AAChC,+BAA0B;AAC1B,sCAAiC;AACjC,sCAAiC;AACjC,gCAA2B;AAC3B,2BAAsB;AACtB,4BAAuB;AACvB,qCAAgC;AAChC,kCAA6B;AAC7B,uCAAkC;AAClC,4BAAuB;AACvB,+BAA0B;AAC1B,qCAAgC"}
|
package/models/index.ts
CHANGED
package/models/organization.d.ts
CHANGED
|
@@ -3,6 +3,8 @@ import { AptlySignageSchema } from '../core/signage';
|
|
|
3
3
|
import { AptlyUserSchema } from './user';
|
|
4
4
|
import { AptlyMediaSrc } from './media';
|
|
5
5
|
import { AptlyBaseSchema } from './extends';
|
|
6
|
+
import { AptlyDepartmentGeneric } from './department';
|
|
7
|
+
import { AptlyProducerSchema } from './producer';
|
|
6
8
|
export declare type AptlyOrganization = AptlyOrganizationSchema<string, string>;
|
|
7
9
|
export interface AptlyOrganizationSchema<ID, DATE> extends AptlyBaseSchema<ID, DATE> {
|
|
8
10
|
slug: string;
|
|
@@ -26,6 +28,7 @@ export interface AptlyOrganizationSchema<ID, DATE> extends AptlyBaseSchema<ID, D
|
|
|
26
28
|
modules: AptlyPermissionModulesModels[];
|
|
27
29
|
contractSign?: AptlySignageSchema<ID, DATE>;
|
|
28
30
|
integrations: AptlyOrganizationIntegrationsSchema<ID>[];
|
|
31
|
+
invites: AptlyOrganizationInviteSchema<ID, DATE>[];
|
|
29
32
|
/**
|
|
30
33
|
* @deprecated use createdAt
|
|
31
34
|
*/
|
|
@@ -43,4 +46,21 @@ export interface AptlyOrganizationMemberSchema<ID, DATE> {
|
|
|
43
46
|
_id: ID;
|
|
44
47
|
user: AptlyUserSchema<ID, DATE> | ID;
|
|
45
48
|
permissions: AptlyPermissionOrganizationModels[];
|
|
49
|
+
projects?: (ID | AptlyProducerSchema<ID, DATE>)[] | null;
|
|
50
|
+
departments?: (ID | AptlyDepartmentGeneric<ID, DATE>)[];
|
|
51
|
+
}
|
|
52
|
+
export declare type AptlyOrganizationInvite = AptlyOrganizationInviteSchema<string, string>;
|
|
53
|
+
export interface AptlyOrganizationInviteSchema<ID, DATE> {
|
|
54
|
+
_id: ID;
|
|
55
|
+
code: string;
|
|
56
|
+
created: DATE;
|
|
57
|
+
permissions?: AptlyPermissionOrganizationModels[];
|
|
58
|
+
projects?: ID[] | null;
|
|
59
|
+
departments?: ID[] | null;
|
|
60
|
+
claim: {
|
|
61
|
+
email?: string;
|
|
62
|
+
claimed: boolean;
|
|
63
|
+
claimedBy: ID;
|
|
64
|
+
claimTime?: DATE;
|
|
65
|
+
};
|
|
46
66
|
}
|
package/models/organization.ts
CHANGED
|
@@ -3,6 +3,8 @@ import { AptlySignageSchema } from '../core/signage';
|
|
|
3
3
|
import { AptlyUserSchema } from './user';
|
|
4
4
|
import { AptlyMediaSrc } from './media';
|
|
5
5
|
import { AptlyBaseSchema } from './extends';
|
|
6
|
+
import { AptlyDepartmentGeneric } from './department';
|
|
7
|
+
import { AptlyProducerSchema } from './producer';
|
|
6
8
|
|
|
7
9
|
export type AptlyOrganization = AptlyOrganizationSchema<string, string>;
|
|
8
10
|
export interface AptlyOrganizationSchema<ID, DATE> extends AptlyBaseSchema<ID, DATE> {
|
|
@@ -27,6 +29,7 @@ export interface AptlyOrganizationSchema<ID, DATE> extends AptlyBaseSchema<ID, D
|
|
|
27
29
|
modules: AptlyPermissionModulesModels[];
|
|
28
30
|
contractSign?: AptlySignageSchema<ID, DATE>;
|
|
29
31
|
integrations: AptlyOrganizationIntegrationsSchema<ID>[];
|
|
32
|
+
invites: AptlyOrganizationInviteSchema<ID, DATE>[];
|
|
30
33
|
|
|
31
34
|
/**
|
|
32
35
|
* @deprecated use createdAt
|
|
@@ -47,4 +50,22 @@ export interface AptlyOrganizationMemberSchema<ID, DATE> {
|
|
|
47
50
|
_id: ID;
|
|
48
51
|
user: AptlyUserSchema<ID, DATE> | ID;
|
|
49
52
|
permissions: AptlyPermissionOrganizationModels[];
|
|
53
|
+
projects?: (ID | AptlyProducerSchema<ID, DATE>)[] | null;
|
|
54
|
+
departments?: (ID | AptlyDepartmentGeneric<ID, DATE>)[];
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
export type AptlyOrganizationInvite = AptlyOrganizationInviteSchema<string, string>;
|
|
58
|
+
export interface AptlyOrganizationInviteSchema<ID, DATE> {
|
|
59
|
+
_id: ID;
|
|
60
|
+
code: string;
|
|
61
|
+
created: DATE;
|
|
62
|
+
permissions?: AptlyPermissionOrganizationModels[];
|
|
63
|
+
projects?: ID[] | null;
|
|
64
|
+
departments?: ID[] | null;
|
|
65
|
+
claim: {
|
|
66
|
+
email?: string;
|
|
67
|
+
claimed: boolean;
|
|
68
|
+
claimedBy: ID;
|
|
69
|
+
claimTime?: DATE;
|
|
70
|
+
}
|
|
50
71
|
}
|