@or-sdk/hitl 0.36.1 → 0.36.2
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/CHANGELOG.md +9 -0
- package/dist/cjs/api/Sessions.js.map +1 -1
- package/dist/esm/api/Sessions.js.map +1 -1
- package/dist/types/api/Agents.d.ts +0 -347
- package/dist/types/api/Agents.d.ts.map +1 -1
- package/dist/types/api/CannedMessages.d.ts +0 -168
- package/dist/types/api/CannedMessages.d.ts.map +1 -1
- package/dist/types/api/Conferences.d.ts +0 -120
- package/dist/types/api/Conferences.d.ts.map +1 -1
- package/dist/types/api/ContactRuleGroups.d.ts +0 -131
- package/dist/types/api/ContactRuleGroups.d.ts.map +1 -1
- package/dist/types/api/EventTemplates.d.ts +0 -135
- package/dist/types/api/EventTemplates.d.ts.map +1 -1
- package/dist/types/api/Filters.d.ts +0 -215
- package/dist/types/api/Filters.d.ts.map +1 -1
- package/dist/types/api/Listeners.d.ts +0 -150
- package/dist/types/api/Listeners.d.ts.map +1 -1
- package/dist/types/api/Migrations.d.ts +0 -222
- package/dist/types/api/Migrations.d.ts.map +1 -1
- package/dist/types/api/RuleGroups.d.ts +0 -127
- package/dist/types/api/RuleGroups.d.ts.map +1 -1
- package/dist/types/api/SessionEvents.d.ts +0 -145
- package/dist/types/api/SessionEvents.d.ts.map +1 -1
- package/dist/types/api/Sessions.d.ts +0 -453
- package/dist/types/api/Sessions.d.ts.map +1 -1
- package/dist/types/api/Settings.d.ts +0 -145
- package/dist/types/api/Settings.d.ts.map +1 -1
- package/dist/types/types/sessions.d.ts +1 -1
- package/dist/types/types/sessions.d.ts.map +1 -1
- package/package.json +3 -3
- package/src/api/Sessions.ts +1 -0
- package/src/types/sessions.ts +1 -1
|
@@ -1,162 +1,12 @@
|
|
|
1
1
|
import { Listener, GetListenersOptions, GetListenerByIdOptions, GetListenersResponse, CreateListenersOptions, UpdateListenersOptions, DeleteListenersOptions } from '../types/listeners';
|
|
2
2
|
import { HITLBase } from './HITLBase';
|
|
3
|
-
/**
|
|
4
|
-
* Manages HitL event listeners in the system
|
|
5
|
-
*
|
|
6
|
-
* This class provides functionality to manage event listeners, which can be:
|
|
7
|
-
* - Active WebSocket connections in Agent UI
|
|
8
|
-
* - Flow event subscription callbacks
|
|
9
|
-
* - Mobile application push notification callbacks
|
|
10
|
-
*
|
|
11
|
-
* Key features:
|
|
12
|
-
* - Retrieve listeners (all or by ID)
|
|
13
|
-
* - Create new listeners
|
|
14
|
-
* - Update existing listeners
|
|
15
|
-
* - Delete listeners
|
|
16
|
-
*
|
|
17
|
-
* @remarks
|
|
18
|
-
* - All methods in this class interact with the `/listeners` endpoint
|
|
19
|
-
* @public
|
|
20
|
-
*/
|
|
21
3
|
export declare class Listeners extends HITLBase {
|
|
22
4
|
protected static MODULE_URL: string;
|
|
23
5
|
protected static LISTENER_VERSION_FIELD: "listenerVersion";
|
|
24
|
-
/**
|
|
25
|
-
* Retrieves a list of HitL event listeners
|
|
26
|
-
*
|
|
27
|
-
* @param options - Configuration parameters for retrieving listeners
|
|
28
|
-
*
|
|
29
|
-
* Optional parameters:
|
|
30
|
-
* - `timeout` - (number) Request timeout in milliseconds
|
|
31
|
-
* - `version` - (string | number) API version to use
|
|
32
|
-
*
|
|
33
|
-
* @returns {Promise<GetListenersResponse>} Promise resolving to the listeners list
|
|
34
|
-
*
|
|
35
|
-
* @example
|
|
36
|
-
* ```typescript
|
|
37
|
-
* const listeners = await hitlApi.listeners.getListeners();
|
|
38
|
-
* ```
|
|
39
|
-
*
|
|
40
|
-
* @remarks
|
|
41
|
-
* Makes a GET request to the `/listeners` endpoint
|
|
42
|
-
* @public
|
|
43
|
-
*/
|
|
44
6
|
static getListeners(options?: GetListenersOptions): Promise<GetListenersResponse>;
|
|
45
|
-
/**
|
|
46
|
-
* Retrieves a specific HitL event listener by ID
|
|
47
|
-
*
|
|
48
|
-
* @param options - Configuration parameters for retrieving the listener
|
|
49
|
-
*
|
|
50
|
-
* Required parameters:
|
|
51
|
-
* - `callbackId` - (string) ID of the listener to retrieve
|
|
52
|
-
*
|
|
53
|
-
* Optional parameters:
|
|
54
|
-
* - `agentId` - (string) Agent ID to filter by
|
|
55
|
-
* - `timeout` - (number) Request timeout in milliseconds
|
|
56
|
-
* - `version` - (string | number) API version to use
|
|
57
|
-
*
|
|
58
|
-
* @returns {Promise<GetListenersResponse>} Promise resolving to the listener details
|
|
59
|
-
*
|
|
60
|
-
* @example
|
|
61
|
-
* ```typescript
|
|
62
|
-
* const listener = await hitlApi.listeners.getListenerById({
|
|
63
|
-
* callbackId: 'listener-1'
|
|
64
|
-
* });
|
|
65
|
-
* ```
|
|
66
|
-
*
|
|
67
|
-
* @remarks
|
|
68
|
-
* Makes a GET request to the `/listeners/{callbackId}` endpoint
|
|
69
|
-
* @public
|
|
70
|
-
*/
|
|
71
7
|
static getListenerById({ agentId, callbackId, ...options }: GetListenerByIdOptions): Promise<GetListenersResponse>;
|
|
72
|
-
/**
|
|
73
|
-
* Creates a new HitL event listener
|
|
74
|
-
*
|
|
75
|
-
* @param options - Configuration parameters for creating the listener
|
|
76
|
-
*
|
|
77
|
-
* Required parameters:
|
|
78
|
-
* - `callback` - ({@link ListenerCallback}) Callback configuration for the listener
|
|
79
|
-
*
|
|
80
|
-
* Optional parameters:
|
|
81
|
-
* - `agentId` - (string) ID of the agent associated with the listener
|
|
82
|
-
* - `listenerVersion` - (number) Version of the listener
|
|
83
|
-
* - `sessionIds` - (string[]) Array of session IDs to associate with the listener
|
|
84
|
-
* - `timeout` - (number) Request timeout in milliseconds
|
|
85
|
-
* - `type` - (any) Type of the listener
|
|
86
|
-
* - `version` - (string | number) API version to use
|
|
87
|
-
*
|
|
88
|
-
* @returns {Promise<Listener>} Promise resolving to the created listener
|
|
89
|
-
*
|
|
90
|
-
* @example
|
|
91
|
-
* ```typescript
|
|
92
|
-
* const newListener = await hitlApi.listeners.createListener({
|
|
93
|
-
* callback: {
|
|
94
|
-
* type: "sync",
|
|
95
|
-
* expire: 1750940155085,
|
|
96
|
-
* name: "MxPMqfr4PHcCGCw=",
|
|
97
|
-
* v: 0
|
|
98
|
-
* }
|
|
99
|
-
* });
|
|
100
|
-
* ```
|
|
101
|
-
*
|
|
102
|
-
* @remarks
|
|
103
|
-
* Makes a POST request to the `/listeners` endpoint
|
|
104
|
-
* @public
|
|
105
|
-
*/
|
|
106
8
|
static createListener(options: CreateListenersOptions): Promise<Listener>;
|
|
107
|
-
/**
|
|
108
|
-
* Updates an existing HitL event listener
|
|
109
|
-
*
|
|
110
|
-
* @param options - Configuration parameters for updating the listener
|
|
111
|
-
*
|
|
112
|
-
* Required parameters:
|
|
113
|
-
* - `callbackId` - (string) ID of the listener to update
|
|
114
|
-
* - `sessionIds` - (string[]) list of subscribed sessions by this listener
|
|
115
|
-
*
|
|
116
|
-
* Optional parameters:
|
|
117
|
-
* - `timeout` - (number) Request timeout in milliseconds
|
|
118
|
-
* - `version` - (string | number) API version to use
|
|
119
|
-
*
|
|
120
|
-
* @returns {Promise<Listener>} Promise resolving to the updated listener
|
|
121
|
-
*
|
|
122
|
-
* @example
|
|
123
|
-
* ```typescript
|
|
124
|
-
* const updatedListener = await hitlApi.listeners.updateListener({
|
|
125
|
-
* callbackId: 'listener-1',
|
|
126
|
-
* sessionIds: ['session-id-1']
|
|
127
|
-
* });
|
|
128
|
-
* ```
|
|
129
|
-
*
|
|
130
|
-
* @remarks
|
|
131
|
-
* Makes a PUT request to the `/listeners/{callbackId}` endpoint
|
|
132
|
-
* @public
|
|
133
|
-
*/
|
|
134
9
|
static updateListener({ callbackId, ...options }: UpdateListenersOptions): Promise<Listener>;
|
|
135
|
-
/**
|
|
136
|
-
* Deletes a HitL event listener
|
|
137
|
-
*
|
|
138
|
-
* @param options - Configuration parameters for deleting the listener
|
|
139
|
-
*
|
|
140
|
-
* Required parameters:
|
|
141
|
-
* - `callbackId` - (string) ID of the listener to delete
|
|
142
|
-
*
|
|
143
|
-
* Optional parameters:
|
|
144
|
-
* - `timeout` - (number) Request timeout in milliseconds
|
|
145
|
-
* - `version` - (string | number) API version to use
|
|
146
|
-
*
|
|
147
|
-
* @returns {Promise<void>} Promise that resolves when deletion is complete
|
|
148
|
-
*
|
|
149
|
-
* @example
|
|
150
|
-
* ```typescript
|
|
151
|
-
* await hitlApi.listeners.deleteListener({
|
|
152
|
-
* callbackId: 'listener-1',
|
|
153
|
-
* });
|
|
154
|
-
* ```
|
|
155
|
-
*
|
|
156
|
-
* @remarks
|
|
157
|
-
* Makes a DELETE request to the `/listeners/{callbackId}` endpoint
|
|
158
|
-
* @public
|
|
159
|
-
*/
|
|
160
10
|
static deleteListener({ callbackId, ...options }: DeleteListenersOptions): Promise<void>;
|
|
161
11
|
}
|
|
162
12
|
//# sourceMappingURL=Listeners.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Listeners.d.ts","sourceRoot":"","sources":["../../../src/api/Listeners.ts"],"names":[],"mappings":"AAGA,OAAO,EACL,QAAQ,EAGR,mBAAmB,EACnB,sBAAsB,EACtB,oBAAoB,EACpB,sBAAsB,EACtB,sBAAsB,EACtB,sBAAsB,EACvB,MAAM,oBAAoB,CAAC;AAE5B,OAAO,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAC;
|
|
1
|
+
{"version":3,"file":"Listeners.d.ts","sourceRoot":"","sources":["../../../src/api/Listeners.ts"],"names":[],"mappings":"AAGA,OAAO,EACL,QAAQ,EAGR,mBAAmB,EACnB,sBAAsB,EACtB,oBAAoB,EACpB,sBAAsB,EACtB,sBAAsB,EACtB,sBAAsB,EACvB,MAAM,oBAAoB,CAAC;AAE5B,OAAO,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAC;AAoBtC,qBAAa,SAAU,SAAQ,QAAQ;IACrC,SAAS,CAAC,MAAM,CAAC,UAAU,SAAe;IAC1C,SAAS,CAAC,MAAM,CAAC,sBAAsB,oBAA8B;WAsBjD,YAAY,CAC9B,OAAO,GAAE,mBAAwB,GAChC,OAAO,CAAC,oBAAoB,CAAC;WAwCZ,eAAe,CACjC,EAAE,OAAO,EAAE,UAAU,EAAE,GAAG,OAAO,EAAE,EAAE,sBAAsB,GAC1D,OAAO,CAAC,oBAAoB,CAAC;WA8CZ,cAAc,CAChC,OAAO,EAAE,sBAAsB,GAC9B,OAAO,CAAC,QAAQ,CAAC;WA4CA,cAAc,CAChC,EAAE,UAAU,EAAE,GAAG,OAAO,EAAE,EAAE,sBAAsB,GACjD,OAAO,CAAC,QAAQ,CAAC;WAwCA,cAAc,CAChC,EAAE,UAAU,EAAE,GAAG,OAAO,EAAE,EAAE,sBAAsB,GACjD,OAAO,CAAC,IAAI,CAAC;CAUjB"}
|
|
@@ -1,241 +1,19 @@
|
|
|
1
1
|
import { ApiVersionOptions } from '../types';
|
|
2
2
|
import { GetMigrationsOptions, GetMigrationsResponse, RunMigrationsOptions, RunMigrationsResponse, CreateDefaultRecordsResponse, GetMigrationsInfoResponse, GetRunMigrationsStatusResponse, GetDefaultRecordsOptions, GetDefaultRecordsResponse, SyncDefaultRecordsOptions, SyncDefaultRecordsResponse } from '../types/migrations';
|
|
3
3
|
import { HITLBase } from './HITLBase';
|
|
4
|
-
/**
|
|
5
|
-
* Manages database migrations and default records in the system
|
|
6
|
-
*
|
|
7
|
-
* This class provides functionality to:
|
|
8
|
-
* - Manage database migrations
|
|
9
|
-
* - Handle default records for tables
|
|
10
|
-
* - Monitor migration status
|
|
11
|
-
* - Control migration locks
|
|
12
|
-
*
|
|
13
|
-
* @remarks
|
|
14
|
-
* - All methods in this class interact with the `/migrations` endpoint
|
|
15
|
-
* @public
|
|
16
|
-
*/
|
|
17
4
|
export declare class Migrations extends HITLBase {
|
|
18
5
|
protected static readonly MODULE_URL = "migrations";
|
|
19
6
|
protected static DEFAULT_RECORDS_URL: string;
|
|
20
7
|
protected static MIGRATIONS_INFO_URL: string;
|
|
21
8
|
protected static MIGRATIONS_LOCK_URL: string;
|
|
22
9
|
protected static MIGRATIONS_STATUS_URL: string;
|
|
23
|
-
/**
|
|
24
|
-
* Retrieves a list of pending migrations
|
|
25
|
-
*
|
|
26
|
-
* @param options - Configuration parameters for retrieving migrations
|
|
27
|
-
*
|
|
28
|
-
* Optional parameters:
|
|
29
|
-
* - `appVersion` - (string) Application version to check migrations against
|
|
30
|
-
* - `timeout` - (number) Request timeout in milliseconds
|
|
31
|
-
* - `version` - (string | number) API version to use
|
|
32
|
-
*
|
|
33
|
-
* @returns {Promise<GetMigrationsResponse>} Promise resolving to the list of pending migrations
|
|
34
|
-
*
|
|
35
|
-
* @example
|
|
36
|
-
* ```typescript
|
|
37
|
-
* const migrations = await hitlApi.migrations.getListOfMigrations({
|
|
38
|
-
* appVersion: '0.81.0',
|
|
39
|
-
* });
|
|
40
|
-
* ```
|
|
41
|
-
*
|
|
42
|
-
* @remarks
|
|
43
|
-
* Makes a GET request to the `/migrations` endpoint
|
|
44
|
-
* @public
|
|
45
|
-
*/
|
|
46
10
|
static getListOfMigrations({ appVersion, ...options }?: GetMigrationsOptions): Promise<GetMigrationsResponse>;
|
|
47
|
-
/**
|
|
48
|
-
* Executes pending migrations
|
|
49
|
-
*
|
|
50
|
-
* @param options - Configuration parameters for running migrations
|
|
51
|
-
*
|
|
52
|
-
* Optional parameters:
|
|
53
|
-
* - `appVersion` - (string) Version of the application to migrate for
|
|
54
|
-
* - `meta` - (object) Additional metadata for the migration
|
|
55
|
-
* - `method` - ("up" | "down") Direction of migration, either "up" or "down"
|
|
56
|
-
* - `name` - (string) Name of specific migration to run
|
|
57
|
-
* - `timeout` - (number) Request timeout in milliseconds
|
|
58
|
-
* - `version` - (string | number) API version to use
|
|
59
|
-
*
|
|
60
|
-
* @returns {Promise<void>} Promise that resolves when migrations are complete
|
|
61
|
-
*
|
|
62
|
-
* @example
|
|
63
|
-
* ```typescript
|
|
64
|
-
* // Run all migrations up to latest version
|
|
65
|
-
* await migrationApi.runAllMigrations();
|
|
66
|
-
*
|
|
67
|
-
* // Run specific migration with metadata
|
|
68
|
-
* await migrationApi.runAllMigrations({
|
|
69
|
-
* name: "27-create-contact-rule-groups-table",
|
|
70
|
-
* method: "up",
|
|
71
|
-
* meta: {
|
|
72
|
-
* appVersion: "0.81.0",
|
|
73
|
-
* }
|
|
74
|
-
* });
|
|
75
|
-
* ```
|
|
76
|
-
*
|
|
77
|
-
* @remarks
|
|
78
|
-
* Makes a POST request to the `/migrations` endpoint
|
|
79
|
-
* @public
|
|
80
|
-
*/
|
|
81
11
|
static runAllMigrations({ meta, ...options }?: RunMigrationsOptions): Promise<RunMigrationsResponse>;
|
|
82
|
-
/**
|
|
83
|
-
* Retrieves the current status of running migrations
|
|
84
|
-
*
|
|
85
|
-
* @param options - Configuration parameters
|
|
86
|
-
*
|
|
87
|
-
* Optional parameters:
|
|
88
|
-
* - `timeout` - (number) Request timeout in milliseconds
|
|
89
|
-
* - `version` - (string | number) API version to use
|
|
90
|
-
*
|
|
91
|
-
* @returns {Promise<GetRunMigrationsStatusResponse>} Promise resolving to the migration status
|
|
92
|
-
*
|
|
93
|
-
* @example
|
|
94
|
-
* ```typescript
|
|
95
|
-
* const status = await hitlApi.migrations.getRunMigrationsStatus();
|
|
96
|
-
* ```
|
|
97
|
-
*
|
|
98
|
-
* @remarks
|
|
99
|
-
* Makes a GET request to the `/migrations/status` endpoint
|
|
100
|
-
* @public
|
|
101
|
-
*/
|
|
102
12
|
static getRunMigrationsStatus(options?: ApiVersionOptions): Promise<GetRunMigrationsStatusResponse>;
|
|
103
|
-
/**
|
|
104
|
-
* Removes the migrations table lock that is set during migration runs
|
|
105
|
-
*
|
|
106
|
-
* @param options - Configuration parameters
|
|
107
|
-
*
|
|
108
|
-
* Optional parameters:
|
|
109
|
-
* - `timeout` - (number) Request timeout in milliseconds
|
|
110
|
-
* - `version` - (string | number) API version to use
|
|
111
|
-
*
|
|
112
|
-
* @returns {Promise<void>} Promise that resolves when the lock is deleted
|
|
113
|
-
*
|
|
114
|
-
* @example
|
|
115
|
-
* ```typescript
|
|
116
|
-
* await hitlApi.migrations.deleteMigrationsTableLock();
|
|
117
|
-
* ```
|
|
118
|
-
*
|
|
119
|
-
* @remarks
|
|
120
|
-
* Makes a DELETE request to the `/migrations/lock` endpoint
|
|
121
|
-
* @public
|
|
122
|
-
*/
|
|
123
13
|
static deleteMigrationsTableLock(options?: ApiVersionOptions): Promise<unknown>;
|
|
124
|
-
/**
|
|
125
|
-
* Retrieves migration compatibility information with UI versions
|
|
126
|
-
*
|
|
127
|
-
* @param options - Configuration parameters
|
|
128
|
-
*
|
|
129
|
-
* Optional parameters:
|
|
130
|
-
* - `timeout` - (number) Request timeout in milliseconds
|
|
131
|
-
* - `version` - (string | number) API version to use
|
|
132
|
-
*
|
|
133
|
-
* @returns {Promise<GetMigrationsInfoResponse>} Promise resolving to the migrations compatibility info
|
|
134
|
-
*
|
|
135
|
-
* @example
|
|
136
|
-
* ```typescript
|
|
137
|
-
* const info = await hitlApi.migrations.getMigrationsInfo();
|
|
138
|
-
* ```
|
|
139
|
-
*
|
|
140
|
-
* @remarks
|
|
141
|
-
* Makes a GET request to the `/migrations/info` endpoint
|
|
142
|
-
* @public
|
|
143
|
-
*/
|
|
144
14
|
static getMigrationsInfo(options?: ApiVersionOptions): Promise<GetMigrationsInfoResponse>;
|
|
145
|
-
/**
|
|
146
|
-
* Retrieves default records for specific tables
|
|
147
|
-
*
|
|
148
|
-
* Supported tables:
|
|
149
|
-
* - settings
|
|
150
|
-
* - filters
|
|
151
|
-
* - event_templates
|
|
152
|
-
* - rule_groups
|
|
153
|
-
*
|
|
154
|
-
* @param options - Configuration parameters for retrieving default records
|
|
155
|
-
*
|
|
156
|
-
* Required parameters:
|
|
157
|
-
* - `tableName` - ({@link DEFAULT_DATA_TABLE_NAME}) Name of the table to retrieve default records from
|
|
158
|
-
*
|
|
159
|
-
* Optional parameters:
|
|
160
|
-
* - `timeout` - (number) Request timeout in milliseconds
|
|
161
|
-
* - `version` - (string | number) API version to use
|
|
162
|
-
*
|
|
163
|
-
* @returns {Promise<GetDefaultRecordsResponse>} Promise resolving to the default records
|
|
164
|
-
*
|
|
165
|
-
* @example
|
|
166
|
-
* ```typescript
|
|
167
|
-
* const records = await hitlApi.migrations.getTableDefaultRecords({
|
|
168
|
-
* tableName: 'EVENT_TEMPLATES'
|
|
169
|
-
* });
|
|
170
|
-
* ```
|
|
171
|
-
*
|
|
172
|
-
* @remarks
|
|
173
|
-
* Makes a GET request to the `/migrations/default-records` endpoint
|
|
174
|
-
* @public
|
|
175
|
-
*/
|
|
176
15
|
static getTableDefaultRecords(options: GetDefaultRecordsOptions): Promise<GetDefaultRecordsResponse>;
|
|
177
|
-
/**
|
|
178
|
-
* Creates default records for specific tables
|
|
179
|
-
*
|
|
180
|
-
* Supported tables:
|
|
181
|
-
* - settings
|
|
182
|
-
* - filters
|
|
183
|
-
* - event_templates
|
|
184
|
-
* - rule_groups
|
|
185
|
-
*
|
|
186
|
-
* @param options - Configuration parameters
|
|
187
|
-
*
|
|
188
|
-
* Optional parameters:
|
|
189
|
-
* - `timeout` - (number) Request timeout in milliseconds
|
|
190
|
-
* - `version` - (string | number) API version to use
|
|
191
|
-
*
|
|
192
|
-
* @returns {Promise<CreateDefaultRecordsResponse>} Promise resolving to the created records
|
|
193
|
-
*
|
|
194
|
-
* @example
|
|
195
|
-
* ```typescript
|
|
196
|
-
* const result = await hitlApi.migrations.createTableDefaultRecords();
|
|
197
|
-
* ```
|
|
198
|
-
*
|
|
199
|
-
* @remarks
|
|
200
|
-
* Makes a POST request to the `/migrations/default-records` endpoint
|
|
201
|
-
* @public
|
|
202
|
-
*/
|
|
203
16
|
static createTableDefaultRecords(options?: ApiVersionOptions): Promise<CreateDefaultRecordsResponse>;
|
|
204
|
-
/**
|
|
205
|
-
* Synchronizes default records for specific tables
|
|
206
|
-
*
|
|
207
|
-
* Supported tables:
|
|
208
|
-
* - settings
|
|
209
|
-
* - filters
|
|
210
|
-
* - event_templates
|
|
211
|
-
* - rule_groups
|
|
212
|
-
*
|
|
213
|
-
* @param options - Configuration parameters for syncing records
|
|
214
|
-
*
|
|
215
|
-
* Optional parameters:
|
|
216
|
-
* - `keys` - (string[]) Array of specific record keys to synchronize. If not provided, all records will be synchronized
|
|
217
|
-
* - `timeout` - (number) Request timeout in milliseconds
|
|
218
|
-
* - `version` - (string | number) API version to use
|
|
219
|
-
*
|
|
220
|
-
* @returns {Promise<SyncDefaultRecordsResponse>} Promise resolving to the sync results
|
|
221
|
-
*
|
|
222
|
-
* @example
|
|
223
|
-
* // Sync all default records
|
|
224
|
-
* await tableApi.syncTableDefaultRecords({
|
|
225
|
-
* tableName: DEFAULT_DATA_TABLE_NAME.FILTERS
|
|
226
|
-
* });
|
|
227
|
-
*
|
|
228
|
-
* // Sync specific records by keys
|
|
229
|
-
* await tableApi.syncTableDefaultRecords({
|
|
230
|
-
* tableName: DEFAULT_DATA_TABLE_NAME.FILTERS,
|
|
231
|
-
* keys: ['filter-id-1', 'filter-id-3']
|
|
232
|
-
* });
|
|
233
|
-
* ```
|
|
234
|
-
*
|
|
235
|
-
* @remarks
|
|
236
|
-
* Makes a PUT request to the `/migrations/default-records` endpoint
|
|
237
|
-
* @public
|
|
238
|
-
*/
|
|
239
17
|
static syncTableDefaultRecords(options: SyncDefaultRecordsOptions): Promise<SyncDefaultRecordsResponse>;
|
|
240
18
|
}
|
|
241
19
|
//# sourceMappingURL=Migrations.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Migrations.d.ts","sourceRoot":"","sources":["../../../src/api/Migrations.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,iBAAiB,EAAE,MAAM,UAAU,CAAC;AAC7C,OAAO,EAGL,oBAAoB,EACpB,qBAAqB,EACrB,oBAAoB,EACpB,qBAAqB,EACrB,4BAA4B,EAC5B,yBAAyB,EACzB,8BAA8B,EAC9B,wBAAwB,EACxB,yBAAyB,EACzB,yBAAyB,EACzB,0BAA0B,EAC3B,MAAM,qBAAqB,CAAC;AAE7B,OAAO,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAC;
|
|
1
|
+
{"version":3,"file":"Migrations.d.ts","sourceRoot":"","sources":["../../../src/api/Migrations.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,iBAAiB,EAAE,MAAM,UAAU,CAAC;AAC7C,OAAO,EAGL,oBAAoB,EACpB,qBAAqB,EACrB,oBAAoB,EACpB,qBAAqB,EACrB,4BAA4B,EAC5B,yBAAyB,EACzB,8BAA8B,EAC9B,wBAAwB,EACxB,yBAAyB,EACzB,yBAAyB,EACzB,0BAA0B,EAC3B,MAAM,qBAAqB,CAAC;AAE7B,OAAO,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAC;AAetC,qBAAa,UAAW,SAAQ,QAAQ;IACtC,SAAS,CAAC,MAAM,CAAC,QAAQ,CAAC,UAAU,gBAAgB;IACpD,SAAS,CAAC,MAAM,CAAC,mBAAmB,SAAqB;IACzD,SAAS,CAAC,MAAM,CAAC,mBAAmB,SAAU;IAC9C,SAAS,CAAC,MAAM,CAAC,mBAAmB,SAAU;IAC9C,SAAS,CAAC,MAAM,CAAC,qBAAqB,SAAY;WAyB9B,mBAAmB,CACrC,EAAE,UAAU,EAAE,GAAG,OAAO,EAAE,GAAE,oBAAyB,GACpD,OAAO,CAAC,qBAAqB,CAAC;WA4Cb,gBAAgB,CAClC,EAAE,IAAI,EAAE,GAAG,OAAO,EAAE,GAAE,oBAAyB,GAC9C,OAAO,CAAC,qBAAqB,CAAC;WAmCb,sBAAsB,CAAC,OAAO,GAAE,iBAAsB,GAAG,OAAO,CAAC,8BAA8B,CAAC;WA8BhG,yBAAyB,CAAC,OAAO,GAAE,iBAAsB;WA+BzD,iBAAiB,CAAC,OAAO,GAAE,iBAAsB,GAAG,OAAO,CAAC,yBAAyB,CAAC;WAyCtF,sBAAsB,CAAC,OAAO,EAAE,wBAAwB,GAAG,OAAO,CAAC,yBAAyB,CAAC;WAyC7F,yBAAyB,CAAC,OAAO,GAAE,iBAAsB,GAAG,OAAO,CAAC,4BAA4B,CAAC;WA8CjG,uBAAuB,CAAC,OAAO,EAAE,yBAAyB,GAAG,OAAO,CAAC,0BAA0B,CAAC;CAcrH"}
|
|
@@ -1,137 +1,10 @@
|
|
|
1
1
|
import { SearchRuleGroupsOptions, SearchRuleGroupsResponse, RuleGroup, CreateRuleGroupOptions, UpdateRuleGroupOptions, DeleteRuleGroupOptions } from '../types/rule-groups';
|
|
2
2
|
import { HITLBase } from './HITLBase';
|
|
3
|
-
/**
|
|
4
|
-
* Manages rule groups in the system
|
|
5
|
-
*
|
|
6
|
-
* This class provides functionality to manage rule groups, including searching,
|
|
7
|
-
* creating, updating, and deleting rule groups.
|
|
8
|
-
*
|
|
9
|
-
* Key features:
|
|
10
|
-
* - Search and retrieve rule groups
|
|
11
|
-
* - Create new rule groups
|
|
12
|
-
* - Update existing rule groups
|
|
13
|
-
* - Delete rule groups
|
|
14
|
-
*
|
|
15
|
-
* @remarks
|
|
16
|
-
* - All methods in this class interact with the `/rule-groups` endpoint
|
|
17
|
-
* @public
|
|
18
|
-
*/
|
|
19
3
|
export declare class RuleGroups extends HITLBase {
|
|
20
4
|
protected static MODULE_URL: string;
|
|
21
|
-
/**
|
|
22
|
-
* Searches for rule groups or retrieves specific groups
|
|
23
|
-
*
|
|
24
|
-
* @param options - Configuration parameters for the rule groups search
|
|
25
|
-
*
|
|
26
|
-
* Optional parameters:
|
|
27
|
-
* - `groupIdList` - (string[]) List of specific group IDs to retrieve
|
|
28
|
-
* - `timeout` - (number) Request timeout in milliseconds
|
|
29
|
-
* - `version` - (string | number) API version to use
|
|
30
|
-
*
|
|
31
|
-
* @returns {Promise<SearchRuleGroupsResponse | RuleGroup>} Promise resolving to:
|
|
32
|
-
* - Either a list of rule groups or a single rule group if specific ID is provided
|
|
33
|
-
*
|
|
34
|
-
* @example
|
|
35
|
-
* ```typescript
|
|
36
|
-
* // Search all rule groups
|
|
37
|
-
* const response = await hitlApi.ruleGroups.searchRuleGroups();
|
|
38
|
-
*
|
|
39
|
-
* // Search specific rule groups
|
|
40
|
-
* const groups = await hitlApi.ruleGroups.searchRuleGroups({
|
|
41
|
-
* groupIdList: ['group-1', 'group-2']
|
|
42
|
-
* });
|
|
43
|
-
* ```
|
|
44
|
-
*
|
|
45
|
-
* @remarks
|
|
46
|
-
* Makes a GET request to the `/rule-groups` endpoint
|
|
47
|
-
* @public
|
|
48
|
-
*/
|
|
49
5
|
static searchRuleGroups({ groupIdList, ...options }?: SearchRuleGroupsOptions): Promise<SearchRuleGroupsResponse | RuleGroup>;
|
|
50
|
-
/**
|
|
51
|
-
* Creates a new rule group
|
|
52
|
-
*
|
|
53
|
-
* @param options - Configuration parameters for creating the rule group
|
|
54
|
-
*
|
|
55
|
-
* Required parameters:
|
|
56
|
-
* - `groupId` - (string) Unique identifier for the group
|
|
57
|
-
* - `name` - (string) Name of the rule group
|
|
58
|
-
* - `rules` - (RuleDefinition[]) Array of rules for the group
|
|
59
|
-
*
|
|
60
|
-
* Optional parameters:
|
|
61
|
-
* - `timeout` - (number) Request timeout in milliseconds
|
|
62
|
-
* - `version` - (string | number) API version to use
|
|
63
|
-
*
|
|
64
|
-
* @returns {Promise<RuleGroup>} Promise resolving to the created rule group
|
|
65
|
-
*
|
|
66
|
-
* @example
|
|
67
|
-
* ```typescript
|
|
68
|
-
* const newGroup = await hitlApi.ruleGroups.createRuleGroup({
|
|
69
|
-
* groupId: 'group-1',
|
|
70
|
-
* name: 'Allow sms',
|
|
71
|
-
* rules: ['sms']
|
|
72
|
-
* });
|
|
73
|
-
* ```
|
|
74
|
-
*
|
|
75
|
-
* @remarks
|
|
76
|
-
* Makes a POST request to the `/rule-groups` endpoint
|
|
77
|
-
* @public
|
|
78
|
-
*/
|
|
79
6
|
static createRuleGroup({ groupId, name, rules, ...options }: CreateRuleGroupOptions): Promise<RuleGroup>;
|
|
80
|
-
/**
|
|
81
|
-
* Updates an existing rule group
|
|
82
|
-
*
|
|
83
|
-
* @param options - Configuration parameters for updating the rule group
|
|
84
|
-
*
|
|
85
|
-
* Required parameters:
|
|
86
|
-
* - `groupId` - (string) ID of the group to update
|
|
87
|
-
* - `name` - (string) Updated name for the rule group
|
|
88
|
-
* - `rules` - (RuleDefinition[]) Updated array of rules
|
|
89
|
-
*
|
|
90
|
-
* Optional parameters:
|
|
91
|
-
* - `timeout` - (number) Request timeout in milliseconds
|
|
92
|
-
* - `version` - (string | number) API version to use
|
|
93
|
-
*
|
|
94
|
-
* @returns {Promise<RuleGroup>} Promise resolving to the updated rule group
|
|
95
|
-
*
|
|
96
|
-
* @example
|
|
97
|
-
* ```typescript
|
|
98
|
-
* const updatedGroup = await hitlApi.ruleGroups.updateRuleGroup({
|
|
99
|
-
* groupId: 'group-1',
|
|
100
|
-
* name: 'Default sms',
|
|
101
|
-
* rules: ['sms', 'hitl']
|
|
102
|
-
* });
|
|
103
|
-
* ```
|
|
104
|
-
*
|
|
105
|
-
* @remarks
|
|
106
|
-
* Makes a PUT request to the `/rule-groups` endpoint
|
|
107
|
-
* @public
|
|
108
|
-
*/
|
|
109
7
|
static updateRuleGroup({ groupId, name, rules, ...options }: UpdateRuleGroupOptions): Promise<RuleGroup>;
|
|
110
|
-
/**
|
|
111
|
-
* Deletes a rule group
|
|
112
|
-
*
|
|
113
|
-
* @param options - Configuration parameters for deleting the rule group
|
|
114
|
-
*
|
|
115
|
-
* Required parameters:
|
|
116
|
-
* - `groupId` - (string) ID of the group to delete
|
|
117
|
-
*
|
|
118
|
-
* Optional parameters:
|
|
119
|
-
* - `timeout` - (number) Request timeout in milliseconds
|
|
120
|
-
* - `version` - (string | number) API version to use
|
|
121
|
-
*
|
|
122
|
-
* @returns {Promise<void>} Promise that resolves when deletion is complete
|
|
123
|
-
*
|
|
124
|
-
* @example
|
|
125
|
-
* ```typescript
|
|
126
|
-
* await hitlApi.ruleGroups.deleteRuleGroup({
|
|
127
|
-
* groupId: 'group-1'
|
|
128
|
-
* });
|
|
129
|
-
* ```
|
|
130
|
-
*
|
|
131
|
-
* @remarks
|
|
132
|
-
* Makes a DELETE request to the `/rule-groups` endpoint
|
|
133
|
-
* @public
|
|
134
|
-
*/
|
|
135
8
|
static deleteRuleGroup({ groupId, ...options }: DeleteRuleGroupOptions): Promise<void>;
|
|
136
9
|
}
|
|
137
10
|
//# sourceMappingURL=RuleGroups.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"RuleGroups.d.ts","sourceRoot":"","sources":["../../../src/api/RuleGroups.ts"],"names":[],"mappings":"AACA,OAAO,EACL,uBAAuB,EACvB,wBAAwB,EACxB,SAAS,EACT,sBAAsB,EACtB,sBAAsB,EACtB,sBAAsB,EACvB,MAAM,sBAAsB,CAAC;AAE9B,OAAO,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAC;
|
|
1
|
+
{"version":3,"file":"RuleGroups.d.ts","sourceRoot":"","sources":["../../../src/api/RuleGroups.ts"],"names":[],"mappings":"AACA,OAAO,EACL,uBAAuB,EACvB,wBAAwB,EACxB,SAAS,EACT,sBAAsB,EACtB,sBAAsB,EACtB,sBAAsB,EACvB,MAAM,sBAAsB,CAAC;AAE9B,OAAO,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAC;AAkBtC,qBAAa,UAAW,SAAQ,QAAQ;IACtC,SAAS,CAAC,MAAM,CAAC,UAAU,SAAiB;WA8B9B,gBAAgB,CAC5B,EAAE,WAAW,EAAE,GAAG,OAAO,EAAE,GAAE,uBAA4B,GACxD,OAAO,CAAC,wBAAwB,GAAG,SAAS,CAAC;WA2ClC,eAAe,CAC3B,EAAE,OAAO,EAAE,IAAI,EAAE,KAAK,EAAE,GAAG,OAAO,EAAE,EAAE,sBAAsB,GAC3D,OAAO,CAAC,SAAS,CAAC;WA4CP,eAAe,CAC3B,EAAE,OAAO,EAAE,IAAI,EAAE,KAAK,EAAE,GAAG,OAAO,EAAE,EAAE,sBAAsB,GAC3D,OAAO,CAAC,SAAS,CAAC;WAwCP,eAAe,CAC3B,EAAE,OAAO,EAAE,GAAG,OAAO,EAAE,EAAE,sBAAsB,GAC9C,OAAO,CAAC,IAAI,CAAC;CAUjB"}
|