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