@aptly-as/types 1.7.3 → 1.7.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 (94) hide show
  1. package/models/product.d.ts +1 -0
  2. package/package.json +1 -10
  3. package/core/api.js.map +0 -1
  4. package/core/api.ts +0 -15
  5. package/core/app.js.map +0 -1
  6. package/core/app.ts +0 -41
  7. package/core/cloudinary.js.map +0 -1
  8. package/core/cloudinary.ts +0 -11
  9. package/core/error.js.map +0 -1
  10. package/core/error.ts +0 -28
  11. package/core/fields.js.map +0 -1
  12. package/core/fields.ts +0 -19
  13. package/core/index.js.map +0 -1
  14. package/core/index.ts +0 -16
  15. package/core/permission.js.map +0 -1
  16. package/core/permission.ts +0 -212
  17. package/core/scope.js.map +0 -1
  18. package/core/scope.ts +0 -12
  19. package/core/signage.js.map +0 -1
  20. package/core/signage.ts +0 -21
  21. package/core/webhook-event-data.js.map +0 -1
  22. package/core/webhook-event-data.ts +0 -15
  23. package/enums/document.js.map +0 -1
  24. package/enums/document.ts +0 -31
  25. package/enums/fields.js.map +0 -1
  26. package/enums/fields.ts +0 -26
  27. package/enums/index.js.map +0 -1
  28. package/enums/index.ts +0 -120
  29. package/enums/unit-template.js.map +0 -1
  30. package/enums/unit-template.ts +0 -11
  31. package/enums/webhook.js.map +0 -1
  32. package/enums/webhook.ts +0 -24
  33. package/index.js.map +0 -1
  34. package/index.ts +0 -3
  35. package/models/algorithm.js.map +0 -1
  36. package/models/algorithm.ts +0 -31
  37. package/models/app.js.map +0 -1
  38. package/models/app.ts +0 -75
  39. package/models/booking.js.map +0 -1
  40. package/models/booking.ts +0 -57
  41. package/models/client.js.map +0 -1
  42. package/models/client.ts +0 -15
  43. package/models/department.js.map +0 -1
  44. package/models/department.ts +0 -31
  45. package/models/document.js.map +0 -1
  46. package/models/document.ts +0 -35
  47. package/models/extends.js.map +0 -1
  48. package/models/extends.ts +0 -39
  49. package/models/index.js.map +0 -1
  50. package/models/index.ts +0 -30
  51. package/models/inquiry.js.map +0 -1
  52. package/models/inquiry.ts +0 -57
  53. package/models/media.js.map +0 -1
  54. package/models/media.ts +0 -71
  55. package/models/notification-trigger.js.map +0 -1
  56. package/models/notification-trigger.ts +0 -10
  57. package/models/option-label.js.map +0 -1
  58. package/models/option-label.ts +0 -12
  59. package/models/order.js.map +0 -1
  60. package/models/order.ts +0 -66
  61. package/models/organization.js.map +0 -1
  62. package/models/organization.ts +0 -91
  63. package/models/page.js.map +0 -1
  64. package/models/page.ts +0 -34
  65. package/models/producer.js.map +0 -1
  66. package/models/producer.ts +0 -22
  67. package/models/product-stats.js.map +0 -1
  68. package/models/product-stats.ts +0 -19
  69. package/models/product.js.map +0 -1
  70. package/models/product.ts +0 -78
  71. package/models/project.js.map +0 -1
  72. package/models/project.ts +0 -139
  73. package/models/queue-download.js.map +0 -1
  74. package/models/queue-download.ts +0 -21
  75. package/models/recommendation.js.map +0 -1
  76. package/models/recommendation.ts +0 -13
  77. package/models/supplier.js.map +0 -1
  78. package/models/supplier.ts +0 -17
  79. package/models/tag.js.map +0 -1
  80. package/models/tag.ts +0 -9
  81. package/models/unit-email.js.map +0 -1
  82. package/models/unit-email.ts +0 -39
  83. package/models/unit-template.js.map +0 -1
  84. package/models/unit-template.ts +0 -140
  85. package/models/unit.js.map +0 -1
  86. package/models/unit.ts +0 -242
  87. package/models/upsell-template.js.map +0 -1
  88. package/models/upsell-template.ts +0 -21
  89. package/models/user.js.map +0 -1
  90. package/models/user.ts +0 -19
  91. package/models/webhook-event.js.map +0 -1
  92. package/models/webhook-event.ts +0 -50
  93. package/models/webhook.js.map +0 -1
  94. package/models/webhook.ts +0 -21
@@ -1,11 +0,0 @@
1
- export enum AptlyUnitTemplateCategorySectionProductParamKey {
2
- TextContent = 'textContent',
3
- PickTool = 'pickTool',
4
- Logic = 'logic'
5
- }
6
-
7
- export enum AptlyUnitTemplateCategorySectionProductMeasureUnitType {
8
- Unit = 'unit',
9
- KVM = 'kvm',
10
- LM = 'lm'
11
- }
@@ -1 +0,0 @@
1
- {"version":3,"file":"webhook.js","sourceRoot":"","sources":["webhook.ts"],"names":[],"mappings":";;;AACA,IAAY,gBAUX;AAVD,WAAY,gBAAgB;IAC1B,4DAAwC,CAAA;IACxC,4DAAwC,CAAA;IACxC,sDAAkC,CAAA;IAClC,sDAAkC,CAAA;IAClC,6DAAyC,CAAA;IACzC,iEAA6C,CAAA;IAC7C,+DAA2C,CAAA;IAC3C,6EAAyD,CAAA;IACzD,6EAAyD,CAAA;AAC3D,CAAC,EAVW,gBAAgB,GAAhB,wBAAgB,KAAhB,wBAAgB,QAU3B;AAED,IAAY,kBAGX;AAHD,WAAY,kBAAkB;IAC5B,uCAAiB,CAAA;IACjB,uCAAiB,CAAA;AACnB,CAAC,EAHW,kBAAkB,GAAlB,0BAAkB,KAAlB,0BAAkB,QAG7B;AAED,IAAY,uBAKX;AALD,WAAY,uBAAuB;IACjC,sCAAW,CAAA;IACX,kDAAuB,CAAA;IACvB,0CAAe,CAAA;IACf,4CAAiB,CAAA;AACnB,CAAC,EALW,uBAAuB,GAAvB,+BAAuB,KAAvB,+BAAuB,QAKlC"}
package/enums/webhook.ts DELETED
@@ -1,24 +0,0 @@
1
-
2
- export enum AptlyWebhookType {
3
- ProjectCreated = 'aptly.project.created',
4
- ProjectUpdated = 'aptly.project.updated',
5
- UnitCreated = 'aptly.unit.created',
6
- UnitUpdated = 'aptly.unit.updated',
7
- UnitMessageNew = 'aptly.unit.message.new',
8
- UnitMessageReply = 'aptly.unit.message.reply',
9
- UnitOrderSigned = 'aptly.unit.order.signed',
10
- OrganizationAppUpdated = 'aptly.organization.app.updated',
11
- OrganizationAppDeleted = 'aptly.organization.app.deleted',
12
- }
13
-
14
- export enum AptlyWebhookStatus {
15
- Active = 'active',
16
- Gone = 'gone-401'
17
- }
18
-
19
- export enum AptlyWebhookEventStatus {
20
- New = 'new',
21
- Completed = 'completed',
22
- Retry = 'retry',
23
- Failed = 'failed'
24
- }
package/index.js.map DELETED
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["index.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,yCAAuB;AACvB,0CAAwB;AACxB,2CAAyB"}
package/index.ts DELETED
@@ -1,3 +0,0 @@
1
- export * from './core';
2
- export * from './enums';
3
- export * from './models';
@@ -1 +0,0 @@
1
- {"version":3,"file":"algorithm.js","sourceRoot":"","sources":["algorithm.ts"],"names":[],"mappings":";;;AACA,IAAY,+BAKX;AALD,WAAY,+BAA+B;IACzC,gDAAa,CAAA;IACb,8CAAW,CAAA;IACX,wDAAqB,CAAA;IACrB,wDAAqB,CAAA;AACvB,CAAC,EALW,+BAA+B,GAA/B,uCAA+B,KAA/B,uCAA+B,QAK1C;AAED,IAAY,6BAIX;AAJD,WAAY,6BAA6B;IACvC,8CAAa,CAAA;IACb,8CAAa,CAAA;IACb,8DAA6B,CAAA;AAC/B,CAAC,EAJW,6BAA6B,GAA7B,qCAA6B,KAA7B,qCAA6B,QAIxC"}
@@ -1,31 +0,0 @@
1
-
2
- export enum AptlyAlgorithmPipelineOperation {
3
- Base = 'base',
4
- Add = 'add',
5
- Subtract = 'subtract',
6
- Multiply = 'multiply',
7
- }
8
-
9
- export enum AptlyAlgorithmPipelineApplyTo {
10
- Base = 'base',
11
- Root = 'root',
12
- PreviousStep = 'previousStep',
13
- }
14
-
15
- export type AptlyAlgorithm = AptlyAlgorithmSchema<string>;
16
- export interface AptlyAlgorithmSchema<ID> {
17
- _id: ID;
18
- name: string;
19
- pipeline: AptlyAlgorithmPipelineSchema<ID>[];
20
- organization?: ID;
21
- project?: ID;
22
- }
23
-
24
- export type AptlyAlgorithmPipeline = AptlyAlgorithmPipelineSchema<string>;
25
- export interface AptlyAlgorithmPipelineSchema<ID> {
26
- _id: ID;
27
- label: string;
28
- operation: AptlyAlgorithmPipelineOperation;
29
- value: number;
30
- applyTo: AptlyAlgorithmPipelineApplyTo;
31
- }
package/models/app.js.map DELETED
@@ -1 +0,0 @@
1
- {"version":3,"file":"app.js","sourceRoot":"","sources":["app.ts"],"names":[],"mappings":";;;AAiCA,IAAY,0BAOX;AAPD,WAAY,0BAA0B;IACpC,uCAAS,CAAA;IACT,iDAAmB,CAAA;IACnB,iDAAmB,CAAA;IACnB,mDAAqB,CAAA;IACrB,iDAAmB,CAAA;IACnB,6CAAe,CAAA;AACjB,CAAC,EAPW,0BAA0B,GAA1B,kCAA0B,KAA1B,kCAA0B,QAOrC;AAED,IAAY,qBAQX;AARD,WAAY,qBAAqB;IAC/B,kCAAS,CAAA;IACT,4CAAmB,CAAA;IACnB,8CAAqB,CAAA;IACrB,4CAAmB,CAAA;IACnB,4CAAmB,CAAA;IACnB,4CAAmB,CAAA;IACnB,wCAAe,CAAA;AACjB,CAAC,EARW,qBAAqB,GAArB,6BAAqB,KAArB,6BAAqB,QAQhC;AAID,IAAY,qBAEX;AAFD,WAAY,qBAAqB;IAC/B,0CAAiB,CAAA;AACnB,CAAC,EAFW,qBAAqB,GAArB,6BAAqB,KAArB,6BAAqB,QAEhC"}
package/models/app.ts DELETED
@@ -1,75 +0,0 @@
1
- import { AptlyBaseSchema } from './extends';
2
- import { AptlyWebhookType } from '../enums';
3
- import { AptlyAppSandbox, AptlyField, AptlyPermissionModel } from '../core';
4
- import { AptlyMediaSrcSchema } from './media';
5
-
6
- export type AptlyApp = AptlyAppSchema<string, string>;
7
- export interface AptlyAppSchema<ID, DATE> extends Omit<AptlyBaseSchema<ID, DATE>, 'archived'> {
8
- slug: string;
9
- description: string;
10
- installUrl: string;
11
- redirectUris: string[];
12
- clientSecret: string; // combined with _id as clientId to create oauth tokens
13
- logo?: AptlyMediaSrcSchema<ID, DATE>;
14
- banner?: AptlyMediaSrcSchema<ID, DATE>;
15
- settings: AptlyAppSettingSchema<ID>[];
16
- webhooks: AptlyAppWebhookSchema<ID>[];
17
- proxies: AptlyAppProxySchema<ID>[];
18
- menus: AptlyAppMenuSchema<ID, DATE>[]
19
- }
20
-
21
- export type AptlyAppSetting = AptlyAppSettingSchema<string>;
22
- export interface AptlyAppSettingSchema<ID> extends AptlyField {
23
- _id: ID;
24
- key: string;
25
- defaultValue: any;
26
- }
27
-
28
- export interface AptlyAppWebhookSchema<ID> {
29
- _id: ID;
30
- types: AptlyWebhookType[];
31
- url: string;
32
- }
33
-
34
- export enum AptlyOrganizationInjection {
35
- Base = '',
36
- Project = 'project',
37
- Options = 'options',
38
- Products = 'products',
39
- Content = 'content',
40
- Admin = 'admin'
41
- }
42
-
43
- export enum AptlyProjectInjection {
44
- Base = '',
45
- Options = 'options',
46
- Products = 'products',
47
- Content = 'content',
48
- Project = 'project',
49
- Support = 'support',
50
- Admin = 'admin'
51
- }
52
-
53
- export type AptlyAppInjectionMenu = `organization-${AptlyOrganizationInjection}` | `project-${AptlyProjectInjection}`;
54
-
55
- export enum AptlyAppInjectionType {
56
- Iframe = 'iframe',
57
- }
58
-
59
- export type AptlyAppMenu = AptlyAppMenuSchema<string, string>;
60
- export interface AptlyAppMenuSchema<ID, DATE> {
61
- _id: ID;
62
- type: AptlyAppInjectionType;
63
- menu: AptlyAppInjectionMenu[];
64
- model: AptlyPermissionModel;
65
- label: string;
66
- icon?: AptlyMediaSrcSchema<ID, DATE>;
67
- src: string;
68
- sandbox: AptlyAppSandbox[];
69
- }
70
-
71
- export interface AptlyAppProxySchema<ID> {
72
- _id: ID;
73
- path: string;
74
- url: string;
75
- }
@@ -1 +0,0 @@
1
- {"version":3,"file":"booking.js","sourceRoot":"","sources":["booking.ts"],"names":[],"mappings":""}
package/models/booking.ts DELETED
@@ -1,57 +0,0 @@
1
-
2
- export type AptlyBooking = AptlyBookingSchema<string, string>;
3
- export interface AptlyBookingSchema<ID, DATE> {
4
- _id: ID;
5
- project: ID ;
6
- unit: ID;
7
- user: ID;
8
- availability: ID;
9
- calendar: ID;
10
- availableTime: ID;
11
- from: DATE;
12
- to: DATE;
13
- }
14
-
15
- export type AptlyAvailability = AptlyAvailabilitySchema<string, string>;
16
- export interface AptlyAvailabilitySchema<ID, DATE> {
17
- _id: ID;
18
- organization?: ID;
19
- project: ID;
20
- archived?: boolean;
21
- calendars: AptlyAvailabilityCalendarSchema<ID, DATE>[];
22
- }
23
-
24
- export type AptlyAvailabilityCalendar = AptlyAvailabilityCalendarSchema<string, string>;
25
- export interface AptlyAvailabilityCalendarSchema<ID, DATE> {
26
- _id: ID;
27
- name: string;
28
- description: string;
29
- fee?: number;
30
- location: {
31
- name: string;
32
- formatted_address?: string;
33
- geometry?: {
34
- location: {
35
- lat: number;
36
- lng: number;
37
- };
38
- };
39
- };
40
- attendees: ID[];
41
- availableTimes: AptlyAvailabilityCalendarAvailableTimesSchema<ID, DATE>[];
42
- endAvailabilityAt?: DATE;
43
- userAvailability?: ID[];
44
- }
45
-
46
- export type AptlyAvailabilityCalendarAvailableTimes = AptlyAvailabilityCalendarAvailableTimesSchema<string, string>;
47
- export interface AptlyAvailabilityCalendarAvailableTimesSchema<ID, DATE> {
48
- _ID: ID;
49
- from: DATE;
50
- to: DATE;
51
- booked: boolean;
52
- booking: ID;
53
-
54
- // Used to UserAvailability
55
- user?: ID;
56
- calendar?: ID;
57
- }
@@ -1 +0,0 @@
1
- {"version":3,"file":"client.js","sourceRoot":"","sources":["client.ts"],"names":[],"mappings":""}
package/models/client.ts DELETED
@@ -1,15 +0,0 @@
1
- import { AptlyBaseSchema } from './extends';
2
- import { AptlyPermissionSchema } from '../core';
3
-
4
- export interface AptlyUserClientSchema<ID, DATE> extends Omit<AptlyBaseSchema<ID, DATE>, 'archived'> {
5
- user: ID;
6
- subject: string;
7
- clientId: string;
8
- clientSecret?: string;
9
- permissions: AptlyPermissionSchema;
10
- /**
11
- * @deprecated use createdAt
12
- */
13
- created: DATE;
14
- }
15
- export type AptlyUserClient = AptlyUserClientSchema<string, string>;
@@ -1 +0,0 @@
1
- {"version":3,"file":"department.js","sourceRoot":"","sources":["department.ts"],"names":[],"mappings":""}
@@ -1,31 +0,0 @@
1
- import { AptlyPermissionOrganizationModels } from '../core';
2
- import { AptlyOrganizationSchema } from './organization';
3
- import { AptlyProjectSchema } from './project';
4
- import { AptlyUserSchema } from './user';
5
- import { AptlyBaseSchema } from './extends';
6
- import { AptlyUnitSchema } from './unit';
7
-
8
- export type AptlyDepartment = AptlyDepartmentGeneric<string, string>;
9
- export interface AptlyDepartmentGeneric<ID, DATE> extends Omit<AptlyBaseSchema<ID, DATE>, 'archived'> {
10
- organization: ID | AptlyOrganizationSchema<ID, DATE>;
11
- projects: AptlyDepartmentProjectGeneric<ID, DATE>[];
12
- users: AptlyDepartmentUserGeneric<ID, DATE>[];
13
- }
14
-
15
- export type AptlyDepartmentProject = AptlyDepartmentProjectGeneric<string, string>;
16
- export interface AptlyDepartmentProjectGeneric<ID, DATE> {
17
- _id: ID;
18
- project: (ID | AptlyProjectSchema<ID, DATE>);
19
- units: (ID | AptlyUnitSchema<ID, DATE>)[] | null;
20
- createdAt: DATE;
21
- updatedAt: DATE;
22
- }
23
-
24
- export type AptlyDepartmentUser = AptlyDepartmentUserGeneric<string, string>;
25
- export interface AptlyDepartmentUserGeneric<ID, DATE> {
26
- _id: ID;
27
- user: (ID | AptlyUserSchema<ID, DATE>);
28
- permissions: AptlyPermissionOrganizationModels[];
29
- createdAt: DATE;
30
- updatedAt: DATE;
31
- }
@@ -1 +0,0 @@
1
- {"version":3,"file":"document.js","sourceRoot":"","sources":["document.ts"],"names":[],"mappings":""}
@@ -1,35 +0,0 @@
1
- import { AptlyDocumentType } from '../enums';
2
- import { AptlyBaseSchema } from './extends';
3
-
4
-
5
- export type AptlyDocument = AptlyDocumentSchema<string, string>;
6
- export interface AptlyDocumentSchema<ID, DATE> extends Omit<AptlyBaseSchema<ID, DATE>, 'archived'> {
7
- mime: string;
8
- _type: AptlyDocumentType;
9
- data: string;
10
- organization?: string;
11
- project?: string;
12
- unit?: string;
13
- product?: string;
14
- text?: string;
15
- size: number;
16
- thirdPartyUploader: string | null;
17
- thirdPartyId: string | null;
18
- external_url?: string;
19
- public_id?: string; // cloudinary_id or URL
20
- boligmappaStatus?: AptlyDocumentSchemaBoligmappaStatusSchema<ID>[];
21
- chunks?: ID[];
22
- isPasswordProtected?: boolean;
23
- /**
24
- * @deprecated use createdAt
25
- */
26
- created: DATE;
27
- }
28
-
29
- export type AptlyDocumentSchemaBoligmappaStatus = AptlyDocumentSchemaBoligmappaStatusSchema<string>;
30
- export interface AptlyDocumentSchemaBoligmappaStatusSchema<ID> {
31
- _id: ID;
32
- unit: ID;
33
- id?: number;
34
- errorCode?: number;
35
- }
@@ -1 +0,0 @@
1
- {"version":3,"file":"extends.js","sourceRoot":"","sources":["extends.ts"],"names":[],"mappings":""}
package/models/extends.ts DELETED
@@ -1,39 +0,0 @@
1
- import { AptlyUserSchema } from './user';
2
- import { AptlyHistoryType } from '../enums';
3
-
4
- export interface AptlyBaseSchema<ID, DATE> {
5
- _id: ID;
6
- name: string;
7
- archived: boolean;
8
- createdAt: DATE;
9
- updatedAt: DATE;
10
- }
11
-
12
- export type AptlyHistory = AptlyHistorySchema<string, string>;
13
- export interface AptlyHistorySchema<ID, DATE> {
14
- /**
15
- * @deprecated not used in v2
16
- */
17
- locked: boolean;
18
- /**
19
- * @deprecated use updatedAt
20
- */
21
- lastChange: DATE;
22
- history: AptlyHistoryHistorySchema<ID, DATE>[];
23
- }
24
-
25
- export type AptlyHistoryHistory = AptlyHistoryHistorySchema<string, string>;
26
- export interface AptlyHistoryHistorySchema<ID, DATE> {
27
- _id: ID;
28
- type: AptlyHistoryType;
29
- referenceDate: DATE;
30
- diffDate: DATE;
31
- diff: object;
32
- user: ID | Pick<AptlyUserSchema<ID, DATE>, '_id' | 'fullName'>;
33
- meta?: object;
34
- }
35
-
36
- export interface AptlyDBCrawlerCleaner {
37
- dontClean?: boolean;
38
- lastClean?: boolean;
39
- }
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["index.ts"],"names":[],"mappings":";;;;;;;;;;;;AACA,8CAA4B;AAC5B,wCAAsB;AACtB,4CAA0B;AAC1B,2CAAyB;AACzB,+CAA6B;AAC7B,6CAA2B;AAC3B,4CAA0B;AAC1B,4CAA0B;AAC1B,0CAAwB;AACxB,yDAAuC;AACvC,iDAA+B;AAC/B,0CAAwB;AACxB,iDAA+B;AAC/B,yCAAuB;AACvB,6CAA2B;AAC3B,4CAA0B;AAC1B,kDAAgC;AAChC,4CAA0B;AAC1B,mDAAiC;AACjC,mDAAiC;AACjC,6CAA2B;AAC3B,wCAAsB;AACtB,yCAAuB;AACvB,kDAAgC;AAChC,+CAA6B;AAC7B,oDAAkC;AAClC,yCAAuB;AACvB,4CAA0B;AAC1B,kDAAgC"}
package/models/index.ts DELETED
@@ -1,30 +0,0 @@
1
-
2
- export * from './algorithm';
3
- export * from './app';
4
- export * from './booking';
5
- export * from './client';
6
- export * from './department';
7
- export * from './document';
8
- export * from './extends';
9
- export * from './inquiry';
10
- export * from './media';
11
- export * from './notification-trigger';
12
- export * from './option-label';
13
- export * from './order';
14
- export * from './organization';
15
- export * from './page';
16
- export * from './producer';
17
- export * from './product';
18
- export * from './product-stats';
19
- export * from './project';
20
- export * from './queue-download';
21
- export * from './recommendation';
22
- export * from './supplier';
23
- export * from './tag';
24
- export * from './unit';
25
- export * from './unit-template';
26
- export * from './unit-email';
27
- export * from './upsell-template';
28
- export * from './user';
29
- export * from './webhook';
30
- export * from './webhook-event';
@@ -1 +0,0 @@
1
- {"version":3,"file":"inquiry.js","sourceRoot":"","sources":["inquiry.ts"],"names":[],"mappings":""}
package/models/inquiry.ts DELETED
@@ -1,57 +0,0 @@
1
- import { AptlyInquiryParticipantRole, AptlyInquiryStatus, AptlyInquiryType } from '../enums';
2
- import { AptlySchemaFile } from '../core';
3
- import { AptlyUnitSchema } from './unit';
4
- import { AptlyOrganizationSchema } from './organization';
5
- import { AptlyProjectSchema } from './project';
6
- import { AptlyUserSchema } from './user';
7
-
8
- export type AptlyInquiry = AptlyInquirySchema<string, string>;
9
- export interface AptlyInquirySchema<ID, DATE> {
10
- _id: ID;
11
- _type: AptlyInquiryType;
12
- title: string;
13
- project: ID | AptlyProjectSchema<ID, DATE>;
14
- organization: ID | AptlyOrganizationSchema<ID, DATE>;
15
- unit: ID | AptlyUnitSchema<ID, DATE>;
16
- product?: ID;
17
- producer?: ID;
18
- category?: ID;
19
- section?: ID;
20
- lastMessageSent: DATE;
21
- lastMessage: string;
22
- lastParticipant?: ID | AptlyUserSchema<ID, DATE>;
23
- lastMessageId?: string;
24
- lastMessageEmail?: string;
25
- status: AptlyInquiryStatus;
26
- participants: AptlyInquiryParticipantSchema<ID, DATE>[];
27
- messages: AptlyInquiryMessageSchema<ID, DATE>[];
28
- references?: string;
29
- }
30
-
31
- export type AptlyInquiryParticipant = AptlyInquiryParticipantSchema<string, string>;
32
- export interface AptlyInquiryParticipantSchema<ID, DATE> {
33
- _id: ID;
34
- user?: ID | AptlyUserSchema<ID, DATE>;
35
- email?: string;
36
- role: AptlyInquiryParticipantRole;
37
- readAll: boolean;
38
- }
39
-
40
- export type AptlyInquiryMessage = AptlyInquiryMessageSchema<string, string>;
41
- export interface AptlyInquiryMessageSchema<ID, DATE> {
42
- _id: ID;
43
- message: string;
44
- /**
45
- * @deprecated Use files instead
46
- */
47
- images?: string[];
48
- files: AptlySchemaFile[];
49
- author?: ID;
50
- email?: string;
51
- sentTime: DATE;
52
- read: {
53
- user: ID;
54
- readTime: DATE;
55
- }[];
56
- messageId?: string;
57
- }
@@ -1 +0,0 @@
1
- {"version":3,"file":"media.js","sourceRoot":"","sources":["media.ts"],"names":[],"mappings":""}
package/models/media.ts DELETED
@@ -1,71 +0,0 @@
1
- import { AptlyOrganizationSchema } from './organization';
2
- import { AptlyBaseSchema } from './extends';
3
-
4
- export interface AptlyMediaSchema<ID, DATE> extends AptlyBaseSchema<ID, DATE> {
5
- // Aptly data
6
- organization: ID | AptlyOrganizationSchema<ID, DATE>;
7
- src: string;
8
- alt: string;
9
- caption?: string;
10
- title?: string;
11
- mime: string;
12
- tags: string[];
13
- width: number;
14
- height: number;
15
- albums: string[];
16
-
17
- // Cloudinary datayarn sta
18
- public_id: string;
19
- asset_id: string;
20
- version: number;
21
- version_id: string;
22
- signature: string;
23
- format: string;
24
- resource_type: string;
25
- created_at: string;
26
- bytes: number;
27
- type: string;
28
- etag: string;
29
- placeholder: boolean;
30
- url: string;
31
- original_filename: string;
32
-
33
- /**
34
- * @deprecated use createdAt
35
- */
36
- created: DATE;
37
- /**
38
- * @deprecated use updatedAt
39
- */
40
- updated: DATE;
41
-
42
- // Aptly recognize help values
43
- srcUrl?: string; // Recognize image if uploaded with url.
44
- uploadSignature?: string; // Recognize images with buffer content
45
- }
46
-
47
- export interface AptlyMediaSrcArea {
48
- width: number;
49
- height: number;
50
- x: number;
51
- y: number;
52
- }
53
-
54
- export interface AptlyMediaSrcLocation {
55
- x: number;
56
- y: number;
57
- }
58
-
59
- export interface AptlyMediaSrcSchema<ID, DATE> extends Pick<AptlyMediaSchema<ID, DATE>, AptlyMediaSrcKeys> {
60
- area?: AptlyMediaSrcArea;
61
- location?: AptlyMediaSrcLocation;
62
-
63
- /**
64
- * @deprecated used my product images. Is slowly replaced with src/url
65
- */
66
- image?: string;
67
- }
68
-
69
- export type AptlyMediaSrcKeys = '_id' | 'name' | 'src' | 'url' | 'alt' | 'title' | 'caption' | 'mime' | 'width' | 'height';
70
- export type AptlyMediaSrc = AptlyMediaSrcSchema<string, string>;
71
- export type AptlyMedia = AptlyMediaSchema<string, string>;
@@ -1 +0,0 @@
1
- {"version":3,"file":"notification-trigger.js","sourceRoot":"","sources":["notification-trigger.ts"],"names":[],"mappings":""}
@@ -1,10 +0,0 @@
1
-
2
- export type AptlyNotificationTrigger = AptlyNotificationTriggerSchema<string, string>;
3
- export interface AptlyNotificationTriggerSchema<ID, DATE> {
4
- _id: ID;
5
- _type: string;
6
- period: ID;
7
- time: DATE;
8
- sent: boolean;
9
- sentTime: DATE;
10
- }
@@ -1 +0,0 @@
1
- {"version":3,"file":"option-label.js","sourceRoot":"","sources":["option-label.ts"],"names":[],"mappings":""}
@@ -1,12 +0,0 @@
1
- import { AptlyBaseSchema } from './extends';
2
-
3
- export type AptlyOptionLabel = AptlyOptionLabelSchema<string, string>;
4
- export interface AptlyOptionLabelSchema<ID, DATE> extends AptlyBaseSchema<ID, DATE> {
5
- organization?: string;
6
- project?: string;
7
-
8
- /**
9
- * @deprecated use createdAt
10
- */
11
- created: DATE;
12
- }
@@ -1 +0,0 @@
1
- {"version":3,"file":"order.js","sourceRoot":"","sources":["order.ts"],"names":[],"mappings":""}
package/models/order.ts DELETED
@@ -1,66 +0,0 @@
1
- import { AptlyOrderStatus } from '../enums';
2
- import { AptlyUnitItemParamSchema } from './unit';
3
- import { AptlyBaseSchema } from './extends';
4
-
5
- export type AptlyOrder = AptlyOrderSchema<string, string>;
6
- export interface AptlyOrderSchema<ID, DATE> extends Omit<AptlyBaseSchema<ID, DATE>, 'name' | 'archived'> {
7
- orderNumber: string;
8
- organization: ID;
9
- project: ID;
10
- period: ID;
11
- unit: ID;
12
- signers: ID[];
13
- status: AptlyOrderStatus;
14
- receipt: ID;
15
- attachments: ID[];
16
- signage: AptlyOrderSignageSchema<ID, DATE>;
17
- items: AptlyOrderItemSchema<ID, DATE>[];
18
- totalCost: number;
19
- pricePipeline: AptlyOrderPricePipelineItemSchema<ID>[];
20
-
21
- /**
22
- * @deprecated use createdAt
23
- */
24
- created: DATE;
25
- }
26
-
27
- export type AptlyOrderPricePipelineItem = AptlyOrderPricePipelineItemSchema<string>;
28
- export interface AptlyOrderPricePipelineItemSchema<ID> {
29
- _id: ID;
30
- label: string;
31
- value: number;
32
- }
33
-
34
- export type AptlyOrderSignage = AptlyOrderSignageSchema<string, string>;
35
- export interface AptlyOrderSignageSchema<ID, DATE> {
36
- hasReceivedFile: boolean;
37
- signed: boolean;
38
- documentId?: ID;
39
- signedFile?: ID;
40
- documentCreationDate?: DATE;
41
- expireDate?: DATE;
42
- customerSignerId?: string;
43
- organizationSignerId?: string;
44
- organizationSignedAt?: DATE;
45
- customerSignedAt?: DATE;
46
- }
47
-
48
- export type AptlyOrderItem = AptlyOrderItemSchema<string, string>;
49
- export interface AptlyOrderItemSchema<ID, DATE> {
50
- _id: ID;
51
- text?: string;
52
- product: ID;
53
- variant: ID;
54
- producer: ID;
55
- params: AptlyUnitItemParamSchema<ID, DATE>[];
56
- quantity: number;
57
- unitCost: number;
58
- pricePipeline: AptlyOrderItemPricePipelineSchema<ID>[];
59
- }
60
-
61
- export type AptlyOrderItemPricePipeline = AptlyOrderItemPricePipelineSchema<string>;
62
- export interface AptlyOrderItemPricePipelineSchema<ID> {
63
- _id: ID;
64
- label: string;
65
- value: number;
66
- }
@@ -1 +0,0 @@
1
- {"version":3,"file":"organization.js","sourceRoot":"","sources":["organization.ts"],"names":[],"mappings":""}