@scout9/admin 1.0.0-alpha.0.0.41 → 1.0.0-alpha.0.0.43
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/build/{api.js → cjs/api.js} +124 -0
- package/build/cjs/configuration.js +157 -0
- package/build/esm/api.js +4739 -0
- package/build/esm/base.js +58 -0
- package/build/esm/common.js +133 -0
- package/build/{configuration.js → esm/configuration.js} +23 -7
- package/build/esm/index.js +168 -0
- package/build/esm/webhooks.js +16 -0
- package/build/tsconfig.cjs.tsbuildinfo +1 -0
- package/build/tsconfig.esm.tsbuildinfo +1 -0
- package/build/{api.d.ts → types/api.d.ts} +160 -0
- package/package.json +8 -4
- package/src/api.ts +226 -0
- package/src/configuration.ts +23 -2
- package/tsconfig.cjs.json +8 -0
- package/tsconfig.esm.json +8 -0
- package/tsconfig.tsbuildinfo +0 -1
- /package/build/{base.js → cjs/base.js} +0 -0
- /package/build/{common.js → cjs/common.js} +0 -0
- /package/build/{index.js → cjs/index.js} +0 -0
- /package/build/{webhooks.js → cjs/webhooks.js} +0 -0
- /package/build/{base.d.ts → types/base.d.ts} +0 -0
- /package/build/{common.d.ts → types/common.d.ts} +0 -0
- /package/build/{configuration.d.ts → types/configuration.d.ts} +0 -0
- /package/build/{index.d.ts → types/index.d.ts} +0 -0
- /package/build/{webhooks.d.ts → types/webhooks.d.ts} +0 -0
|
@@ -570,6 +570,36 @@ const Scout9ApiAxiosParamCreator = function (configuration) {
|
|
|
570
570
|
options: localVarRequestOptions,
|
|
571
571
|
};
|
|
572
572
|
},
|
|
573
|
+
/**
|
|
574
|
+
*
|
|
575
|
+
* @summary Natural language prompt to resolve a context value derived from the conversation.
|
|
576
|
+
* @param {CaptureContextRequest} captureContextRequest
|
|
577
|
+
* @param {*} [options] Override http request option.
|
|
578
|
+
* @throws {RequiredError}
|
|
579
|
+
*/
|
|
580
|
+
captureContext: async (captureContextRequest, options = {}) => {
|
|
581
|
+
// verify required parameter 'captureContextRequest' is not null or undefined
|
|
582
|
+
(0, common_1.assertParamExists)('captureContext', 'captureContextRequest', captureContextRequest);
|
|
583
|
+
const localVarPath = `/v1-utils-macros-context`;
|
|
584
|
+
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
585
|
+
const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
|
|
586
|
+
let baseOptions;
|
|
587
|
+
if (configuration) {
|
|
588
|
+
baseOptions = configuration.baseOptions;
|
|
589
|
+
}
|
|
590
|
+
const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options };
|
|
591
|
+
const localVarHeaderParameter = {};
|
|
592
|
+
const localVarQueryParameter = {};
|
|
593
|
+
localVarHeaderParameter['Content-Type'] = 'application/json';
|
|
594
|
+
(0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
|
|
595
|
+
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
596
|
+
localVarRequestOptions.headers = { ...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers };
|
|
597
|
+
localVarRequestOptions.data = (0, common_1.serializeDataIfNeeded)(captureContextRequest, localVarRequestOptions, configuration);
|
|
598
|
+
return {
|
|
599
|
+
url: (0, common_1.toPathString)(localVarUrlObj),
|
|
600
|
+
options: localVarRequestOptions,
|
|
601
|
+
};
|
|
602
|
+
},
|
|
573
603
|
/**
|
|
574
604
|
*
|
|
575
605
|
* @summary Get the current project configuration
|
|
@@ -1675,6 +1705,36 @@ const Scout9ApiAxiosParamCreator = function (configuration) {
|
|
|
1675
1705
|
options: localVarRequestOptions,
|
|
1676
1706
|
};
|
|
1677
1707
|
},
|
|
1708
|
+
/**
|
|
1709
|
+
*
|
|
1710
|
+
* @summary Natural language prompt to resolve to a boolean value.
|
|
1711
|
+
* @param {DidRequest} didRequest
|
|
1712
|
+
* @param {*} [options] Override http request option.
|
|
1713
|
+
* @throws {RequiredError}
|
|
1714
|
+
*/
|
|
1715
|
+
did: async (didRequest, options = {}) => {
|
|
1716
|
+
// verify required parameter 'didRequest' is not null or undefined
|
|
1717
|
+
(0, common_1.assertParamExists)('did', 'didRequest', didRequest);
|
|
1718
|
+
const localVarPath = `/v1-utils-macros-did`;
|
|
1719
|
+
// use dummy base URL string because the URL constructor only accepts absolute URLs.
|
|
1720
|
+
const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
|
|
1721
|
+
let baseOptions;
|
|
1722
|
+
if (configuration) {
|
|
1723
|
+
baseOptions = configuration.baseOptions;
|
|
1724
|
+
}
|
|
1725
|
+
const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options };
|
|
1726
|
+
const localVarHeaderParameter = {};
|
|
1727
|
+
const localVarQueryParameter = {};
|
|
1728
|
+
localVarHeaderParameter['Content-Type'] = 'application/json';
|
|
1729
|
+
(0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
|
|
1730
|
+
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
1731
|
+
localVarRequestOptions.headers = { ...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers };
|
|
1732
|
+
localVarRequestOptions.data = (0, common_1.serializeDataIfNeeded)(didRequest, localVarRequestOptions, configuration);
|
|
1733
|
+
return {
|
|
1734
|
+
url: (0, common_1.toPathString)(localVarUrlObj),
|
|
1735
|
+
options: localVarRequestOptions,
|
|
1736
|
+
};
|
|
1737
|
+
},
|
|
1678
1738
|
/**
|
|
1679
1739
|
*
|
|
1680
1740
|
* @summary Get an entity by type and ID
|
|
@@ -2426,6 +2486,17 @@ const Scout9ApiFp = function (configuration) {
|
|
|
2426
2486
|
const localVarAxiosArgs = await localVarAxiosParamCreator.agentsUpdate(updateAgentsRequest, options);
|
|
2427
2487
|
return (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration);
|
|
2428
2488
|
},
|
|
2489
|
+
/**
|
|
2490
|
+
*
|
|
2491
|
+
* @summary Natural language prompt to resolve a context value derived from the conversation.
|
|
2492
|
+
* @param {CaptureContextRequest} captureContextRequest
|
|
2493
|
+
* @param {*} [options] Override http request option.
|
|
2494
|
+
* @throws {RequiredError}
|
|
2495
|
+
*/
|
|
2496
|
+
async captureContext(captureContextRequest, options) {
|
|
2497
|
+
const localVarAxiosArgs = await localVarAxiosParamCreator.captureContext(captureContextRequest, options);
|
|
2498
|
+
return (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration);
|
|
2499
|
+
},
|
|
2429
2500
|
/**
|
|
2430
2501
|
*
|
|
2431
2502
|
* @summary Get the current project configuration
|
|
@@ -2834,6 +2905,17 @@ const Scout9ApiFp = function (configuration) {
|
|
|
2834
2905
|
const localVarAxiosArgs = await localVarAxiosParamCreator.deleteEntity(type, id, options);
|
|
2835
2906
|
return (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration);
|
|
2836
2907
|
},
|
|
2908
|
+
/**
|
|
2909
|
+
*
|
|
2910
|
+
* @summary Natural language prompt to resolve to a boolean value.
|
|
2911
|
+
* @param {DidRequest} didRequest
|
|
2912
|
+
* @param {*} [options] Override http request option.
|
|
2913
|
+
* @throws {RequiredError}
|
|
2914
|
+
*/
|
|
2915
|
+
async did(didRequest, options) {
|
|
2916
|
+
const localVarAxiosArgs = await localVarAxiosParamCreator.did(didRequest, options);
|
|
2917
|
+
return (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration);
|
|
2918
|
+
},
|
|
2837
2919
|
/**
|
|
2838
2920
|
*
|
|
2839
2921
|
* @summary Get an entity by type and ID
|
|
@@ -3162,6 +3244,16 @@ const Scout9ApiFactory = function (configuration, basePath, axios) {
|
|
|
3162
3244
|
agentsUpdate(updateAgentsRequest, options) {
|
|
3163
3245
|
return localVarFp.agentsUpdate(updateAgentsRequest, options).then((request) => request(axios, basePath));
|
|
3164
3246
|
},
|
|
3247
|
+
/**
|
|
3248
|
+
*
|
|
3249
|
+
* @summary Natural language prompt to resolve a context value derived from the conversation.
|
|
3250
|
+
* @param {CaptureContextRequest} captureContextRequest
|
|
3251
|
+
* @param {*} [options] Override http request option.
|
|
3252
|
+
* @throws {RequiredError}
|
|
3253
|
+
*/
|
|
3254
|
+
captureContext(captureContextRequest, options) {
|
|
3255
|
+
return localVarFp.captureContext(captureContextRequest, options).then((request) => request(axios, basePath));
|
|
3256
|
+
},
|
|
3165
3257
|
/**
|
|
3166
3258
|
*
|
|
3167
3259
|
* @summary Get the current project configuration
|
|
@@ -3534,6 +3626,16 @@ const Scout9ApiFactory = function (configuration, basePath, axios) {
|
|
|
3534
3626
|
deleteEntity(type, id, options) {
|
|
3535
3627
|
return localVarFp.deleteEntity(type, id, options).then((request) => request(axios, basePath));
|
|
3536
3628
|
},
|
|
3629
|
+
/**
|
|
3630
|
+
*
|
|
3631
|
+
* @summary Natural language prompt to resolve to a boolean value.
|
|
3632
|
+
* @param {DidRequest} didRequest
|
|
3633
|
+
* @param {*} [options] Override http request option.
|
|
3634
|
+
* @throws {RequiredError}
|
|
3635
|
+
*/
|
|
3636
|
+
did(didRequest, options) {
|
|
3637
|
+
return localVarFp.did(didRequest, options).then((request) => request(axios, basePath));
|
|
3638
|
+
},
|
|
3537
3639
|
/**
|
|
3538
3640
|
*
|
|
3539
3641
|
* @summary Get an entity by type and ID
|
|
@@ -3852,6 +3954,17 @@ class Scout9ApiGenerated extends base_1.BaseAPI {
|
|
|
3852
3954
|
agentsUpdate(updateAgentsRequest, options) {
|
|
3853
3955
|
return (0, exports.Scout9ApiFp)(this.configuration).agentsUpdate(updateAgentsRequest, options).then((request) => request(this.axios, this.basePath));
|
|
3854
3956
|
}
|
|
3957
|
+
/**
|
|
3958
|
+
*
|
|
3959
|
+
* @summary Natural language prompt to resolve a context value derived from the conversation.
|
|
3960
|
+
* @param {CaptureContextRequest} captureContextRequest
|
|
3961
|
+
* @param {*} [options] Override http request option.
|
|
3962
|
+
* @throws {RequiredError}
|
|
3963
|
+
* @memberof Scout9Api
|
|
3964
|
+
*/
|
|
3965
|
+
captureContext(captureContextRequest, options) {
|
|
3966
|
+
return (0, exports.Scout9ApiFp)(this.configuration).captureContext(captureContextRequest, options).then((request) => request(this.axios, this.basePath));
|
|
3967
|
+
}
|
|
3855
3968
|
/**
|
|
3856
3969
|
*
|
|
3857
3970
|
* @summary Get the current project configuration
|
|
@@ -4260,6 +4373,17 @@ class Scout9ApiGenerated extends base_1.BaseAPI {
|
|
|
4260
4373
|
deleteEntity(type, id, options) {
|
|
4261
4374
|
return (0, exports.Scout9ApiFp)(this.configuration).deleteEntity(type, id, options).then((request) => request(this.axios, this.basePath));
|
|
4262
4375
|
}
|
|
4376
|
+
/**
|
|
4377
|
+
*
|
|
4378
|
+
* @summary Natural language prompt to resolve to a boolean value.
|
|
4379
|
+
* @param {DidRequest} didRequest
|
|
4380
|
+
* @param {*} [options] Override http request option.
|
|
4381
|
+
* @throws {RequiredError}
|
|
4382
|
+
* @memberof Scout9Api
|
|
4383
|
+
*/
|
|
4384
|
+
did(didRequest, options) {
|
|
4385
|
+
return (0, exports.Scout9ApiFp)(this.configuration).did(didRequest, options).then((request) => request(this.axios, this.basePath));
|
|
4386
|
+
}
|
|
4263
4387
|
/**
|
|
4264
4388
|
*
|
|
4265
4389
|
* @summary Get an entity by type and ID
|
|
@@ -0,0 +1,157 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/* tslint:disable */
|
|
3
|
+
/* eslint-disable */
|
|
4
|
+
/**
|
|
5
|
+
* Scout9 API
|
|
6
|
+
* APIs for managing Scout9 users and conversations
|
|
7
|
+
*
|
|
8
|
+
* The version of the OpenAPI document: 1.0.0
|
|
9
|
+
*
|
|
10
|
+
*
|
|
11
|
+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
12
|
+
* https://openapi-generator.tech
|
|
13
|
+
* Do not edit the class manually.
|
|
14
|
+
*/
|
|
15
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
16
|
+
if (k2 === undefined) k2 = k;
|
|
17
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
18
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
19
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
20
|
+
}
|
|
21
|
+
Object.defineProperty(o, k2, desc);
|
|
22
|
+
}) : (function(o, m, k, k2) {
|
|
23
|
+
if (k2 === undefined) k2 = k;
|
|
24
|
+
o[k2] = m[k];
|
|
25
|
+
}));
|
|
26
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
27
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
28
|
+
}) : function(o, v) {
|
|
29
|
+
o["default"] = v;
|
|
30
|
+
});
|
|
31
|
+
var __importStar = (this && this.__importStar) || function (mod) {
|
|
32
|
+
if (mod && mod.__esModule) return mod;
|
|
33
|
+
var result = {};
|
|
34
|
+
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
|
35
|
+
__setModuleDefault(result, mod);
|
|
36
|
+
return result;
|
|
37
|
+
};
|
|
38
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
39
|
+
exports.Configuration = void 0;
|
|
40
|
+
function loadPackageJson() {
|
|
41
|
+
if (typeof require !== 'undefined') {
|
|
42
|
+
// CommonJS environment
|
|
43
|
+
return require('../package.json');
|
|
44
|
+
}
|
|
45
|
+
else {
|
|
46
|
+
// ES Module environment
|
|
47
|
+
// @ts-ignore - TypeScript will not like this but it's necessary for synchronous import
|
|
48
|
+
return import.meta.require ? import.meta.require('../package.json') : undefined;
|
|
49
|
+
}
|
|
50
|
+
}
|
|
51
|
+
const packageJson = loadPackageJson();
|
|
52
|
+
class Configuration {
|
|
53
|
+
/**
|
|
54
|
+
* parameter for apiKey security
|
|
55
|
+
* @param name security name
|
|
56
|
+
* @memberof Configuration
|
|
57
|
+
*/
|
|
58
|
+
apiKey;
|
|
59
|
+
/**
|
|
60
|
+
* Scout9 business id
|
|
61
|
+
*
|
|
62
|
+
* @type {string}
|
|
63
|
+
* @memberof Configuration
|
|
64
|
+
*/
|
|
65
|
+
business;
|
|
66
|
+
/**
|
|
67
|
+
* parameter for basic security
|
|
68
|
+
*
|
|
69
|
+
* @type {string}
|
|
70
|
+
* @memberof Configuration
|
|
71
|
+
*/
|
|
72
|
+
username;
|
|
73
|
+
/**
|
|
74
|
+
* parameter for basic security
|
|
75
|
+
*
|
|
76
|
+
* @type {string}
|
|
77
|
+
* @memberof Configuration
|
|
78
|
+
*/
|
|
79
|
+
password;
|
|
80
|
+
/**
|
|
81
|
+
* parameter for oauth2 security
|
|
82
|
+
* @param name security name
|
|
83
|
+
* @param scopes oauth2 scope
|
|
84
|
+
* @memberof Configuration
|
|
85
|
+
*/
|
|
86
|
+
accessToken;
|
|
87
|
+
/**
|
|
88
|
+
* override base path
|
|
89
|
+
*
|
|
90
|
+
* @type {string}
|
|
91
|
+
* @memberof Configuration
|
|
92
|
+
*/
|
|
93
|
+
basePath;
|
|
94
|
+
/**
|
|
95
|
+
* base options for axios calls
|
|
96
|
+
*
|
|
97
|
+
* @type {any}
|
|
98
|
+
* @memberof Configuration
|
|
99
|
+
*/
|
|
100
|
+
baseOptions;
|
|
101
|
+
/**
|
|
102
|
+
* The FormData constructor that will be used to create multipart form data
|
|
103
|
+
* requests. You can inject this here so that execution environments that
|
|
104
|
+
* do not support the FormData class can still run the generated client.
|
|
105
|
+
*
|
|
106
|
+
* @type {new () => FormData}
|
|
107
|
+
*/
|
|
108
|
+
formDataCtor;
|
|
109
|
+
constructor(param = {}) {
|
|
110
|
+
this.apiKey = param.apiKey;
|
|
111
|
+
this.business = param.business;
|
|
112
|
+
this.username = param.username;
|
|
113
|
+
this.password = param.password;
|
|
114
|
+
this.accessToken = param.accessToken;
|
|
115
|
+
this.basePath = param.basePath;
|
|
116
|
+
this.baseOptions = param.baseOptions;
|
|
117
|
+
this.formDataCtor = param.formDataCtor;
|
|
118
|
+
if (!this.baseOptions) {
|
|
119
|
+
this.baseOptions = {};
|
|
120
|
+
}
|
|
121
|
+
this.baseOptions.headers = {
|
|
122
|
+
'User-Agent': `Scout9/NodeJS/${packageJson.version}`,
|
|
123
|
+
'Authorization': `Bearer ${this.apiKey}`,
|
|
124
|
+
...this.baseOptions.headers,
|
|
125
|
+
};
|
|
126
|
+
if (this.business) {
|
|
127
|
+
this.baseOptions.headers['Scout9-Business'] = this.business;
|
|
128
|
+
}
|
|
129
|
+
if (!this.formDataCtor) {
|
|
130
|
+
if (typeof require !== 'undefined') {
|
|
131
|
+
// CommonJS environment
|
|
132
|
+
this.formDataCtor = require('form-data');
|
|
133
|
+
}
|
|
134
|
+
else {
|
|
135
|
+
// ES Module environment
|
|
136
|
+
Promise.resolve().then(() => __importStar(require('form-data'))).then((formDataModule) => {
|
|
137
|
+
this.formDataCtor = formDataModule.default;
|
|
138
|
+
});
|
|
139
|
+
}
|
|
140
|
+
}
|
|
141
|
+
}
|
|
142
|
+
/**
|
|
143
|
+
* Check if the given MIME is a JSON MIME.
|
|
144
|
+
* JSON MIME examples:
|
|
145
|
+
* application/json
|
|
146
|
+
* application/json; charset=UTF8
|
|
147
|
+
* APPLICATION/JSON
|
|
148
|
+
* application/vnd.company+json
|
|
149
|
+
* @param mime - MIME (Multipurpose Internet Mail Extensions)
|
|
150
|
+
* @return True if the given MIME is JSON, false otherwise.
|
|
151
|
+
*/
|
|
152
|
+
isJsonMime(mime) {
|
|
153
|
+
const jsonMime = new RegExp('^(application\/json|[^;/ \t]+\/[^;/ \t]+[+]json)[ \t]*(;.*)?$', 'i');
|
|
154
|
+
return mime !== null && (jsonMime.test(mime) || mime.toLowerCase() === 'application/json-patch+json');
|
|
155
|
+
}
|
|
156
|
+
}
|
|
157
|
+
exports.Configuration = Configuration;
|