@coopenomics/innercoop 2026.9.30 → 2026.10.14-1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.d.mts CHANGED
@@ -1,4 +1,5 @@
1
- export { ACCOUNT_PORT, AGREEMENT_CATALOG_PORT, BRANCH_PORT, CANDIDATE_PORT, CHAIN_CHANGES_PORT, CHAIN_DELTA_WAIT_PORT, CHAIN_PORT, CHAIN_RESOURCES_PORT, COOPERATIVE_VARS_PORT, COOP_CREDENTIAL_PORT, COUNCIL_PORT, CreateTrackingRuleInput, DECISION_TRACKING_PORT, DOCUMENT_APPROVAL_PORT, DOCUMENT_DECLARATION_PORT, DOCUMENT_PORT, DecisionEventType, DecisionEventTypeString, DecisionProcessedResult, DecisionTrackedEvent, EXTENSION_CONFIG_PORT, EXTENSION_DATABASE_PORT, ExtendedMeetStatus, FILE_STORAGE_PORT, FREE_DECISION_PORT, IAccountPort, IAgreementCatalogPort, IBranchPort, ICandidatePort, IChainChangesPort, IChainDeltaWaitPort, IChainPort, IChainResourcesPort, ICoopCredentialPort, ICooperativeVarsPort, ICouncilPort, IDecisionTrackingPort, IDocumentApprovalPort, IDocumentDeclarationPort, IDocumentPort, IExtensionConfigPort, IExtensionDatabasePort, IFileStoragePort, IFreeDecisionPort, IIndividualPort, IIntegrationSettingsPort, ILedger2HistoryPort, ILoggerPort, IMeetPort, IMessageChannelPort, IMetaDocument, IMonoAccount, IMutationLogPort, INDIVIDUAL_PORT, INTEGRATION_SETTINGS_PORT, INotificationPort, IOnboardingStepRegistryPort, IOrganizationPort, IPaymentDeskPort, IPaymentMethodPort, IPaymentNoticeLogPort, IPaymentPollingStatePort, IPaymentPort, IPaymentProvider, IPaymentProviderRegistryPort, IProgramAgreementPort, IProgramWalletPort, IRealtimeChannelPort, IRegistrationRegistryPort, ISecretCipherPort, ISignatureInfo, ISignedDocument, IUserCertificatePort, IUserDataPort, IUserDirectoryPort, IUserWalletPort, IVaultPort, IVerificationPort, InnerAccount, InnerAccountType, InnerAgreementCatalogItem, InnerAgreementRegistration, InnerBankTransferData, InnerBranch, InnerCandidate, InnerCandidateDocument, InnerCandidateFilter, InnerChainAccountResources, InnerChainAccountRow, InnerChainAction, InnerChainActionRecord, InnerChainChangesTable, InnerChainDelta, InnerChainDeltaWaitQuery, InnerChainTxWait, InnerCoopAgreement, InnerCoopProgram, InnerCoopUser, InnerCooperativeVars, InnerCouncilDecision, InnerDocumentAggregate, InnerDocumentApproval, InnerDocumentDeclaration, InnerDocumentKind, InnerDocumentValidation, InnerEndorsementCredential, InnerEnsureProgramParams, InnerEnsureProgramResult, InnerExtensionDatabaseConnection, InnerFileStorageBackendUnavailableError, InnerFileStorageBody, InnerFileStorageBucket, InnerFileStorageBucketNotConfiguredError, InnerFileStorageBucketSpec, InnerFileStorageError, InnerFileStorageGetReadUrlOptions, InnerFileStorageMetadataValidationError, InnerFileStorageMimeRejectedError, InnerFileStorageObjectMetadata, InnerFileStorageObjectNotFoundError, InnerFileStorageObjectTooLargeError, InnerFileStoragePutOptions, InnerFileStoragePutResult, InnerFreeDecisionDocument, InnerFreeDecisionProject, InnerGenerateDocumentData, InnerGenerateDocumentOptions, InnerGenerateDocumentRequest, InnerGenerateProjectFreeDecisionData, InnerGeneratedDocument, InnerGetAccountsFilter, InnerGetMeetInput, InnerGetMeetsInput, InnerIndividual, InnerIntakeFormRegistration, InnerIntakeJsonSchema, InnerIntakeJsonSchemaProperty, InnerKeyPermission, InnerLedger2Account, InnerLedger2HistoryFilter, InnerLedger2HistoryResult, InnerLedger2Operation, InnerLedger2Wallet, InnerLogMeta, InnerMeet, InnerMeetDraft, InnerMeetProcessing, InnerMeetRow, InnerMutationLogEntry, InnerMutationLogFilter, InnerNotifyActor, InnerNotifyInput, InnerNotifyRecipient, InnerNotifyResult, InnerOnboardingCompletedPayload, InnerOnboardingDecisionKind, InnerOnboardingGenerator, InnerOnboardingStep, InnerOnboardingStepProposal, InnerOrganization, InnerOrganizationDetails, InnerOrganizationType, InnerPage, InnerPageRequest, InnerPaginatedAccounts, InnerPaginationOptions, InnerParticipantRegisteredEvent, InnerPassport, InnerPayment, InnerPaymentDetails, InnerPaymentDraft, InnerPaymentFilters, InnerPaymentMethod, InnerPaymentMethodDraft, InnerPaymentMethodQuery, InnerPaymentMethodType, InnerPaymentNotice, InnerPaymentPollingState, InnerPrivateAccount, InnerProgramRegistration, InnerProgramSignature, InnerProgramWallet, InnerProgramWalletFilter, InnerProposeOnboardingStepInput, InnerPublishProjectFreeDecisionInput, InnerRepresentative, InnerSbpData, InnerSetPaymentStatusInput, InnerSignProgramAgreementInput, InnerSystemOutgoingPaymentInput, InnerTransactResult, InnerUserCertificate, InnerUserDataDraft, InnerUserDataFilters, InnerUserDataRecord, InnerUserWallet, InnerVerificationCheck, InnerVerificationEntry, LEDGER2_HISTORY_PORT, LOGGER_PORT, MEET_PORT, MESSAGE_CHANNEL_PORT, MUTATION_LOG_PORT, MonoAccountStatus, NOTIFICATION_PORT, ONBOARDING_COMPLETED_EVENT, ONBOARDING_STEP_REGISTRY_PORT, ORGANIZATION_PORT, PARTICIPANT_REGISTERED_EVENT, PAYMENT_DESK_PORT, PAYMENT_METHOD_PORT, PAYMENT_NOTICE_LOG_PORT, PAYMENT_POLLING_STATE_PORT, PAYMENT_PORT, PAYMENT_PROVIDER_REGISTRY_PORT, PROGRAM_AGREEMENT_PORT, PROGRAM_ID_BY_TYPE, PROGRAM_TYPE_BY_ID, PROGRAM_WALLET_PORT, PaymentDirection, PaymentStatus, PaymentType, ProgramKey, ProgramType, REALTIME_CHANNEL_PORT, REGISTRATION_REGISTRY_PORT, SECRET_CIPHER_PORT, TrackingRule, USER_CERTIFICATE_PORT, USER_DATA_PORT, USER_DIRECTORY_PORT, USER_WALLET_PORT, VAT_EXEMPT_NOTE, VAULT_PORT, VERIFICATION_PORT, getProgramId, getProgramType, isEligibleForParticipantMassNotification } from './core-ports/index.mjs';
1
+ import { InnerAccountType, InnerProgramRegistration, InnerAgreementRegistration } from './core-ports/index.mjs';
2
+ export { ACCOUNTING_REGISTRY_PORT, ACCOUNT_PORT, AGREEMENT_CATALOG_PORT, BRANCH_PORT, CANDIDATE_PORT, CHAIN_CHANGES_PORT, CHAIN_DELTA_WAIT_PORT, CHAIN_PORT, CHAIN_RESOURCES_PORT, COOPERATIVE_VARS_PORT, COOP_CREDENTIAL_PORT, COUNCIL_PORT, CreateTrackingRuleInput, DECISION_TRACKING_PORT, DOCUMENT_APPROVAL_PORT, DOCUMENT_DECLARATION_PORT, DOCUMENT_PORT, DecisionEventType, DecisionEventTypeString, DecisionProcessedResult, DecisionTrackedEvent, EXTENSION_CONFIG_PORT, EXTENSION_DATABASE_PORT, ExtendedMeetStatus, FILE_STORAGE_PORT, FREE_DECISION_PORT, IAccountPort, IAccountingRegistryPort, IAgreementCatalogPort, IBranchPort, ICandidatePort, IChainChangesPort, IChainDeltaWaitPort, IChainPort, IChainResourcesPort, ICoopCredentialPort, ICooperativeVarsPort, ICouncilPort, IDecisionTrackingPort, IDocumentApprovalPort, IDocumentDeclarationPort, IDocumentPort, IExtensionConfigPort, IExtensionDatabasePort, IFileStoragePort, IFreeDecisionPort, IIndividualPort, IIntegrationSettingsPort, ILedger2HistoryPort, ILoggerPort, IMeetPort, IMemberExitRegistryPort, IMessageChannelPort, IMetaDocument, IMonoAccount, IMutationLogPort, INDIVIDUAL_PORT, INTEGRATION_SETTINGS_PORT, INotificationPort, IOnboardingStepRegistryPort, IOrganizationPort, IPaymentDeskPort, IPaymentMethodPort, IPaymentNoticeLogPort, IPaymentPollingStatePort, IPaymentPort, IPaymentProvider, IPaymentProviderRegistryPort, IProgramAgreementPort, IProgramWalletPort, IRealtimeChannelPort, IRegistrationRegistryPort, IRoleAssignmentsPort, ISecretCipherPort, ISignatureInfo, ISignedDocument, IUserAvatarPort, IUserCertificatePort, IUserDataPort, IUserDirectoryPort, IUserWalletPort, IVaultPort, IVerificationPort, IWalletWithdrawPort, InnerAccount, InnerAgreementCatalogItem, InnerAssignableRole, InnerAttachedRole, InnerBankTransferData, InnerBranch, InnerCandidate, InnerCandidateDocument, InnerCandidateFilter, InnerChainAccountResources, InnerChainAccountRow, InnerChainAction, InnerChainActionRecord, InnerChainChangesTable, InnerChainDelta, InnerChainDeltaWaitQuery, InnerChainTxWait, InnerCoopAgreement, InnerCoopProgram, InnerCoopUser, InnerCooperativeVars, InnerCouncilDecision, InnerCreateWithdrawInput, InnerCreateWithdrawResult, InnerDocumentAggregate, InnerDocumentApproval, InnerDocumentDeclaration, InnerDocumentKind, InnerDocumentValidation, InnerEndorsementCredential, InnerEnsureProgramParams, InnerEnsureProgramResult, InnerExitBlockersProvider, InnerExitPendingReturn, InnerExtensionDatabaseConnection, InnerFileStorageBackendUnavailableError, InnerFileStorageBody, InnerFileStorageBucket, InnerFileStorageBucketNotConfiguredError, InnerFileStorageBucketSpec, InnerFileStorageError, InnerFileStorageGetReadUrlOptions, InnerFileStorageMetadataValidationError, InnerFileStorageMimeRejectedError, InnerFileStorageObjectMetadata, InnerFileStorageObjectNotFoundError, InnerFileStorageObjectTooLargeError, InnerFileStoragePutOptions, InnerFileStoragePutResult, InnerFreeDecisionDocument, InnerFreeDecisionProject, InnerGenerateDocumentData, InnerGenerateDocumentOptions, InnerGenerateDocumentRequest, InnerGenerateProjectFreeDecisionData, InnerGeneratedDocument, InnerGetAccountsFilter, InnerGetMeetInput, InnerGetMeetsInput, InnerIndividual, InnerIntakeFormRegistration, InnerIntakeJsonSchema, InnerIntakeJsonSchemaProperty, InnerKeyPermission, InnerLedger2Account, InnerLedger2HistoryFilter, InnerLedger2HistoryResult, InnerLedger2Operation, InnerLedger2Wallet, InnerLogMeta, InnerMeet, InnerMeetDraft, InnerMeetProcessing, InnerMeetRow, InnerMutationLogEntry, InnerMutationLogFilter, InnerNotifyActor, InnerNotifyInput, InnerNotifyRecipient, InnerNotifyResult, InnerOnboardingCompletedPayload, InnerOnboardingDecisionKind, InnerOnboardingGenerator, InnerOnboardingStep, InnerOnboardingStepProposal, InnerOrganization, InnerOrganizationDetails, InnerOrganizationType, InnerPage, InnerPageRequest, InnerPaginatedAccounts, InnerPaginationOptions, InnerParticipantRegisteredEvent, InnerPassport, InnerPayment, InnerPaymentDetails, InnerPaymentDraft, InnerPaymentFilters, InnerPaymentMethod, InnerPaymentMethodDraft, InnerPaymentMethodQuery, InnerPaymentMethodType, InnerPaymentNotice, InnerPaymentPollingState, InnerPrivateAccount, InnerProgramSignature, InnerProgramWallet, InnerProgramWalletFilter, InnerProposeOnboardingStepInput, InnerPublishProjectFreeDecisionInput, InnerRegistryRecord, InnerRepresentative, InnerRolePermission, InnerSbpData, InnerSetPaymentStatusInput, InnerSignProgramAgreementInput, InnerSystemOutgoingPaymentInput, InnerTransactResult, InnerUserCertificate, InnerUserDataDraft, InnerUserDataFilters, InnerUserDataRecord, InnerUserWallet, InnerVerificationCheck, InnerVerificationEntry, LEDGER2_HISTORY_PORT, LOGGER_PORT, MEET_PORT, MEMBER_EXIT_REGISTRY_PORT, MESSAGE_CHANNEL_PORT, MUTATION_LOG_PORT, MonoAccountStatus, NOTIFICATION_PORT, ONBOARDING_COMPLETED_EVENT, ONBOARDING_STEP_REGISTRY_PORT, ORGANIZATION_PORT, PARTICIPANT_REGISTERED_EVENT, PAYMENT_DESK_PORT, PAYMENT_METHOD_PORT, PAYMENT_NOTICE_LOG_PORT, PAYMENT_POLLING_STATE_PORT, PAYMENT_PORT, PAYMENT_PROVIDER_REGISTRY_PORT, PROGRAM_AGREEMENT_PORT, PROGRAM_ID_BY_TYPE, PROGRAM_TYPE_BY_ID, PROGRAM_WALLET_PORT, PaymentDirection, PaymentStatus, PaymentType, ProgramKey, ProgramType, REALTIME_CHANNEL_PORT, REGISTRATION_REGISTRY_PORT, ROLE_ASSIGNMENTS_PORT, ROLE_ASSIGNMENT_CHANGED_EVENT, RoleAssignmentChangedEvent, SECRET_CIPHER_PORT, TrackingRule, USER_AVATAR_PORT, USER_CERTIFICATE_PORT, USER_DATA_PORT, USER_DIRECTORY_PORT, USER_WALLET_PORT, VAT_EXEMPT_NOTE, VAULT_PORT, VERIFICATION_PORT, WALLET_WITHDRAW_PORT, getProgramId, getProgramType, isEligibleForParticipantMassNotification } from './core-ports/index.mjs';
2
3
  export { CAPITAL_PROJECT_CREATED_EVENT, CAPITAL_PROJECT_MATRIX_ROOM_ASSIGNED_EVENT, CHAIRMAN_APPROVALS_PORT, CHATCOOP_CALENDAR_PORT, CHATCOOP_CAPITAL_PROJECT_ROOM_ENSURE_MEMBER_EVENT, CHATCOOP_MATRIX_USER_LINKED_FOR_CAPITAL_PROJECT_ROOMS_EVENT, COOP_CALENDAR_EVENT_NOTIFICATION_PORT, EXPENSE_CHASSIS_PORT, ICapitalProjectCreatedPayload, ICapitalProjectMatrixRoomAssignedPayload, IChairmanApprovalsPort, IChatCoopCalendarPort, IChatCoopCapitalProjectRoomEnsureMemberPayload, IChatCoopMatrixUserLinkedForCapitalProjectRoomsPayload, ICoopCalendarEventNotificationPort, IExpenseChassisPort, IMatrixRoomMessagingPort, IProjectCapitalClearancePort, IProjectCommunicationArtifactsPort, ISovietRobotPort, InnerCalendarEventWindow, InnerChairmanApproval, InnerChairmanApprovalStatus, InnerChairmanApprovalsQuery, InnerCompletedCallTranscriptionHead, InnerCoopCalendarEventNotificationInput, InnerCoopCalendarEventRead, InnerCoopCalendarNotificationRoomKind, InnerExpenseCallbackHandler, InnerExpenseItem, InnerExpenseItemInput, InnerExpenseItemState, InnerExpenseMechanics, InnerExpensePaginatedResult, InnerExpensePagination, InnerExpensePlannedReserve, InnerExpenseProposalRead, InnerExpenseProposalState, InnerExpenseProposalStatus, InnerExpenseRecipientType, InnerExpenseRequisiteItemInput, InnerMatrixReplaceTextMessageInput, InnerMatrixSendTextAndPinInput, InnerMatrixSendTextMessageInput, InnerMatrixUnpinAndRedactAnnouncementInput, InnerNonProjectCommunicationRoomRef, InnerNonProjectRoomKind, InnerProjectCommunicationRoomRef, InnerRobotDecisionOutcome, InnerRobotDecisionRequest, InnerRobotDecisionResult, InnerRoomMessageKind, InnerRoomMessageLine, MATRIX_ROOM_MESSAGING_PORT, PROJECT_CAPITAL_CLEARANCE_PORT, PROJECT_COMMUNICATION_ARTIFACTS_PORT, SOVIET_ROBOT_PORT } from './cross-plugin-ports/index.mjs';
3
4
 
4
5
  /**
@@ -38,6 +39,18 @@ interface IProgramDocumentParametersHook {
38
39
  interface IMarketplaceDocumentParametersHook {
39
40
  generateMarketplaceOfferParameters(coopname: string, username: string): Promise<void>;
40
41
  }
42
+ /**
43
+ * Параметры оферт любой программы по её ключу — общий путь для новых
44
+ * расширений. Ядро, собирая документы вступления по выбранной программе,
45
+ * ищет хук по `programKey` и зовёт его до генерации: расширение пишет в Udata
46
+ * персональные номер и дату, которые потом читает фабрика документа.
47
+ * Именованные хуки выше остаются для Благороста и Стола заказов.
48
+ */
49
+ interface IProgramOfferParametersHook {
50
+ /** Ключ программы из `ProgramKey`, за документы которой отвечает хук. */
51
+ readonly programKey: string;
52
+ generateOfferParameters(coopname: string, username: string): Promise<void>;
53
+ }
41
54
  /**
42
55
  * Реестр хуков. Расширение кладёт свою реализацию сюда при запуске, а вызывает
43
56
  * её ядро, когда собирает документы вступления.
@@ -53,6 +66,8 @@ interface IRegistrationDocumentParametersRegistryPort {
53
66
  registerProgramHook(hook: IProgramDocumentParametersHook): void;
54
67
  /** Оферта Стола заказов. */
55
68
  registerMarketplaceHook(hook: IMarketplaceDocumentParametersHook): void;
69
+ /** Оферты программы по ключу — для всех последующих расширений. */
70
+ registerProgramOfferHook(hook: IProgramOfferParametersHook): void;
56
71
  }
57
72
  declare const REGISTRATION_DOCUMENT_PARAMETERS_REGISTRY_PORT: unique symbol;
58
73
 
@@ -102,6 +117,87 @@ interface IDesktopGrantsRegistryPort {
102
117
  }
103
118
  declare const DESKTOP_GRANTS_REGISTRY_PORT: unique symbol;
104
119
 
120
+ /**
121
+ * Сужение прав пайщика на столах ЧУЖОГО расширения.
122
+ *
123
+ * Одно приложение может менять видимость столов другого только через этот
124
+ * конвейер ядра и только в одну сторону — сужая. Ядро берёт набор, выданный
125
+ * владельцем стола, прогоняет его через все зарегистрированные фильтры и
126
+ * оставляет пересечение: `result = input ∩ filter_1(input) ∩ … ∩ filter_n(input)`.
127
+ * Пересечение коммутативно, поэтому порядок регистрации фильтров на итог не
128
+ * влияет, а добавить право фильтр не может по построению.
129
+ *
130
+ * Отказ фильтра (исключение, таймаут) ядро трактует в пользу владельца стола:
131
+ * набор остаётся нетронутым, а сбой попадает в журнал. Иначе чужая ошибка
132
+ * прятала бы работающее приложение.
133
+ *
134
+ * К собственным столам фильтр не применяется — свои права расширение
135
+ * формирует в `IDesktopGrantsHook`. К расширениям без провайдера грантов
136
+ * (видимость по ролям) фильтр тоже не применяется: сужать нечего.
137
+ *
138
+ * Пример: «Образовательный мост» оставляет столы «Благороста» только
139
+ * преподавателям — без собственного интерфейса к «Благоросту» и без правок в нём.
140
+ */
141
+ interface InnerDesktopGrantsFilterTarget {
142
+ /** Расширение-владелец стола, чьи права сужаются. */
143
+ extensionName: string;
144
+ /** Права, выданные владельцем (после предыдущих фильтров — не важно, каких). */
145
+ grants: readonly string[];
146
+ }
147
+ interface IDesktopGrantsFilterHook {
148
+ /** Имя расширения-автора фильтра в реестре платформы. */
149
+ readonly extensionName: string;
150
+ /**
151
+ * Какие из выданных прав оставить. Возвращённые права, которых не было во
152
+ * входном наборе, ядро отбрасывает. Вернуть `target.grants` — значит не
153
+ * вмешиваться.
154
+ */
155
+ filterGrants(target: InnerDesktopGrantsFilterTarget, context: InnerDesktopGrantsContext): Promise<readonly string[]>;
156
+ }
157
+ /** Реестр фильтров. Расширение кладёт себя сюда при запуске. */
158
+ interface IDesktopGrantsFilterRegistryPort {
159
+ register(filter: IDesktopGrantsFilterHook): void;
160
+ /** Снять фильтр при остановке расширения. */
161
+ unregister(extensionName: string): void;
162
+ }
163
+ declare const DESKTOP_GRANTS_FILTER_REGISTRY_PORT: unique symbol;
164
+
165
+ /**
166
+ * Сужение витрины вступления: какие программы и оферты ЧУЖИХ расширений
167
+ * предлагать вступающему пайщику.
168
+ *
169
+ * Та же дисциплина, что у `IDesktopGrantsFilterHook`: ядро показывает
170
+ * пересечение исходного списка со всеми фильтрами, порядок не важен, добавить
171
+ * чужую программу фильтр не может, сбой фильтра трактуется в пользу владельца
172
+ * программы. Собственные программы расширение не фильтрует — оно их
173
+ * регистрирует или нет.
174
+ *
175
+ * Фильтр синхронный: он — политика над реестром в памяти, обращаться наружу
176
+ * ему незачем, а конвейер регистрации ядра синхронный насквозь.
177
+ *
178
+ * Скрытая при вступлении программа не запрещена пайщику навсегда: принять её
179
+ * оферту он может позже со стола расширения-владельца. Пример: «Образовательный
180
+ * мост» не предлагает оферты «Благороста» при вступлении — их подпишет тот, кто
181
+ * станет преподавателем.
182
+ */
183
+ interface InnerRegistrationOfferFilterContext {
184
+ coopname?: string;
185
+ accountType?: InnerAccountType | string;
186
+ }
187
+ interface IRegistrationOfferFilterHook {
188
+ /** Имя расширения-автора фильтра в реестре платформы. */
189
+ readonly extensionName: string;
190
+ /** Ключи программ, которые оставить в витрине. */
191
+ filterPrograms(programs: readonly InnerProgramRegistration[], context: InnerRegistrationOfferFilterContext): readonly string[];
192
+ /** Идентификаторы оферт, которые оставить. */
193
+ filterAgreements(agreements: readonly InnerAgreementRegistration[], context: InnerRegistrationOfferFilterContext): readonly string[];
194
+ }
195
+ interface IRegistrationOfferFilterRegistryPort {
196
+ register(filter: IRegistrationOfferFilterHook): void;
197
+ unregister(extensionName: string): void;
198
+ }
199
+ declare const REGISTRATION_OFFER_FILTER_REGISTRY_PORT: unique symbol;
200
+
105
201
  /**
106
202
  * Поставщик единого поиска.
107
203
  *
@@ -172,5 +268,5 @@ interface IGlobalSearchRegistryPort {
172
268
  }
173
269
  declare const GLOBAL_SEARCH_REGISTRY_PORT: unique symbol;
174
270
 
175
- export { DESKTOP_GRANTS_REGISTRY_PORT, GLOBAL_SEARCH_REGISTRY_PORT, REGISTRATION_DOCUMENT_PARAMETERS_REGISTRY_PORT };
176
- export type { IDesktopGrantsHook, IDesktopGrantsRegistryPort, IGlobalSearchHook, IGlobalSearchRegistryPort, IMarketplaceDocumentParametersHook, IProgramDocumentParametersHook, IRegistrationDocumentParametersRegistryPort, InnerDesktopGrantsContext, InnerGlobalSearchContext, InnerGlobalSearchHit, InnerGlobalSearchRoute };
271
+ export { DESKTOP_GRANTS_FILTER_REGISTRY_PORT, DESKTOP_GRANTS_REGISTRY_PORT, GLOBAL_SEARCH_REGISTRY_PORT, InnerAccountType, InnerAgreementRegistration, InnerProgramRegistration, REGISTRATION_DOCUMENT_PARAMETERS_REGISTRY_PORT, REGISTRATION_OFFER_FILTER_REGISTRY_PORT };
272
+ export type { IDesktopGrantsFilterHook, IDesktopGrantsFilterRegistryPort, IDesktopGrantsHook, IDesktopGrantsRegistryPort, IGlobalSearchHook, IGlobalSearchRegistryPort, IMarketplaceDocumentParametersHook, IProgramDocumentParametersHook, IProgramOfferParametersHook, IRegistrationDocumentParametersRegistryPort, IRegistrationOfferFilterHook, IRegistrationOfferFilterRegistryPort, InnerDesktopGrantsContext, InnerDesktopGrantsFilterTarget, InnerGlobalSearchContext, InnerGlobalSearchHit, InnerGlobalSearchRoute, InnerRegistrationOfferFilterContext };
package/dist/index.d.ts CHANGED
@@ -1,4 +1,5 @@
1
- export { ACCOUNT_PORT, AGREEMENT_CATALOG_PORT, BRANCH_PORT, CANDIDATE_PORT, CHAIN_CHANGES_PORT, CHAIN_DELTA_WAIT_PORT, CHAIN_PORT, CHAIN_RESOURCES_PORT, COOPERATIVE_VARS_PORT, COOP_CREDENTIAL_PORT, COUNCIL_PORT, CreateTrackingRuleInput, DECISION_TRACKING_PORT, DOCUMENT_APPROVAL_PORT, DOCUMENT_DECLARATION_PORT, DOCUMENT_PORT, DecisionEventType, DecisionEventTypeString, DecisionProcessedResult, DecisionTrackedEvent, EXTENSION_CONFIG_PORT, EXTENSION_DATABASE_PORT, ExtendedMeetStatus, FILE_STORAGE_PORT, FREE_DECISION_PORT, IAccountPort, IAgreementCatalogPort, IBranchPort, ICandidatePort, IChainChangesPort, IChainDeltaWaitPort, IChainPort, IChainResourcesPort, ICoopCredentialPort, ICooperativeVarsPort, ICouncilPort, IDecisionTrackingPort, IDocumentApprovalPort, IDocumentDeclarationPort, IDocumentPort, IExtensionConfigPort, IExtensionDatabasePort, IFileStoragePort, IFreeDecisionPort, IIndividualPort, IIntegrationSettingsPort, ILedger2HistoryPort, ILoggerPort, IMeetPort, IMessageChannelPort, IMetaDocument, IMonoAccount, IMutationLogPort, INDIVIDUAL_PORT, INTEGRATION_SETTINGS_PORT, INotificationPort, IOnboardingStepRegistryPort, IOrganizationPort, IPaymentDeskPort, IPaymentMethodPort, IPaymentNoticeLogPort, IPaymentPollingStatePort, IPaymentPort, IPaymentProvider, IPaymentProviderRegistryPort, IProgramAgreementPort, IProgramWalletPort, IRealtimeChannelPort, IRegistrationRegistryPort, ISecretCipherPort, ISignatureInfo, ISignedDocument, IUserCertificatePort, IUserDataPort, IUserDirectoryPort, IUserWalletPort, IVaultPort, IVerificationPort, InnerAccount, InnerAccountType, InnerAgreementCatalogItem, InnerAgreementRegistration, InnerBankTransferData, InnerBranch, InnerCandidate, InnerCandidateDocument, InnerCandidateFilter, InnerChainAccountResources, InnerChainAccountRow, InnerChainAction, InnerChainActionRecord, InnerChainChangesTable, InnerChainDelta, InnerChainDeltaWaitQuery, InnerChainTxWait, InnerCoopAgreement, InnerCoopProgram, InnerCoopUser, InnerCooperativeVars, InnerCouncilDecision, InnerDocumentAggregate, InnerDocumentApproval, InnerDocumentDeclaration, InnerDocumentKind, InnerDocumentValidation, InnerEndorsementCredential, InnerEnsureProgramParams, InnerEnsureProgramResult, InnerExtensionDatabaseConnection, InnerFileStorageBackendUnavailableError, InnerFileStorageBody, InnerFileStorageBucket, InnerFileStorageBucketNotConfiguredError, InnerFileStorageBucketSpec, InnerFileStorageError, InnerFileStorageGetReadUrlOptions, InnerFileStorageMetadataValidationError, InnerFileStorageMimeRejectedError, InnerFileStorageObjectMetadata, InnerFileStorageObjectNotFoundError, InnerFileStorageObjectTooLargeError, InnerFileStoragePutOptions, InnerFileStoragePutResult, InnerFreeDecisionDocument, InnerFreeDecisionProject, InnerGenerateDocumentData, InnerGenerateDocumentOptions, InnerGenerateDocumentRequest, InnerGenerateProjectFreeDecisionData, InnerGeneratedDocument, InnerGetAccountsFilter, InnerGetMeetInput, InnerGetMeetsInput, InnerIndividual, InnerIntakeFormRegistration, InnerIntakeJsonSchema, InnerIntakeJsonSchemaProperty, InnerKeyPermission, InnerLedger2Account, InnerLedger2HistoryFilter, InnerLedger2HistoryResult, InnerLedger2Operation, InnerLedger2Wallet, InnerLogMeta, InnerMeet, InnerMeetDraft, InnerMeetProcessing, InnerMeetRow, InnerMutationLogEntry, InnerMutationLogFilter, InnerNotifyActor, InnerNotifyInput, InnerNotifyRecipient, InnerNotifyResult, InnerOnboardingCompletedPayload, InnerOnboardingDecisionKind, InnerOnboardingGenerator, InnerOnboardingStep, InnerOnboardingStepProposal, InnerOrganization, InnerOrganizationDetails, InnerOrganizationType, InnerPage, InnerPageRequest, InnerPaginatedAccounts, InnerPaginationOptions, InnerParticipantRegisteredEvent, InnerPassport, InnerPayment, InnerPaymentDetails, InnerPaymentDraft, InnerPaymentFilters, InnerPaymentMethod, InnerPaymentMethodDraft, InnerPaymentMethodQuery, InnerPaymentMethodType, InnerPaymentNotice, InnerPaymentPollingState, InnerPrivateAccount, InnerProgramRegistration, InnerProgramSignature, InnerProgramWallet, InnerProgramWalletFilter, InnerProposeOnboardingStepInput, InnerPublishProjectFreeDecisionInput, InnerRepresentative, InnerSbpData, InnerSetPaymentStatusInput, InnerSignProgramAgreementInput, InnerSystemOutgoingPaymentInput, InnerTransactResult, InnerUserCertificate, InnerUserDataDraft, InnerUserDataFilters, InnerUserDataRecord, InnerUserWallet, InnerVerificationCheck, InnerVerificationEntry, LEDGER2_HISTORY_PORT, LOGGER_PORT, MEET_PORT, MESSAGE_CHANNEL_PORT, MUTATION_LOG_PORT, MonoAccountStatus, NOTIFICATION_PORT, ONBOARDING_COMPLETED_EVENT, ONBOARDING_STEP_REGISTRY_PORT, ORGANIZATION_PORT, PARTICIPANT_REGISTERED_EVENT, PAYMENT_DESK_PORT, PAYMENT_METHOD_PORT, PAYMENT_NOTICE_LOG_PORT, PAYMENT_POLLING_STATE_PORT, PAYMENT_PORT, PAYMENT_PROVIDER_REGISTRY_PORT, PROGRAM_AGREEMENT_PORT, PROGRAM_ID_BY_TYPE, PROGRAM_TYPE_BY_ID, PROGRAM_WALLET_PORT, PaymentDirection, PaymentStatus, PaymentType, ProgramKey, ProgramType, REALTIME_CHANNEL_PORT, REGISTRATION_REGISTRY_PORT, SECRET_CIPHER_PORT, TrackingRule, USER_CERTIFICATE_PORT, USER_DATA_PORT, USER_DIRECTORY_PORT, USER_WALLET_PORT, VAT_EXEMPT_NOTE, VAULT_PORT, VERIFICATION_PORT, getProgramId, getProgramType, isEligibleForParticipantMassNotification } from './core-ports/index.js';
1
+ import { InnerAccountType, InnerProgramRegistration, InnerAgreementRegistration } from './core-ports/index.js';
2
+ export { ACCOUNTING_REGISTRY_PORT, ACCOUNT_PORT, AGREEMENT_CATALOG_PORT, BRANCH_PORT, CANDIDATE_PORT, CHAIN_CHANGES_PORT, CHAIN_DELTA_WAIT_PORT, CHAIN_PORT, CHAIN_RESOURCES_PORT, COOPERATIVE_VARS_PORT, COOP_CREDENTIAL_PORT, COUNCIL_PORT, CreateTrackingRuleInput, DECISION_TRACKING_PORT, DOCUMENT_APPROVAL_PORT, DOCUMENT_DECLARATION_PORT, DOCUMENT_PORT, DecisionEventType, DecisionEventTypeString, DecisionProcessedResult, DecisionTrackedEvent, EXTENSION_CONFIG_PORT, EXTENSION_DATABASE_PORT, ExtendedMeetStatus, FILE_STORAGE_PORT, FREE_DECISION_PORT, IAccountPort, IAccountingRegistryPort, IAgreementCatalogPort, IBranchPort, ICandidatePort, IChainChangesPort, IChainDeltaWaitPort, IChainPort, IChainResourcesPort, ICoopCredentialPort, ICooperativeVarsPort, ICouncilPort, IDecisionTrackingPort, IDocumentApprovalPort, IDocumentDeclarationPort, IDocumentPort, IExtensionConfigPort, IExtensionDatabasePort, IFileStoragePort, IFreeDecisionPort, IIndividualPort, IIntegrationSettingsPort, ILedger2HistoryPort, ILoggerPort, IMeetPort, IMemberExitRegistryPort, IMessageChannelPort, IMetaDocument, IMonoAccount, IMutationLogPort, INDIVIDUAL_PORT, INTEGRATION_SETTINGS_PORT, INotificationPort, IOnboardingStepRegistryPort, IOrganizationPort, IPaymentDeskPort, IPaymentMethodPort, IPaymentNoticeLogPort, IPaymentPollingStatePort, IPaymentPort, IPaymentProvider, IPaymentProviderRegistryPort, IProgramAgreementPort, IProgramWalletPort, IRealtimeChannelPort, IRegistrationRegistryPort, IRoleAssignmentsPort, ISecretCipherPort, ISignatureInfo, ISignedDocument, IUserAvatarPort, IUserCertificatePort, IUserDataPort, IUserDirectoryPort, IUserWalletPort, IVaultPort, IVerificationPort, IWalletWithdrawPort, InnerAccount, InnerAgreementCatalogItem, InnerAssignableRole, InnerAttachedRole, InnerBankTransferData, InnerBranch, InnerCandidate, InnerCandidateDocument, InnerCandidateFilter, InnerChainAccountResources, InnerChainAccountRow, InnerChainAction, InnerChainActionRecord, InnerChainChangesTable, InnerChainDelta, InnerChainDeltaWaitQuery, InnerChainTxWait, InnerCoopAgreement, InnerCoopProgram, InnerCoopUser, InnerCooperativeVars, InnerCouncilDecision, InnerCreateWithdrawInput, InnerCreateWithdrawResult, InnerDocumentAggregate, InnerDocumentApproval, InnerDocumentDeclaration, InnerDocumentKind, InnerDocumentValidation, InnerEndorsementCredential, InnerEnsureProgramParams, InnerEnsureProgramResult, InnerExitBlockersProvider, InnerExitPendingReturn, InnerExtensionDatabaseConnection, InnerFileStorageBackendUnavailableError, InnerFileStorageBody, InnerFileStorageBucket, InnerFileStorageBucketNotConfiguredError, InnerFileStorageBucketSpec, InnerFileStorageError, InnerFileStorageGetReadUrlOptions, InnerFileStorageMetadataValidationError, InnerFileStorageMimeRejectedError, InnerFileStorageObjectMetadata, InnerFileStorageObjectNotFoundError, InnerFileStorageObjectTooLargeError, InnerFileStoragePutOptions, InnerFileStoragePutResult, InnerFreeDecisionDocument, InnerFreeDecisionProject, InnerGenerateDocumentData, InnerGenerateDocumentOptions, InnerGenerateDocumentRequest, InnerGenerateProjectFreeDecisionData, InnerGeneratedDocument, InnerGetAccountsFilter, InnerGetMeetInput, InnerGetMeetsInput, InnerIndividual, InnerIntakeFormRegistration, InnerIntakeJsonSchema, InnerIntakeJsonSchemaProperty, InnerKeyPermission, InnerLedger2Account, InnerLedger2HistoryFilter, InnerLedger2HistoryResult, InnerLedger2Operation, InnerLedger2Wallet, InnerLogMeta, InnerMeet, InnerMeetDraft, InnerMeetProcessing, InnerMeetRow, InnerMutationLogEntry, InnerMutationLogFilter, InnerNotifyActor, InnerNotifyInput, InnerNotifyRecipient, InnerNotifyResult, InnerOnboardingCompletedPayload, InnerOnboardingDecisionKind, InnerOnboardingGenerator, InnerOnboardingStep, InnerOnboardingStepProposal, InnerOrganization, InnerOrganizationDetails, InnerOrganizationType, InnerPage, InnerPageRequest, InnerPaginatedAccounts, InnerPaginationOptions, InnerParticipantRegisteredEvent, InnerPassport, InnerPayment, InnerPaymentDetails, InnerPaymentDraft, InnerPaymentFilters, InnerPaymentMethod, InnerPaymentMethodDraft, InnerPaymentMethodQuery, InnerPaymentMethodType, InnerPaymentNotice, InnerPaymentPollingState, InnerPrivateAccount, InnerProgramSignature, InnerProgramWallet, InnerProgramWalletFilter, InnerProposeOnboardingStepInput, InnerPublishProjectFreeDecisionInput, InnerRegistryRecord, InnerRepresentative, InnerRolePermission, InnerSbpData, InnerSetPaymentStatusInput, InnerSignProgramAgreementInput, InnerSystemOutgoingPaymentInput, InnerTransactResult, InnerUserCertificate, InnerUserDataDraft, InnerUserDataFilters, InnerUserDataRecord, InnerUserWallet, InnerVerificationCheck, InnerVerificationEntry, LEDGER2_HISTORY_PORT, LOGGER_PORT, MEET_PORT, MEMBER_EXIT_REGISTRY_PORT, MESSAGE_CHANNEL_PORT, MUTATION_LOG_PORT, MonoAccountStatus, NOTIFICATION_PORT, ONBOARDING_COMPLETED_EVENT, ONBOARDING_STEP_REGISTRY_PORT, ORGANIZATION_PORT, PARTICIPANT_REGISTERED_EVENT, PAYMENT_DESK_PORT, PAYMENT_METHOD_PORT, PAYMENT_NOTICE_LOG_PORT, PAYMENT_POLLING_STATE_PORT, PAYMENT_PORT, PAYMENT_PROVIDER_REGISTRY_PORT, PROGRAM_AGREEMENT_PORT, PROGRAM_ID_BY_TYPE, PROGRAM_TYPE_BY_ID, PROGRAM_WALLET_PORT, PaymentDirection, PaymentStatus, PaymentType, ProgramKey, ProgramType, REALTIME_CHANNEL_PORT, REGISTRATION_REGISTRY_PORT, ROLE_ASSIGNMENTS_PORT, ROLE_ASSIGNMENT_CHANGED_EVENT, RoleAssignmentChangedEvent, SECRET_CIPHER_PORT, TrackingRule, USER_AVATAR_PORT, USER_CERTIFICATE_PORT, USER_DATA_PORT, USER_DIRECTORY_PORT, USER_WALLET_PORT, VAT_EXEMPT_NOTE, VAULT_PORT, VERIFICATION_PORT, WALLET_WITHDRAW_PORT, getProgramId, getProgramType, isEligibleForParticipantMassNotification } from './core-ports/index.js';
2
3
  export { CAPITAL_PROJECT_CREATED_EVENT, CAPITAL_PROJECT_MATRIX_ROOM_ASSIGNED_EVENT, CHAIRMAN_APPROVALS_PORT, CHATCOOP_CALENDAR_PORT, CHATCOOP_CAPITAL_PROJECT_ROOM_ENSURE_MEMBER_EVENT, CHATCOOP_MATRIX_USER_LINKED_FOR_CAPITAL_PROJECT_ROOMS_EVENT, COOP_CALENDAR_EVENT_NOTIFICATION_PORT, EXPENSE_CHASSIS_PORT, ICapitalProjectCreatedPayload, ICapitalProjectMatrixRoomAssignedPayload, IChairmanApprovalsPort, IChatCoopCalendarPort, IChatCoopCapitalProjectRoomEnsureMemberPayload, IChatCoopMatrixUserLinkedForCapitalProjectRoomsPayload, ICoopCalendarEventNotificationPort, IExpenseChassisPort, IMatrixRoomMessagingPort, IProjectCapitalClearancePort, IProjectCommunicationArtifactsPort, ISovietRobotPort, InnerCalendarEventWindow, InnerChairmanApproval, InnerChairmanApprovalStatus, InnerChairmanApprovalsQuery, InnerCompletedCallTranscriptionHead, InnerCoopCalendarEventNotificationInput, InnerCoopCalendarEventRead, InnerCoopCalendarNotificationRoomKind, InnerExpenseCallbackHandler, InnerExpenseItem, InnerExpenseItemInput, InnerExpenseItemState, InnerExpenseMechanics, InnerExpensePaginatedResult, InnerExpensePagination, InnerExpensePlannedReserve, InnerExpenseProposalRead, InnerExpenseProposalState, InnerExpenseProposalStatus, InnerExpenseRecipientType, InnerExpenseRequisiteItemInput, InnerMatrixReplaceTextMessageInput, InnerMatrixSendTextAndPinInput, InnerMatrixSendTextMessageInput, InnerMatrixUnpinAndRedactAnnouncementInput, InnerNonProjectCommunicationRoomRef, InnerNonProjectRoomKind, InnerProjectCommunicationRoomRef, InnerRobotDecisionOutcome, InnerRobotDecisionRequest, InnerRobotDecisionResult, InnerRoomMessageKind, InnerRoomMessageLine, MATRIX_ROOM_MESSAGING_PORT, PROJECT_CAPITAL_CLEARANCE_PORT, PROJECT_COMMUNICATION_ARTIFACTS_PORT, SOVIET_ROBOT_PORT } from './cross-plugin-ports/index.js';
3
4
 
4
5
  /**
@@ -38,6 +39,18 @@ interface IProgramDocumentParametersHook {
38
39
  interface IMarketplaceDocumentParametersHook {
39
40
  generateMarketplaceOfferParameters(coopname: string, username: string): Promise<void>;
40
41
  }
42
+ /**
43
+ * Параметры оферт любой программы по её ключу — общий путь для новых
44
+ * расширений. Ядро, собирая документы вступления по выбранной программе,
45
+ * ищет хук по `programKey` и зовёт его до генерации: расширение пишет в Udata
46
+ * персональные номер и дату, которые потом читает фабрика документа.
47
+ * Именованные хуки выше остаются для Благороста и Стола заказов.
48
+ */
49
+ interface IProgramOfferParametersHook {
50
+ /** Ключ программы из `ProgramKey`, за документы которой отвечает хук. */
51
+ readonly programKey: string;
52
+ generateOfferParameters(coopname: string, username: string): Promise<void>;
53
+ }
41
54
  /**
42
55
  * Реестр хуков. Расширение кладёт свою реализацию сюда при запуске, а вызывает
43
56
  * её ядро, когда собирает документы вступления.
@@ -53,6 +66,8 @@ interface IRegistrationDocumentParametersRegistryPort {
53
66
  registerProgramHook(hook: IProgramDocumentParametersHook): void;
54
67
  /** Оферта Стола заказов. */
55
68
  registerMarketplaceHook(hook: IMarketplaceDocumentParametersHook): void;
69
+ /** Оферты программы по ключу — для всех последующих расширений. */
70
+ registerProgramOfferHook(hook: IProgramOfferParametersHook): void;
56
71
  }
57
72
  declare const REGISTRATION_DOCUMENT_PARAMETERS_REGISTRY_PORT: unique symbol;
58
73
 
@@ -102,6 +117,87 @@ interface IDesktopGrantsRegistryPort {
102
117
  }
103
118
  declare const DESKTOP_GRANTS_REGISTRY_PORT: unique symbol;
104
119
 
120
+ /**
121
+ * Сужение прав пайщика на столах ЧУЖОГО расширения.
122
+ *
123
+ * Одно приложение может менять видимость столов другого только через этот
124
+ * конвейер ядра и только в одну сторону — сужая. Ядро берёт набор, выданный
125
+ * владельцем стола, прогоняет его через все зарегистрированные фильтры и
126
+ * оставляет пересечение: `result = input ∩ filter_1(input) ∩ … ∩ filter_n(input)`.
127
+ * Пересечение коммутативно, поэтому порядок регистрации фильтров на итог не
128
+ * влияет, а добавить право фильтр не может по построению.
129
+ *
130
+ * Отказ фильтра (исключение, таймаут) ядро трактует в пользу владельца стола:
131
+ * набор остаётся нетронутым, а сбой попадает в журнал. Иначе чужая ошибка
132
+ * прятала бы работающее приложение.
133
+ *
134
+ * К собственным столам фильтр не применяется — свои права расширение
135
+ * формирует в `IDesktopGrantsHook`. К расширениям без провайдера грантов
136
+ * (видимость по ролям) фильтр тоже не применяется: сужать нечего.
137
+ *
138
+ * Пример: «Образовательный мост» оставляет столы «Благороста» только
139
+ * преподавателям — без собственного интерфейса к «Благоросту» и без правок в нём.
140
+ */
141
+ interface InnerDesktopGrantsFilterTarget {
142
+ /** Расширение-владелец стола, чьи права сужаются. */
143
+ extensionName: string;
144
+ /** Права, выданные владельцем (после предыдущих фильтров — не важно, каких). */
145
+ grants: readonly string[];
146
+ }
147
+ interface IDesktopGrantsFilterHook {
148
+ /** Имя расширения-автора фильтра в реестре платформы. */
149
+ readonly extensionName: string;
150
+ /**
151
+ * Какие из выданных прав оставить. Возвращённые права, которых не было во
152
+ * входном наборе, ядро отбрасывает. Вернуть `target.grants` — значит не
153
+ * вмешиваться.
154
+ */
155
+ filterGrants(target: InnerDesktopGrantsFilterTarget, context: InnerDesktopGrantsContext): Promise<readonly string[]>;
156
+ }
157
+ /** Реестр фильтров. Расширение кладёт себя сюда при запуске. */
158
+ interface IDesktopGrantsFilterRegistryPort {
159
+ register(filter: IDesktopGrantsFilterHook): void;
160
+ /** Снять фильтр при остановке расширения. */
161
+ unregister(extensionName: string): void;
162
+ }
163
+ declare const DESKTOP_GRANTS_FILTER_REGISTRY_PORT: unique symbol;
164
+
165
+ /**
166
+ * Сужение витрины вступления: какие программы и оферты ЧУЖИХ расширений
167
+ * предлагать вступающему пайщику.
168
+ *
169
+ * Та же дисциплина, что у `IDesktopGrantsFilterHook`: ядро показывает
170
+ * пересечение исходного списка со всеми фильтрами, порядок не важен, добавить
171
+ * чужую программу фильтр не может, сбой фильтра трактуется в пользу владельца
172
+ * программы. Собственные программы расширение не фильтрует — оно их
173
+ * регистрирует или нет.
174
+ *
175
+ * Фильтр синхронный: он — политика над реестром в памяти, обращаться наружу
176
+ * ему незачем, а конвейер регистрации ядра синхронный насквозь.
177
+ *
178
+ * Скрытая при вступлении программа не запрещена пайщику навсегда: принять её
179
+ * оферту он может позже со стола расширения-владельца. Пример: «Образовательный
180
+ * мост» не предлагает оферты «Благороста» при вступлении — их подпишет тот, кто
181
+ * станет преподавателем.
182
+ */
183
+ interface InnerRegistrationOfferFilterContext {
184
+ coopname?: string;
185
+ accountType?: InnerAccountType | string;
186
+ }
187
+ interface IRegistrationOfferFilterHook {
188
+ /** Имя расширения-автора фильтра в реестре платформы. */
189
+ readonly extensionName: string;
190
+ /** Ключи программ, которые оставить в витрине. */
191
+ filterPrograms(programs: readonly InnerProgramRegistration[], context: InnerRegistrationOfferFilterContext): readonly string[];
192
+ /** Идентификаторы оферт, которые оставить. */
193
+ filterAgreements(agreements: readonly InnerAgreementRegistration[], context: InnerRegistrationOfferFilterContext): readonly string[];
194
+ }
195
+ interface IRegistrationOfferFilterRegistryPort {
196
+ register(filter: IRegistrationOfferFilterHook): void;
197
+ unregister(extensionName: string): void;
198
+ }
199
+ declare const REGISTRATION_OFFER_FILTER_REGISTRY_PORT: unique symbol;
200
+
105
201
  /**
106
202
  * Поставщик единого поиска.
107
203
  *
@@ -172,5 +268,5 @@ interface IGlobalSearchRegistryPort {
172
268
  }
173
269
  declare const GLOBAL_SEARCH_REGISTRY_PORT: unique symbol;
174
270
 
175
- export { DESKTOP_GRANTS_REGISTRY_PORT, GLOBAL_SEARCH_REGISTRY_PORT, REGISTRATION_DOCUMENT_PARAMETERS_REGISTRY_PORT };
176
- export type { IDesktopGrantsHook, IDesktopGrantsRegistryPort, IGlobalSearchHook, IGlobalSearchRegistryPort, IMarketplaceDocumentParametersHook, IProgramDocumentParametersHook, IRegistrationDocumentParametersRegistryPort, InnerDesktopGrantsContext, InnerGlobalSearchContext, InnerGlobalSearchHit, InnerGlobalSearchRoute };
271
+ export { DESKTOP_GRANTS_FILTER_REGISTRY_PORT, DESKTOP_GRANTS_REGISTRY_PORT, GLOBAL_SEARCH_REGISTRY_PORT, InnerAccountType, InnerAgreementRegistration, InnerProgramRegistration, REGISTRATION_DOCUMENT_PARAMETERS_REGISTRY_PORT, REGISTRATION_OFFER_FILTER_REGISTRY_PORT };
272
+ export type { IDesktopGrantsFilterHook, IDesktopGrantsFilterRegistryPort, IDesktopGrantsHook, IDesktopGrantsRegistryPort, IGlobalSearchHook, IGlobalSearchRegistryPort, IMarketplaceDocumentParametersHook, IProgramDocumentParametersHook, IProgramOfferParametersHook, IRegistrationDocumentParametersRegistryPort, IRegistrationOfferFilterHook, IRegistrationOfferFilterRegistryPort, InnerDesktopGrantsContext, InnerDesktopGrantsFilterTarget, InnerGlobalSearchContext, InnerGlobalSearchHit, InnerGlobalSearchRoute, InnerRegistrationOfferFilterContext };
package/dist/index.mjs CHANGED
@@ -1,10 +1,14 @@
1
- export { ACCOUNT_PORT, AGREEMENT_CATALOG_PORT, BRANCH_PORT, CANDIDATE_PORT, CHAIN_CHANGES_PORT, CHAIN_DELTA_WAIT_PORT, CHAIN_PORT, CHAIN_RESOURCES_PORT, COOPERATIVE_VARS_PORT, COOP_CREDENTIAL_PORT, COUNCIL_PORT, DECISION_TRACKING_PORT, DOCUMENT_APPROVAL_PORT, DOCUMENT_DECLARATION_PORT, DOCUMENT_PORT, DecisionEventType, DecisionTrackedEvent, EXTENSION_CONFIG_PORT, EXTENSION_DATABASE_PORT, ExtendedMeetStatus, FILE_STORAGE_PORT, FREE_DECISION_PORT, INDIVIDUAL_PORT, INTEGRATION_SETTINGS_PORT, InnerAccountType, InnerFileStorageBackendUnavailableError, InnerFileStorageBucketNotConfiguredError, InnerFileStorageError, InnerFileStorageMetadataValidationError, InnerFileStorageMimeRejectedError, InnerFileStorageObjectNotFoundError, InnerFileStorageObjectTooLargeError, InnerKeyPermission, InnerOrganizationType, LEDGER2_HISTORY_PORT, LOGGER_PORT, MEET_PORT, MESSAGE_CHANNEL_PORT, MUTATION_LOG_PORT, MonoAccountStatus, NOTIFICATION_PORT, ONBOARDING_COMPLETED_EVENT, ONBOARDING_STEP_REGISTRY_PORT, ORGANIZATION_PORT, PARTICIPANT_REGISTERED_EVENT, PAYMENT_DESK_PORT, PAYMENT_METHOD_PORT, PAYMENT_NOTICE_LOG_PORT, PAYMENT_POLLING_STATE_PORT, PAYMENT_PORT, PAYMENT_PROVIDER_REGISTRY_PORT, PROGRAM_AGREEMENT_PORT, PROGRAM_ID_BY_TYPE, PROGRAM_TYPE_BY_ID, PROGRAM_WALLET_PORT, PaymentDirection, PaymentStatus, PaymentType, ProgramKey, ProgramType, REALTIME_CHANNEL_PORT, REGISTRATION_REGISTRY_PORT, SECRET_CIPHER_PORT, USER_CERTIFICATE_PORT, USER_DATA_PORT, USER_DIRECTORY_PORT, USER_WALLET_PORT, VAT_EXEMPT_NOTE, VAULT_PORT, VERIFICATION_PORT, getProgramId, getProgramType, isEligibleForParticipantMassNotification } from './core-ports/index.mjs';
1
+ export { ACCOUNTING_REGISTRY_PORT, ACCOUNT_PORT, AGREEMENT_CATALOG_PORT, BRANCH_PORT, CANDIDATE_PORT, CHAIN_CHANGES_PORT, CHAIN_DELTA_WAIT_PORT, CHAIN_PORT, CHAIN_RESOURCES_PORT, COOPERATIVE_VARS_PORT, COOP_CREDENTIAL_PORT, COUNCIL_PORT, DECISION_TRACKING_PORT, DOCUMENT_APPROVAL_PORT, DOCUMENT_DECLARATION_PORT, DOCUMENT_PORT, DecisionEventType, DecisionTrackedEvent, EXTENSION_CONFIG_PORT, EXTENSION_DATABASE_PORT, ExtendedMeetStatus, FILE_STORAGE_PORT, FREE_DECISION_PORT, INDIVIDUAL_PORT, INTEGRATION_SETTINGS_PORT, InnerAccountType, InnerFileStorageBackendUnavailableError, InnerFileStorageBucketNotConfiguredError, InnerFileStorageError, InnerFileStorageMetadataValidationError, InnerFileStorageMimeRejectedError, InnerFileStorageObjectNotFoundError, InnerFileStorageObjectTooLargeError, InnerKeyPermission, InnerOrganizationType, LEDGER2_HISTORY_PORT, LOGGER_PORT, MEET_PORT, MEMBER_EXIT_REGISTRY_PORT, MESSAGE_CHANNEL_PORT, MUTATION_LOG_PORT, MonoAccountStatus, NOTIFICATION_PORT, ONBOARDING_COMPLETED_EVENT, ONBOARDING_STEP_REGISTRY_PORT, ORGANIZATION_PORT, PARTICIPANT_REGISTERED_EVENT, PAYMENT_DESK_PORT, PAYMENT_METHOD_PORT, PAYMENT_NOTICE_LOG_PORT, PAYMENT_POLLING_STATE_PORT, PAYMENT_PORT, PAYMENT_PROVIDER_REGISTRY_PORT, PROGRAM_AGREEMENT_PORT, PROGRAM_ID_BY_TYPE, PROGRAM_TYPE_BY_ID, PROGRAM_WALLET_PORT, PaymentDirection, PaymentStatus, PaymentType, ProgramKey, ProgramType, REALTIME_CHANNEL_PORT, REGISTRATION_REGISTRY_PORT, ROLE_ASSIGNMENTS_PORT, ROLE_ASSIGNMENT_CHANGED_EVENT, SECRET_CIPHER_PORT, USER_AVATAR_PORT, USER_CERTIFICATE_PORT, USER_DATA_PORT, USER_DIRECTORY_PORT, USER_WALLET_PORT, VAT_EXEMPT_NOTE, VAULT_PORT, VERIFICATION_PORT, WALLET_WITHDRAW_PORT, getProgramId, getProgramType, isEligibleForParticipantMassNotification } from './core-ports/index.mjs';
2
2
  export { CAPITAL_PROJECT_CREATED_EVENT, CAPITAL_PROJECT_MATRIX_ROOM_ASSIGNED_EVENT, CHAIRMAN_APPROVALS_PORT, CHATCOOP_CALENDAR_PORT, CHATCOOP_CAPITAL_PROJECT_ROOM_ENSURE_MEMBER_EVENT, CHATCOOP_MATRIX_USER_LINKED_FOR_CAPITAL_PROJECT_ROOMS_EVENT, COOP_CALENDAR_EVENT_NOTIFICATION_PORT, EXPENSE_CHASSIS_PORT, InnerExpenseItemState, InnerExpenseMechanics, InnerExpenseProposalState, InnerExpenseRecipientType, MATRIX_ROOM_MESSAGING_PORT, PROJECT_CAPITAL_CLEARANCE_PORT, PROJECT_COMMUNICATION_ARTIFACTS_PORT, SOVIET_ROBOT_PORT } from './cross-plugin-ports/index.mjs';
3
3
 
4
4
  const REGISTRATION_DOCUMENT_PARAMETERS_REGISTRY_PORT = Symbol.for("Innercoop.CorePort.RegistrationDocumentParametersRegistry");
5
5
 
6
6
  const DESKTOP_GRANTS_REGISTRY_PORT = Symbol.for("Innercoop.CorePort.DesktopGrantsRegistry");
7
7
 
8
+ const DESKTOP_GRANTS_FILTER_REGISTRY_PORT = Symbol.for("Innercoop.CorePort.DesktopGrantsFilterRegistry");
9
+
10
+ const REGISTRATION_OFFER_FILTER_REGISTRY_PORT = Symbol.for("Innercoop.CorePort.RegistrationOfferFilterRegistry");
11
+
8
12
  const GLOBAL_SEARCH_REGISTRY_PORT = Symbol.for("Innercoop.CorePort.GlobalSearchRegistry");
9
13
 
10
- export { DESKTOP_GRANTS_REGISTRY_PORT, GLOBAL_SEARCH_REGISTRY_PORT, REGISTRATION_DOCUMENT_PARAMETERS_REGISTRY_PORT };
14
+ export { DESKTOP_GRANTS_FILTER_REGISTRY_PORT, DESKTOP_GRANTS_REGISTRY_PORT, GLOBAL_SEARCH_REGISTRY_PORT, REGISTRATION_DOCUMENT_PARAMETERS_REGISTRY_PORT, REGISTRATION_OFFER_FILTER_REGISTRY_PORT };
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@coopenomics/innercoop",
3
3
  "type": "module",
4
- "version": "2026.9.30",
4
+ "version": "2026.10.14-1",
5
5
  "description": "Порты и DI-токены внутренней связи в контуре одного кооператива: ядро ↔ расширение и расширение ↔ расширение, без прямых зависимостей",
6
6
  "author": "Alex Ant <dacom.dark.sun@gmail.com>",
7
7
  "license": "MIT",
@@ -39,5 +39,5 @@
39
39
  "typescript": "^5.4.5",
40
40
  "unbuild": "^2.0.0"
41
41
  },
42
- "gitHead": "1346a804b5b9daec565a4bea5104510a6c832b0e"
42
+ "gitHead": "faa257e8d00615561ca3811ef40ae62cccd56025"
43
43
  }