@aptly-as/types 2.0.7 → 2.1.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.
@@ -0,0 +1,101 @@
1
+ export declare enum AptlyModule {
2
+ Algorithms = "algorithms",
3
+ Booking = "booking",
4
+ Core = "core",
5
+ Default = "default",
6
+ Departments = "departments",
7
+ OptionLabels = "optionLabels",
8
+ Pages = "pages",
9
+ ProductsExtended = "productsExtended",
10
+ Recommendations = "recommendations",
11
+ Subcontractor = "subcontractor",
12
+ Support = "support",
13
+ Testing = "testing",
14
+ UnitExtraOptions = "unitExtraOptions",
15
+ UnitExtraFields = "unitExtraFields"
16
+ }
17
+ export declare enum AptlyScope {
18
+ Admin = "admin",
19
+ AdminBilling = "adminBilling",
20
+ AdminProducers = "adminProducers",
21
+ AdminProducts = "adminProducts",
22
+ AdminReport = "adminReport",
23
+ AdminStats = "adminStats",
24
+ AdminSuppliers = "adminSuppliers",
25
+ AdminTags = "adminTags",
26
+ AdminTesting = "adminTesting",
27
+ AdminUsers = "adminUsers",
28
+ AdminOrganizations = "adminOrganizations",
29
+ Beta = "beta",
30
+ Organization = "organization",
31
+ OrganizationAlgorithms = "organizationAlgorithms",
32
+ OrganizationBooking = "organizationBooking",
33
+ OrganizationClients = "organizationClients",
34
+ OrganizationDepartments = "organizationDepartments",
35
+ OrganizationLogo = "organizationLogo",
36
+ OrganizationMembers = "organizationMembers",
37
+ OrganizationOptionLabels = "organizationOptionLabels",
38
+ OrganizationOrders = "organizationOrders",
39
+ OrganizationPages = "organizationPages",
40
+ OrganizationProducts = "organizationProducts",
41
+ OrganizationProductsExtended = "organizationProductsExtended",
42
+ OrganizationRecommendations = "organizationRecommendations",
43
+ OrganizationReport = "organizationReport",
44
+ OrganizationStats = "organizationStats",
45
+ OrganizationUnitTemplates = "organizationUnitTemplates",
46
+ OrganizationUpsellTemplates = "organizationUpsellTemplates",
47
+ OrganizationWebhooks = "organizationWebhooks",
48
+ Project = "project",
49
+ ProjectAlgorithms = "projectAlgorithms",
50
+ ProjectBooking = "projectBooking",
51
+ ProjectDocuments = "projectDocuments",
52
+ ProjectInquiry = "projectInquiry",
53
+ ProjectOrders = "projectOrders",
54
+ ProjectPages = "projectPages",
55
+ ProjectPeriods = "projectPeriods",
56
+ ProjectProducts = "projectProducts",
57
+ ProjectRecommendations = "projectRecommendations",
58
+ ProjectReport = "projectReport",
59
+ ProjectReportPrice = "projectReportPrice",
60
+ ProjectTheme = "projectTheme",
61
+ ProjectSigning = "projectSigning",
62
+ ProjectSubcontractor = "projectSubcontractor",
63
+ ProjectUnits = "projectUnits",
64
+ ProjectUnitInvites = "projectUnitInvites",
65
+ ProjectUnitExtraFields = "projectUnitExtraFields",
66
+ ProjectUnitExtraOptions = "projectUnitExtraOptions",
67
+ ProjectUnitTemplates = "projectUnitTemplates",
68
+ ProjectUnitTemplatesAlgorithms = "projectUnitTemplatesAlgorithms",
69
+ ProjectUnitTemplatesPrices = "projectUnitTemplatesPrices",
70
+ ProjectUpsellTemplates = "projectUpsellTemplates",
71
+ Unit = "unit",
72
+ UnitBooking = "unitBooking",
73
+ UnitInquiry = "unitInquiry",
74
+ UnitNotes = "unitNotes",
75
+ UnitOrders = "unitOrders",
76
+ UnitPages = "unitPages",
77
+ UnitProducts = "unitProducts",
78
+ UnitReport = "unitReport"
79
+ }
80
+ export declare enum AptlyUserRole {
81
+ Admin = "admin",
82
+ Beta = "beta",
83
+ Default = "default",
84
+ SuperAdmin = "superAdmin"
85
+ }
86
+ export declare enum AptlyOrganizationRole {
87
+ Admin = "admin",
88
+ Content = "content",
89
+ OrganizationContent = "organizationContent",
90
+ Default = "default",
91
+ ProjectAdmin = "projectAdmin",
92
+ TestingAdmin = "testingAdmin",
93
+ Reports = "reports",
94
+ Support = "support",
95
+ ThirdParty = "thirdParty"
96
+ }
97
+ export type AptlyScopeCrud = 'C' | 'R' | 'U' | 'D';
98
+ export type AptlyScopeSchemaValue = 'C' | 'CR' | 'CRU' | 'CRUD' | 'R' | 'RU' | 'RUD' | 'U' | 'UD' | 'D';
99
+ export type AptlyScopeSchema = {
100
+ [key in AptlyScope]: AptlyScopeSchemaValue;
101
+ };
@@ -0,0 +1,100 @@
1
+ export var AptlyModule;
2
+ (function (AptlyModule) {
3
+ AptlyModule["Algorithms"] = "algorithms";
4
+ AptlyModule["Booking"] = "booking";
5
+ AptlyModule["Core"] = "core";
6
+ AptlyModule["Default"] = "default";
7
+ AptlyModule["Departments"] = "departments";
8
+ AptlyModule["OptionLabels"] = "optionLabels";
9
+ AptlyModule["Pages"] = "pages";
10
+ AptlyModule["ProductsExtended"] = "productsExtended";
11
+ AptlyModule["Recommendations"] = "recommendations";
12
+ AptlyModule["Subcontractor"] = "subcontractor";
13
+ AptlyModule["Support"] = "support";
14
+ AptlyModule["Testing"] = "testing";
15
+ AptlyModule["UnitExtraOptions"] = "unitExtraOptions";
16
+ AptlyModule["UnitExtraFields"] = "unitExtraFields";
17
+ })(AptlyModule || (AptlyModule = {}));
18
+ export var AptlyScope;
19
+ (function (AptlyScope) {
20
+ AptlyScope["Admin"] = "admin";
21
+ AptlyScope["AdminBilling"] = "adminBilling";
22
+ AptlyScope["AdminProducers"] = "adminProducers";
23
+ AptlyScope["AdminProducts"] = "adminProducts";
24
+ AptlyScope["AdminReport"] = "adminReport";
25
+ AptlyScope["AdminStats"] = "adminStats";
26
+ AptlyScope["AdminSuppliers"] = "adminSuppliers";
27
+ AptlyScope["AdminTags"] = "adminTags";
28
+ AptlyScope["AdminTesting"] = "adminTesting";
29
+ AptlyScope["AdminUsers"] = "adminUsers";
30
+ AptlyScope["AdminOrganizations"] = "adminOrganizations";
31
+ AptlyScope["Beta"] = "beta";
32
+ AptlyScope["Organization"] = "organization";
33
+ AptlyScope["OrganizationAlgorithms"] = "organizationAlgorithms";
34
+ AptlyScope["OrganizationBooking"] = "organizationBooking";
35
+ AptlyScope["OrganizationClients"] = "organizationClients";
36
+ AptlyScope["OrganizationDepartments"] = "organizationDepartments";
37
+ AptlyScope["OrganizationLogo"] = "organizationLogo";
38
+ AptlyScope["OrganizationMembers"] = "organizationMembers";
39
+ AptlyScope["OrganizationOptionLabels"] = "organizationOptionLabels";
40
+ AptlyScope["OrganizationOrders"] = "organizationOrders";
41
+ AptlyScope["OrganizationPages"] = "organizationPages";
42
+ AptlyScope["OrganizationProducts"] = "organizationProducts";
43
+ AptlyScope["OrganizationProductsExtended"] = "organizationProductsExtended";
44
+ AptlyScope["OrganizationRecommendations"] = "organizationRecommendations";
45
+ AptlyScope["OrganizationReport"] = "organizationReport";
46
+ AptlyScope["OrganizationStats"] = "organizationStats";
47
+ AptlyScope["OrganizationUnitTemplates"] = "organizationUnitTemplates";
48
+ AptlyScope["OrganizationUpsellTemplates"] = "organizationUpsellTemplates";
49
+ AptlyScope["OrganizationWebhooks"] = "organizationWebhooks";
50
+ AptlyScope["Project"] = "project";
51
+ AptlyScope["ProjectAlgorithms"] = "projectAlgorithms";
52
+ AptlyScope["ProjectBooking"] = "projectBooking";
53
+ AptlyScope["ProjectDocuments"] = "projectDocuments";
54
+ AptlyScope["ProjectInquiry"] = "projectInquiry";
55
+ AptlyScope["ProjectOrders"] = "projectOrders";
56
+ AptlyScope["ProjectPages"] = "projectPages";
57
+ AptlyScope["ProjectPeriods"] = "projectPeriods";
58
+ AptlyScope["ProjectProducts"] = "projectProducts";
59
+ AptlyScope["ProjectRecommendations"] = "projectRecommendations";
60
+ AptlyScope["ProjectReport"] = "projectReport";
61
+ AptlyScope["ProjectReportPrice"] = "projectReportPrice";
62
+ AptlyScope["ProjectTheme"] = "projectTheme";
63
+ AptlyScope["ProjectSigning"] = "projectSigning";
64
+ AptlyScope["ProjectSubcontractor"] = "projectSubcontractor";
65
+ AptlyScope["ProjectUnits"] = "projectUnits";
66
+ AptlyScope["ProjectUnitInvites"] = "projectUnitInvites";
67
+ AptlyScope["ProjectUnitExtraFields"] = "projectUnitExtraFields";
68
+ AptlyScope["ProjectUnitExtraOptions"] = "projectUnitExtraOptions";
69
+ AptlyScope["ProjectUnitTemplates"] = "projectUnitTemplates";
70
+ AptlyScope["ProjectUnitTemplatesAlgorithms"] = "projectUnitTemplatesAlgorithms";
71
+ AptlyScope["ProjectUnitTemplatesPrices"] = "projectUnitTemplatesPrices";
72
+ AptlyScope["ProjectUpsellTemplates"] = "projectUpsellTemplates";
73
+ AptlyScope["Unit"] = "unit";
74
+ AptlyScope["UnitBooking"] = "unitBooking";
75
+ AptlyScope["UnitInquiry"] = "unitInquiry";
76
+ AptlyScope["UnitNotes"] = "unitNotes";
77
+ AptlyScope["UnitOrders"] = "unitOrders";
78
+ AptlyScope["UnitPages"] = "unitPages";
79
+ AptlyScope["UnitProducts"] = "unitProducts";
80
+ AptlyScope["UnitReport"] = "unitReport";
81
+ })(AptlyScope || (AptlyScope = {}));
82
+ export var AptlyUserRole;
83
+ (function (AptlyUserRole) {
84
+ AptlyUserRole["Admin"] = "admin";
85
+ AptlyUserRole["Beta"] = "beta";
86
+ AptlyUserRole["Default"] = "default";
87
+ AptlyUserRole["SuperAdmin"] = "superAdmin";
88
+ })(AptlyUserRole || (AptlyUserRole = {}));
89
+ export var AptlyOrganizationRole;
90
+ (function (AptlyOrganizationRole) {
91
+ AptlyOrganizationRole["Admin"] = "admin";
92
+ AptlyOrganizationRole["Content"] = "content";
93
+ AptlyOrganizationRole["OrganizationContent"] = "organizationContent";
94
+ AptlyOrganizationRole["Default"] = "default";
95
+ AptlyOrganizationRole["ProjectAdmin"] = "projectAdmin";
96
+ AptlyOrganizationRole["TestingAdmin"] = "testingAdmin";
97
+ AptlyOrganizationRole["Reports"] = "reports";
98
+ AptlyOrganizationRole["Support"] = "support";
99
+ AptlyOrganizationRole["ThirdParty"] = "thirdParty";
100
+ })(AptlyOrganizationRole || (AptlyOrganizationRole = {}));
package/core/scope.d.ts CHANGED
@@ -6,7 +6,6 @@ export declare enum AptlyModules {
6
6
  Departments = "departments",
7
7
  OptionLabels = "optionLabels",
8
8
  Pages = "pages",
9
- Producer = "producer",
10
9
  ProductsExtended = "productsExtended",
11
10
  Recommendations = "recommendations",
12
11
  Subcontractor = "subcontractor",
@@ -49,7 +48,6 @@ export declare enum AptlyScopes {
49
48
  OrganizationUnitTemplates = "organizationUnitTemplates",
50
49
  OrganizationUpsellTemplates = "organizationUpsellTemplates",
51
50
  OrganizationWebhooks = "organizationWebhooks",
52
- Producer = "producer",
53
51
  Project = "project",
54
52
  ProjectAlgorithms = "projectAlgorithms",
55
53
  ProjectBooking = "projectBooking",
package/core/scope.js CHANGED
@@ -7,7 +7,6 @@ export var AptlyModules;
7
7
  AptlyModules["Departments"] = "departments";
8
8
  AptlyModules["OptionLabels"] = "optionLabels";
9
9
  AptlyModules["Pages"] = "pages";
10
- AptlyModules["Producer"] = "producer";
11
10
  AptlyModules["ProductsExtended"] = "productsExtended";
12
11
  AptlyModules["Recommendations"] = "recommendations";
13
12
  AptlyModules["Subcontractor"] = "subcontractor";
@@ -51,7 +50,6 @@ export var AptlyScopes;
51
50
  AptlyScopes["OrganizationUnitTemplates"] = "organizationUnitTemplates";
52
51
  AptlyScopes["OrganizationUpsellTemplates"] = "organizationUpsellTemplates";
53
52
  AptlyScopes["OrganizationWebhooks"] = "organizationWebhooks";
54
- AptlyScopes["Producer"] = "producer";
55
53
  AptlyScopes["Project"] = "project";
56
54
  AptlyScopes["ProjectAlgorithms"] = "projectAlgorithms";
57
55
  AptlyScopes["ProjectBooking"] = "projectBooking";
package/enums/index.d.ts CHANGED
@@ -102,3 +102,8 @@ export declare enum AptlyIcon {
102
102
  Info = "info",
103
103
  Map = "map"
104
104
  }
105
+ export declare enum AptlyProjectStatus {
106
+ NotStarted = "notStarted",
107
+ Started = "started",
108
+ Completed = "completed"
109
+ }
package/enums/index.js CHANGED
@@ -118,3 +118,9 @@ export var AptlyIcon;
118
118
  AptlyIcon["Info"] = "info";
119
119
  AptlyIcon["Map"] = "map";
120
120
  })(AptlyIcon || (AptlyIcon = {}));
121
+ export var AptlyProjectStatus;
122
+ (function (AptlyProjectStatus) {
123
+ AptlyProjectStatus["NotStarted"] = "notStarted";
124
+ AptlyProjectStatus["Started"] = "started";
125
+ AptlyProjectStatus["Completed"] = "completed";
126
+ })(AptlyProjectStatus || (AptlyProjectStatus = {}));
@@ -1,6 +1,7 @@
1
1
  import { AptlyOrganizationSchema } from './organization.js';
2
2
  import { AptlyProjectSchema } from './project.js';
3
3
  import { AptlyUnitSchema } from './unit.js';
4
+ import { AptlyUserSchema } from './user.js';
4
5
  export type AptlyBooking = AptlyBookingSchema<string, string>;
5
6
  export interface AptlyBookingSchema<ID, DATE> {
6
7
  _id: ID;
@@ -38,7 +39,7 @@ export interface AptlyAvailabilityCalendarSchema<ID, DATE> {
38
39
  };
39
40
  };
40
41
  };
41
- attendees: ID[];
42
+ attendees: (ID | AptlyUserSchema<ID, DATE>)[];
42
43
  availableTimes: AptlyAvailabilityCalendarAvailableTimesSchema<ID, DATE>[];
43
44
  endAvailabilityAt?: DATE;
44
45
  userAvailability?: ID[];
@@ -27,3 +27,8 @@ export interface AptlyDBCrawlerCleaner {
27
27
  dontClean?: boolean;
28
28
  lastClean?: boolean;
29
29
  }
30
+ export interface AptlyAddress {
31
+ street?: string;
32
+ zip?: string;
33
+ city?: string;
34
+ }
@@ -3,7 +3,7 @@ import { AptlyOrganizationRoles, AptlyAppScope, AptlySignageSchema } from '../co
3
3
  import { AptlyModuleItemSchema } from './module.js';
4
4
  import { AptlyUserSchema } from './user.js';
5
5
  import { AptlyMediaSrc } from './media.js';
6
- import { AptlyBaseSchema, AptlyHistorySchema } from './extends.js';
6
+ import { AptlyAddress, AptlyBaseSchema, AptlyHistorySchema } from './extends.js';
7
7
  import { AptlyDepartmentGeneric } from './department.js';
8
8
  import { AptlyProducerSchema } from './producer.js';
9
9
  import { AptlyAppSchema } from './app.js';
@@ -16,16 +16,8 @@ export interface AptlyOrganizationSchema<ID, DATE> extends AptlyBaseSchema<ID, D
16
16
  negativeLogoMedia?: AptlyMediaSrc | null;
17
17
  projectLogoMedia?: AptlyMediaSrc | null;
18
18
  address: {
19
- visit: {
20
- street: string;
21
- zip: string;
22
- city: string;
23
- };
24
- post: {
25
- street: string;
26
- zip: string;
27
- city: string;
28
- };
19
+ visit: AptlyAddress;
20
+ post: AptlyAddress;
29
21
  };
30
22
  phone: string;
31
23
  email: string;
@@ -1,9 +1,10 @@
1
+ import { AptlyProjectStatus } from '../enums/index.js';
1
2
  import { AptlyAlgorithm, AptlyAlgorithmPipeline, AptlyAlgorithmPipelineSchema, AptlyAlgorithmSchema } from './algorithm.js';
2
3
  import { AptlyOrganizationSchema } from './organization.js';
3
4
  import { AptlyModules } from '../core/index.js';
4
5
  import { AptlyPeriod, AptlyPeriodSchema } from './period.js';
5
6
  import { AptlyUserSchema } from './user.js';
6
- import { AptlyBaseSchema, AptlyHistorySchema } from './extends.js';
7
+ import { AptlyAddress, AptlyBaseSchema, AptlyHistorySchema } from './extends.js';
7
8
  import { AptlyDocumentSchema } from './document.js';
8
9
  import { AptlyUnitOptionExtraItemSchema } from './unit.js';
9
10
  import { AptlyMediaSrc } from './media.js';
@@ -25,6 +26,11 @@ export interface AptlyProjectSchema<ID, DATE> extends AptlyBaseSchema<ID, DATE>,
25
26
  extraOptions?: AptlyUnitOptionExtraItemSchema<ID, DATE>[];
26
27
  gdprActive?: boolean;
27
28
  userFavorites?: ID[];
29
+ status?: AptlyProjectStatus;
30
+ number?: string;
31
+ developer?: string;
32
+ field?: string;
33
+ address?: AptlyAddress;
28
34
  created: DATE;
29
35
  }
30
36
  export type AptlyProjectPeriod = AptlyPeriod;
@@ -35,8 +41,10 @@ export type AptlyProjectAlgorithmPipeline = AptlyAlgorithmPipeline;
35
41
  export type AptlyProjectAlgorithmPipelineSchema<ID> = AptlyAlgorithmPipelineSchema<ID>;
36
42
  export interface AptlyProjectTheme {
37
43
  palette?: {
44
+ type?: 'dark' | 'light';
38
45
  primary?: AptlyProjectThemePalette;
39
46
  secondary?: AptlyProjectThemePalette;
47
+ error?: AptlyProjectThemePalette;
40
48
  font?: string;
41
49
  background?: string;
42
50
  confirm?: string;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@aptly-as/types",
3
- "version": "2.0.7",
3
+ "version": "2.1.0",
4
4
  "description": "Aptly types and enums",
5
5
  "type": "module",
6
6
  "main": "./index.js",