@elliemae/pui-scripting-object 1.55.0 → 1.56.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/build/docs/404.html +3 -3
- package/build/docs/Objects/analytics/index.html +4 -4
- package/build/docs/Objects/application/index.html +4 -4
- package/build/docs/Objects/auth/index.html +4 -4
- package/build/docs/Objects/form/index.html +4 -4
- package/build/docs/Objects/global/index.html +4 -4
- package/build/docs/Objects/http/index.html +4 -4
- package/build/docs/Objects/loan/index.html +6 -6
- package/build/docs/Objects/memstorage/index.html +4 -4
- package/build/docs/Objects/module/index.html +4 -4
- package/build/docs/Objects/service/index.html +4 -4
- package/build/docs/Objects/session/index.html +4 -4
- package/build/docs/Objects/styling/index.html +4 -4
- package/build/docs/Objects/transaction/index.html +4 -4
- package/build/docs/Objects/transactiontemplate/index.html +5 -5
- package/build/docs/Objects/websocket/index.html +21 -0
- package/build/docs/api/enumerations/EditModes/index.html +4 -4
- package/build/docs/api/enumerations/FormType/index.html +4 -4
- package/build/docs/api/enumerations/LoanCollection/index.html +4 -4
- package/build/docs/api/enumerations/LoanLevelActions/index.html +4 -4
- package/build/docs/api/enumerations/LogLevels/index.html +4 -4
- package/build/docs/api/enumerations/ModalSize/index.html +4 -4
- package/build/docs/api/enumerations/ModalType/index.html +4 -4
- package/build/docs/api/enumerations/NavigationType/index.html +4 -4
- package/build/docs/api/enumerations/OpenMode/index.html +4 -4
- package/build/docs/api/enumerations/OpenType/index.html +4 -4
- package/build/docs/api/enumerations/OriginContext/index.html +4 -4
- package/build/docs/api/enumerations/RecordActions/index.html +4 -4
- package/build/docs/api/enumerations/RecordViewType/index.html +4 -4
- package/build/docs/api/enumerations/SCOPE/index.html +4 -4
- package/build/docs/api/enumerations/ScriptingObjectNames/index.html +5 -5
- package/build/docs/api/enumerations/ServiceSetupCategory/index.html +4 -4
- package/build/docs/api/enumerations/ToastType/index.html +4 -4
- package/build/docs/api/enumerations/TokenType/index.html +5 -5
- package/build/docs/api/enumerations/WebSocketErrorCode/index.html +19 -0
- package/build/docs/api/index.html +6 -6
- package/build/docs/api/interfaces/IAnalytics/index.html +6 -6
- package/build/docs/api/interfaces/IApplication/index.html +4 -4
- package/build/docs/api/interfaces/IAuth/index.html +4 -4
- package/build/docs/api/interfaces/IEvent/index.html +4 -4
- package/build/docs/api/interfaces/IForm/index.html +4 -4
- package/build/docs/api/interfaces/IGlobal/index.html +4 -4
- package/build/docs/api/interfaces/IHttp/index.html +4 -4
- package/build/docs/api/interfaces/ILoan/index.html +5 -5
- package/build/docs/api/interfaces/IMemStorage/index.html +4 -4
- package/build/docs/api/interfaces/IModule/index.html +4 -4
- package/build/docs/api/interfaces/IScriptingObject/index.html +5 -4
- package/build/docs/api/interfaces/IScriptingObjectProxy/index.html +4 -4
- package/build/docs/api/interfaces/IService/index.html +4 -4
- package/build/docs/api/interfaces/ISession/index.html +4 -4
- package/build/docs/api/interfaces/IStyling/index.html +8 -8
- package/build/docs/api/interfaces/ITransaction/index.html +4 -4
- package/build/docs/api/interfaces/ITransactionTemplate/index.html +5 -5
- package/build/docs/api/interfaces/IWebSocket/index.html +97 -0
- package/build/docs/api/type-aliases/AcceptFile/index.html +5 -5
- package/build/docs/api/type-aliases/ActionInfo/index.html +4 -4
- package/build/docs/api/type-aliases/ActionResponse/index.html +4 -4
- package/build/docs/api/type-aliases/AdditionalServices/index.html +4 -4
- package/build/docs/api/type-aliases/AppInfo/index.html +4 -4
- package/build/docs/api/type-aliases/ApplicationActionCompletedListener/index.html +4 -4
- package/build/docs/api/type-aliases/ApplicationContext/index.html +4 -4
- package/build/docs/api/type-aliases/ApplicationEvents/index.html +4 -4
- package/build/docs/api/type-aliases/ApplicationInfo/index.html +4 -4
- package/build/docs/api/type-aliases/ApplicationLoginListener/index.html +4 -4
- package/build/docs/api/type-aliases/ApplicationNavigationStartListener/index.html +4 -4
- package/build/docs/api/type-aliases/AssignLoanTeamMember/index.html +4 -4
- package/build/docs/api/type-aliases/AusTracking/index.html +4 -4
- package/build/docs/api/type-aliases/BAEvent/index.html +4 -4
- package/build/docs/api/type-aliases/BorrowerContacts/index.html +4 -4
- package/build/docs/api/type-aliases/BusinessContacts/index.html +4 -4
- package/build/docs/api/type-aliases/BusinessRules/index.html +4 -4
- package/build/docs/api/type-aliases/Capabilities/index.html +4 -4
- package/build/docs/api/type-aliases/ChangeExpectedDate/index.html +4 -4
- package/build/docs/api/type-aliases/CommitInfo/index.html +4 -4
- package/build/docs/api/type-aliases/CompanySettingsQueryOptions/index.html +4 -4
- package/build/docs/api/type-aliases/CompanyUserSetup/index.html +4 -4
- package/build/docs/api/type-aliases/ConditionOperator/index.html +4 -4
- package/build/docs/api/type-aliases/ConditionType/index.html +4 -4
- package/build/docs/api/type-aliases/ContactSetup/index.html +4 -4
- package/build/docs/api/type-aliases/Contacts/index.html +4 -4
- package/build/docs/api/type-aliases/CurrentApplicationOptions/index.html +4 -4
- package/build/docs/api/type-aliases/Dashboard/index.html +4 -4
- package/build/docs/api/type-aliases/DeliveryConditions/index.html +4 -4
- package/build/docs/api/type-aliases/DescriptorInfo/index.html +4 -4
- package/build/docs/api/type-aliases/DisclosureTracking/index.html +4 -4
- package/build/docs/api/type-aliases/DocsSetup/index.html +4 -4
- package/build/docs/api/type-aliases/Documents/index.html +4 -4
- package/build/docs/api/type-aliases/DynamicDataManagement/index.html +4 -4
- package/build/docs/api/type-aliases/EDisclosures/index.html +4 -4
- package/build/docs/api/type-aliases/EFolderHistory/index.html +4 -4
- package/build/docs/api/type-aliases/EFolderSetup/index.html +4 -4
- package/build/docs/api/type-aliases/EVault/index.html +4 -4
- package/build/docs/api/type-aliases/EVaultPortal/index.html +4 -4
- package/build/docs/api/type-aliases/EditComment/index.html +4 -4
- package/build/docs/api/type-aliases/EditModeOptions/index.html +4 -4
- package/build/docs/api/type-aliases/EncompassWebServices/index.html +4 -4
- package/build/docs/api/type-aliases/EnhancedConditions/index.html +4 -4
- package/build/docs/api/type-aliases/EntityOptions/index.html +4 -4
- package/build/docs/api/type-aliases/Environment/index.html +4 -4
- package/build/docs/api/type-aliases/EventObjects/index.html +5 -5
- package/build/docs/api/type-aliases/Events/index.html +5 -5
- package/build/docs/api/type-aliases/ExportServices/index.html +4 -4
- package/build/docs/api/type-aliases/FieldOptions/index.html +4 -4
- package/build/docs/api/type-aliases/FieldOptionsParam/index.html +4 -4
- package/build/docs/api/type-aliases/FileContacts/index.html +4 -4
- package/build/docs/api/type-aliases/FilterOperator/index.html +4 -4
- package/build/docs/api/type-aliases/FilterOption/index.html +4 -4
- package/build/docs/api/type-aliases/FinishMilestone/index.html +4 -4
- package/build/docs/api/type-aliases/Form/index.html +4 -4
- package/build/docs/api/type-aliases/FormDescriptor/index.html +4 -4
- package/build/docs/api/type-aliases/FormEvents/index.html +4 -4
- package/build/docs/api/type-aliases/FormInfo/index.html +4 -4
- package/build/docs/api/type-aliases/FormLoadListener/index.html +4 -4
- package/build/docs/api/type-aliases/FormUnloadListener/index.html +4 -4
- package/build/docs/api/type-aliases/GlobalChangeListener/index.html +4 -4
- package/build/docs/api/type-aliases/GlobalEvents/index.html +4 -4
- package/build/docs/api/type-aliases/GrantWriteAccess/index.html +4 -4
- package/build/docs/api/type-aliases/GseServices/index.html +4 -4
- package/build/docs/api/type-aliases/ImportLoan/index.html +4 -4
- package/build/docs/api/type-aliases/LIB_NAME/index.html +4 -4
- package/build/docs/api/type-aliases/LaunchCategoryOptions/index.html +4 -4
- package/build/docs/api/type-aliases/LaunchProviderOptions/index.html +4 -4
- package/build/docs/api/type-aliases/LaunchServiceSetupOptions/index.html +4 -4
- package/build/docs/api/type-aliases/Listener/index.html +4 -4
- package/build/docs/api/type-aliases/LoConnectTasks/index.html +4 -4
- package/build/docs/api/type-aliases/LoanApplicationSelectedListener/index.html +4 -4
- package/build/docs/api/type-aliases/LoanChangeEventInfo/index.html +4 -4
- package/build/docs/api/type-aliases/LoanChangeListener/index.html +4 -4
- package/build/docs/api/type-aliases/LoanCloseListener/index.html +4 -4
- package/build/docs/api/type-aliases/LoanCollectionObject/index.html +4 -4
- package/build/docs/api/type-aliases/LoanCommittedListener/index.html +4 -4
- package/build/docs/api/type-aliases/LoanEditModeChangeListener/index.html +4 -4
- package/build/docs/api/type-aliases/LoanEditModeEventInfo/index.html +4 -4
- package/build/docs/api/type-aliases/LoanEvents/index.html +4 -4
- package/build/docs/api/type-aliases/LoanFieldChangeSyncListener/index.html +4 -4
- package/build/docs/api/type-aliases/LoanMilestoneCompletedListener/index.html +4 -4
- package/build/docs/api/type-aliases/LoanObject/index.html +4 -4
- package/build/docs/api/type-aliases/LoanOpenListener/index.html +4 -4
- package/build/docs/api/type-aliases/LoanPreCommitListener/index.html +4 -4
- package/build/docs/api/type-aliases/LoanPreMilestoneCompleteListener/index.html +4 -4
- package/build/docs/api/type-aliases/LoanRecord/index.html +4 -4
- package/build/docs/api/type-aliases/LoanSetup/index.html +4 -4
- package/build/docs/api/type-aliases/LoanSyncListener/index.html +4 -4
- package/build/docs/api/type-aliases/LoanTeam/index.html +4 -4
- package/build/docs/api/type-aliases/LogMessage/index.html +4 -4
- package/build/docs/api/type-aliases/ManageServiceProviders/index.html +4 -4
- package/build/docs/api/type-aliases/Milestone/index.html +4 -4
- package/build/docs/api/type-aliases/MilestoneInfo/index.html +5 -5
- package/build/docs/api/type-aliases/MilestoneWorkflowManagement/index.html +4 -4
- package/build/docs/api/type-aliases/ModalContent/index.html +4 -4
- package/build/docs/api/type-aliases/ModalOptions/index.html +4 -4
- package/build/docs/api/type-aliases/ModuleCloseInfo/index.html +4 -4
- package/build/docs/api/type-aliases/ModuleCloseListener/index.html +4 -4
- package/build/docs/api/type-aliases/ModuleEvents/index.html +4 -4
- package/build/docs/api/type-aliases/ModuleOpenInfo/index.html +4 -4
- package/build/docs/api/type-aliases/ModuleOpenListener/index.html +4 -4
- package/build/docs/api/type-aliases/ModuleParameters/index.html +4 -4
- package/build/docs/api/type-aliases/ModuleUnLoadingListener/index.html +4 -4
- package/build/docs/api/type-aliases/ModuleUnloadInfo/index.html +4 -4
- package/build/docs/api/type-aliases/MoveFrom/index.html +4 -4
- package/build/docs/api/type-aliases/MoveLoans/index.html +4 -4
- package/build/docs/api/type-aliases/MoveTo/index.html +4 -4
- package/build/docs/api/type-aliases/NavigationOptions/index.html +4 -4
- package/build/docs/api/type-aliases/NavigationStartInfo/index.html +4 -4
- package/build/docs/api/type-aliases/OpenOptions/index.html +4 -4
- package/build/docs/api/type-aliases/OriginDetails/index.html +4 -4
- package/build/docs/api/type-aliases/PerfMark/index.html +4 -4
- package/build/docs/api/type-aliases/PersonalTemplates/index.html +4 -4
- package/build/docs/api/type-aliases/Personas/index.html +4 -4
- package/build/docs/api/type-aliases/Pipeline/index.html +4 -4
- package/build/docs/api/type-aliases/PipelineView/index.html +4 -4
- package/build/docs/api/type-aliases/PluginInfo/index.html +4 -4
- package/build/docs/api/type-aliases/PostClosingConditions/index.html +4 -4
- package/build/docs/api/type-aliases/PreliminaryConditions/index.html +4 -4
- package/build/docs/api/type-aliases/Print/index.html +4 -4
- package/build/docs/api/type-aliases/PrintOptions/index.html +4 -4
- package/build/docs/api/type-aliases/PurchaseConditions/index.html +4 -4
- package/build/docs/api/type-aliases/RecordOptions/index.html +4 -4
- package/build/docs/api/type-aliases/RemotingScriptingObject/index.html +4 -4
- package/build/docs/api/type-aliases/ResourceDetails/index.html +4 -4
- package/build/docs/api/type-aliases/ResourceOptions/index.html +4 -4
- package/build/docs/api/type-aliases/ReturnFile/index.html +4 -4
- package/build/docs/api/type-aliases/Role/index.html +4 -4
- package/build/docs/api/type-aliases/Role2/index.html +4 -4
- package/build/docs/api/type-aliases/Route/index.html +4 -4
- package/build/docs/api/type-aliases/ScriptingObjectTypes/index.html +9 -6
- package/build/docs/api/type-aliases/SecondarySetup/index.html +4 -4
- package/build/docs/api/type-aliases/Service/index.html +4 -4
- package/build/docs/api/type-aliases/ServiceSetup/index.html +4 -4
- package/build/docs/api/type-aliases/StandardWebForm/index.html +4 -4
- package/build/docs/api/type-aliases/StateInfo/index.html +4 -4
- package/build/docs/api/type-aliases/StyleOptions/index.html +5 -5
- package/build/docs/api/type-aliases/SubscribeOptions/index.html +39 -0
- package/build/docs/api/type-aliases/SubscribeResult/index.html +23 -0
- package/build/docs/api/type-aliases/SubscriptionFilter/index.html +20 -0
- package/build/docs/api/type-aliases/SystemAdministration/index.html +5 -5
- package/build/docs/api/type-aliases/TableRowCriteria/index.html +4 -4
- package/build/docs/api/type-aliases/TableRowStyleOptions/index.html +5 -5
- package/build/docs/api/type-aliases/TablesAndFees/index.html +4 -4
- package/build/docs/api/type-aliases/TimingOptions/index.html +4 -4
- package/build/docs/api/type-aliases/ToastOptions/index.html +4 -4
- package/build/docs/api/type-aliases/TokenInfo/index.html +4 -4
- package/build/docs/api/type-aliases/Tool/index.html +4 -4
- package/build/docs/api/type-aliases/TpoCompanyDetails/index.html +4 -4
- package/build/docs/api/type-aliases/TpoConnectSiteSettings/index.html +4 -4
- package/build/docs/api/type-aliases/TpoContacts/index.html +4 -4
- package/build/docs/api/type-aliases/TpoFees/index.html +4 -4
- package/build/docs/api/type-aliases/TpoInformation/index.html +4 -4
- package/build/docs/api/type-aliases/TpoOrganizationSettings/index.html +4 -4
- package/build/docs/api/type-aliases/TqlServices/index.html +4 -4
- package/build/docs/api/type-aliases/Trades/index.html +4 -4
- package/build/docs/api/type-aliases/TransactionDetails/index.html +4 -4
- package/build/docs/api/type-aliases/TransactionEvent/index.html +4 -4
- package/build/docs/api/type-aliases/TransactionInfo/index.html +4 -4
- package/build/docs/api/type-aliases/TransactionRequest/index.html +4 -4
- package/build/docs/api/type-aliases/TransactionResource/index.html +4 -4
- package/build/docs/api/type-aliases/TransactionTemplateDetails/index.html +4 -4
- package/build/docs/api/type-aliases/UnAuthorizedError/index.html +4 -4
- package/build/docs/api/type-aliases/UnderwritingCenter/index.html +4 -4
- package/build/docs/api/type-aliases/UnderwritingConditions/index.html +4 -4
- package/build/docs/api/type-aliases/User/index.html +4 -4
- package/build/docs/api/type-aliases/UserAccessRights/index.html +4 -4
- package/build/docs/api/type-aliases/UserInfo/index.html +5 -5
- package/build/docs/api/type-aliases/WebSocketErrorDetail/index.html +30 -0
- package/build/docs/api/type-aliases/WebSocketEventMessageInfo/index.html +30 -0
- package/build/docs/api/type-aliases/WebSocketEvents/index.html +25 -0
- package/build/docs/api/type-aliases/WebSocketMessageListener/index.html +36 -0
- package/build/docs/assets/css/styles.09dda1ba.css +1 -0
- package/build/docs/assets/js/1dbb8e6f.b47fd3ff.js +1 -0
- package/build/docs/assets/js/3646b552.ad678aaa.js +1 -0
- package/build/docs/assets/js/499e2eaf.3cce3886.js +1 -0
- package/build/docs/assets/js/4d61f813.b78dd63e.js +1 -0
- package/build/docs/assets/js/5011808b.d79174d8.js +1 -0
- package/build/docs/assets/js/{551d7418.2c68ad26.js → 551d7418.c1c65e47.js} +1 -1
- package/build/docs/assets/js/55f55257.1b5d0e2e.js +1 -0
- package/build/docs/assets/js/585c3847.daca8a8b.js +1 -0
- package/build/docs/assets/js/5e8c322a.c55a3a92.js +1 -0
- package/build/docs/assets/js/6eb8d7b2.1f21dfc4.js +1 -0
- package/build/docs/assets/js/76341d1b.c9b912a7.js +1 -0
- package/build/docs/assets/js/78059b00.9889058b.js +1 -0
- package/build/docs/assets/js/79996a12.ecce42ab.js +1 -0
- package/build/docs/assets/js/{810e4273.0fcc0450.js → 810e4273.2e01b646.js} +1 -1
- package/build/docs/assets/js/a38914f7.9ee44b05.js +1 -0
- package/build/docs/assets/js/b59102cd.fdeb935f.js +1 -0
- package/build/docs/assets/js/{bb84e7b0.766f262f.js → bb84e7b0.5692716e.js} +1 -1
- package/build/docs/assets/js/bd4b84ba.ec729adc.js +1 -0
- package/build/docs/assets/js/c1f14eba.7b63d81c.js +1 -0
- package/build/docs/assets/js/{c377a04b.9423f05e.js → c377a04b.68606aac.js} +1 -1
- package/build/docs/assets/js/ca6b470f.b2343733.js +1 -0
- package/build/docs/assets/js/{deb01a76.b0489e25.js → deb01a76.04dc34de.js} +1 -1
- package/build/docs/assets/js/{e577279e.8cb51fd7.js → e577279e.6790a498.js} +1 -1
- package/build/docs/assets/js/ebc6cbfc.dfb7a6f6.js +1 -0
- package/build/docs/assets/js/eef1b94c.b267d013.js +1 -0
- package/build/docs/assets/js/f920ab10.688b6b83.js +1 -0
- package/build/docs/assets/js/fdf27b93.c7d11e68.js +1 -0
- package/build/docs/assets/js/fdf6128b.999e9e4f.js +1 -0
- package/build/docs/assets/js/{main.07dd8413.js → main.7f0932a3.js} +2 -2
- package/build/docs/assets/js/runtime~main.01cf63d9.js +1 -0
- package/build/docs/index.html +4 -4
- package/build/docs/sitemap.xml +1 -1
- package/dist/cjs/index.js +1 -0
- package/dist/cjs/objects/websocket.js +47 -0
- package/dist/cjs/scriptingObjectList.js +1 -0
- package/dist/esm/index.js +1 -0
- package/dist/esm/objects/websocket.js +27 -0
- package/dist/esm/scriptingObjectList.js +1 -0
- package/dist/types/lib/index.d.ts +1 -0
- package/dist/types/lib/objects/loan.d.ts +3 -0
- package/dist/types/lib/objects/styling.d.ts +6 -6
- package/dist/types/lib/objects/websocket.d.ts +211 -0
- package/dist/types/lib/scriptingObjectEventList.d.ts +3 -2
- package/dist/types/lib/scriptingObjectList.d.ts +4 -1
- package/dist/types/tsconfig.tsbuildinfo +1 -1
- package/package.json +4 -4
- package/build/docs/assets/css/styles.48d5ef50.css +0 -1
- package/build/docs/assets/js/4d61f813.8c6c93fb.js +0 -1
- package/build/docs/assets/js/5011808b.633f4004.js +0 -1
- package/build/docs/assets/js/55f55257.17743cdc.js +0 -1
- package/build/docs/assets/js/585c3847.c08ab90b.js +0 -1
- package/build/docs/assets/js/5e8c322a.42637951.js +0 -1
- package/build/docs/assets/js/79996a12.572d064a.js +0 -1
- package/build/docs/assets/js/a38914f7.5f7132ef.js +0 -1
- package/build/docs/assets/js/ca6b470f.833e4914.js +0 -1
- package/build/docs/assets/js/eef1b94c.677197ac.js +0 -1
- package/build/docs/assets/js/f920ab10.7f0d630d.js +0 -1
- package/build/docs/assets/js/fdf27b93.2537f5f4.js +0 -1
- package/build/docs/assets/js/fdf6128b.2af9aa1e.js +0 -1
- package/build/docs/assets/js/runtime~main.fab082c7.js +0 -1
- /package/build/docs/assets/js/{main.07dd8413.js.LICENSE.txt → main.7f0932a3.js.LICENSE.txt} +0 -0
|
@@ -0,0 +1,211 @@
|
|
|
1
|
+
import { IEvent } from '../event.js';
|
|
2
|
+
import { IScriptingObject } from '../scriptingObject.js';
|
|
3
|
+
/**
|
|
4
|
+
* Filter criteria for WebSocket subscription.
|
|
5
|
+
*
|
|
6
|
+
* Each key is a filter field name and the value is an array of acceptable values.
|
|
7
|
+
* Criteria keys are combined with AND logic; multiple values within a key use OR logic.
|
|
8
|
+
*/
|
|
9
|
+
export type SubscriptionFilter = Record<string, string[]>;
|
|
10
|
+
/**
|
|
11
|
+
* Options for subscribing to a WebSocket resource event.
|
|
12
|
+
*
|
|
13
|
+
* Either `resourceId` or `filter` must be provided.
|
|
14
|
+
*/
|
|
15
|
+
export type SubscribeOptions = {
|
|
16
|
+
/**
|
|
17
|
+
* Name of the resource to subscribe to (case insensitive).
|
|
18
|
+
* @example 'serviceOrder'
|
|
19
|
+
*/
|
|
20
|
+
resource: string;
|
|
21
|
+
/**
|
|
22
|
+
* Unique identifier of the specific resource instance to subscribe to.
|
|
23
|
+
* Cannot be combined with `filter`.
|
|
24
|
+
* @example '1e65313c-db09-496c-85ba-bb0758623f93'
|
|
25
|
+
*/
|
|
26
|
+
resourceId?: string;
|
|
27
|
+
/**
|
|
28
|
+
* Key/value filter criteria applied against Kafka message headers.
|
|
29
|
+
* Cannot be combined with `resourceId`.
|
|
30
|
+
* @example { loanId: ['lo7ee116-ec80-4dbf-b387-14606d0e4807'] }
|
|
31
|
+
*/
|
|
32
|
+
filter?: SubscriptionFilter;
|
|
33
|
+
};
|
|
34
|
+
/**
|
|
35
|
+
* Result returned after a successful subscription
|
|
36
|
+
*/
|
|
37
|
+
export type SubscribeResult = {
|
|
38
|
+
/**
|
|
39
|
+
* Unique identifier for the active subscription.
|
|
40
|
+
* Use this to unsubscribe or correlate incoming events.
|
|
41
|
+
*/
|
|
42
|
+
subscriptionId: string;
|
|
43
|
+
};
|
|
44
|
+
/**
|
|
45
|
+
* Error detail returned by the WebSocket server
|
|
46
|
+
*/
|
|
47
|
+
export type WebSocketErrorDetail = {
|
|
48
|
+
/**
|
|
49
|
+
* Machine-readable error code
|
|
50
|
+
* @example 'INVALID_RESOURCE'
|
|
51
|
+
*/
|
|
52
|
+
code: string;
|
|
53
|
+
/**
|
|
54
|
+
* Human-readable error message
|
|
55
|
+
* @example 'Unknown resource name'
|
|
56
|
+
*/
|
|
57
|
+
message: string;
|
|
58
|
+
};
|
|
59
|
+
/**
|
|
60
|
+
* Well-known WebSocket command error codes
|
|
61
|
+
*/
|
|
62
|
+
export declare const enum WebSocketErrorCode {
|
|
63
|
+
PARSING_FAILED = "PARSING_FAILED",
|
|
64
|
+
MISSING_CORRELATION_ID = "MISSING_CORRELATION_ID",
|
|
65
|
+
EMPTY_CORRELATION_ID = "EMPTY_CORRELATION_ID",
|
|
66
|
+
MISSING_TYPE = "MISSING_TYPE",
|
|
67
|
+
EMPTY_TYPE = "EMPTY_TYPE",
|
|
68
|
+
INVALID_TYPE = "INVALID_TYPE",
|
|
69
|
+
MISSING_SUBSCRIPTION_ID = "MISSING_SUBSCRIPTION_ID",
|
|
70
|
+
EMPTY_SUBSCRIPTION_ID = "EMPTY_SUBSCRIPTION_ID",
|
|
71
|
+
SUBSCRIPTION_NOT_FOUND = "SUBSCRIPTION_NOT_FOUND",
|
|
72
|
+
MISSING_RESOURCE = "MISSING_RESOURCE",
|
|
73
|
+
EMPTY_RESOURCE = "EMPTY_RESOURCE",
|
|
74
|
+
INVALID_RESOURCE = "INVALID_RESOURCE",
|
|
75
|
+
MISSING_RESOURCE_ID_AND_FILTER = "MISSING_RESOURCE_ID_AND_FILTER",
|
|
76
|
+
EMPTY_RESOURCE_ID = "EMPTY_RESOURCE_ID",
|
|
77
|
+
INVALID_RESOURCE_ID = "INVALID_RESOURCE_ID",
|
|
78
|
+
INVALID_FILTER_OBJECT = "INVALID_FILTER_OBJECT",
|
|
79
|
+
EMPTY_FILTER_OBJECT = "EMPTY_FILTER_OBJECT",
|
|
80
|
+
EMPTY_FILTER_KEY = "EMPTY_FILTER_KEY",
|
|
81
|
+
INVALID_FILTER_VALUES = "INVALID_FILTER_VALUES",
|
|
82
|
+
EMPTY_FILTER_VALUES = "EMPTY_FILTER_VALUES",
|
|
83
|
+
EMPTY_FILTER_VALUE = "EMPTY_FILTER_VALUE"
|
|
84
|
+
}
|
|
85
|
+
/**
|
|
86
|
+
* Payload delivered with a WebSocket event message
|
|
87
|
+
*/
|
|
88
|
+
export type WebSocketEventMessageInfo = {
|
|
89
|
+
/**
|
|
90
|
+
* Subscription that matched this event
|
|
91
|
+
*/
|
|
92
|
+
subscriptionId: string;
|
|
93
|
+
/**
|
|
94
|
+
* Name of the resource that produced the event
|
|
95
|
+
*/
|
|
96
|
+
resource: string;
|
|
97
|
+
/**
|
|
98
|
+
* The event payload forwarded from the server (opaque to the pss gateway)
|
|
99
|
+
*/
|
|
100
|
+
payload: Record<string, unknown>;
|
|
101
|
+
};
|
|
102
|
+
/**
|
|
103
|
+
* Event handler for incoming WebSocket event messages.
|
|
104
|
+
*
|
|
105
|
+
* Fired when a message matching a subscription's filter criteria is received.
|
|
106
|
+
* @param params event parameters
|
|
107
|
+
* @param params.obj websocket object reference
|
|
108
|
+
* @param params.eventName event name
|
|
109
|
+
* @param params.eventParams the event message information including subscriptionId, resource, and payload
|
|
110
|
+
* @param params.eventOptions additional options related to the event
|
|
111
|
+
*/
|
|
112
|
+
export type WebSocketMessageListener = (params: {
|
|
113
|
+
obj: IWebSocket;
|
|
114
|
+
eventName: string;
|
|
115
|
+
eventParams: WebSocketEventMessageInfo;
|
|
116
|
+
eventOptions?: Record<string, unknown>;
|
|
117
|
+
}) => void;
|
|
118
|
+
/**
|
|
119
|
+
* Event types available for WebSocket operations.
|
|
120
|
+
* @see {@link WebSocketMessageListener}
|
|
121
|
+
*/
|
|
122
|
+
export type WebSocketEvents = {
|
|
123
|
+
/**
|
|
124
|
+
* Event is fired when a WebSocket event message is received for an active subscription.
|
|
125
|
+
*
|
|
126
|
+
* Use {@link WebSocketMessageListener} to handle this event
|
|
127
|
+
*/
|
|
128
|
+
'websocket.message': WebSocketMessageListener;
|
|
129
|
+
};
|
|
130
|
+
/**
|
|
131
|
+
* Scripting object for WebSocket communication with the server.
|
|
132
|
+
*
|
|
133
|
+
* The microapp host implements this interface and guest microapps use it
|
|
134
|
+
* to subscribe/unsubscribe to server-side events delivered over WebSocket.
|
|
135
|
+
*
|
|
136
|
+
* See {@link WebSocketEvents} for supported events
|
|
137
|
+
*/
|
|
138
|
+
export interface IWebSocket extends IScriptingObject {
|
|
139
|
+
/**
|
|
140
|
+
* Event fired when a WebSocket message is received for an active subscription.
|
|
141
|
+
*
|
|
142
|
+
* Use {@link WebSocketMessageListener} to handle this event
|
|
143
|
+
* @example
|
|
144
|
+
* with v2 SSF
|
|
145
|
+
* ```ts
|
|
146
|
+
* guest.subscribe({
|
|
147
|
+
* eventId: 'websocket.message',
|
|
148
|
+
* callback: ({ eventParams }) => {
|
|
149
|
+
* console.log('Received event for subscription', eventParams.subscriptionId);
|
|
150
|
+
* console.log('Resource:', eventParams.resource);
|
|
151
|
+
* console.log('Payload:', eventParams.payload);
|
|
152
|
+
* }
|
|
153
|
+
* });
|
|
154
|
+
* ```
|
|
155
|
+
* @example
|
|
156
|
+
* with v1 SSF
|
|
157
|
+
* ```ts
|
|
158
|
+
* elli.script.subscribe('websocket', 'message', ({ eventParams }) => {
|
|
159
|
+
* console.log('Received event for subscription', eventParams.subscriptionId);
|
|
160
|
+
* console.log('Resource:', eventParams.resource);
|
|
161
|
+
* console.log('Payload:', eventParams.payload);
|
|
162
|
+
* });
|
|
163
|
+
* ```
|
|
164
|
+
*/
|
|
165
|
+
readonly Message: IEvent;
|
|
166
|
+
/**
|
|
167
|
+
* Subscribe to a WebSocket resource event.
|
|
168
|
+
*
|
|
169
|
+
* Sends a subscribe command to the WebSocket server for the specified resource.
|
|
170
|
+
* Either `resourceId` or `filter` must be provided in the options.
|
|
171
|
+
*
|
|
172
|
+
* On success, returns a {@link SubscribeResult} containing the `subscriptionId`.
|
|
173
|
+
* If a matching subscription is already active, the existing `subscriptionId` is returned.
|
|
174
|
+
* The `subscriptionId` is used to correlate incoming event messages and to unsubscribe.
|
|
175
|
+
* @param options subscription options including resource name, optional resourceId or filter
|
|
176
|
+
* @returns subscription result containing the unique subscriptionId
|
|
177
|
+
* @throws error if the resource is unknown or filter/resourceId is invalid
|
|
178
|
+
* @example
|
|
179
|
+
* subscribe by resourceId
|
|
180
|
+
* ```ts
|
|
181
|
+
* const result = await websocket.subscribe({
|
|
182
|
+
* resource: 'serviceOrder',
|
|
183
|
+
* resourceId: '1e65313c-db09-496c-85ba-bb0758623f93'
|
|
184
|
+
* });
|
|
185
|
+
* console.log('Subscribed with id:', result.subscriptionId);
|
|
186
|
+
* ```
|
|
187
|
+
* @example
|
|
188
|
+
* subscribe by filter
|
|
189
|
+
* ```ts
|
|
190
|
+
* const result = await websocket.subscribe({
|
|
191
|
+
* resource: 'serviceOrder',
|
|
192
|
+
* filter: { loanId: ['lo7ee116-ec80-4dbf-b387-14606d0e4807'] }
|
|
193
|
+
* });
|
|
194
|
+
* console.log('Subscribed with id:', result.subscriptionId);
|
|
195
|
+
* ```
|
|
196
|
+
*/
|
|
197
|
+
subscribe(options: SubscribeOptions): Promise<SubscribeResult>;
|
|
198
|
+
/**
|
|
199
|
+
* Unsubscribe from an active WebSocket subscription.
|
|
200
|
+
*
|
|
201
|
+
* Sends an unsubscribe command to the WebSocket server for the given subscriptionId.
|
|
202
|
+
* After unsubscribing, no further event messages will be received for this subscription.
|
|
203
|
+
* @param subscriptionId unique identifier of the subscription to cancel
|
|
204
|
+
* @throws error if the subscriptionId does not exist
|
|
205
|
+
* @example
|
|
206
|
+
* ```ts
|
|
207
|
+
* await websocket.unsubscribe('4fa1ad8a-0ffa-46b5-8871-9b4b4cbf2eb3');
|
|
208
|
+
* ```
|
|
209
|
+
*/
|
|
210
|
+
unsubscribe(subscriptionId: string): Promise<void>;
|
|
211
|
+
}
|
|
@@ -4,9 +4,10 @@ import { FormEvents, IForm } from './objects/form.js';
|
|
|
4
4
|
import { GlobalEvents, IGlobal } from './objects/global.js';
|
|
5
5
|
import { LoanEvents, ILoan } from './objects/loan.js';
|
|
6
6
|
import { ModuleEvents, IModule } from './objects/module.js';
|
|
7
|
+
import { WebSocketEvents, IWebSocket } from './objects/websocket.js';
|
|
7
8
|
type KeysMatching<T extends object, V> = {
|
|
8
9
|
[K in keyof T]-?: [V] extends [T[K]] ? K : never;
|
|
9
10
|
}[keyof T];
|
|
10
|
-
export type Events = ApplicationEvents & FormEvents & GlobalEvents & LoanEvents & ModuleEvents;
|
|
11
|
-
export type EventObjects = KeysMatching<IApplication, IEvent> | KeysMatching<IForm, IEvent> | KeysMatching<IGlobal, IEvent> | KeysMatching<ILoan, IEvent> | KeysMatching<IModule, IEvent>;
|
|
11
|
+
export type Events = ApplicationEvents & FormEvents & GlobalEvents & LoanEvents & ModuleEvents & WebSocketEvents;
|
|
12
|
+
export type EventObjects = KeysMatching<IApplication, IEvent> | KeysMatching<IForm, IEvent> | KeysMatching<IGlobal, IEvent> | KeysMatching<ILoan, IEvent> | KeysMatching<IModule, IEvent> | KeysMatching<IWebSocket, IEvent>;
|
|
12
13
|
export {};
|
|
@@ -12,6 +12,7 @@ import { IMemStorage } from './objects/memStorage.js';
|
|
|
12
12
|
import { IModule } from './objects/module.js';
|
|
13
13
|
import { IService } from './objects/service.js';
|
|
14
14
|
import { IStyling } from './objects/styling.js';
|
|
15
|
+
import { IWebSocket } from './objects/websocket.js';
|
|
15
16
|
/**
|
|
16
17
|
* list of scripting object names and their types
|
|
17
18
|
*/
|
|
@@ -30,6 +31,7 @@ export type ScriptingObjectTypes = {
|
|
|
30
31
|
styling: IStyling;
|
|
31
32
|
transaction: ITransaction;
|
|
32
33
|
transactiontemplate: ITransactionTemplate;
|
|
34
|
+
websocket: IWebSocket;
|
|
33
35
|
};
|
|
34
36
|
export declare const enum ScriptingObjectNames {
|
|
35
37
|
Analytics = "analytics",
|
|
@@ -46,5 +48,6 @@ export declare const enum ScriptingObjectNames {
|
|
|
46
48
|
Session = "session",
|
|
47
49
|
Styling = "styling",
|
|
48
50
|
Transaction = "transaction",
|
|
49
|
-
TransactionTemplate = "transactiontemplate"
|
|
51
|
+
TransactionTemplate = "transactiontemplate",
|
|
52
|
+
WebSocket = "websocket"
|
|
50
53
|
}
|