@aptly-as/types 2.5.3 → 2.5.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 (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 +101 -101
  40. package/models/app.js +52 -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
@@ -1,94 +1,94 @@
1
- import { AptlyAppSchema } from './app.js';
2
- import { AptlyDocumentSchema } from './document.js';
3
- import { AptlyAddress, AptlyBaseSchema } from './extends.js';
4
- import { AptlyOrderPaymentStatus, AptlyOrderSchema } from './order.js';
5
- import { AptlyOrganizationSchema } from './organization.js';
6
- import { AptlyProjectSchema } from './project.js';
7
- import { AptlyUnitSchema } from './unit.js';
8
- import { AptlyUserSchema } from './user.js';
9
- export type AptlyPayment = AptlyPaymentSchema<string, string>;
10
- export interface AptlyPaymentSchema<ID, DATE> extends Omit<AptlyBaseSchema<ID, DATE>, 'name' | 'archived'> {
11
- organization: ID | AptlyOrganizationSchema<ID, DATE>;
12
- project: ID | AptlyProjectSchema<ID, DATE>;
13
- unit: ID | AptlyUnitSchema<ID, DATE>;
14
- order: ID | AptlyOrderSchema<ID, DATE>;
15
- app: ID | AptlyAppSchema<ID, DATE>;
16
- document?: ID | AptlyDocumentSchema<ID, DATE>;
17
- number: number;
18
- totalCost: number;
19
- totalVat: number;
20
- items: AptlyPaymentItemSchema<ID>[];
21
- transaction: {
22
- ref: string;
23
- at: DATE;
24
- };
25
- company: AptlyPaymentCompany;
26
- customer: AptlyPaymentCustomerSchema<ID, DATE>;
27
- shipping: AptlyAddress;
28
- shippingDate?: DATE;
29
- billing?: AptlyAddress;
30
- card?: {
31
- brand: string;
32
- last4: string;
33
- };
34
- captures: AptlyPaymentCaptureSchema<ID, DATE>[];
35
- captured: {
36
- amount: number;
37
- at: DATE;
38
- };
39
- }
40
- export type AptlyPaymentCapture = AptlyPaymentCaptureSchema<string, string>;
41
- export interface AptlyPaymentCaptureSchema<ID, DATE> {
42
- _id: ID;
43
- amount: number;
44
- description: string;
45
- ref: string;
46
- user: ID | AptlyUserSchema<ID, DATE>;
47
- at: DATE;
48
- }
49
- export interface AptlyPaymentCompany {
50
- vat: string;
51
- name: string;
52
- email: string;
53
- address: AptlyAddress;
54
- phone?: string;
55
- }
56
- export type AptlyPaymentCustomer = AptlyPaymentCustomerSchema<string, string>;
57
- export interface AptlyPaymentCustomerSchema<ID, DATE> {
58
- user: ID | AptlyUserSchema<ID, DATE>;
59
- firstName: string;
60
- lastName: string;
61
- email: string;
62
- phone?: string;
63
- }
64
- export interface AptlyPaymentItemSchema<ID> {
65
- _id: ID;
66
- name: string;
67
- sku: string;
68
- quantity: number;
69
- unitCost: number;
70
- totalCost: number;
71
- totalVat: number;
72
- }
73
- export interface AptlyPaymentCaptureBody {
74
- id: string;
75
- status: AptlyOrderPaymentStatus;
76
- capturedAmount: number;
77
- totalCost: number;
78
- at: string;
79
- }
80
- export interface AptlyPaymentTransactionBody {
81
- app: string;
82
- id: string;
83
- at: string;
84
- customer: {
85
- user: string;
86
- firstName: string;
87
- lastName: string;
88
- email: string;
89
- phone?: string;
90
- };
91
- card: AptlyPayment['card'];
92
- shipping: AptlyAddress;
93
- billing?: AptlyAddress;
94
- }
1
+ import { AptlyAppSchema } from './app.js';
2
+ import { AptlyDocumentSchema } from './document.js';
3
+ import { AptlyAddress, AptlyBaseSchema } from './extends.js';
4
+ import { AptlyOrderPaymentStatus, AptlyOrderSchema } from './order.js';
5
+ import { AptlyOrganizationSchema } from './organization.js';
6
+ import { AptlyProjectSchema } from './project.js';
7
+ import { AptlyUnitSchema } from './unit.js';
8
+ import { AptlyUserSchema } from './user.js';
9
+ export type AptlyPayment = AptlyPaymentSchema<string, string>;
10
+ export interface AptlyPaymentSchema<ID, DATE> extends Omit<AptlyBaseSchema<ID, DATE>, 'name' | 'archived'> {
11
+ organization: ID | AptlyOrganizationSchema<ID, DATE>;
12
+ project: ID | AptlyProjectSchema<ID, DATE>;
13
+ unit: ID | AptlyUnitSchema<ID, DATE>;
14
+ order: ID | AptlyOrderSchema<ID, DATE>;
15
+ app: ID | AptlyAppSchema<ID, DATE>;
16
+ document?: ID | AptlyDocumentSchema<ID, DATE>;
17
+ number: number;
18
+ totalCost: number;
19
+ totalVat: number;
20
+ items: AptlyPaymentItemSchema<ID>[];
21
+ transaction: {
22
+ ref: string;
23
+ at: DATE;
24
+ };
25
+ company: AptlyPaymentCompany;
26
+ customer: AptlyPaymentCustomerSchema<ID, DATE>;
27
+ shipping: AptlyAddress;
28
+ shippingDate?: DATE;
29
+ billing?: AptlyAddress;
30
+ card?: {
31
+ brand: string;
32
+ last4: string;
33
+ };
34
+ captures: AptlyPaymentCaptureSchema<ID, DATE>[];
35
+ captured: {
36
+ amount: number;
37
+ at: DATE;
38
+ };
39
+ }
40
+ export type AptlyPaymentCapture = AptlyPaymentCaptureSchema<string, string>;
41
+ export interface AptlyPaymentCaptureSchema<ID, DATE> {
42
+ _id: ID;
43
+ amount: number;
44
+ description: string;
45
+ ref: string;
46
+ user: ID | AptlyUserSchema<ID, DATE>;
47
+ at: DATE;
48
+ }
49
+ export interface AptlyPaymentCompany {
50
+ vat: string;
51
+ name: string;
52
+ email: string;
53
+ address: AptlyAddress;
54
+ phone?: string;
55
+ }
56
+ export type AptlyPaymentCustomer = AptlyPaymentCustomerSchema<string, string>;
57
+ export interface AptlyPaymentCustomerSchema<ID, DATE> {
58
+ user: ID | AptlyUserSchema<ID, DATE>;
59
+ firstName: string;
60
+ lastName: string;
61
+ email: string;
62
+ phone?: string;
63
+ }
64
+ export interface AptlyPaymentItemSchema<ID> {
65
+ _id: ID;
66
+ name: string;
67
+ sku: string;
68
+ quantity: number;
69
+ unitCost: number;
70
+ totalCost: number;
71
+ totalVat: number;
72
+ }
73
+ export interface AptlyPaymentCaptureBody {
74
+ id: string;
75
+ status: AptlyOrderPaymentStatus;
76
+ capturedAmount: number;
77
+ totalCost: number;
78
+ at: string;
79
+ }
80
+ export interface AptlyPaymentTransactionBody {
81
+ app: string;
82
+ id: string;
83
+ at: string;
84
+ customer: {
85
+ user: string;
86
+ firstName: string;
87
+ lastName: string;
88
+ email: string;
89
+ phone?: string;
90
+ };
91
+ card: AptlyPayment['card'];
92
+ shipping: AptlyAddress;
93
+ billing?: AptlyAddress;
94
+ }
package/models/payment.js CHANGED
@@ -1 +1 @@
1
- export {};
1
+ export {};
@@ -1,8 +1,8 @@
1
- export type AptlyPeriod = AptlyPeriodSchema<string, string>;
2
- export interface AptlyPeriodSchema<ID, DATE> {
3
- _id: ID;
4
- name: string;
5
- open: DATE;
6
- close: DATE;
7
- override?: boolean;
8
- }
1
+ export type AptlyPeriod = AptlyPeriodSchema<string, string>;
2
+ export interface AptlyPeriodSchema<ID, DATE> {
3
+ _id: ID;
4
+ name: string;
5
+ open: DATE;
6
+ close: DATE;
7
+ override?: boolean;
8
+ }
package/models/period.js CHANGED
@@ -1 +1 @@
1
- export {};
1
+ export {};
@@ -1,24 +1,24 @@
1
- import { AptlyBaseSchema, AptlyHistorySchema } from './extends.js';
2
- import { AptlyMediaSrc } from './media.js';
3
- export type AptlyProducer = AptlyProducerSchema<string, string>;
4
- export interface AptlyProducerSchema<ID, DATE> extends AptlyBaseSchema<ID, DATE>, AptlyHistorySchema<ID, DATE> {
5
- email: string;
6
- logo: string | null;
7
- logoMedia?: AptlyMediaSrc | null;
8
- url?: string;
9
- organization?: ID;
10
- createdBy: ID;
11
- tags: ID[];
12
- trademarks?: AptlyProducerTrademarkSchema<ID, DATE>[];
13
- featured: boolean;
14
- extends: ID;
15
- created: DATE;
16
- }
17
- export type AptlyProducerTrademark = AptlyProducerTrademarkSchema<string, string>;
18
- export interface AptlyProducerTrademarkSchema<ID, DATE> {
19
- _id: ID;
20
- name: string;
21
- logo?: AptlyMediaSrc | null;
22
- updatedAt: DATE;
23
- createdAt: DATE;
24
- }
1
+ import { AptlyBaseSchema, AptlyHistorySchema } from './extends.js';
2
+ import { AptlyMediaSrc } from './media.js';
3
+ export type AptlyProducer = AptlyProducerSchema<string, string>;
4
+ export interface AptlyProducerSchema<ID, DATE> extends AptlyBaseSchema<ID, DATE>, AptlyHistorySchema<ID, DATE> {
5
+ email: string;
6
+ logo: string | null;
7
+ logoMedia?: AptlyMediaSrc | null;
8
+ url?: string;
9
+ organization?: ID;
10
+ createdBy: ID;
11
+ tags: ID[];
12
+ trademarks?: AptlyProducerTrademarkSchema<ID, DATE>[];
13
+ featured: boolean;
14
+ extends: ID;
15
+ created: DATE;
16
+ }
17
+ export type AptlyProducerTrademark = AptlyProducerTrademarkSchema<string, string>;
18
+ export interface AptlyProducerTrademarkSchema<ID, DATE> {
19
+ _id: ID;
20
+ name: string;
21
+ logo?: AptlyMediaSrc | null;
22
+ updatedAt: DATE;
23
+ createdAt: DATE;
24
+ }
@@ -1 +1 @@
1
- export {};
1
+ export {};
@@ -1,18 +1,18 @@
1
- import { AptlyBaseSchema } from './extends.js';
2
- export type AptlyProductStats = AptlyProductStatsSchema<string, string>;
3
- export interface AptlyProductStatsSchema<ID, DATE> extends Omit<AptlyBaseSchema<ID, DATE>, 'name'> {
4
- product: ID;
5
- project: ID;
6
- organization: ID;
7
- producer: ID;
8
- extends?: ID;
9
- tags: ID[];
10
- stats: {
11
- likes: number;
12
- inUnits: number;
13
- amountInUnits: number;
14
- availability: number;
15
- picks: number;
16
- complaints: number;
17
- };
18
- }
1
+ import { AptlyBaseSchema } from './extends.js';
2
+ export type AptlyProductStats = AptlyProductStatsSchema<string, string>;
3
+ export interface AptlyProductStatsSchema<ID, DATE> extends Omit<AptlyBaseSchema<ID, DATE>, 'name'> {
4
+ product: ID;
5
+ project: ID;
6
+ organization: ID;
7
+ producer: ID;
8
+ extends?: ID;
9
+ tags: ID[];
10
+ stats: {
11
+ likes: number;
12
+ inUnits: number;
13
+ amountInUnits: number;
14
+ availability: number;
15
+ picks: number;
16
+ complaints: number;
17
+ };
18
+ }
@@ -1 +1 @@
1
- export {};
1
+ export {};
@@ -1,78 +1,78 @@
1
- import { AptlyDocumentSchema } from './document.js';
2
- import { AptlyBaseSchema, AptlyDBCrawlerCleaner, AptlyHistorySchema } from './extends.js';
3
- import { AptlyMediaSrcSchema } from './media.js';
4
- import { AptlyProducerSchema } from './producer.js';
5
- import { AptlyTagSchema } from './tag.js';
6
- export type AptlyProduct = AptlyProductSchema<string, string>;
7
- export interface AptlyProductSchema<ID, DATE> extends AptlyDBCrawlerCleaner, AptlyBaseSchema<ID, DATE>, AptlyHistorySchema<ID, DATE> {
8
- searchableName: string;
9
- organization?: ID;
10
- project?: ID;
11
- base?: boolean;
12
- extends?: ID | AptlyProductSchema<ID, DATE>;
13
- productNumber: string;
14
- itemNumber?: string;
15
- eanNumber?: string;
16
- description: string;
17
- images: AptlyProductImageSchema<ID, DATE>[];
18
- variants: AptlyProductVariantSchema<ID, DATE>[];
19
- products?: (ID | AptlyProductSchema<ID, DATE>)[];
20
- url?: string;
21
- color?: string;
22
- colorLabel?: string;
23
- series?: string;
24
- style?: string;
25
- width?: string;
26
- height?: string;
27
- length?: string;
28
- depth?: string;
29
- volume?: string;
30
- circumference?: string;
31
- material?: string;
32
- unitCost?: number;
33
- netCost?: number;
34
- producer?: ID | AptlyProducerSchema<ID, DATE> | null;
35
- supplier?: ID;
36
- tags: (ID | AptlyTagSchema<ID, DATE>)[];
37
- documents: (ID | AptlyDocumentSchema<ID, DATE>)[];
38
- createdBy: ID;
39
- stats?: any;
40
- importID?: ID;
41
- source?: string;
42
- title?: string;
43
- likes: {
44
- user: ID;
45
- date: DATE;
46
- }[];
47
- created: DATE;
48
- }
49
- export type AptlyProductImage = AptlyProductImageSchema<string, string>;
50
- export interface AptlyProductImageSchema<ID, DATE> extends AptlyMediaSrcSchema<ID, DATE> {
51
- image: string;
52
- description?: string;
53
- featured?: boolean;
54
- }
55
- export type AptlyProductVariant = AptlyProductVariantSchema<string, string>;
56
- export interface AptlyProductVariantSchema<ID, DATE> {
57
- _id: ID;
58
- title?: string;
59
- images: AptlyProductImageSchema<ID, DATE>[];
60
- documents: (ID | AptlyDocumentSchema<ID, DATE>)[];
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
- unitCost?: number;
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
- }
1
+ import { AptlyDocumentSchema } from './document.js';
2
+ import { AptlyBaseSchema, AptlyDBCrawlerCleaner, AptlyHistorySchema } from './extends.js';
3
+ import { AptlyMediaSrcSchema } from './media.js';
4
+ import { AptlyProducerSchema } from './producer.js';
5
+ import { AptlyTagSchema } from './tag.js';
6
+ export type AptlyProduct = AptlyProductSchema<string, string>;
7
+ export interface AptlyProductSchema<ID, DATE> extends AptlyDBCrawlerCleaner, AptlyBaseSchema<ID, DATE>, AptlyHistorySchema<ID, DATE> {
8
+ searchableName: string;
9
+ organization?: ID;
10
+ project?: ID;
11
+ base?: boolean;
12
+ extends?: ID | AptlyProductSchema<ID, DATE>;
13
+ productNumber: string;
14
+ itemNumber?: string;
15
+ eanNumber?: string;
16
+ description: string;
17
+ images: AptlyProductImageSchema<ID, DATE>[];
18
+ variants: AptlyProductVariantSchema<ID, DATE>[];
19
+ products?: (ID | AptlyProductSchema<ID, DATE>)[];
20
+ url?: string;
21
+ color?: string;
22
+ colorLabel?: string;
23
+ series?: string;
24
+ style?: string;
25
+ width?: string;
26
+ height?: string;
27
+ length?: string;
28
+ depth?: string;
29
+ volume?: string;
30
+ circumference?: string;
31
+ material?: string;
32
+ unitCost?: number;
33
+ netCost?: number;
34
+ producer?: ID | AptlyProducerSchema<ID, DATE> | null;
35
+ supplier?: ID;
36
+ tags: (ID | AptlyTagSchema<ID, DATE>)[];
37
+ documents: (ID | AptlyDocumentSchema<ID, DATE>)[];
38
+ createdBy: ID;
39
+ stats?: any;
40
+ importID?: ID;
41
+ source?: string;
42
+ title?: string;
43
+ likes: {
44
+ user: ID;
45
+ date: DATE;
46
+ }[];
47
+ created: DATE;
48
+ }
49
+ export type AptlyProductImage = AptlyProductImageSchema<string, string>;
50
+ export interface AptlyProductImageSchema<ID, DATE> extends AptlyMediaSrcSchema<ID, DATE> {
51
+ image: string;
52
+ description?: string;
53
+ featured?: boolean;
54
+ }
55
+ export type AptlyProductVariant = AptlyProductVariantSchema<string, string>;
56
+ export interface AptlyProductVariantSchema<ID, DATE> {
57
+ _id: ID;
58
+ title?: string;
59
+ images: AptlyProductImageSchema<ID, DATE>[];
60
+ documents: (ID | AptlyDocumentSchema<ID, DATE>)[];
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
+ unitCost?: number;
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/product.js CHANGED
@@ -1 +1 @@
1
- export {};
1
+ export {};