@nizam-os/dashboard-sdk 12.0.0 → 13.0.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.
- package/dist/Client.d.ts +3 -0
- package/dist/Client.js +12 -8
- package/dist/api/resources/assets/client/requests/ListAssetsRequest.d.ts +1 -1
- package/dist/api/resources/assets/types/ListAssetsRequestSortItem.d.ts +4 -4
- package/dist/api/resources/assets/types/ListAssetsRequestSortItem.js +4 -4
- package/dist/api/resources/index.d.ts +1 -0
- package/dist/api/resources/index.js +2 -1
- package/dist/api/resources/pricing/client/Client.d.ts +30 -0
- package/dist/api/resources/pricing/client/Client.js +108 -0
- package/dist/api/resources/pricing/client/index.d.ts +1 -0
- package/dist/api/resources/pricing/client/index.js +2 -0
- package/dist/api/resources/pricing/exports.d.ts +2 -0
- package/dist/api/resources/pricing/exports.js +21 -0
- package/dist/api/resources/pricing/index.d.ts +1 -0
- package/dist/api/resources/pricing/index.js +17 -0
- package/dist/api/types/CreatePlanRequest.d.ts +49 -0
- package/dist/api/types/CreatePlanRequest.js +25 -0
- package/dist/api/types/ListResponsePricingPlan.d.ts +27 -0
- package/dist/api/types/ListResponsePricingPlan.js +11 -0
- package/dist/api/types/ListResponseSubscriptionPlan.d.ts +27 -0
- package/dist/api/types/ListResponseSubscriptionPlan.js +11 -0
- package/dist/api/types/Money.d.ts +11 -0
- package/dist/api/types/Money.js +3 -0
- package/dist/api/types/PlanFeatures.d.ts +9 -0
- package/dist/api/types/PlanFeatures.js +3 -0
- package/dist/api/types/PlanFeaturesRequest.d.ts +9 -0
- package/dist/api/types/PlanFeaturesRequest.js +3 -0
- package/dist/api/types/PricingPlan.d.ts +48 -0
- package/dist/api/types/PricingPlan.js +28 -0
- package/dist/api/types/SubscriptionPlan.d.ts +89 -0
- package/dist/api/types/SubscriptionPlan.js +47 -0
- package/dist/api/types/UpdatePlanRequest.d.ts +47 -0
- package/dist/api/types/UpdatePlanRequest.js +25 -0
- package/dist/api/types/User.d.ts +2 -0
- package/dist/api/types/User.js +2 -0
- package/dist/api/types/index.d.ts +9 -0
- package/dist/api/types/index.js +9 -0
- package/package.json +1 -1
package/dist/Client.d.ts
CHANGED
|
@@ -14,6 +14,7 @@ import { NotificationsClient } from "./api/resources/notifications/client/Client
|
|
|
14
14
|
import { OperatorsClient } from "./api/resources/operators/client/Client.js";
|
|
15
15
|
import { OrganizationsClient } from "./api/resources/organizations/client/Client.js";
|
|
16
16
|
import { PositionsClient } from "./api/resources/positions/client/Client.js";
|
|
17
|
+
import { PricingClient } from "./api/resources/pricing/client/Client.js";
|
|
17
18
|
import { RealtimeClient } from "./api/resources/realtime/client/Client.js";
|
|
18
19
|
import { TaskAttemptsClient } from "./api/resources/taskAttempts/client/Client.js";
|
|
19
20
|
import { TasksClient } from "./api/resources/tasks/client/Client.js";
|
|
@@ -45,6 +46,7 @@ export declare class NizamDashboardClient {
|
|
|
45
46
|
protected _notifications: NotificationsClient | undefined;
|
|
46
47
|
protected _operators: OperatorsClient | undefined;
|
|
47
48
|
protected _organizations: OrganizationsClient | undefined;
|
|
49
|
+
protected _pricing: PricingClient | undefined;
|
|
48
50
|
protected _realtime: RealtimeClient | undefined;
|
|
49
51
|
protected _taskAttempts: TaskAttemptsClient | undefined;
|
|
50
52
|
protected _tasks: TasksClient | undefined;
|
|
@@ -66,6 +68,7 @@ export declare class NizamDashboardClient {
|
|
|
66
68
|
get notifications(): NotificationsClient;
|
|
67
69
|
get operators(): OperatorsClient;
|
|
68
70
|
get organizations(): OrganizationsClient;
|
|
71
|
+
get pricing(): PricingClient;
|
|
69
72
|
get realtime(): RealtimeClient;
|
|
70
73
|
get taskAttempts(): TaskAttemptsClient;
|
|
71
74
|
get tasks(): TasksClient;
|
package/dist/Client.js
CHANGED
|
@@ -51,10 +51,11 @@ const Client_js_13 = require("./api/resources/notifications/client/Client.js");
|
|
|
51
51
|
const Client_js_14 = require("./api/resources/operators/client/Client.js");
|
|
52
52
|
const Client_js_15 = require("./api/resources/organizations/client/Client.js");
|
|
53
53
|
const Client_js_16 = require("./api/resources/positions/client/Client.js");
|
|
54
|
-
const Client_js_17 = require("./api/resources/
|
|
55
|
-
const Client_js_18 = require("./api/resources/
|
|
56
|
-
const Client_js_19 = require("./api/resources/
|
|
57
|
-
const Client_js_20 = require("./api/resources/
|
|
54
|
+
const Client_js_17 = require("./api/resources/pricing/client/Client.js");
|
|
55
|
+
const Client_js_18 = require("./api/resources/realtime/client/Client.js");
|
|
56
|
+
const Client_js_19 = require("./api/resources/taskAttempts/client/Client.js");
|
|
57
|
+
const Client_js_20 = require("./api/resources/tasks/client/Client.js");
|
|
58
|
+
const Client_js_21 = require("./api/resources/users/client/Client.js");
|
|
58
59
|
const BaseClient_js_1 = require("./BaseClient.js");
|
|
59
60
|
const core = __importStar(require("./core/index.js"));
|
|
60
61
|
class NizamDashboardClient {
|
|
@@ -89,7 +90,7 @@ class NizamDashboardClient {
|
|
|
89
90
|
return (this._lookups ?? (this._lookups = new Client_js_10.LookupsClient(this._options)));
|
|
90
91
|
}
|
|
91
92
|
get users() {
|
|
92
|
-
return (this._users ?? (this._users = new
|
|
93
|
+
return (this._users ?? (this._users = new Client_js_21.UsersClient(this._options)));
|
|
93
94
|
}
|
|
94
95
|
get activeOrganization() {
|
|
95
96
|
return (this._activeOrganization ?? (this._activeOrganization = new Client_js_1.ActiveOrganizationClient(this._options)));
|
|
@@ -112,14 +113,17 @@ class NizamDashboardClient {
|
|
|
112
113
|
get organizations() {
|
|
113
114
|
return (this._organizations ?? (this._organizations = new Client_js_15.OrganizationsClient(this._options)));
|
|
114
115
|
}
|
|
116
|
+
get pricing() {
|
|
117
|
+
return (this._pricing ?? (this._pricing = new Client_js_17.PricingClient(this._options)));
|
|
118
|
+
}
|
|
115
119
|
get realtime() {
|
|
116
|
-
return (this._realtime ?? (this._realtime = new
|
|
120
|
+
return (this._realtime ?? (this._realtime = new Client_js_18.RealtimeClient(this._options)));
|
|
117
121
|
}
|
|
118
122
|
get taskAttempts() {
|
|
119
|
-
return (this._taskAttempts ?? (this._taskAttempts = new
|
|
123
|
+
return (this._taskAttempts ?? (this._taskAttempts = new Client_js_19.TaskAttemptsClient(this._options)));
|
|
120
124
|
}
|
|
121
125
|
get tasks() {
|
|
122
|
-
return (this._tasks ?? (this._tasks = new
|
|
126
|
+
return (this._tasks ?? (this._tasks = new Client_js_20.TasksClient(this._options)));
|
|
123
127
|
}
|
|
124
128
|
/**
|
|
125
129
|
* Make a passthrough request using the SDK's configured auth, retry, logging, etc.
|
|
@@ -22,7 +22,7 @@ export interface ListAssetsRequest {
|
|
|
22
22
|
created_on_or_after?: string;
|
|
23
23
|
/** Only assets created on or before this calendar day (`yyyy-mm-dd`), inclusive — widened server-side to the end of the day in UTC, so the whole day counts. */
|
|
24
24
|
created_on_or_before?: string;
|
|
25
|
-
/** Sort order. Allowed fields: `created_at`, `name`, `
|
|
25
|
+
/** Sort order. Allowed fields: `created_at`, `name`, `plate_number`, `make`, `model`, `vin`, `sub_kind`, `year`, `autonomy_level`, `status`, `kind`. Append `:asc` or `:desc` to each field (direction required, e.g. `created_at:desc`), comma-separated for multi-sort; unknown fields or directions are rejected with `400 validation_failed`. */
|
|
26
26
|
sort?: NizamDashboard.ListAssetsRequestSortItem | NizamDashboard.ListAssetsRequestSortItem[];
|
|
27
27
|
/** Page size. Default 20, maximum 100. Out-of-range values are silently clamped; the response body's `limit` field reflects what was applied. */
|
|
28
28
|
limit?: number;
|
|
@@ -3,18 +3,18 @@ export declare const ListAssetsRequestSortItem: {
|
|
|
3
3
|
readonly CreatedAtDesc: "created_at:desc";
|
|
4
4
|
readonly NameAsc: "name:asc";
|
|
5
5
|
readonly NameDesc: "name:desc";
|
|
6
|
+
readonly PlateNumberAsc: "plate_number:asc";
|
|
7
|
+
readonly PlateNumberDesc: "plate_number:desc";
|
|
6
8
|
readonly MakeAsc: "make:asc";
|
|
7
9
|
readonly MakeDesc: "make:desc";
|
|
8
10
|
readonly ModelAsc: "model:asc";
|
|
9
11
|
readonly ModelDesc: "model:desc";
|
|
10
|
-
readonly YearAsc: "year:asc";
|
|
11
|
-
readonly YearDesc: "year:desc";
|
|
12
|
-
readonly PlateNumberAsc: "plate_number:asc";
|
|
13
|
-
readonly PlateNumberDesc: "plate_number:desc";
|
|
14
12
|
readonly VinAsc: "vin:asc";
|
|
15
13
|
readonly VinDesc: "vin:desc";
|
|
16
14
|
readonly SubKindAsc: "sub_kind:asc";
|
|
17
15
|
readonly SubKindDesc: "sub_kind:desc";
|
|
16
|
+
readonly YearAsc: "year:asc";
|
|
17
|
+
readonly YearDesc: "year:desc";
|
|
18
18
|
readonly AutonomyLevelAsc: "autonomy_level:asc";
|
|
19
19
|
readonly AutonomyLevelDesc: "autonomy_level:desc";
|
|
20
20
|
readonly StatusAsc: "status:asc";
|
|
@@ -7,18 +7,18 @@ exports.ListAssetsRequestSortItem = {
|
|
|
7
7
|
CreatedAtDesc: "created_at:desc",
|
|
8
8
|
NameAsc: "name:asc",
|
|
9
9
|
NameDesc: "name:desc",
|
|
10
|
+
PlateNumberAsc: "plate_number:asc",
|
|
11
|
+
PlateNumberDesc: "plate_number:desc",
|
|
10
12
|
MakeAsc: "make:asc",
|
|
11
13
|
MakeDesc: "make:desc",
|
|
12
14
|
ModelAsc: "model:asc",
|
|
13
15
|
ModelDesc: "model:desc",
|
|
14
|
-
YearAsc: "year:asc",
|
|
15
|
-
YearDesc: "year:desc",
|
|
16
|
-
PlateNumberAsc: "plate_number:asc",
|
|
17
|
-
PlateNumberDesc: "plate_number:desc",
|
|
18
16
|
VinAsc: "vin:asc",
|
|
19
17
|
VinDesc: "vin:desc",
|
|
20
18
|
SubKindAsc: "sub_kind:asc",
|
|
21
19
|
SubKindDesc: "sub_kind:desc",
|
|
20
|
+
YearAsc: "year:asc",
|
|
21
|
+
YearDesc: "year:desc",
|
|
22
22
|
AutonomyLevelAsc: "autonomy_level:asc",
|
|
23
23
|
AutonomyLevelDesc: "autonomy_level:desc",
|
|
24
24
|
StatusAsc: "status:asc",
|
|
@@ -35,6 +35,7 @@ export * as organizations from "./organizations/index.js";
|
|
|
35
35
|
export * from "./organizations/types/index.js";
|
|
36
36
|
export * from "./positions/client/requests/index.js";
|
|
37
37
|
export * as positions from "./positions/index.js";
|
|
38
|
+
export * as pricing from "./pricing/index.js";
|
|
38
39
|
export * as realtime from "./realtime/index.js";
|
|
39
40
|
export * from "./taskAttempts/client/requests/index.js";
|
|
40
41
|
export * as taskAttempts from "./taskAttempts/index.js";
|
|
@@ -36,7 +36,7 @@ var __importStar = (this && this.__importStar) || (function () {
|
|
|
36
36
|
};
|
|
37
37
|
})();
|
|
38
38
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
39
|
-
exports.users = exports.tasks = exports.taskAttempts = exports.realtime = exports.positions = exports.organizations = exports.operators = exports.notifications = exports.notificationPreferences = exports.memberships = exports.lookups = exports.jobs = exports.invites = exports.imports = exports.files = exports.devices = exports.assignments = exports.assets = exports.activity = exports.activeOrganization = void 0;
|
|
39
|
+
exports.users = exports.tasks = exports.taskAttempts = exports.realtime = exports.pricing = exports.positions = exports.organizations = exports.operators = exports.notifications = exports.notificationPreferences = exports.memberships = exports.lookups = exports.jobs = exports.invites = exports.imports = exports.files = exports.devices = exports.assignments = exports.assets = exports.activity = exports.activeOrganization = void 0;
|
|
40
40
|
__exportStar(require("./activeOrganization/client/requests/index.js"), exports);
|
|
41
41
|
exports.activeOrganization = __importStar(require("./activeOrganization/index.js"));
|
|
42
42
|
__exportStar(require("./activity/client/requests/index.js"), exports);
|
|
@@ -74,6 +74,7 @@ exports.organizations = __importStar(require("./organizations/index.js"));
|
|
|
74
74
|
__exportStar(require("./organizations/types/index.js"), exports);
|
|
75
75
|
__exportStar(require("./positions/client/requests/index.js"), exports);
|
|
76
76
|
exports.positions = __importStar(require("./positions/index.js"));
|
|
77
|
+
exports.pricing = __importStar(require("./pricing/index.js"));
|
|
77
78
|
exports.realtime = __importStar(require("./realtime/index.js"));
|
|
78
79
|
__exportStar(require("./taskAttempts/client/requests/index.js"), exports);
|
|
79
80
|
exports.taskAttempts = __importStar(require("./taskAttempts/index.js"));
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import type { BaseClientOptions, BaseRequestOptions } from "../../../../BaseClient.js";
|
|
2
|
+
import { type NormalizedClientOptionsWithAuth } from "../../../../BaseClient.js";
|
|
3
|
+
import * as core from "../../../../core/index.js";
|
|
4
|
+
import * as NizamDashboard from "../../../index.js";
|
|
5
|
+
export declare namespace PricingClient {
|
|
6
|
+
type Options = BaseClientOptions;
|
|
7
|
+
interface RequestOptions extends BaseRequestOptions {
|
|
8
|
+
}
|
|
9
|
+
}
|
|
10
|
+
/**
|
|
11
|
+
* Public subscription pricing for the pricing page (no authentication).
|
|
12
|
+
*/
|
|
13
|
+
export declare class PricingClient {
|
|
14
|
+
protected readonly _options: NormalizedClientOptionsWithAuth<PricingClient.Options>;
|
|
15
|
+
constructor(options: PricingClient.Options);
|
|
16
|
+
/**
|
|
17
|
+
* The active, visible subscription plans for the public pricing page, ordered for display. Anonymous — no authentication required.
|
|
18
|
+
*
|
|
19
|
+
* @param {PricingClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
20
|
+
*
|
|
21
|
+
* @throws {@link NizamDashboard.UnauthorizedError}
|
|
22
|
+
* @throws {@link NizamDashboard.TooManyRequestsError}
|
|
23
|
+
* @throws {@link NizamDashboard.InternalServerError}
|
|
24
|
+
*
|
|
25
|
+
* @example
|
|
26
|
+
* await client.pricing.listPricing()
|
|
27
|
+
*/
|
|
28
|
+
listPricing(requestOptions?: PricingClient.RequestOptions): core.HttpResponsePromise<NizamDashboard.ListResponsePricingPlan>;
|
|
29
|
+
private __listPricing;
|
|
30
|
+
}
|
|
@@ -0,0 +1,108 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
// This file was auto-generated by Fern from our API Definition.
|
|
3
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
4
|
+
if (k2 === undefined) k2 = k;
|
|
5
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
6
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
7
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
8
|
+
}
|
|
9
|
+
Object.defineProperty(o, k2, desc);
|
|
10
|
+
}) : (function(o, m, k, k2) {
|
|
11
|
+
if (k2 === undefined) k2 = k;
|
|
12
|
+
o[k2] = m[k];
|
|
13
|
+
}));
|
|
14
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
15
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
16
|
+
}) : function(o, v) {
|
|
17
|
+
o["default"] = v;
|
|
18
|
+
});
|
|
19
|
+
var __importStar = (this && this.__importStar) || (function () {
|
|
20
|
+
var ownKeys = function(o) {
|
|
21
|
+
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
22
|
+
var ar = [];
|
|
23
|
+
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
24
|
+
return ar;
|
|
25
|
+
};
|
|
26
|
+
return ownKeys(o);
|
|
27
|
+
};
|
|
28
|
+
return function (mod) {
|
|
29
|
+
if (mod && mod.__esModule) return mod;
|
|
30
|
+
var result = {};
|
|
31
|
+
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
32
|
+
__setModuleDefault(result, mod);
|
|
33
|
+
return result;
|
|
34
|
+
};
|
|
35
|
+
})();
|
|
36
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
37
|
+
exports.PricingClient = void 0;
|
|
38
|
+
const BaseClient_js_1 = require("../../../../BaseClient.js");
|
|
39
|
+
const headers_js_1 = require("../../../../core/headers.js");
|
|
40
|
+
const core = __importStar(require("../../../../core/index.js"));
|
|
41
|
+
const environments = __importStar(require("../../../../environments.js"));
|
|
42
|
+
const handleNonStatusCodeError_js_1 = require("../../../../errors/handleNonStatusCodeError.js");
|
|
43
|
+
const errors = __importStar(require("../../../../errors/index.js"));
|
|
44
|
+
const NizamDashboard = __importStar(require("../../../index.js"));
|
|
45
|
+
/**
|
|
46
|
+
* Public subscription pricing for the pricing page (no authentication).
|
|
47
|
+
*/
|
|
48
|
+
class PricingClient {
|
|
49
|
+
constructor(options) {
|
|
50
|
+
this._options = (0, BaseClient_js_1.normalizeClientOptionsWithAuth)(options);
|
|
51
|
+
}
|
|
52
|
+
/**
|
|
53
|
+
* The active, visible subscription plans for the public pricing page, ordered for display. Anonymous — no authentication required.
|
|
54
|
+
*
|
|
55
|
+
* @param {PricingClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
56
|
+
*
|
|
57
|
+
* @throws {@link NizamDashboard.UnauthorizedError}
|
|
58
|
+
* @throws {@link NizamDashboard.TooManyRequestsError}
|
|
59
|
+
* @throws {@link NizamDashboard.InternalServerError}
|
|
60
|
+
*
|
|
61
|
+
* @example
|
|
62
|
+
* await client.pricing.listPricing()
|
|
63
|
+
*/
|
|
64
|
+
listPricing(requestOptions) {
|
|
65
|
+
return core.HttpResponsePromise.fromPromise(this.__listPricing(requestOptions));
|
|
66
|
+
}
|
|
67
|
+
async __listPricing(requestOptions) {
|
|
68
|
+
const _authRequest = await this._options.authProvider.getAuthRequest();
|
|
69
|
+
const _headers = (0, headers_js_1.mergeHeaders)(_authRequest.headers, this._options?.headers, requestOptions?.headers);
|
|
70
|
+
const _response = await core.fetcher({
|
|
71
|
+
url: core.url.join((await core.Supplier.get(this._options.baseUrl)) ??
|
|
72
|
+
(await core.Supplier.get(this._options.environment)) ??
|
|
73
|
+
environments.NizamDashboardEnvironment.Production, "v1/pricing"),
|
|
74
|
+
method: "GET",
|
|
75
|
+
headers: _headers,
|
|
76
|
+
queryString: core.url.queryBuilder().mergeAdditional(requestOptions?.queryParams).build(),
|
|
77
|
+
timeoutMs: (requestOptions?.timeoutInSeconds ?? this._options?.timeoutInSeconds ?? 60) * 1000,
|
|
78
|
+
maxRetries: requestOptions?.maxRetries ?? this._options?.maxRetries,
|
|
79
|
+
abortSignal: requestOptions?.abortSignal,
|
|
80
|
+
fetchFn: this._options?.fetch,
|
|
81
|
+
logging: this._options.logging,
|
|
82
|
+
});
|
|
83
|
+
if (_response.ok) {
|
|
84
|
+
return {
|
|
85
|
+
data: _response.body,
|
|
86
|
+
rawResponse: _response.rawResponse,
|
|
87
|
+
};
|
|
88
|
+
}
|
|
89
|
+
if (_response.error.reason === "status-code") {
|
|
90
|
+
switch (_response.error.statusCode) {
|
|
91
|
+
case 401:
|
|
92
|
+
throw new NizamDashboard.UnauthorizedError(_response.error.body, _response.rawResponse);
|
|
93
|
+
case 429:
|
|
94
|
+
throw new NizamDashboard.TooManyRequestsError(_response.error.body, _response.rawResponse);
|
|
95
|
+
case 500:
|
|
96
|
+
throw new NizamDashboard.InternalServerError(_response.error.body, _response.rawResponse);
|
|
97
|
+
default:
|
|
98
|
+
throw new errors.NizamDashboardError({
|
|
99
|
+
statusCode: _response.error.statusCode,
|
|
100
|
+
body: _response.error.body,
|
|
101
|
+
rawResponse: _response.rawResponse,
|
|
102
|
+
});
|
|
103
|
+
}
|
|
104
|
+
}
|
|
105
|
+
return (0, handleNonStatusCodeError_js_1.handleNonStatusCodeError)(_response.error, _response.rawResponse, "GET", "/v1/pricing");
|
|
106
|
+
}
|
|
107
|
+
}
|
|
108
|
+
exports.PricingClient = PricingClient;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
// This file was auto-generated by Fern from our API Definition.
|
|
3
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
4
|
+
if (k2 === undefined) k2 = k;
|
|
5
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
6
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
7
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
8
|
+
}
|
|
9
|
+
Object.defineProperty(o, k2, desc);
|
|
10
|
+
}) : (function(o, m, k, k2) {
|
|
11
|
+
if (k2 === undefined) k2 = k;
|
|
12
|
+
o[k2] = m[k];
|
|
13
|
+
}));
|
|
14
|
+
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
15
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
16
|
+
};
|
|
17
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
18
|
+
exports.PricingClient = void 0;
|
|
19
|
+
var Client_js_1 = require("./client/Client.js");
|
|
20
|
+
Object.defineProperty(exports, "PricingClient", { enumerable: true, get: function () { return Client_js_1.PricingClient; } });
|
|
21
|
+
__exportStar(require("./client/index.js"), exports);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from "./client/index.js";
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = 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);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
|
+
};
|
|
16
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
+
__exportStar(require("./client/index.js"), exports);
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
import type * as NizamDashboard from "../index.js";
|
|
2
|
+
/**
|
|
3
|
+
* Author a new draft subscription plan.
|
|
4
|
+
*/
|
|
5
|
+
export interface CreatePlanRequest {
|
|
6
|
+
/** Stable plan code (natural key) — a lowercase url-safe slug. */
|
|
7
|
+
code: string;
|
|
8
|
+
/** Display name. */
|
|
9
|
+
name: string;
|
|
10
|
+
/** Description. */
|
|
11
|
+
description?: string | undefined;
|
|
12
|
+
/** Recurring price in the currency's minor units. */
|
|
13
|
+
price_minor_units?: number | undefined;
|
|
14
|
+
/** ISO-4217 currency code. */
|
|
15
|
+
currency: string;
|
|
16
|
+
/** One-time setup fee in minor units (default 0). */
|
|
17
|
+
setup_fee_minor_units?: number | undefined;
|
|
18
|
+
/** Pricing shape. */
|
|
19
|
+
billing_model: CreatePlanRequest.BillingModel;
|
|
20
|
+
/** Billing cadence. */
|
|
21
|
+
billing_period: CreatePlanRequest.BillingPeriod;
|
|
22
|
+
/** Sort position on the pricing page (ascending). */
|
|
23
|
+
position?: number | undefined;
|
|
24
|
+
/** Default free-trial length in days. */
|
|
25
|
+
default_trial_days?: number | undefined;
|
|
26
|
+
features?: NizamDashboard.PlanFeaturesRequest | undefined;
|
|
27
|
+
}
|
|
28
|
+
export declare namespace CreatePlanRequest {
|
|
29
|
+
/** Pricing shape. */
|
|
30
|
+
const BillingModel: {
|
|
31
|
+
readonly Free: "free";
|
|
32
|
+
readonly Flat: "flat";
|
|
33
|
+
readonly PerSeat: "per_seat";
|
|
34
|
+
readonly PerEvent: "per_event";
|
|
35
|
+
readonly Tiered: "tiered";
|
|
36
|
+
readonly Hybrid: "hybrid";
|
|
37
|
+
};
|
|
38
|
+
type BillingModel = (typeof BillingModel)[keyof typeof BillingModel];
|
|
39
|
+
/** Billing cadence. */
|
|
40
|
+
const BillingPeriod: {
|
|
41
|
+
readonly Weekly: "weekly";
|
|
42
|
+
readonly Biweekly: "biweekly";
|
|
43
|
+
readonly Monthly: "monthly";
|
|
44
|
+
readonly Quarterly: "quarterly";
|
|
45
|
+
readonly Semiannual: "semiannual";
|
|
46
|
+
readonly Yearly: "yearly";
|
|
47
|
+
};
|
|
48
|
+
type BillingPeriod = (typeof BillingPeriod)[keyof typeof BillingPeriod];
|
|
49
|
+
}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
// This file was auto-generated by Fern from our API Definition.
|
|
3
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
|
+
exports.CreatePlanRequest = void 0;
|
|
5
|
+
var CreatePlanRequest;
|
|
6
|
+
(function (CreatePlanRequest) {
|
|
7
|
+
/** Pricing shape. */
|
|
8
|
+
CreatePlanRequest.BillingModel = {
|
|
9
|
+
Free: "free",
|
|
10
|
+
Flat: "flat",
|
|
11
|
+
PerSeat: "per_seat",
|
|
12
|
+
PerEvent: "per_event",
|
|
13
|
+
Tiered: "tiered",
|
|
14
|
+
Hybrid: "hybrid",
|
|
15
|
+
};
|
|
16
|
+
/** Billing cadence. */
|
|
17
|
+
CreatePlanRequest.BillingPeriod = {
|
|
18
|
+
Weekly: "weekly",
|
|
19
|
+
Biweekly: "biweekly",
|
|
20
|
+
Monthly: "monthly",
|
|
21
|
+
Quarterly: "quarterly",
|
|
22
|
+
Semiannual: "semiannual",
|
|
23
|
+
Yearly: "yearly",
|
|
24
|
+
};
|
|
25
|
+
})(CreatePlanRequest || (exports.CreatePlanRequest = CreatePlanRequest = {}));
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import type * as NizamDashboard from "../index.js";
|
|
2
|
+
/**
|
|
3
|
+
* Envelope for paginated list responses (opaque cursor pagination).
|
|
4
|
+
*/
|
|
5
|
+
export interface ListResponsePricingPlan {
|
|
6
|
+
/** Object type discriminator. Always `list` for this envelope. */
|
|
7
|
+
object?: ListResponsePricingPlan.Object_ | undefined;
|
|
8
|
+
/** Page of resources. Empty array when there are no matches. */
|
|
9
|
+
data?: NizamDashboard.PricingPlan[] | undefined;
|
|
10
|
+
/** True when more pages exist; pass `next_cursor` as `?starting_after=` to fetch the next page. */
|
|
11
|
+
has_more?: boolean | undefined;
|
|
12
|
+
/** True when earlier pages exist; pass `prev_cursor` as `?ending_before=` to fetch the previous page. */
|
|
13
|
+
has_previous?: boolean | undefined;
|
|
14
|
+
/** Opaque cursor for the next page. `null` on the last page. */
|
|
15
|
+
next_cursor?: string | undefined;
|
|
16
|
+
/** Opaque cursor for the previous page. `null` on the first page. */
|
|
17
|
+
prev_cursor?: string | undefined;
|
|
18
|
+
/** Page size that produced this response. */
|
|
19
|
+
limit?: number | undefined;
|
|
20
|
+
}
|
|
21
|
+
export declare namespace ListResponsePricingPlan {
|
|
22
|
+
/** Object type discriminator. Always `list` for this envelope. */
|
|
23
|
+
const Object_: {
|
|
24
|
+
readonly List: "list";
|
|
25
|
+
};
|
|
26
|
+
type Object_ = (typeof Object_)[keyof typeof Object_];
|
|
27
|
+
}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
// This file was auto-generated by Fern from our API Definition.
|
|
3
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
|
+
exports.ListResponsePricingPlan = void 0;
|
|
5
|
+
var ListResponsePricingPlan;
|
|
6
|
+
(function (ListResponsePricingPlan) {
|
|
7
|
+
/** Object type discriminator. Always `list` for this envelope. */
|
|
8
|
+
ListResponsePricingPlan.Object_ = {
|
|
9
|
+
List: "list",
|
|
10
|
+
};
|
|
11
|
+
})(ListResponsePricingPlan || (exports.ListResponsePricingPlan = ListResponsePricingPlan = {}));
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import type * as NizamDashboard from "../index.js";
|
|
2
|
+
/**
|
|
3
|
+
* Envelope for paginated list responses (opaque cursor pagination).
|
|
4
|
+
*/
|
|
5
|
+
export interface ListResponseSubscriptionPlan {
|
|
6
|
+
/** Object type discriminator. Always `list` for this envelope. */
|
|
7
|
+
object?: ListResponseSubscriptionPlan.Object_ | undefined;
|
|
8
|
+
/** Page of resources. Empty array when there are no matches. */
|
|
9
|
+
data?: NizamDashboard.SubscriptionPlan[] | undefined;
|
|
10
|
+
/** True when more pages exist; pass `next_cursor` as `?starting_after=` to fetch the next page. */
|
|
11
|
+
has_more?: boolean | undefined;
|
|
12
|
+
/** True when earlier pages exist; pass `prev_cursor` as `?ending_before=` to fetch the previous page. */
|
|
13
|
+
has_previous?: boolean | undefined;
|
|
14
|
+
/** Opaque cursor for the next page. `null` on the last page. */
|
|
15
|
+
next_cursor?: string | undefined;
|
|
16
|
+
/** Opaque cursor for the previous page. `null` on the first page. */
|
|
17
|
+
prev_cursor?: string | undefined;
|
|
18
|
+
/** Page size that produced this response. */
|
|
19
|
+
limit?: number | undefined;
|
|
20
|
+
}
|
|
21
|
+
export declare namespace ListResponseSubscriptionPlan {
|
|
22
|
+
/** Object type discriminator. Always `list` for this envelope. */
|
|
23
|
+
const Object_: {
|
|
24
|
+
readonly List: "list";
|
|
25
|
+
};
|
|
26
|
+
type Object_ = (typeof Object_)[keyof typeof Object_];
|
|
27
|
+
}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
// This file was auto-generated by Fern from our API Definition.
|
|
3
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
|
+
exports.ListResponseSubscriptionPlan = void 0;
|
|
5
|
+
var ListResponseSubscriptionPlan;
|
|
6
|
+
(function (ListResponseSubscriptionPlan) {
|
|
7
|
+
/** Object type discriminator. Always `list` for this envelope. */
|
|
8
|
+
ListResponseSubscriptionPlan.Object_ = {
|
|
9
|
+
List: "list",
|
|
10
|
+
};
|
|
11
|
+
})(ListResponseSubscriptionPlan || (exports.ListResponseSubscriptionPlan = ListResponseSubscriptionPlan = {}));
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* A monetary amount as integer minor units plus its ISO-4217 currency.
|
|
3
|
+
*/
|
|
4
|
+
export interface Money {
|
|
5
|
+
/** ISO-4217 currency code. */
|
|
6
|
+
currency?: string | undefined;
|
|
7
|
+
/** Amount in the currency's minor units (cents for USD, yen for JPY, fils for KWD). */
|
|
8
|
+
minor_units?: number | undefined;
|
|
9
|
+
/** Amount as a major-unit decimal string at the currency's scale. */
|
|
10
|
+
decimal?: string | undefined;
|
|
11
|
+
}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* A plan's entitlements: capability flags + numeric quota ceilings.
|
|
3
|
+
*/
|
|
4
|
+
export interface PlanFeatures {
|
|
5
|
+
/** Capability flags keyed by feature id. An absent flag means off. */
|
|
6
|
+
flags?: Record<string, boolean> | undefined;
|
|
7
|
+
/** Quota ceilings keyed by meter key or feature id. An absent quota means unlimited; a present 0 means hard-blocked. */
|
|
8
|
+
quotas?: Record<string, number> | undefined;
|
|
9
|
+
}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* A plan's entitlements: capability flags + numeric quota ceilings.
|
|
3
|
+
*/
|
|
4
|
+
export interface PlanFeaturesRequest {
|
|
5
|
+
/** Capability flags keyed by feature id. */
|
|
6
|
+
flags?: Record<string, boolean> | undefined;
|
|
7
|
+
/** Quota ceilings (non-negative) keyed by meter key or feature id. */
|
|
8
|
+
quotas?: Record<string, number> | undefined;
|
|
9
|
+
}
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
import type * as NizamDashboard from "../index.js";
|
|
2
|
+
/**
|
|
3
|
+
* A publicly sellable subscription plan, for the pricing page.
|
|
4
|
+
*/
|
|
5
|
+
export interface PricingPlan {
|
|
6
|
+
/** Stable plan code. */
|
|
7
|
+
code: string;
|
|
8
|
+
/** Display name. */
|
|
9
|
+
name: string;
|
|
10
|
+
/** Marketing description. */
|
|
11
|
+
description?: string | undefined;
|
|
12
|
+
price: NizamDashboard.Money;
|
|
13
|
+
setup_fee: NizamDashboard.Money;
|
|
14
|
+
/** Pricing shape. */
|
|
15
|
+
billing_model: PricingPlan.BillingModel;
|
|
16
|
+
/** Billing cadence. */
|
|
17
|
+
billing_period: PricingPlan.BillingPeriod;
|
|
18
|
+
/** Free-trial length in days, when the plan offers one. */
|
|
19
|
+
trial_days?: number | undefined;
|
|
20
|
+
features: NizamDashboard.PlanFeatures;
|
|
21
|
+
object: PricingPlan.Object_;
|
|
22
|
+
}
|
|
23
|
+
export declare namespace PricingPlan {
|
|
24
|
+
/** Pricing shape. */
|
|
25
|
+
const BillingModel: {
|
|
26
|
+
readonly Free: "free";
|
|
27
|
+
readonly Flat: "flat";
|
|
28
|
+
readonly PerSeat: "per_seat";
|
|
29
|
+
readonly PerEvent: "per_event";
|
|
30
|
+
readonly Tiered: "tiered";
|
|
31
|
+
readonly Hybrid: "hybrid";
|
|
32
|
+
};
|
|
33
|
+
type BillingModel = (typeof BillingModel)[keyof typeof BillingModel];
|
|
34
|
+
/** Billing cadence. */
|
|
35
|
+
const BillingPeriod: {
|
|
36
|
+
readonly Weekly: "weekly";
|
|
37
|
+
readonly Biweekly: "biweekly";
|
|
38
|
+
readonly Monthly: "monthly";
|
|
39
|
+
readonly Quarterly: "quarterly";
|
|
40
|
+
readonly Semiannual: "semiannual";
|
|
41
|
+
readonly Yearly: "yearly";
|
|
42
|
+
};
|
|
43
|
+
type BillingPeriod = (typeof BillingPeriod)[keyof typeof BillingPeriod];
|
|
44
|
+
const Object_: {
|
|
45
|
+
readonly PricingPlan: "pricing_plan";
|
|
46
|
+
};
|
|
47
|
+
type Object_ = (typeof Object_)[keyof typeof Object_];
|
|
48
|
+
}
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
// This file was auto-generated by Fern from our API Definition.
|
|
3
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
|
+
exports.PricingPlan = void 0;
|
|
5
|
+
var PricingPlan;
|
|
6
|
+
(function (PricingPlan) {
|
|
7
|
+
/** Pricing shape. */
|
|
8
|
+
PricingPlan.BillingModel = {
|
|
9
|
+
Free: "free",
|
|
10
|
+
Flat: "flat",
|
|
11
|
+
PerSeat: "per_seat",
|
|
12
|
+
PerEvent: "per_event",
|
|
13
|
+
Tiered: "tiered",
|
|
14
|
+
Hybrid: "hybrid",
|
|
15
|
+
};
|
|
16
|
+
/** Billing cadence. */
|
|
17
|
+
PricingPlan.BillingPeriod = {
|
|
18
|
+
Weekly: "weekly",
|
|
19
|
+
Biweekly: "biweekly",
|
|
20
|
+
Monthly: "monthly",
|
|
21
|
+
Quarterly: "quarterly",
|
|
22
|
+
Semiannual: "semiannual",
|
|
23
|
+
Yearly: "yearly",
|
|
24
|
+
};
|
|
25
|
+
PricingPlan.Object_ = {
|
|
26
|
+
PricingPlan: "pricing_plan",
|
|
27
|
+
};
|
|
28
|
+
})(PricingPlan || (exports.PricingPlan = PricingPlan = {}));
|
|
@@ -0,0 +1,89 @@
|
|
|
1
|
+
import type * as NizamDashboard from "../index.js";
|
|
2
|
+
/**
|
|
3
|
+
* A subscription plan in the platform billing catalog (admin view).
|
|
4
|
+
*/
|
|
5
|
+
export interface SubscriptionPlan {
|
|
6
|
+
/** Stable plan id. */
|
|
7
|
+
id: string;
|
|
8
|
+
/** Stable plan code (natural key). */
|
|
9
|
+
code: string;
|
|
10
|
+
/** Display name. */
|
|
11
|
+
name: string;
|
|
12
|
+
/** Description. */
|
|
13
|
+
description?: string | undefined;
|
|
14
|
+
/** Catalog lifecycle status. */
|
|
15
|
+
status: SubscriptionPlan.Status;
|
|
16
|
+
price: NizamDashboard.Money;
|
|
17
|
+
setup_fee: NizamDashboard.Money;
|
|
18
|
+
/** Pricing shape. */
|
|
19
|
+
billing_model: SubscriptionPlan.BillingModel;
|
|
20
|
+
/** Billing cadence. */
|
|
21
|
+
billing_period: SubscriptionPlan.BillingPeriod;
|
|
22
|
+
/** Sort position on the pricing page (ascending). */
|
|
23
|
+
position: number;
|
|
24
|
+
/** Default free-trial length in days. */
|
|
25
|
+
default_trial_days?: number | undefined;
|
|
26
|
+
features: NizamDashboard.PlanFeatures;
|
|
27
|
+
/** Whether the plan is live (sellable to subscribers). */
|
|
28
|
+
active: boolean;
|
|
29
|
+
/** Whether the plan appears on the public pricing page. */
|
|
30
|
+
visible: boolean;
|
|
31
|
+
/** Processor (Stripe) Product id, once provisioned. */
|
|
32
|
+
processor_product_id?: string | undefined;
|
|
33
|
+
/** Processor (Stripe) Price id, once provisioned. */
|
|
34
|
+
processor_price_id?: string | undefined;
|
|
35
|
+
/** Lifecycle statuses this plan may legally transition to next. */
|
|
36
|
+
allowed_transitions: SubscriptionPlan.AllowedTransitions.Item[];
|
|
37
|
+
/** Creation time. */
|
|
38
|
+
created_at: string;
|
|
39
|
+
/** Last update time. */
|
|
40
|
+
updated_at: string;
|
|
41
|
+
object: SubscriptionPlan.Object_;
|
|
42
|
+
}
|
|
43
|
+
export declare namespace SubscriptionPlan {
|
|
44
|
+
/** Catalog lifecycle status. */
|
|
45
|
+
const Status: {
|
|
46
|
+
readonly Draft: "draft";
|
|
47
|
+
readonly Active: "active";
|
|
48
|
+
readonly Grandfathered: "grandfathered";
|
|
49
|
+
readonly Retired: "retired";
|
|
50
|
+
readonly Archived: "archived";
|
|
51
|
+
};
|
|
52
|
+
type Status = (typeof Status)[keyof typeof Status];
|
|
53
|
+
/** Pricing shape. */
|
|
54
|
+
const BillingModel: {
|
|
55
|
+
readonly Free: "free";
|
|
56
|
+
readonly Flat: "flat";
|
|
57
|
+
readonly PerSeat: "per_seat";
|
|
58
|
+
readonly PerEvent: "per_event";
|
|
59
|
+
readonly Tiered: "tiered";
|
|
60
|
+
readonly Hybrid: "hybrid";
|
|
61
|
+
};
|
|
62
|
+
type BillingModel = (typeof BillingModel)[keyof typeof BillingModel];
|
|
63
|
+
/** Billing cadence. */
|
|
64
|
+
const BillingPeriod: {
|
|
65
|
+
readonly Weekly: "weekly";
|
|
66
|
+
readonly Biweekly: "biweekly";
|
|
67
|
+
readonly Monthly: "monthly";
|
|
68
|
+
readonly Quarterly: "quarterly";
|
|
69
|
+
readonly Semiannual: "semiannual";
|
|
70
|
+
readonly Yearly: "yearly";
|
|
71
|
+
};
|
|
72
|
+
type BillingPeriod = (typeof BillingPeriod)[keyof typeof BillingPeriod];
|
|
73
|
+
type AllowedTransitions = AllowedTransitions.Item[];
|
|
74
|
+
namespace AllowedTransitions {
|
|
75
|
+
/** Lifecycle statuses this plan may legally transition to next. */
|
|
76
|
+
const Item: {
|
|
77
|
+
readonly Draft: "draft";
|
|
78
|
+
readonly Active: "active";
|
|
79
|
+
readonly Grandfathered: "grandfathered";
|
|
80
|
+
readonly Retired: "retired";
|
|
81
|
+
readonly Archived: "archived";
|
|
82
|
+
};
|
|
83
|
+
type Item = (typeof Item)[keyof typeof Item];
|
|
84
|
+
}
|
|
85
|
+
const Object_: {
|
|
86
|
+
readonly SubscriptionPlan: "subscription_plan";
|
|
87
|
+
};
|
|
88
|
+
type Object_ = (typeof Object_)[keyof typeof Object_];
|
|
89
|
+
}
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
// This file was auto-generated by Fern from our API Definition.
|
|
3
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
|
+
exports.SubscriptionPlan = void 0;
|
|
5
|
+
var SubscriptionPlan;
|
|
6
|
+
(function (SubscriptionPlan) {
|
|
7
|
+
/** Catalog lifecycle status. */
|
|
8
|
+
SubscriptionPlan.Status = {
|
|
9
|
+
Draft: "draft",
|
|
10
|
+
Active: "active",
|
|
11
|
+
Grandfathered: "grandfathered",
|
|
12
|
+
Retired: "retired",
|
|
13
|
+
Archived: "archived",
|
|
14
|
+
};
|
|
15
|
+
/** Pricing shape. */
|
|
16
|
+
SubscriptionPlan.BillingModel = {
|
|
17
|
+
Free: "free",
|
|
18
|
+
Flat: "flat",
|
|
19
|
+
PerSeat: "per_seat",
|
|
20
|
+
PerEvent: "per_event",
|
|
21
|
+
Tiered: "tiered",
|
|
22
|
+
Hybrid: "hybrid",
|
|
23
|
+
};
|
|
24
|
+
/** Billing cadence. */
|
|
25
|
+
SubscriptionPlan.BillingPeriod = {
|
|
26
|
+
Weekly: "weekly",
|
|
27
|
+
Biweekly: "biweekly",
|
|
28
|
+
Monthly: "monthly",
|
|
29
|
+
Quarterly: "quarterly",
|
|
30
|
+
Semiannual: "semiannual",
|
|
31
|
+
Yearly: "yearly",
|
|
32
|
+
};
|
|
33
|
+
let AllowedTransitions;
|
|
34
|
+
(function (AllowedTransitions) {
|
|
35
|
+
/** Lifecycle statuses this plan may legally transition to next. */
|
|
36
|
+
AllowedTransitions.Item = {
|
|
37
|
+
Draft: "draft",
|
|
38
|
+
Active: "active",
|
|
39
|
+
Grandfathered: "grandfathered",
|
|
40
|
+
Retired: "retired",
|
|
41
|
+
Archived: "archived",
|
|
42
|
+
};
|
|
43
|
+
})(AllowedTransitions = SubscriptionPlan.AllowedTransitions || (SubscriptionPlan.AllowedTransitions = {}));
|
|
44
|
+
SubscriptionPlan.Object_ = {
|
|
45
|
+
SubscriptionPlan: "subscription_plan",
|
|
46
|
+
};
|
|
47
|
+
})(SubscriptionPlan || (exports.SubscriptionPlan = SubscriptionPlan = {}));
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
import type * as NizamDashboard from "../index.js";
|
|
2
|
+
/**
|
|
3
|
+
* Edit a subscription plan's catalog fields (partial update).
|
|
4
|
+
*/
|
|
5
|
+
export interface UpdatePlanRequest {
|
|
6
|
+
/** Display name. */
|
|
7
|
+
name?: string | undefined;
|
|
8
|
+
/** Description. */
|
|
9
|
+
description?: string | undefined;
|
|
10
|
+
/** Recurring price in minor units. */
|
|
11
|
+
price_minor_units?: number | undefined;
|
|
12
|
+
/** ISO-4217 currency code. */
|
|
13
|
+
currency?: string | undefined;
|
|
14
|
+
/** One-time setup fee in minor units. */
|
|
15
|
+
setup_fee_minor_units?: number | undefined;
|
|
16
|
+
/** Pricing shape. */
|
|
17
|
+
billing_model?: UpdatePlanRequest.BillingModel | undefined;
|
|
18
|
+
/** Billing cadence. */
|
|
19
|
+
billing_period?: UpdatePlanRequest.BillingPeriod | undefined;
|
|
20
|
+
/** Sort position on the pricing page. */
|
|
21
|
+
position?: number | undefined;
|
|
22
|
+
/** Default free-trial length in days. */
|
|
23
|
+
default_trial_days?: number | undefined;
|
|
24
|
+
features?: NizamDashboard.PlanFeaturesRequest | undefined;
|
|
25
|
+
}
|
|
26
|
+
export declare namespace UpdatePlanRequest {
|
|
27
|
+
/** Pricing shape. */
|
|
28
|
+
const BillingModel: {
|
|
29
|
+
readonly Free: "free";
|
|
30
|
+
readonly Flat: "flat";
|
|
31
|
+
readonly PerSeat: "per_seat";
|
|
32
|
+
readonly PerEvent: "per_event";
|
|
33
|
+
readonly Tiered: "tiered";
|
|
34
|
+
readonly Hybrid: "hybrid";
|
|
35
|
+
};
|
|
36
|
+
type BillingModel = (typeof BillingModel)[keyof typeof BillingModel];
|
|
37
|
+
/** Billing cadence. */
|
|
38
|
+
const BillingPeriod: {
|
|
39
|
+
readonly Weekly: "weekly";
|
|
40
|
+
readonly Biweekly: "biweekly";
|
|
41
|
+
readonly Monthly: "monthly";
|
|
42
|
+
readonly Quarterly: "quarterly";
|
|
43
|
+
readonly Semiannual: "semiannual";
|
|
44
|
+
readonly Yearly: "yearly";
|
|
45
|
+
};
|
|
46
|
+
type BillingPeriod = (typeof BillingPeriod)[keyof typeof BillingPeriod];
|
|
47
|
+
}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
// This file was auto-generated by Fern from our API Definition.
|
|
3
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
|
+
exports.UpdatePlanRequest = void 0;
|
|
5
|
+
var UpdatePlanRequest;
|
|
6
|
+
(function (UpdatePlanRequest) {
|
|
7
|
+
/** Pricing shape. */
|
|
8
|
+
UpdatePlanRequest.BillingModel = {
|
|
9
|
+
Free: "free",
|
|
10
|
+
Flat: "flat",
|
|
11
|
+
PerSeat: "per_seat",
|
|
12
|
+
PerEvent: "per_event",
|
|
13
|
+
Tiered: "tiered",
|
|
14
|
+
Hybrid: "hybrid",
|
|
15
|
+
};
|
|
16
|
+
/** Billing cadence. */
|
|
17
|
+
UpdatePlanRequest.BillingPeriod = {
|
|
18
|
+
Weekly: "weekly",
|
|
19
|
+
Biweekly: "biweekly",
|
|
20
|
+
Monthly: "monthly",
|
|
21
|
+
Quarterly: "quarterly",
|
|
22
|
+
Semiannual: "semiannual",
|
|
23
|
+
Yearly: "yearly",
|
|
24
|
+
};
|
|
25
|
+
})(UpdatePlanRequest || (exports.UpdatePlanRequest = UpdatePlanRequest = {}));
|
package/dist/api/types/User.d.ts
CHANGED
|
@@ -51,6 +51,8 @@ export declare namespace User {
|
|
|
51
51
|
readonly KeycloakProjectionAdminister: "keycloak-projection:administer";
|
|
52
52
|
readonly NotificationDeliveryRead: "notification-delivery:read";
|
|
53
53
|
readonly OrgMaintenanceAdminister: "org-maintenance:administer";
|
|
54
|
+
readonly PlanManage: "plan:manage";
|
|
55
|
+
readonly PlanRead: "plan:read";
|
|
54
56
|
readonly ServiceAccountAdminister: "service-account:administer";
|
|
55
57
|
readonly TaskCreate: "task:create";
|
|
56
58
|
readonly UserAdminister: "user:administer";
|
package/dist/api/types/User.js
CHANGED
|
@@ -29,6 +29,8 @@ var User;
|
|
|
29
29
|
KeycloakProjectionAdminister: "keycloak-projection:administer",
|
|
30
30
|
NotificationDeliveryRead: "notification-delivery:read",
|
|
31
31
|
OrgMaintenanceAdminister: "org-maintenance:administer",
|
|
32
|
+
PlanManage: "plan:manage",
|
|
33
|
+
PlanRead: "plan:read",
|
|
32
34
|
ServiceAccountAdminister: "service-account:administer",
|
|
33
35
|
TaskCreate: "task:create",
|
|
34
36
|
UserAdminister: "user:administer",
|
|
@@ -12,6 +12,7 @@ export * from "./Country.js";
|
|
|
12
12
|
export * from "./CreateAutonomousOperatorRequest.js";
|
|
13
13
|
export * from "./CreateHumanOperatorRequest.js";
|
|
14
14
|
export * from "./CreateOperatorRequest.js";
|
|
15
|
+
export * from "./CreatePlanRequest.js";
|
|
15
16
|
export * from "./CreateTeleoperatedOperatorRequest.js";
|
|
16
17
|
export * from "./Currency.js";
|
|
17
18
|
export * from "./Device.js";
|
|
@@ -44,12 +45,15 @@ export * from "./ListResponseNotificationDeadLetter.js";
|
|
|
44
45
|
export * from "./ListResponseOperatorPosition.js";
|
|
45
46
|
export * from "./ListResponseOrganization.js";
|
|
46
47
|
export * from "./ListResponsePosition.js";
|
|
48
|
+
export * from "./ListResponsePricingPlan.js";
|
|
49
|
+
export * from "./ListResponseSubscriptionPlan.js";
|
|
47
50
|
export * from "./ListResponseTask.js";
|
|
48
51
|
export * from "./ListResponseTimezone.js";
|
|
49
52
|
export * from "./ListResponseUserResource.js";
|
|
50
53
|
export * from "./Membership.js";
|
|
51
54
|
export * from "./MembershipChoice.js";
|
|
52
55
|
export * from "./MembershipDriftResponse.js";
|
|
56
|
+
export * from "./Money.js";
|
|
53
57
|
export * from "./MqttToken.js";
|
|
54
58
|
export * from "./Notification.js";
|
|
55
59
|
export * from "./NotificationCategoryCount.js";
|
|
@@ -65,15 +69,20 @@ export * from "./Operator.js";
|
|
|
65
69
|
export * from "./OperatorAsset.js";
|
|
66
70
|
export * from "./OperatorPosition.js";
|
|
67
71
|
export * from "./Organization.js";
|
|
72
|
+
export * from "./PlanFeatures.js";
|
|
73
|
+
export * from "./PlanFeaturesRequest.js";
|
|
68
74
|
export * from "./Position.js";
|
|
75
|
+
export * from "./PricingPlan.js";
|
|
69
76
|
export * from "./ProblemDetail.js";
|
|
70
77
|
export * from "./QuietHours.js";
|
|
71
78
|
export * from "./RealtimeTicket.js";
|
|
72
79
|
export * from "./ReconcileResponse.js";
|
|
80
|
+
export * from "./SubscriptionPlan.js";
|
|
73
81
|
export * from "./Task.js";
|
|
74
82
|
export * from "./TaskAttemptPhoto.js";
|
|
75
83
|
export * from "./TaskAttemptPhotoThumbnail.js";
|
|
76
84
|
export * from "./Timezone.js";
|
|
85
|
+
export * from "./UpdatePlanRequest.js";
|
|
77
86
|
export * from "./UploadInitiation.js";
|
|
78
87
|
export * from "./UploadInitiationPart.js";
|
|
79
88
|
export * from "./User.js";
|
package/dist/api/types/index.js
CHANGED
|
@@ -28,6 +28,7 @@ __exportStar(require("./Country.js"), exports);
|
|
|
28
28
|
__exportStar(require("./CreateAutonomousOperatorRequest.js"), exports);
|
|
29
29
|
__exportStar(require("./CreateHumanOperatorRequest.js"), exports);
|
|
30
30
|
__exportStar(require("./CreateOperatorRequest.js"), exports);
|
|
31
|
+
__exportStar(require("./CreatePlanRequest.js"), exports);
|
|
31
32
|
__exportStar(require("./CreateTeleoperatedOperatorRequest.js"), exports);
|
|
32
33
|
__exportStar(require("./Currency.js"), exports);
|
|
33
34
|
__exportStar(require("./Device.js"), exports);
|
|
@@ -60,12 +61,15 @@ __exportStar(require("./ListResponseNotificationDeadLetter.js"), exports);
|
|
|
60
61
|
__exportStar(require("./ListResponseOperatorPosition.js"), exports);
|
|
61
62
|
__exportStar(require("./ListResponseOrganization.js"), exports);
|
|
62
63
|
__exportStar(require("./ListResponsePosition.js"), exports);
|
|
64
|
+
__exportStar(require("./ListResponsePricingPlan.js"), exports);
|
|
65
|
+
__exportStar(require("./ListResponseSubscriptionPlan.js"), exports);
|
|
63
66
|
__exportStar(require("./ListResponseTask.js"), exports);
|
|
64
67
|
__exportStar(require("./ListResponseTimezone.js"), exports);
|
|
65
68
|
__exportStar(require("./ListResponseUserResource.js"), exports);
|
|
66
69
|
__exportStar(require("./Membership.js"), exports);
|
|
67
70
|
__exportStar(require("./MembershipChoice.js"), exports);
|
|
68
71
|
__exportStar(require("./MembershipDriftResponse.js"), exports);
|
|
72
|
+
__exportStar(require("./Money.js"), exports);
|
|
69
73
|
__exportStar(require("./MqttToken.js"), exports);
|
|
70
74
|
__exportStar(require("./Notification.js"), exports);
|
|
71
75
|
__exportStar(require("./NotificationCategoryCount.js"), exports);
|
|
@@ -81,15 +85,20 @@ __exportStar(require("./Operator.js"), exports);
|
|
|
81
85
|
__exportStar(require("./OperatorAsset.js"), exports);
|
|
82
86
|
__exportStar(require("./OperatorPosition.js"), exports);
|
|
83
87
|
__exportStar(require("./Organization.js"), exports);
|
|
88
|
+
__exportStar(require("./PlanFeatures.js"), exports);
|
|
89
|
+
__exportStar(require("./PlanFeaturesRequest.js"), exports);
|
|
84
90
|
__exportStar(require("./Position.js"), exports);
|
|
91
|
+
__exportStar(require("./PricingPlan.js"), exports);
|
|
85
92
|
__exportStar(require("./ProblemDetail.js"), exports);
|
|
86
93
|
__exportStar(require("./QuietHours.js"), exports);
|
|
87
94
|
__exportStar(require("./RealtimeTicket.js"), exports);
|
|
88
95
|
__exportStar(require("./ReconcileResponse.js"), exports);
|
|
96
|
+
__exportStar(require("./SubscriptionPlan.js"), exports);
|
|
89
97
|
__exportStar(require("./Task.js"), exports);
|
|
90
98
|
__exportStar(require("./TaskAttemptPhoto.js"), exports);
|
|
91
99
|
__exportStar(require("./TaskAttemptPhotoThumbnail.js"), exports);
|
|
92
100
|
__exportStar(require("./Timezone.js"), exports);
|
|
101
|
+
__exportStar(require("./UpdatePlanRequest.js"), exports);
|
|
93
102
|
__exportStar(require("./UploadInitiation.js"), exports);
|
|
94
103
|
__exportStar(require("./UploadInitiationPart.js"), exports);
|
|
95
104
|
__exportStar(require("./User.js"), exports);
|