@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/README.md CHANGED
@@ -1,3 +1,3 @@
1
- # Aptly Types
1
+ # Aptly Types
2
2
 
3
3
  [Swagger API documentation](https://app.swaggerhub.com/apis-docs/Aptly-AS/aptly-api/1.0.0)
package/core/api.js CHANGED
@@ -1,3 +1,2 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- //# sourceMappingURL=api.js.map
package/core/app.js CHANGED
@@ -10,4 +10,3 @@ var AptlyAppSandbox;
10
10
  AptlyAppSandbox["AllowPointerLock"] = "allow-pointer-lock";
11
11
  AptlyAppSandbox["AllowTopNavigation"] = "allow-top-navigation";
12
12
  })(AptlyAppSandbox = exports.AptlyAppSandbox || (exports.AptlyAppSandbox = {}));
13
- //# sourceMappingURL=app.js.map
@@ -1,10 +1,2 @@
1
- import { AptlyCloudinaryResourceType } from '../enums';
2
- export interface AptlyCloudinaryFile {
3
- public_id: string;
4
- url: string;
5
- secure_url: string;
6
- format: string;
7
- resource_type: AptlyCloudinaryResourceType;
8
- original_filename: string;
9
- bytes: number;
10
- }
1
+ import * as cloudinary from 'cloudinary';
2
+ export type AptlyCloudinaryFile = cloudinary.UploadApiResponse;
@@ -1,3 +1,2 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- //# sourceMappingURL=cloudinary.js.map
package/core/error.js CHANGED
@@ -1,3 +1,2 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- //# sourceMappingURL=error.js.map
package/core/fields.js CHANGED
@@ -1,3 +1,2 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- //# sourceMappingURL=fields.js.map
package/core/index.js CHANGED
@@ -1,7 +1,11 @@
1
1
  "use strict";
2
2
  var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
3
  if (k2 === undefined) k2 = k;
4
- Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
4
+ var desc = Object.getOwnPropertyDescriptor(m, k);
5
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
+ desc = { enumerable: true, get: function() { return m[k]; } };
7
+ }
8
+ Object.defineProperty(o, k2, desc);
5
9
  }) : (function(o, m, k, k2) {
6
10
  if (k2 === undefined) k2 = k;
7
11
  o[k2] = m[k];
@@ -19,4 +23,3 @@ __exportStar(require("./fields"), exports);
19
23
  __exportStar(require("./scope"), exports);
20
24
  __exportStar(require("./signage"), exports);
21
25
  __exportStar(require("./webhook-event-data"), exports);
22
- //# sourceMappingURL=index.js.map
@@ -1,7 +1,7 @@
1
1
  /**
2
2
  * @deprecated use AptlyPermissionGlobalModel enum
3
3
  */
4
- export declare type AptlyPermissionGlobalModels = 'superAdmin' | 'admin' | 'beta' | 'default';
4
+ export type AptlyPermissionGlobalModels = 'superAdmin' | 'admin' | 'beta' | 'default';
5
5
  export declare enum AptlyPermissionGlobalModel {
6
6
  Admin = "admin",
7
7
  Beta = "beta",
@@ -11,11 +11,11 @@ export declare enum AptlyPermissionGlobalModel {
11
11
  /**
12
12
  * @deprecated Dont think this is used?
13
13
  */
14
- export declare type AptlyPermissionModules = 'projectBooking' | 'projectSupport' | 'projectRecommendations';
14
+ export type AptlyPermissionModules = 'projectBooking' | 'projectSupport' | 'projectRecommendations';
15
15
  /**
16
16
  * @deprecated use AptlyPermissionOrganizationModel enum
17
17
  */
18
- export declare type AptlyPermissionModulesModels = 'default' | 'core' | 'algorithms' | 'departments' | 'booking' | 'unitExtraOptions' | 'unitExtraFields' | 'pages' | 'recommendations' | 'subcontractor' | 'optionLabels' | 'support' | 'productsExtended' | 'testing';
18
+ export type AptlyPermissionModulesModels = 'default' | 'core' | 'algorithms' | 'departments' | 'booking' | 'unitExtraOptions' | 'unitExtraFields' | 'pages' | 'recommendations' | 'subcontractor' | 'optionLabels' | 'support' | 'productsExtended' | 'testing';
19
19
  export declare enum AptlyPermissionModulesModel {
20
20
  Algorithms = "algorithms",
21
21
  Booking = "booking",
@@ -35,7 +35,7 @@ export declare enum AptlyPermissionModulesModel {
35
35
  /**
36
36
  * @deprecated use AptlyPermissionOrganizationModel enum
37
37
  */
38
- export declare type AptlyPermissionOrganizationModels = 'testingAdmin' | 'admin' | 'projectAdmin' | 'content' | 'organizationContent' | 'reports' | 'support' | 'thirdParty' | 'default';
38
+ export type AptlyPermissionOrganizationModels = 'testingAdmin' | 'admin' | 'projectAdmin' | 'content' | 'organizationContent' | 'reports' | 'support' | 'thirdParty' | 'default';
39
39
  export declare enum AptlyPermissionOrganizationModel {
40
40
  Admin = "admin",
41
41
  Content = "content",
@@ -50,7 +50,7 @@ export declare enum AptlyPermissionOrganizationModel {
50
50
  /**
51
51
  * @deprecated use AptlyPermissionModel enum
52
52
  */
53
- export declare type AptlyPermissionModels = 'admin' | 'adminBilling' | 'adminProducers' | 'adminProducts' | 'adminReport' | 'adminStats' | 'adminSuppliers' | 'adminTags' | 'adminTesting' | 'adminUsers' | 'adminOrganizations' | 'beta' | 'organization' | 'organizationAlgorithms' | 'organizationBooking' | 'organizationClients' | 'organizationDepartments' | 'organizationLogo' | 'organizationMembers' | 'organizationOptionLabels' | 'organizationOrders' | 'organizationPages' | 'organizationProducts' | 'organizationProductsExtended' | 'organizationRecommendations' | 'organizationReport' | 'organizationStats' | 'organizationUnitTemplates' | 'organizationUpsellTemplates' | 'organizationWebhooks' | 'project' | 'projectAlgorithms' | 'projectBooking' | 'projectDocuments' | 'projectInquiry' | 'projectOrders' | 'projectPages' | 'projectPeriods' | 'projectProducts' | 'projectRecommendations' | 'projectReport' | 'projectReportPrice' | 'projectTheme' | 'projectSigning' | 'projectSubcontractor' | 'projectUnits' | 'projectUnitInvites' | 'projectUnitExtraFields' | 'projectUnitExtraOptions' | 'projectUnitTemplates' | 'projectUnitTemplatesAlgorithms' | 'projectUnitTemplatesPrices' | 'projectUpsellTemplates' | 'unit' | 'unitBooking' | 'unitInquiry' | 'unitOrders' | 'unitPages' | 'unitProducts' | 'unitReport';
53
+ export type AptlyPermissionModels = 'admin' | 'adminBilling' | 'adminProducers' | 'adminProducts' | 'adminReport' | 'adminStats' | 'adminSuppliers' | 'adminTags' | 'adminTesting' | 'adminUsers' | 'adminOrganizations' | 'beta' | 'organization' | 'organizationAlgorithms' | 'organizationBooking' | 'organizationClients' | 'organizationDepartments' | 'organizationLogo' | 'organizationMembers' | 'organizationOptionLabels' | 'organizationOrders' | 'organizationPages' | 'organizationProducts' | 'organizationProductsExtended' | 'organizationRecommendations' | 'organizationReport' | 'organizationStats' | 'organizationUnitTemplates' | 'organizationUpsellTemplates' | 'organizationWebhooks' | 'project' | 'projectAlgorithms' | 'projectBooking' | 'projectDocuments' | 'projectInquiry' | 'projectOrders' | 'projectPages' | 'projectPeriods' | 'projectProducts' | 'projectRecommendations' | 'projectReport' | 'projectReportPrice' | 'projectTheme' | 'projectSigning' | 'projectSubcontractor' | 'projectUnits' | 'projectUnitInvites' | 'projectUnitExtraFields' | 'projectUnitExtraOptions' | 'projectUnitTemplates' | 'projectUnitTemplatesAlgorithms' | 'projectUnitTemplatesPrices' | 'projectUpsellTemplates' | 'unit' | 'unitBooking' | 'unitInquiry' | 'unitOrders' | 'unitPages' | 'unitProducts' | 'unitReport';
54
54
  export declare enum AptlyPermissionModel {
55
55
  Admin = "admin",
56
56
  AdminBilling = "adminBilling",
@@ -113,7 +113,7 @@ export declare enum AptlyPermissionModel {
113
113
  UnitProducts = "unitProducts",
114
114
  UnitReport = "unitReport"
115
115
  }
116
- export declare type AptlyPermissionCrud = 'C' | 'R' | 'U' | 'D';
117
- export declare type AptlyPermissionSchema = {
116
+ export type AptlyPermissionCrud = 'C' | 'R' | 'U' | 'D';
117
+ export type AptlyPermissionSchema = {
118
118
  [key in AptlyPermissionModels]: 'R' | 'CR' | 'CRU' | 'RU' | 'CRUD';
119
119
  };
@@ -100,4 +100,3 @@ var AptlyPermissionModel;
100
100
  AptlyPermissionModel["UnitProducts"] = "unitProducts";
101
101
  AptlyPermissionModel["UnitReport"] = "unitReport";
102
102
  })(AptlyPermissionModel = exports.AptlyPermissionModel || (exports.AptlyPermissionModel = {}));
103
- //# sourceMappingURL=permission.js.map
package/core/scope.d.ts CHANGED
@@ -3,8 +3,8 @@ export declare enum AptlyScopeAction {
3
3
  Read = "read",
4
4
  Write = "write"
5
5
  }
6
- export declare type AptlyScope = `aptly.${AptlyPermissionModel}` | `aptly.${AptlyPermissionModel}.${AptlyScopeAction}`;
7
- export declare type AptlyScopeTranslations = {
6
+ export type AptlyScope = `aptly.${AptlyPermissionModel}` | `aptly.${AptlyPermissionModel}.${AptlyScopeAction}`;
7
+ export type AptlyScopeTranslations = {
8
8
  [key in AptlyScope]: {
9
9
  label: string;
10
10
  description?: string;
package/core/scope.js CHANGED
@@ -6,4 +6,3 @@ var AptlyScopeAction;
6
6
  AptlyScopeAction["Read"] = "read";
7
7
  AptlyScopeAction["Write"] = "write";
8
8
  })(AptlyScopeAction = exports.AptlyScopeAction || (exports.AptlyScopeAction = {}));
9
- //# sourceMappingURL=scope.js.map
package/core/signage.d.ts CHANGED
@@ -1,5 +1,5 @@
1
1
  import { AptlySignageSignerRef } from '../enums';
2
- export declare type AptlySignage = AptlySignageSchema<string, string>;
2
+ export type AptlySignage = AptlySignageSchema<string, string>;
3
3
  export interface AptlySignageSchema<ID, DATE> {
4
4
  hasReceivedFile: boolean;
5
5
  documentId: string;
@@ -10,7 +10,7 @@ export interface AptlySignageSchema<ID, DATE> {
10
10
  expireDate: DATE;
11
11
  signers: AptlySignageSignerSchema<ID, DATE>[];
12
12
  }
13
- export declare type AptlySignageSigner = AptlySignageSignerSchema<string, string>;
13
+ export type AptlySignageSigner = AptlySignageSignerSchema<string, string>;
14
14
  export interface AptlySignageSignerSchema<ID, DATE> {
15
15
  _id: ID;
16
16
  ref: AptlySignageSignerRef;
package/core/signage.js CHANGED
@@ -1,3 +1,2 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- //# sourceMappingURL=signage.js.map
@@ -1,3 +1,2 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- //# sourceMappingURL=webhook-event-data.js.map
package/enums/document.js CHANGED
@@ -33,4 +33,3 @@ var AptlyHistoryType;
33
33
  AptlyHistoryType["Copied"] = "copied";
34
34
  AptlyHistoryType["Imported"] = "imported";
35
35
  })(AptlyHistoryType = exports.AptlyHistoryType || (exports.AptlyHistoryType = {}));
36
- //# sourceMappingURL=document.js.map
package/enums/fields.js CHANGED
@@ -27,4 +27,3 @@ var AptlyFieldType;
27
27
  AptlyFieldType["Switch"] = "switch";
28
28
  AptlyFieldType["Checkbox"] = "checkbox";
29
29
  })(AptlyFieldType = exports.AptlyFieldType || (exports.AptlyFieldType = {}));
30
- //# sourceMappingURL=fields.js.map
package/enums/index.js CHANGED
@@ -1,7 +1,11 @@
1
1
  "use strict";
2
2
  var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
3
  if (k2 === undefined) k2 = k;
4
- Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
4
+ var desc = Object.getOwnPropertyDescriptor(m, k);
5
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
+ desc = { enumerable: true, get: function() { return m[k]; } };
7
+ }
8
+ Object.defineProperty(o, k2, desc);
5
9
  }) : (function(o, m, k, k2) {
6
10
  if (k2 === undefined) k2 = k;
7
11
  o[k2] = m[k];
@@ -130,4 +134,3 @@ var AptlyIcon;
130
134
  AptlyIcon["Info"] = "info";
131
135
  AptlyIcon["Map"] = "map";
132
136
  })(AptlyIcon = exports.AptlyIcon || (exports.AptlyIcon = {}));
133
- //# sourceMappingURL=index.js.map
@@ -13,4 +13,3 @@ var AptlyUnitTemplateCategorySectionProductMeasureUnitType;
13
13
  AptlyUnitTemplateCategorySectionProductMeasureUnitType["KVM"] = "kvm";
14
14
  AptlyUnitTemplateCategorySectionProductMeasureUnitType["LM"] = "lm";
15
15
  })(AptlyUnitTemplateCategorySectionProductMeasureUnitType = exports.AptlyUnitTemplateCategorySectionProductMeasureUnitType || (exports.AptlyUnitTemplateCategorySectionProductMeasureUnitType = {}));
16
- //# sourceMappingURL=unit-template.js.map
package/enums/webhook.js CHANGED
@@ -25,4 +25,3 @@ var AptlyWebhookEventStatus;
25
25
  AptlyWebhookEventStatus["Retry"] = "retry";
26
26
  AptlyWebhookEventStatus["Failed"] = "failed";
27
27
  })(AptlyWebhookEventStatus = exports.AptlyWebhookEventStatus || (exports.AptlyWebhookEventStatus = {}));
28
- //# sourceMappingURL=webhook.js.map
package/index.js CHANGED
@@ -1,7 +1,11 @@
1
1
  "use strict";
2
2
  var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
3
  if (k2 === undefined) k2 = k;
4
- Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
4
+ var desc = Object.getOwnPropertyDescriptor(m, k);
5
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
+ desc = { enumerable: true, get: function() { return m[k]; } };
7
+ }
8
+ Object.defineProperty(o, k2, desc);
5
9
  }) : (function(o, m, k, k2) {
6
10
  if (k2 === undefined) k2 = k;
7
11
  o[k2] = m[k];
@@ -13,4 +17,3 @@ Object.defineProperty(exports, "__esModule", { value: true });
13
17
  __exportStar(require("./core"), exports);
14
18
  __exportStar(require("./enums"), exports);
15
19
  __exportStar(require("./models"), exports);
16
- //# sourceMappingURL=index.js.map
@@ -9,7 +9,7 @@ export declare enum AptlyAlgorithmPipelineApplyTo {
9
9
  Root = "root",
10
10
  PreviousStep = "previousStep"
11
11
  }
12
- export declare type AptlyAlgorithm = AptlyAlgorithmSchema<string>;
12
+ export type AptlyAlgorithm = AptlyAlgorithmSchema<string>;
13
13
  export interface AptlyAlgorithmSchema<ID> {
14
14
  _id: ID;
15
15
  name: string;
@@ -17,7 +17,7 @@ export interface AptlyAlgorithmSchema<ID> {
17
17
  organization?: ID;
18
18
  project?: ID;
19
19
  }
20
- export declare type AptlyAlgorithmPipeline = AptlyAlgorithmPipelineSchema<string>;
20
+ export type AptlyAlgorithmPipeline = AptlyAlgorithmPipelineSchema<string>;
21
21
  export interface AptlyAlgorithmPipelineSchema<ID> {
22
22
  _id: ID;
23
23
  label: string;
@@ -14,4 +14,3 @@ var AptlyAlgorithmPipelineApplyTo;
14
14
  AptlyAlgorithmPipelineApplyTo["Root"] = "root";
15
15
  AptlyAlgorithmPipelineApplyTo["PreviousStep"] = "previousStep";
16
16
  })(AptlyAlgorithmPipelineApplyTo = exports.AptlyAlgorithmPipelineApplyTo || (exports.AptlyAlgorithmPipelineApplyTo = {}));
17
- //# sourceMappingURL=algorithm.js.map
package/models/app.d.ts CHANGED
@@ -2,7 +2,7 @@ import { AptlyBaseSchema } from './extends';
2
2
  import { AptlyWebhookType } from '../enums';
3
3
  import { AptlyAppSandbox, AptlyField, AptlyPermissionModel } from '../core';
4
4
  import { AptlyMediaSrcSchema } from './media';
5
- export declare type AptlyApp = AptlyAppSchema<string, string>;
5
+ export type AptlyApp = AptlyAppSchema<string, string>;
6
6
  export interface AptlyAppSchema<ID, DATE> extends Omit<AptlyBaseSchema<ID, DATE>, 'archived'> {
7
7
  slug: string;
8
8
  description: string;
@@ -16,7 +16,7 @@ export interface AptlyAppSchema<ID, DATE> extends Omit<AptlyBaseSchema<ID, DATE>
16
16
  proxies: AptlyAppProxySchema<ID>[];
17
17
  menus: AptlyAppMenuSchema<ID, DATE>[];
18
18
  }
19
- export declare type AptlyAppSetting = AptlyAppSettingSchema<string>;
19
+ export type AptlyAppSetting = AptlyAppSettingSchema<string>;
20
20
  export interface AptlyAppSettingSchema<ID> extends AptlyField {
21
21
  _id: ID;
22
22
  key: string;
@@ -44,11 +44,11 @@ export declare enum AptlyProjectInjection {
44
44
  Support = "support",
45
45
  Admin = "admin"
46
46
  }
47
- export declare type AptlyAppInjectionMenu = `organization-${AptlyOrganizationInjection}` | `project-${AptlyProjectInjection}`;
47
+ export type AptlyAppInjectionMenu = `organization-${AptlyOrganizationInjection}` | `project-${AptlyProjectInjection}`;
48
48
  export declare enum AptlyAppInjectionType {
49
49
  Iframe = "iframe"
50
50
  }
51
- export declare type AptlyAppMenu = AptlyAppMenuSchema<string, string>;
51
+ export type AptlyAppMenu = AptlyAppMenuSchema<string, string>;
52
52
  export interface AptlyAppMenuSchema<ID, DATE> {
53
53
  _id: ID;
54
54
  type: AptlyAppInjectionType;
package/models/app.js CHANGED
@@ -24,4 +24,3 @@ var AptlyAppInjectionType;
24
24
  (function (AptlyAppInjectionType) {
25
25
  AptlyAppInjectionType["Iframe"] = "iframe";
26
26
  })(AptlyAppInjectionType = exports.AptlyAppInjectionType || (exports.AptlyAppInjectionType = {}));
27
- //# sourceMappingURL=app.js.map
@@ -0,0 +1,34 @@
1
+ import { AptlyUserSchema } from './user.js';
2
+ export interface IAvailabilitySchema<ID, DATE> {
3
+ organization?: ID;
4
+ project: ID;
5
+ archived?: boolean;
6
+ calendars: IAvailabilityCalendarSchema<ID, DATE>[];
7
+ }
8
+ export interface IAvailabilityCalendarSchema<ID, DATE> {
9
+ _id: ID;
10
+ name: string;
11
+ description: string;
12
+ fee?: number;
13
+ location: {
14
+ name: string;
15
+ formatted_address?: string;
16
+ geometry?: {
17
+ location: {
18
+ lat: number;
19
+ lng: number;
20
+ };
21
+ };
22
+ };
23
+ attendees: AptlyUserSchema<ID, DATE>[];
24
+ userAvailability?: (ID | AptlyUserSchema<ID, DATE>)[];
25
+ endAvailabilityAt?: Date;
26
+ availableTimes: IAvailabilityCalendarAvailableTimeSchema<ID, DATE>[];
27
+ }
28
+ export interface IAvailabilityCalendarAvailableTimeSchema<ID, DATE> {
29
+ user?: ID;
30
+ from: DATE;
31
+ to: DATE;
32
+ booked: boolean;
33
+ booking: ID;
34
+ }
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -1,8 +1,11 @@
1
- export declare type AptlyBooking = AptlyBookingSchema<string, string>;
1
+ import { AptlyOrganizationSchema } from './organization.js';
2
+ import { AptlyProjectSchema } from './project.js';
3
+ import { AptlyUnitSchema } from './unit.js';
4
+ export type AptlyBooking = AptlyBookingSchema<string, string>;
2
5
  export interface AptlyBookingSchema<ID, DATE> {
3
6
  _id: ID;
4
- project: ID;
5
- unit: ID;
7
+ project: ID | AptlyProjectSchema<ID, DATE>;
8
+ unit: ID | AptlyUnitSchema<ID, DATE>;
6
9
  user: ID;
7
10
  availability: ID;
8
11
  calendar: ID;
@@ -10,15 +13,15 @@ export interface AptlyBookingSchema<ID, DATE> {
10
13
  from: DATE;
11
14
  to: DATE;
12
15
  }
13
- export declare type AptlyAvailability = AptlyAvailabilitySchema<string, string>;
16
+ export type AptlyAvailability = AptlyAvailabilitySchema<string, string>;
14
17
  export interface AptlyAvailabilitySchema<ID, DATE> {
15
18
  _id: ID;
16
- organization?: ID;
17
- project: ID;
19
+ organization?: ID | AptlyOrganizationSchema<ID, DATE>;
20
+ project: ID | AptlyProjectSchema<ID, DATE>;
18
21
  archived?: boolean;
19
22
  calendars: AptlyAvailabilityCalendarSchema<ID, DATE>[];
20
23
  }
21
- export declare type AptlyAvailabilityCalendar = AptlyAvailabilityCalendarSchema<string, string>;
24
+ export type AptlyAvailabilityCalendar = AptlyAvailabilityCalendarSchema<string, string>;
22
25
  export interface AptlyAvailabilityCalendarSchema<ID, DATE> {
23
26
  _id: ID;
24
27
  name: string;
@@ -39,9 +42,9 @@ export interface AptlyAvailabilityCalendarSchema<ID, DATE> {
39
42
  endAvailabilityAt?: DATE;
40
43
  userAvailability?: ID[];
41
44
  }
42
- export declare type AptlyAvailabilityCalendarAvailableTimes = AptlyAvailabilityCalendarAvailableTimesSchema<string, string>;
45
+ export type AptlyAvailabilityCalendarAvailableTimes = AptlyAvailabilityCalendarAvailableTimesSchema<string, string>;
43
46
  export interface AptlyAvailabilityCalendarAvailableTimesSchema<ID, DATE> {
44
- _ID: ID;
47
+ _id: ID;
45
48
  from: DATE;
46
49
  to: DATE;
47
50
  booked: boolean;
package/models/booking.js CHANGED
@@ -1,3 +1,2 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- //# sourceMappingURL=booking.js.map
@@ -11,4 +11,4 @@ export interface AptlyUserClientSchema<ID, DATE> extends Omit<AptlyBaseSchema<ID
11
11
  */
12
12
  created: DATE;
13
13
  }
14
- export declare type AptlyUserClient = AptlyUserClientSchema<string, string>;
14
+ export type AptlyUserClient = AptlyUserClientSchema<string, string>;
package/models/client.js CHANGED
@@ -1,3 +1,2 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- //# sourceMappingURL=client.js.map
@@ -4,13 +4,13 @@ import { AptlyProjectSchema } from './project';
4
4
  import { AptlyUserSchema } from './user';
5
5
  import { AptlyBaseSchema } from './extends';
6
6
  import { AptlyUnitSchema } from './unit';
7
- export declare type AptlyDepartment = AptlyDepartmentGeneric<string, string>;
7
+ export type AptlyDepartment = AptlyDepartmentGeneric<string, string>;
8
8
  export interface AptlyDepartmentGeneric<ID, DATE> extends Omit<AptlyBaseSchema<ID, DATE>, 'archived'> {
9
9
  organization: ID | AptlyOrganizationSchema<ID, DATE>;
10
10
  projects: AptlyDepartmentProjectGeneric<ID, DATE>[];
11
11
  users: AptlyDepartmentUserGeneric<ID, DATE>[];
12
12
  }
13
- export declare type AptlyDepartmentProject = AptlyDepartmentProjectGeneric<string, string>;
13
+ export type AptlyDepartmentProject = AptlyDepartmentProjectGeneric<string, string>;
14
14
  export interface AptlyDepartmentProjectGeneric<ID, DATE> {
15
15
  _id: ID;
16
16
  project: (ID | AptlyProjectSchema<ID, DATE>);
@@ -18,7 +18,7 @@ export interface AptlyDepartmentProjectGeneric<ID, DATE> {
18
18
  createdAt: DATE;
19
19
  updatedAt: DATE;
20
20
  }
21
- export declare type AptlyDepartmentUser = AptlyDepartmentUserGeneric<string, string>;
21
+ export type AptlyDepartmentUser = AptlyDepartmentUserGeneric<string, string>;
22
22
  export interface AptlyDepartmentUserGeneric<ID, DATE> {
23
23
  _id: ID;
24
24
  user: (ID | AptlyUserSchema<ID, DATE>);
@@ -1,3 +1,2 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- //# sourceMappingURL=department.js.map
@@ -1,14 +1,14 @@
1
1
  import { AptlyDocumentType } from '../enums';
2
2
  import { AptlyBaseSchema } from './extends';
3
- export declare type AptlyDocument = AptlyDocumentSchema<string, string>;
3
+ export type AptlyDocument = AptlyDocumentSchema<string, string>;
4
4
  export interface AptlyDocumentSchema<ID, DATE> extends Omit<AptlyBaseSchema<ID, DATE>, 'archived'> {
5
5
  mime: string;
6
6
  _type: AptlyDocumentType;
7
7
  data: string;
8
- organization?: string;
9
- project?: string;
10
- unit?: string;
11
- product?: string;
8
+ organization?: ID;
9
+ project?: ID;
10
+ unit?: ID;
11
+ product?: ID;
12
12
  text?: string;
13
13
  size: number;
14
14
  thirdPartyUploader: string | null;
@@ -16,14 +16,18 @@ export interface AptlyDocumentSchema<ID, DATE> extends Omit<AptlyBaseSchema<ID,
16
16
  external_url?: string;
17
17
  public_id?: string;
18
18
  boligmappaStatus?: AptlyDocumentSchemaBoligmappaStatusSchema<ID>[];
19
- chunks?: ID[];
19
+ chunks?: (AptlyDocumentSchema<ID, DATE> | ID)[];
20
20
  isPasswordProtected?: boolean;
21
+ /**
22
+ * Used in frontend.
23
+ */
24
+ downloadToken?: string;
21
25
  /**
22
26
  * @deprecated use createdAt
23
27
  */
24
28
  created: DATE;
25
29
  }
26
- export declare type AptlyDocumentSchemaBoligmappaStatus = AptlyDocumentSchemaBoligmappaStatusSchema<string>;
30
+ export type AptlyDocumentSchemaBoligmappaStatus = AptlyDocumentSchemaBoligmappaStatusSchema<string>;
27
31
  export interface AptlyDocumentSchemaBoligmappaStatusSchema<ID> {
28
32
  _id: ID;
29
33
  unit: ID;
@@ -1,3 +1,2 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- //# sourceMappingURL=document.js.map
@@ -7,7 +7,7 @@ export interface AptlyBaseSchema<ID, DATE> {
7
7
  createdAt: DATE;
8
8
  updatedAt: DATE;
9
9
  }
10
- export declare type AptlyHistory = AptlyHistorySchema<string, string>;
10
+ export type AptlyHistory = AptlyHistorySchema<string, string>;
11
11
  export interface AptlyHistorySchema<ID, DATE> {
12
12
  /**
13
13
  * @deprecated not used in v2
@@ -19,7 +19,7 @@ export interface AptlyHistorySchema<ID, DATE> {
19
19
  lastChange: DATE;
20
20
  history: AptlyHistoryHistorySchema<ID, DATE>[];
21
21
  }
22
- export declare type AptlyHistoryHistory = AptlyHistoryHistorySchema<string, string>;
22
+ export type AptlyHistoryHistory = AptlyHistoryHistorySchema<string, string>;
23
23
  export interface AptlyHistoryHistorySchema<ID, DATE> {
24
24
  _id: ID;
25
25
  type: AptlyHistoryType;
package/models/extends.js CHANGED
@@ -1,3 +1,2 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- //# sourceMappingURL=extends.js.map
package/models/index.js CHANGED
@@ -1,7 +1,11 @@
1
1
  "use strict";
2
2
  var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
3
  if (k2 === undefined) k2 = k;
4
- Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
4
+ var desc = Object.getOwnPropertyDescriptor(m, k);
5
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
+ desc = { enumerable: true, get: function() { return m[k]; } };
7
+ }
8
+ Object.defineProperty(o, k2, desc);
5
9
  }) : (function(o, m, k, k2) {
6
10
  if (k2 === undefined) k2 = k;
7
11
  o[k2] = m[k];
@@ -39,4 +43,3 @@ __exportStar(require("./upsell-template"), exports);
39
43
  __exportStar(require("./user"), exports);
40
44
  __exportStar(require("./webhook"), exports);
41
45
  __exportStar(require("./webhook-event"), exports);
42
- //# sourceMappingURL=index.js.map
@@ -4,7 +4,7 @@ import { AptlyUnitSchema } from './unit';
4
4
  import { AptlyOrganizationSchema } from './organization';
5
5
  import { AptlyProjectSchema } from './project';
6
6
  import { AptlyUserSchema } from './user';
7
- export declare type AptlyInquiry = AptlyInquirySchema<string, string>;
7
+ export type AptlyInquiry = AptlyInquirySchema<string, string>;
8
8
  export interface AptlyInquirySchema<ID, DATE> {
9
9
  _id: ID;
10
10
  _type: AptlyInquiryType;
@@ -26,7 +26,7 @@ export interface AptlyInquirySchema<ID, DATE> {
26
26
  messages: AptlyInquiryMessageSchema<ID, DATE>[];
27
27
  references?: string;
28
28
  }
29
- export declare type AptlyInquiryParticipant = AptlyInquiryParticipantSchema<string, string>;
29
+ export type AptlyInquiryParticipant = AptlyInquiryParticipantSchema<string, string>;
30
30
  export interface AptlyInquiryParticipantSchema<ID, DATE> {
31
31
  _id: ID;
32
32
  user?: ID | AptlyUserSchema<ID, DATE>;
@@ -34,7 +34,7 @@ export interface AptlyInquiryParticipantSchema<ID, DATE> {
34
34
  role: AptlyInquiryParticipantRole;
35
35
  readAll: boolean;
36
36
  }
37
- export declare type AptlyInquiryMessage = AptlyInquiryMessageSchema<string, string>;
37
+ export type AptlyInquiryMessage = AptlyInquiryMessageSchema<string, string>;
38
38
  export interface AptlyInquiryMessageSchema<ID, DATE> {
39
39
  _id: ID;
40
40
  message: string;
package/models/inquiry.js CHANGED
@@ -1,3 +1,2 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- //# sourceMappingURL=inquiry.js.map
package/models/media.d.ts CHANGED
@@ -54,6 +54,6 @@ export interface AptlyMediaSrcSchema<ID, DATE> extends Pick<AptlyMediaSchema<ID,
54
54
  */
55
55
  image?: string;
56
56
  }
57
- export declare type AptlyMediaSrcKeys = '_id' | 'name' | 'src' | 'url' | 'alt' | 'title' | 'caption' | 'mime' | 'width' | 'height';
58
- export declare type AptlyMediaSrc = AptlyMediaSrcSchema<string, string>;
59
- export declare type AptlyMedia = AptlyMediaSchema<string, string>;
57
+ export type AptlyMediaSrcKeys = '_id' | 'name' | 'src' | 'url' | 'alt' | 'title' | 'caption' | 'mime' | 'width' | 'height';
58
+ export type AptlyMediaSrc = AptlyMediaSrcSchema<string, string>;
59
+ export type AptlyMedia = AptlyMediaSchema<string, string>;
package/models/media.js CHANGED
@@ -1,3 +1,2 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- //# sourceMappingURL=media.js.map
@@ -1,4 +1,4 @@
1
- export declare type AptlyNotificationTrigger = AptlyNotificationTriggerSchema<string, string>;
1
+ export type AptlyNotificationTrigger = AptlyNotificationTriggerSchema<string, string>;
2
2
  export interface AptlyNotificationTriggerSchema<ID, DATE> {
3
3
  _id: ID;
4
4
  _type: string;
@@ -1,3 +1,2 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- //# sourceMappingURL=notification-trigger.js.map
@@ -1,8 +1,8 @@
1
1
  import { AptlyBaseSchema } from './extends';
2
- export declare type AptlyOptionLabel = AptlyOptionLabelSchema<string, string>;
2
+ export type AptlyOptionLabel = AptlyOptionLabelSchema<string, string>;
3
3
  export interface AptlyOptionLabelSchema<ID, DATE> extends AptlyBaseSchema<ID, DATE> {
4
- organization?: string;
5
- project?: string;
4
+ organization?: ID;
5
+ project?: ID;
6
6
  /**
7
7
  * @deprecated use createdAt
8
8
  */
@@ -1,3 +1,2 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- //# sourceMappingURL=option-label.js.map