SubjectRelations
Документация для класса SubjectRelations.
Методы
getSubjectRelations
Описание
Получить списка связей компаний
HTTP метод: GET
URL: /api-admin/v1/subject-relations
Параметры:
| Имя | Тип | Описание |
|---|---|---|
payload | IGetSubjectRelationsPayload |
Возвращает: Promise<IPaginationShell<ISubjectRelation[]>>
createSubjectRelation
Описание
Создание записи связи компаний
HTTP метод: POST
URL: /api-admin/v1/subject-relations
Параметры:
| Имя | Тип | Описание |
|---|---|---|
payload | ISubjectEditorForm |
Возвращает: Promise<ISubjectRelation>
updateSubjectRelation
Описание
Обновление записи "Связи компаний"
HTTP метод: PUT
URL: /api-admin/v1/subject-relations/{param}
Параметры:
| Имя | Тип | Описание |
|---|---|---|
relationId | ISubjectRelation['id'] | |
payload | Pick<ISubjectEditorForm, 'type' | 'status'> |
Возвращает: Promise<ISubjectRelation>
getSubjectRelationById
Описание
Получение записи "Связи компаний" по ID
HTTP метод: GET
URL: /api-admin/v1/subject-relations/{param}
Параметры:
| Имя | Тип | Описание |
|---|---|---|
relationId | ISubjectRelation['id'] |
Возвращает: Promise<ISubjectRelation>
Определения типов
Определения интерфейсов, перечислений и псевдонимов типов, используемых в методах этого репозитория.
IBank
| Свойство | Тип | Описание |
|---|---|---|
id | number | |
name | string | |
address | string | |
bik | string | |
code | number | |
country | ICountry | |
is_active | boolean | |
is_head | boolean |
IBill
| Свойство | Тип | Описание |
|---|---|---|
id | number | |
iik | string | |
is_default | boolean | |
kbe | RefNumberInString | |
sys_subjects_id | number | |
country | ICountry | |
currency | ICurrency | |
bank | IBank | |
bill_type | Omit<RefEntityShell<undefined, EBillTypeId>, 'alias'> |
IContact
| Свойство | Тип | Описание |
|---|---|---|
id | number | |
fulladdress | string | |
is_default | boolean | |
phone | string | |
postal | string | |
sys_subjects_id | number | |
contact_type | RefEntityShell | |
country | ICountry | |
kato (опц.) | IKATO |
ICountry
| Свойство | Тип | Описание |
|---|---|---|
alpha2 | CountryIsoCode | |
code | RefNumberInString | |
id | number | |
is_active | boolean | |
name | string |
ICurrency
| Свойство | Тип | Описание |
|---|---|---|
id | RefNumberInString | |
name | string | |
code | number | |
is_active | boolean | |
current | `{ |
id: number
code: string
publish_date: string
amount: string
description: string
}` | |
IGetSubjectRelationsPayload
Наследует: IPaginationPayload
| Свойство | Тип | Описание |
|---|---|---|
q (опц.) | string | |
ids (опц.) | ISubject['id'][] | |
type (опц.) | ESubjectRelationType | |
status (опц.) | ESubjectRelationStatus | |
sort (опц.) | EGetSubjectRelationsSort | |
order (опц.) | EGetSubjectRelationsOrder |
IKATO
| Свойство | Тип | Описание |
|---|---|---|
id | number | |
full_name | string | |
name | string | |
te | string |
IPaginationLinks
| Свойство | Тип | Описание |
|---|---|---|
first | string | null | |
last | string | null | |
next | string | null | |
prev | string | null |
IPaginationMeta
| Свойство | Тип | Описание |
|---|---|---|
path | string | |
current_page | number | |
per_page | number | |
to | number | |
from | number | |
total | number | |
links | IPaginationMetaLink[] | |
last_page | number |
IPaginationMetaLink
| Свойство | Тип | Описание |
|---|---|---|
active | boolean | |
label | string | |
url | string | null |
IPaginationPayload
| Свойство | Тип | Описание |
|---|---|---|
page | number | |
per_page | number |
IPaginationShell
| Свойство | Тип | Описание |
|---|---|---|
links | IPaginationLinks[] | |
meta | IPaginationMeta | |
data | list |
ISubject
| Свойство | Тип | Описание |
|---|---|---|
id | number | Id компании |
name | string | |
name_ru | string | |
name_kz | string | |
name_en | string | |
created_at | RefDate | |
identifier | string | |
parent_id (опц.) | RefParentId | |
bills | IBill[] | |
contacts | IContact[] | |
country | ICountry | |
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 | |
ISubjectEditorForm
| Свойство | Тип | Описание |
|---|---|---|
parent_id | ISubject['id'] | null | |
subject_id | ISubject['id'] | null | |
type | ESubjectRelationType | null | |
status | ESubjectRelationStatus | null |
ISubjectRelation
| Свойство | Тип | Описание |
|---|---|---|
id | number | |
parent | ISubject | |
child | ISubject | |
type | RefEntityShell | |
status | RefEntityShell | |
created_at | RefDate | |
updated_at | RefDate |
ISubjectRelationsRepository
Интерфейс не содержит собственных свойств и не наследует другие локальные интерфейсы.
RefEntityShell
| Свойство | Тип | Описание |
|---|---|---|
id | id | |
alias | alias | |
name | string |