offline license sdk module
This commit is contained in:
parent
974b7d8514
commit
6ae59d767b
|
@ -55,6 +55,18 @@ export class HTTPError extends BudibaseError {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
export class NotFoundError extends HTTPError {
|
||||||
|
constructor(message: string) {
|
||||||
|
super(message, 404)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
export class BadRequestError extends HTTPError {
|
||||||
|
constructor(message: string) {
|
||||||
|
super(message, 400)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
// LICENSING
|
// LICENSING
|
||||||
|
|
||||||
export class UsageLimitError extends HTTPError {
|
export class UsageLimitError extends HTTPError {
|
||||||
|
|
|
@ -51,6 +51,7 @@ export interface Account extends CreateAccount {
|
||||||
licenseRequestedAt?: number
|
licenseRequestedAt?: number
|
||||||
licenseOverrides?: LicenseOverrides
|
licenseOverrides?: LicenseOverrides
|
||||||
quotaUsage?: QuotaUsage
|
quotaUsage?: QuotaUsage
|
||||||
|
offlineLicenseToken?: string
|
||||||
}
|
}
|
||||||
|
|
||||||
export interface PasswordAccount extends Account {
|
export interface PasswordAccount extends Account {
|
||||||
|
|
|
@ -9,6 +9,7 @@ export enum Feature {
|
||||||
BRANDING = "branding",
|
BRANDING = "branding",
|
||||||
SCIM = "scim",
|
SCIM = "scim",
|
||||||
SYNC_AUTOMATIONS = "syncAutomations",
|
SYNC_AUTOMATIONS = "syncAutomations",
|
||||||
|
OFFLINE = "offline",
|
||||||
}
|
}
|
||||||
|
|
||||||
export type PlanFeatures = { [key in PlanType]: Feature[] | undefined }
|
export type PlanFeatures = { [key in PlanType]: Feature[] | undefined }
|
||||||
|
|
|
@ -1,14 +1,15 @@
|
||||||
import { PurchasedPlan, Quotas, Feature, Billing } from "."
|
import { PurchasedPlan, Quotas, Feature, Billing } from "."
|
||||||
|
import { ISO8601 } from "../../shared"
|
||||||
|
|
||||||
export interface OfflineIdentifier {
|
export interface OfflineIdentifier {
|
||||||
installId: string,
|
installId: string,
|
||||||
tenantId: string
|
tenantId: string
|
||||||
}
|
}
|
||||||
|
|
||||||
// export interface OfflineLicense extends License {
|
export interface OfflineLicense extends License {
|
||||||
// identifier?: OfflineIdentifier
|
identifier: OfflineIdentifier
|
||||||
// identifierBase64: string
|
expireAt: ISO8601
|
||||||
// }
|
}
|
||||||
|
|
||||||
export interface License {
|
export interface License {
|
||||||
features: Feature[]
|
features: Feature[]
|
||||||
|
|
|
@ -1,3 +1,5 @@
|
||||||
export type DeepPartial<T> = {
|
export type DeepPartial<T> = {
|
||||||
[P in keyof T]?: T[P] extends object ? DeepPartial<T[P]> : T[P]
|
[P in keyof T]?: T[P] extends object ? DeepPartial<T[P]> : T[P]
|
||||||
}
|
}
|
||||||
|
|
||||||
|
export type ISO8601 = string
|
Loading…
Reference in New Issue