@nangohq/types 0.69.5 → 0.69.7
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/dist/index.d.ts +1 -2
- package/dist/plans/db.d.ts +1 -1
- package/dist/plans/http.api.d.ts +5 -15
- package/dist/usage/index.d.ts +6 -0
- package/package.json +1 -1
- package/dist/usage/db.d.ts +0 -9
- package/dist/usage/dto.d.ts +0 -19
package/dist/index.d.ts
CHANGED
|
@@ -30,8 +30,7 @@ export type * from './sharedCredentials/db.js';
|
|
|
30
30
|
export type * from './sharedCredentials/dto.js';
|
|
31
31
|
export type * from './billing/types.js';
|
|
32
32
|
export type * from './billing/http.api.js';
|
|
33
|
-
export type * from './usage/
|
|
34
|
-
export type * from './usage/db.js';
|
|
33
|
+
export type * from './usage/index.js';
|
|
35
34
|
export type * from './providers/api.js';
|
|
36
35
|
export type * from './proxy/api.js';
|
|
37
36
|
export type * from './result.js';
|
package/dist/plans/db.d.ts
CHANGED
|
@@ -2,7 +2,7 @@ import type { Timestamps } from '../db.js';
|
|
|
2
2
|
export interface DBPlan extends Timestamps {
|
|
3
3
|
id: number;
|
|
4
4
|
account_id: number;
|
|
5
|
-
name: 'free' | 'starter' | '
|
|
5
|
+
name: 'free' | 'starter-v2' | 'growth-v2' | 'enterprise' | 'starter' | 'growth' | 'starter-legacy' | 'scale-legacy' | 'growth-legacy';
|
|
6
6
|
stripe_customer_id: string | null;
|
|
7
7
|
stripe_payment_id: string | null;
|
|
8
8
|
orb_customer_id: string | null;
|
package/dist/plans/http.api.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { BillingCustomer, BillingUsageMetric } from '../billing/types.js';
|
|
2
|
-
import type { MetricUsageSummary } from '../usage/
|
|
2
|
+
import type { MetricUsageSummary } from '../usage/index.js';
|
|
3
3
|
import type { ReplaceInObject } from '../utils.js';
|
|
4
4
|
import type { DBPlan } from './db.js';
|
|
5
5
|
import type { Endpoint } from '../api.js';
|
|
@@ -17,6 +17,9 @@ export type PostPlanExtendTrial = Endpoint<{
|
|
|
17
17
|
};
|
|
18
18
|
}>;
|
|
19
19
|
export interface PlanDefinition {
|
|
20
|
+
/**
|
|
21
|
+
* Maps to orb external plan id
|
|
22
|
+
*/
|
|
20
23
|
code: DBPlan['name'];
|
|
21
24
|
title: string;
|
|
22
25
|
description: string;
|
|
@@ -24,22 +27,9 @@ export interface PlanDefinition {
|
|
|
24
27
|
nextPlan: string[] | null;
|
|
25
28
|
prevPlan: string[] | null;
|
|
26
29
|
basePrice?: number;
|
|
27
|
-
/**
|
|
28
|
-
* OrbId is the custom external_plan_id that we can setup
|
|
29
|
-
* It's handy because you can set the same id in staging and prod
|
|
30
|
-
*/
|
|
31
|
-
orbId?: string;
|
|
32
30
|
cta?: string;
|
|
33
31
|
hidden?: boolean;
|
|
34
|
-
flags: Omit<Partial<DBPlan>, 'id' | 'account_id'>;
|
|
35
|
-
display?: {
|
|
36
|
-
featuresHeading?: string;
|
|
37
|
-
features: {
|
|
38
|
-
title: string;
|
|
39
|
-
sub?: string;
|
|
40
|
-
}[];
|
|
41
|
-
sub?: string;
|
|
42
|
-
};
|
|
32
|
+
flags: Omit<Partial<DBPlan>, 'id' | 'account_id' | 'name'>;
|
|
43
33
|
}
|
|
44
34
|
export type GetPlans = Endpoint<{
|
|
45
35
|
Method: 'GET';
|
package/package.json
CHANGED
package/dist/usage/db.d.ts
DELETED
package/dist/usage/dto.d.ts
DELETED
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
import type { DBAccountUsage } from './db.js';
|
|
2
|
-
export interface CreateAccountUsageDto {
|
|
3
|
-
accountId: DBAccountUsage['account_id'];
|
|
4
|
-
month: DBAccountUsage['month'];
|
|
5
|
-
actions?: DBAccountUsage['actions'];
|
|
6
|
-
activeRecords?: DBAccountUsage['active_records'];
|
|
7
|
-
}
|
|
8
|
-
export interface UpdateAccountUsageDto {
|
|
9
|
-
actions?: DBAccountUsage['actions'];
|
|
10
|
-
activeRecords?: DBAccountUsage['active_records'];
|
|
11
|
-
}
|
|
12
|
-
export type AccountUsageIncrementableMetric = 'actions' | 'active_records';
|
|
13
|
-
export type AccountUsageMetric = AccountUsageIncrementableMetric | 'connections';
|
|
14
|
-
export type AccountMetricsUsageSummary = Record<AccountUsageMetric, MetricUsageSummary>;
|
|
15
|
-
export interface MetricUsageSummary {
|
|
16
|
-
label: string;
|
|
17
|
-
usage: number;
|
|
18
|
-
limit: number | null;
|
|
19
|
-
}
|