@voicenter-team/events-sdk 0.0.8 → 0.0.10

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.
Files changed (54) hide show
  1. package/dist/voicenter-events-sdk.d.ts +185 -36
  2. package/package.json +4 -1
  3. package/.eslintrc.cjs +0 -16
  4. package/.github/workflows/main.yml +0 -16
  5. package/.idea/VoicenterEventsSDK.iml +0 -12
  6. package/.idea/git_toolbox_prj.xml +0 -15
  7. package/.idea/inspectionProfiles/Project_Default.xml +0 -6
  8. package/.idea/jsLibraryMappings.xml +0 -6
  9. package/.idea/jsLinters/eslint.xml +0 -7
  10. package/.idea/modules.xml +0 -8
  11. package/.idea/vcs.xml +0 -6
  12. package/.nvmrc +0 -1
  13. package/TODELETE_TEMP/events.json +0 -69122
  14. package/TODELETE_TEMP/temphelper.cjs +0 -101
  15. package/docs/package-lock.json +0 -3820
  16. package/docs/package.json +0 -25
  17. package/docs/src/.vuepress/client.js +0 -8
  18. package/docs/src/.vuepress/components/Demo.vue +0 -183
  19. package/docs/src/.vuepress/config.js +0 -60
  20. package/docs/src/.vuepress/public/favicon.ico +0 -0
  21. package/docs/src/.vuepress/public/images/logo.png +0 -0
  22. package/docs/src/.vuepress/styles/index.scss +0 -0
  23. package/docs/src/.vuepress/styles/index.styl +0 -8
  24. package/docs/src/.vuepress/styles/palette.styl +0 -10
  25. package/docs/src/demo.md +0 -7
  26. package/docs/src/index.md +0 -4
  27. package/jest.config.js +0 -11
  28. package/src/classes/auth/auth.class.ts +0 -205
  29. package/src/classes/auth/auth.urls.ts +0 -10
  30. package/src/classes/events-sdk/events-sdk-default-options.ts +0 -46
  31. package/src/classes/events-sdk/events-sdk.class.ts +0 -250
  32. package/src/classes/events-sdk/events-sdk.test.ts +0 -9
  33. package/src/classes/events-sdk/events-sdk.types.ts +0 -69
  34. package/src/classes/socket-io/socket-io.class.ts +0 -172
  35. package/src/classes/socket-io/socket-io.d.ts +0 -10
  36. package/src/classes/socket-io/versions/index.ts +0 -52
  37. package/src/classes/socket-io/versions/v1_3_7.js +0 -2083
  38. package/src/classes/storage/storage.class.ts +0 -43
  39. package/src/enum/auth.enum.ts +0 -4
  40. package/src/enum/events.enum.ts +0 -98
  41. package/src/index.ts +0 -6
  42. package/src/types/auth.d.ts +0 -49
  43. package/src/types/events.common.d.ts +0 -110
  44. package/src/types/events.d.ts +0 -175
  45. package/src/types/listeners.d.ts +0 -37
  46. package/src/types/public-api.d.ts +0 -39
  47. package/src/types/socket.d.ts +0 -5
  48. package/swagger/generated/Swagger.json +0 -1
  49. package/swagger/index.js +0 -60
  50. package/swagger/package.json +0 -21
  51. package/swagger/scripts/update-swagger-json.js +0 -53
  52. package/swagger/yarn.lock +0 -2100
  53. package/tsconfig.json +0 -50
  54. package/vite.config.ts +0 -41
@@ -1,43 +0,0 @@
1
- import { LoginSessionData } from '@/types/auth'
2
-
3
- export class StorageClass{
4
- public static async getSessionStorageDataByKey (key: string): Promise<LoginSessionData | undefined> {
5
- if (typeof chrome !== 'undefined' && typeof chrome.storage !== 'undefined') {
6
- const loginSessionKey = await chrome.storage.session.get(key)
7
-
8
- if (loginSessionKey[key]) {
9
- return JSON.parse(loginSessionKey[key])
10
- }
11
- }
12
-
13
- if (typeof window !== 'undefined') {
14
- const loginSessionKey = window.sessionStorage.getItem(key)
15
-
16
- if (loginSessionKey) {
17
- return JSON.parse(loginSessionKey)
18
- }
19
- }
20
- }
21
-
22
- public static async updateSessionStorageKey (key: string, storageData: LoginSessionData) {
23
- if (typeof chrome !== 'undefined' && typeof chrome.storage !== 'undefined') {
24
- await chrome.storage.session.set({
25
- [key]: JSON.stringify(storageData)
26
- })
27
- }
28
-
29
- if (typeof window !== 'undefined') {
30
- window.sessionStorage.setItem(key, JSON.stringify(storageData))
31
- }
32
- }
33
-
34
- public static clearSessionStorage () {
35
- if (typeof chrome !== 'undefined' && typeof chrome.storage !== 'undefined') {
36
- chrome.storage.session.clear()
37
- }
38
-
39
- if (typeof window !== 'undefined') {
40
- window.sessionStorage.clear()
41
- }
42
- }
43
- }
@@ -1,4 +0,0 @@
1
- export enum LoginType {
2
- USER = 'User',
3
- TOKEN = 'Token'
4
- }
@@ -1,98 +0,0 @@
1
- /**
2
- * All events that can be received from the server.
3
- */
4
- export enum EventsEnum {
5
- ALL_DIALER_STATUS = 'AllDialersStatus',
6
- ALL_EXTENSION_STATUS = 'AllExtensionsStatus',
7
- ALL_USERS_STATUS = 'AllUsersStatus',
8
- CONNECT = 'connect',
9
- DISCONNECT = 'disconnect',
10
- EXTENSION_EVENT = 'ExtensionEvent',
11
- KEEP_ALIVE = 'keepalive',
12
- KEEP_ALIVE_RESPONSE = 'keepaliveResponse',
13
- // This type of event will be sent only in case of a successful connection.
14
- // The event describes the list of monitored queues on this active connection.
15
- // The list of monitored queues will only be sent if the login connection was made with account credentials or account token.
16
- // If the login connection type is by user credentials, only the user’s extension assigned queues will return.
17
- LOGIN_STATUS = 'loginStatus',
18
- // This type of event will be sent in the initial login connection request in case of a successful connection only.
19
- // In case of wrong username or password or token, you will receive a 401 (“Unauthorized”) or 500 (“Unexpected token”) http error.
20
- LOGIN_SUCCESS = 'loginSuccess',
21
- QUEUE_EVENT = 'QueueEvent',
22
- ONLINE_STATUS_EVENT = 'onlineStatusEvent',
23
- DIALER_EVENT = 'DialerEvent',
24
- }
25
-
26
- /**
27
- * All the reasons for the extension event, e.g. a new call is ringing or dialing from an extension.
28
- */
29
- export enum ExtensionEventReasonEnum {
30
- // A new call is ringing or dialing from an extension.
31
- NEW_CALL = 'NEWCALL',
32
- // A call was answered at an extension.
33
- ANSWER = 'ANSWER',
34
- // A call was placed on hold.
35
- HOLD = 'HOLD',
36
- // A call is no longer on hold.
37
- UNHOLD = 'UNHOLD',
38
- // When a call was ended. It is not necessarily means that the call was answered.
39
- HANGUP = 'HANGUP',
40
- // When the extension online user updated his\her user status(Login, Break, Logout, etc.)
41
- USER_STATUS_UPDATE = 'userStatusUpdate',
42
- }
43
-
44
- export enum QueueEventReasonEnum {
45
- ANSWER = 'ANSWER',
46
- ABANDONED = 'ABANDONED',
47
- EXIT = 'EXIT',
48
- JOIN = 'JOIN'
49
- }
50
-
51
- export enum DialerType {
52
- AUTOMATIC = 'Automatic',
53
- IVR = 'IVR'
54
- }
55
-
56
- /**
57
- * All the eventNames that can be received from the server. Exists only in EXTENSION_EVENT and QueueEvent
58
- */
59
- export enum EventNameEnum {
60
- EXTENSION = 'extension',
61
- QUEUE = 'queue',
62
- DIALER = 'dialer',
63
- }
64
-
65
- export enum ExtensionHangupCauseEnum {
66
- NORMAL_HANGUP = 'Normal hangup',
67
- USER_BUSY = 'User busy',
68
- CALL_REJECTED = 'Call Rejected',
69
- UNALLOCATED_NUMBER = 'Unallocated (unassigned) number',
70
- UNKNOWN = 'Unknown',
71
- NO_USER_RESPONDING = 'No user responding',
72
- USER_ALERTING = 'User alerting, no answer',
73
- ANSWERED_ELSEWHERE = 'Answered elsewhere'
74
- }
75
-
76
- export enum CallStatusEnum {
77
- RINGING = 'Ringing',
78
- TALKING = 'Talking',
79
- DIALING = 'Dialing',
80
- HOLD = 'Hold',
81
- }
82
-
83
- export enum CallTypeEnum {
84
- INCOMING = 'Incoming',
85
- OUTGOING = 'Outgoing'
86
- }
87
-
88
- export enum DoNotCallMeStatusCodeEnum {
89
- RESPONSE_FROM_API_VALID = 'RESPONSE_FROM_API_VALID',
90
- RESPONSE_FROM_API_INVALID = 'RESPONSE_FROM_API_INVALID'
91
- }
92
-
93
- export enum DirectionEnum {
94
- INCOMING = 'Incoming',
95
- OUTGOING = 'Outgoing',
96
- SPY = 'Spy',
97
- CLICK2CALL = 'Click2call'
98
- }
package/src/index.ts DELETED
@@ -1,6 +0,0 @@
1
- import EventsSdkClass from '@/classes/events-sdk/events-sdk.class'
2
- import { EventsEnum } from '@/enum/events.enum'
3
-
4
- export { EventsEnum }
5
-
6
- export default EventsSdkClass
@@ -1,49 +0,0 @@
1
- import { Server } from '@/classes/events-sdk/events-sdk.types'
2
- import { LoginType } from '@/enum/auth.enum'
3
-
4
- export interface LoginSessionPayload {
5
- token: string,
6
- email: string,
7
- password: string
8
- }
9
-
10
- export interface ExternalLoginRequestBody {
11
- identityType: LoginType,
12
- username?: string,
13
- password?: string,
14
- token?: string
15
- }
16
-
17
- interface ExternalLoginResponseData {
18
- AccessToken: string,
19
- RefreshToken: string
20
- }
21
-
22
- export interface ExternalLoginResponse {
23
- StatusCode: number,
24
- Status: string,
25
- Data: ExternalLoginResponseData
26
- }
27
-
28
- export interface Socket {
29
- Client: string,
30
- PersonId: number,
31
- RefreshToken: string,
32
- RefreshTokenExpiry: Date,
33
- Token: string,
34
- TokenExpiry: Date,
35
- URLList: string[],
36
- Url: string,
37
- Version: string
38
- }
39
-
40
- export interface Settings {
41
- IdentityCode: string,
42
- IdentityCodeExpiry: Date,
43
- PersonID: number,
44
- PersonType: number,
45
- ExtensionMonitorID: number,
46
- MonitorList: Server[]
47
- }
48
-
49
- export interface LoginSessionData extends Settings, ExternalLoginResponseData {}
@@ -1,110 +0,0 @@
1
- import { CallStatusEnum, CallTypeEnum, DialerType, DirectionEnum, DoNotCallMeStatusCodeEnum } from 'enum/events.enum'
2
-
3
- export interface Dialer {
4
- campaignID: number,
5
- name: string,
6
- typeID: number,
7
- type: DialerType,
8
- code: string,
9
- calls: unknown,
10
- statistics: unknown
11
- }
12
-
13
- export interface User {
14
- userID: number,
15
- userName: string,
16
- accountID: number
17
-
18
- }
19
-
20
- export interface Extension {
21
- calls: ExtensionCall[],
22
- userID: number,
23
- userName: string,
24
- number: number,
25
- extenUser: string,
26
- accountID: number,
27
- topAccountID: number,
28
- summery: Summery,
29
- onlineUserID: number,
30
- representative: number,
31
- representativeStatus: number,
32
- lastCallEventEpoch: number,
33
- lastAnsweredCallEventEpoch: number,
34
- lastHangupCallEpoch: number,
35
- representativeUpdated: number,
36
- peerStatus: unknown,
37
- currentCall?: ExtensionCall,
38
- }
39
-
40
- export interface Queue {
41
- QueueID: number,
42
- QueueName: string,
43
- Calls: QueueCall[],
44
- UserId?: number,
45
- DistributorID?: number,
46
- IsDistributedQueue?: boolean,
47
- AnsweredAgent?: string,
48
- }
49
-
50
- export interface ExtensionCall {
51
- callStarted: number,
52
- calldurationinterval: number,
53
- callAnswered: number,
54
- answered: number,
55
- callername: string,
56
- callerphone: string,
57
- outgoingcallername?: string,
58
- outgoingcallerphone?: string,
59
- callstatus: CallStatusEnum,
60
- customdata: CustomData,
61
- direction: DirectionEnum,
62
- ivrid: string,
63
- recording: Recording,
64
- did: string,
65
- relatedIvrUniqueIDs?: string[],
66
- callType?: CallTypeEnum,
67
- ip: string,
68
- isInternal: boolean
69
- blcServerID: number,
70
- isOpensips: boolean,
71
- channel: string,
72
- channel2: string,
73
- queueID?: number,
74
- isSpyed?: boolean,
75
- blcServerId?: number,
76
- originalCallerID?: string,
77
- originalCallerName?: string,
78
- actualDialedNumber?: number
79
- }
80
-
81
- interface QueueCall {
82
- CallerID: string,
83
- CallerName: string,
84
- IvrUniqueID: string,
85
- JoinTimeStamp: number,
86
- calldurationinterval: number,
87
- ivrid: string,
88
- isDistributedQueue?: boolean
89
- }
90
-
91
- interface Summery {
92
- representative: string
93
- }
94
-
95
- interface CustomData {
96
- DoNotCallMeStatus?: string,
97
- DoNotCallMeStatusCode?: DoNotCallMeStatusCodeEnum,
98
- DoNotCallMeTokenName?: string,
99
- DoNotCallMetransactionId?: string,
100
- IsDoNotCallMe?: string
101
- }
102
-
103
- interface Recording {
104
- Filename: string,
105
- Options: string,
106
- ApproximateURL: string,
107
- IsMuted: number
108
- }
109
-
110
-
@@ -1,175 +0,0 @@
1
- import {
2
- EventNameEnum,
3
- EventsEnum,
4
- ExtensionEventReasonEnum,
5
- ExtensionHangupCauseEnum,
6
- QueueEventReasonEnum
7
- } from '@/enum/events.enum'
8
- import { Queue, Extension, Dialer, User } from '@/types/events.common'
9
-
10
- /**
11
- * Base structure for all event types, containing common properties.
12
- */
13
- interface CommonEventProperties {
14
- // Error code, 0 indicates no error
15
- errorCode?: number
16
- // Description of the error, "Ok" indicates successful connection
17
- errorDesc?: string
18
- // Server time at the moment of the event
19
- serverTime: number
20
- // Difference in time between server and client
21
- serverTimeOffset: number
22
- }
23
-
24
- // Inherits properties from CommonEventProperties
25
- type LoginSuccessEvent = CommonEventProperties
26
-
27
- /**
28
- * Data structure for login status event.
29
- */
30
- export interface LoginStatusEvent extends CommonEventProperties {
31
- // Array of Queue objects
32
- queues: Queue[]
33
- }
34
-
35
- /**
36
- * Data structure for all extension status event.
37
- */
38
- export interface AllExtensionStatusEvent extends CommonEventProperties {
39
- // Array of Extension objects
40
- extensions: Extension[]
41
- }
42
-
43
- /**
44
- * Data structure for all dialers status event.
45
- */
46
- export interface AllDialersStatusEvent extends CommonEventProperties {
47
- // Array of Dialer objects
48
- dialers: Dialer[]
49
- }
50
-
51
- /**
52
- * Data structure for all users status event.
53
- */
54
- export interface AllUsersStatusEvent extends CommonEventProperties {
55
- // Array of User objects
56
- users: User[]
57
- }
58
-
59
- /**
60
- * Data structure for queue event.
61
- */
62
- export interface QueueEvent extends CommonEventProperties {
63
- eventName: EventNameEnum.QUEUE,
64
- reason: QueueEventReasonEnum,
65
- telephonyServerTime: number,
66
- ivrUniqueId: string,
67
- data: Queue
68
- }
69
-
70
- /**
71
- * Data structure for extension event.
72
- */
73
- export interface ExtensionEvent extends CommonEventProperties {
74
- data: Extension
75
- eventName: EventNameEnum.EXTENSION
76
- reason: ExtensionEventReasonEnum
77
- telephonyServerTime?: number
78
- callerID?: string
79
- ivrUniqueId?: string
80
- dialStatus?: string
81
- cause?: ExtensionHangupCauseEnum
82
- }
83
-
84
- /**
85
- * Data structure for dialer event.
86
- */
87
- export interface DialerEvent extends CommonEventProperties {
88
- data: Dialer
89
- eventName: EventNameEnum.DIALER
90
- //reason: ExtensionEventReasonEnum // TODO: do research for dialer 'reason' prop
91
- telephonyServerTime?: number
92
- callerID?: string
93
- ivrUniqueId?: string
94
- dialStatus?: string
95
- //cause?: ExtensionHangupCauseEnum // TODO: do research for dialer 'cause' prop
96
- }
97
-
98
- /**
99
- * Data structure for keep alive response event.
100
- */
101
- export interface KeepAliveResponseEvent extends CommonEventProperties {
102
- isOk: boolean
103
- }
104
-
105
- export interface OnlineStatusEvent {
106
- isSocketConnected: boolean
107
- }
108
-
109
- /**
110
- * Mapping of event names to their respective data structures.
111
- */
112
- export interface EventDataMap {
113
- [EventsEnum.ALL_EXTENSION_STATUS]: AllExtensionStatusEvent
114
- [EventsEnum.ALL_DIALER_STATUS]: AllDialersStatusEvent
115
- [EventsEnum.ALL_USERS_STATUS]: AllUsersStatusEvent
116
- [EventsEnum.QUEUE_EVENT]: QueueEvent
117
- [EventsEnum.EXTENSION_EVENT]: ExtensionEvent
118
- [EventsEnum.DIALER_EVENT]: DialerEvent
119
- [EventsEnum.LOGIN_SUCCESS]: LoginSuccessEvent
120
- [EventsEnum.LOGIN_STATUS]: LoginStatusEvent
121
- [EventsEnum.KEEP_ALIVE_RESPONSE]: KeepAliveResponseEvent
122
- [EventsEnum.ONLINE_STATUS_EVENT]: OnlineStatusEvent
123
- }
124
-
125
- /**
126
- * Represents the set of all possible event type names as keys from the EventDataMap.
127
- * This type is used to define event listeners and handlers.
128
- */
129
- type EventTypeNames = keyof EventDataMap
130
-
131
- // Generic structure for wrapped socket event data
132
- type WrappedSocketEvent<T extends EventsEnum> = {
133
- name: T
134
- data: EventDataMap[T]
135
- }
136
-
137
- // Generic type for event type data
138
- export type EventTypeData<T extends EventsEnum> = EventDataMap[T]
139
-
140
- /**
141
- * Defines a registry of callback functions for each event type.
142
- * Each key is an event type name, and the value is a function that takes the specific event data type as an argument.
143
- * This registry is used to manage and invoke event-specific callbacks.
144
- */
145
- export type EventCallbackRegistry = {
146
- [K in EventTypeNames]: (data: EventDataMap[K]) => void
147
- }
148
-
149
- /**
150
- * This is a generic type for callback functions used in event handling.
151
- * It takes a generic event name and defines a callback function that receives wrapped socket event data for that specific event.
152
- */
153
- export type EventSpecificCallback<T extends EventTypeNames> = (data: WrappedSocketEvent<T>) => void
154
-
155
- /**
156
- * This type defines a map where each key is an event name, and the value is an array of callback functions associated with that event.
157
- * This structure is used to manage event listeners for different events
158
- */
159
- export type EventCallbackListenersMap = {
160
- [K in EventTypeNames]: Array<EventSpecificCallback<K>>
161
- }
162
-
163
- /**
164
- * This type represents a mapping of listener event names to their corresponding wrapped socket event data structures.
165
- * Each key is an event name, and the value is the wrapped socket event data for that event
166
- */
167
- type EventWrappedSocketDataMap = {
168
- [K in EventTypeNames]: WrappedSocketEvent<K>
169
- }
170
-
171
- /**
172
- * A generic type that represents the structure of any event data wrapped in a socket event format.
173
- * This type is used in the handling of all event types, providing a consistent structure for event data processing.
174
- */
175
- export type GenericEventWrapper = EventWrappedSocketDataMap[EventTypeNames]
@@ -1,37 +0,0 @@
1
- export type readyListener = (value: boolean) => void
2
- export type changeActiveCallsListener = (event: { [key: string]: string }) => void
3
- export type TestEventListener = (event: { test: string }) => void
4
- export type ActiveRoomListener = (event: number | undefined) => void
5
- export type CallAddingProgressListener = (callId: string | undefined) => void
6
- export type RoomDeletedListener = (roomId: number) => void
7
- export type changeActiveInputMediaDeviceListener = (event: string) => void
8
- export type changeActiveOutputMediaDeviceListener = (event: string) => void
9
- export type changeMuteWhenJoinListener = (value: boolean) => void
10
- export type changeIsDNDListener = (value: boolean) => void
11
- export type changeIsMutedListener = (value: boolean) => void
12
- export type addRoomListener = (value: string) => void
13
- export type updateRoomListener = (value: string) => void
14
- export type removeRoomListener = (value: string) => void
15
- export type changeCallStatusListener = (event: { [key: string]: number }) => void
16
-
17
- export interface OpenSIPSEventMap {
18
- ready: readyListener
19
- changeActiveCalls: changeActiveCallsListener
20
- callConfirmed: TestEventListener
21
- currentActiveRoomChanged: ActiveRoomListener
22
- callAddingInProgressChanged: CallAddingProgressListener
23
- roomDeleted: RoomDeletedListener
24
- changeActiveInputMediaDevice: changeActiveInputMediaDeviceListener
25
- changeActiveOutputMediaDevice: changeActiveOutputMediaDeviceListener
26
- changeMuteWhenJoin: changeMuteWhenJoinListener
27
- changeIsDND: changeIsDNDListener
28
- changeIsMuted: changeIsMutedListener
29
- addRoom: addRoomListener
30
- updateRoom: updateRoomListener
31
- removeRoom: removeRoomListener
32
- changeCallStatus: changeCallStatusListener
33
- }
34
-
35
- export type ListenersKeyType = keyof OpenSIPSEventMap
36
- export type ListenersCallbackFnType = OpenSIPSEventMap[ListenersKeyType]
37
- export type ListenerCallbackFnType<T extends ListenersKeyType> = OpenSIPSEventMap[T]
@@ -1,39 +0,0 @@
1
- /**
2
- * Represents Event Types in Enum
3
- */
4
- export enum EventTypesEnum {
5
- ALL_DIALERS_STATUS = 'AllDialersStatus',
6
- ALL_EXTENSION_STATUS = 'AllExtensionsStatus',
7
- CLOSE = 'closeme',
8
- CONNECT = 'connect',
9
- CONNECT_ERROR = 'connect_error',
10
- CONNECT_TIMEOUT = 'connect_timeout',
11
- DISCONNECT = 'disconnect',
12
- DIALER_EVENT = 'DialerEvent',
13
- DIALERS_UPDATED = 'DialersUpdated',
14
- ERROR = 'error',
15
- EXTENSION_EVENT = 'ExtensionEvent',
16
- EXTENSION_UPDATED = 'ExtensionsUpdated',
17
- KEEP_ALIVE = 'keepalive',
18
- KEEP_ALIVE_RESPONSE = 'keepaliveResponse',
19
- LOGIN = 'login',
20
- LOGIN_ACCOUNT = 'loginAccount',
21
- LOGIN_CODE = 'loginUserCode',
22
- LOGIN_RESPONSE = 'loginResponse',
23
- LOGIN_STATUS = 'loginStatus',
24
- LOGIN_USER = 'loginUser',
25
- PONG = 'pong',
26
- QUEUE_EVENT = 'QueueEvent',
27
- QUEUES_UPDATED = 'QueuesUpdated',
28
- RECONNECT = 'reconnect',
29
- RECONNECT_ATTEMPT = 'reconnect_attempt',
30
- RECONNECT_ERROR = 'reconnect_error',
31
- RECONNECT_FAILED = 'reconnect_failed',
32
- RECONNECTING = 'reconnecting',
33
- RESYNC = 'resync'
34
- }
35
-
36
- export enum ServerTypesEnum {
37
- DEFAULT = 1,
38
- CHROME_EXTENSION = 2
39
- }
@@ -1,5 +0,0 @@
1
- import { Socket } from 'socket.io-client'
2
- import { EventCallbackRegistry } from '@/types/events'
3
- import { EventsEnum } from 'enum/events.enum'
4
-
5
- export type SocketTyped = Socket<EventCallbackRegistry, Record<EventsEnum, any>>
@@ -1 +0,0 @@
1
- {"host":"localhost:3000","info":{"title":"admin-api","contact":{},"version":"0.01","description":"irst Alpha - Hope it will wok for yall :-)","termsOfService":""},"paths":{"/Account/List/":{"post":{"tags":["Account"],"security":[{"AdminAuthentication":["Admin"]}],"responses":{"200":{"schema":{"$ref":"#/definitions/AccountListResponse"},"description":"Status 200"},"400":{"schema":{"$ref":"#/definitions/Error"},"description":"Error Response"}},"parameters":[{"in":"body","name":"RequestBody","schema":{"$ref":"#/definitions/AccountListRequest"},"description":"Searching for Account that meets the query. multiple values are support. multiple selections in same feild will be treated as OR, multiple feilds will be searched with OR between them."}],"x-AuthType":["Admin"],"operationId":"AccountList","x-serviceID":3,"x-methodName":"List","x-serviceName":"Account"}},"/Account/Update/":{"post":{"tags":["Account"],"security":[{"AdminAuthentication":["Admin"]}],"responses":{"200":{"schema":{"$ref":"#/definitions/Response"},"description":"Status 200"},"400":{"schema":{"$ref":"#/definitions/Error"},"description":"Error Response"}},"parameters":[],"x-AuthType":["Admin"],"operationId":"AccountUpdate","x-serviceID":3,"x-methodName":"Update","x-serviceName":"Account"}}},"schemes":["https"],"swagger":"2.0","basePath":"/v1","consumes":["application/json"],"produces":["application/json"],"definitions":{"Error":{"type":"object","required":["Description","Status"],"properties":{"Status":{"type":"integer","example":400,"description":"Code of the Error"},"Description":{"type":"string","example":"Not found","description":"Textual description of the error"},"ReasonPhrase":{"type":"string","example":"ID not valid","description":"Specific reason for the error"}}},"Response":{"type":"object","required":["Description","ReasonPhrase","Status"],"properties":{"Status":{"type":"integer","example":200,"description":"Code of response"},"Description":{"type":"string","example":"OK","description":"Description of response"},"ReasonPhrase":{"type":"string","description":"Data of response"}}},"AccountAdd":{"type":"object","properties":{}},"ProviderAdd":{"type":"object","properties":{}},"ProviderDisable":{"type":"object","properties":{}},"ProvidersAddList":{"type":"object","properties":{}},"ProviderPrefixAdd":{"type":"object","properties":{}},"AccountListRequest":{"type":"object","properties":{}},"AccountListResponse":{"type":"object","properties":{}},"ProviderListResponse":{"type":"object","properties":{}},"ProviderPrefixUpdate":{"type":"object","properties":{}},"ProvidersDisableList":{"type":"object","properties":{}},"ProviderPrefixAddList":{"type":"object","properties":{}},"ProviderPrefixUpdateList":{"type":"object","properties":{}},"ProviderPrefixBulkRequest":{"type":"object","properties":{}},"ProviderPrefixBulkResponse":{"type":"object","properties":{}},"ProviderPrefixListResponse":{"type":"object","properties":{}},"ProviderPrefixUpdateResponse":{"type":"object","properties":{}}},"securityDefinitions":{}}
package/swagger/index.js DELETED
@@ -1,60 +0,0 @@
1
- import fs from 'fs'
2
- import fastify from 'fastify'
3
- import fastifySwagger from 'fastify-swagger'
4
- import openapiGlue from 'fastify-openapi-glue'
5
-
6
- const app = fastify()
7
-
8
- const start = async () => {
9
- try {
10
- if (!fs.existsSync('./generated/Swagger.json')) {
11
- console.log('Swagger.json file not generated. Try to run: npm run update')
12
-
13
- return
14
- }
15
-
16
- const swagger = JSON.parse(fs.readFileSync('./generated/Swagger.json').toString())
17
-
18
- const swaggerOptions = {
19
- routePrefix: '/documentation',
20
- exposeRoute: true,
21
- swagger: {
22
- ...swagger,
23
- schemes: [ 'https', 'http' ],
24
- securityDefinitions: {
25
- JWT: {
26
- type: 'apiKey',
27
- name: 'Authorization',
28
- in: 'header'
29
- }
30
- },
31
- security: [ { JWT: [] } ]
32
- },
33
- uiConfig: {
34
- docExpansion: 'full',
35
- deepLinking: false
36
- }
37
- }
38
-
39
- const openapiGlueOptions = {
40
- specification: './generated/Swagger.json',
41
- service: {},
42
- }
43
-
44
- app.register(fastifySwagger, swaggerOptions)
45
-
46
- app.register(openapiGlue, openapiGlueOptions)
47
-
48
- await app.listen({
49
- port: 3000
50
- })
51
-
52
- console.log('Server is running on port: 3000')
53
- } catch (err) {
54
- console.error('Error starting server:', err)
55
-
56
- process.exit(1)
57
- }
58
- }
59
-
60
- start()
@@ -1,21 +0,0 @@
1
- {
2
- "name": "swagger",
3
- "version": "1.0.0",
4
- "description": "",
5
- "main": "index.js",
6
- "type": "module",
7
- "scripts": {
8
- "update": "node scripts/update-swagger-json.js",
9
- "start": "node index.js"
10
- },
11
- "keywords": [],
12
- "author": "",
13
- "license": "ISC",
14
- "dependencies": {
15
- "@fastify/swagger": "^8.13.0",
16
- "@voicenter-team/mysql-dynamic-cluster": "^3.0.5",
17
- "fastify": "^3.19.1",
18
- "fastify-swagger": "^4.8.3",
19
- "fastify-openapi-glue": "git+https://github.com/VoicenterTeam/fastify-openapi-glue.git"
20
- }
21
- }