@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/order.d.ts CHANGED
@@ -1,163 +1,164 @@
1
- import { AptlyOrderStatus } from '../enums/index.js';
2
- import { AptlyAppImplementationSetting, AptlyAppSchema } from './app.js';
3
- import { AptlyDocumentSchema } from './document.js';
4
- import { AptlyEmailSchema } from './email.js';
5
- import { AptlyOrganizationAppConfigSchema, AptlyOrganizationSchema } from './organization.js';
6
- import { AptlyPaymentSchema } from './payment.js';
7
- import { AptlyProductSchema } from './product.js';
8
- import { AptlyProject, AptlyProjectPeriodSchema, AptlyProjectSchema } from './project.js';
9
- import { AptlyUnit, AptlyUnitItemParamSchema, AptlyUnitSchema } from './unit.js';
10
- import { AptlyBaseSchema } from './extends.js';
11
- import { AptlyUser, AptlyUserSchema } from './user.js';
12
- export declare enum AptlyOrderPaymentStatus {
13
- Pending = "PENDING",
14
- OnHold = "ON_HOLD",
15
- Authorized = "AUTHORIZED",
16
- Captured = "CAPTURED"
17
- }
18
- export type AptlyOrder = AptlyOrderSchema<string, string>;
19
- export interface AptlyOrderSchema<ID, DATE> extends Omit<AptlyBaseSchema<ID, DATE>, 'name'> {
20
- orderNumber: string;
21
- organization: ID | AptlyOrganizationSchema<ID, DATE>;
22
- project: ID | AptlyProjectSchema<ID, DATE>;
23
- period?: ID | AptlyProjectPeriodSchema<ID, DATE>;
24
- unit: ID | AptlyUnitSchema<ID, DATE>;
25
- signers: (ID | AptlyUserSchema<ID, DATE>)[];
26
- status: AptlyOrderStatus;
27
- receipt: ID | AptlyDocumentSchema<ID, DATE>;
28
- signedReceipt?: ID | AptlyDocumentSchema<ID, DATE>;
29
- attachments: ID[];
30
- signage: AptlyOrderSignageSchema<ID, DATE>;
31
- items: AptlyOrderItemSchema<ID, DATE>[];
32
- totalCost: number;
33
- totalVat?: number;
34
- pricePipeline: AptlyOrderPricePipelineItemSchema<ID>[];
35
- signees?: AptlyOrderSigneeSchema<ID, DATE>[];
36
- signedAt?: DATE | null;
37
- emailText?: string;
38
- approved?: {
39
- action?: AptlyOrderAction;
40
- user?: ID | AptlyUserSchema<ID, DATE>;
41
- at?: DATE;
42
- };
43
- paymentSession?: AptlyOrderPaymentSessionSchema<ID, DATE> | null;
44
- payment?: ID | AptlyPaymentSchema<ID, DATE>;
45
- createdBy?: ID | AptlyUserSchema<ID, DATE>;
46
- createdByAdmin?: boolean;
47
- created: DATE;
48
- }
49
- export type AptlyOrderPaymentSession = AptlyOrderPaymentSessionSchema<string, string>;
50
- export interface AptlyOrderPaymentSessionSchema<ID, DATE> {
51
- app?: ID;
52
- status?: AptlyOrderPaymentStatus;
53
- url?: string;
54
- id?: string;
55
- at?: DATE | null;
56
- user?: ID | null;
57
- expiresAt?: DATE | null;
58
- paidAt?: DATE | null;
59
- capturedAt?: DATE | null;
60
- }
61
- export type AptlyOrderSignee = AptlyOrderSigneeSchema<string, string>;
62
- export interface AptlyOrderSigneeSchema<ID, DATE> {
63
- _id: ID;
64
- user: ID | AptlyUserSchema<ID, DATE>;
65
- type: AptlyOrderSigneeType;
66
- url: string;
67
- signedAt?: DATE;
68
- }
69
- export declare enum AptlyOrderSigneeType {
70
- Unit = 0,
71
- Admin = 1
72
- }
73
- export type AptlyOrderPricePipelineItem = AptlyOrderPricePipelineItemSchema<string>;
74
- export interface AptlyOrderPricePipelineItemSchema<ID> {
75
- _id: ID;
76
- label: string;
77
- value: number;
78
- }
79
- export type AptlyOrderSignage = AptlyOrderSignageSchema<string, string>;
80
- export interface AptlyOrderSignageSchema<ID, DATE> {
81
- signed: boolean;
82
- createdAt?: DATE | null;
83
- expiresAt?: DATE | null;
84
- signedAt?: DATE | null;
85
- document?: ID | AptlyDocumentSchema<ID, DATE>;
86
- hasReceivedFile?: boolean;
87
- signedFile?: ID | AptlyDocumentSchema<ID, DATE>;
88
- documentId?: ID;
89
- documentCreationDate?: DATE;
90
- expireDate?: DATE;
91
- customerSignerId?: string;
92
- organizationSignerId?: string;
93
- organizationSignedAt?: DATE;
94
- customerSignedAt?: DATE;
95
- }
96
- export type AptlyOrderItem = AptlyOrderItemSchema<string, string>;
97
- export interface AptlyOrderItemSchema<ID, DATE> {
98
- _id: ID;
99
- text?: string;
100
- product: ID | AptlyProductSchema<ID, DATE>;
101
- variant: ID;
102
- producer: ID;
103
- params: AptlyUnitItemParamSchema<ID, DATE>[];
104
- quantity: number;
105
- unitCost: number;
106
- unitVat?: number;
107
- vat?: number;
108
- pricePipeline: AptlyOrderItemPricePipelineSchema<ID>[];
109
- }
110
- export type AptlyOrderItemPricePipeline = AptlyOrderItemPricePipelineSchema<string>;
111
- export interface AptlyOrderItemPricePipelineSchema<ID> {
112
- _id: ID;
113
- label: string;
114
- value: number;
115
- }
116
- export declare enum AptlyOrderAction {
117
- Complete = "complete",
118
- Payment = "payment",
119
- SignManually = "sign-manually",
120
- Sign = "sign"
121
- }
122
- export interface AptlyOrderActionPostBody {
123
- action: AptlyOrderAction | null;
124
- document?: string | null;
125
- app?: string;
126
- emailSubject: string;
127
- emailText: string;
128
- emailMarkdown: string;
129
- users: AptlyOrderActionPostBodyUser[];
130
- deadlineInDays?: number;
131
- }
132
- export interface AptlyOrderActionPostBodyUser {
133
- user: string;
134
- signMethod?: string;
135
- isAdmin?: boolean;
136
- }
137
- export type AptlyOrderActionItem<S extends object = object> = AptlyOrderActionItemSchema<string, string, S>;
138
- export interface AptlyOrderActionItemSchema<ID, DATE, S extends object> {
139
- action: AptlyOrderAction;
140
- path: string;
141
- app?: Pick<AptlyAppSchema<ID, DATE>, '_id' | 'name' | 'sign' | 'logo' | 'settings'>;
142
- appSettings?: AptlyOrganizationAppConfigSchema<ID, DATE, S>['settings'];
143
- email?: AptlyEmailSchema<ID, DATE>;
144
- }
145
- export interface AptlyOrderActionItemSignSettings {
146
- [AptlyAppImplementationSetting.SignCostPer]: number;
147
- [AptlyAppImplementationSetting.SignMethod]: string;
148
- }
149
- export interface AptlyOrderActionSignData {
150
- project: Pick<AptlyProject, '_id' | 'name'> & {
151
- theme: Pick<AptlyProject['theme'], 'contact'>;
152
- };
153
- unit: Pick<AptlyUnit, '_id' | 'name'>;
154
- order: Pick<AptlyOrder, '_id' | 'orderNumber' | 'receipt' | 'period'>;
155
- user: AptlyUser;
156
- signees: AptlyOrderActionSignDataSignee[];
157
- deadlineInDays?: number;
158
- }
159
- export interface AptlyOrderActionSignDataSignee {
160
- user: AptlyUser;
161
- signMethod?: string;
162
- isAdmin?: boolean;
163
- }
1
+ import { AptlyOrderStatus } from '../enums/index.js';
2
+ import { AptlyAppImplementationSetting, AptlyAppSchema } from './app.js';
3
+ import { AptlyDocumentSchema } from './document.js';
4
+ import { AptlyEmailSchema } from './email.js';
5
+ import { AptlyOrganizationAppConfigSchema, AptlyOrganizationSchema } from './organization.js';
6
+ import { AptlyPaymentSchema } from './payment.js';
7
+ import { AptlyProductSchema } from './product.js';
8
+ import { AptlyProject, AptlyProjectPeriodSchema, AptlyProjectSchema } from './project.js';
9
+ import { AptlyUnit, AptlyUnitItemParamSchema, AptlyUnitSchema } from './unit.js';
10
+ import { AptlyBaseSchema } from './extends.js';
11
+ import { AptlyUser, AptlyUserSchema } from './user.js';
12
+ export declare enum AptlyOrderPaymentStatus {
13
+ Pending = "PENDING",
14
+ OnHold = "ON_HOLD",
15
+ Authorized = "AUTHORIZED",
16
+ Captured = "CAPTURED"
17
+ }
18
+ export type AptlyOrder = AptlyOrderSchema<string, string>;
19
+ export interface AptlyOrderSchema<ID, DATE> extends Omit<AptlyBaseSchema<ID, DATE>, 'name'> {
20
+ orderNumber: string;
21
+ organization: ID | AptlyOrganizationSchema<ID, DATE>;
22
+ project: ID | AptlyProjectSchema<ID, DATE>;
23
+ period?: ID | AptlyProjectPeriodSchema<ID, DATE>;
24
+ unit: ID | AptlyUnitSchema<ID, DATE>;
25
+ signers: (ID | AptlyUserSchema<ID, DATE>)[];
26
+ status: AptlyOrderStatus;
27
+ receipt: ID | AptlyDocumentSchema<ID, DATE>;
28
+ signedReceipt?: ID | AptlyDocumentSchema<ID, DATE>;
29
+ attachments: ID[];
30
+ signage: AptlyOrderSignageSchema<ID, DATE>;
31
+ items: AptlyOrderItemSchema<ID, DATE>[];
32
+ totalCost: number;
33
+ totalVat?: number;
34
+ pricePipeline: AptlyOrderPricePipelineItemSchema<ID>[];
35
+ signees?: AptlyOrderSigneeSchema<ID, DATE>[];
36
+ signedAt?: DATE | null;
37
+ emailText?: string;
38
+ approved?: {
39
+ action?: AptlyOrderAction;
40
+ user?: ID | AptlyUserSchema<ID, DATE>;
41
+ at?: DATE;
42
+ };
43
+ paymentSession?: AptlyOrderPaymentSessionSchema<ID, DATE> | null;
44
+ payment?: ID | AptlyPaymentSchema<ID, DATE>;
45
+ createdBy?: ID | AptlyUserSchema<ID, DATE>;
46
+ createdByAdmin?: boolean;
47
+ created: DATE;
48
+ }
49
+ export type AptlyOrderPaymentSession = AptlyOrderPaymentSessionSchema<string, string>;
50
+ export interface AptlyOrderPaymentSessionSchema<ID, DATE> {
51
+ app?: ID;
52
+ status?: AptlyOrderPaymentStatus;
53
+ url?: string;
54
+ id?: string;
55
+ at?: DATE | null;
56
+ user?: ID | null;
57
+ expiresAt?: DATE | null;
58
+ paidAt?: DATE | null;
59
+ capturedAt?: DATE | null;
60
+ }
61
+ export type AptlyOrderSignee = AptlyOrderSigneeSchema<string, string>;
62
+ export interface AptlyOrderSigneeSchema<ID, DATE> {
63
+ _id: ID;
64
+ user: ID | AptlyUserSchema<ID, DATE>;
65
+ type: AptlyOrderSigneeType;
66
+ url: string;
67
+ signedAt?: DATE;
68
+ }
69
+ export declare enum AptlyOrderSigneeType {
70
+ Unit = 0,
71
+ Admin = 1
72
+ }
73
+ export type AptlyOrderPricePipelineItem = AptlyOrderPricePipelineItemSchema<string>;
74
+ export interface AptlyOrderPricePipelineItemSchema<ID> {
75
+ _id: ID;
76
+ label: string;
77
+ value: number;
78
+ }
79
+ export type AptlyOrderSignage = AptlyOrderSignageSchema<string, string>;
80
+ export interface AptlyOrderSignageSchema<ID, DATE> {
81
+ signed: boolean;
82
+ createdAt?: DATE | null;
83
+ expiresAt?: DATE | null;
84
+ signedAt?: DATE | null;
85
+ notifiedAt?: DATE | null;
86
+ document?: ID | AptlyDocumentSchema<ID, DATE>;
87
+ hasReceivedFile?: boolean;
88
+ signedFile?: ID | AptlyDocumentSchema<ID, DATE>;
89
+ documentId?: ID;
90
+ documentCreationDate?: DATE;
91
+ expireDate?: DATE;
92
+ customerSignerId?: string;
93
+ organizationSignerId?: string;
94
+ organizationSignedAt?: DATE;
95
+ customerSignedAt?: DATE;
96
+ }
97
+ export type AptlyOrderItem = AptlyOrderItemSchema<string, string>;
98
+ export interface AptlyOrderItemSchema<ID, DATE> {
99
+ _id: ID;
100
+ text?: string;
101
+ product: ID | AptlyProductSchema<ID, DATE>;
102
+ variant: ID;
103
+ producer: ID;
104
+ params: AptlyUnitItemParamSchema<ID, DATE>[];
105
+ quantity: number;
106
+ unitCost: number;
107
+ unitVat?: number;
108
+ vat?: number;
109
+ pricePipeline: AptlyOrderItemPricePipelineSchema<ID>[];
110
+ }
111
+ export type AptlyOrderItemPricePipeline = AptlyOrderItemPricePipelineSchema<string>;
112
+ export interface AptlyOrderItemPricePipelineSchema<ID> {
113
+ _id: ID;
114
+ label: string;
115
+ value: number;
116
+ }
117
+ export declare enum AptlyOrderAction {
118
+ Complete = "complete",
119
+ Payment = "payment",
120
+ SignManually = "sign-manually",
121
+ Sign = "sign"
122
+ }
123
+ export interface AptlyOrderActionPostBody {
124
+ action: AptlyOrderAction | null;
125
+ document?: string | null;
126
+ app?: string;
127
+ emailSubject: string;
128
+ emailText: string;
129
+ emailMarkdown: string;
130
+ users: AptlyOrderActionPostBodyUser[];
131
+ deadlineInDays?: number;
132
+ }
133
+ export interface AptlyOrderActionPostBodyUser {
134
+ user: string;
135
+ signMethod?: string;
136
+ isAdmin?: boolean;
137
+ }
138
+ export type AptlyOrderActionItem<S extends object = object> = AptlyOrderActionItemSchema<string, string, S>;
139
+ export interface AptlyOrderActionItemSchema<ID, DATE, S extends object> {
140
+ action: AptlyOrderAction;
141
+ path: string;
142
+ app?: Pick<AptlyAppSchema<ID, DATE>, '_id' | 'name' | 'sign' | 'logo' | 'settings'>;
143
+ appSettings?: AptlyOrganizationAppConfigSchema<ID, DATE, S>['settings'];
144
+ email?: AptlyEmailSchema<ID, DATE>;
145
+ }
146
+ export interface AptlyOrderActionItemSignSettings {
147
+ [AptlyAppImplementationSetting.SignCostPer]: number;
148
+ [AptlyAppImplementationSetting.SignMethod]: string;
149
+ }
150
+ export interface AptlyOrderActionSignData {
151
+ project: Pick<AptlyProject, '_id' | 'name'> & {
152
+ theme: Pick<AptlyProject['theme'], 'contact'>;
153
+ };
154
+ unit: Pick<AptlyUnit, '_id' | 'name'>;
155
+ order: Pick<AptlyOrder, '_id' | 'orderNumber' | 'receipt' | 'period'>;
156
+ user: AptlyUser;
157
+ signees: AptlyOrderActionSignDataSignee[];
158
+ deadlineInDays?: number;
159
+ }
160
+ export interface AptlyOrderActionSignDataSignee {
161
+ user: AptlyUser;
162
+ signMethod?: string;
163
+ isAdmin?: boolean;
164
+ }
package/models/order.js CHANGED
@@ -1,20 +1,20 @@
1
- import { AptlyAppImplementationSetting } from './app.js';
2
- export var AptlyOrderPaymentStatus;
3
- (function (AptlyOrderPaymentStatus) {
4
- AptlyOrderPaymentStatus["Pending"] = "PENDING";
5
- AptlyOrderPaymentStatus["OnHold"] = "ON_HOLD";
6
- AptlyOrderPaymentStatus["Authorized"] = "AUTHORIZED";
7
- AptlyOrderPaymentStatus["Captured"] = "CAPTURED";
8
- })(AptlyOrderPaymentStatus || (AptlyOrderPaymentStatus = {}));
9
- export var AptlyOrderSigneeType;
10
- (function (AptlyOrderSigneeType) {
11
- AptlyOrderSigneeType[AptlyOrderSigneeType["Unit"] = 0] = "Unit";
12
- AptlyOrderSigneeType[AptlyOrderSigneeType["Admin"] = 1] = "Admin";
13
- })(AptlyOrderSigneeType || (AptlyOrderSigneeType = {}));
14
- export var AptlyOrderAction;
15
- (function (AptlyOrderAction) {
16
- AptlyOrderAction["Complete"] = "complete";
17
- AptlyOrderAction["Payment"] = "payment";
18
- AptlyOrderAction["SignManually"] = "sign-manually";
19
- AptlyOrderAction["Sign"] = "sign";
20
- })(AptlyOrderAction || (AptlyOrderAction = {}));
1
+ import { AptlyAppImplementationSetting } from './app.js';
2
+ export var AptlyOrderPaymentStatus;
3
+ (function (AptlyOrderPaymentStatus) {
4
+ AptlyOrderPaymentStatus["Pending"] = "PENDING";
5
+ AptlyOrderPaymentStatus["OnHold"] = "ON_HOLD";
6
+ AptlyOrderPaymentStatus["Authorized"] = "AUTHORIZED";
7
+ AptlyOrderPaymentStatus["Captured"] = "CAPTURED";
8
+ })(AptlyOrderPaymentStatus || (AptlyOrderPaymentStatus = {}));
9
+ export var AptlyOrderSigneeType;
10
+ (function (AptlyOrderSigneeType) {
11
+ AptlyOrderSigneeType[AptlyOrderSigneeType["Unit"] = 0] = "Unit";
12
+ AptlyOrderSigneeType[AptlyOrderSigneeType["Admin"] = 1] = "Admin";
13
+ })(AptlyOrderSigneeType || (AptlyOrderSigneeType = {}));
14
+ export var AptlyOrderAction;
15
+ (function (AptlyOrderAction) {
16
+ AptlyOrderAction["Complete"] = "complete";
17
+ AptlyOrderAction["Payment"] = "payment";
18
+ AptlyOrderAction["SignManually"] = "sign-manually";
19
+ AptlyOrderAction["Sign"] = "sign";
20
+ })(AptlyOrderAction || (AptlyOrderAction = {}));
@@ -1,86 +1,86 @@
1
- import { AptlyModules } from '../core/index.js';
2
- import { AptlyOrganizationRoles, AptlyAppScope, AptlySignageSchema } from '../core/index.js';
3
- import { AptlyOrganizationStatus, AptlyOrganizationType } from '../enums/index.js';
4
- import { AptlyModuleItemSchema } from './module.js';
5
- import { AptlyUserSchema } from './user.js';
6
- import { AptlyMediaSrc } from './media.js';
7
- import { AptlyAddress, AptlyBaseSchema, AptlyHistorySchema } from './extends.js';
8
- import { AptlyDepartmentGeneric } from './department.js';
9
- import { AptlyProducerSchema } from './producer.js';
10
- import { AptlyAppSchema } from './app.js';
11
- import { AptlyAlgorithmSchema } from './algorithm.js';
12
- export type AptlyOrganization = AptlyOrganizationSchema<string, string>;
13
- export interface AptlyOrganizationSchema<ID, DATE> extends AptlyBaseSchema<ID, DATE>, AptlyHistorySchema<ID, DATE> {
14
- slug: string;
15
- number?: string;
16
- vat?: string;
17
- logo?: string | null;
18
- logoMedia?: AptlyMediaSrc | null;
19
- negativeLogoMedia?: AptlyMediaSrc | null;
20
- projectLogoMedia?: AptlyMediaSrc | null;
21
- address: {
22
- billing: AptlyAddress;
23
- visit: AptlyAddress;
24
- post: AptlyAddress;
25
- };
26
- phone: string;
27
- email: string;
28
- algorithms: AptlyAlgorithmSchema<ID>[];
29
- members: AptlyOrganizationMemberSchema<ID, DATE>[];
30
- modules: AptlyModules[];
31
- contractSign?: AptlySignageSchema<ID, DATE>;
32
- integrations: AptlyOrganizationIntegrationsSchema<ID>[];
33
- invites: AptlyOrganizationInviteSchema<ID, DATE>[];
34
- apps: AptlyOrganizationAppConfigSchema<ID, DATE>[];
35
- storageId?: string;
36
- producer?: ID | AptlyProducerSchema<ID, DATE> | null;
37
- installedModules: AptlyModuleItemSchema<ID, DATE>[];
38
- status?: AptlyOrganizationStatus;
39
- type?: AptlyOrganizationType[];
40
- created: DATE;
41
- fixedVariants?: boolean;
42
- }
43
- export type AptlyOrganizationIntegrations = AptlyOrganizationIntegrationsSchema<string>;
44
- export interface AptlyOrganizationIntegrationsSchema<ID> {
45
- _id: ID;
46
- integration: string;
47
- apiKey: string;
48
- organization: string;
49
- }
50
- export type AptlyOrganizationMember = AptlyOrganizationMemberSchema<string, string>;
51
- export interface AptlyOrganizationMemberSchema<ID, DATE> {
52
- _id: ID;
53
- user: AptlyUserSchema<ID, DATE> | ID;
54
- permissions: AptlyOrganizationRoles[];
55
- position?: AptlyOrganizationMemberPosition;
56
- projects?: (ID | AptlyProducerSchema<ID, DATE>)[] | null;
57
- departments?: (ID | AptlyDepartmentGeneric<ID, DATE>)[] | null;
58
- }
59
- export declare enum AptlyOrganizationMemberPosition {
60
- Owner = 0,
61
- Admin = 1,
62
- Accounting = 2,
63
- User = 10
64
- }
65
- export type AptlyOrganizationInvite = AptlyOrganizationInviteSchema<string, string>;
66
- export interface AptlyOrganizationInviteSchema<ID, DATE> {
67
- _id: ID;
68
- code: string;
69
- created: DATE;
70
- permissions?: AptlyOrganizationRoles[];
71
- projects?: ID[] | null;
72
- departments?: ID[] | null;
73
- position?: AptlyOrganizationMemberPosition;
74
- claim: {
75
- email?: string;
76
- claimed: boolean;
77
- claimedBy: ID;
78
- claimTime?: DATE;
79
- };
80
- }
81
- export type AptlyOrganizationAppConfig<S extends object = object> = AptlyOrganizationAppConfigSchema<string, string, S>;
82
- export interface AptlyOrganizationAppConfigSchema<ID, DATE, S extends object = object> extends Omit<AptlyBaseSchema<ID, DATE>, 'name' | 'archived'> {
83
- app: ID | AptlyAppSchema<ID, DATE>;
84
- scope: AptlyAppScope[];
85
- settings: S;
86
- }
1
+ import { AptlyModules } from '../core/index.js';
2
+ import { AptlyOrganizationRoles, AptlyAppScope, AptlySignageSchema } from '../core/index.js';
3
+ import { AptlyOrganizationStatus, AptlyOrganizationType } from '../enums/index.js';
4
+ import { AptlyModuleItemSchema } from './module.js';
5
+ import { AptlyUserSchema } from './user.js';
6
+ import { AptlyMediaSrc } from './media.js';
7
+ import { AptlyAddress, AptlyBaseSchema, AptlyHistorySchema } from './extends.js';
8
+ import { AptlyDepartmentGeneric } from './department.js';
9
+ import { AptlyProducerSchema } from './producer.js';
10
+ import { AptlyAppSchema } from './app.js';
11
+ import { AptlyAlgorithmSchema } from './algorithm.js';
12
+ export type AptlyOrganization = AptlyOrganizationSchema<string, string>;
13
+ export interface AptlyOrganizationSchema<ID, DATE> extends AptlyBaseSchema<ID, DATE>, AptlyHistorySchema<ID, DATE> {
14
+ slug: string;
15
+ number?: string;
16
+ vat?: string;
17
+ logo?: string | null;
18
+ logoMedia?: AptlyMediaSrc | null;
19
+ negativeLogoMedia?: AptlyMediaSrc | null;
20
+ projectLogoMedia?: AptlyMediaSrc | null;
21
+ address: {
22
+ billing: AptlyAddress;
23
+ visit: AptlyAddress;
24
+ post: AptlyAddress;
25
+ };
26
+ phone: string;
27
+ email: string;
28
+ algorithms: AptlyAlgorithmSchema<ID>[];
29
+ members: AptlyOrganizationMemberSchema<ID, DATE>[];
30
+ modules: AptlyModules[];
31
+ contractSign?: AptlySignageSchema<ID, DATE>;
32
+ integrations: AptlyOrganizationIntegrationsSchema<ID>[];
33
+ invites: AptlyOrganizationInviteSchema<ID, DATE>[];
34
+ apps: AptlyOrganizationAppConfigSchema<ID, DATE>[];
35
+ storageId?: string;
36
+ producer?: ID | AptlyProducerSchema<ID, DATE> | null;
37
+ installedModules: AptlyModuleItemSchema<ID, DATE>[];
38
+ status?: AptlyOrganizationStatus;
39
+ type?: AptlyOrganizationType[];
40
+ created: DATE;
41
+ fixedVariants?: boolean;
42
+ }
43
+ export type AptlyOrganizationIntegrations = AptlyOrganizationIntegrationsSchema<string>;
44
+ export interface AptlyOrganizationIntegrationsSchema<ID> {
45
+ _id: ID;
46
+ integration: string;
47
+ apiKey: string;
48
+ organization: string;
49
+ }
50
+ export type AptlyOrganizationMember = AptlyOrganizationMemberSchema<string, string>;
51
+ export interface AptlyOrganizationMemberSchema<ID, DATE> {
52
+ _id: ID;
53
+ user: AptlyUserSchema<ID, DATE> | ID;
54
+ permissions: AptlyOrganizationRoles[];
55
+ position?: AptlyOrganizationMemberPosition;
56
+ projects?: (ID | AptlyProducerSchema<ID, DATE>)[] | null;
57
+ departments?: (ID | AptlyDepartmentGeneric<ID, DATE>)[] | null;
58
+ }
59
+ export declare enum AptlyOrganizationMemberPosition {
60
+ Owner = 0,
61
+ Admin = 1,
62
+ Accounting = 2,
63
+ User = 10
64
+ }
65
+ export type AptlyOrganizationInvite = AptlyOrganizationInviteSchema<string, string>;
66
+ export interface AptlyOrganizationInviteSchema<ID, DATE> {
67
+ _id: ID;
68
+ code: string;
69
+ created: DATE;
70
+ permissions?: AptlyOrganizationRoles[];
71
+ projects?: ID[] | null;
72
+ departments?: ID[] | null;
73
+ position?: AptlyOrganizationMemberPosition;
74
+ claim: {
75
+ email?: string;
76
+ claimed: boolean;
77
+ claimedBy: ID;
78
+ claimTime?: DATE;
79
+ };
80
+ }
81
+ export type AptlyOrganizationAppConfig<S extends object = object> = AptlyOrganizationAppConfigSchema<string, string, S>;
82
+ export interface AptlyOrganizationAppConfigSchema<ID, DATE, S extends object = object> extends Omit<AptlyBaseSchema<ID, DATE>, 'name' | 'archived'> {
83
+ app: ID | AptlyAppSchema<ID, DATE>;
84
+ scope: AptlyAppScope[];
85
+ settings: S;
86
+ }
@@ -1,7 +1,7 @@
1
- export var AptlyOrganizationMemberPosition;
2
- (function (AptlyOrganizationMemberPosition) {
3
- AptlyOrganizationMemberPosition[AptlyOrganizationMemberPosition["Owner"] = 0] = "Owner";
4
- AptlyOrganizationMemberPosition[AptlyOrganizationMemberPosition["Admin"] = 1] = "Admin";
5
- AptlyOrganizationMemberPosition[AptlyOrganizationMemberPosition["Accounting"] = 2] = "Accounting";
6
- AptlyOrganizationMemberPosition[AptlyOrganizationMemberPosition["User"] = 10] = "User";
7
- })(AptlyOrganizationMemberPosition || (AptlyOrganizationMemberPosition = {}));
1
+ export var AptlyOrganizationMemberPosition;
2
+ (function (AptlyOrganizationMemberPosition) {
3
+ AptlyOrganizationMemberPosition[AptlyOrganizationMemberPosition["Owner"] = 0] = "Owner";
4
+ AptlyOrganizationMemberPosition[AptlyOrganizationMemberPosition["Admin"] = 1] = "Admin";
5
+ AptlyOrganizationMemberPosition[AptlyOrganizationMemberPosition["Accounting"] = 2] = "Accounting";
6
+ AptlyOrganizationMemberPosition[AptlyOrganizationMemberPosition["User"] = 10] = "User";
7
+ })(AptlyOrganizationMemberPosition || (AptlyOrganizationMemberPosition = {}));
package/models/page.d.ts CHANGED
@@ -1,22 +1,22 @@
1
- import { AptlyPageSectionType } from '../enums/index.js';
2
- import { AptlyBaseSchema } from './extends.js';
3
- export type AptlyPage = AptlyPageSchema<string, string>;
4
- export interface AptlyPageSchema<ID, DATE> extends AptlyBaseSchema<ID, DATE> {
5
- slug: string;
6
- project: ID;
7
- organization: ID;
8
- summary: string;
9
- icon?: string;
10
- upsellTemplate?: ID | null;
11
- sections: AptlyPageSectionSchema<ID, any>[];
12
- legacy?: string;
13
- image?: string;
14
- showInMenu: boolean;
15
- }
16
- export type AptlyPageSection<VALUE = any> = AptlyPageSectionSchema<string, VALUE>;
17
- export interface AptlyPageSectionSchema<ID, VALUE> {
18
- _id: ID;
19
- name: string;
20
- type: AptlyPageSectionType;
21
- value: VALUE;
22
- }
1
+ import { AptlyPageSectionType } from '../enums/index.js';
2
+ import { AptlyBaseSchema } from './extends.js';
3
+ export type AptlyPage = AptlyPageSchema<string, string>;
4
+ export interface AptlyPageSchema<ID, DATE> extends AptlyBaseSchema<ID, DATE> {
5
+ slug: string;
6
+ project: ID;
7
+ organization: ID;
8
+ summary: string;
9
+ icon?: string;
10
+ upsellTemplate?: ID | null;
11
+ sections: AptlyPageSectionSchema<ID, any>[];
12
+ legacy?: string;
13
+ image?: string;
14
+ showInMenu: boolean;
15
+ }
16
+ export type AptlyPageSection<VALUE = any> = AptlyPageSectionSchema<string, VALUE>;
17
+ export interface AptlyPageSectionSchema<ID, VALUE> {
18
+ _id: ID;
19
+ name: string;
20
+ type: AptlyPageSectionType;
21
+ value: VALUE;
22
+ }
package/models/page.js CHANGED
@@ -1 +1 @@
1
- export {};
1
+ export {};