@aptly-as/types
Advanced tools
Comparing version 1.10.9 to 1.11.0
@@ -28,2 +28,4 @@ import { AptlyScope } from './scope.js'; | ||
organization: Pick<AptlyOrganization, '_id' | 'slug' | 'name'>; | ||
project?: string; | ||
unit?: string; | ||
app: AptlyApp; | ||
@@ -30,0 +32,0 @@ config: AptlyOrganizationAppConfig<S>; |
@@ -30,1 +30,15 @@ import { AptlyErrorCode } from '../enums/index.js'; | ||
} | ||
export declare class AptlyApiError<R> extends Error { | ||
readonly id: string; | ||
readonly status: string; | ||
readonly detail: string; | ||
readonly link: string; | ||
readonly code: AptlyErrorCode; | ||
readonly error?: Error; | ||
readonly errors?: AptlyErrorSimple[]; | ||
readonly response?: R; | ||
constructor(error: AptlyError & { | ||
error?: Error; | ||
response?: R; | ||
}); | ||
} |
@@ -1,1 +0,13 @@ | ||
export {}; | ||
export class AptlyApiError extends Error { | ||
constructor(error) { | ||
super(error.title); | ||
this.id = error.id; | ||
this.status = error.status; | ||
this.detail = error.detail || ''; | ||
this.link = error.link || ''; | ||
this.code = error.code; | ||
this.error = error.error; | ||
this.errors = error.errors; | ||
this.response = error.response; | ||
} | ||
} |
@@ -83,2 +83,3 @@ export * from './document.js'; | ||
export declare enum AptlyErrorCode { | ||
Default = "default", | ||
InvalidFields = "invalid-fields", | ||
@@ -85,0 +86,0 @@ SessionExpired = "session-expired" |
@@ -96,2 +96,3 @@ export * from './document.js'; | ||
(function (AptlyErrorCode) { | ||
AptlyErrorCode["Default"] = "default"; | ||
AptlyErrorCode["InvalidFields"] = "invalid-fields"; | ||
@@ -98,0 +99,0 @@ AptlyErrorCode["SessionExpired"] = "session-expired"; |
@@ -47,3 +47,9 @@ import { AptlyBaseSchema } from './extends.js'; | ||
} | ||
export type AptlyAppInjectionMenu = `organization-${AptlyOrganizationInjection}` | `project-${AptlyProjectInjection}`; | ||
export declare enum AptlyUnitInjection { | ||
Base = "", | ||
Options = "options", | ||
Support = "support", | ||
Admin = "admin" | ||
} | ||
export type AptlyAppInjectionMenu = `organization-${AptlyOrganizationInjection}` | `project-${AptlyProjectInjection}` | `unit-${AptlyUnitInjection}`; | ||
export declare enum AptlyAppInjectionType { | ||
@@ -50,0 +56,0 @@ Iframe = "iframe" |
@@ -20,2 +20,9 @@ export var AptlyOrganizationInjection; | ||
})(AptlyProjectInjection || (AptlyProjectInjection = {})); | ||
export var AptlyUnitInjection; | ||
(function (AptlyUnitInjection) { | ||
AptlyUnitInjection["Base"] = ""; | ||
AptlyUnitInjection["Options"] = "options"; | ||
AptlyUnitInjection["Support"] = "support"; | ||
AptlyUnitInjection["Admin"] = "admin"; | ||
})(AptlyUnitInjection || (AptlyUnitInjection = {})); | ||
export var AptlyAppInjectionType; | ||
@@ -22,0 +29,0 @@ (function (AptlyAppInjectionType) { |
{ | ||
"name": "@aptly-as/types", | ||
"version": "1.10.9", | ||
"version": "1.11.0", | ||
"description": "Aptly types and enums", | ||
@@ -5,0 +5,0 @@ "type": "module", |
87489
2274