@aptly-as/types
Advanced tools
Comparing version 2.2.2 to 2.2.3
@@ -17,2 +17,3 @@ import { AptlyOrder } from '../models/index.js'; | ||
returnvalue: RETURN; | ||
failedReason?: string; | ||
} | ||
@@ -19,0 +20,0 @@ export type AptlyJobOrder = AptlyJob<any, { |
@@ -20,6 +20,9 @@ import { AptlyBaseSchema } from './extends.js'; | ||
sign?: { | ||
costPer?: number; | ||
order: string; | ||
orderUrl: string; | ||
}; | ||
} | ||
export interface AptlyAppSignMethod { | ||
value: string; | ||
label: string; | ||
} | ||
export declare enum AptlyAppImplementation { | ||
@@ -29,3 +32,4 @@ Sign = "sign" | ||
export declare enum AptlyAppImplementationSetting { | ||
SignCostPer = "costPerSign" | ||
SignCostPer = "costPerSign", | ||
SignMethod = "signMethod" | ||
} | ||
@@ -32,0 +36,0 @@ export type AptlyAppSetting = AptlyAppSettingSchema<string>; |
@@ -8,2 +8,3 @@ export var AptlyAppImplementation; | ||
AptlyAppImplementationSetting["SignCostPer"] = "costPerSign"; | ||
AptlyAppImplementationSetting["SignMethod"] = "signMethod"; | ||
})(AptlyAppImplementationSetting || (AptlyAppImplementationSetting = {})); | ||
@@ -10,0 +11,0 @@ export var AptlyOrganizationInjection; |
import { AptlyOrderStatus } from '../enums/index.js'; | ||
import { AptlyAppSchema } from './app.js'; | ||
import { AptlyAppImplementationSetting, AptlyAppSchema } from './app.js'; | ||
import { AptlyDocumentSchema } from './document.js'; | ||
import { AptlyOrganizationSchema } from './organization.js'; | ||
import { AptlyOrganizationAppConfigSchema, AptlyOrganizationSchema } from './organization.js'; | ||
import { AptlyProject, AptlyProjectPeriodSchema, AptlyProjectSchema } from './project.js'; | ||
@@ -14,3 +14,3 @@ import { AptlyUnit, AptlyUnitItemParamSchema, AptlyUnitSchema } from './unit.js'; | ||
project: ID | AptlyProjectSchema<ID, DATE>; | ||
period: ID | AptlyProjectPeriodSchema<ID, DATE>; | ||
period?: ID | AptlyProjectPeriodSchema<ID, DATE>; | ||
unit: ID | AptlyUnitSchema<ID, DATE>; | ||
@@ -28,2 +28,7 @@ signers: (ID | AptlyUserSchema<ID, DATE>)[]; | ||
emailText?: string; | ||
approved?: { | ||
action?: AptlyOrderAction; | ||
user?: ID | AptlyUserSchema<ID, DATE>; | ||
at?: DATE; | ||
}; | ||
created: DATE; | ||
@@ -34,3 +39,3 @@ } | ||
_id: ID; | ||
user: ID; | ||
user: ID | AptlyUserSchema<ID, DATE>; | ||
type: AptlyOrderSigneeType; | ||
@@ -86,9 +91,27 @@ url: string; | ||
} | ||
export type AptlyOrderActionItem = AptlyOrderActionItemSchema<string, string>; | ||
export interface AptlyOrderActionItemSchema<ID, DATE> { | ||
export interface AptlyOrderActionPostBody { | ||
action: AptlyOrderAction | null; | ||
document?: string | null; | ||
app?: string; | ||
emailSubject: string; | ||
emailText: string; | ||
users: AptlyOrderActionPostBodyUser[]; | ||
deadlineInDays?: number; | ||
} | ||
export interface AptlyOrderActionPostBodyUser { | ||
user: string; | ||
signMethod?: string; | ||
isAdmin?: boolean; | ||
} | ||
export type AptlyOrderActionItem<S extends object = object> = AptlyOrderActionItemSchema<string, string, S>; | ||
export interface AptlyOrderActionItemSchema<ID, DATE, S extends object> { | ||
action: AptlyOrderAction; | ||
path: string; | ||
app?: Pick<AptlyAppSchema<ID, DATE>, '_id' | 'name' | 'sign'>; | ||
costPerSign?: number; | ||
app?: Pick<AptlyAppSchema<ID, DATE>, '_id' | 'name' | 'sign' | 'logo' | 'settings'>; | ||
appSettings?: AptlyOrganizationAppConfigSchema<ID, DATE, S>['settings']; | ||
} | ||
export interface AptlyOrderActionItemSignSettings { | ||
[AptlyAppImplementationSetting.SignCostPer]: number; | ||
[AptlyAppImplementationSetting.SignMethod]: string; | ||
} | ||
export interface AptlyOrderActionSignData { | ||
@@ -100,5 +123,9 @@ project: Pick<AptlyProject, '_id' | 'name'> & { | ||
order: Pick<AptlyOrder, '_id' | 'orderNumber' | 'receipt' | 'period'>; | ||
users: Pick<AptlyUser, '_id' | 'firstName' | 'lastName' | 'fullName' | 'email' | 'phone' | 'language' | 'profileImage'>[]; | ||
admins: Pick<AptlyUser, '_id' | 'firstName' | 'lastName' | 'fullName' | 'email' | 'phone' | 'language' | 'profileImage'>[]; | ||
emailText?: string; | ||
signees: AptlyorderActionSignDataSignee[]; | ||
deadlineInDays?: number; | ||
} | ||
export interface AptlyorderActionSignDataSignee { | ||
user: AptlyUser; | ||
signMethod?: string; | ||
isAdmin?: boolean; | ||
} |
@@ -0,1 +1,2 @@ | ||
import { AptlyAppImplementationSetting } from './app.js'; | ||
export var AptlyOrderSigneeType; | ||
@@ -2,0 +3,0 @@ (function (AptlyOrderSigneeType) { |
@@ -50,5 +50,12 @@ import { AptlyModules } from '../core/index.js'; | ||
permissions: AptlyOrganizationRoles[]; | ||
position?: AptlyOrganizationMemberPosition; | ||
projects?: (ID | AptlyProducerSchema<ID, DATE>)[] | null; | ||
departments?: (ID | AptlyDepartmentGeneric<ID, DATE>)[] | null; | ||
} | ||
export declare enum AptlyOrganizationMemberPosition { | ||
Owner = 0, | ||
Admin = 1, | ||
Accounting = 2, | ||
User = 10 | ||
} | ||
export type AptlyOrganizationInvite = AptlyOrganizationInviteSchema<string, string>; | ||
@@ -55,0 +62,0 @@ export interface AptlyOrganizationInviteSchema<ID, DATE> { |
@@ -1,1 +0,7 @@ | ||
export {}; | ||
export var AptlyOrganizationMemberPosition; | ||
(function (AptlyOrganizationMemberPosition) { | ||
AptlyOrganizationMemberPosition[AptlyOrganizationMemberPosition["Owner"] = 0] = "Owner"; | ||
AptlyOrganizationMemberPosition[AptlyOrganizationMemberPosition["Admin"] = 1] = "Admin"; | ||
AptlyOrganizationMemberPosition[AptlyOrganizationMemberPosition["Accounting"] = 2] = "Accounting"; | ||
AptlyOrganizationMemberPosition[AptlyOrganizationMemberPosition["User"] = 10] = "User"; | ||
})(AptlyOrganizationMemberPosition || (AptlyOrganizationMemberPosition = {})); |
@@ -31,3 +31,4 @@ import { AptlyOrganizationSchema } from './organization.js'; | ||
OrderSigned = "order-signed", | ||
OrderCompleted = "order-completed" | ||
OrderCompleted = "order-completed", | ||
ActionRecipients = "action_recipients" | ||
} |
@@ -13,2 +13,3 @@ export var AptlyUnitEmailType; | ||
AptlyUnitEmailType["OrderCompleted"] = "order-completed"; | ||
AptlyUnitEmailType["ActionRecipients"] = "action_recipients"; | ||
})(AptlyUnitEmailType || (AptlyUnitEmailType = {})); |
{ | ||
"name": "@aptly-as/types", | ||
"version": "2.2.2", | ||
"version": "2.2.3", | ||
"description": "Aptly types and enums", | ||
@@ -5,0 +5,0 @@ "type": "module", |
97392
2587