@aptly-as/types 2.5.3 → 2.5.5

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 (109) hide show
  1. package/core/api.d.ts +13 -13
  2. package/core/api.js +1 -1
  3. package/core/app.d.ts +37 -37
  4. package/core/app.js +9 -9
  5. package/core/cloudinary.d.ts +2 -2
  6. package/core/cloudinary.js +1 -1
  7. package/core/fields.d.ts +19 -19
  8. package/core/fields.js +1 -1
  9. package/core/index.d.ts +16 -16
  10. package/core/index.js +9 -9
  11. package/core/job.d.ts +21 -21
  12. package/core/job.js +11 -11
  13. package/core/redirect.d.ts +17 -17
  14. package/core/redirect.js +12 -12
  15. package/core/scope.d.ts +124 -124
  16. package/core/scope.js +117 -117
  17. package/core/signage.d.ts +19 -19
  18. package/core/signage.js +1 -1
  19. package/core/webhook-event-data.d.ts +16 -16
  20. package/core/webhook-event-data.js +1 -1
  21. package/enums/document.d.ts +38 -38
  22. package/enums/document.js +41 -41
  23. package/enums/fields.d.ts +30 -30
  24. package/enums/fields.js +31 -31
  25. package/enums/index.d.ts +151 -150
  26. package/enums/index.js +171 -170
  27. package/enums/unit-template.d.ts +10 -10
  28. package/enums/unit-template.js +12 -12
  29. package/enums/webhook.d.ts +23 -23
  30. package/enums/webhook.js +26 -26
  31. package/error/error.d.ts +28 -28
  32. package/error/error.js +50 -50
  33. package/error/index.d.ts +1 -1
  34. package/error/index.js +1 -1
  35. package/index.d.ts +4 -4
  36. package/index.js +4 -4
  37. package/models/algorithm.d.ts +32 -32
  38. package/models/algorithm.js +15 -15
  39. package/models/app.d.ts +102 -101
  40. package/models/app.js +53 -52
  41. package/models/availability.d.ts +35 -35
  42. package/models/availability.js +1 -1
  43. package/models/booking.d.ts +57 -57
  44. package/models/booking.js +1 -1
  45. package/models/client.d.ts +10 -10
  46. package/models/client.js +1 -1
  47. package/models/department.d.ts +28 -28
  48. package/models/department.js +1 -1
  49. package/models/document.d.ts +37 -37
  50. package/models/document.js +1 -1
  51. package/models/email.d.ts +16 -16
  52. package/models/email.js +1 -1
  53. package/models/extends.d.ts +37 -37
  54. package/models/extends.js +1 -1
  55. package/models/index.d.ts +34 -34
  56. package/models/index.js +34 -34
  57. package/models/inquiry.d.ts +57 -57
  58. package/models/inquiry.js +1 -1
  59. package/models/media.d.ts +50 -50
  60. package/models/media.js +1 -1
  61. package/models/module.d.ts +19 -19
  62. package/models/module.js +1 -1
  63. package/models/note.d.ts +19 -19
  64. package/models/note.js +1 -1
  65. package/models/notification-trigger.d.ts +9 -9
  66. package/models/notification-trigger.js +1 -1
  67. package/models/option-label.d.ts +7 -7
  68. package/models/option-label.js +1 -1
  69. package/models/order.d.ts +164 -163
  70. package/models/order.js +20 -20
  71. package/models/organization.d.ts +86 -86
  72. package/models/organization.js +7 -7
  73. package/models/page.d.ts +22 -22
  74. package/models/page.js +1 -1
  75. package/models/payment.d.ts +94 -94
  76. package/models/payment.js +1 -1
  77. package/models/period.d.ts +8 -8
  78. package/models/period.js +1 -1
  79. package/models/producer.d.ts +24 -24
  80. package/models/producer.js +1 -1
  81. package/models/product-stats.d.ts +18 -18
  82. package/models/product-stats.js +1 -1
  83. package/models/product.d.ts +78 -78
  84. package/models/product.js +1 -1
  85. package/models/project.d.ts +124 -124
  86. package/models/project.js +1 -1
  87. package/models/queue-download.d.ts +19 -19
  88. package/models/queue-download.js +1 -1
  89. package/models/recommendation.d.ts +12 -12
  90. package/models/recommendation.js +1 -1
  91. package/models/supplier.d.ts +12 -12
  92. package/models/supplier.js +1 -1
  93. package/models/tag.d.ts +5 -5
  94. package/models/tag.js +1 -1
  95. package/models/unit-email.d.ts +21 -21
  96. package/models/unit-email.js +1 -1
  97. package/models/unit-template.d.ts +124 -124
  98. package/models/unit-template.js +1 -1
  99. package/models/unit.d.ts +243 -243
  100. package/models/unit.js +1 -1
  101. package/models/upsell-template.d.ts +13 -13
  102. package/models/upsell-template.js +1 -1
  103. package/models/user.d.ts +33 -33
  104. package/models/user.js +16 -16
  105. package/models/webhook-event.d.ts +43 -43
  106. package/models/webhook-event.js +1 -1
  107. package/models/webhook.d.ts +15 -15
  108. package/models/webhook.js +1 -1
  109. package/package.json +5 -5
package/models/unit.d.ts CHANGED
@@ -1,243 +1,243 @@
1
- import { AptlyDocumentSchema } from './document.js';
2
- import { AptlyOrderSchema } from './order.js';
3
- import { AptlyProducerSchema } from './producer.js';
4
- import { AptlyProductSchema } from './product.js';
5
- import { AptlyProjectSchema } from './project.js';
6
- import { AptlyAddress, AptlyHistorySchema } from './extends.js';
7
- import { AptlyUnitTemplateBaseSchema, AptlyUnitTemplateCategorySchema, AptlyUnitTemplateCategorySectionSchema, AptlyUnitTemplateSchema } from './unit-template';
8
- import { AptlyIntegration, AptlyUnitItemParamKey, AptlyUnitStatus } from '../enums/index.js';
9
- import { AptlyUserSchema } from './user.js';
10
- import { AptlyOrganizationSchema } from './organization.js';
11
- export type AptlyUnit = AptlyUnitSchema<string, string>;
12
- export interface AptlyUnitSchema<ID, DATE> extends AptlyUnitTemplateBaseSchema<ID, DATE>, AptlyUnitEditData<DATE>, AptlyHistorySchema<ID, DATE> {
13
- status: AptlyUnitStatus;
14
- vat?: string;
15
- shipping?: AptlyAddress;
16
- billing?: AptlyAddress;
17
- rooms: AptlyUnitRoomSchema<ID>[];
18
- selectedOptions: AptlyUnitSelectedOptionSchema<ID, DATE>[];
19
- items: AptlyUnitOptionItemSchema<ID, DATE>[];
20
- revertedOptions?: AptlyUnitOptionItemSchema<ID, DATE>[];
21
- revertedItems?: AptlyUnitOptionItemSchema<ID, DATE>[];
22
- extraOptions: AptlyUnitOptionExtraItemSchema<ID, DATE>[];
23
- categoryOverrides: AptlyUnitCategoryOverrideSchema<ID>[];
24
- productOverrides: AptlyUnitProductOverrideSchema<ID>[];
25
- ordersToSign: ID[];
26
- categoriesRead: ID[];
27
- spec: AptlyUnitSpec;
28
- buildStep: number;
29
- documents: (AptlyDocumentSchema<ID, DATE> | ID)[];
30
- unitPlans: {
31
- image: string;
32
- description?: string;
33
- }[];
34
- organization: AptlyOrganizationSchema<ID, DATE> | ID;
35
- project: AptlyProjectSchema<ID, DATE> | ID;
36
- users: (AptlyUserSchema<ID, DATE> | ID)[];
37
- unitTemplate: ID | AptlyUnitTemplateSchema<ID, DATE>;
38
- confirmedPeriods: AptlyUnitConfirmedPeriodSchema<ID, DATE>[];
39
- queueInvites: string[];
40
- invites: AptlyUnitInviteSchema<ID, DATE>[];
41
- overridePeriod?: ID;
42
- overridePeriods?: AptlyUnitOverridePeriodSchema<ID, DATE>[];
43
- integrations: AptlyUnitIntegrationSchema<ID>[];
44
- gdpr?: AptlyUnitGDPRSchema<DATE, ID>;
45
- tree: any[];
46
- created: DATE;
47
- }
48
- interface AptlyUnitGDPRSchema<DATE, ID> {
49
- approved: boolean;
50
- approvedAt: DATE | null;
51
- documents: ID[];
52
- users: ID[];
53
- }
54
- export type AptlyUnitOverridePeriod = AptlyUnitOverridePeriodSchema<string, string>;
55
- export interface AptlyUnitOverridePeriodSchema<ID, DATE> {
56
- _id: ID;
57
- period: ID;
58
- close: DATE;
59
- }
60
- export type AptlyUnitItemBase = AptlyUnitItemBaseSchema<string, string>;
61
- export interface AptlyUnitItemBaseSchema<ID, DATE> {
62
- _id: ID;
63
- product: ID | AptlyProductSchema<ID, DATE>;
64
- variant: ID;
65
- producer: ID | AptlyProducerSchema<ID, DATE>;
66
- category?: ID | AptlyUnitTemplateCategorySchema<ID, DATE>;
67
- section?: ID | AptlyUnitTemplateCategorySectionSchema<ID, DATE>;
68
- period?: ID;
69
- quantity: number;
70
- standard?: boolean;
71
- pickDate: string;
72
- confirmDate?: DATE;
73
- pickedBy: ID;
74
- text?: string;
75
- params: AptlyUnitItemParamSchema<ID>[];
76
- baseCost?: number;
77
- }
78
- export type AptlyUnitOption = AptlyUnitSelectedOptionSchema<string, string>;
79
- export interface AptlyUnitSelectedOptionSchema<ID, DATE> {
80
- _id: ID;
81
- category: ID | AptlyUnitTemplateCategorySchema<ID, DATE>;
82
- section: ID | AptlyUnitTemplateCategorySectionSchema<ID, DATE>;
83
- sectionProductRef: ID;
84
- product: ID | AptlyProductSchema<ID, DATE>;
85
- variant: ID;
86
- period: ID;
87
- quantity: number;
88
- pickDate: DATE;
89
- pickedBy: ID;
90
- confirmDate?: DATE;
91
- params: AptlyUnitItemParamSchema<ID>[];
92
- package?: ID;
93
- assortment?: ID;
94
- standard?: boolean;
95
- text?: string;
96
- producer?: ID | AptlyProducerSchema<ID, DATE>;
97
- baseCost?: number;
98
- }
99
- export type AptlyUnitOptionItem = AptlyUnitOptionItemSchema<string, string>;
100
- export interface AptlyUnitOptionItemSchema<ID, DATE> extends AptlyUnitSelectedOptionSchema<ID, DATE> {
101
- unitCost: number;
102
- unitVat?: number;
103
- pickRef?: ID;
104
- }
105
- export type AptlyUnitOptionExtraItem = AptlyUnitOptionExtraItemSchema<string, string>;
106
- export interface AptlyUnitOptionExtraItemSchema<ID, DATE> extends AptlyUnitOptionItemSchema<ID, DATE> {
107
- _id: ID;
108
- unitCost: number;
109
- addToNextOrder?: boolean;
110
- text?: string;
111
- customDescription?: string;
112
- algorithm?: ID;
113
- projectItemRef?: ID;
114
- revertedOption?: boolean;
115
- revertItemRef?: ID;
116
- unitTemplateCategory?: ID;
117
- document?: ID;
118
- prerequisites?: {
119
- totalCost?: number;
120
- };
121
- thirdPartyUploader?: string;
122
- cost: number;
123
- customTitle?: string;
124
- }
125
- export type AptlyUnitItemParam<VALUE> = AptlyUnitItemParamSchema<string, VALUE>;
126
- export interface AptlyUnitItemParamSchema<ID, VALUE = any> {
127
- _id: ID;
128
- key: AptlyUnitItemParamKey;
129
- value: VALUE;
130
- downloadToken?: string;
131
- }
132
- export type AptlyUnitRoom = AptlyUnitRoomSchema<string>;
133
- export interface AptlyUnitRoomSchema<ID> {
134
- _id: ID;
135
- name: string;
136
- sizeParams: AptlyUnitRoomSchemaSizeParamSchema<ID>[];
137
- }
138
- export type AptlyUnitRoomSchemaSizeParam = AptlyUnitRoomSchemaSizeParamSchema<string>;
139
- export interface AptlyUnitRoomSchemaSizeParamSchema<ID> {
140
- _id: ID;
141
- key: string;
142
- value: number;
143
- }
144
- export type AptlyUnitCategoryOverride = AptlyUnitCategoryOverrideSchema<string>;
145
- export interface AptlyUnitCategoryOverrideSchema<ID> {
146
- category: ID;
147
- size: number;
148
- hide: boolean;
149
- }
150
- export type AptlyUnitProductOverride = AptlyUnitProductOverrideSchema<string>;
151
- export interface AptlyUnitProductOverrideSchema<ID> {
152
- sectionProductRef: ID;
153
- section: ID;
154
- amount?: number;
155
- unitCost?: number;
156
- algorithm?: ID;
157
- variantPrices?: AptlyUnitProductOverrideVariantPriceSchema<ID>[];
158
- hide?: boolean;
159
- }
160
- export type AptlyUnitProductOverrideVariantPrice = AptlyUnitProductOverrideVariantPriceSchema<string>;
161
- export interface AptlyUnitProductOverrideVariantPriceSchema<ID> {
162
- _id: ID;
163
- variant: ID;
164
- price: number;
165
- }
166
- export interface AptlyUnitSpec {
167
- categories: {
168
- name: string;
169
- isRoom: boolean;
170
- size: number;
171
- sections: {
172
- name: string;
173
- standard: boolean;
174
- displayType: 'default';
175
- }[];
176
- }[];
177
- }
178
- export type AptlyUnitConfirmedPeriod = AptlyUnitConfirmedPeriodSchema<string, string>;
179
- export interface AptlyUnitConfirmedPeriodSchema<ID, DATE> {
180
- _id: ID;
181
- period: ID;
182
- confirmed?: DATE;
183
- order?: ID | AptlyOrderSchema<ID, DATE>;
184
- }
185
- export type AptlyUnitIntegration = AptlyUnitIntegrationSchema<string>;
186
- export interface AptlyUnitIntegrationSchema<ID> {
187
- _id: ID;
188
- integration: AptlyIntegration;
189
- unit?: string;
190
- plantId?: string;
191
- tags?: string[];
192
- }
193
- interface AptlyUnitEditData<DATE> {
194
- address?: string;
195
- zipCode?: string;
196
- city?: string;
197
- houseNumber?: string;
198
- entrance?: string;
199
- floor?: string;
200
- oldAddress?: string;
201
- storageNumber?: string;
202
- garageNumber?: string;
203
- garagePortNumber?: string;
204
- garagePowerID?: string;
205
- electricCar?: string;
206
- unitNumber?: number;
207
- holdingNumber?: number;
208
- subHoldingNumber?: number;
209
- leaseNumber?: number;
210
- sectionNumber?: number;
211
- boligmappaNumber?: string;
212
- tapWaterID?: string;
213
- tapWaterID2?: string;
214
- hotWaterID?: string;
215
- hotWaterID2?: string;
216
- remoteHeatID?: string;
217
- gasID?: string;
218
- powerCabinetID?: string;
219
- powerCabinetMeasureID?: string;
220
- unitKeys?: number;
221
- postboxKeys?: number;
222
- electricKeys?: number;
223
- balconyKeys?: number;
224
- handoverDate?: DATE | null;
225
- }
226
- export interface AptlyUnitInviteSchema<ID, DATE> {
227
- _id: ID;
228
- code: string;
229
- created: DATE;
230
- createdBy?: ID | AptlyUserSchema<ID, DATE>;
231
- newOwner: boolean;
232
- allowAsGuest?: boolean;
233
- sendCount?: number;
234
- claim: {
235
- email: string;
236
- fullName?: string;
237
- phone?: string;
238
- claimed: boolean;
239
- claimedBy?: ID;
240
- claimTime?: DATE;
241
- };
242
- }
243
- export {};
1
+ import { AptlyDocumentSchema } from './document.js';
2
+ import { AptlyOrderSchema } from './order.js';
3
+ import { AptlyProducerSchema } from './producer.js';
4
+ import { AptlyProductSchema } from './product.js';
5
+ import { AptlyProjectSchema } from './project.js';
6
+ import { AptlyAddress, AptlyHistorySchema } from './extends.js';
7
+ import { AptlyUnitTemplateBaseSchema, AptlyUnitTemplateCategorySchema, AptlyUnitTemplateCategorySectionSchema, AptlyUnitTemplateSchema } from './unit-template';
8
+ import { AptlyIntegration, AptlyUnitItemParamKey, AptlyUnitStatus } from '../enums/index.js';
9
+ import { AptlyUserSchema } from './user.js';
10
+ import { AptlyOrganizationSchema } from './organization.js';
11
+ export type AptlyUnit = AptlyUnitSchema<string, string>;
12
+ export interface AptlyUnitSchema<ID, DATE> extends AptlyUnitTemplateBaseSchema<ID, DATE>, AptlyUnitEditData<DATE>, AptlyHistorySchema<ID, DATE> {
13
+ status: AptlyUnitStatus;
14
+ vat?: string;
15
+ shipping?: AptlyAddress;
16
+ billing?: AptlyAddress;
17
+ rooms: AptlyUnitRoomSchema<ID>[];
18
+ selectedOptions: AptlyUnitSelectedOptionSchema<ID, DATE>[];
19
+ items: AptlyUnitOptionItemSchema<ID, DATE>[];
20
+ revertedOptions?: AptlyUnitOptionItemSchema<ID, DATE>[];
21
+ revertedItems?: AptlyUnitOptionItemSchema<ID, DATE>[];
22
+ extraOptions: AptlyUnitOptionExtraItemSchema<ID, DATE>[];
23
+ categoryOverrides: AptlyUnitCategoryOverrideSchema<ID>[];
24
+ productOverrides: AptlyUnitProductOverrideSchema<ID>[];
25
+ ordersToSign: ID[];
26
+ categoriesRead: ID[];
27
+ spec: AptlyUnitSpec;
28
+ buildStep: number;
29
+ documents: (AptlyDocumentSchema<ID, DATE> | ID)[];
30
+ unitPlans: {
31
+ image: string;
32
+ description?: string;
33
+ }[];
34
+ organization: AptlyOrganizationSchema<ID, DATE> | ID;
35
+ project: AptlyProjectSchema<ID, DATE> | ID;
36
+ users: (AptlyUserSchema<ID, DATE> | ID)[];
37
+ unitTemplate: ID | AptlyUnitTemplateSchema<ID, DATE>;
38
+ confirmedPeriods: AptlyUnitConfirmedPeriodSchema<ID, DATE>[];
39
+ queueInvites: string[];
40
+ invites: AptlyUnitInviteSchema<ID, DATE>[];
41
+ overridePeriod?: ID;
42
+ overridePeriods?: AptlyUnitOverridePeriodSchema<ID, DATE>[];
43
+ integrations: AptlyUnitIntegrationSchema<ID>[];
44
+ gdpr?: AptlyUnitGDPRSchema<DATE, ID>;
45
+ tree: any[];
46
+ created: DATE;
47
+ }
48
+ interface AptlyUnitGDPRSchema<DATE, ID> {
49
+ approved: boolean;
50
+ approvedAt: DATE | null;
51
+ documents: ID[];
52
+ users: ID[];
53
+ }
54
+ export type AptlyUnitOverridePeriod = AptlyUnitOverridePeriodSchema<string, string>;
55
+ export interface AptlyUnitOverridePeriodSchema<ID, DATE> {
56
+ _id: ID;
57
+ period: ID;
58
+ close: DATE;
59
+ }
60
+ export type AptlyUnitItemBase = AptlyUnitItemBaseSchema<string, string>;
61
+ export interface AptlyUnitItemBaseSchema<ID, DATE> {
62
+ _id: ID;
63
+ product: ID | AptlyProductSchema<ID, DATE>;
64
+ variant: ID;
65
+ producer: ID | AptlyProducerSchema<ID, DATE>;
66
+ category?: ID | AptlyUnitTemplateCategorySchema<ID, DATE>;
67
+ section?: ID | AptlyUnitTemplateCategorySectionSchema<ID, DATE>;
68
+ period?: ID;
69
+ quantity: number;
70
+ standard?: boolean;
71
+ pickDate: string;
72
+ confirmDate?: DATE;
73
+ pickedBy: ID;
74
+ text?: string;
75
+ params: AptlyUnitItemParamSchema<ID>[];
76
+ baseCost?: number;
77
+ }
78
+ export type AptlyUnitOption = AptlyUnitSelectedOptionSchema<string, string>;
79
+ export interface AptlyUnitSelectedOptionSchema<ID, DATE> {
80
+ _id: ID;
81
+ category: ID | AptlyUnitTemplateCategorySchema<ID, DATE>;
82
+ section: ID | AptlyUnitTemplateCategorySectionSchema<ID, DATE>;
83
+ sectionProductRef: ID;
84
+ product: ID | AptlyProductSchema<ID, DATE>;
85
+ variant: ID;
86
+ period: ID;
87
+ quantity: number;
88
+ pickDate: DATE;
89
+ pickedBy: ID;
90
+ confirmDate?: DATE;
91
+ params: AptlyUnitItemParamSchema<ID>[];
92
+ package?: ID;
93
+ assortment?: ID;
94
+ standard?: boolean;
95
+ text?: string;
96
+ producer?: ID | AptlyProducerSchema<ID, DATE>;
97
+ baseCost?: number;
98
+ }
99
+ export type AptlyUnitOptionItem = AptlyUnitOptionItemSchema<string, string>;
100
+ export interface AptlyUnitOptionItemSchema<ID, DATE> extends AptlyUnitSelectedOptionSchema<ID, DATE> {
101
+ unitCost: number;
102
+ unitVat?: number;
103
+ pickRef?: ID;
104
+ }
105
+ export type AptlyUnitOptionExtraItem = AptlyUnitOptionExtraItemSchema<string, string>;
106
+ export interface AptlyUnitOptionExtraItemSchema<ID, DATE> extends AptlyUnitOptionItemSchema<ID, DATE> {
107
+ _id: ID;
108
+ unitCost: number;
109
+ addToNextOrder?: boolean;
110
+ text?: string;
111
+ customDescription?: string;
112
+ algorithm?: ID;
113
+ projectItemRef?: ID;
114
+ revertedOption?: boolean;
115
+ revertItemRef?: ID;
116
+ unitTemplateCategory?: ID;
117
+ document?: ID;
118
+ prerequisites?: {
119
+ totalCost?: number;
120
+ };
121
+ thirdPartyUploader?: string;
122
+ cost: number;
123
+ customTitle?: string;
124
+ }
125
+ export type AptlyUnitItemParam<VALUE> = AptlyUnitItemParamSchema<string, VALUE>;
126
+ export interface AptlyUnitItemParamSchema<ID, VALUE = any> {
127
+ _id: ID;
128
+ key: AptlyUnitItemParamKey;
129
+ value: VALUE;
130
+ downloadToken?: string;
131
+ }
132
+ export type AptlyUnitRoom = AptlyUnitRoomSchema<string>;
133
+ export interface AptlyUnitRoomSchema<ID> {
134
+ _id: ID;
135
+ name: string;
136
+ sizeParams: AptlyUnitRoomSchemaSizeParamSchema<ID>[];
137
+ }
138
+ export type AptlyUnitRoomSchemaSizeParam = AptlyUnitRoomSchemaSizeParamSchema<string>;
139
+ export interface AptlyUnitRoomSchemaSizeParamSchema<ID> {
140
+ _id: ID;
141
+ key: string;
142
+ value: number;
143
+ }
144
+ export type AptlyUnitCategoryOverride = AptlyUnitCategoryOverrideSchema<string>;
145
+ export interface AptlyUnitCategoryOverrideSchema<ID> {
146
+ category: ID;
147
+ size: number;
148
+ hide: boolean;
149
+ }
150
+ export type AptlyUnitProductOverride = AptlyUnitProductOverrideSchema<string>;
151
+ export interface AptlyUnitProductOverrideSchema<ID> {
152
+ sectionProductRef: ID;
153
+ section: ID;
154
+ amount?: number;
155
+ unitCost?: number;
156
+ algorithm?: ID;
157
+ variantPrices?: AptlyUnitProductOverrideVariantPriceSchema<ID>[];
158
+ hide?: boolean;
159
+ }
160
+ export type AptlyUnitProductOverrideVariantPrice = AptlyUnitProductOverrideVariantPriceSchema<string>;
161
+ export interface AptlyUnitProductOverrideVariantPriceSchema<ID> {
162
+ _id: ID;
163
+ variant: ID;
164
+ price: number;
165
+ }
166
+ export interface AptlyUnitSpec {
167
+ categories: {
168
+ name: string;
169
+ isRoom: boolean;
170
+ size: number;
171
+ sections: {
172
+ name: string;
173
+ standard: boolean;
174
+ displayType: 'default';
175
+ }[];
176
+ }[];
177
+ }
178
+ export type AptlyUnitConfirmedPeriod = AptlyUnitConfirmedPeriodSchema<string, string>;
179
+ export interface AptlyUnitConfirmedPeriodSchema<ID, DATE> {
180
+ _id: ID;
181
+ period: ID;
182
+ confirmed?: DATE;
183
+ order?: ID | AptlyOrderSchema<ID, DATE>;
184
+ }
185
+ export type AptlyUnitIntegration = AptlyUnitIntegrationSchema<string>;
186
+ export interface AptlyUnitIntegrationSchema<ID> {
187
+ _id: ID;
188
+ integration: AptlyIntegration;
189
+ unit?: string;
190
+ plantId?: string;
191
+ tags?: string[];
192
+ }
193
+ interface AptlyUnitEditData<DATE> {
194
+ address?: string;
195
+ zipCode?: string;
196
+ city?: string;
197
+ houseNumber?: string;
198
+ entrance?: string;
199
+ floor?: string;
200
+ oldAddress?: string;
201
+ storageNumber?: string;
202
+ garageNumber?: string;
203
+ garagePortNumber?: string;
204
+ garagePowerID?: string;
205
+ electricCar?: string;
206
+ unitNumber?: number;
207
+ holdingNumber?: number;
208
+ subHoldingNumber?: number;
209
+ leaseNumber?: number;
210
+ sectionNumber?: number;
211
+ boligmappaNumber?: string;
212
+ tapWaterID?: string;
213
+ tapWaterID2?: string;
214
+ hotWaterID?: string;
215
+ hotWaterID2?: string;
216
+ remoteHeatID?: string;
217
+ gasID?: string;
218
+ powerCabinetID?: string;
219
+ powerCabinetMeasureID?: string;
220
+ unitKeys?: number;
221
+ postboxKeys?: number;
222
+ electricKeys?: number;
223
+ balconyKeys?: number;
224
+ handoverDate?: DATE | null;
225
+ }
226
+ export interface AptlyUnitInviteSchema<ID, DATE> {
227
+ _id: ID;
228
+ code: string;
229
+ created: DATE;
230
+ createdBy?: ID | AptlyUserSchema<ID, DATE>;
231
+ newOwner: boolean;
232
+ allowAsGuest?: boolean;
233
+ sendCount?: number;
234
+ claim: {
235
+ email: string;
236
+ fullName?: string;
237
+ phone?: string;
238
+ claimed: boolean;
239
+ claimedBy?: ID;
240
+ claimTime?: DATE;
241
+ };
242
+ }
243
+ export {};
package/models/unit.js CHANGED
@@ -1 +1 @@
1
- export {};
1
+ export {};
@@ -1,13 +1,13 @@
1
- import { AptlyBaseSchema, AptlyHistorySchema } from './extends.js';
2
- export type AptlyUpsellTemplate = AptlyUpsellTemplateSchema<string, string>;
3
- export interface AptlyUpsellTemplateSchema<ID, DATE> extends AptlyBaseSchema<ID, DATE>, AptlyHistorySchema<ID, DATE> {
4
- image?: string | null;
5
- imageMedia?: string | null;
6
- videoEmbed?: string;
7
- text?: string;
8
- links: ID[];
9
- organization?: ID;
10
- project?: ID;
11
- created: DATE;
12
- description: string;
13
- }
1
+ import { AptlyBaseSchema, AptlyHistorySchema } from './extends.js';
2
+ export type AptlyUpsellTemplate = AptlyUpsellTemplateSchema<string, string>;
3
+ export interface AptlyUpsellTemplateSchema<ID, DATE> extends AptlyBaseSchema<ID, DATE>, AptlyHistorySchema<ID, DATE> {
4
+ image?: string | null;
5
+ imageMedia?: string | null;
6
+ videoEmbed?: string;
7
+ text?: string;
8
+ links: ID[];
9
+ organization?: ID;
10
+ project?: ID;
11
+ created: DATE;
12
+ description: string;
13
+ }
@@ -1 +1 @@
1
- export {};
1
+ export {};
package/models/user.d.ts CHANGED
@@ -1,33 +1,33 @@
1
- import { AptlyUserRoles } from '../core/index.js';
2
- import { AptlyBaseSchema } from './extends.js';
3
- export declare enum AptlyLanguage {
4
- English = "en",
5
- Norwegian = "no",
6
- NorwegianBokmal = "nb"
7
- }
8
- export declare enum AptlyUserForgetStatus {
9
- None = 0,
10
- SixMonths = 1,
11
- OneMonth = 2,
12
- OneWeek = 3,
13
- Forget = 4,
14
- Forgotten = 5,
15
- Never = 6
16
- }
17
- export type AptlyUser = AptlyUserSchema<string, string>;
18
- export interface AptlyUserSchema<ID, DATE> extends Omit<AptlyBaseSchema<ID, DATE>, 'archived' | 'name'> {
19
- email: string;
20
- fullName: string;
21
- firstName?: string;
22
- lastName?: string;
23
- profileImage: string | null;
24
- permissions: AptlyUserRoles[];
25
- roles: AptlyUserRoles[];
26
- language?: AptlyLanguage;
27
- gdpr: boolean;
28
- phone: string;
29
- synced: DATE;
30
- isGuest?: boolean;
31
- forgetStatus?: AptlyUserForgetStatus;
32
- created: DATE;
33
- }
1
+ import { AptlyUserRoles } from '../core/index.js';
2
+ import { AptlyBaseSchema } from './extends.js';
3
+ export declare enum AptlyLanguage {
4
+ English = "en",
5
+ Norwegian = "no",
6
+ NorwegianBokmal = "nb"
7
+ }
8
+ export declare enum AptlyUserForgetStatus {
9
+ None = 0,
10
+ SixMonths = 1,
11
+ OneMonth = 2,
12
+ OneWeek = 3,
13
+ Forget = 4,
14
+ Forgotten = 5,
15
+ Never = 6
16
+ }
17
+ export type AptlyUser = AptlyUserSchema<string, string>;
18
+ export interface AptlyUserSchema<ID, DATE> extends Omit<AptlyBaseSchema<ID, DATE>, 'archived' | 'name'> {
19
+ email: string;
20
+ fullName: string;
21
+ firstName?: string;
22
+ lastName?: string;
23
+ profileImage: string | null;
24
+ permissions: AptlyUserRoles[];
25
+ roles: AptlyUserRoles[];
26
+ language?: AptlyLanguage;
27
+ gdpr: boolean;
28
+ phone: string;
29
+ synced: DATE;
30
+ isGuest?: boolean;
31
+ forgetStatus?: AptlyUserForgetStatus;
32
+ created: DATE;
33
+ }
package/models/user.js CHANGED
@@ -1,16 +1,16 @@
1
- export var AptlyLanguage;
2
- (function (AptlyLanguage) {
3
- AptlyLanguage["English"] = "en";
4
- AptlyLanguage["Norwegian"] = "no";
5
- AptlyLanguage["NorwegianBokmal"] = "nb";
6
- })(AptlyLanguage || (AptlyLanguage = {}));
7
- export var AptlyUserForgetStatus;
8
- (function (AptlyUserForgetStatus) {
9
- AptlyUserForgetStatus[AptlyUserForgetStatus["None"] = 0] = "None";
10
- AptlyUserForgetStatus[AptlyUserForgetStatus["SixMonths"] = 1] = "SixMonths";
11
- AptlyUserForgetStatus[AptlyUserForgetStatus["OneMonth"] = 2] = "OneMonth";
12
- AptlyUserForgetStatus[AptlyUserForgetStatus["OneWeek"] = 3] = "OneWeek";
13
- AptlyUserForgetStatus[AptlyUserForgetStatus["Forget"] = 4] = "Forget";
14
- AptlyUserForgetStatus[AptlyUserForgetStatus["Forgotten"] = 5] = "Forgotten";
15
- AptlyUserForgetStatus[AptlyUserForgetStatus["Never"] = 6] = "Never";
16
- })(AptlyUserForgetStatus || (AptlyUserForgetStatus = {}));
1
+ export var AptlyLanguage;
2
+ (function (AptlyLanguage) {
3
+ AptlyLanguage["English"] = "en";
4
+ AptlyLanguage["Norwegian"] = "no";
5
+ AptlyLanguage["NorwegianBokmal"] = "nb";
6
+ })(AptlyLanguage || (AptlyLanguage = {}));
7
+ export var AptlyUserForgetStatus;
8
+ (function (AptlyUserForgetStatus) {
9
+ AptlyUserForgetStatus[AptlyUserForgetStatus["None"] = 0] = "None";
10
+ AptlyUserForgetStatus[AptlyUserForgetStatus["SixMonths"] = 1] = "SixMonths";
11
+ AptlyUserForgetStatus[AptlyUserForgetStatus["OneMonth"] = 2] = "OneMonth";
12
+ AptlyUserForgetStatus[AptlyUserForgetStatus["OneWeek"] = 3] = "OneWeek";
13
+ AptlyUserForgetStatus[AptlyUserForgetStatus["Forget"] = 4] = "Forget";
14
+ AptlyUserForgetStatus[AptlyUserForgetStatus["Forgotten"] = 5] = "Forgotten";
15
+ AptlyUserForgetStatus[AptlyUserForgetStatus["Never"] = 6] = "Never";
16
+ })(AptlyUserForgetStatus || (AptlyUserForgetStatus = {}));