UNPKG

@simplito/privmx-webendpoint

Version:

PrivMX Web Endpoint library

134 lines (131 loc) 8.88 kB
"use strict"; /*! PrivMX Web Endpoint. Copyright © 2024 Simplito sp. z o.o. This file is part of the PrivMX Platform (https://privmx.dev). This software is Licensed under the PrivMX Free License. See the License for the specific language governing permissions and limitations under the License. */ Object.defineProperty(exports, "__esModule", { value: true }); exports.DataChannelCryptorDecryptStatus = exports.StreamEventSelectorType = exports.StreamEventType = exports.EventsEventSelectorType = exports.KvdbEventSelectorType = exports.KvdbEventType = exports.InboxEventSelectorType = exports.InboxEventType = exports.ThreadEventSelectorType = exports.ThreadEventType = exports.StoreEventSelectorType = exports.StoreEventType = exports.ConnectionEventSelectorType = exports.ConnectionEventType = void 0; // Enums var ConnectionEventType; (function (ConnectionEventType) { ConnectionEventType[ConnectionEventType["USER_ADD"] = 0] = "USER_ADD"; ConnectionEventType[ConnectionEventType["USER_REMOVE"] = 1] = "USER_REMOVE"; ConnectionEventType[ConnectionEventType["USER_STATUS"] = 2] = "USER_STATUS"; })(ConnectionEventType || (exports.ConnectionEventType = ConnectionEventType = {})); var ConnectionEventSelectorType; (function (ConnectionEventSelectorType) { ConnectionEventSelectorType[ConnectionEventSelectorType["CONTEXT_ID"] = 0] = "CONTEXT_ID"; })(ConnectionEventSelectorType || (exports.ConnectionEventSelectorType = ConnectionEventSelectorType = {})); var StoreEventType; (function (StoreEventType) { StoreEventType[StoreEventType["STORE_CREATE"] = 0] = "STORE_CREATE"; StoreEventType[StoreEventType["STORE_UPDATE"] = 1] = "STORE_UPDATE"; StoreEventType[StoreEventType["STORE_DELETE"] = 2] = "STORE_DELETE"; StoreEventType[StoreEventType["STORE_STATS"] = 3] = "STORE_STATS"; StoreEventType[StoreEventType["FILE_CREATE"] = 4] = "FILE_CREATE"; StoreEventType[StoreEventType["FILE_UPDATE"] = 5] = "FILE_UPDATE"; StoreEventType[StoreEventType["FILE_DELETE"] = 6] = "FILE_DELETE"; StoreEventType[StoreEventType["COLLECTION_CHANGE"] = 7] = "COLLECTION_CHANGE"; })(StoreEventType || (exports.StoreEventType = StoreEventType = {})); var StoreEventSelectorType; (function (StoreEventSelectorType) { StoreEventSelectorType[StoreEventSelectorType["CONTEXT_ID"] = 0] = "CONTEXT_ID"; StoreEventSelectorType[StoreEventSelectorType["STORE_ID"] = 1] = "STORE_ID"; StoreEventSelectorType[StoreEventSelectorType["FILE_ID"] = 2] = "FILE_ID"; })(StoreEventSelectorType || (exports.StoreEventSelectorType = StoreEventSelectorType = {})); var ThreadEventType; (function (ThreadEventType) { ThreadEventType[ThreadEventType["THREAD_CREATE"] = 0] = "THREAD_CREATE"; ThreadEventType[ThreadEventType["THREAD_UPDATE"] = 1] = "THREAD_UPDATE"; ThreadEventType[ThreadEventType["THREAD_DELETE"] = 2] = "THREAD_DELETE"; ThreadEventType[ThreadEventType["THREAD_STATS"] = 3] = "THREAD_STATS"; ThreadEventType[ThreadEventType["MESSAGE_CREATE"] = 4] = "MESSAGE_CREATE"; ThreadEventType[ThreadEventType["MESSAGE_UPDATE"] = 5] = "MESSAGE_UPDATE"; ThreadEventType[ThreadEventType["MESSAGE_DELETE"] = 6] = "MESSAGE_DELETE"; ThreadEventType[ThreadEventType["COLLECTION_CHANGE"] = 7] = "COLLECTION_CHANGE"; })(ThreadEventType || (exports.ThreadEventType = ThreadEventType = {})); var ThreadEventSelectorType; (function (ThreadEventSelectorType) { ThreadEventSelectorType[ThreadEventSelectorType["CONTEXT_ID"] = 0] = "CONTEXT_ID"; ThreadEventSelectorType[ThreadEventSelectorType["THREAD_ID"] = 1] = "THREAD_ID"; ThreadEventSelectorType[ThreadEventSelectorType["MESSAGE_ID"] = 2] = "MESSAGE_ID"; })(ThreadEventSelectorType || (exports.ThreadEventSelectorType = ThreadEventSelectorType = {})); var InboxEventType; (function (InboxEventType) { InboxEventType[InboxEventType["INBOX_CREATE"] = 0] = "INBOX_CREATE"; InboxEventType[InboxEventType["INBOX_UPDATE"] = 1] = "INBOX_UPDATE"; InboxEventType[InboxEventType["INBOX_DELETE"] = 2] = "INBOX_DELETE"; InboxEventType[InboxEventType["ENTRY_CREATE"] = 3] = "ENTRY_CREATE"; InboxEventType[InboxEventType["ENTRY_DELETE"] = 4] = "ENTRY_DELETE"; InboxEventType[InboxEventType["COLLECTION_CHANGE"] = 5] = "COLLECTION_CHANGE"; })(InboxEventType || (exports.InboxEventType = InboxEventType = {})); var InboxEventSelectorType; (function (InboxEventSelectorType) { InboxEventSelectorType[InboxEventSelectorType["CONTEXT_ID"] = 0] = "CONTEXT_ID"; InboxEventSelectorType[InboxEventSelectorType["INBOX_ID"] = 1] = "INBOX_ID"; InboxEventSelectorType[InboxEventSelectorType["ENTRY_ID"] = 2] = "ENTRY_ID"; })(InboxEventSelectorType || (exports.InboxEventSelectorType = InboxEventSelectorType = {})); var KvdbEventType; (function (KvdbEventType) { KvdbEventType[KvdbEventType["KVDB_CREATE"] = 0] = "KVDB_CREATE"; KvdbEventType[KvdbEventType["KVDB_UPDATE"] = 1] = "KVDB_UPDATE"; KvdbEventType[KvdbEventType["KVDB_DELETE"] = 2] = "KVDB_DELETE"; KvdbEventType[KvdbEventType["KVDB_STATS"] = 3] = "KVDB_STATS"; KvdbEventType[KvdbEventType["ENTRY_CREATE"] = 4] = "ENTRY_CREATE"; KvdbEventType[KvdbEventType["ENTRY_UPDATE"] = 5] = "ENTRY_UPDATE"; KvdbEventType[KvdbEventType["ENTRY_DELETE"] = 6] = "ENTRY_DELETE"; KvdbEventType[KvdbEventType["COLLECTION_CHANGE"] = 7] = "COLLECTION_CHANGE"; })(KvdbEventType || (exports.KvdbEventType = KvdbEventType = {})); var KvdbEventSelectorType; (function (KvdbEventSelectorType) { KvdbEventSelectorType[KvdbEventSelectorType["CONTEXT_ID"] = 0] = "CONTEXT_ID"; KvdbEventSelectorType[KvdbEventSelectorType["KVDB_ID"] = 1] = "KVDB_ID"; KvdbEventSelectorType[KvdbEventSelectorType["ENTRY_ID"] = 2] = "ENTRY_ID"; })(KvdbEventSelectorType || (exports.KvdbEventSelectorType = KvdbEventSelectorType = {})); var EventsEventSelectorType; (function (EventsEventSelectorType) { EventsEventSelectorType[EventsEventSelectorType["CONTEXT_ID"] = 0] = "CONTEXT_ID"; })(EventsEventSelectorType || (exports.EventsEventSelectorType = EventsEventSelectorType = {})); var StreamEventType; (function (StreamEventType) { StreamEventType[StreamEventType["STREAMROOM_CREATE"] = 0] = "STREAMROOM_CREATE"; StreamEventType[StreamEventType["STREAMROOM_UPDATE"] = 1] = "STREAMROOM_UPDATE"; StreamEventType[StreamEventType["STREAMROOM_DELETE"] = 2] = "STREAMROOM_DELETE"; StreamEventType[StreamEventType["STREAM_JOIN"] = 4] = "STREAM_JOIN"; StreamEventType[StreamEventType["STREAM_LEAVE"] = 5] = "STREAM_LEAVE"; StreamEventType[StreamEventType["STREAM_PUBLISH"] = 6] = "STREAM_PUBLISH"; StreamEventType[StreamEventType["STREAM_UNPUBLISH"] = 7] = "STREAM_UNPUBLISH"; })(StreamEventType || (exports.StreamEventType = StreamEventType = {})); var StreamEventSelectorType; (function (StreamEventSelectorType) { StreamEventSelectorType[StreamEventSelectorType["CONTEXT_ID"] = 0] = "CONTEXT_ID"; StreamEventSelectorType[StreamEventSelectorType["STREAMROOM_ID"] = 1] = "STREAMROOM_ID"; StreamEventSelectorType[StreamEventSelectorType["STREAM_ID"] = 2] = "STREAM_ID"; })(StreamEventSelectorType || (exports.StreamEventSelectorType = StreamEventSelectorType = {})); var DataChannelCryptorDecryptStatus; (function (DataChannelCryptorDecryptStatus) { /** No error */ DataChannelCryptorDecryptStatus[DataChannelCryptorDecryptStatus["OK"] = 0] = "OK"; /** Frame too short */ DataChannelCryptorDecryptStatus[DataChannelCryptorDecryptStatus["FRAME_TOO_SHORT"] = 4097] = "FRAME_TOO_SHORT"; /** Unsupported protocol version */ DataChannelCryptorDecryptStatus[DataChannelCryptorDecryptStatus["UNSUPPORTED_VERSION"] = 4098] = "UNSUPPORTED_VERSION"; /** Invalid IV length */ DataChannelCryptorDecryptStatus[DataChannelCryptorDecryptStatus["INVALID_IV_LENGTH"] = 4099] = "INVALID_IV_LENGTH"; /** Truncated frame */ DataChannelCryptorDecryptStatus[DataChannelCryptorDecryptStatus["FRAME_TRUNCATED"] = 4100] = "FRAME_TRUNCATED"; /** Invalid key ID */ DataChannelCryptorDecryptStatus[DataChannelCryptorDecryptStatus["INVALID_KEY_ID"] = 4101] = "INVALID_KEY_ID"; /** Encryption key not found */ DataChannelCryptorDecryptStatus[DataChannelCryptorDecryptStatus["KEY_NOT_FOUND"] = 4102] = "KEY_NOT_FOUND"; /** Invalid encryption key length */ DataChannelCryptorDecryptStatus[DataChannelCryptorDecryptStatus["INVALID_KEY_LENGTH"] = 4103] = "INVALID_KEY_LENGTH"; /** Decryption failed (authentication error) */ DataChannelCryptorDecryptStatus[DataChannelCryptorDecryptStatus["DECRYPT_AUTH_FAILED"] = 4104] = "DECRYPT_AUTH_FAILED"; /** Invalid data sequence number */ DataChannelCryptorDecryptStatus[DataChannelCryptorDecryptStatus["INVALID_DATA_SEQUENCE"] = 4105] = "INVALID_DATA_SEQUENCE"; })(DataChannelCryptorDecryptStatus || (exports.DataChannelCryptorDecryptStatus = DataChannelCryptorDecryptStatus = {}));