Skip to content

TaskRepository

Документация для класса TaskRepository.

Методы

execute

Описание

Исполнение задачи. У него ебанутая напичканная логика

HTTP метод: POST

URL: /api/v1/task/{param}/execute

Параметры:

ИмяТипОписание
payloadIExecuteTaskPayload

Возвращает: Promise<IDocument>


reassign

Описание

Переназначение исполнителя задачи

HTTP метод: POST

URL: /api/v1/task/{param}/reassign

Параметры:

ИмяТипОписание
taskIdnumber
payloadIReassignTaskPayload

Возвращает: Promise<IDocument>

Определения типов

Определения интерфейсов, перечислений и псевдонимов типов, используемых в методах этого репозитория.

IArgRegistry

СвойствоТипОписание
amount_factstring
amount_fact_ndsstring
amount_guarantee_contractstring
amount_guarantee_prepaymentstring
amount_guarantee_totalstring
amount_plan_totalstring
amount_result_ndsstring
amount_result_totalstring
aux_orders_idnull
codestring
contract_datenull | string
create_datestring
customer_addressstring
customer_address_kzstring
customer_bankstring
customer_bikstring
customer_bill_pidnumber
customer_emailnull | string
customer_idnumber
customer_iikstring
customer_leader_basis_kznumber
customer_leader_basis_runumber
customer_leader_namestring
customer_leader_pidnumber
customer_leader_titlestring
customer_leader_title_kzstring
customer_phonenumber
execute_datenull
fact_trade_methodnumber
finish_datestring
idnumber
is_additionalnumber
is_contract_procuring_confirmednumber
is_deletednumber
is_longtermnumber
is_manualnumber
is_offer_procuring_confirmednumber
is_quasinumber
is_sent_edocnumber
is_typicalnumber
is_uninterruptednumber
name_kzstring
name_rustring
ndsnumber
notify_daysnumber
numbernumber
parent_idnull
plan_trade_methodnumber
ref_agreement_types_idnumber
ref_agreements_statuses_idnumber
ref_buys_types_idnumber
ref_currency_codestring
ref_guarantee_reasons_idnull
ref_procuring_types_idnull
ref_subject_types_codestring
result_datenull
root_idnull
supplier_addressstring
supplier_address_kzstring
supplier_bankstring
supplier_bikstring
supplier_bill_pidnumber
supplier_emailstring
supplier_idnumber
supplier_iikstring
supplier_leader_basis_kznumber
supplier_leader_basis_runumber
supplier_leader_namestring
supplier_leader_pidnumber
supplier_leader_titlestring
supplier_leader_title_kzstring
supplier_ndsnumber
supplier_phonestring
sys_users_idnumber
trd_buy_idnull
update_datestring
update_statuses (опц.)`{
    id: number
    attempts: 'attempts'
    status: EDocumentStatusIds
    sent: boolean
}` |  |

IAttribute

СвойствоТипОписание
idnumber
filesIFile[]
is_activeRefNumericBoolean
is_hiddenRefNumericBoolean
is_readonlyRefNumericBoolean
numbernumber
namestring
valueAttributeValueT
attributeIAttributeMeta
template (опц.)ITemplate
template_values (опц.)ITemplateValue[]

IAttributeMeta

СвойствоТипОписание
is_activeRefNumericBoolean
namestring
numbernumber
aliasEAttributeAlias
attribute_typeIAttributeType

IAttributeType

СвойствоТипОписание
namestring
aliasEAttributeTypeAlias

IBank

СвойствоТипОписание
idnumber
namestring
addressstring
bikstring
codenumber
countryICountry
is_activeboolean
is_headboolean

IBill

СвойствоТипОписание
idnumber
iikstring
is_defaultboolean
kbeRefNumberInString
sys_subjects_idnumber
countryICountry
currencyICurrency
bankIBank
bill_typeOmit<RefEntityShell<undefined, EBillTypeId>, 'alias'>

IComment

СвойствоТипОписание
idnumber
created_atRefDateTime
updated_at (опц.)RefDateTime
userRefBaseUserProfile
contentstring
typeRefEntityShell
files (опц.)IFile[]

IContact

СвойствоТипОписание
idnumber
fulladdressstring
is_defaultboolean
phonestring
postalstring
sys_subjects_idnumber
contact_typeRefEntityShell
countryICountry
kato (опц.)IKATO

ICountry

СвойствоТипОписание
alpha2CountryIsoCode
codeRefNumberInString
idnumber
is_activeboolean
namestring

ICurrency

СвойствоТипОписание
idRefNumberInString
namestring
codenumber
is_activeboolean
current`{
    id: number
    code: string
    publish_date: string
    amount: string
    description: string
}` |  |

IDocument

СвойствоТипОписание
idnumber
namestring
numberstring
active_task (опц.)Omit<ITask, 'author' | 'task_status' | 'executors'>
active_task_comment (опц.)IDocumentActiveTaskComment
attributesIAttribute[]
authorIUser
currentSubjectIdnumber
dateRefDate
descriptionstring
executorIUser
progressBarIDocumentProgressBarItem[]
propertiesIDocumentProperty[]
selfStagesIDocumentSelfStage[]
root (опц.)IDocument
statusRefEntityShell
typeRefEntityShell
subjectISubject
signedForms (опц.)`{
    created_at: RefDateTime
    name: string
    url: string
}[]` |  |

| templatedForm (опц.) | { name: string url: string } | | | formForSign (опц.) | { name: string url: string } | | | counterparties (опц.) | { id: number identifier: string name: string }[] | | | rejection_reason (опц.) | IComment | | | revocation_reason (опц.) | IComment | | | children (опц.) | IDocument[] | | | template | ITemplate | | | template_values | ITemplateValue[] | | | coExecutings (опц.) | IDocumentParticipantShell[] | | | observers (опц.) | IUser[] | | | receiver (опц.) | IUser | | | receiver_subject (опц.) | ISubject | | | comments (опц.) | IComment[] | | | context (опц.) | IContext[] | | | context_attributes (опц.) | IAttribute[] | | | files_history (опц.) | IHistoryFile[] | | | document_type_context (опц.) | RefEntityShell | | | is_external | boolean | | | agr_registry (опц.) | IArgRegistry | |


IDocumentActiveTaskComment

СвойствоТипОписание
idnumber
contentstring

IDocumentParticipantShell

СвойствоТипОписание
idnumber
comments (опц.)IComment[]
document (опц.)null
due_dateRefSystemDateTime
executed_at (опц.)RefSystemDateTime
executoruserT
task_executing`{
    assigned_at: RefDateTime
    due_date: RefDateTime
    executed_at: RefDateTime
    result: boolean \| null
    task_id: ITask['id']
}` |  |

IDocumentProgressBarItem

СвойствоТипОписание
namestring
successRefEntitySuccess

IDocumentProperty

СвойствоТипОписание
idnumber
ref_document_properties_codeEDocumentPropertyAlias
valuestring
propertyRefEntityShell

IDocumentSelfStage

СвойствоТипОписание
idnumber
namenull
numbernumber
stage_typeRefEntityShell
stage_statusRefEntityShell
tasksITask[]

IExecuteTaskPayload

СвойствоТипОписание
approve (опц.)boolean
cms (опц.)string
taskIdnumber
comment (опц.)string
number (опц.)string
date (опц.)string
executor_id (опц.)number
file_ids (опц.)number[]
action (опц.)'execute' | 'approve' | 'reject'
non_conclusion (опц.)boolean

IFile

СвойствоТипОписание
idnumber
namestring
is_activeRefNumericBoolean
created_at (опц.)RefSystemDateTime
sys_file`{
    id: number
    name: string
    full_path: string
    mime: RefMimeTypeFromDb
    path: string
    size: number
}` |  |

IFillableAttributeTableData

СвойствоТипОписание
columnRefNumberInString
tableRefNumberInString

IHistoryFile

СвойствоТипОписание
idnumber
authorRefBaseUserProfile | null
created_atRefSystemDateTime
is_activeRefNumericBoolean
is_actualboolean
namestring
sys_fileIFile
updated_atRefSystemDateTime
versionnumber

IKATO

СвойствоТипОписание
idnumber
full_namestring
namestring
testring

IReassignTaskPayload

СвойствоТипОписание
commentstring
due_datestring
executor_idnumber
user_idnumber

ISubject

СвойствоТипОписание
idnumberId компании
namestring
name_rustring
name_kzstring
name_enstring
created_atRefDate
identifierstring
parent_id (опц.)RefParentId
billsIBill[]
contactsIContact[]
countryICountry
logo`{
    default: boolean
    url: string
}` |  |

| kopf | { id: number name: number alias: string code: string } | | | available_document_types | Omit<RefEntityShell<EDocumentTypeAlias, EDocumentTypeIds>, 'name'>[] | | | is_customer (опц.) | boolean | | | is_supplier (опц.) | boolean | |


ISubjectRole

СвойствоТипОписание
idnumber
namestring
currentboolean
identifierstring
kopfISubject['kopf']
permissionsstring[]
rolesIUserRole[]

ITask

СвойствоТипОписание
idnumber
assigned_at (опц.)RefDateTime
due_dateRefDateTime
executed_at (опц.)RefDateTime
authorRefBaseUserProfile
task_statusRefEntityShell
task_typeRefEntityShell
executorsITaskExecutor[]

ITaskExecutor

СвойствоТипОписание
idnumber
assigned_atRefDateTime
due_dateRefDateTime
executed_atRefDateTime
resultRefEntitySuccess
signByLink (опц.)ITaskSignByLink
userRefBaseUserProfile
subjectISubject

ITaskRepository

Интерфейс не содержит собственных свойств и не наследует другие локальные интерфейсы.


СвойствоТипОписание
comment (опц.)string
due_dateRefDateTime
emailstring
full_namestring
idnumber
identifierstring
iinstring
subject_identifierstring
subject_namestring
sys_documents_idnumber
sys_stages_idnumber
sys_task_executors_idnumber
sys_tasks_idnumber
ttlnumber
uuidstring

ITemplate

СвойствоТипОписание
idnumber
namestring
fillableAttributesITemplateFillableAttribute[]

ITemplateFillableAttribute

СвойствоТипОписание
default_valueFillableAttributeValueT
descriptionstring | null
groupnumber
idnumber
is_requiredboolean
labelstring
languageRefEntityShell
place_typeETemplatePlaceTypeAlias
reference (опц.)ITemplateFillableReference[] | null
tabRefEntityShell
value_typeETemplateValueTypeAlias
table_data (опц.)IFillableAttributeTableData

ITemplateFillableReference

СвойствоТипОписание
idnumber
is_activeboolean
valuestring | number

ITemplateValue

СвойствоТипОписание
idnumber
sys_documents_idIDocument['id']
sys_template_attributes_idITemplateFillableAttribute['id']
sys_templates_idITemplate['id']
valueFillableAttributeValueT

IUser

СвойствоТипОписание
idnumber
created_atRefDate
birth_dateRefDate
emailstring
email_verifiedboolean
verification_token (опц.)string
identifierstring
is_disableboolean
phonestring
set_passwordboolean
lastname (опц.)string
namestring
surname (опц.)string
unread_notifications_countnumber
permissionsEUserPermissions[]
profile_photo_urlRefEntityMedia
rolesIUserRole[]
subject_rolesISubjectRole[]
is_disabled_reason (опц.)string
has_password (опц.)boolean

IUserRole

СвойствоТипОписание
idnumber
namestring
aliasEUserRoleAlias
created_atRefDate

RefBaseUserProfile

СвойствоТипОписание
emailstring
idnumber
identifierstring
lastname (опц.)string
namestring
phonestring
surname (опц.)string

RefEntityMedia

СвойствоТипОписание
defaultboolean
urlstring

RefEntityShell

СвойствоТипОписание
idid
aliasalias
namestring