@aptly-as/types 1.7.7 → 1.8.1

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 (83) hide show
  1. package/README.md +1 -1
  2. package/core/api.js +0 -1
  3. package/core/app.js +0 -1
  4. package/core/cloudinary.d.ts +2 -10
  5. package/core/cloudinary.js +0 -1
  6. package/core/error.js +0 -1
  7. package/core/fields.js +0 -1
  8. package/core/index.js +5 -2
  9. package/core/permission.d.ts +7 -7
  10. package/core/permission.js +0 -1
  11. package/core/scope.d.ts +2 -2
  12. package/core/scope.js +0 -1
  13. package/core/signage.d.ts +2 -2
  14. package/core/signage.js +0 -1
  15. package/core/webhook-event-data.js +0 -1
  16. package/enums/document.js +0 -1
  17. package/enums/fields.js +0 -1
  18. package/enums/index.js +5 -2
  19. package/enums/unit-template.js +0 -1
  20. package/enums/webhook.js +0 -1
  21. package/index.js +5 -2
  22. package/models/algorithm.d.ts +2 -2
  23. package/models/algorithm.js +0 -1
  24. package/models/app.d.ts +4 -4
  25. package/models/app.js +0 -1
  26. package/models/availability.d.ts +34 -0
  27. package/models/availability.js +2 -0
  28. package/models/booking.d.ts +12 -9
  29. package/models/booking.js +0 -1
  30. package/models/client.d.ts +1 -1
  31. package/models/client.js +0 -1
  32. package/models/department.d.ts +3 -3
  33. package/models/department.js +0 -1
  34. package/models/document.d.ts +11 -7
  35. package/models/document.js +0 -1
  36. package/models/extends.d.ts +2 -2
  37. package/models/extends.js +0 -1
  38. package/models/index.js +5 -2
  39. package/models/inquiry.d.ts +3 -3
  40. package/models/inquiry.js +0 -1
  41. package/models/media.d.ts +3 -3
  42. package/models/media.js +0 -1
  43. package/models/notification-trigger.d.ts +1 -1
  44. package/models/notification-trigger.js +0 -1
  45. package/models/option-label.d.ts +3 -3
  46. package/models/option-label.js +0 -1
  47. package/models/order.d.ts +14 -11
  48. package/models/order.js +0 -1
  49. package/models/organization.d.ts +7 -7
  50. package/models/organization.js +0 -1
  51. package/models/page.d.ts +2 -2
  52. package/models/page.js +0 -1
  53. package/models/producer.d.ts +4 -3
  54. package/models/producer.js +0 -1
  55. package/models/product-stats.d.ts +1 -1
  56. package/models/product-stats.js +0 -1
  57. package/models/product.d.ts +7 -7
  58. package/models/product.js +0 -1
  59. package/models/project.d.ts +8 -8
  60. package/models/project.js +0 -1
  61. package/models/queue-download.d.ts +1 -1
  62. package/models/queue-download.js +0 -1
  63. package/models/recommendation.d.ts +1 -1
  64. package/models/recommendation.js +0 -1
  65. package/models/supplier.d.ts +1 -1
  66. package/models/supplier.js +0 -1
  67. package/models/tag.d.ts +1 -1
  68. package/models/tag.js +0 -1
  69. package/models/unit-email.d.ts +1 -1
  70. package/models/unit-email.js +0 -1
  71. package/models/unit-template.d.ts +16 -13
  72. package/models/unit-template.js +0 -1
  73. package/models/unit.d.ts +53 -34
  74. package/models/unit.js +0 -1
  75. package/models/upsell-template.d.ts +3 -3
  76. package/models/upsell-template.js +0 -1
  77. package/models/user.d.ts +1 -1
  78. package/models/user.js +0 -1
  79. package/models/webhook-event.d.ts +3 -3
  80. package/models/webhook-event.js +0 -1
  81. package/models/webhook.d.ts +1 -1
  82. package/models/webhook.js +0 -1
  83. package/package.json +43 -41
package/models/order.d.ts CHANGED
@@ -1,14 +1,17 @@
1
1
  import { AptlyOrderStatus } from '../enums';
2
- import { AptlyUnitItemParamSchema } from './unit';
2
+ import { AptlyOrganizationSchema } from './organization.js';
3
+ import { AptlyProjectPeriodSchema, AptlyProjectSchema } from './project.js';
4
+ import { AptlyUnitItemParamSchema, AptlyUnitSchema } from './unit';
3
5
  import { AptlyBaseSchema } from './extends';
4
- export declare type AptlyOrder = AptlyOrderSchema<string, string>;
6
+ import { AptlyUserSchema } from './user.js';
7
+ export type AptlyOrder = AptlyOrderSchema<string, string>;
5
8
  export interface AptlyOrderSchema<ID, DATE> extends Omit<AptlyBaseSchema<ID, DATE>, 'name' | 'archived'> {
6
9
  orderNumber: string;
7
- organization: ID;
8
- project: ID;
9
- period: ID;
10
- unit: ID;
11
- signers: ID[];
10
+ organization: ID | AptlyOrganizationSchema<ID, DATE>;
11
+ project: ID | AptlyProjectSchema<ID, DATE>;
12
+ period: ID | AptlyProjectPeriodSchema<ID, DATE>;
13
+ unit: ID | AptlyUnitSchema<ID, DATE>;
14
+ signers: (ID | AptlyUserSchema<ID, DATE>)[];
12
15
  status: AptlyOrderStatus;
13
16
  receipt: ID;
14
17
  attachments: ID[];
@@ -21,13 +24,13 @@ export interface AptlyOrderSchema<ID, DATE> extends Omit<AptlyBaseSchema<ID, DAT
21
24
  */
22
25
  created: DATE;
23
26
  }
24
- export declare type AptlyOrderPricePipelineItem = AptlyOrderPricePipelineItemSchema<string>;
27
+ export type AptlyOrderPricePipelineItem = AptlyOrderPricePipelineItemSchema<string>;
25
28
  export interface AptlyOrderPricePipelineItemSchema<ID> {
26
29
  _id: ID;
27
30
  label: string;
28
31
  value: number;
29
32
  }
30
- export declare type AptlyOrderSignage = AptlyOrderSignageSchema<string, string>;
33
+ export type AptlyOrderSignage = AptlyOrderSignageSchema<string, string>;
31
34
  export interface AptlyOrderSignageSchema<ID, DATE> {
32
35
  hasReceivedFile: boolean;
33
36
  signed: boolean;
@@ -40,7 +43,7 @@ export interface AptlyOrderSignageSchema<ID, DATE> {
40
43
  organizationSignedAt?: DATE;
41
44
  customerSignedAt?: DATE;
42
45
  }
43
- export declare type AptlyOrderItem = AptlyOrderItemSchema<string, string>;
46
+ export type AptlyOrderItem = AptlyOrderItemSchema<string, string>;
44
47
  export interface AptlyOrderItemSchema<ID, DATE> {
45
48
  _id: ID;
46
49
  text?: string;
@@ -52,7 +55,7 @@ export interface AptlyOrderItemSchema<ID, DATE> {
52
55
  unitCost: number;
53
56
  pricePipeline: AptlyOrderItemPricePipelineSchema<ID>[];
54
57
  }
55
- export declare type AptlyOrderItemPricePipeline = AptlyOrderItemPricePipelineSchema<string>;
58
+ export type AptlyOrderItemPricePipeline = AptlyOrderItemPricePipelineSchema<string>;
56
59
  export interface AptlyOrderItemPricePipelineSchema<ID> {
57
60
  _id: ID;
58
61
  label: string;
package/models/order.js CHANGED
@@ -1,3 +1,2 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- //# sourceMappingURL=order.js.map
@@ -1,13 +1,13 @@
1
1
  import { AptlyPermissionModulesModels, AptlyPermissionOrganizationModels, AptlyScope, AptlySignageSchema } from '../core';
2
2
  import { AptlyUserSchema } from './user';
3
3
  import { AptlyMediaSrc } from './media';
4
- import { AptlyBaseSchema } from './extends';
4
+ import { AptlyBaseSchema, AptlyHistorySchema } from './extends';
5
5
  import { AptlyDepartmentGeneric } from './department';
6
6
  import { AptlyProducerSchema } from './producer';
7
7
  import { AptlyAppSchema } from './app';
8
8
  import { AptlyAlgorithmSchema } from './algorithm';
9
- export declare type AptlyOrganization = AptlyOrganizationSchema<string, string>;
10
- export interface AptlyOrganizationSchema<ID, DATE> extends AptlyBaseSchema<ID, DATE> {
9
+ export type AptlyOrganization = AptlyOrganizationSchema<string, string>;
10
+ export interface AptlyOrganizationSchema<ID, DATE> extends AptlyBaseSchema<ID, DATE>, AptlyHistorySchema<ID, DATE> {
11
11
  slug: string;
12
12
  logo?: string | null;
13
13
  logoMedia?: AptlyMediaSrc | null;
@@ -37,14 +37,14 @@ export interface AptlyOrganizationSchema<ID, DATE> extends AptlyBaseSchema<ID, D
37
37
  */
38
38
  created: DATE;
39
39
  }
40
- export declare type AptlyOrganizationIntegrations = AptlyOrganizationIntegrationsSchema<string>;
40
+ export type AptlyOrganizationIntegrations = AptlyOrganizationIntegrationsSchema<string>;
41
41
  export interface AptlyOrganizationIntegrationsSchema<ID> {
42
42
  _id: ID;
43
43
  integration: string;
44
44
  apiKey: string;
45
45
  organization: string;
46
46
  }
47
- export declare type AptlyOrganizationMember = AptlyOrganizationMemberSchema<string, string>;
47
+ export type AptlyOrganizationMember = AptlyOrganizationMemberSchema<string, string>;
48
48
  export interface AptlyOrganizationMemberSchema<ID, DATE> {
49
49
  _id: ID;
50
50
  user: AptlyUserSchema<ID, DATE> | ID;
@@ -52,7 +52,7 @@ export interface AptlyOrganizationMemberSchema<ID, DATE> {
52
52
  projects?: (ID | AptlyProducerSchema<ID, DATE>)[] | null;
53
53
  departments?: (ID | AptlyDepartmentGeneric<ID, DATE>)[];
54
54
  }
55
- export declare type AptlyOrganizationInvite = AptlyOrganizationInviteSchema<string, string>;
55
+ export type AptlyOrganizationInvite = AptlyOrganizationInviteSchema<string, string>;
56
56
  export interface AptlyOrganizationInviteSchema<ID, DATE> {
57
57
  _id: ID;
58
58
  code: string;
@@ -67,7 +67,7 @@ export interface AptlyOrganizationInviteSchema<ID, DATE> {
67
67
  claimTime?: DATE;
68
68
  };
69
69
  }
70
- export declare type AptlyOrganizationAppConfig<S extends object = object> = AptlyOrganizationAppConfigSchema<string, string, S>;
70
+ export type AptlyOrganizationAppConfig<S extends object = object> = AptlyOrganizationAppConfigSchema<string, string, S>;
71
71
  export interface AptlyOrganizationAppConfigSchema<ID, DATE, S extends object = object> extends Omit<AptlyBaseSchema<ID, DATE>, 'name' | 'archived'> {
72
72
  app: ID | AptlyAppSchema<ID, DATE>;
73
73
  scope: AptlyScope[];
@@ -1,3 +1,2 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- //# sourceMappingURL=organization.js.map
package/models/page.d.ts CHANGED
@@ -1,6 +1,6 @@
1
1
  import { AptlyPageSectionType } from '../enums';
2
2
  import { AptlyBaseSchema } from './extends';
3
- export declare type AptlyPage = AptlyPageSchema<string, string>;
3
+ export type AptlyPage = AptlyPageSchema<string, string>;
4
4
  export interface AptlyPageSchema<ID, DATE> extends AptlyBaseSchema<ID, DATE> {
5
5
  slug: string;
6
6
  project: ID;
@@ -22,7 +22,7 @@ export interface AptlyPageSchema<ID, DATE> extends AptlyBaseSchema<ID, DATE> {
22
22
  */
23
23
  showInMenu: boolean;
24
24
  }
25
- export declare type AptlyPageSection = AptlyPageSectionSchema<string, string>;
25
+ export type AptlyPageSection = AptlyPageSectionSchema<string, string>;
26
26
  export interface AptlyPageSectionSchema<ID, VALUE = any> {
27
27
  _id: ID;
28
28
  name: string;
package/models/page.js CHANGED
@@ -1,3 +1,2 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- //# sourceMappingURL=page.js.map
@@ -1,7 +1,7 @@
1
- import { AptlyBaseSchema } from './extends';
1
+ import { AptlyBaseSchema, AptlyHistorySchema } from './extends';
2
2
  import { AptlyMediaSrc } from './media';
3
- export declare type AptlyProducer = AptlyProducerSchema<string, string>;
4
- export interface AptlyProducerSchema<ID, DATE> extends AptlyBaseSchema<ID, DATE> {
3
+ export type AptlyProducer = AptlyProducerSchema<string, string>;
4
+ export interface AptlyProducerSchema<ID, DATE> extends AptlyBaseSchema<ID, DATE>, AptlyHistorySchema<ID, DATE> {
5
5
  email: string;
6
6
  logo: string | null;
7
7
  logoMedia?: AptlyMediaSrc | null;
@@ -9,6 +9,7 @@ export interface AptlyProducerSchema<ID, DATE> extends AptlyBaseSchema<ID, DATE>
9
9
  organization?: ID;
10
10
  createdBy: ID;
11
11
  tags: ID[];
12
+ featured: boolean;
12
13
  /**
13
14
  * @deprecated not used
14
15
  */
@@ -1,3 +1,2 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- //# sourceMappingURL=producer.js.map
@@ -1,5 +1,5 @@
1
1
  import { AptlyBaseSchema } from './extends';
2
- export declare type AptlyProductStats = AptlyProductStatsSchema<string, string>;
2
+ export type AptlyProductStats = AptlyProductStatsSchema<string, string>;
3
3
  export interface AptlyProductStatsSchema<ID, DATE> extends Omit<AptlyBaseSchema<ID, DATE>, 'name'> {
4
4
  product: ID;
5
5
  project: ID;
@@ -1,3 +1,2 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- //# sourceMappingURL=product-stats.js.map
@@ -1,12 +1,12 @@
1
- import { AptlyBaseSchema, AptlyDBCrawlerCleaner } from './extends';
1
+ import { AptlyBaseSchema, AptlyDBCrawlerCleaner, AptlyHistorySchema } from './extends';
2
2
  import { AptlyMediaSrcSchema } from './media';
3
3
  import { AptlyProducerSchema } from './producer';
4
- export declare type AptlyProduct = AptlyProductSchema<string, string>;
5
- export interface AptlyProductSchema<ID, DATE> extends AptlyDBCrawlerCleaner, AptlyBaseSchema<ID, DATE> {
4
+ export type AptlyProduct = AptlyProductSchema<string, string>;
5
+ export interface AptlyProductSchema<ID, DATE> extends AptlyDBCrawlerCleaner, AptlyBaseSchema<ID, DATE>, AptlyHistorySchema<ID, DATE> {
6
6
  searchableName: string;
7
7
  organization?: ID;
8
8
  project?: ID;
9
- extends?: ID;
9
+ extends?: ID | AptlyProductSchema<ID, DATE>;
10
10
  productNumber: string;
11
11
  description: string;
12
12
  images: AptlyProductImageSchema<ID, DATE>[];
@@ -43,13 +43,13 @@ export interface AptlyProductSchema<ID, DATE> extends AptlyDBCrawlerCleaner, Apt
43
43
  */
44
44
  created: DATE;
45
45
  }
46
- export declare type AptlyProductImage = AptlyProductImageSchema<string, string>;
46
+ export type AptlyProductImage = AptlyProductImageSchema<string, string>;
47
47
  export interface AptlyProductImageSchema<ID, DATE> extends AptlyMediaSrcSchema<ID, DATE> {
48
48
  image: string;
49
49
  description?: string;
50
50
  featured?: boolean;
51
51
  }
52
- export declare type AptlyProductVariant = AptlyProductVariantSchema<string, string>;
52
+ export type AptlyProductVariant = AptlyProductVariantSchema<string, string>;
53
53
  export interface AptlyProductVariantSchema<ID, DATE> {
54
54
  _id: ID;
55
55
  title?: string;
@@ -67,7 +67,7 @@ export interface AptlyProductVariantSchema<ID, DATE> {
67
67
  height?: string;
68
68
  length?: string;
69
69
  }
70
- export declare type AptlyProductImport = AptlyProductImportSchema<string, string>;
70
+ export type AptlyProductImport = AptlyProductImportSchema<string, string>;
71
71
  export interface AptlyProductImportSchema<ID, DATE> extends Partial<Omit<AptlyProductSchema<ID, DATE>, 'images' | 'documents'>> {
72
72
  images: string[];
73
73
  documents: string[];
package/models/product.js CHANGED
@@ -1,3 +1,2 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- //# sourceMappingURL=product.js.map
@@ -1,12 +1,12 @@
1
1
  import { AptlyOrganizationSchema } from './organization';
2
2
  import { AptlyPermissionModulesModels } from '../core';
3
3
  import { AptlyUserSchema } from './user';
4
- import { AptlyBaseSchema } from './extends';
4
+ import { AptlyBaseSchema, AptlyHistorySchema } from './extends';
5
5
  import { AptlyDocumentSchema } from './document';
6
6
  import { AptlyUnitOptionExtraItemSchema } from './unit';
7
7
  import { AptlyMediaSrc } from './media';
8
- export declare type AptlyProject = AptlyProjectSchema<string, string>;
9
- export interface AptlyProjectSchema<ID, DATE> extends AptlyBaseSchema<ID, DATE> {
8
+ export type AptlyProject = AptlyProjectSchema<string, string>;
9
+ export interface AptlyProjectSchema<ID, DATE> extends AptlyBaseSchema<ID, DATE>, AptlyHistorySchema<ID, DATE> {
10
10
  organization: AptlyOrganizationSchema<ID, DATE> | ID;
11
11
  template?: ID | null;
12
12
  /**
@@ -29,7 +29,7 @@ export interface AptlyProjectSchema<ID, DATE> extends AptlyBaseSchema<ID, DATE>
29
29
  */
30
30
  created: DATE;
31
31
  }
32
- export declare type AptlyProjectPeriod = AptlyProjectPeriodSchema<string, string>;
32
+ export type AptlyProjectPeriod = AptlyProjectPeriodSchema<string, string>;
33
33
  export interface AptlyProjectPeriodSchema<ID, DATE> {
34
34
  _id: ID;
35
35
  name: string;
@@ -40,7 +40,7 @@ export interface AptlyProjectPeriodSchema<ID, DATE> {
40
40
  /**
41
41
  * @deprecated use AptlyAlgorithm instead
42
42
  */
43
- export declare type AptlyProjectAlgorithm = AptlyProjectAlgorithmSchema<string>;
43
+ export type AptlyProjectAlgorithm = AptlyProjectAlgorithmSchema<string>;
44
44
  /**
45
45
  * @deprecated use AptlyAlgorithm instead
46
46
  */
@@ -54,7 +54,7 @@ export interface AptlyProjectAlgorithmSchema<ID> {
54
54
  /**
55
55
  * @deprecated use AptlyAlgorithmPipeline instead
56
56
  */
57
- export declare type AptlyProjectAlgorithmPipeline = AptlyProjectAlgorithmPipelineSchema<string>;
57
+ export type AptlyProjectAlgorithmPipeline = AptlyProjectAlgorithmPipelineSchema<string>;
58
58
  /**
59
59
  * @deprecated use AptlyAlgorithmPipeline instead
60
60
  */
@@ -109,13 +109,13 @@ export interface AptlyProjectThemePalette {
109
109
  disabled?: string;
110
110
  lightContrast?: string;
111
111
  }
112
- export declare type AptlyProjectIntegration = AptlyProjectIntegrationSchema<string>;
112
+ export type AptlyProjectIntegration = AptlyProjectIntegrationSchema<string>;
113
113
  export interface AptlyProjectIntegrationSchema<ID> {
114
114
  integration: ID;
115
115
  integrationName: string;
116
116
  project: string;
117
117
  }
118
- export declare type AptlyProjectNotify = AptlyProjectNotifySchema<string, string>;
118
+ export type AptlyProjectNotify = AptlyProjectNotifySchema<string, string>;
119
119
  interface AptlyProjectNotifySchema<ID, DATE> {
120
120
  _id: ID;
121
121
  user: AptlyUserSchema<ID, DATE> | ID;
package/models/project.js CHANGED
@@ -1,3 +1,2 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- //# sourceMappingURL=project.js.map
@@ -2,7 +2,7 @@ import { AptlyQueueDownloadStatus, AptlyQueueDownloadType } from '../enums/index
2
2
  import { AptlyDocumentSchema } from './document';
3
3
  import { AptlyMediaSchema } from './media';
4
4
  import { AptlyBaseSchema } from './extends';
5
- export declare type AptlyQueueDownload = AptlyQueueDownloadSchema<string, string>;
5
+ export type AptlyQueueDownload = AptlyQueueDownloadSchema<string, string>;
6
6
  export interface AptlyQueueDownloadSchema<ID, DATE> extends Omit<AptlyBaseSchema<ID, DATE>, 'name' | 'archived'> {
7
7
  url: string;
8
8
  type: AptlyQueueDownloadType;
@@ -1,3 +1,2 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- //# sourceMappingURL=queue-download.js.map
@@ -1,6 +1,6 @@
1
1
  import { AptlyMediaSrcSchema } from './media';
2
2
  import { AptlyBaseSchema } from './extends';
3
- export declare type AptlyRecommendation = AptlyRecommendationSchema<string, string>;
3
+ export type AptlyRecommendation = AptlyRecommendationSchema<string, string>;
4
4
  export interface AptlyRecommendationSchema<ID, DATE> extends AptlyBaseSchema<ID, DATE> {
5
5
  organization?: ID;
6
6
  project?: ID;
@@ -1,3 +1,2 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- //# sourceMappingURL=recommendation.js.map
@@ -1,6 +1,6 @@
1
1
  import { AptlyMediaSrc } from './media';
2
2
  import { AptlyBaseSchema } from './extends';
3
- export declare type AptlySupplier = AptlySupplierSchema<string, string>;
3
+ export type AptlySupplier = AptlySupplierSchema<string, string>;
4
4
  export interface AptlySupplierSchema<ID, DATE> extends AptlyBaseSchema<ID, DATE> {
5
5
  email?: string;
6
6
  logo: string | null;
@@ -1,3 +1,2 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- //# sourceMappingURL=supplier.js.map
package/models/tag.d.ts CHANGED
@@ -1,5 +1,5 @@
1
1
  import { AptlyBaseSchema } from './extends';
2
- export declare type AptlyTag = AptlyTagSchema<string, string>;
2
+ export type AptlyTag = AptlyTagSchema<string, string>;
3
3
  export interface AptlyTagSchema<ID, DATE> extends AptlyBaseSchema<ID, DATE> {
4
4
  /**
5
5
  * @deprecated use createdAt
package/models/tag.js CHANGED
@@ -1,3 +1,2 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- //# sourceMappingURL=tag.js.map
@@ -4,7 +4,7 @@ import { AptlyUnitSchema } from './unit';
4
4
  import { AptlyInquirySchema } from './inquiry';
5
5
  import { AptlyBookingSchema } from './booking';
6
6
  import { AptlyBaseSchema } from './extends';
7
- export declare type AptlyUnitEmail = AptlyUnitEmailSchema<string, string>;
7
+ export type AptlyUnitEmail = AptlyUnitEmailSchema<string, string>;
8
8
  export interface AptlyUnitEmailSchema<ID, DATE> extends Omit<AptlyBaseSchema<ID, DATE>, 'name' | 'archived'> {
9
9
  type: AptlyUnitEmailType;
10
10
  to: string[];
@@ -13,4 +13,3 @@ var AptlyUnitEmailType;
13
13
  AptlyUnitEmailType["OrderCreated"] = "order-created";
14
14
  AptlyUnitEmailType["OrderSigned"] = "order-signed";
15
15
  })(AptlyUnitEmailType = exports.AptlyUnitEmailType || (exports.AptlyUnitEmailType = {}));
16
- //# sourceMappingURL=unit-email.js.map
@@ -5,12 +5,12 @@ import { AptlyProducerSchema } from './producer';
5
5
  import { AptlyMediaSrcSchema } from './media';
6
6
  import { AptlyUpsellTemplateSchema } from './upsell-template';
7
7
  import { AptlyProjectAlgorithmSchema, AptlyProjectPeriodSchema } from './project';
8
- export declare type AptlyUnitTemplateBase = AptlyUnitTemplateBaseSchema<string, string>;
8
+ export type AptlyUnitTemplateBase = AptlyUnitTemplateBaseSchema<string, string>;
9
9
  export interface AptlyUnitTemplateBaseSchema<ID, DATE> extends AptlyBaseSchema<ID, DATE> {
10
10
  _order_categories: ID[];
11
11
  categories: AptlyUnitTemplateCategorySchema<ID, DATE>[];
12
12
  }
13
- export declare type AptlyUnitTemplate = AptlyUnitTemplateSchema<string, string>;
13
+ export type AptlyUnitTemplate = AptlyUnitTemplateSchema<string, string>;
14
14
  export interface AptlyUnitTemplateSchema<ID, DATE> extends AptlyUnitTemplateBaseSchema<ID, DATE>, AptlyHistorySchema<ID, DATE> {
15
15
  name: string;
16
16
  description?: string;
@@ -22,13 +22,13 @@ export interface AptlyUnitTemplateSchema<ID, DATE> extends AptlyUnitTemplateBase
22
22
  */
23
23
  blueprints: AptlyUnitTemplateBlueprintSchema<ID>[];
24
24
  }
25
- export declare type AptlyUnitTemplateBlueprint = AptlyUnitTemplateBlueprintSchema<string>;
25
+ export type AptlyUnitTemplateBlueprint = AptlyUnitTemplateBlueprintSchema<string>;
26
26
  export interface AptlyUnitTemplateBlueprintSchema<ID> {
27
27
  _id: ID;
28
28
  image: string;
29
29
  featured: boolean;
30
30
  }
31
- export declare type AptlyUnitTemplateCategory = AptlyUnitTemplateCategorySchema<string, string>;
31
+ export type AptlyUnitTemplateCategory = AptlyUnitTemplateCategorySchema<string, string>;
32
32
  export interface AptlyUnitTemplateCategorySchema<ID, DATE> {
33
33
  _id: ID;
34
34
  _orderID: ID;
@@ -44,7 +44,7 @@ export interface AptlyUnitTemplateCategorySchema<ID, DATE> {
44
44
  */
45
45
  sameAs?: ID;
46
46
  }
47
- export declare type AptlyUnitTemplateCategorySection = AptlyUnitTemplateCategorySectionSchema<string, string>;
47
+ export type AptlyUnitTemplateCategorySection = AptlyUnitTemplateCategorySectionSchema<string, string>;
48
48
  export interface AptlyUnitTemplateCategorySectionSchema<ID, DATE> {
49
49
  _id: ID;
50
50
  _orderID: ID;
@@ -59,7 +59,7 @@ export interface AptlyUnitTemplateCategorySectionSchema<ID, DATE> {
59
59
  products: AptlyUnitTemplateCategorySectionProductSchema<ID, DATE>[];
60
60
  period: AptlyProjectPeriodSchema<ID, DATE> | ID;
61
61
  }
62
- export declare type AptlyUnitTemplateCategorySectionPackage = AptlyUnitTemplateCategorySectionPackageSchema<string, string>;
62
+ export type AptlyUnitTemplateCategorySectionPackage = AptlyUnitTemplateCategorySectionPackageSchema<string, string>;
63
63
  export interface AptlyUnitTemplateCategorySectionPackageSchema<ID, DATE> {
64
64
  _id: ID;
65
65
  name: string;
@@ -70,18 +70,18 @@ export interface AptlyUnitTemplateCategorySectionPackageSchema<ID, DATE> {
70
70
  _product_order?: ID[];
71
71
  products?: AptlyUnitTemplateCategorySectionProductSchema<ID, DATE>[];
72
72
  }
73
- export declare type AptlyUnitTemplateCategorySectionAssortment = AptlyUnitTemplateCategorySectionAssortmentSchema<string, string>;
73
+ export type AptlyUnitTemplateCategorySectionAssortment = AptlyUnitTemplateCategorySectionAssortmentSchema<string, string>;
74
74
  export interface AptlyUnitTemplateCategorySectionAssortmentSchema<ID, DATE> {
75
75
  _id: ID;
76
76
  createdAt: DATE;
77
77
  color: string;
78
78
  }
79
- export declare type AptlyUnitTemplateCategorySectionProduct = AptlyUnitTemplateCategorySectionProductSchema<string, string>;
79
+ export type AptlyUnitTemplateCategorySectionProduct = AptlyUnitTemplateCategorySectionProductSchema<string, string>;
80
80
  export interface AptlyUnitTemplateCategorySectionProductSchema<ID, DATE> {
81
81
  _id: ID;
82
82
  _orderID: ID;
83
- product?: ID | AptlyProductSchema<ID, DATE>;
84
- producer?: ID | AptlyProducerSchema<ID, DATE>;
83
+ product?: AptlyProductSchema<ID, DATE>;
84
+ producer?: AptlyProducerSchema<ID, DATE>;
85
85
  availableProducts: ID[];
86
86
  variantPrices: AptlyUnitTemplateCategorySectionProductVariantPriceSchema<ID>[];
87
87
  text?: string;
@@ -91,7 +91,7 @@ export interface AptlyUnitTemplateCategorySectionProductSchema<ID, DATE> {
91
91
  consequenceParam?: string;
92
92
  amount: number;
93
93
  unitCost?: number;
94
- algorithm: AptlyProjectAlgorithmSchema<ID> | ID;
94
+ algorithm: ID | AptlyProjectAlgorithmSchema<ID>;
95
95
  standard: boolean;
96
96
  standardVariant?: ID;
97
97
  partOfPackage?: ID;
@@ -109,13 +109,16 @@ export interface AptlyUnitTemplateCategorySectionProductSchema<ID, DATE> {
109
109
  */
110
110
  measureUnitType: AptlyUnitTemplateCategorySectionProductMeasureUnitType;
111
111
  }
112
- export declare type AptlyUnitTemplateCategorySectionProductParam<VALUE> = AptlyUnitTemplateCategorySectionProductParamSchema<string, VALUE>;
112
+ export type AptlyUnitTemplateCategorySectionProductParam<VALUE> = AptlyUnitTemplateCategorySectionProductParamSchema<string, VALUE>;
113
113
  export interface AptlyUnitTemplateCategorySectionProductParamSchema<ID, VALUE = any> {
114
114
  _id: ID;
115
115
  key: AptlyUnitTemplateCategorySectionProductParamKey;
116
116
  value: VALUE;
117
+ categoryName?: string;
118
+ sectionNames?: string[];
119
+ sectionName?: string;
117
120
  }
118
- export declare type AptlyUnitTemplateCategorySectionProductVariantPrice = AptlyUnitTemplateCategorySectionProductVariantPriceSchema<string>;
121
+ export type AptlyUnitTemplateCategorySectionProductVariantPrice = AptlyUnitTemplateCategorySectionProductVariantPriceSchema<string>;
119
122
  export interface AptlyUnitTemplateCategorySectionProductVariantPriceSchema<ID> {
120
123
  variant: ID;
121
124
  price: number;
@@ -1,3 +1,2 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- //# sourceMappingURL=unit-template.js.map