@antelopejs/interface-dms-saas 0.6.0 → 0.7.0

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 (61) hide show
  1. package/README.md +27 -34
  2. package/dist/db/models/billingSettings.model.d.ts +7 -5
  3. package/dist/db/models/creditNotes.model.d.ts +7 -5
  4. package/dist/db/models/features.model.d.ts +7 -5
  5. package/dist/db/models/invoices.model.d.ts +7 -5
  6. package/dist/db/models/legalDocuments.model.d.ts +7 -5
  7. package/dist/db/models/planMigrations.model.d.ts +7 -5
  8. package/dist/db/models/plans.model.d.ts +9 -6
  9. package/dist/db/models/plans.model.js.map +1 -1
  10. package/dist/db/models/platformNotes.model.d.ts +7 -5
  11. package/dist/db/models/refunds.model.d.ts +7 -5
  12. package/dist/db/models/segments.model.d.ts +7 -5
  13. package/dist/db/models/segments.model.js +9 -8
  14. package/dist/db/models/segments.model.js.map +1 -1
  15. package/dist/db/models/stripeWebhookEvents.model.d.ts +7 -5
  16. package/dist/db/models/tenantBillingInfo.model.d.ts +7 -5
  17. package/dist/db/models/tenantBillingState.model.d.ts +7 -5
  18. package/dist/db/models/tenantSubscriptions.model.d.ts +7 -5
  19. package/dist/db/models/tenantSubscriptions.model.js +7 -8
  20. package/dist/db/models/tenantSubscriptions.model.js.map +1 -1
  21. package/dist/db/models/trialConsumptions.model.d.ts +7 -5
  22. package/dist/db/models/update-result.d.ts +8 -1
  23. package/dist/db/models/update-result.js +8 -2
  24. package/dist/db/models/update-result.js.map +1 -1
  25. package/dist/db/models/userSegments.model.d.ts +7 -5
  26. package/dist/db/tables/creditNotes.table.d.ts +1 -1
  27. package/dist/db/tables/creditNotes.table.js.map +1 -1
  28. package/dist/db/tables/features.table.d.ts +3 -1
  29. package/dist/db/tables/features.table.js.map +1 -1
  30. package/dist/db/tables/invoices.table.d.ts +1 -1
  31. package/dist/db/tables/plans.table.d.ts +2 -1
  32. package/dist/db/tables/plans.table.js.map +1 -1
  33. package/dist/db/tables/refunds.table.js.map +1 -1
  34. package/dist/db/tables/segments.table.js +5 -7
  35. package/dist/db/tables/segments.table.js.map +1 -1
  36. package/dist/db/tables/tenantSubscriptions.table.js +4 -3
  37. package/dist/db/tables/tenantSubscriptions.table.js.map +1 -1
  38. package/dist/hidden-filter.js.map +1 -1
  39. package/dist/index.d.ts +1 -0
  40. package/dist/index.js +1 -0
  41. package/dist/index.js.map +1 -1
  42. package/dist/invoice-line-items.d.ts +1 -1
  43. package/dist/invoice-line-items.js +9 -7
  44. package/dist/invoice-line-items.js.map +1 -1
  45. package/dist/json.d.ts +6 -0
  46. package/dist/json.js +3 -0
  47. package/dist/json.js.map +1 -0
  48. package/dist/pages.d.ts +5 -0
  49. package/dist/pages.js.map +1 -1
  50. package/dist/plans.d.ts +2 -2
  51. package/dist/plans.js.map +1 -1
  52. package/dist/provisioning.d.ts +3 -2
  53. package/docs/1.index.md +13 -13
  54. package/docs/2.billing.md +30 -34
  55. package/docs/3.lifecycle-and-usage.md +44 -37
  56. package/docs/4.pages-plans-data.md +24 -23
  57. package/docs/tsconfig.json +9 -1
  58. package/package.json +11 -15
  59. package/dist/db/models/revision.d.ts +0 -1
  60. package/dist/db/models/revision.js +0 -14
  61. package/dist/db/models/revision.js.map +0 -1
package/README.md CHANGED
@@ -1,13 +1,13 @@
1
1
  <div align="center">
2
2
 
3
- # @antelopejs/interface-dms-saas
3
+ # `@antelopejs/interface-dms-saas`
4
4
 
5
- <a href="https://www.npmjs.com/package/@antelopejs/interface-dms-saas"><img alt="npm" src="https://img.shields.io/npm/v/@antelopejs/interface-dms-saas?style=for-the-badge&labelColor=000000&color=000000"></a>
6
- <a href="./LICENSE"><img alt="License" src="https://img.shields.io/npm/l/@antelopejs/interface-dms-saas?style=for-the-badge&labelColor=000000&color=000000"></a>
7
- <a href="https://discord.gg/sjK28QHrA7"><img alt="Discord" src="https://img.shields.io/badge/Discord-18181B?logo=discord&style=for-the-badge&color=000000"></a>
8
- <a href="https://dms.antelopejs.com/docs/modules/saas/extending"><img alt="Documentation" src="https://img.shields.io/badge/Docs-18181B?style=for-the-badge&color=000000"></a>
5
+ <a href="https://www.npmjs.com/package/@antelopejs/interface-dms-saas"><img alt="npm" src="https://img.shields.io/npm/v/@antelopejs/interface-dms-saas?style=for-the-badge&labelColor=000000&color=000000" data-illustration></a>
6
+ <a href="./LICENSE"><img alt="License" src="https://img.shields.io/npm/l/@antelopejs/interface-dms-saas?style=for-the-badge&labelColor=000000&color=000000" data-illustration></a>
7
+ <a href="https://discord.gg/g4pFt6eXqu"><img alt="Discord" src="https://img.shields.io/badge/Discord-18181B?logo=discord&style=for-the-badge&color=000000" data-illustration></a>
8
+ <a href="https://dms.antelopejs.com/docs/modules/saas/extending"><img alt="Documentation" src="https://img.shields.io/badge/Docs-18181B?style=for-the-badge&color=000000" data-illustration></a>
9
9
 
10
- The AntelopeJS interface to extend the DMS SaaS module: billing, plans, registration, workspace pages and lifecycle.
10
+ The AntelopeJS interface that extends the DMS SaaS module with billing, plans, registration, workspace pages and lifecycle.
11
11
 
12
12
  </div>
13
13
 
@@ -16,8 +16,8 @@ The AntelopeJS interface to extend the DMS SaaS module: billing, plans, registra
16
16
  - Adds invoice line items, reads customer balances and previews the upcoming invoice.
17
17
  - Builds plan projections and catalogues, and normalizes prices.
18
18
  - Extends registration and the provisioning of a new workspace.
19
- - Adds workspace settings categories and blocks to the tenant billing page.
20
- - Listens to tenant lifecycle events and operator actions, and exposes the canonical SaaS tables and models (`/db`).
19
+ - Adds blocks to the tenant billing page and the platform workspace detail page.
20
+ - Listens to tenant lifecycle events, guards paid-to-Free plan changes, and exposes the canonical SaaS tables and models (`/db`).
21
21
 
22
22
  A module that extends [`@antelopejs/dms-saas`](https://www.npmjs.com/package/@antelopejs/dms-saas) depends on this package, never on the runtime.
23
23
 
@@ -29,7 +29,7 @@ pnpm add @antelopejs/interface-dms-saas
29
29
 
30
30
  ## Quick start
31
31
 
32
- The root entry holds every extension point except `db`, with `invoiceLineItems` and `tenantLifecycle` as namespaces:
32
+ The root entry holds every extension point except `db`. `invoiceLineItems`, `tenantLifecycle` and `planChanges` are namespaces at the root:
33
33
 
34
34
  ```ts docs-check
35
35
  import { invoiceLineItems, tenantLifecycle } from "@antelopejs/interface-dms-saas";
@@ -38,43 +38,36 @@ export const usageKey = invoiceLineItems.buildInvoiceLineKey("example.compute",
38
38
  export const isProvisioningCommitted = tenantLifecycle.IsTenantProvisioningCommitted;
39
39
  ```
40
40
 
41
- Use the [entry-point reference](./docs/1.index.md#entry-points) for supported
42
- subpaths. Importing `/db` registers SaaS tables; it is not a side-effect-free
43
- types barrel. After direct subscription writes, call
44
- [`RecomputeTenantBillingState`](./docs/2.billing.md#recomputetenantbillingstate)
45
- to refresh derived billing and workspace directory state.
41
+ The [entry-point reference](./docs/1.index.md#entry-points) lists the supported subpaths. Importing `/db` registers the SaaS tables, so it is not a types-only import. After direct subscription writes, call [`RecomputeTenantBillingState`](./docs/2.billing.md#recomputetenantbillingstate) to refresh the derived billing state and the workspace directory row.
46
42
 
47
- A module may seed plans straight into the `db` plan table: it writes `name`, `description` and `borderLabel` with one value per locale through `localize("*")`, leaves `Plan.paymentProviderRefs` empty and never rewrites it, since dms-saas links every billed plan to Stripe itself. See [Plans and Stripe](https://dms.antelopejs.com/docs/modules/saas/stripe#plans-and-stripe).
43
+ A module may seed plans straight into the `db` plan table. It writes `name`, `description` and `borderLabel` with one value per locale through `localize("*")`. It leaves `Plan.paymentProviderRefs` empty and never rewrites it, because `@antelopejs/dms-saas` links every billed plan to Stripe itself. See [Plans and their Stripe products](https://dms.antelopejs.com/docs/modules/saas/stripe#plans-and-their-stripe-products).
48
44
 
49
45
  ## Compatibility
50
46
 
51
- The implementation is `@antelopejs/dms-saas >=0.6.0`. The interface declares these dependencies:
47
+ `@antelopejs/dms-saas` implements this interface. The compatibility block of its [README](../dms-saas/README.md#compatibility) lists the interface range each module release supports. The interface declares these dependencies:
52
48
 
53
- <!-- docs-compat: ./package.json#dependencies -->
49
+ <!-- antelopejs-docs-compat:start -->
54
50
 
55
- | Package | Range |
56
- | --- | --- |
57
- | `@antelopejs/interface-data-api` | `>=0.2.2 <1.0.0` |
58
- | `@antelopejs/interface-dms` | `>=0.7.4 <1.0.0` |
51
+ | Package | Supported | Tested with |
52
+ | ------------------------------------------- | ----------------- | ----------- |
53
+ | `@antelopejs/interface-core` | `>=0.2.4 <1.0.0` | `0.4.0` |
54
+ | `@antelopejs/interface-data-api` | `>=0.6.1 <1.0.0` | `0.6.1` |
55
+ | `@antelopejs/interface-database` | `>=0.1.11 <1.0.0` | `0.3.0` |
56
+ | `@antelopejs/interface-database-decorators` | `>=0.1.10 <1.0.0` | `0.2.0` |
57
+ | `@antelopejs/interface-dms` | `>=0.12.0 <1.0.0` | `0.12.0` |
59
58
 
60
- Peer dependencies:
59
+ <!-- antelopejs-docs-compat:end -->
61
60
 
62
- <!-- docs-compat: ./package.json#peerDependencies -->
61
+ `@antelopejs/interface-core`, `@antelopejs/interface-database` and `@antelopejs/interface-database-decorators` are peer dependencies. `@antelopejs/interface-data-api` and `@antelopejs/interface-dms` are regular dependencies.
63
62
 
64
- | Package | Range |
65
- | --- | --- |
66
- | `@antelopejs/interface-core` | `>=0.2.4 <1.0.0` |
67
- | `@antelopejs/interface-database` | `>=0.1.10 <1.0.0` |
68
- | `@antelopejs/interface-database-decorators` | `>=0.1.9 <1.0.0` |
69
-
70
- Subpaths resolve through the `exports` map only: compile consumers with `moduleResolution` set to `bundler`, `node16` or `nodenext`. Upgrade this package together with `@antelopejs/dms-saas`; the [upgrade notes](https://dms.antelopejs.com/docs/modules/saas/faq#upgrading) cover the tenant billing page anchors and the rows written by earlier builds.
63
+ Subpaths resolve through the `exports` map only, so compile consumers with `moduleResolution` set to `bundler`, `node16` or `nodenext`. Upgrade this package together with `@antelopejs/dms-saas`. The [upgrade notes](https://dms.antelopejs.com/docs/modules/saas/faq#upgrading) cover the tenant billing page anchors and the rows written by earlier builds.
71
64
 
72
65
  ## Documentation
73
66
 
74
- - [Consumer reference](./docs/1.index.md): billing, usage, lifecycle, pages, plans and database boundaries
75
- - [Extending the SaaS module](https://dms.antelopejs.com/docs/modules/saas/extending): every extension point with examples
76
- - [Stripe](https://dms.antelopejs.com/docs/modules/saas/stripe)
77
- - [SaaS module guide](https://dms.antelopejs.com/docs/modules/saas)
67
+ - The [consumer reference](./docs/1.index.md) covers billing, usage, lifecycle, pages, plans and the database boundary.
68
+ - [Extending the SaaS module](https://dms.antelopejs.com/docs/modules/saas/extending) shows every extension point with examples.
69
+ - [Stripe](https://dms.antelopejs.com/docs/modules/saas/stripe) explains how the module drives Stripe.
70
+ - The [SaaS module guide](https://dms.antelopejs.com/docs/modules/saas) covers installation and configuration.
78
71
 
79
72
  ## Contributing
80
73
 
@@ -4,18 +4,20 @@ declare const BillingSettingsModel_base: {
4
4
  readonly table: import("@antelopejs/interface-database").Table<BillingSettings>;
5
5
  readonly database: import("@antelopejs/interface-database").SchemaInstance<any>;
6
6
  get(id: string): PromiseLike<BillingSettings | undefined>;
7
- getBy(index: keyof BillingSettings, ...keys: any[]): PromiseLike<BillingSettings[]>;
7
+ getBy(index: keyof BillingSettings, ...keys: import("@antelopejs/interface-database-decorators").IndexKey[]): PromiseLike<BillingSettings[]>;
8
8
  getAll(): PromiseLike<BillingSettings[]>;
9
9
  insert(obj: import("@antelopejs/interface-database-decorators").DeepPartial<BillingSettings> | import("@antelopejs/interface-database-decorators").DeepPartial<BillingSettings>[], options?: import("@antelopejs/interface-database-decorators").ValidateOptions): Promise<string[]>;
10
10
  update(id: string, obj: import("@antelopejs/interface-database-decorators").DeepPartial<BillingSettings>, options?: import("@antelopejs/interface-database-decorators").ValidateOptions): Promise<number>;
11
- update(obj: import("@antelopejs/interface-database-decorators").DeepPartial<BillingSettings>, options?: import("@antelopejs/interface-database-decorators").ValidateOptions): Promise<number>;
11
+ update(obj: import("@antelopejs/interface-database-decorators").DeepPartial<BillingSettings> & {
12
+ _id: string;
13
+ }, options?: import("@antelopejs/interface-database-decorators").ValidateOptions): Promise<number>;
12
14
  delete(id: string): Promise<number>;
13
15
  };
14
- readonly schemaName: string;
16
+ readonly schemaName: string | undefined;
15
17
  readonly tableClass: import("@antelopejs/interface-database-decorators").Constructible<BillingSettings>;
16
- fromPlainData(obj: any): BillingSettings;
18
+ fromPlainData(obj: BillingSettings | import("@antelopejs/interface-database-decorators").PlainData<BillingSettings>): BillingSettings;
17
19
  fromDatabase(obj: any): BillingSettings | undefined;
18
- toDatabase(obj: any): Record<string, any>;
20
+ toDatabase(obj: BillingSettings | import("@antelopejs/interface-database-decorators").PlainData<BillingSettings>): import("@antelopejs/interface-database-decorators").StoredRow<BillingSettings>;
19
21
  validate(obj: unknown, options?: import("@antelopejs/interface-database-decorators").ValidateInputOptions): import("@antelopejs/interface-database-decorators").ValidationResult;
20
22
  };
21
23
  export declare class BillingSettingsModel extends BillingSettingsModel_base {
@@ -5,18 +5,20 @@ declare const CreditNoteModel_base: {
5
5
  readonly table: import("@antelopejs/interface-database").Table<CreditNote>;
6
6
  readonly database: import("@antelopejs/interface-database").SchemaInstance<any>;
7
7
  get(id: string): PromiseLike<CreditNote | undefined>;
8
- getBy(index: keyof CreditNote, ...keys: any[]): PromiseLike<CreditNote[]>;
8
+ getBy(index: keyof CreditNote, ...keys: import("@antelopejs/interface-database-decorators").IndexKey[]): PromiseLike<CreditNote[]>;
9
9
  getAll(): PromiseLike<CreditNote[]>;
10
10
  insert(obj: import("@antelopejs/interface-database-decorators").DeepPartial<CreditNote> | import("@antelopejs/interface-database-decorators").DeepPartial<CreditNote>[], options?: import("@antelopejs/interface-database-decorators").ValidateOptions): Promise<string[]>;
11
11
  update(id: string, obj: import("@antelopejs/interface-database-decorators").DeepPartial<CreditNote>, options?: import("@antelopejs/interface-database-decorators").ValidateOptions): Promise<number>;
12
- update(obj: import("@antelopejs/interface-database-decorators").DeepPartial<CreditNote>, options?: import("@antelopejs/interface-database-decorators").ValidateOptions): Promise<number>;
12
+ update(obj: import("@antelopejs/interface-database-decorators").DeepPartial<CreditNote> & {
13
+ _id: string;
14
+ }, options?: import("@antelopejs/interface-database-decorators").ValidateOptions): Promise<number>;
13
15
  delete(id: string): Promise<number>;
14
16
  };
15
- readonly schemaName: string;
17
+ readonly schemaName: string | undefined;
16
18
  readonly tableClass: import("@antelopejs/interface-database-decorators").Constructible<CreditNote>;
17
- fromPlainData(obj: any): CreditNote;
19
+ fromPlainData(obj: CreditNote | import("@antelopejs/interface-database-decorators").PlainData<CreditNote>): CreditNote;
18
20
  fromDatabase(obj: any): CreditNote | undefined;
19
- toDatabase(obj: any): Record<string, any>;
21
+ toDatabase(obj: CreditNote | import("@antelopejs/interface-database-decorators").PlainData<CreditNote>): import("@antelopejs/interface-database-decorators").StoredRow<CreditNote>;
20
22
  validate(obj: unknown, options?: import("@antelopejs/interface-database-decorators").ValidateInputOptions): import("@antelopejs/interface-database-decorators").ValidationResult;
21
23
  };
22
24
  export declare class CreditNoteModel extends CreditNoteModel_base {
@@ -4,18 +4,20 @@ declare const FeatureModel_base: {
4
4
  readonly table: import("@antelopejs/interface-database").Table<Feature>;
5
5
  readonly database: import("@antelopejs/interface-database").SchemaInstance<any>;
6
6
  get(id: string): PromiseLike<Feature | undefined>;
7
- getBy(index: keyof Feature, ...keys: any[]): PromiseLike<Feature[]>;
7
+ getBy(index: "_id" | "description" | "valueType" | "defaultValue" | "createdAt" | "updatedAt" | "order" | "displayName" | "tooltip" | "unit" | "isDetailRow" | "localize", ...keys: import("@antelopejs/interface-database-decorators").IndexKey[]): PromiseLike<Feature[]>;
8
8
  getAll(): PromiseLike<Feature[]>;
9
9
  insert(obj: import("@antelopejs/interface-database-decorators").DeepPartial<Feature> | import("@antelopejs/interface-database-decorators").DeepPartial<Feature>[], options?: import("@antelopejs/interface-database-decorators").ValidateOptions): Promise<string[]>;
10
10
  update(id: string, obj: import("@antelopejs/interface-database-decorators").DeepPartial<Feature>, options?: import("@antelopejs/interface-database-decorators").ValidateOptions): Promise<number>;
11
- update(obj: import("@antelopejs/interface-database-decorators").DeepPartial<Feature>, options?: import("@antelopejs/interface-database-decorators").ValidateOptions): Promise<number>;
11
+ update(obj: import("@antelopejs/interface-database-decorators").DeepPartial<Feature> & {
12
+ _id: string;
13
+ }, options?: import("@antelopejs/interface-database-decorators").ValidateOptions): Promise<number>;
12
14
  delete(id: string): Promise<number>;
13
15
  };
14
- readonly schemaName: string;
16
+ readonly schemaName: string | undefined;
15
17
  readonly tableClass: import("@antelopejs/interface-database-decorators").Constructible<Feature>;
16
- fromPlainData(obj: any): Feature;
18
+ fromPlainData(obj: Feature | import("@antelopejs/interface-database-decorators").PlainData<Feature>): Feature;
17
19
  fromDatabase(obj: any): Feature | undefined;
18
- toDatabase(obj: any): Record<string, any>;
20
+ toDatabase(obj: Feature | import("@antelopejs/interface-database-decorators").PlainData<Feature>): import("@antelopejs/interface-database-decorators").StoredRow<Feature>;
19
21
  validate(obj: unknown, options?: import("@antelopejs/interface-database-decorators").ValidateInputOptions): import("@antelopejs/interface-database-decorators").ValidationResult;
20
22
  };
21
23
  export declare class FeatureModel extends FeatureModel_base {
@@ -5,18 +5,20 @@ declare const InvoiceModel_base: {
5
5
  readonly table: import("@antelopejs/interface-database").Table<Invoice>;
6
6
  readonly database: import("@antelopejs/interface-database").SchemaInstance<any>;
7
7
  get(id: string): PromiseLike<Invoice | undefined>;
8
- getBy(index: keyof Invoice, ...keys: any[]): PromiseLike<Invoice[]>;
8
+ getBy(index: keyof Invoice, ...keys: import("@antelopejs/interface-database-decorators").IndexKey[]): PromiseLike<Invoice[]>;
9
9
  getAll(): PromiseLike<Invoice[]>;
10
10
  insert(obj: import("@antelopejs/interface-database-decorators").DeepPartial<Invoice> | import("@antelopejs/interface-database-decorators").DeepPartial<Invoice>[], options?: import("@antelopejs/interface-database-decorators").ValidateOptions): Promise<string[]>;
11
11
  update(id: string, obj: import("@antelopejs/interface-database-decorators").DeepPartial<Invoice>, options?: import("@antelopejs/interface-database-decorators").ValidateOptions): Promise<number>;
12
- update(obj: import("@antelopejs/interface-database-decorators").DeepPartial<Invoice>, options?: import("@antelopejs/interface-database-decorators").ValidateOptions): Promise<number>;
12
+ update(obj: import("@antelopejs/interface-database-decorators").DeepPartial<Invoice> & {
13
+ _id: string;
14
+ }, options?: import("@antelopejs/interface-database-decorators").ValidateOptions): Promise<number>;
13
15
  delete(id: string): Promise<number>;
14
16
  };
15
- readonly schemaName: string;
17
+ readonly schemaName: string | undefined;
16
18
  readonly tableClass: import("@antelopejs/interface-database-decorators").Constructible<Invoice>;
17
- fromPlainData(obj: any): Invoice;
19
+ fromPlainData(obj: Invoice | import("@antelopejs/interface-database-decorators").PlainData<Invoice>): Invoice;
18
20
  fromDatabase(obj: any): Invoice | undefined;
19
- toDatabase(obj: any): Record<string, any>;
21
+ toDatabase(obj: Invoice | import("@antelopejs/interface-database-decorators").PlainData<Invoice>): import("@antelopejs/interface-database-decorators").StoredRow<Invoice>;
20
22
  validate(obj: unknown, options?: import("@antelopejs/interface-database-decorators").ValidateInputOptions): import("@antelopejs/interface-database-decorators").ValidationResult;
21
23
  };
22
24
  export declare class InvoiceModel extends InvoiceModel_base {
@@ -4,18 +4,20 @@ declare const LegalDocumentsModel_base: {
4
4
  readonly table: import("@antelopejs/interface-database").Table<LegalDocuments>;
5
5
  readonly database: import("@antelopejs/interface-database").SchemaInstance<any>;
6
6
  get(id: string): PromiseLike<LegalDocuments | undefined>;
7
- getBy(index: keyof LegalDocuments, ...keys: any[]): PromiseLike<LegalDocuments[]>;
7
+ getBy(index: keyof LegalDocuments, ...keys: import("@antelopejs/interface-database-decorators").IndexKey[]): PromiseLike<LegalDocuments[]>;
8
8
  getAll(): PromiseLike<LegalDocuments[]>;
9
9
  insert(obj: import("@antelopejs/interface-database-decorators").DeepPartial<LegalDocuments> | import("@antelopejs/interface-database-decorators").DeepPartial<LegalDocuments>[], options?: import("@antelopejs/interface-database-decorators").ValidateOptions): Promise<string[]>;
10
10
  update(id: string, obj: import("@antelopejs/interface-database-decorators").DeepPartial<LegalDocuments>, options?: import("@antelopejs/interface-database-decorators").ValidateOptions): Promise<number>;
11
- update(obj: import("@antelopejs/interface-database-decorators").DeepPartial<LegalDocuments>, options?: import("@antelopejs/interface-database-decorators").ValidateOptions): Promise<number>;
11
+ update(obj: import("@antelopejs/interface-database-decorators").DeepPartial<LegalDocuments> & {
12
+ _id: string;
13
+ }, options?: import("@antelopejs/interface-database-decorators").ValidateOptions): Promise<number>;
12
14
  delete(id: string): Promise<number>;
13
15
  };
14
- readonly schemaName: string;
16
+ readonly schemaName: string | undefined;
15
17
  readonly tableClass: import("@antelopejs/interface-database-decorators").Constructible<LegalDocuments>;
16
- fromPlainData(obj: any): LegalDocuments;
18
+ fromPlainData(obj: LegalDocuments | import("@antelopejs/interface-database-decorators").PlainData<LegalDocuments>): LegalDocuments;
17
19
  fromDatabase(obj: any): LegalDocuments | undefined;
18
- toDatabase(obj: any): Record<string, any>;
20
+ toDatabase(obj: LegalDocuments | import("@antelopejs/interface-database-decorators").PlainData<LegalDocuments>): import("@antelopejs/interface-database-decorators").StoredRow<LegalDocuments>;
19
21
  validate(obj: unknown, options?: import("@antelopejs/interface-database-decorators").ValidateInputOptions): import("@antelopejs/interface-database-decorators").ValidationResult;
20
22
  };
21
23
  export declare class LegalDocumentsModel extends LegalDocumentsModel_base {
@@ -5,18 +5,20 @@ declare const PlanMigrationModel_base: {
5
5
  readonly table: import("@antelopejs/interface-database").Table<PlanMigration>;
6
6
  readonly database: import("@antelopejs/interface-database").SchemaInstance<any>;
7
7
  get(id: string): PromiseLike<PlanMigration | undefined>;
8
- getBy(index: keyof PlanMigration, ...keys: any[]): PromiseLike<PlanMigration[]>;
8
+ getBy(index: keyof PlanMigration, ...keys: import("@antelopejs/interface-database-decorators").IndexKey[]): PromiseLike<PlanMigration[]>;
9
9
  getAll(): PromiseLike<PlanMigration[]>;
10
10
  insert(obj: DeepPartial<PlanMigration> | DeepPartial<PlanMigration>[], options?: ValidateOptions): Promise<string[]>;
11
11
  update(id: string, obj: DeepPartial<PlanMigration>, options?: ValidateOptions): Promise<number>;
12
- update(obj: DeepPartial<PlanMigration>, options?: ValidateOptions): Promise<number>;
12
+ update(obj: DeepPartial<PlanMigration> & {
13
+ _id: string;
14
+ }, options?: ValidateOptions): Promise<number>;
13
15
  delete(id: string): Promise<number>;
14
16
  };
15
- readonly schemaName: string;
17
+ readonly schemaName: string | undefined;
16
18
  readonly tableClass: import("@antelopejs/interface-database-decorators").Constructible<PlanMigration>;
17
- fromPlainData(obj: any): PlanMigration;
19
+ fromPlainData(obj: PlanMigration | import("@antelopejs/interface-database-decorators").PlainData<PlanMigration>): PlanMigration;
18
20
  fromDatabase(obj: any): PlanMigration | undefined;
19
- toDatabase(obj: any): Record<string, any>;
21
+ toDatabase(obj: PlanMigration | import("@antelopejs/interface-database-decorators").PlainData<PlanMigration>): import("@antelopejs/interface-database-decorators").StoredRow<PlanMigration>;
20
22
  validate(obj: unknown, options?: import("@antelopejs/interface-database-decorators").ValidateInputOptions): import("@antelopejs/interface-database-decorators").ValidationResult;
21
23
  };
22
24
  export declare class PlanMigrationModel extends PlanMigrationModel_base {
@@ -1,3 +1,4 @@
1
+ import { type IndexKey } from "@antelopejs/interface-database-decorators";
1
2
  import { Plan, type PlanFeatureValue } from "../tables/plans.table";
2
3
  export interface ResolvedPlanInheritance {
3
4
  permissions: string[];
@@ -8,23 +9,25 @@ declare const PlanModel_base: {
8
9
  readonly table: import("@antelopejs/interface-database").Table<Plan>;
9
10
  readonly database: import("@antelopejs/interface-database").SchemaInstance<any>;
10
11
  get(id: string): PromiseLike<Plan | undefined>;
11
- getBy(index: keyof Plan, ...keys: any[]): PromiseLike<Plan[]>;
12
+ getBy(index: "_id" | "description" | "createdAt" | "updatedAt" | "name" | "permissions" | "currency" | "features" | "order" | "slug" | "audience" | "price" | "interval" | "billingMode" | "inheritsFromPlanId" | "trialDays" | "maxMembers" | "isPublic" | "paymentProviderRefs" | "borderColor" | "borderLabel" | "isActive" | "isDeleted" | "localize", ...keys: IndexKey[]): PromiseLike<Plan[]>;
12
13
  getAll(): PromiseLike<Plan[]>;
13
14
  insert(obj: import("@antelopejs/interface-database-decorators").DeepPartial<Plan> | import("@antelopejs/interface-database-decorators").DeepPartial<Plan>[], options?: import("@antelopejs/interface-database-decorators").ValidateOptions): Promise<string[]>;
14
15
  update(id: string, obj: import("@antelopejs/interface-database-decorators").DeepPartial<Plan>, options?: import("@antelopejs/interface-database-decorators").ValidateOptions): Promise<number>;
15
- update(obj: import("@antelopejs/interface-database-decorators").DeepPartial<Plan>, options?: import("@antelopejs/interface-database-decorators").ValidateOptions): Promise<number>;
16
+ update(obj: import("@antelopejs/interface-database-decorators").DeepPartial<Plan> & {
17
+ _id: string;
18
+ }, options?: import("@antelopejs/interface-database-decorators").ValidateOptions): Promise<number>;
16
19
  delete(id: string): Promise<number>;
17
20
  };
18
- readonly schemaName: string;
21
+ readonly schemaName: string | undefined;
19
22
  readonly tableClass: import("@antelopejs/interface-database-decorators").Constructible<Plan>;
20
- fromPlainData(obj: any): Plan;
23
+ fromPlainData(obj: Plan | import("@antelopejs/interface-database-decorators").PlainData<Plan>): Plan;
21
24
  fromDatabase(obj: any): Plan | undefined;
22
- toDatabase(obj: any): Record<string, any>;
25
+ toDatabase(obj: Plan | import("@antelopejs/interface-database-decorators").PlainData<Plan>): import("@antelopejs/interface-database-decorators").StoredRow<Plan>;
23
26
  validate(obj: unknown, options?: import("@antelopejs/interface-database-decorators").ValidateInputOptions): import("@antelopejs/interface-database-decorators").ValidationResult;
24
27
  };
25
28
  export declare class PlanModel extends PlanModel_base {
26
29
  get(id: string): Promise<Plan | undefined>;
27
- getBy(index: keyof Plan, ...keys: unknown[]): Promise<Plan[]>;
30
+ getBy(index: Extract<keyof Plan, string>, ...keys: IndexKey[]): Promise<Plan[]>;
28
31
  getAll(): Promise<Plan[]>;
29
32
  findNotDeleted(): Promise<Plan[]>;
30
33
  findActiveNotDeleted(): Promise<Plan[]>;
@@ -1 +1 @@
1
-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E,EAAE,CAAC,CAAC;gBAC5D,SAAS;gBACT,KAAK;aACN,CAAC,CAAC;SACJ,CAAC;IACJ,CAAC;CACF;AAjFD,8BAiFC"}
@@ -14,18 +14,20 @@ declare const PlatformNoteModel_base: {
14
14
  readonly table: import("@antelopejs/interface-database").Table<PlatformNote>;
15
15
  readonly database: import("@antelopejs/interface-database").SchemaInstance<any>;
16
16
  get(id: string): PromiseLike<PlatformNote | undefined>;
17
- getBy(index: keyof PlatformNote, ...keys: any[]): PromiseLike<PlatformNote[]>;
17
+ getBy(index: keyof PlatformNote, ...keys: import("@antelopejs/interface-database-decorators").IndexKey[]): PromiseLike<PlatformNote[]>;
18
18
  getAll(): PromiseLike<PlatformNote[]>;
19
19
  insert(obj: import("@antelopejs/interface-database-decorators").DeepPartial<PlatformNote> | import("@antelopejs/interface-database-decorators").DeepPartial<PlatformNote>[], options?: import("@antelopejs/interface-database-decorators").ValidateOptions): Promise<string[]>;
20
20
  update(id: string, obj: import("@antelopejs/interface-database-decorators").DeepPartial<PlatformNote>, options?: import("@antelopejs/interface-database-decorators").ValidateOptions): Promise<number>;
21
- update(obj: import("@antelopejs/interface-database-decorators").DeepPartial<PlatformNote>, options?: import("@antelopejs/interface-database-decorators").ValidateOptions): Promise<number>;
21
+ update(obj: import("@antelopejs/interface-database-decorators").DeepPartial<PlatformNote> & {
22
+ _id: string;
23
+ }, options?: import("@antelopejs/interface-database-decorators").ValidateOptions): Promise<number>;
22
24
  delete(id: string): Promise<number>;
23
25
  };
24
- readonly schemaName: string;
26
+ readonly schemaName: string | undefined;
25
27
  readonly tableClass: import("@antelopejs/interface-database-decorators").Constructible<PlatformNote>;
26
- fromPlainData(obj: any): PlatformNote;
28
+ fromPlainData(obj: PlatformNote | import("@antelopejs/interface-database-decorators").PlainData<PlatformNote>): PlatformNote;
27
29
  fromDatabase(obj: any): PlatformNote | undefined;
28
- toDatabase(obj: any): Record<string, any>;
30
+ toDatabase(obj: PlatformNote | import("@antelopejs/interface-database-decorators").PlainData<PlatformNote>): import("@antelopejs/interface-database-decorators").StoredRow<PlatformNote>;
29
31
  validate(obj: unknown, options?: import("@antelopejs/interface-database-decorators").ValidateInputOptions): import("@antelopejs/interface-database-decorators").ValidationResult;
30
32
  };
31
33
  export declare class PlatformNoteModel extends PlatformNoteModel_base {
@@ -4,18 +4,20 @@ declare const RefundModel_base: {
4
4
  readonly table: import("@antelopejs/interface-database").Table<Refund>;
5
5
  readonly database: import("@antelopejs/interface-database").SchemaInstance<any>;
6
6
  get(id: string): PromiseLike<Refund | undefined>;
7
- getBy(index: keyof Refund, ...keys: any[]): PromiseLike<Refund[]>;
7
+ getBy(index: keyof Refund, ...keys: import("@antelopejs/interface-database-decorators").IndexKey[]): PromiseLike<Refund[]>;
8
8
  getAll(): PromiseLike<Refund[]>;
9
9
  insert(obj: import("@antelopejs/interface-database-decorators").DeepPartial<Refund> | import("@antelopejs/interface-database-decorators").DeepPartial<Refund>[], options?: import("@antelopejs/interface-database-decorators").ValidateOptions): Promise<string[]>;
10
10
  update(id: string, obj: import("@antelopejs/interface-database-decorators").DeepPartial<Refund>, options?: import("@antelopejs/interface-database-decorators").ValidateOptions): Promise<number>;
11
- update(obj: import("@antelopejs/interface-database-decorators").DeepPartial<Refund>, options?: import("@antelopejs/interface-database-decorators").ValidateOptions): Promise<number>;
11
+ update(obj: import("@antelopejs/interface-database-decorators").DeepPartial<Refund> & {
12
+ _id: string;
13
+ }, options?: import("@antelopejs/interface-database-decorators").ValidateOptions): Promise<number>;
12
14
  delete(id: string): Promise<number>;
13
15
  };
14
- readonly schemaName: string;
16
+ readonly schemaName: string | undefined;
15
17
  readonly tableClass: import("@antelopejs/interface-database-decorators").Constructible<Refund>;
16
- fromPlainData(obj: any): Refund;
18
+ fromPlainData(obj: Refund | import("@antelopejs/interface-database-decorators").PlainData<Refund>): Refund;
17
19
  fromDatabase(obj: any): Refund | undefined;
18
- toDatabase(obj: any): Record<string, any>;
20
+ toDatabase(obj: Refund | import("@antelopejs/interface-database-decorators").PlainData<Refund>): import("@antelopejs/interface-database-decorators").StoredRow<Refund>;
19
21
  validate(obj: unknown, options?: import("@antelopejs/interface-database-decorators").ValidateInputOptions): import("@antelopejs/interface-database-decorators").ValidationResult;
20
22
  };
21
23
  export declare class RefundModel extends RefundModel_base {
@@ -10,18 +10,20 @@ declare const SegmentModel_base: {
10
10
  readonly table: import("@antelopejs/interface-database").Table<Segment>;
11
11
  readonly database: import("@antelopejs/interface-database").SchemaInstance<any>;
12
12
  get(id: string): PromiseLike<Segment | undefined>;
13
- getBy(index: keyof Segment, ...keys: any[]): PromiseLike<Segment[]>;
13
+ getBy(index: keyof Segment, ...keys: import("@antelopejs/interface-database-decorators").IndexKey[]): PromiseLike<Segment[]>;
14
14
  getAll(): PromiseLike<Segment[]>;
15
15
  insert(obj: DeepPartial<Segment> | DeepPartial<Segment>[], options?: ValidateOptions): Promise<string[]>;
16
16
  update(id: string, obj: DeepPartial<Segment>, options?: ValidateOptions): Promise<number>;
17
- update(obj: DeepPartial<Segment>, options?: ValidateOptions): Promise<number>;
17
+ update(obj: DeepPartial<Segment> & {
18
+ _id: string;
19
+ }, options?: ValidateOptions): Promise<number>;
18
20
  delete(id: string): Promise<number>;
19
21
  };
20
- readonly schemaName: string;
22
+ readonly schemaName: string | undefined;
21
23
  readonly tableClass: import("@antelopejs/interface-database-decorators").Constructible<Segment>;
22
- fromPlainData(obj: any): Segment;
24
+ fromPlainData(obj: Segment | import("@antelopejs/interface-database-decorators").PlainData<Segment>): Segment;
23
25
  fromDatabase(obj: any): Segment | undefined;
24
- toDatabase(obj: any): Record<string, any>;
26
+ toDatabase(obj: Segment | import("@antelopejs/interface-database-decorators").PlainData<Segment>): import("@antelopejs/interface-database-decorators").StoredRow<Segment>;
25
27
  validate(obj: unknown, options?: import("@antelopejs/interface-database-decorators").ValidateInputOptions): import("@antelopejs/interface-database-decorators").ValidationResult;
26
28
  };
27
29
  export declare class SegmentModel extends SegmentModel_base {
@@ -15,15 +15,13 @@ function appendSegmentCountPoint(history, count, evaluatedAt) {
15
15
  .slice(-exports.SEGMENT_COUNT_HISTORY_DAYS);
16
16
  }
17
17
  class SegmentModel extends (0, interface_database_decorators_1.BasicDataModel)(segments_table_1.Segment, segments_table_1.segmentsTableName) {
18
- async update(idOrPatch, patchOrOptions, options) {
19
- const id = typeof idOrPatch === "string" ? idOrPatch : idOrPatch._id;
18
+ async update(...args) {
19
+ const [id, patch, options] = isKeyedUpdate(args)
20
+ ? args
21
+ : [args[0]._id, args[0], args[1]];
20
22
  if (!id)
21
23
  throw new Error("Segment identity is required");
22
- return this.updateRevision(id, typeof idOrPatch === "string"
23
- ? patchOrOptions
24
- : idOrPatch, typeof idOrPatch === "string"
25
- ? options
26
- : patchOrOptions);
24
+ return this.updateRevision(id, patch, options);
27
25
  }
28
26
  async updateRevision(id, patch, options) {
29
27
  if (options?.validate &&
@@ -72,11 +70,14 @@ class SegmentModel extends (0, interface_database_decorators_1.BasicDataModel)(s
72
70
  async getMany(ids) {
73
71
  if (ids.length === 0)
74
72
  return [];
75
- const rows = await this.table.getAll(ids).run();
73
+ const rows = await this.table.getAll([...ids]).run();
76
74
  return rows
77
75
  .map((row) => SegmentModel.fromDatabase(row))
78
76
  .filter((s) => s !== undefined);
79
77
  }
80
78
  }
81
79
  exports.SegmentModel = SegmentModel;
80
+ function isKeyedUpdate(args) {
81
+ return typeof args[0] === "string";
82
+ }
82
83
  //# sourceMappingURL=segments.model.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"segments.model.js","sourceRoot":"","sources":["../../../src/db/models/segments.model.ts"],"names":[],"mappings":";;;AA6BA,0DAUC;AAvCD,6CAAyC;AACzC,6FAKmD;AACnD,6DAIkC;AAGrB,QAAA,0BAA0B,GAAG,EAAE,CAAC;AAE7C,MAAM,cAAc,GAAG,EAAE,CAAC;AAa1B,SAAgB,uBAAuB,CACrC,OAAqC,EACrC,KAAa,EACb,WAAiB;IAEjB,MAAM,GAAG,GAAG,WAAW,CAAC,WAAW,E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K,SAAS;YACvB,MAAM,IAAI,KAAK,CAAC,wCAAwC,CAAC,CAAC;QAC5D,OAAO,OAAO,KAAK,SAAS,CAAC;IAC/B,CAAC;IAED,KAAK,CAAC,OAAO,CAAC,GAAsB;QAClC,IAAI,GAAG,CAAC,MAAM,KAAK,CAAC;YAAE,OAAO,EAAE,CAAC;QAChC,MAAM,IAAI,GAAG,MAAM,IAAI,CAAC,KAAK,CAAC,MAAM,CAAC,CAAC,GAAG,GAAG,CAAC,CAAC,CAAC,GAAG,EAAE,CAAC;QACrD,OAAO,IAAI;aACR,GAAG,CAAC,CAAC,GAAG,EAAE,EAAE,CAAC,YAAY,CAAC,YAAY,CAAC,GAAG,CAAC,CAAC;aAC5C,MAAM,CAAC,CAAC,CAAC,EAAgB,EAAE,CAAC,CAAC,KAAK,SAAS,CAAC,CAAC;IAClD,CAAC;CACF;AA7FD,oCA6FC;AAED,SAAS,aAAa,CACpB,IAA4B;IAE5B,OAAO,OAAO,IAAI,CAAC,CAAC,CAAC,KAAK,QAAQ,CAAC;AACrC,CAAC"}
@@ -5,18 +5,20 @@ declare const StripeWebhookEventModel_base: {
5
5
  readonly table: import("@antelopejs/interface-database").Table<StripeWebhookEvent>;
6
6
  readonly database: import("@antelopejs/interface-database").SchemaInstance<any>;
7
7
  get(id: string): PromiseLike<StripeWebhookEvent | undefined>;
8
- getBy(index: keyof StripeWebhookEvent, ...keys: any[]): PromiseLike<StripeWebhookEvent[]>;
8
+ getBy(index: keyof StripeWebhookEvent, ...keys: import("@antelopejs/interface-database-decorators").IndexKey[]): PromiseLike<StripeWebhookEvent[]>;
9
9
  getAll(): PromiseLike<StripeWebhookEvent[]>;
10
10
  insert(obj: import("@antelopejs/interface-database-decorators").DeepPartial<StripeWebhookEvent> | import("@antelopejs/interface-database-decorators").DeepPartial<StripeWebhookEvent>[], options?: import("@antelopejs/interface-database-decorators").ValidateOptions): Promise<string[]>;
11
11
  update(id: string, obj: import("@antelopejs/interface-database-decorators").DeepPartial<StripeWebhookEvent>, options?: import("@antelopejs/interface-database-decorators").ValidateOptions): Promise<number>;
12
- update(obj: import("@antelopejs/interface-database-decorators").DeepPartial<StripeWebhookEvent>, options?: import("@antelopejs/interface-database-decorators").ValidateOptions): Promise<number>;
12
+ update(obj: import("@antelopejs/interface-database-decorators").DeepPartial<StripeWebhookEvent> & {
13
+ _id: string;
14
+ }, options?: import("@antelopejs/interface-database-decorators").ValidateOptions): Promise<number>;
13
15
  delete(id: string): Promise<number>;
14
16
  };
15
- readonly schemaName: string;
17
+ readonly schemaName: string | undefined;
16
18
  readonly tableClass: import("@antelopejs/interface-database-decorators").Constructible<StripeWebhookEvent>;
17
- fromPlainData(obj: any): StripeWebhookEvent;
19
+ fromPlainData(obj: StripeWebhookEvent | import("@antelopejs/interface-database-decorators").PlainData<StripeWebhookEvent>): StripeWebhookEvent;
18
20
  fromDatabase(obj: any): StripeWebhookEvent | undefined;
19
- toDatabase(obj: any): Record<string, any>;
21
+ toDatabase(obj: StripeWebhookEvent | import("@antelopejs/interface-database-decorators").PlainData<StripeWebhookEvent>): import("@antelopejs/interface-database-decorators").StoredRow<StripeWebhookEvent>;
20
22
  validate(obj: unknown, options?: import("@antelopejs/interface-database-decorators").ValidateInputOptions): import("@antelopejs/interface-database-decorators").ValidationResult;
21
23
  };
22
24
  export declare class StripeWebhookEventModel extends StripeWebhookEventModel_base {
@@ -4,18 +4,20 @@ declare const TenantBillingInfoModel_base: {
4
4
  readonly table: import("@antelopejs/interface-database").Table<TenantBillingInfo>;
5
5
  readonly database: import("@antelopejs/interface-database").SchemaInstance<any>;
6
6
  get(id: string): PromiseLike<TenantBillingInfo | undefined>;
7
- getBy(index: keyof TenantBillingInfo, ...keys: any[]): PromiseLike<TenantBillingInfo[]>;
7
+ getBy(index: keyof TenantBillingInfo, ...keys: import("@antelopejs/interface-database-decorators").IndexKey[]): PromiseLike<TenantBillingInfo[]>;
8
8
  getAll(): PromiseLike<TenantBillingInfo[]>;
9
9
  insert(obj: import("@antelopejs/interface-database-decorators").DeepPartial<TenantBillingInfo> | import("@antelopejs/interface-database-decorators").DeepPartial<TenantBillingInfo>[], options?: import("@antelopejs/interface-database-decorators").ValidateOptions): Promise<string[]>;
10
10
  update(id: string, obj: import("@antelopejs/interface-database-decorators").DeepPartial<TenantBillingInfo>, options?: import("@antelopejs/interface-database-decorators").ValidateOptions): Promise<number>;
11
- update(obj: import("@antelopejs/interface-database-decorators").DeepPartial<TenantBillingInfo>, options?: import("@antelopejs/interface-database-decorators").ValidateOptions): Promise<number>;
11
+ update(obj: import("@antelopejs/interface-database-decorators").DeepPartial<TenantBillingInfo> & {
12
+ _id: string;
13
+ }, options?: import("@antelopejs/interface-database-decorators").ValidateOptions): Promise<number>;
12
14
  delete(id: string): Promise<number>;
13
15
  };
14
- readonly schemaName: string;
16
+ readonly schemaName: string | undefined;
15
17
  readonly tableClass: import("@antelopejs/interface-database-decorators").Constructible<TenantBillingInfo>;
16
- fromPlainData(obj: any): TenantBillingInfo;
18
+ fromPlainData(obj: TenantBillingInfo | import("@antelopejs/interface-database-decorators").PlainData<TenantBillingInfo>): TenantBillingInfo;
17
19
  fromDatabase(obj: any): TenantBillingInfo | undefined;
18
- toDatabase(obj: any): Record<string, any>;
20
+ toDatabase(obj: TenantBillingInfo | import("@antelopejs/interface-database-decorators").PlainData<TenantBillingInfo>): import("@antelopejs/interface-database-decorators").StoredRow<TenantBillingInfo>;
19
21
  validate(obj: unknown, options?: import("@antelopejs/interface-database-decorators").ValidateInputOptions): import("@antelopejs/interface-database-decorators").ValidationResult;
20
22
  };
21
23
  export declare class TenantBillingInfoModel extends TenantBillingInfoModel_base {
@@ -4,18 +4,20 @@ declare const TenantBillingStateModel_base: {
4
4
  readonly table: import("@antelopejs/interface-database").Table<TenantBillingState>;
5
5
  readonly database: import("@antelopejs/interface-database").SchemaInstance<any>;
6
6
  get(id: string): PromiseLike<TenantBillingState | undefined>;
7
- getBy(index: keyof TenantBillingState, ...keys: any[]): PromiseLike<TenantBillingState[]>;
7
+ getBy(index: keyof TenantBillingState, ...keys: import("@antelopejs/interface-database-decorators").IndexKey[]): PromiseLike<TenantBillingState[]>;
8
8
  getAll(): PromiseLike<TenantBillingState[]>;
9
9
  insert(obj: import("@antelopejs/interface-database-decorators").DeepPartial<TenantBillingState> | import("@antelopejs/interface-database-decorators").DeepPartial<TenantBillingState>[], options?: import("@antelopejs/interface-database-decorators").ValidateOptions): Promise<string[]>;
10
10
  update(id: string, obj: import("@antelopejs/interface-database-decorators").DeepPartial<TenantBillingState>, options?: import("@antelopejs/interface-database-decorators").ValidateOptions): Promise<number>;
11
- update(obj: import("@antelopejs/interface-database-decorators").DeepPartial<TenantBillingState>, options?: import("@antelopejs/interface-database-decorators").ValidateOptions): Promise<number>;
11
+ update(obj: import("@antelopejs/interface-database-decorators").DeepPartial<TenantBillingState> & {
12
+ _id: string;
13
+ }, options?: import("@antelopejs/interface-database-decorators").ValidateOptions): Promise<number>;
12
14
  delete(id: string): Promise<number>;
13
15
  };
14
- readonly schemaName: string;
16
+ readonly schemaName: string | undefined;
15
17
  readonly tableClass: import("@antelopejs/interface-database-decorators").Constructible<TenantBillingState>;
16
- fromPlainData(obj: any): TenantBillingState;
18
+ fromPlainData(obj: TenantBillingState | import("@antelopejs/interface-database-decorators").PlainData<TenantBillingState>): TenantBillingState;
17
19
  fromDatabase(obj: any): TenantBillingState | undefined;
18
- toDatabase(obj: any): Record<string, any>;
20
+ toDatabase(obj: TenantBillingState | import("@antelopejs/interface-database-decorators").PlainData<TenantBillingState>): import("@antelopejs/interface-database-decorators").StoredRow<TenantBillingState>;
19
21
  validate(obj: unknown, options?: import("@antelopejs/interface-database-decorators").ValidateInputOptions): import("@antelopejs/interface-database-decorators").ValidationResult;
20
22
  };
21
23
  export declare class TenantBillingStateModel extends TenantBillingStateModel_base {
@@ -6,18 +6,20 @@ declare const TenantSubscriptionModel_base: {
6
6
  readonly table: import("@antelopejs/interface-database").Table<TenantSubscription>;
7
7
  readonly database: import("@antelopejs/interface-database").SchemaInstance<any>;
8
8
  get(id: string): PromiseLike<TenantSubscription | undefined>;
9
- getBy(index: keyof TenantSubscription, ...keys: any[]): PromiseLike<TenantSubscription[]>;
9
+ getBy(index: keyof TenantSubscription, ...keys: import("@antelopejs/interface-database-decorators").IndexKey[]): PromiseLike<TenantSubscription[]>;
10
10
  getAll(): PromiseLike<TenantSubscription[]>;
11
11
  insert(obj: DeepPartial<TenantSubscription> | DeepPartial<TenantSubscription>[], options?: ValidateOptions): Promise<string[]>;
12
12
  update(id: string, obj: DeepPartial<TenantSubscription>, options?: ValidateOptions): Promise<number>;
13
- update(obj: DeepPartial<TenantSubscription>, options?: ValidateOptions): Promise<number>;
13
+ update(obj: DeepPartial<TenantSubscription> & {
14
+ _id: string;
15
+ }, options?: ValidateOptions): Promise<number>;
14
16
  delete(id: string): Promise<number>;
15
17
  };
16
- readonly schemaName: string;
18
+ readonly schemaName: string | undefined;
17
19
  readonly tableClass: import("@antelopejs/interface-database-decorators").Constructible<TenantSubscription>;
18
- fromPlainData(obj: any): TenantSubscription;
20
+ fromPlainData(obj: TenantSubscription | import("@antelopejs/interface-database-decorators").PlainData<TenantSubscription>): TenantSubscription;
19
21
  fromDatabase(obj: any): TenantSubscription | undefined;
20
- toDatabase(obj: any): Record<string, any>;
22
+ toDatabase(obj: TenantSubscription | import("@antelopejs/interface-database-decorators").PlainData<TenantSubscription>): import("@antelopejs/interface-database-decorators").StoredRow<TenantSubscription>;
21
23
  validate(obj: unknown, options?: import("@antelopejs/interface-database-decorators").ValidateInputOptions): import("@antelopejs/interface-database-decorators").ValidationResult;
22
24
  };
23
25
  export declare class TenantSubscriptionModel extends TenantSubscriptionModel_base {