@aptly-as/types 1.7.3 → 1.7.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (53) hide show
  1. package/.idea/aptly-types.iml +12 -0
  2. package/.idea/codeStyles/Project.xml +62 -0
  3. package/.idea/codeStyles/codeStyleConfig.xml +5 -0
  4. package/.idea/modules.xml +8 -0
  5. package/.idea/vcs.xml +6 -0
  6. package/models/product.d.ts +1 -0
  7. package/package.json +1 -10
  8. package/core/api.ts +0 -15
  9. package/core/app.ts +0 -41
  10. package/core/cloudinary.ts +0 -11
  11. package/core/error.ts +0 -28
  12. package/core/fields.ts +0 -19
  13. package/core/index.ts +0 -16
  14. package/core/permission.ts +0 -212
  15. package/core/scope.ts +0 -12
  16. package/core/signage.ts +0 -21
  17. package/core/webhook-event-data.ts +0 -15
  18. package/enums/document.ts +0 -31
  19. package/enums/fields.ts +0 -26
  20. package/enums/index.ts +0 -120
  21. package/enums/unit-template.ts +0 -11
  22. package/enums/webhook.ts +0 -24
  23. package/index.ts +0 -3
  24. package/models/algorithm.ts +0 -31
  25. package/models/app.ts +0 -75
  26. package/models/booking.ts +0 -57
  27. package/models/client.ts +0 -15
  28. package/models/department.ts +0 -31
  29. package/models/document.ts +0 -35
  30. package/models/extends.ts +0 -39
  31. package/models/index.ts +0 -30
  32. package/models/inquiry.ts +0 -57
  33. package/models/media.ts +0 -71
  34. package/models/notification-trigger.ts +0 -10
  35. package/models/option-label.ts +0 -12
  36. package/models/order.ts +0 -66
  37. package/models/organization.ts +0 -91
  38. package/models/page.ts +0 -34
  39. package/models/producer.ts +0 -22
  40. package/models/product-stats.ts +0 -19
  41. package/models/product.ts +0 -78
  42. package/models/project.ts +0 -139
  43. package/models/queue-download.ts +0 -21
  44. package/models/recommendation.ts +0 -13
  45. package/models/supplier.ts +0 -17
  46. package/models/tag.ts +0 -9
  47. package/models/unit-email.ts +0 -39
  48. package/models/unit-template.ts +0 -140
  49. package/models/unit.ts +0 -242
  50. package/models/upsell-template.ts +0 -21
  51. package/models/user.ts +0 -19
  52. package/models/webhook-event.ts +0 -50
  53. package/models/webhook.ts +0 -21
package/models/order.ts DELETED
@@ -1,66 +0,0 @@
1
- import { AptlyOrderStatus } from '../enums';
2
- import { AptlyUnitItemParamSchema } from './unit';
3
- import { AptlyBaseSchema } from './extends';
4
-
5
- export type AptlyOrder = AptlyOrderSchema<string, string>;
6
- export interface AptlyOrderSchema<ID, DATE> extends Omit<AptlyBaseSchema<ID, DATE>, 'name' | 'archived'> {
7
- orderNumber: string;
8
- organization: ID;
9
- project: ID;
10
- period: ID;
11
- unit: ID;
12
- signers: ID[];
13
- status: AptlyOrderStatus;
14
- receipt: ID;
15
- attachments: ID[];
16
- signage: AptlyOrderSignageSchema<ID, DATE>;
17
- items: AptlyOrderItemSchema<ID, DATE>[];
18
- totalCost: number;
19
- pricePipeline: AptlyOrderPricePipelineItemSchema<ID>[];
20
-
21
- /**
22
- * @deprecated use createdAt
23
- */
24
- created: DATE;
25
- }
26
-
27
- export type AptlyOrderPricePipelineItem = AptlyOrderPricePipelineItemSchema<string>;
28
- export interface AptlyOrderPricePipelineItemSchema<ID> {
29
- _id: ID;
30
- label: string;
31
- value: number;
32
- }
33
-
34
- export type AptlyOrderSignage = AptlyOrderSignageSchema<string, string>;
35
- export interface AptlyOrderSignageSchema<ID, DATE> {
36
- hasReceivedFile: boolean;
37
- signed: boolean;
38
- documentId?: ID;
39
- signedFile?: ID;
40
- documentCreationDate?: DATE;
41
- expireDate?: DATE;
42
- customerSignerId?: string;
43
- organizationSignerId?: string;
44
- organizationSignedAt?: DATE;
45
- customerSignedAt?: DATE;
46
- }
47
-
48
- export type AptlyOrderItem = AptlyOrderItemSchema<string, string>;
49
- export interface AptlyOrderItemSchema<ID, DATE> {
50
- _id: ID;
51
- text?: string;
52
- product: ID;
53
- variant: ID;
54
- producer: ID;
55
- params: AptlyUnitItemParamSchema<ID, DATE>[];
56
- quantity: number;
57
- unitCost: number;
58
- pricePipeline: AptlyOrderItemPricePipelineSchema<ID>[];
59
- }
60
-
61
- export type AptlyOrderItemPricePipeline = AptlyOrderItemPricePipelineSchema<string>;
62
- export interface AptlyOrderItemPricePipelineSchema<ID> {
63
- _id: ID;
64
- label: string;
65
- value: number;
66
- }
@@ -1,91 +0,0 @@
1
- import {
2
- AptlyPermissionModulesModels,
3
- AptlyPermissionOrganizationModels,
4
- AptlyScope,
5
- AptlySignageSchema
6
- } from '../core';
7
- import { AptlyUserSchema } from './user';
8
- import { AptlyMediaSrc } from './media';
9
- import { AptlyBaseSchema } from './extends';
10
- import { AptlyDepartmentGeneric } from './department';
11
- import { AptlyProducerSchema } from './producer';
12
- import { AptlyAppSchema } from './app';
13
- import { AptlyAlgorithmSchema } from './algorithm';
14
-
15
- export type AptlyOrganization = AptlyOrganizationSchema<string, string>;
16
-
17
- export interface AptlyOrganizationSchema<ID, DATE> extends AptlyBaseSchema<ID, DATE> {
18
- slug: string;
19
- logo?: string | null;
20
- logoMedia?: AptlyMediaSrc | null;
21
- address: {
22
- visit: {
23
- street: string;
24
- zip: string;
25
- city: string;
26
- };
27
- post: {
28
- street: string;
29
- zip: string;
30
- city: string;
31
- };
32
- };
33
- phone: string;
34
- email: string;
35
- algorithms: AptlyAlgorithmSchema<ID>[];
36
- members: AptlyOrganizationMemberSchema<ID, DATE>[];
37
- modules: AptlyPermissionModulesModels[];
38
- contractSign?: AptlySignageSchema<ID, DATE>;
39
- integrations: AptlyOrganizationIntegrationsSchema<ID>[];
40
- invites: AptlyOrganizationInviteSchema<ID, DATE>[];
41
- apps: AptlyOrganizationAppConfigSchema<ID, DATE>[];
42
-
43
- /**
44
- * @deprecated use createdAt
45
- */
46
- created: DATE;
47
- }
48
-
49
- export type AptlyOrganizationIntegrations = AptlyOrganizationIntegrationsSchema<string>;
50
-
51
- export interface AptlyOrganizationIntegrationsSchema<ID> {
52
- _id: ID;
53
- integration: string;
54
- apiKey: string;
55
- organization: string;
56
- }
57
-
58
- export type AptlyOrganizationMember = AptlyOrganizationMemberSchema<string, string>;
59
-
60
- export interface AptlyOrganizationMemberSchema<ID, DATE> {
61
- _id: ID;
62
- user: AptlyUserSchema<ID, DATE> | ID;
63
- permissions: AptlyPermissionOrganizationModels[];
64
- projects?: (ID | AptlyProducerSchema<ID, DATE>)[] | null;
65
- departments?: (ID | AptlyDepartmentGeneric<ID, DATE>)[];
66
- }
67
-
68
- export type AptlyOrganizationInvite = AptlyOrganizationInviteSchema<string, string>;
69
-
70
- export interface AptlyOrganizationInviteSchema<ID, DATE> {
71
- _id: ID;
72
- code: string;
73
- created: DATE;
74
- permissions?: AptlyPermissionOrganizationModels[];
75
- projects?: ID[] | null;
76
- departments?: ID[] | null;
77
- claim: {
78
- email?: string;
79
- claimed: boolean;
80
- claimedBy: ID;
81
- claimTime?: DATE;
82
- };
83
- }
84
-
85
- export type AptlyOrganizationAppConfig<S extends object = object> = AptlyOrganizationAppConfigSchema<string, string, S>;
86
-
87
- export interface AptlyOrganizationAppConfigSchema<ID, DATE, S extends object = object> extends Omit<AptlyBaseSchema<ID, DATE>, 'name' | 'archived'> {
88
- app: ID | AptlyAppSchema<ID, DATE>;
89
- scope: AptlyScope[];
90
- settings: S;
91
- }
package/models/page.ts DELETED
@@ -1,34 +0,0 @@
1
- import { AptlyPageSectionType } from '../enums';
2
- import { AptlyBaseSchema } from './extends';
3
-
4
- export type AptlyPage = AptlyPageSchema<string, string>;
5
- export interface AptlyPageSchema<ID, DATE> extends AptlyBaseSchema<ID, DATE> {
6
- slug: string;
7
- project: ID;
8
- organization: ID;
9
- summary: string;
10
- icon?: string;
11
- upsellTemplate?: ID | null;
12
- sections: AptlyPageSectionSchema<ID, DATE>[];
13
-
14
- /**
15
- * @deprecated use upsellTemplate
16
- */
17
- legacy?: string; // Deprecated
18
- /**
19
- * @deprecated use upsellTemplate
20
- */
21
- image?: string; // Deprecated
22
- /**
23
- * @deprecated connected with project pages
24
- */
25
- showInMenu: boolean;
26
- }
27
-
28
- export type AptlyPageSection = AptlyPageSectionSchema<string, string>;
29
- export interface AptlyPageSectionSchema<ID, VALUE = any> {
30
- _id: ID;
31
- name: string;
32
- type: AptlyPageSectionType;
33
- value: VALUE;
34
- }
@@ -1,22 +0,0 @@
1
- import { AptlyBaseSchema } from './extends';
2
- import { AptlyMediaSrc } from './media';
3
-
4
- export type AptlyProducer = AptlyProducerSchema<string, string>;
5
- export interface AptlyProducerSchema<ID, DATE> extends AptlyBaseSchema<ID, DATE> {
6
- email: string;
7
- logo: string | null;
8
- logoMedia?: AptlyMediaSrc | null;
9
- url?: string;
10
- organization?: ID;
11
- createdBy: ID;
12
- tags: ID[];
13
-
14
- /**
15
- * @deprecated not used
16
- */
17
- extends: ID;
18
- /**
19
- * @deprecated use createdAt
20
- */
21
- created: DATE;
22
- }
@@ -1,19 +0,0 @@
1
- import { AptlyBaseSchema } from './extends';
2
-
3
- export type AptlyProductStats = AptlyProductStatsSchema<string, string>;
4
- export interface AptlyProductStatsSchema<ID, DATE> extends Omit<AptlyBaseSchema<ID, DATE>, 'name'> {
5
- product: ID;
6
- project: ID;
7
- organization: ID;
8
- producer: ID;
9
- extends?: ID;
10
- tags: ID[];
11
- stats: {
12
- likes: number;
13
- inUnits: number;
14
- amountInUnits: number;
15
- availability: number;
16
- picks: number;
17
- complaints: number;
18
- };
19
- }
package/models/product.ts DELETED
@@ -1,78 +0,0 @@
1
- import { AptlyBaseSchema, AptlyDBCrawlerCleaner } from './extends';
2
- import { AptlyMediaSrcSchema } from './media';
3
- import { AptlyProducerSchema } from './producer';
4
-
5
- export type AptlyProduct = AptlyProductSchema<string, string>;
6
- export interface AptlyProductSchema<ID, DATE> extends AptlyDBCrawlerCleaner, AptlyBaseSchema<ID, DATE> {
7
- searchableName: string;
8
- organization?: ID;
9
- project?: ID;
10
- extends?: ID;
11
- productNumber: string;
12
- description: string;
13
- images: AptlyProductImageSchema<ID, DATE>[];
14
- variants: AptlyProductVariantSchema<ID, DATE>[];
15
- url?: string;
16
- color?: string;
17
- colorLabel?: string;
18
- series?: string;
19
- style?: string;
20
- width?: string;
21
- height?: string;
22
- length?: string;
23
- material?: string;
24
- unitCost?: number;
25
- producer?: ID | AptlyProducerSchema<ID, DATE>;
26
- supplier?: ID;
27
- tags: ID[];
28
- documents: ID[];
29
- createdBy: ID;
30
- stats?: any;
31
- importID?: ID;
32
- source?: string;
33
- title?: string;
34
- /**
35
- * @deprecated Not used
36
- */
37
- likes: {
38
- user: ID;
39
- date: DATE;
40
- }[];
41
- /**
42
- * @deprecated use createdAt
43
- */
44
- created: DATE;
45
- }
46
-
47
- export type AptlyProductImage = AptlyProductImageSchema<string, string>;
48
- export interface AptlyProductImageSchema<ID, DATE> extends AptlyMediaSrcSchema<ID, DATE> {
49
- image: string;
50
- description?: string;
51
- featured?: boolean;
52
- }
53
-
54
- export type AptlyProductVariant = AptlyProductVariantSchema<string, string>;
55
- export interface AptlyProductVariantSchema<ID, DATE> {
56
- _id: ID;
57
- title?: string;
58
- images: AptlyProductImageSchema<ID, DATE>[];
59
- documents: ID[];
60
-
61
- name?: string;
62
- description?: string;
63
- productNumber?: string;
64
- color?: string;
65
- colorLabel?: string;
66
- series?: string;
67
- material?: string;
68
- style?: string;
69
- width?: string;
70
- height?: string;
71
- length?: string;
72
- }
73
-
74
- export type AptlyProductImport = AptlyProductImportSchema<string, string>;
75
- export interface AptlyProductImportSchema<ID, DATE> extends Partial<Omit<AptlyProductSchema<ID, DATE>, 'images' | 'documents'>> {
76
- images: string[];
77
- documents: string[];
78
- }
package/models/project.ts DELETED
@@ -1,139 +0,0 @@
1
- import { AptlyOrganizationSchema } from './organization';
2
- import { AptlyPermissionModulesModels } from '../core';
3
- import { AptlyUserSchema } from './user';
4
- import { AptlyBaseSchema } from './extends';
5
- import { AptlyDocumentSchema } from './document';
6
- import { AptlyUnitOptionExtraItemSchema } from './unit';
7
- import { AptlyMediaSrc } from './media';
8
-
9
- export type AptlyProject = AptlyProjectSchema<string, string>;
10
- export interface AptlyProjectSchema<ID, DATE> extends AptlyBaseSchema<ID, DATE> {
11
- organization: AptlyOrganizationSchema<ID, DATE> | ID;
12
- /**
13
- * @deprecated dont think this is used anymore
14
- */
15
- customers: ID[];
16
- periods: AptlyProjectPeriodSchema<ID, DATE>[];
17
- algorithms: AptlyProjectAlgorithmSchema<ID>[];
18
- documents: AptlyDocumentSchema<ID, DATE>[];
19
- pages: ID[];
20
- myPageText?: string;
21
- inviteText?: string;
22
- notify: AptlyProjectNotifySchema<ID, DATE>[];
23
- theme: AptlyProjectTheme;
24
- integrations: AptlyProjectIntegrationSchema<ID>[];
25
- disabledModules?: AptlyPermissionModulesModels[];
26
- extraOptions?: AptlyUnitOptionExtraItemSchema<ID, DATE>[];
27
-
28
- /**
29
- * @deprecated use createdAt
30
- */
31
- created: DATE;
32
- }
33
-
34
- export type AptlyProjectPeriod = AptlyProjectPeriodSchema<string, string>;
35
- export interface AptlyProjectPeriodSchema<ID, DATE> {
36
- _id: ID;
37
- name: string;
38
- open: DATE;
39
- close: DATE;
40
- override?: boolean;
41
- }
42
-
43
- /**
44
- * @deprecated use AptlyAlgorithm instead
45
- */
46
- export type AptlyProjectAlgorithm = AptlyProjectAlgorithmSchema<string>;
47
-
48
- /**
49
- * @deprecated use AptlyAlgorithm instead
50
- */
51
- export interface AptlyProjectAlgorithmSchema<ID> {
52
- _id: ID;
53
- name: string;
54
- pipeline: AptlyProjectAlgorithmPipelineSchema<ID>[];
55
- organization?: ID;
56
- project?: ID;
57
- }
58
-
59
- /**
60
- * @deprecated use AptlyAlgorithmPipeline instead
61
- */
62
- export type AptlyProjectAlgorithmPipeline = AptlyProjectAlgorithmPipelineSchema<string>;
63
- /**
64
- * @deprecated use AptlyAlgorithmPipeline instead
65
- */
66
- export interface AptlyProjectAlgorithmPipelineSchema<ID> {
67
- _id: ID;
68
- label: string;
69
- operation: 'base' | 'add' | 'subtract' | 'multiply';
70
- value: number;
71
- applyTo: 'previousStep' | 'base' | 'root';
72
- }
73
-
74
- export interface AptlyProjectTheme {
75
- palette?: {
76
- primary?: AptlyProjectThemePalette;
77
- secondary?: AptlyProjectThemePalette;
78
- font?: string;
79
- background?: string;
80
- confirm?: string;
81
- green?: string;
82
- yellow?: string;
83
- red?: string;
84
- cardBackground?: string;
85
- cardContrast?: string;
86
- border?: string;
87
- };
88
- fonts?: {
89
- primary?: string;
90
- secondary?: string;
91
- tertiary?: string;
92
- links?: [string];
93
- };
94
- images: {
95
- logo?: string | null;
96
- logoMedia?: AptlyMediaSrc | null;
97
- largeLogo?: string | null;
98
- hero?: string | null;
99
- heroMedia?: AptlyMediaSrc | null;
100
- fallback?: string | null;
101
- fallbackMedia?: AptlyMediaSrc | null;
102
- };
103
- contact: {
104
- name?: string;
105
- phone?: string;
106
- mail?: string;
107
- complaintEmail?: string;
108
- };
109
- }
110
-
111
- export interface AptlyProjectThemePalette {
112
- dark?: string;
113
- main?: string;
114
- mainContrast?: string;
115
- light?: string;
116
- disabled?: string;
117
- lightContrast?: string;
118
- }
119
-
120
- export type AptlyProjectIntegration = AptlyProjectIntegrationSchema<string>;
121
- export interface AptlyProjectIntegrationSchema<ID> {
122
- integration: ID;
123
- integrationName: string;
124
- project: string;
125
-
126
- }
127
-
128
- export type AptlyProjectNotify = AptlyProjectNotifySchema<string, string>;
129
- interface AptlyProjectNotifySchema<ID, DATE> {
130
- _id: ID;
131
- user: AptlyUserSchema<ID, DATE> | ID;
132
- inquiry: boolean;
133
- booking: boolean;
134
- complaint: boolean;
135
- order?: boolean;
136
- 'order-created'?: boolean;
137
- 'order-signed'?: boolean;
138
- 'order-fileReceived'?: boolean;
139
- }
@@ -1,21 +0,0 @@
1
- import { AptlyQueueDownloadStatus, AptlyQueueDownloadType } from '../enums/index';
2
- import { AptlyDocumentSchema } from './document';
3
- import { AptlyMediaSchema } from './media';
4
- import { AptlyBaseSchema } from './extends';
5
-
6
- export type AptlyQueueDownload = AptlyQueueDownloadSchema<string, string>;
7
- export interface AptlyQueueDownloadSchema<ID, DATE> extends Omit<AptlyBaseSchema<ID, DATE>, 'name' | 'archived'> {
8
- url: string;
9
- type: AptlyQueueDownloadType;
10
- status: AptlyQueueDownloadStatus;
11
- error?: string;
12
-
13
- organization?: ID;
14
- project?: ID;
15
- unit?: ID;
16
- product?: ID;
17
- productVariant?: ID;
18
-
19
- document?: Partial<Pick<AptlyDocumentSchema<ID, DATE>, '_type' | 'name'>> | null;
20
- media?: Partial<Pick<AptlyMediaSchema<ID, DATE>, 'name'>> | null;
21
- }
@@ -1,13 +0,0 @@
1
- import { AptlyMediaSrcSchema } from './media';
2
- import { AptlyBaseSchema } from './extends';
3
-
4
- export type AptlyRecommendation = AptlyRecommendationSchema<string, string>;
5
- export interface AptlyRecommendationSchema<ID, DATE> extends AptlyBaseSchema<ID, DATE> {
6
- organization?: ID;
7
- project?: ID;
8
- title: string;
9
- color: string;
10
- text: string;
11
- image?: string | null;
12
- imageMedia?: AptlyMediaSrcSchema<ID, DATE> | null;
13
- }
@@ -1,17 +0,0 @@
1
- import { AptlyMediaSrc } from './media';
2
- import { AptlyBaseSchema } from './extends';
3
-
4
- export type AptlySupplier = AptlySupplierSchema<string, string>;
5
- export interface AptlySupplierSchema<ID, DATE> extends AptlyBaseSchema<ID, DATE> {
6
- email?: string;
7
- logo: string | null;
8
- logoMedia?: AptlyMediaSrc | null;
9
- createdBy: ID;
10
- organization?: ID;
11
- extends?: ID;
12
-
13
- /**
14
- * @deprecated use createdAt
15
- */
16
- created: DATE;
17
- }
package/models/tag.ts DELETED
@@ -1,9 +0,0 @@
1
- import { AptlyBaseSchema } from './extends';
2
-
3
- export type AptlyTag = AptlyTagSchema<string, string>;
4
- export interface AptlyTagSchema<ID, DATE> extends AptlyBaseSchema<ID, DATE> {
5
- /**
6
- * @deprecated use createdAt
7
- */
8
- created: DATE;
9
- }
@@ -1,39 +0,0 @@
1
- import { AptlyOrganizationSchema } from './organization';
2
- import { AptlyProjectSchema } from './project';
3
- import { AptlyUnitSchema } from './unit';
4
- import { AptlyInquirySchema } from './inquiry';
5
- import { AptlyBookingSchema } from './booking';
6
- import { AptlyBaseSchema } from './extends';
7
-
8
- export type AptlyUnitEmail = AptlyUnitEmailSchema<string, string>;
9
- export interface AptlyUnitEmailSchema<ID, DATE> extends Omit<AptlyBaseSchema<ID, DATE>, 'name' | 'archived'> {
10
- type: AptlyUnitEmailType;
11
- to: string[];
12
- subject: string;
13
- references: string;
14
- inReplyTo: string[];
15
-
16
- organization: ID | AptlyOrganizationSchema<ID, DATE>;
17
- project: ID | AptlyProjectSchema<ID, DATE>;
18
- unit: ID | AptlyUnitSchema<ID, DATE>;
19
-
20
- inquiry?: ID | AptlyInquirySchema<ID, DATE>;
21
- booking?: ID | AptlyBookingSchema<ID, DATE>;
22
-
23
- /**
24
- * @deprecated use createdAt
25
- */
26
- created: DATE;
27
- }
28
-
29
- export enum AptlyUnitEmailType {
30
- Inquiry = 'inquiry',
31
- Invite = 'invite',
32
- NewOwner = 'new-owner',
33
- PeriodOpen = 'period-open',
34
- PeriodClose = 'period-close',
35
- BookingConfirm = 'booking-confirm',
36
- BookingCancel = 'booking-cancel',
37
- OrderCreated = 'order-created',
38
- OrderSigned = 'order-signed',
39
- }
@@ -1,140 +0,0 @@
1
- import { AptlyBaseSchema, AptlyHistorySchema } from './extends';
2
- import {
3
- AptlyCategorySectionDisplayType, AptlyUnitTemplateCategorySectionProductMeasureUnitType,
4
- AptlyUnitTemplateCategorySectionProductParamKey
5
- } from '../enums';
6
- import { AptlyProductSchema } from './product';
7
- import { AptlyProducerSchema } from './producer';
8
- import { AptlyMediaSrcSchema } from './media';
9
- import { AptlyUpsellTemplateSchema } from './upsell-template';
10
- import { AptlyProjectAlgorithmSchema, AptlyProjectPeriodSchema } from './project';
11
-
12
- export type AptlyUnitTemplateBase = AptlyUnitTemplateBaseSchema<string, string>;
13
- export interface AptlyUnitTemplateBaseSchema<ID, DATE> extends AptlyBaseSchema<ID, DATE> {
14
- _order_categories: ID[];
15
- categories: AptlyUnitTemplateCategorySchema<ID, DATE>[];
16
- }
17
-
18
- export type AptlyUnitTemplate = AptlyUnitTemplateSchema<string, string>;
19
- export interface AptlyUnitTemplateSchema<ID, DATE> extends AptlyUnitTemplateBaseSchema<ID, DATE>, AptlyHistorySchema<ID, DATE> {
20
- name: string;
21
- description?: string;
22
- organization?: ID;
23
- project?: ID;
24
- archived: boolean;
25
-
26
- /**
27
- * @deprecated not used
28
- */
29
- blueprints: AptlyUnitTemplateBlueprintSchema<ID>[];
30
- }
31
-
32
- export type AptlyUnitTemplateBlueprint = AptlyUnitTemplateBlueprintSchema<string>;
33
- export interface AptlyUnitTemplateBlueprintSchema<ID> {
34
- _id: ID;
35
- image: string;
36
- featured: boolean;
37
- }
38
-
39
- export type AptlyUnitTemplateCategory = AptlyUnitTemplateCategorySchema<string, string>;
40
- export interface AptlyUnitTemplateCategorySchema<ID, DATE> {
41
- _id: ID;
42
- _orderID: ID;
43
- name: string;
44
- text?: string;
45
- isRoom: boolean;
46
- size?: number;
47
- upsellTemplate?: AptlyUpsellTemplateSchema<ID, DATE> | ID | null;
48
- _order_sections: ID[];
49
- sections: AptlyUnitTemplateCategorySectionSchema<ID, DATE>[];
50
-
51
- /**
52
- * @deprecated dont think this is used
53
- */
54
- sameAs?: ID;
55
- }
56
-
57
- export type AptlyUnitTemplateCategorySection = AptlyUnitTemplateCategorySectionSchema<string, string>;
58
- export interface AptlyUnitTemplateCategorySectionSchema<ID, DATE> {
59
- _id: ID;
60
- _orderID: ID;
61
- name: string;
62
- text?: string;
63
- standard: boolean;
64
- multiSelect: boolean;
65
- displayType: AptlyCategorySectionDisplayType;
66
- packages: AptlyUnitTemplateCategorySectionPackageSchema<ID, DATE>[];
67
- assortments?: AptlyUnitTemplateCategorySectionAssortmentSchema<ID, DATE>[];
68
- _order_products: ID[];
69
- products: AptlyUnitTemplateCategorySectionProductSchema<ID, DATE>[];
70
- period: AptlyProjectPeriodSchema<ID, DATE> | ID;
71
- }
72
-
73
- export type AptlyUnitTemplateCategorySectionPackage = AptlyUnitTemplateCategorySectionPackageSchema<string, string>;
74
- export interface AptlyUnitTemplateCategorySectionPackageSchema<ID, DATE> {
75
- _id: ID;
76
- name: string;
77
- standard: boolean;
78
- image?: string | null;
79
- imageMedia?: AptlyMediaSrcSchema<ID, DATE> | null;
80
- description?: string;
81
- _product_order?: ID[];
82
- products?: AptlyUnitTemplateCategorySectionProductSchema<ID, DATE>[];
83
- }
84
-
85
- export type AptlyUnitTemplateCategorySectionAssortment = AptlyUnitTemplateCategorySectionAssortmentSchema<string, string>;
86
- export interface AptlyUnitTemplateCategorySectionAssortmentSchema<ID, DATE> {
87
- _id: ID;
88
- createdAt: DATE;
89
- color: string;
90
- }
91
-
92
- export type AptlyUnitTemplateCategorySectionProduct = AptlyUnitTemplateCategorySectionProductSchema<string, string>;
93
- export interface AptlyUnitTemplateCategorySectionProductSchema<ID, DATE> {
94
- _id: ID;
95
- _orderID: ID;
96
- product?: ID | AptlyProductSchema<ID, DATE>;
97
- producer?: ID | AptlyProducerSchema<ID, DATE>;
98
- availableProducts: ID[];
99
- variantPrices: AptlyUnitTemplateCategorySectionProductVariantPriceSchema<ID>[];
100
- text?: string;
101
- unitSizeRoom?: string;
102
- unitSizeParam?: string;
103
- consequenceRoom?: string;
104
- consequenceParam?: string;
105
- amount: number;
106
- unitCost?: number;
107
- algorithm: AptlyProjectAlgorithmSchema<ID> | ID;
108
- standard: boolean;
109
- standardVariant?: ID;
110
- partOfPackage?: ID;
111
- partOfAssortment?: ID;
112
- supplier?: ID | null;
113
- customTitle?: string;
114
- customDescription?: string;
115
- notifyWhenPicked?: boolean;
116
- onlyShowInSelection?: boolean;
117
- recommendation?: ID | null;
118
- labels?: ID[];
119
- params: AptlyUnitTemplateCategorySectionProductParamSchema<ID>[];
120
-
121
- /**
122
- * @deprecated dont think this is used...
123
- */
124
- measureUnitType: AptlyUnitTemplateCategorySectionProductMeasureUnitType;
125
- }
126
-
127
- export type AptlyUnitTemplateCategorySectionProductParam<VALUE> = AptlyUnitTemplateCategorySectionProductParamSchema<string, VALUE>;
128
- export interface AptlyUnitTemplateCategorySectionProductParamSchema<ID, VALUE = any> {
129
- _id: ID;
130
- key: AptlyUnitTemplateCategorySectionProductParamKey;
131
- value: VALUE;
132
- }
133
-
134
- export type AptlyUnitTemplateCategorySectionProductVariantPrice = AptlyUnitTemplateCategorySectionProductVariantPriceSchema<string>;
135
- export interface AptlyUnitTemplateCategorySectionProductVariantPriceSchema<ID> {
136
- variant: ID;
137
- price: number;
138
- baseCost?: number;
139
- labels?: ID[];
140
- }