@aptly-as/types 3.0.25 → 3.1.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.
package/core/scope.d.ts CHANGED
@@ -5,6 +5,7 @@ export declare enum AptlyModules {
5
5
  Default = "default",
6
6
  Departments = "departments",
7
7
  Emails = "emails",
8
+ Members = "members",
8
9
  Offers = "offers",
9
10
  Options = "options",
10
11
  OptionLabels = "optionLabels",
@@ -27,6 +28,7 @@ export declare enum AptlyScopes {
27
28
  AdminApps = "adminApps",
28
29
  AdminBilling = "adminBilling",
29
30
  AdminModules = "adminModules",
31
+ AdminPlans = "adminPlans",
30
32
  AdminProducers = "adminProducers",
31
33
  AdminProducts = "adminProducts",
32
34
  AdminReport = "adminReport",
package/core/scope.js CHANGED
@@ -6,6 +6,7 @@ export var AptlyModules;
6
6
  AptlyModules["Default"] = "default";
7
7
  AptlyModules["Departments"] = "departments";
8
8
  AptlyModules["Emails"] = "emails";
9
+ AptlyModules["Members"] = "members";
9
10
  AptlyModules["Offers"] = "offers";
10
11
  AptlyModules["Options"] = "options";
11
12
  AptlyModules["OptionLabels"] = "optionLabels";
@@ -29,6 +30,7 @@ export var AptlyScopes;
29
30
  AptlyScopes["AdminApps"] = "adminApps";
30
31
  AptlyScopes["AdminBilling"] = "adminBilling";
31
32
  AptlyScopes["AdminModules"] = "adminModules";
33
+ AptlyScopes["AdminPlans"] = "adminPlans";
32
34
  AptlyScopes["AdminProducers"] = "adminProducers";
33
35
  AptlyScopes["AdminProducts"] = "adminProducts";
34
36
  AptlyScopes["AdminReport"] = "adminReport";
@@ -32,7 +32,7 @@ export declare namespace AptlyWebhookEventData {
32
32
  project: Project<ID, DATE>;
33
33
  unit: Pick<AptlyUnitSchema<ID, DATE>, '_id' | 'name' | 'shipping' | 'users'>;
34
34
  order: AptlyOrderSchema<ID, DATE>;
35
- offer?: Pick<AptlyOfferSchema<ID, DATE>, '_id' | 'name'>;
35
+ offer?: Pick<AptlyOfferSchema<ID, DATE>, '_id' | 'name' | 'number'>;
36
36
  receiptUrl?: string;
37
37
  signedReceiptUrl?: string;
38
38
  }
package/enums/index.d.ts CHANGED
@@ -116,7 +116,8 @@ export declare enum AptlyOrganizationType {
116
116
  Producer = "producer",
117
117
  Integration = "integration",
118
118
  PropertyDeveloper = "property-developer",
119
- Builder = "builder"
119
+ Builder = "builder",
120
+ Other = "other"
120
121
  }
121
122
  export declare enum AptlyOrganizationStatus {
122
123
  NewBusiness = 0,
package/enums/index.js CHANGED
@@ -134,6 +134,7 @@ export var AptlyOrganizationType;
134
134
  AptlyOrganizationType["Integration"] = "integration";
135
135
  AptlyOrganizationType["PropertyDeveloper"] = "property-developer";
136
136
  AptlyOrganizationType["Builder"] = "builder";
137
+ AptlyOrganizationType["Other"] = "other";
137
138
  })(AptlyOrganizationType || (AptlyOrganizationType = {}));
138
139
  export var AptlyOrganizationStatus;
139
140
  (function (AptlyOrganizationStatus) {
@@ -7,4 +7,6 @@ export interface AptlyCustomerSchema<ID, DATE> {
7
7
  lastName: string;
8
8
  email: string;
9
9
  phone?: string;
10
+ companyName?: string;
11
+ companyVat?: string;
10
12
  }
package/models/index.d.ts CHANGED
@@ -25,6 +25,8 @@ export * from './payment.js';
25
25
  export * from './payment-settlement.js';
26
26
  export * from './period.js';
27
27
  export * from './pick.js';
28
+ export * from './plan.js';
29
+ export * from './plan-payment.js';
28
30
  export * from './producer.js';
29
31
  export * from './product.js';
30
32
  export * from './product-stats.js';
package/models/index.js CHANGED
@@ -25,6 +25,8 @@ export * from './payment.js';
25
25
  export * from './payment-settlement.js';
26
26
  export * from './period.js';
27
27
  export * from './pick.js';
28
+ export * from './plan.js';
29
+ export * from './plan-payment.js';
28
30
  export * from './producer.js';
29
31
  export * from './product.js';
30
32
  export * from './product-stats.js';
@@ -1,20 +1,22 @@
1
1
  import { AptlyModules } from '../core/index.js';
2
+ import { AptlyBaseSchema } from './extends.js';
2
3
  export type AptlyModule = AptlyModuleSchema<string, string>;
3
- export interface AptlyModuleSchema<ID, DATE> {
4
- _id: ID;
5
- name: string;
4
+ export interface AptlyModuleSchema<ID, DATE> extends AptlyBaseSchema<ID, DATE> {
6
5
  description: string;
7
6
  featuredWeight: number;
8
- cost?: number;
9
7
  modules: AptlyModules[];
10
- isDefault?: boolean;
11
- createdAt: DATE;
12
- updatedAt: DATE;
8
+ listed: boolean;
9
+ monthly: number;
10
+ yearly: number;
13
11
  }
14
12
  export type AptlyModuleItem = AptlyModuleItemSchema<string, string>;
15
13
  export interface AptlyModuleItemSchema<ID, DATE> {
16
14
  _id: ID;
15
+ plan: ID | null;
17
16
  module: ID | AptlyModuleSchema<ID, DATE>;
18
17
  modules: AptlyModules[];
18
+ monthly: number;
19
+ yearly: number;
20
+ installedBy: ID;
19
21
  installedAt: DATE;
20
22
  }
@@ -4,6 +4,7 @@ import { AptlyOrganizationStatus, AptlyOrganizationType } from '../enums/index.j
4
4
  import { AptlyAddress } from './address.js';
5
5
  import { AptlyInviteSchema } from './invite.js';
6
6
  import { AptlyModuleItemSchema } from './module.js';
7
+ import { AptlyPlanInstalledSchema } from './plan.js';
7
8
  import { AptlyProjectSchema } from './project.js';
8
9
  import { AptlyUserSchema } from './user.js';
9
10
  import { AptlyMediaSrc } from './media.js';
@@ -47,6 +48,7 @@ export interface AptlyOrganizationSchema<ID, DATE> extends AptlyBaseSchema<ID, D
47
48
  paymentApp?: ID | AptlyAppSchema<ID, DATE> | null;
48
49
  signApp?: ID | AptlyAppSchema<ID, DATE> | null;
49
50
  signMembers?: (ID | AptlyUserSchema<ID, DATE>)[];
51
+ plan: ID | AptlyPlanInstalledSchema<ID, DATE> | null;
50
52
  tripletexCustomer?: {
51
53
  id: number;
52
54
  name: string;
@@ -9,6 +9,7 @@ export interface AptlyPlanPaymentSchema<ID, DATE> {
9
9
  _id: ID;
10
10
  organization: ID | AptlyOrganizationSchema<ID, DATE>;
11
11
  offers: ID[];
12
+ users: ID[];
12
13
  from: DATE;
13
14
  to: DATE;
14
15
  amount: number;
package/models/plan.d.ts CHANGED
@@ -13,10 +13,12 @@ export declare enum AptlyPlanTier {
13
13
  export type AptlyPlan = AptlyPlanSchema<string, string>;
14
14
  export interface AptlyPlanSchema<ID, DATE> extends AptlyBaseSchema<ID, DATE> {
15
15
  tier: AptlyPlanTier;
16
+ isDefaultFreeTier: boolean;
16
17
  slug: string;
17
18
  description: string;
18
19
  modules: (ID | AptlyModuleSchema<ID, DATE>)[];
19
20
  listed: boolean;
21
+ featuredWeight: number;
20
22
  organization: ID | AptlyOrganizationSchema<ID, DATE> | null;
21
23
  copiedPlan: ID | null;
22
24
  recurring: AptlyPlanRecurring;
@@ -30,7 +32,6 @@ export interface AptlyPlanSchema<ID, DATE> extends AptlyBaseSchema<ID, DATE> {
30
32
  user: {
31
33
  freeQuantity: number;
32
34
  monthly: number;
33
- yearly: number;
34
35
  };
35
36
  unit: {
36
37
  freeQuantity: number;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@aptly-as/types",
3
- "version": "3.0.25",
3
+ "version": "3.1.1",
4
4
  "description": "Aptly types and enums",
5
5
  "type": "module",
6
6
  "main": "./index.js",