feat(cooptypes): TS-зеркала выхода из кооператива (registrator + soviet)
- interfaces/registrator: IExitcoop/IConfirmexit/ICompletexit/IDeclinexit + IExit (таблица exits) — синхронно с обновлённым ABI registrator; - interfaces/soviet: IDelpartcpnt; - action-зеркало registrator ExitCoop (член-инициируемое действие, как RegisterUser); внутренние коллбэки confirmexit/completexit/declinexit конструируются каскадом из soviet/gateway и в зеркалах не нуждаются (как confirmreg/addpartcpnt); - table-зеркало registrator Exits (scope=coopname) для чтения статуса выхода и суммы возврата на бэкенде/фронте. tsc --noEmit cooptypes — чисто. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -0,0 +1,15 @@
|
||||
import * as Permissions from '../../../common/permissions'
|
||||
import type * as Registrator from '../../../interfaces/registrator'
|
||||
import { Actors } from '../../../common'
|
||||
|
||||
export const authorizations = [{ permissions: [Permissions.active, Permissions.special], actor: Actors._admin }] as const
|
||||
|
||||
/**
|
||||
* Имя действия
|
||||
*/
|
||||
export const actionName = 'exitcoop'
|
||||
|
||||
/**
|
||||
* @interface
|
||||
*/
|
||||
export type IExitCoop = Registrator.IExitcoop
|
||||
@@ -28,6 +28,11 @@ export * as CreateAccount from './createAccount'
|
||||
*/
|
||||
export * as RegisterUser from './registerUser'
|
||||
|
||||
/**
|
||||
* Действие подачи заявления на выход пайщика из кооператива (возврат паевого взноса)
|
||||
*/
|
||||
export * as ExitCoop from './exitCoop'
|
||||
|
||||
/**
|
||||
* Действие регистрации карточки организации в кооперативе
|
||||
*/
|
||||
|
||||
@@ -0,0 +1,19 @@
|
||||
import type * as Registrator from '../../../interfaces/registrator'
|
||||
import { Actors } from '../../../common'
|
||||
|
||||
/**
|
||||
* Имя таблицы
|
||||
*/
|
||||
export const tableName = 'exits'
|
||||
|
||||
/**
|
||||
* Таблица хранится в области памяти {@link Actors._coopname | кооператива}.
|
||||
*/
|
||||
export const scope = Actors._coopname
|
||||
|
||||
/**
|
||||
* @interface
|
||||
* Реестр заявлений пайщиков на выход из кооператива и сопровождающих их
|
||||
* процессов возврата паевого взноса.
|
||||
*/
|
||||
export type IExit = Registrator.IExit
|
||||
@@ -8,3 +8,8 @@ export * as Accounts from './accounts'
|
||||
* Таблица содержит реестр кооперативов системы.
|
||||
*/
|
||||
export * as Cooperatives from './cooperatives'
|
||||
|
||||
/**
|
||||
* Таблица содержит реестр заявлений пайщиков на выход из кооператива.
|
||||
*/
|
||||
export * as Exits from './exits'
|
||||
|
||||
@@ -53,6 +53,17 @@ export interface IChangekey {
|
||||
public_key: IPublicKey
|
||||
}
|
||||
|
||||
export interface ICompletexit {
|
||||
coopname: IName
|
||||
exit_hash: IChecksum256
|
||||
}
|
||||
|
||||
export interface IConfirmexit {
|
||||
coopname: IName
|
||||
exit_hash: IChecksum256
|
||||
authorization: IDocument2
|
||||
}
|
||||
|
||||
export interface IConfirmpay {
|
||||
coopname: IName
|
||||
registration_hash: IChecksum256
|
||||
@@ -122,6 +133,12 @@ export interface IDeclinereg {
|
||||
reason: string
|
||||
}
|
||||
|
||||
export interface IDeclinexit {
|
||||
coopname: IName
|
||||
exit_hash: IChecksum256
|
||||
reason: string
|
||||
}
|
||||
|
||||
export interface IDelcoop {
|
||||
registrator: IName
|
||||
coopname: IName
|
||||
@@ -151,6 +168,24 @@ export interface IEnabranches {
|
||||
coopname: IName
|
||||
}
|
||||
|
||||
export interface IExit {
|
||||
username: IName
|
||||
coopname: IName
|
||||
status: IName
|
||||
created_at: ITimePointSec
|
||||
statement: IDocument2
|
||||
approved_statement: IDocument2
|
||||
exit_hash: IChecksum256
|
||||
quantity: IAsset
|
||||
}
|
||||
|
||||
export interface IExitcoop {
|
||||
coopname: IName
|
||||
username: IName
|
||||
exit_hash: IChecksum256
|
||||
statement: IDocument2
|
||||
}
|
||||
|
||||
export interface IInit {
|
||||
}
|
||||
|
||||
|
||||
@@ -343,6 +343,11 @@ export interface IDeletebranch {
|
||||
braname: IName
|
||||
}
|
||||
|
||||
export interface IDelpartcpnt {
|
||||
coopname: IName
|
||||
username: IName
|
||||
}
|
||||
|
||||
export interface IDisableprog {
|
||||
coopname: IName
|
||||
program_id: IUint64
|
||||
|
||||
Reference in New Issue
Block a user