@libgot/whatsapp-bridge-sdk 1.0.40-rc.1 → 1.0.40-rc.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.
@@ -33,10 +33,11 @@ export const MessagesApiAxiosParamCreator = function (configuration?: Configurat
33
33
  *
34
34
  * @param {number} branchId
35
35
  * @param {number} chatId
36
+ * @param {string} apikey
36
37
  * @param {*} [options] Override http request option.
37
38
  * @throws {RequiredError}
38
39
  */
39
- getMessages: async (branchId: number, chatId: number, options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
40
+ getMessages: async (branchId: number, chatId: number, apikey: string, options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
40
41
  // verify required parameter 'branchId' is not null or undefined
41
42
  if (branchId === null || branchId === undefined) {
42
43
  throw new RequiredError('branchId','Required parameter branchId was null or undefined when calling getMessages.');
@@ -45,6 +46,10 @@ export const MessagesApiAxiosParamCreator = function (configuration?: Configurat
45
46
  if (chatId === null || chatId === undefined) {
46
47
  throw new RequiredError('chatId','Required parameter chatId was null or undefined when calling getMessages.');
47
48
  }
49
+ // verify required parameter 'apikey' is not null or undefined
50
+ if (apikey === null || apikey === undefined) {
51
+ throw new RequiredError('apikey','Required parameter apikey was null or undefined when calling getMessages.');
52
+ }
48
53
  const localVarPath = `/api/messages`;
49
54
  // use dummy base URL string because the URL constructor only accepts absolute URLs.
50
55
  const localVarUrlObj = new URL(localVarPath, 'https://example.com');
@@ -64,6 +69,10 @@ export const MessagesApiAxiosParamCreator = function (configuration?: Configurat
64
69
  localVarQueryParameter['chatId'] = chatId;
65
70
  }
66
71
 
72
+ if (apikey !== undefined && apikey !== null) {
73
+ localVarHeaderParameter['apikey'] = String(apikey);
74
+ }
75
+
67
76
  const query = new URLSearchParams(localVarUrlObj.search);
68
77
  for (const key in localVarQueryParameter) {
69
78
  query.set(key, localVarQueryParameter[key]);
@@ -83,14 +92,19 @@ export const MessagesApiAxiosParamCreator = function (configuration?: Configurat
83
92
  /**
84
93
  *
85
94
  * @param {ReadMessageDto} body
95
+ * @param {string} apikey
86
96
  * @param {*} [options] Override http request option.
87
97
  * @throws {RequiredError}
88
98
  */
89
- readMessage: async (body: ReadMessageDto, options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
99
+ readMessage: async (body: ReadMessageDto, apikey: string, options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
90
100
  // verify required parameter 'body' is not null or undefined
91
101
  if (body === null || body === undefined) {
92
102
  throw new RequiredError('body','Required parameter body was null or undefined when calling readMessage.');
93
103
  }
104
+ // verify required parameter 'apikey' is not null or undefined
105
+ if (apikey === null || apikey === undefined) {
106
+ throw new RequiredError('apikey','Required parameter apikey was null or undefined when calling readMessage.');
107
+ }
94
108
  const localVarPath = `/api/messages/read`;
95
109
  // use dummy base URL string because the URL constructor only accepts absolute URLs.
96
110
  const localVarUrlObj = new URL(localVarPath, 'https://example.com');
@@ -102,6 +116,10 @@ export const MessagesApiAxiosParamCreator = function (configuration?: Configurat
102
116
  const localVarHeaderParameter = {} as any;
103
117
  const localVarQueryParameter = {} as any;
104
118
 
119
+ if (apikey !== undefined && apikey !== null) {
120
+ localVarHeaderParameter['apikey'] = String(apikey);
121
+ }
122
+
105
123
  localVarHeaderParameter['Content-Type'] = 'application/json';
106
124
 
107
125
  const query = new URLSearchParams(localVarUrlObj.search);
@@ -125,14 +143,19 @@ export const MessagesApiAxiosParamCreator = function (configuration?: Configurat
125
143
  /**
126
144
  *
127
145
  * @param {SendTemplateDataDto} body
146
+ * @param {string} apikey
128
147
  * @param {*} [options] Override http request option.
129
148
  * @throws {RequiredError}
130
149
  */
131
- sendTemplateMessage: async (body: SendTemplateDataDto, options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
150
+ sendTemplateMessage: async (body: SendTemplateDataDto, apikey: string, options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
132
151
  // verify required parameter 'body' is not null or undefined
133
152
  if (body === null || body === undefined) {
134
153
  throw new RequiredError('body','Required parameter body was null or undefined when calling sendTemplateMessage.');
135
154
  }
155
+ // verify required parameter 'apikey' is not null or undefined
156
+ if (apikey === null || apikey === undefined) {
157
+ throw new RequiredError('apikey','Required parameter apikey was null or undefined when calling sendTemplateMessage.');
158
+ }
136
159
  const localVarPath = `/api/messages/send-template`;
137
160
  // use dummy base URL string because the URL constructor only accepts absolute URLs.
138
161
  const localVarUrlObj = new URL(localVarPath, 'https://example.com');
@@ -144,6 +167,10 @@ export const MessagesApiAxiosParamCreator = function (configuration?: Configurat
144
167
  const localVarHeaderParameter = {} as any;
145
168
  const localVarQueryParameter = {} as any;
146
169
 
170
+ if (apikey !== undefined && apikey !== null) {
171
+ localVarHeaderParameter['apikey'] = String(apikey);
172
+ }
173
+
147
174
  localVarHeaderParameter['Content-Type'] = 'application/json';
148
175
 
149
176
  const query = new URLSearchParams(localVarUrlObj.search);
@@ -167,14 +194,19 @@ export const MessagesApiAxiosParamCreator = function (configuration?: Configurat
167
194
  /**
168
195
  *
169
196
  * @param {SendTextDto} body
197
+ * @param {string} apikey
170
198
  * @param {*} [options] Override http request option.
171
199
  * @throws {RequiredError}
172
200
  */
173
- sendTextMessage: async (body: SendTextDto, options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
201
+ sendTextMessage: async (body: SendTextDto, apikey: string, options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
174
202
  // verify required parameter 'body' is not null or undefined
175
203
  if (body === null || body === undefined) {
176
204
  throw new RequiredError('body','Required parameter body was null or undefined when calling sendTextMessage.');
177
205
  }
206
+ // verify required parameter 'apikey' is not null or undefined
207
+ if (apikey === null || apikey === undefined) {
208
+ throw new RequiredError('apikey','Required parameter apikey was null or undefined when calling sendTextMessage.');
209
+ }
178
210
  const localVarPath = `/api/messages/send-text`;
179
211
  // use dummy base URL string because the URL constructor only accepts absolute URLs.
180
212
  const localVarUrlObj = new URL(localVarPath, 'https://example.com');
@@ -186,6 +218,10 @@ export const MessagesApiAxiosParamCreator = function (configuration?: Configurat
186
218
  const localVarHeaderParameter = {} as any;
187
219
  const localVarQueryParameter = {} as any;
188
220
 
221
+ if (apikey !== undefined && apikey !== null) {
222
+ localVarHeaderParameter['apikey'] = String(apikey);
223
+ }
224
+
189
225
  localVarHeaderParameter['Content-Type'] = 'application/json';
190
226
 
191
227
  const query = new URLSearchParams(localVarUrlObj.search);
@@ -219,11 +255,12 @@ export const MessagesApiFp = function(configuration?: Configuration) {
219
255
  *
220
256
  * @param {number} branchId
221
257
  * @param {number} chatId
258
+ * @param {string} apikey
222
259
  * @param {*} [options] Override http request option.
223
260
  * @throws {RequiredError}
224
261
  */
225
- async getMessages(branchId: number, chatId: number, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => Promise<AxiosResponse<MessageResponseDto>>> {
226
- const localVarAxiosArgs = await MessagesApiAxiosParamCreator(configuration).getMessages(branchId, chatId, options);
262
+ async getMessages(branchId: number, chatId: number, apikey: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => Promise<AxiosResponse<MessageResponseDto>>> {
263
+ const localVarAxiosArgs = await MessagesApiAxiosParamCreator(configuration).getMessages(branchId, chatId, apikey, options);
227
264
  return (axios: AxiosInstance = globalAxios, basePath: string = BASE_PATH) => {
228
265
  const axiosRequestArgs :AxiosRequestConfig = {...localVarAxiosArgs.options, url: basePath + localVarAxiosArgs.url};
229
266
  return axios.request(axiosRequestArgs);
@@ -232,11 +269,12 @@ export const MessagesApiFp = function(configuration?: Configuration) {
232
269
  /**
233
270
  *
234
271
  * @param {ReadMessageDto} body
272
+ * @param {string} apikey
235
273
  * @param {*} [options] Override http request option.
236
274
  * @throws {RequiredError}
237
275
  */
238
- async readMessage(body: ReadMessageDto, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => Promise<AxiosResponse<ReadMessageResponseDataDto>>> {
239
- const localVarAxiosArgs = await MessagesApiAxiosParamCreator(configuration).readMessage(body, options);
276
+ async readMessage(body: ReadMessageDto, apikey: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => Promise<AxiosResponse<ReadMessageResponseDataDto>>> {
277
+ const localVarAxiosArgs = await MessagesApiAxiosParamCreator(configuration).readMessage(body, apikey, options);
240
278
  return (axios: AxiosInstance = globalAxios, basePath: string = BASE_PATH) => {
241
279
  const axiosRequestArgs :AxiosRequestConfig = {...localVarAxiosArgs.options, url: basePath + localVarAxiosArgs.url};
242
280
  return axios.request(axiosRequestArgs);
@@ -245,11 +283,12 @@ export const MessagesApiFp = function(configuration?: Configuration) {
245
283
  /**
246
284
  *
247
285
  * @param {SendTemplateDataDto} body
286
+ * @param {string} apikey
248
287
  * @param {*} [options] Override http request option.
249
288
  * @throws {RequiredError}
250
289
  */
251
- async sendTemplateMessage(body: SendTemplateDataDto, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => Promise<AxiosResponse<SendTextDataResponseDto>>> {
252
- const localVarAxiosArgs = await MessagesApiAxiosParamCreator(configuration).sendTemplateMessage(body, options);
290
+ async sendTemplateMessage(body: SendTemplateDataDto, apikey: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => Promise<AxiosResponse<SendTextDataResponseDto>>> {
291
+ const localVarAxiosArgs = await MessagesApiAxiosParamCreator(configuration).sendTemplateMessage(body, apikey, options);
253
292
  return (axios: AxiosInstance = globalAxios, basePath: string = BASE_PATH) => {
254
293
  const axiosRequestArgs :AxiosRequestConfig = {...localVarAxiosArgs.options, url: basePath + localVarAxiosArgs.url};
255
294
  return axios.request(axiosRequestArgs);
@@ -258,11 +297,12 @@ export const MessagesApiFp = function(configuration?: Configuration) {
258
297
  /**
259
298
  *
260
299
  * @param {SendTextDto} body
300
+ * @param {string} apikey
261
301
  * @param {*} [options] Override http request option.
262
302
  * @throws {RequiredError}
263
303
  */
264
- async sendTextMessage(body: SendTextDto, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => Promise<AxiosResponse<SendTextDataResponseDto>>> {
265
- const localVarAxiosArgs = await MessagesApiAxiosParamCreator(configuration).sendTextMessage(body, options);
304
+ async sendTextMessage(body: SendTextDto, apikey: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => Promise<AxiosResponse<SendTextDataResponseDto>>> {
305
+ const localVarAxiosArgs = await MessagesApiAxiosParamCreator(configuration).sendTextMessage(body, apikey, options);
266
306
  return (axios: AxiosInstance = globalAxios, basePath: string = BASE_PATH) => {
267
307
  const axiosRequestArgs :AxiosRequestConfig = {...localVarAxiosArgs.options, url: basePath + localVarAxiosArgs.url};
268
308
  return axios.request(axiosRequestArgs);
@@ -281,38 +321,42 @@ export const MessagesApiFactory = function (configuration?: Configuration, baseP
281
321
  *
282
322
  * @param {number} branchId
283
323
  * @param {number} chatId
324
+ * @param {string} apikey
284
325
  * @param {*} [options] Override http request option.
285
326
  * @throws {RequiredError}
286
327
  */
287
- async getMessages(branchId: number, chatId: number, options?: AxiosRequestConfig): Promise<AxiosResponse<MessageResponseDto>> {
288
- return MessagesApiFp(configuration).getMessages(branchId, chatId, options).then((request) => request(axios, basePath));
328
+ async getMessages(branchId: number, chatId: number, apikey: string, options?: AxiosRequestConfig): Promise<AxiosResponse<MessageResponseDto>> {
329
+ return MessagesApiFp(configuration).getMessages(branchId, chatId, apikey, options).then((request) => request(axios, basePath));
289
330
  },
290
331
  /**
291
332
  *
292
333
  * @param {ReadMessageDto} body
334
+ * @param {string} apikey
293
335
  * @param {*} [options] Override http request option.
294
336
  * @throws {RequiredError}
295
337
  */
296
- async readMessage(body: ReadMessageDto, options?: AxiosRequestConfig): Promise<AxiosResponse<ReadMessageResponseDataDto>> {
297
- return MessagesApiFp(configuration).readMessage(body, options).then((request) => request(axios, basePath));
338
+ async readMessage(body: ReadMessageDto, apikey: string, options?: AxiosRequestConfig): Promise<AxiosResponse<ReadMessageResponseDataDto>> {
339
+ return MessagesApiFp(configuration).readMessage(body, apikey, options).then((request) => request(axios, basePath));
298
340
  },
299
341
  /**
300
342
  *
301
343
  * @param {SendTemplateDataDto} body
344
+ * @param {string} apikey
302
345
  * @param {*} [options] Override http request option.
303
346
  * @throws {RequiredError}
304
347
  */
305
- async sendTemplateMessage(body: SendTemplateDataDto, options?: AxiosRequestConfig): Promise<AxiosResponse<SendTextDataResponseDto>> {
306
- return MessagesApiFp(configuration).sendTemplateMessage(body, options).then((request) => request(axios, basePath));
348
+ async sendTemplateMessage(body: SendTemplateDataDto, apikey: string, options?: AxiosRequestConfig): Promise<AxiosResponse<SendTextDataResponseDto>> {
349
+ return MessagesApiFp(configuration).sendTemplateMessage(body, apikey, options).then((request) => request(axios, basePath));
307
350
  },
308
351
  /**
309
352
  *
310
353
  * @param {SendTextDto} body
354
+ * @param {string} apikey
311
355
  * @param {*} [options] Override http request option.
312
356
  * @throws {RequiredError}
313
357
  */
314
- async sendTextMessage(body: SendTextDto, options?: AxiosRequestConfig): Promise<AxiosResponse<SendTextDataResponseDto>> {
315
- return MessagesApiFp(configuration).sendTextMessage(body, options).then((request) => request(axios, basePath));
358
+ async sendTextMessage(body: SendTextDto, apikey: string, options?: AxiosRequestConfig): Promise<AxiosResponse<SendTextDataResponseDto>> {
359
+ return MessagesApiFp(configuration).sendTextMessage(body, apikey, options).then((request) => request(axios, basePath));
316
360
  },
317
361
  };
318
362
  };
@@ -328,41 +372,45 @@ export class MessagesApi extends BaseAPI {
328
372
  *
329
373
  * @param {number} branchId
330
374
  * @param {number} chatId
375
+ * @param {string} apikey
331
376
  * @param {*} [options] Override http request option.
332
377
  * @throws {RequiredError}
333
378
  * @memberof MessagesApi
334
379
  */
335
- public async getMessages(branchId: number, chatId: number, options?: AxiosRequestConfig) : Promise<AxiosResponse<MessageResponseDto>> {
336
- return MessagesApiFp(this.configuration).getMessages(branchId, chatId, options).then((request) => request(this.axios, this.basePath));
380
+ public async getMessages(branchId: number, chatId: number, apikey: string, options?: AxiosRequestConfig) : Promise<AxiosResponse<MessageResponseDto>> {
381
+ return MessagesApiFp(this.configuration).getMessages(branchId, chatId, apikey, options).then((request) => request(this.axios, this.basePath));
337
382
  }
338
383
  /**
339
384
  *
340
385
  * @param {ReadMessageDto} body
386
+ * @param {string} apikey
341
387
  * @param {*} [options] Override http request option.
342
388
  * @throws {RequiredError}
343
389
  * @memberof MessagesApi
344
390
  */
345
- public async readMessage(body: ReadMessageDto, options?: AxiosRequestConfig) : Promise<AxiosResponse<ReadMessageResponseDataDto>> {
346
- return MessagesApiFp(this.configuration).readMessage(body, options).then((request) => request(this.axios, this.basePath));
391
+ public async readMessage(body: ReadMessageDto, apikey: string, options?: AxiosRequestConfig) : Promise<AxiosResponse<ReadMessageResponseDataDto>> {
392
+ return MessagesApiFp(this.configuration).readMessage(body, apikey, options).then((request) => request(this.axios, this.basePath));
347
393
  }
348
394
  /**
349
395
  *
350
396
  * @param {SendTemplateDataDto} body
397
+ * @param {string} apikey
351
398
  * @param {*} [options] Override http request option.
352
399
  * @throws {RequiredError}
353
400
  * @memberof MessagesApi
354
401
  */
355
- public async sendTemplateMessage(body: SendTemplateDataDto, options?: AxiosRequestConfig) : Promise<AxiosResponse<SendTextDataResponseDto>> {
356
- return MessagesApiFp(this.configuration).sendTemplateMessage(body, options).then((request) => request(this.axios, this.basePath));
402
+ public async sendTemplateMessage(body: SendTemplateDataDto, apikey: string, options?: AxiosRequestConfig) : Promise<AxiosResponse<SendTextDataResponseDto>> {
403
+ return MessagesApiFp(this.configuration).sendTemplateMessage(body, apikey, options).then((request) => request(this.axios, this.basePath));
357
404
  }
358
405
  /**
359
406
  *
360
407
  * @param {SendTextDto} body
408
+ * @param {string} apikey
361
409
  * @param {*} [options] Override http request option.
362
410
  * @throws {RequiredError}
363
411
  * @memberof MessagesApi
364
412
  */
365
- public async sendTextMessage(body: SendTextDto, options?: AxiosRequestConfig) : Promise<AxiosResponse<SendTextDataResponseDto>> {
366
- return MessagesApiFp(this.configuration).sendTextMessage(body, options).then((request) => request(this.axios, this.basePath));
413
+ public async sendTextMessage(body: SendTextDto, apikey: string, options?: AxiosRequestConfig) : Promise<AxiosResponse<SendTextDataResponseDto>> {
414
+ return MessagesApiFp(this.configuration).sendTextMessage(body, apikey, options).then((request) => request(this.axios, this.basePath));
367
415
  }
368
416
  }
@@ -28,14 +28,19 @@ export const SessionsApiAxiosParamCreator = function (configuration?: Configurat
28
28
  /**
29
29
  *
30
30
  * @param {string} sessionUuid
31
+ * @param {string} apikey
31
32
  * @param {*} [options] Override http request option.
32
33
  * @throws {RequiredError}
33
34
  */
34
- getSession: async (sessionUuid: string, options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
35
+ getSession: async (sessionUuid: string, apikey: string, options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
35
36
  // verify required parameter 'sessionUuid' is not null or undefined
36
37
  if (sessionUuid === null || sessionUuid === undefined) {
37
38
  throw new RequiredError('sessionUuid','Required parameter sessionUuid was null or undefined when calling getSession.');
38
39
  }
40
+ // verify required parameter 'apikey' is not null or undefined
41
+ if (apikey === null || apikey === undefined) {
42
+ throw new RequiredError('apikey','Required parameter apikey was null or undefined when calling getSession.');
43
+ }
39
44
  const localVarPath = `/api/sessions/{sessionUuid}`
40
45
  .replace(`{${"sessionUuid"}}`, encodeURIComponent(String(sessionUuid)));
41
46
  // use dummy base URL string because the URL constructor only accepts absolute URLs.
@@ -48,6 +53,10 @@ export const SessionsApiAxiosParamCreator = function (configuration?: Configurat
48
53
  const localVarHeaderParameter = {} as any;
49
54
  const localVarQueryParameter = {} as any;
50
55
 
56
+ if (apikey !== undefined && apikey !== null) {
57
+ localVarHeaderParameter['apikey'] = String(apikey);
58
+ }
59
+
51
60
  const query = new URLSearchParams(localVarUrlObj.search);
52
61
  for (const key in localVarQueryParameter) {
53
62
  query.set(key, localVarQueryParameter[key]);
@@ -67,14 +76,19 @@ export const SessionsApiAxiosParamCreator = function (configuration?: Configurat
67
76
  /**
68
77
  *
69
78
  * @param {number} branchId
79
+ * @param {string} apikey
70
80
  * @param {*} [options] Override http request option.
71
81
  * @throws {RequiredError}
72
82
  */
73
- getSessions: async (branchId: number, options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
83
+ getSessions: async (branchId: number, apikey: string, options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
74
84
  // verify required parameter 'branchId' is not null or undefined
75
85
  if (branchId === null || branchId === undefined) {
76
86
  throw new RequiredError('branchId','Required parameter branchId was null or undefined when calling getSessions.');
77
87
  }
88
+ // verify required parameter 'apikey' is not null or undefined
89
+ if (apikey === null || apikey === undefined) {
90
+ throw new RequiredError('apikey','Required parameter apikey was null or undefined when calling getSessions.');
91
+ }
78
92
  const localVarPath = `/api/sessions`;
79
93
  // use dummy base URL string because the URL constructor only accepts absolute URLs.
80
94
  const localVarUrlObj = new URL(localVarPath, 'https://example.com');
@@ -90,6 +104,10 @@ export const SessionsApiAxiosParamCreator = function (configuration?: Configurat
90
104
  localVarQueryParameter['branchId'] = branchId;
91
105
  }
92
106
 
107
+ if (apikey !== undefined && apikey !== null) {
108
+ localVarHeaderParameter['apikey'] = String(apikey);
109
+ }
110
+
93
111
  const query = new URLSearchParams(localVarUrlObj.search);
94
112
  for (const key in localVarQueryParameter) {
95
113
  query.set(key, localVarQueryParameter[key]);
@@ -118,11 +136,12 @@ export const SessionsApiFp = function(configuration?: Configuration) {
118
136
  /**
119
137
  *
120
138
  * @param {string} sessionUuid
139
+ * @param {string} apikey
121
140
  * @param {*} [options] Override http request option.
122
141
  * @throws {RequiredError}
123
142
  */
124
- async getSession(sessionUuid: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => Promise<AxiosResponse<SessionResponseDataDto>>> {
125
- const localVarAxiosArgs = await SessionsApiAxiosParamCreator(configuration).getSession(sessionUuid, options);
143
+ async getSession(sessionUuid: string, apikey: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => Promise<AxiosResponse<SessionResponseDataDto>>> {
144
+ const localVarAxiosArgs = await SessionsApiAxiosParamCreator(configuration).getSession(sessionUuid, apikey, options);
126
145
  return (axios: AxiosInstance = globalAxios, basePath: string = BASE_PATH) => {
127
146
  const axiosRequestArgs :AxiosRequestConfig = {...localVarAxiosArgs.options, url: basePath + localVarAxiosArgs.url};
128
147
  return axios.request(axiosRequestArgs);
@@ -131,11 +150,12 @@ export const SessionsApiFp = function(configuration?: Configuration) {
131
150
  /**
132
151
  *
133
152
  * @param {number} branchId
153
+ * @param {string} apikey
134
154
  * @param {*} [options] Override http request option.
135
155
  * @throws {RequiredError}
136
156
  */
137
- async getSessions(branchId: number, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => Promise<AxiosResponse<SessionsResponseDataDto>>> {
138
- const localVarAxiosArgs = await SessionsApiAxiosParamCreator(configuration).getSessions(branchId, options);
157
+ async getSessions(branchId: number, apikey: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => Promise<AxiosResponse<SessionsResponseDataDto>>> {
158
+ const localVarAxiosArgs = await SessionsApiAxiosParamCreator(configuration).getSessions(branchId, apikey, options);
139
159
  return (axios: AxiosInstance = globalAxios, basePath: string = BASE_PATH) => {
140
160
  const axiosRequestArgs :AxiosRequestConfig = {...localVarAxiosArgs.options, url: basePath + localVarAxiosArgs.url};
141
161
  return axios.request(axiosRequestArgs);
@@ -153,20 +173,22 @@ export const SessionsApiFactory = function (configuration?: Configuration, baseP
153
173
  /**
154
174
  *
155
175
  * @param {string} sessionUuid
176
+ * @param {string} apikey
156
177
  * @param {*} [options] Override http request option.
157
178
  * @throws {RequiredError}
158
179
  */
159
- async getSession(sessionUuid: string, options?: AxiosRequestConfig): Promise<AxiosResponse<SessionResponseDataDto>> {
160
- return SessionsApiFp(configuration).getSession(sessionUuid, options).then((request) => request(axios, basePath));
180
+ async getSession(sessionUuid: string, apikey: string, options?: AxiosRequestConfig): Promise<AxiosResponse<SessionResponseDataDto>> {
181
+ return SessionsApiFp(configuration).getSession(sessionUuid, apikey, options).then((request) => request(axios, basePath));
161
182
  },
162
183
  /**
163
184
  *
164
185
  * @param {number} branchId
186
+ * @param {string} apikey
165
187
  * @param {*} [options] Override http request option.
166
188
  * @throws {RequiredError}
167
189
  */
168
- async getSessions(branchId: number, options?: AxiosRequestConfig): Promise<AxiosResponse<SessionsResponseDataDto>> {
169
- return SessionsApiFp(configuration).getSessions(branchId, options).then((request) => request(axios, basePath));
190
+ async getSessions(branchId: number, apikey: string, options?: AxiosRequestConfig): Promise<AxiosResponse<SessionsResponseDataDto>> {
191
+ return SessionsApiFp(configuration).getSessions(branchId, apikey, options).then((request) => request(axios, basePath));
170
192
  },
171
193
  };
172
194
  };
@@ -181,21 +203,23 @@ export class SessionsApi extends BaseAPI {
181
203
  /**
182
204
  *
183
205
  * @param {string} sessionUuid
206
+ * @param {string} apikey
184
207
  * @param {*} [options] Override http request option.
185
208
  * @throws {RequiredError}
186
209
  * @memberof SessionsApi
187
210
  */
188
- public async getSession(sessionUuid: string, options?: AxiosRequestConfig) : Promise<AxiosResponse<SessionResponseDataDto>> {
189
- return SessionsApiFp(this.configuration).getSession(sessionUuid, options).then((request) => request(this.axios, this.basePath));
211
+ public async getSession(sessionUuid: string, apikey: string, options?: AxiosRequestConfig) : Promise<AxiosResponse<SessionResponseDataDto>> {
212
+ return SessionsApiFp(this.configuration).getSession(sessionUuid, apikey, options).then((request) => request(this.axios, this.basePath));
190
213
  }
191
214
  /**
192
215
  *
193
216
  * @param {number} branchId
217
+ * @param {string} apikey
194
218
  * @param {*} [options] Override http request option.
195
219
  * @throws {RequiredError}
196
220
  * @memberof SessionsApi
197
221
  */
198
- public async getSessions(branchId: number, options?: AxiosRequestConfig) : Promise<AxiosResponse<SessionsResponseDataDto>> {
199
- return SessionsApiFp(this.configuration).getSessions(branchId, options).then((request) => request(this.axios, this.basePath));
222
+ public async getSessions(branchId: number, apikey: string, options?: AxiosRequestConfig) : Promise<AxiosResponse<SessionsResponseDataDto>> {
223
+ return SessionsApiFp(this.configuration).getSessions(branchId, apikey, options).then((request) => request(this.axios, this.basePath));
200
224
  }
201
225
  }
@@ -22,10 +22,11 @@ export declare const CellphoneApiAxiosParamCreator: (configuration?: Configurati
22
22
  *
23
23
  * @param {CellphoneValidationDto} body
24
24
  * @param {string} authorization Custom header
25
+ * @param {string} apikey
25
26
  * @param {*} [options] Override http request option.
26
27
  * @throws {RequiredError}
27
28
  */
28
- validate: (body: CellphoneValidationDto, authorization: string, options?: AxiosRequestConfig) => Promise<RequestArgs>;
29
+ validate: (body: CellphoneValidationDto, authorization: string, apikey: string, options?: AxiosRequestConfig) => Promise<RequestArgs>;
29
30
  };
30
31
  /**
31
32
  * CellphoneApi - functional programming interface
@@ -36,10 +37,11 @@ export declare const CellphoneApiFp: (configuration?: Configuration) => {
36
37
  *
37
38
  * @param {CellphoneValidationDto} body
38
39
  * @param {string} authorization Custom header
40
+ * @param {string} apikey
39
41
  * @param {*} [options] Override http request option.
40
42
  * @throws {RequiredError}
41
43
  */
42
- validate(body: CellphoneValidationDto, authorization: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => Promise<AxiosResponse<void>>>;
44
+ validate(body: CellphoneValidationDto, authorization: string, apikey: string, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => Promise<AxiosResponse<void>>>;
43
45
  };
44
46
  /**
45
47
  * CellphoneApi - factory interface
@@ -50,10 +52,11 @@ export declare const CellphoneApiFactory: (configuration?: Configuration, basePa
50
52
  *
51
53
  * @param {CellphoneValidationDto} body
52
54
  * @param {string} authorization Custom header
55
+ * @param {string} apikey
53
56
  * @param {*} [options] Override http request option.
54
57
  * @throws {RequiredError}
55
58
  */
56
- validate(body: CellphoneValidationDto, authorization: string, options?: AxiosRequestConfig): Promise<AxiosResponse<void>>;
59
+ validate(body: CellphoneValidationDto, authorization: string, apikey: string, options?: AxiosRequestConfig): Promise<AxiosResponse<void>>;
57
60
  };
58
61
  /**
59
62
  * CellphoneApi - object-oriented interface
@@ -66,9 +69,10 @@ export declare class CellphoneApi extends BaseAPI {
66
69
  *
67
70
  * @param {CellphoneValidationDto} body
68
71
  * @param {string} authorization Custom header
72
+ * @param {string} apikey
69
73
  * @param {*} [options] Override http request option.
70
74
  * @throws {RequiredError}
71
75
  * @memberof CellphoneApi
72
76
  */
73
- validate(body: CellphoneValidationDto, authorization: string, options?: AxiosRequestConfig): Promise<AxiosResponse<void>>;
77
+ validate(body: CellphoneValidationDto, authorization: string, apikey: string, options?: AxiosRequestConfig): Promise<AxiosResponse<void>>;
74
78
  }
@@ -37,10 +37,11 @@ const CellphoneApiAxiosParamCreator = function (configuration) {
37
37
  *
38
38
  * @param {CellphoneValidationDto} body
39
39
  * @param {string} authorization Custom header
40
+ * @param {string} apikey
40
41
  * @param {*} [options] Override http request option.
41
42
  * @throws {RequiredError}
42
43
  */
43
- validate: (body_1, authorization_1, ...args_1) => __awaiter(this, [body_1, authorization_1, ...args_1], void 0, function* (body, authorization, options = {}) {
44
+ validate: (body_1, authorization_1, apikey_1, ...args_1) => __awaiter(this, [body_1, authorization_1, apikey_1, ...args_1], void 0, function* (body, authorization, apikey, options = {}) {
44
45
  // verify required parameter 'body' is not null or undefined
45
46
  if (body === null || body === undefined) {
46
47
  throw new base_1.RequiredError('body', 'Required parameter body was null or undefined when calling validate.');
@@ -49,6 +50,10 @@ const CellphoneApiAxiosParamCreator = function (configuration) {
49
50
  if (authorization === null || authorization === undefined) {
50
51
  throw new base_1.RequiredError('authorization', 'Required parameter authorization was null or undefined when calling validate.');
51
52
  }
53
+ // verify required parameter 'apikey' is not null or undefined
54
+ if (apikey === null || apikey === undefined) {
55
+ throw new base_1.RequiredError('apikey', 'Required parameter apikey was null or undefined when calling validate.');
56
+ }
52
57
  const localVarPath = `/api/cellphone/validate`;
53
58
  // use dummy base URL string because the URL constructor only accepts absolute URLs.
54
59
  const localVarUrlObj = new URL(localVarPath, 'https://example.com');
@@ -59,17 +64,12 @@ const CellphoneApiAxiosParamCreator = function (configuration) {
59
64
  const localVarRequestOptions = Object.assign(Object.assign({ method: 'POST' }, baseOptions), options);
60
65
  const localVarHeaderParameter = {};
61
66
  const localVarQueryParameter = {};
62
- // authentication access-token required
63
- // http bearer authentication required
64
- if (configuration && configuration.accessToken) {
65
- const accessToken = typeof configuration.accessToken === 'function'
66
- ? yield configuration.accessToken()
67
- : yield configuration.accessToken;
68
- localVarHeaderParameter["Authorization"] = "Bearer " + accessToken;
69
- }
70
67
  if (authorization !== undefined && authorization !== null) {
71
68
  localVarHeaderParameter['Authorization'] = String(authorization);
72
69
  }
70
+ if (apikey !== undefined && apikey !== null) {
71
+ localVarHeaderParameter['apikey'] = String(apikey);
72
+ }
73
73
  localVarHeaderParameter['Content-Type'] = 'application/json';
74
74
  const query = new URLSearchParams(localVarUrlObj.search);
75
75
  for (const key in localVarQueryParameter) {
@@ -101,12 +101,13 @@ const CellphoneApiFp = function (configuration) {
101
101
  *
102
102
  * @param {CellphoneValidationDto} body
103
103
  * @param {string} authorization Custom header
104
+ * @param {string} apikey
104
105
  * @param {*} [options] Override http request option.
105
106
  * @throws {RequiredError}
106
107
  */
107
- validate(body, authorization, options) {
108
+ validate(body, authorization, apikey, options) {
108
109
  return __awaiter(this, void 0, void 0, function* () {
109
- const localVarAxiosArgs = yield (0, exports.CellphoneApiAxiosParamCreator)(configuration).validate(body, authorization, options);
110
+ const localVarAxiosArgs = yield (0, exports.CellphoneApiAxiosParamCreator)(configuration).validate(body, authorization, apikey, options);
110
111
  return (axios = axios_1.default, basePath = base_1.BASE_PATH) => {
111
112
  const axiosRequestArgs = Object.assign(Object.assign({}, localVarAxiosArgs.options), { url: basePath + localVarAxiosArgs.url });
112
113
  return axios.request(axiosRequestArgs);
@@ -126,12 +127,13 @@ const CellphoneApiFactory = function (configuration, basePath, axios) {
126
127
  *
127
128
  * @param {CellphoneValidationDto} body
128
129
  * @param {string} authorization Custom header
130
+ * @param {string} apikey
129
131
  * @param {*} [options] Override http request option.
130
132
  * @throws {RequiredError}
131
133
  */
132
- validate(body, authorization, options) {
134
+ validate(body, authorization, apikey, options) {
133
135
  return __awaiter(this, void 0, void 0, function* () {
134
- return (0, exports.CellphoneApiFp)(configuration).validate(body, authorization, options).then((request) => request(axios, basePath));
136
+ return (0, exports.CellphoneApiFp)(configuration).validate(body, authorization, apikey, options).then((request) => request(axios, basePath));
135
137
  });
136
138
  },
137
139
  };
@@ -148,13 +150,14 @@ class CellphoneApi extends base_1.BaseAPI {
148
150
  *
149
151
  * @param {CellphoneValidationDto} body
150
152
  * @param {string} authorization Custom header
153
+ * @param {string} apikey
151
154
  * @param {*} [options] Override http request option.
152
155
  * @throws {RequiredError}
153
156
  * @memberof CellphoneApi
154
157
  */
155
- validate(body, authorization, options) {
158
+ validate(body, authorization, apikey, options) {
156
159
  return __awaiter(this, void 0, void 0, function* () {
157
- return (0, exports.CellphoneApiFp)(this.configuration).validate(body, authorization, options).then((request) => request(this.axios, this.basePath));
160
+ return (0, exports.CellphoneApiFp)(this.configuration).validate(body, authorization, apikey, options).then((request) => request(this.axios, this.basePath));
158
161
  });
159
162
  }
160
163
  }