@salesforce/lds-adapters-industries-nlpservice 1.114.3 → 1.213.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/dist/es/es2018/industries-nlpservice.js +553 -0
- package/dist/es/es2018/types/src/generated/adapters/adapter-utils.d.ts +62 -0
- package/dist/es/es2018/types/src/generated/adapters/createAINaturalLangProcessResult.d.ts +16 -0
- package/dist/es/es2018/types/src/generated/adapters/getAINaturalLangProcessResultsBySourceId.d.ts +28 -0
- package/dist/es/es2018/types/src/generated/artifacts/main.d.ts +2 -0
- package/dist/es/es2018/types/src/generated/artifacts/sfdc.d.ts +4 -0
- package/dist/es/es2018/types/src/generated/resources/getConnectNlpServiceAiNaturalLangProcessResultsSourceRecordsBySourceRecordId.d.ts +18 -0
- package/dist/es/es2018/types/src/generated/resources/postConnectNlpServiceAiNaturalLangProcessResults.d.ts +13 -0
- package/dist/es/es2018/types/src/generated/types/AINaturalLangProcessResultCollectionRepresentation.d.ts +30 -0
- package/dist/es/es2018/types/src/generated/types/AINaturalLangProcessResultInputRepresentation.d.ts +31 -0
- package/dist/es/es2018/types/src/generated/types/AINaturalLangProcessResultInputWrapperRepresentation.d.ts +28 -0
- package/dist/es/es2018/types/src/generated/types/AINaturalLangProcessResultRepresentation.d.ts +53 -0
- package/dist/es/es2018/types/src/generated/types/ClauseStructRepresentation.d.ts +31 -0
- package/dist/es/es2018/types/src/generated/types/EntityStructRepresentation.d.ts +31 -0
- package/dist/es/es2018/types/src/generated/types/OpenAIClauseRepresentation.d.ts +32 -0
- package/dist/es/es2018/types/src/generated/types/OpenAIEntityRepresentation.d.ts +32 -0
- package/dist/es/es2018/types/src/generated/types/type-utils.d.ts +32 -0
- package/package.json +1 -1
- package/sfdc/index.d.ts +1 -0
- package/sfdc/index.js +591 -0
- package/src/raml/luvio.raml +1 -1
|
@@ -0,0 +1,553 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Copyright (c) 2022, Salesforce, Inc.,
|
|
3
|
+
* All rights reserved.
|
|
4
|
+
* For full license text, see the LICENSE.txt file
|
|
5
|
+
*/
|
|
6
|
+
|
|
7
|
+
import { serializeStructuredKey, ingestShape, deepFreeze, StoreKeyMap, buildNetworkSnapshotCachePolicy as buildNetworkSnapshotCachePolicy$1, typeCheckScalars, typeCheckArrayOfScalars } from '@luvio/engine';
|
|
8
|
+
|
|
9
|
+
const { hasOwnProperty: ObjectPrototypeHasOwnProperty } = Object.prototype;
|
|
10
|
+
const { keys: ObjectKeys, create: ObjectCreate } = Object;
|
|
11
|
+
const { isArray: ArrayIsArray$1 } = Array;
|
|
12
|
+
/**
|
|
13
|
+
* Validates an adapter config is well-formed.
|
|
14
|
+
* @param config The config to validate.
|
|
15
|
+
* @param adapter The adapter validation configuration.
|
|
16
|
+
* @param oneOf The keys the config must contain at least one of.
|
|
17
|
+
* @throws A TypeError if config doesn't satisfy the adapter's config validation.
|
|
18
|
+
*/
|
|
19
|
+
function validateConfig(config, adapter, oneOf) {
|
|
20
|
+
const { displayName } = adapter;
|
|
21
|
+
const { required, optional, unsupported } = adapter.parameters;
|
|
22
|
+
if (config === undefined ||
|
|
23
|
+
required.every(req => ObjectPrototypeHasOwnProperty.call(config, req)) === false) {
|
|
24
|
+
throw new TypeError(`adapter ${displayName} configuration must specify ${required.sort().join(', ')}`);
|
|
25
|
+
}
|
|
26
|
+
if (oneOf && oneOf.some(req => ObjectPrototypeHasOwnProperty.call(config, req)) === false) {
|
|
27
|
+
throw new TypeError(`adapter ${displayName} configuration must specify one of ${oneOf.sort().join(', ')}`);
|
|
28
|
+
}
|
|
29
|
+
if (unsupported !== undefined &&
|
|
30
|
+
unsupported.some(req => ObjectPrototypeHasOwnProperty.call(config, req))) {
|
|
31
|
+
throw new TypeError(`adapter ${displayName} does not yet support ${unsupported.sort().join(', ')}`);
|
|
32
|
+
}
|
|
33
|
+
const supported = required.concat(optional);
|
|
34
|
+
if (ObjectKeys(config).some(key => !supported.includes(key))) {
|
|
35
|
+
throw new TypeError(`adapter ${displayName} configuration supports only ${supported.sort().join(', ')}`);
|
|
36
|
+
}
|
|
37
|
+
}
|
|
38
|
+
function untrustedIsObject(untrusted) {
|
|
39
|
+
return typeof untrusted === 'object' && untrusted !== null && ArrayIsArray$1(untrusted) === false;
|
|
40
|
+
}
|
|
41
|
+
function areRequiredParametersPresent(config, configPropertyNames) {
|
|
42
|
+
return configPropertyNames.parameters.required.every(req => req in config);
|
|
43
|
+
}
|
|
44
|
+
const snapshotRefreshOptions = {
|
|
45
|
+
overrides: {
|
|
46
|
+
headers: {
|
|
47
|
+
'Cache-Control': 'no-cache',
|
|
48
|
+
},
|
|
49
|
+
}
|
|
50
|
+
};
|
|
51
|
+
function generateParamConfigMetadata(name, required, coerceFn) {
|
|
52
|
+
return {
|
|
53
|
+
name,
|
|
54
|
+
required,
|
|
55
|
+
coerceFn,
|
|
56
|
+
};
|
|
57
|
+
}
|
|
58
|
+
function buildAdapterValidationConfig(displayName, paramsMeta) {
|
|
59
|
+
const required = paramsMeta.filter(p => p.required).map(p => p.name);
|
|
60
|
+
const optional = paramsMeta.filter(p => !p.required).map(p => p.name);
|
|
61
|
+
return {
|
|
62
|
+
displayName,
|
|
63
|
+
parameters: {
|
|
64
|
+
required,
|
|
65
|
+
optional,
|
|
66
|
+
}
|
|
67
|
+
};
|
|
68
|
+
}
|
|
69
|
+
const keyPrefix = 'NlpService';
|
|
70
|
+
|
|
71
|
+
const { isArray: ArrayIsArray } = Array;
|
|
72
|
+
const { stringify: JSONStringify } = JSON;
|
|
73
|
+
function createLink(ref) {
|
|
74
|
+
return {
|
|
75
|
+
__ref: serializeStructuredKey(ref),
|
|
76
|
+
};
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
function validate$2(obj, path = 'AINaturalLangProcessResultInputRepresentation') {
|
|
80
|
+
const v_error = (() => {
|
|
81
|
+
if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
|
|
82
|
+
return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
|
|
83
|
+
}
|
|
84
|
+
if (obj.query !== undefined) {
|
|
85
|
+
const obj_query = obj.query;
|
|
86
|
+
const path_query = path + '.query';
|
|
87
|
+
if (typeof obj_query !== 'string') {
|
|
88
|
+
return new TypeError('Expected "string" but received "' + typeof obj_query + '" (at "' + path_query + '")');
|
|
89
|
+
}
|
|
90
|
+
}
|
|
91
|
+
if (obj.serviceType !== undefined) {
|
|
92
|
+
const obj_serviceType = obj.serviceType;
|
|
93
|
+
const path_serviceType = path + '.serviceType';
|
|
94
|
+
if (typeof obj_serviceType !== 'string') {
|
|
95
|
+
return new TypeError('Expected "string" but received "' + typeof obj_serviceType + '" (at "' + path_serviceType + '")');
|
|
96
|
+
}
|
|
97
|
+
}
|
|
98
|
+
})();
|
|
99
|
+
return v_error === undefined ? null : v_error;
|
|
100
|
+
}
|
|
101
|
+
|
|
102
|
+
const TTL$1 = 1000;
|
|
103
|
+
const VERSION$1 = "2588d46ecc09bbd11e602c573b642037";
|
|
104
|
+
function validate$1(obj, path = 'AINaturalLangProcessResultRepresentation') {
|
|
105
|
+
const v_error = (() => {
|
|
106
|
+
if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
|
|
107
|
+
return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
|
|
108
|
+
}
|
|
109
|
+
const obj_id = obj.id;
|
|
110
|
+
const path_id = path + '.id';
|
|
111
|
+
if (typeof obj_id !== 'string') {
|
|
112
|
+
return new TypeError('Expected "string" but received "' + typeof obj_id + '" (at "' + path_id + '")');
|
|
113
|
+
}
|
|
114
|
+
const obj_requestText = obj.requestText;
|
|
115
|
+
const path_requestText = path + '.requestText';
|
|
116
|
+
let obj_requestText_union0 = null;
|
|
117
|
+
const obj_requestText_union0_error = (() => {
|
|
118
|
+
if (typeof obj_requestText !== 'string') {
|
|
119
|
+
return new TypeError('Expected "string" but received "' + typeof obj_requestText + '" (at "' + path_requestText + '")');
|
|
120
|
+
}
|
|
121
|
+
})();
|
|
122
|
+
if (obj_requestText_union0_error != null) {
|
|
123
|
+
obj_requestText_union0 = obj_requestText_union0_error.message;
|
|
124
|
+
}
|
|
125
|
+
let obj_requestText_union1 = null;
|
|
126
|
+
const obj_requestText_union1_error = (() => {
|
|
127
|
+
if (obj_requestText !== null) {
|
|
128
|
+
return new TypeError('Expected "null" but received "' + typeof obj_requestText + '" (at "' + path_requestText + '")');
|
|
129
|
+
}
|
|
130
|
+
})();
|
|
131
|
+
if (obj_requestText_union1_error != null) {
|
|
132
|
+
obj_requestText_union1 = obj_requestText_union1_error.message;
|
|
133
|
+
}
|
|
134
|
+
if (obj_requestText_union0 && obj_requestText_union1) {
|
|
135
|
+
let message = 'Object doesn\'t match union (at "' + path_requestText + '")';
|
|
136
|
+
message += '\n' + obj_requestText_union0.split('\n').map((line) => '\t' + line).join('\n');
|
|
137
|
+
message += '\n' + obj_requestText_union1.split('\n').map((line) => '\t' + line).join('\n');
|
|
138
|
+
return new TypeError(message);
|
|
139
|
+
}
|
|
140
|
+
const obj_response = obj.response;
|
|
141
|
+
const path_response = path + '.response';
|
|
142
|
+
if (typeof obj_response !== 'object' || ArrayIsArray(obj_response) || obj_response === null) {
|
|
143
|
+
return new TypeError('Expected "object" but received "' + typeof obj_response + '" (at "' + path_response + '")');
|
|
144
|
+
}
|
|
145
|
+
const obj_serviceType = obj.serviceType;
|
|
146
|
+
const path_serviceType = path + '.serviceType';
|
|
147
|
+
if (typeof obj_serviceType !== 'string') {
|
|
148
|
+
return new TypeError('Expected "string" but received "' + typeof obj_serviceType + '" (at "' + path_serviceType + '")');
|
|
149
|
+
}
|
|
150
|
+
const obj_sourceRecord = obj.sourceRecord;
|
|
151
|
+
const path_sourceRecord = path + '.sourceRecord';
|
|
152
|
+
let obj_sourceRecord_union0 = null;
|
|
153
|
+
const obj_sourceRecord_union0_error = (() => {
|
|
154
|
+
if (typeof obj_sourceRecord !== 'string') {
|
|
155
|
+
return new TypeError('Expected "string" but received "' + typeof obj_sourceRecord + '" (at "' + path_sourceRecord + '")');
|
|
156
|
+
}
|
|
157
|
+
})();
|
|
158
|
+
if (obj_sourceRecord_union0_error != null) {
|
|
159
|
+
obj_sourceRecord_union0 = obj_sourceRecord_union0_error.message;
|
|
160
|
+
}
|
|
161
|
+
let obj_sourceRecord_union1 = null;
|
|
162
|
+
const obj_sourceRecord_union1_error = (() => {
|
|
163
|
+
if (obj_sourceRecord !== null) {
|
|
164
|
+
return new TypeError('Expected "null" but received "' + typeof obj_sourceRecord + '" (at "' + path_sourceRecord + '")');
|
|
165
|
+
}
|
|
166
|
+
})();
|
|
167
|
+
if (obj_sourceRecord_union1_error != null) {
|
|
168
|
+
obj_sourceRecord_union1 = obj_sourceRecord_union1_error.message;
|
|
169
|
+
}
|
|
170
|
+
if (obj_sourceRecord_union0 && obj_sourceRecord_union1) {
|
|
171
|
+
let message = 'Object doesn\'t match union (at "' + path_sourceRecord + '")';
|
|
172
|
+
message += '\n' + obj_sourceRecord_union0.split('\n').map((line) => '\t' + line).join('\n');
|
|
173
|
+
message += '\n' + obj_sourceRecord_union1.split('\n').map((line) => '\t' + line).join('\n');
|
|
174
|
+
return new TypeError(message);
|
|
175
|
+
}
|
|
176
|
+
const obj_status = obj.status;
|
|
177
|
+
const path_status = path + '.status';
|
|
178
|
+
if (typeof obj_status !== 'string') {
|
|
179
|
+
return new TypeError('Expected "string" but received "' + typeof obj_status + '" (at "' + path_status + '")');
|
|
180
|
+
}
|
|
181
|
+
})();
|
|
182
|
+
return v_error === undefined ? null : v_error;
|
|
183
|
+
}
|
|
184
|
+
const RepresentationType$1 = 'AINaturalLangProcessResultRepresentation';
|
|
185
|
+
function keyBuilder$2(luvio, config) {
|
|
186
|
+
return keyPrefix + '::' + RepresentationType$1 + ':' + config.serviceType;
|
|
187
|
+
}
|
|
188
|
+
function keyBuilderFromType(luvio, object) {
|
|
189
|
+
const keyParams = {
|
|
190
|
+
serviceType: object.serviceType
|
|
191
|
+
};
|
|
192
|
+
return keyBuilder$2(luvio, keyParams);
|
|
193
|
+
}
|
|
194
|
+
function normalize$1(input, existing, path, luvio, store, timestamp) {
|
|
195
|
+
return input;
|
|
196
|
+
}
|
|
197
|
+
const select$3 = function AINaturalLangProcessResultRepresentationSelect() {
|
|
198
|
+
return {
|
|
199
|
+
kind: 'Fragment',
|
|
200
|
+
version: VERSION$1,
|
|
201
|
+
private: [],
|
|
202
|
+
opaque: true
|
|
203
|
+
};
|
|
204
|
+
};
|
|
205
|
+
function equals$1(existing, incoming) {
|
|
206
|
+
if (JSONStringify(incoming) !== JSONStringify(existing)) {
|
|
207
|
+
return false;
|
|
208
|
+
}
|
|
209
|
+
return true;
|
|
210
|
+
}
|
|
211
|
+
const ingest$1 = function AINaturalLangProcessResultRepresentationIngest(input, path, luvio, store, timestamp) {
|
|
212
|
+
if (process.env.NODE_ENV !== 'production') {
|
|
213
|
+
const validateError = validate$1(input);
|
|
214
|
+
if (validateError !== null) {
|
|
215
|
+
throw validateError;
|
|
216
|
+
}
|
|
217
|
+
}
|
|
218
|
+
const key = keyBuilderFromType(luvio, input);
|
|
219
|
+
const ttlToUse = TTL$1;
|
|
220
|
+
ingestShape(input, path, luvio, store, timestamp, ttlToUse, key, normalize$1, "NlpService", VERSION$1, RepresentationType$1, equals$1);
|
|
221
|
+
return createLink(key);
|
|
222
|
+
};
|
|
223
|
+
function getTypeCacheKeys$1(rootKeySet, luvio, input, fullPathFactory) {
|
|
224
|
+
// root cache key (uses fullPathFactory if keyBuilderFromType isn't defined)
|
|
225
|
+
const rootKey = keyBuilderFromType(luvio, input);
|
|
226
|
+
rootKeySet.set(rootKey, {
|
|
227
|
+
namespace: keyPrefix,
|
|
228
|
+
representationName: RepresentationType$1,
|
|
229
|
+
mergeable: false
|
|
230
|
+
});
|
|
231
|
+
}
|
|
232
|
+
|
|
233
|
+
function select$2(luvio, params) {
|
|
234
|
+
return select$3();
|
|
235
|
+
}
|
|
236
|
+
function getResponseCacheKeys$1(storeKeyMap, luvio, resourceParams, response) {
|
|
237
|
+
getTypeCacheKeys$1(storeKeyMap, luvio, response);
|
|
238
|
+
}
|
|
239
|
+
function ingestSuccess$1(luvio, resourceParams, response) {
|
|
240
|
+
const { body } = response;
|
|
241
|
+
const key = keyBuilderFromType(luvio, body);
|
|
242
|
+
luvio.storeIngest(key, ingest$1, body);
|
|
243
|
+
const snapshot = luvio.storeLookup({
|
|
244
|
+
recordId: key,
|
|
245
|
+
node: select$2(),
|
|
246
|
+
variables: {},
|
|
247
|
+
});
|
|
248
|
+
if (process.env.NODE_ENV !== 'production') {
|
|
249
|
+
if (snapshot.state !== 'Fulfilled') {
|
|
250
|
+
throw new Error('Invalid network response. Expected resource response to result in Fulfilled snapshot');
|
|
251
|
+
}
|
|
252
|
+
}
|
|
253
|
+
deepFreeze(snapshot.data);
|
|
254
|
+
return snapshot;
|
|
255
|
+
}
|
|
256
|
+
function createResourceRequest$1(config) {
|
|
257
|
+
const headers = {};
|
|
258
|
+
return {
|
|
259
|
+
baseUri: '/services/data/v59.0',
|
|
260
|
+
basePath: '/connect/nlp-service/aiNaturalLangProcessResults',
|
|
261
|
+
method: 'post',
|
|
262
|
+
body: config.body,
|
|
263
|
+
urlParams: {},
|
|
264
|
+
queryParams: {},
|
|
265
|
+
headers,
|
|
266
|
+
priority: 'normal',
|
|
267
|
+
};
|
|
268
|
+
}
|
|
269
|
+
|
|
270
|
+
const adapterName$1 = 'createAINaturalLangProcessResult';
|
|
271
|
+
const createAINaturalLangProcessResult_ConfigPropertyMetadata = [
|
|
272
|
+
generateParamConfigMetadata('aiNaturalLangProcessResultInputParam', true),
|
|
273
|
+
];
|
|
274
|
+
const createAINaturalLangProcessResult_ConfigPropertyNames = /*#__PURE__*/ buildAdapterValidationConfig(adapterName$1, createAINaturalLangProcessResult_ConfigPropertyMetadata);
|
|
275
|
+
function createResourceParams$1(config) {
|
|
276
|
+
const resourceParams = {
|
|
277
|
+
body: {
|
|
278
|
+
aiNaturalLangProcessResultInputParam: config.aiNaturalLangProcessResultInputParam
|
|
279
|
+
}
|
|
280
|
+
};
|
|
281
|
+
return resourceParams;
|
|
282
|
+
}
|
|
283
|
+
function typeCheckConfig$1(untrustedConfig) {
|
|
284
|
+
const config = {};
|
|
285
|
+
const untrustedConfig_aiNaturalLangProcessResultInputParam = untrustedConfig.aiNaturalLangProcessResultInputParam;
|
|
286
|
+
const referenceAINaturalLangProcessResultInputRepresentationValidationError = validate$2(untrustedConfig_aiNaturalLangProcessResultInputParam);
|
|
287
|
+
if (referenceAINaturalLangProcessResultInputRepresentationValidationError === null) {
|
|
288
|
+
config.aiNaturalLangProcessResultInputParam = untrustedConfig_aiNaturalLangProcessResultInputParam;
|
|
289
|
+
}
|
|
290
|
+
return config;
|
|
291
|
+
}
|
|
292
|
+
function validateAdapterConfig$1(untrustedConfig, configPropertyNames) {
|
|
293
|
+
if (!untrustedIsObject(untrustedConfig)) {
|
|
294
|
+
return null;
|
|
295
|
+
}
|
|
296
|
+
if (process.env.NODE_ENV !== 'production') {
|
|
297
|
+
validateConfig(untrustedConfig, configPropertyNames);
|
|
298
|
+
}
|
|
299
|
+
const config = typeCheckConfig$1(untrustedConfig);
|
|
300
|
+
if (!areRequiredParametersPresent(config, configPropertyNames)) {
|
|
301
|
+
return null;
|
|
302
|
+
}
|
|
303
|
+
return config;
|
|
304
|
+
}
|
|
305
|
+
function buildNetworkSnapshot$1(luvio, config, options) {
|
|
306
|
+
const resourceParams = createResourceParams$1(config);
|
|
307
|
+
const request = createResourceRequest$1(resourceParams);
|
|
308
|
+
return luvio.dispatchResourceRequest(request, options)
|
|
309
|
+
.then((response) => {
|
|
310
|
+
return luvio.handleSuccessResponse(() => {
|
|
311
|
+
const snapshot = ingestSuccess$1(luvio, resourceParams, response);
|
|
312
|
+
return luvio.storeBroadcast().then(() => snapshot);
|
|
313
|
+
}, () => {
|
|
314
|
+
const cache = new StoreKeyMap();
|
|
315
|
+
getResponseCacheKeys$1(cache, luvio, resourceParams, response.body);
|
|
316
|
+
return cache;
|
|
317
|
+
});
|
|
318
|
+
}, (response) => {
|
|
319
|
+
deepFreeze(response);
|
|
320
|
+
throw response;
|
|
321
|
+
});
|
|
322
|
+
}
|
|
323
|
+
const createAINaturalLangProcessResultAdapterFactory = (luvio) => {
|
|
324
|
+
return function createAINaturalLangProcessResult(untrustedConfig) {
|
|
325
|
+
const config = validateAdapterConfig$1(untrustedConfig, createAINaturalLangProcessResult_ConfigPropertyNames);
|
|
326
|
+
// Invalid or incomplete config
|
|
327
|
+
if (config === null) {
|
|
328
|
+
throw new Error('Invalid config for "createAINaturalLangProcessResult"');
|
|
329
|
+
}
|
|
330
|
+
return buildNetworkSnapshot$1(luvio, config);
|
|
331
|
+
};
|
|
332
|
+
};
|
|
333
|
+
|
|
334
|
+
const TTL = 1000;
|
|
335
|
+
const VERSION = "059e32d9b0fe4cfbf1672345a49e5d3d";
|
|
336
|
+
function validate(obj, path = 'AINaturalLangProcessResultCollectionRepresentation') {
|
|
337
|
+
const v_error = (() => {
|
|
338
|
+
if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
|
|
339
|
+
return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
|
|
340
|
+
}
|
|
341
|
+
const obj_aiNaturalLangProcessResults = obj.aiNaturalLangProcessResults;
|
|
342
|
+
const path_aiNaturalLangProcessResults = path + '.aiNaturalLangProcessResults';
|
|
343
|
+
if (!ArrayIsArray(obj_aiNaturalLangProcessResults)) {
|
|
344
|
+
return new TypeError('Expected "array" but received "' + typeof obj_aiNaturalLangProcessResults + '" (at "' + path_aiNaturalLangProcessResults + '")');
|
|
345
|
+
}
|
|
346
|
+
for (let i = 0; i < obj_aiNaturalLangProcessResults.length; i++) {
|
|
347
|
+
const obj_aiNaturalLangProcessResults_item = obj_aiNaturalLangProcessResults[i];
|
|
348
|
+
const path_aiNaturalLangProcessResults_item = path_aiNaturalLangProcessResults + '[' + i + ']';
|
|
349
|
+
const referencepath_aiNaturalLangProcessResults_itemValidationError = validate$1(obj_aiNaturalLangProcessResults_item, path_aiNaturalLangProcessResults_item);
|
|
350
|
+
if (referencepath_aiNaturalLangProcessResults_itemValidationError !== null) {
|
|
351
|
+
let message = 'Object doesn\'t match AINaturalLangProcessResultRepresentation (at "' + path_aiNaturalLangProcessResults_item + '")\n';
|
|
352
|
+
message += referencepath_aiNaturalLangProcessResults_itemValidationError.message.split('\n').map((line) => '\t' + line).join('\n');
|
|
353
|
+
return new TypeError(message);
|
|
354
|
+
}
|
|
355
|
+
}
|
|
356
|
+
})();
|
|
357
|
+
return v_error === undefined ? null : v_error;
|
|
358
|
+
}
|
|
359
|
+
const RepresentationType = 'AINaturalLangProcessResultCollectionRepresentation';
|
|
360
|
+
function normalize(input, existing, path, luvio, store, timestamp) {
|
|
361
|
+
return input;
|
|
362
|
+
}
|
|
363
|
+
const select$1 = function AINaturalLangProcessResultCollectionRepresentationSelect() {
|
|
364
|
+
return {
|
|
365
|
+
kind: 'Fragment',
|
|
366
|
+
version: VERSION,
|
|
367
|
+
private: [],
|
|
368
|
+
opaque: true
|
|
369
|
+
};
|
|
370
|
+
};
|
|
371
|
+
function equals(existing, incoming) {
|
|
372
|
+
if (JSONStringify(incoming) !== JSONStringify(existing)) {
|
|
373
|
+
return false;
|
|
374
|
+
}
|
|
375
|
+
return true;
|
|
376
|
+
}
|
|
377
|
+
const ingest = function AINaturalLangProcessResultCollectionRepresentationIngest(input, path, luvio, store, timestamp) {
|
|
378
|
+
if (process.env.NODE_ENV !== 'production') {
|
|
379
|
+
const validateError = validate(input);
|
|
380
|
+
if (validateError !== null) {
|
|
381
|
+
throw validateError;
|
|
382
|
+
}
|
|
383
|
+
}
|
|
384
|
+
const key = path.fullPath;
|
|
385
|
+
const ttlToUse = TTL;
|
|
386
|
+
ingestShape(input, path, luvio, store, timestamp, ttlToUse, key, normalize, "NlpService", VERSION, RepresentationType, equals);
|
|
387
|
+
return createLink(key);
|
|
388
|
+
};
|
|
389
|
+
function getTypeCacheKeys(rootKeySet, luvio, input, fullPathFactory) {
|
|
390
|
+
// root cache key (uses fullPathFactory if keyBuilderFromType isn't defined)
|
|
391
|
+
const rootKey = fullPathFactory();
|
|
392
|
+
rootKeySet.set(rootKey, {
|
|
393
|
+
namespace: keyPrefix,
|
|
394
|
+
representationName: RepresentationType,
|
|
395
|
+
mergeable: false
|
|
396
|
+
});
|
|
397
|
+
}
|
|
398
|
+
|
|
399
|
+
function select(luvio, params) {
|
|
400
|
+
return select$1();
|
|
401
|
+
}
|
|
402
|
+
function keyBuilder$1(luvio, params) {
|
|
403
|
+
return keyPrefix + '::AINaturalLangProcessResultCollectionRepresentation:(' + 'serviceTypes:' + params.queryParams.serviceTypes + ',' + 'sourceRecordId:' + params.urlParams.sourceRecordId + ')';
|
|
404
|
+
}
|
|
405
|
+
function getResponseCacheKeys(storeKeyMap, luvio, resourceParams, response) {
|
|
406
|
+
getTypeCacheKeys(storeKeyMap, luvio, response, () => keyBuilder$1(luvio, resourceParams));
|
|
407
|
+
}
|
|
408
|
+
function ingestSuccess(luvio, resourceParams, response, snapshotRefresh) {
|
|
409
|
+
const { body } = response;
|
|
410
|
+
const key = keyBuilder$1(luvio, resourceParams);
|
|
411
|
+
luvio.storeIngest(key, ingest, body);
|
|
412
|
+
const snapshot = luvio.storeLookup({
|
|
413
|
+
recordId: key,
|
|
414
|
+
node: select(),
|
|
415
|
+
variables: {},
|
|
416
|
+
}, snapshotRefresh);
|
|
417
|
+
if (process.env.NODE_ENV !== 'production') {
|
|
418
|
+
if (snapshot.state !== 'Fulfilled') {
|
|
419
|
+
throw new Error('Invalid network response. Expected resource response to result in Fulfilled snapshot');
|
|
420
|
+
}
|
|
421
|
+
}
|
|
422
|
+
deepFreeze(snapshot.data);
|
|
423
|
+
return snapshot;
|
|
424
|
+
}
|
|
425
|
+
function ingestError(luvio, params, error, snapshotRefresh) {
|
|
426
|
+
const key = keyBuilder$1(luvio, params);
|
|
427
|
+
const errorSnapshot = luvio.errorSnapshot(error, snapshotRefresh);
|
|
428
|
+
const storeMetadataParams = {
|
|
429
|
+
ttl: TTL,
|
|
430
|
+
namespace: keyPrefix,
|
|
431
|
+
version: VERSION,
|
|
432
|
+
representationName: RepresentationType
|
|
433
|
+
};
|
|
434
|
+
luvio.storeIngestError(key, errorSnapshot, storeMetadataParams);
|
|
435
|
+
return errorSnapshot;
|
|
436
|
+
}
|
|
437
|
+
function createResourceRequest(config) {
|
|
438
|
+
const headers = {};
|
|
439
|
+
return {
|
|
440
|
+
baseUri: '/services/data/v59.0',
|
|
441
|
+
basePath: '/connect/nlp-service/aiNaturalLangProcessResults/sourceRecords/' + config.urlParams.sourceRecordId + '',
|
|
442
|
+
method: 'get',
|
|
443
|
+
body: null,
|
|
444
|
+
urlParams: config.urlParams,
|
|
445
|
+
queryParams: config.queryParams,
|
|
446
|
+
headers,
|
|
447
|
+
priority: 'normal',
|
|
448
|
+
};
|
|
449
|
+
}
|
|
450
|
+
|
|
451
|
+
const adapterName = 'getAINaturalLangProcessResultsBySourceId';
|
|
452
|
+
const getAINaturalLangProcessResultsBySourceId_ConfigPropertyMetadata = [
|
|
453
|
+
generateParamConfigMetadata('sourceRecordId', true),
|
|
454
|
+
generateParamConfigMetadata('serviceTypes', false),
|
|
455
|
+
];
|
|
456
|
+
const getAINaturalLangProcessResultsBySourceId_ConfigPropertyNames = /*#__PURE__*/ buildAdapterValidationConfig(adapterName, getAINaturalLangProcessResultsBySourceId_ConfigPropertyMetadata);
|
|
457
|
+
function createResourceParams(config) {
|
|
458
|
+
const resourceParams = {
|
|
459
|
+
urlParams: {
|
|
460
|
+
sourceRecordId: config.sourceRecordId
|
|
461
|
+
},
|
|
462
|
+
queryParams: {
|
|
463
|
+
serviceTypes: config.serviceTypes
|
|
464
|
+
}
|
|
465
|
+
};
|
|
466
|
+
return resourceParams;
|
|
467
|
+
}
|
|
468
|
+
function keyBuilder(luvio, config) {
|
|
469
|
+
const resourceParams = createResourceParams(config);
|
|
470
|
+
return keyBuilder$1(luvio, resourceParams);
|
|
471
|
+
}
|
|
472
|
+
function typeCheckConfig(untrustedConfig) {
|
|
473
|
+
const config = {};
|
|
474
|
+
typeCheckScalars(untrustedConfig, config, {
|
|
475
|
+
sourceRecordId: 0 /* String */,
|
|
476
|
+
});
|
|
477
|
+
typeCheckArrayOfScalars(untrustedConfig, config, {
|
|
478
|
+
serviceTypes: 0 /* String */,
|
|
479
|
+
});
|
|
480
|
+
return config;
|
|
481
|
+
}
|
|
482
|
+
function validateAdapterConfig(untrustedConfig, configPropertyNames) {
|
|
483
|
+
if (!untrustedIsObject(untrustedConfig)) {
|
|
484
|
+
return null;
|
|
485
|
+
}
|
|
486
|
+
if (process.env.NODE_ENV !== 'production') {
|
|
487
|
+
validateConfig(untrustedConfig, configPropertyNames);
|
|
488
|
+
}
|
|
489
|
+
const config = typeCheckConfig(untrustedConfig);
|
|
490
|
+
if (!areRequiredParametersPresent(config, configPropertyNames)) {
|
|
491
|
+
return null;
|
|
492
|
+
}
|
|
493
|
+
return config;
|
|
494
|
+
}
|
|
495
|
+
function adapterFragment(luvio, config) {
|
|
496
|
+
createResourceParams(config);
|
|
497
|
+
return select();
|
|
498
|
+
}
|
|
499
|
+
function onFetchResponseSuccess(luvio, config, resourceParams, response) {
|
|
500
|
+
const snapshot = ingestSuccess(luvio, resourceParams, response, {
|
|
501
|
+
config,
|
|
502
|
+
resolve: () => buildNetworkSnapshot(luvio, config, snapshotRefreshOptions)
|
|
503
|
+
});
|
|
504
|
+
return luvio.storeBroadcast().then(() => snapshot);
|
|
505
|
+
}
|
|
506
|
+
function onFetchResponseError(luvio, config, resourceParams, response) {
|
|
507
|
+
const snapshot = ingestError(luvio, resourceParams, response, {
|
|
508
|
+
config,
|
|
509
|
+
resolve: () => buildNetworkSnapshot(luvio, config, snapshotRefreshOptions)
|
|
510
|
+
});
|
|
511
|
+
return luvio.storeBroadcast().then(() => snapshot);
|
|
512
|
+
}
|
|
513
|
+
function buildNetworkSnapshot(luvio, config, options) {
|
|
514
|
+
const resourceParams = createResourceParams(config);
|
|
515
|
+
const request = createResourceRequest(resourceParams);
|
|
516
|
+
return luvio.dispatchResourceRequest(request, options)
|
|
517
|
+
.then((response) => {
|
|
518
|
+
return luvio.handleSuccessResponse(() => onFetchResponseSuccess(luvio, config, resourceParams, response), () => {
|
|
519
|
+
const cache = new StoreKeyMap();
|
|
520
|
+
getResponseCacheKeys(cache, luvio, resourceParams, response.body);
|
|
521
|
+
return cache;
|
|
522
|
+
});
|
|
523
|
+
}, (response) => {
|
|
524
|
+
return luvio.handleErrorResponse(() => onFetchResponseError(luvio, config, resourceParams, response));
|
|
525
|
+
});
|
|
526
|
+
}
|
|
527
|
+
function buildNetworkSnapshotCachePolicy(context, coercedAdapterRequestContext) {
|
|
528
|
+
return buildNetworkSnapshotCachePolicy$1(context, coercedAdapterRequestContext, buildNetworkSnapshot, undefined, false);
|
|
529
|
+
}
|
|
530
|
+
function buildCachedSnapshotCachePolicy(context, storeLookup) {
|
|
531
|
+
const { luvio, config } = context;
|
|
532
|
+
const selector = {
|
|
533
|
+
recordId: keyBuilder(luvio, config),
|
|
534
|
+
node: adapterFragment(luvio, config),
|
|
535
|
+
variables: {},
|
|
536
|
+
};
|
|
537
|
+
const cacheSnapshot = storeLookup(selector, {
|
|
538
|
+
config,
|
|
539
|
+
resolve: () => buildNetworkSnapshot(luvio, config, snapshotRefreshOptions)
|
|
540
|
+
});
|
|
541
|
+
return cacheSnapshot;
|
|
542
|
+
}
|
|
543
|
+
const getAINaturalLangProcessResultsBySourceIdAdapterFactory = (luvio) => function NlpService__getAINaturalLangProcessResultsBySourceId(untrustedConfig, requestContext) {
|
|
544
|
+
const config = validateAdapterConfig(untrustedConfig, getAINaturalLangProcessResultsBySourceId_ConfigPropertyNames);
|
|
545
|
+
// Invalid or incomplete config
|
|
546
|
+
if (config === null) {
|
|
547
|
+
return null;
|
|
548
|
+
}
|
|
549
|
+
return luvio.applyCachePolicy((requestContext || {}), { config, luvio }, // BuildSnapshotContext
|
|
550
|
+
buildCachedSnapshotCachePolicy, buildNetworkSnapshotCachePolicy);
|
|
551
|
+
};
|
|
552
|
+
|
|
553
|
+
export { createAINaturalLangProcessResultAdapterFactory, getAINaturalLangProcessResultsBySourceIdAdapterFactory };
|
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
import { Adapter as $64$luvio_engine_Adapter, Snapshot as $64$luvio_engine_Snapshot, UnfulfilledSnapshot as $64$luvio_engine_UnfulfilledSnapshot, AdapterConfigMetadata as $64$luvio_engine_AdapterConfigMetadata } from '@luvio/engine';
|
|
2
|
+
export declare const ObjectPrototypeHasOwnProperty: (v: PropertyKey) => boolean;
|
|
3
|
+
declare const ObjectKeys: {
|
|
4
|
+
(o: object): string[];
|
|
5
|
+
(o: {}): string[];
|
|
6
|
+
}, ObjectCreate: {
|
|
7
|
+
(o: object | null): any;
|
|
8
|
+
(o: object | null, properties: PropertyDescriptorMap & ThisType<any>): any;
|
|
9
|
+
};
|
|
10
|
+
export { ObjectCreate, ObjectKeys };
|
|
11
|
+
export declare const ArrayIsArray: (arg: any) => arg is any[];
|
|
12
|
+
export declare const ArrayPrototypePush: (...items: any[]) => number;
|
|
13
|
+
export interface AdapterValidationConfig {
|
|
14
|
+
displayName: string;
|
|
15
|
+
parameters: {
|
|
16
|
+
required: string[];
|
|
17
|
+
optional: string[];
|
|
18
|
+
unsupported?: string[];
|
|
19
|
+
};
|
|
20
|
+
}
|
|
21
|
+
/**
|
|
22
|
+
* Validates an adapter config is well-formed.
|
|
23
|
+
* @param config The config to validate.
|
|
24
|
+
* @param adapter The adapter validation configuration.
|
|
25
|
+
* @param oneOf The keys the config must contain at least one of.
|
|
26
|
+
* @throws A TypeError if config doesn't satisfy the adapter's config validation.
|
|
27
|
+
*/
|
|
28
|
+
export declare function validateConfig<T>(config: Untrusted<T>, adapter: AdapterValidationConfig, oneOf?: string[]): void;
|
|
29
|
+
export declare function untrustedIsObject<Base>(untrusted: unknown): untrusted is Untrusted<Base>;
|
|
30
|
+
export type UncoercedConfiguration<Base, Options extends {
|
|
31
|
+
[key in keyof Base]?: any;
|
|
32
|
+
}> = {
|
|
33
|
+
[Key in keyof Base]?: Base[Key] | Options[Key];
|
|
34
|
+
};
|
|
35
|
+
export type Untrusted<Base> = Partial<Base>;
|
|
36
|
+
export declare function areRequiredParametersPresent<T>(config: any, configPropertyNames: AdapterValidationConfig): config is T;
|
|
37
|
+
export declare function refreshable<C, D, R>(adapter: $64$luvio_engine_Adapter<C, D>, resolve: (config: unknown) => Promise<$64$luvio_engine_Snapshot<R>>): $64$luvio_engine_Adapter<C, D>;
|
|
38
|
+
export declare const SNAPSHOT_STATE_FULFILLED = "Fulfilled";
|
|
39
|
+
export declare const SNAPSHOT_STATE_UNFULFILLED = "Unfulfilled";
|
|
40
|
+
export declare const snapshotRefreshOptions: {
|
|
41
|
+
overrides: {
|
|
42
|
+
headers: {
|
|
43
|
+
'Cache-Control': string;
|
|
44
|
+
};
|
|
45
|
+
};
|
|
46
|
+
};
|
|
47
|
+
/**
|
|
48
|
+
* A deterministic JSON stringify implementation. Heavily adapted from https://github.com/epoberezkin/fast-json-stable-stringify.
|
|
49
|
+
* This is needed because insertion order for JSON.stringify(object) affects output:
|
|
50
|
+
* JSON.stringify({a: 1, b: 2})
|
|
51
|
+
* "{"a":1,"b":2}"
|
|
52
|
+
* JSON.stringify({b: 2, a: 1})
|
|
53
|
+
* "{"b":2,"a":1}"
|
|
54
|
+
* @param data Data to be JSON-stringified.
|
|
55
|
+
* @returns JSON.stringified value with consistent ordering of keys.
|
|
56
|
+
*/
|
|
57
|
+
export declare function stableJSONStringify(node: any): string | undefined;
|
|
58
|
+
export declare function getFetchResponseStatusText(status: number): string;
|
|
59
|
+
export declare function isUnfulfilledSnapshot<T, U>(snapshot: $64$luvio_engine_Snapshot<T, U>): snapshot is $64$luvio_engine_UnfulfilledSnapshot<T, U>;
|
|
60
|
+
export declare function generateParamConfigMetadata(name: string, required: boolean, coerceFn?: (v: unknown) => unknown): $64$luvio_engine_AdapterConfigMetadata;
|
|
61
|
+
export declare function buildAdapterValidationConfig(displayName: string, paramsMeta: $64$luvio_engine_AdapterConfigMetadata[]): AdapterValidationConfig;
|
|
62
|
+
export declare const keyPrefix = "NlpService";
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { AdapterConfigMetadata as $64$luvio_engine_AdapterConfigMetadata, Luvio as $64$luvio_engine_Luvio, DispatchResourceRequestContext as $64$luvio_engine_DispatchResourceRequestContext, AdapterFactory as $64$luvio_engine_AdapterFactory } from '@luvio/engine';
|
|
2
|
+
import { Untrusted as adapter$45$utils_Untrusted, AdapterValidationConfig as adapter$45$utils_AdapterValidationConfig } from './adapter-utils';
|
|
3
|
+
import { AINaturalLangProcessResultInputRepresentation as types_AINaturalLangProcessResultInputRepresentation_AINaturalLangProcessResultInputRepresentation } from '../types/AINaturalLangProcessResultInputRepresentation';
|
|
4
|
+
import { ResourceRequestConfig as resources_postConnectNlpServiceAiNaturalLangProcessResults_ResourceRequestConfig } from '../resources/postConnectNlpServiceAiNaturalLangProcessResults';
|
|
5
|
+
import { AINaturalLangProcessResultRepresentation as types_AINaturalLangProcessResultRepresentation_AINaturalLangProcessResultRepresentation } from '../types/AINaturalLangProcessResultRepresentation';
|
|
6
|
+
export declare const adapterName = "createAINaturalLangProcessResult";
|
|
7
|
+
export declare const createAINaturalLangProcessResult_ConfigPropertyMetadata: $64$luvio_engine_AdapterConfigMetadata[];
|
|
8
|
+
export declare const createAINaturalLangProcessResult_ConfigPropertyNames: adapter$45$utils_AdapterValidationConfig;
|
|
9
|
+
export interface CreateAINaturalLangProcessResultConfig {
|
|
10
|
+
aiNaturalLangProcessResultInputParam: types_AINaturalLangProcessResultInputRepresentation_AINaturalLangProcessResultInputRepresentation;
|
|
11
|
+
}
|
|
12
|
+
export declare function createResourceParams(config: CreateAINaturalLangProcessResultConfig): resources_postConnectNlpServiceAiNaturalLangProcessResults_ResourceRequestConfig;
|
|
13
|
+
export declare function typeCheckConfig(untrustedConfig: adapter$45$utils_Untrusted<CreateAINaturalLangProcessResultConfig>): adapter$45$utils_Untrusted<CreateAINaturalLangProcessResultConfig>;
|
|
14
|
+
export declare function validateAdapterConfig(untrustedConfig: unknown, configPropertyNames: adapter$45$utils_AdapterValidationConfig): CreateAINaturalLangProcessResultConfig | null;
|
|
15
|
+
export declare function buildNetworkSnapshot(luvio: $64$luvio_engine_Luvio, config: CreateAINaturalLangProcessResultConfig, options?: $64$luvio_engine_DispatchResourceRequestContext): Promise<import("@luvio/engine").FulfilledSnapshot<types_AINaturalLangProcessResultRepresentation_AINaturalLangProcessResultRepresentation, {}> | import("@luvio/engine").StaleSnapshot<types_AINaturalLangProcessResultRepresentation_AINaturalLangProcessResultRepresentation, {}> | import("@luvio/engine").PendingSnapshot<types_AINaturalLangProcessResultRepresentation_AINaturalLangProcessResultRepresentation, any>>;
|
|
16
|
+
export declare const createAINaturalLangProcessResultAdapterFactory: $64$luvio_engine_AdapterFactory<CreateAINaturalLangProcessResultConfig, types_AINaturalLangProcessResultRepresentation_AINaturalLangProcessResultRepresentation>;
|
package/dist/es/es2018/types/src/generated/adapters/getAINaturalLangProcessResultsBySourceId.d.ts
ADDED
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import { AdapterConfigMetadata as $64$luvio_engine_AdapterConfigMetadata, Luvio as $64$luvio_engine_Luvio, NormalizedKeyMetadata as $64$luvio_engine_NormalizedKeyMetadata, Fragment as $64$luvio_engine_Fragment, Snapshot as $64$luvio_engine_Snapshot, FetchResponse as $64$luvio_engine_FetchResponse, ErrorResponse as $64$luvio_engine_ErrorResponse, DispatchResourceRequestContext as $64$luvio_engine_DispatchResourceRequestContext, CoercedAdapterRequestContext as $64$luvio_engine_CoercedAdapterRequestContext, StoreLookup as $64$luvio_engine_StoreLookup, AdapterFactory as $64$luvio_engine_AdapterFactory } from '@luvio/engine';
|
|
2
|
+
import { Untrusted as adapter$45$utils_Untrusted, AdapterValidationConfig as adapter$45$utils_AdapterValidationConfig } from './adapter-utils';
|
|
3
|
+
import { ResourceRequestConfig as resources_getConnectNlpServiceAiNaturalLangProcessResultsSourceRecordsBySourceRecordId_ResourceRequestConfig } from '../resources/getConnectNlpServiceAiNaturalLangProcessResultsSourceRecordsBySourceRecordId';
|
|
4
|
+
import { AINaturalLangProcessResultCollectionRepresentation as types_AINaturalLangProcessResultCollectionRepresentation_AINaturalLangProcessResultCollectionRepresentation } from '../types/AINaturalLangProcessResultCollectionRepresentation';
|
|
5
|
+
export declare const adapterName = "getAINaturalLangProcessResultsBySourceId";
|
|
6
|
+
export declare const getAINaturalLangProcessResultsBySourceId_ConfigPropertyMetadata: $64$luvio_engine_AdapterConfigMetadata[];
|
|
7
|
+
export declare const getAINaturalLangProcessResultsBySourceId_ConfigPropertyNames: adapter$45$utils_AdapterValidationConfig;
|
|
8
|
+
export interface GetAINaturalLangProcessResultsBySourceIdConfig {
|
|
9
|
+
sourceRecordId: string;
|
|
10
|
+
serviceTypes?: Array<string>;
|
|
11
|
+
}
|
|
12
|
+
export declare function createResourceParams(config: GetAINaturalLangProcessResultsBySourceIdConfig): resources_getConnectNlpServiceAiNaturalLangProcessResultsSourceRecordsBySourceRecordId_ResourceRequestConfig;
|
|
13
|
+
export declare function keyBuilder(luvio: $64$luvio_engine_Luvio, config: GetAINaturalLangProcessResultsBySourceIdConfig): string;
|
|
14
|
+
export declare function keyBuilder_StructuredKey(luvio: $64$luvio_engine_Luvio, config: GetAINaturalLangProcessResultsBySourceIdConfig): $64$luvio_engine_NormalizedKeyMetadata;
|
|
15
|
+
export declare function typeCheckConfig(untrustedConfig: adapter$45$utils_Untrusted<GetAINaturalLangProcessResultsBySourceIdConfig>): adapter$45$utils_Untrusted<GetAINaturalLangProcessResultsBySourceIdConfig>;
|
|
16
|
+
export declare function validateAdapterConfig(untrustedConfig: unknown, configPropertyNames: adapter$45$utils_AdapterValidationConfig): GetAINaturalLangProcessResultsBySourceIdConfig | null;
|
|
17
|
+
export declare function adapterFragment(luvio: $64$luvio_engine_Luvio, config: GetAINaturalLangProcessResultsBySourceIdConfig): $64$luvio_engine_Fragment;
|
|
18
|
+
export declare function buildCachedSnapshot(luvio: $64$luvio_engine_Luvio, config: GetAINaturalLangProcessResultsBySourceIdConfig): $64$luvio_engine_Snapshot<types_AINaturalLangProcessResultCollectionRepresentation_AINaturalLangProcessResultCollectionRepresentation, any>;
|
|
19
|
+
export declare function onFetchResponseSuccess(luvio: $64$luvio_engine_Luvio, config: GetAINaturalLangProcessResultsBySourceIdConfig, resourceParams: resources_getConnectNlpServiceAiNaturalLangProcessResultsSourceRecordsBySourceRecordId_ResourceRequestConfig, response: $64$luvio_engine_FetchResponse<types_AINaturalLangProcessResultCollectionRepresentation_AINaturalLangProcessResultCollectionRepresentation>): Promise<import("@luvio/engine").FulfilledSnapshot<types_AINaturalLangProcessResultCollectionRepresentation_AINaturalLangProcessResultCollectionRepresentation, {}> | import("@luvio/engine").StaleSnapshot<types_AINaturalLangProcessResultCollectionRepresentation_AINaturalLangProcessResultCollectionRepresentation, {}> | import("@luvio/engine").PendingSnapshot<types_AINaturalLangProcessResultCollectionRepresentation_AINaturalLangProcessResultCollectionRepresentation, any>>;
|
|
20
|
+
export declare function onFetchResponseError(luvio: $64$luvio_engine_Luvio, config: GetAINaturalLangProcessResultsBySourceIdConfig, resourceParams: resources_getConnectNlpServiceAiNaturalLangProcessResultsSourceRecordsBySourceRecordId_ResourceRequestConfig, response: $64$luvio_engine_ErrorResponse): Promise<import("@luvio/engine").ErrorSnapshot>;
|
|
21
|
+
export declare function buildNetworkSnapshot(luvio: $64$luvio_engine_Luvio, config: GetAINaturalLangProcessResultsBySourceIdConfig, options?: $64$luvio_engine_DispatchResourceRequestContext): Promise<$64$luvio_engine_Snapshot<types_AINaturalLangProcessResultCollectionRepresentation_AINaturalLangProcessResultCollectionRepresentation, any>>;
|
|
22
|
+
export type BuildSnapshotContext = {
|
|
23
|
+
luvio: $64$luvio_engine_Luvio;
|
|
24
|
+
config: GetAINaturalLangProcessResultsBySourceIdConfig;
|
|
25
|
+
};
|
|
26
|
+
export declare function buildNetworkSnapshotCachePolicy(context: BuildSnapshotContext, coercedAdapterRequestContext: $64$luvio_engine_CoercedAdapterRequestContext): Promise<$64$luvio_engine_Snapshot<types_AINaturalLangProcessResultCollectionRepresentation_AINaturalLangProcessResultCollectionRepresentation, any>>;
|
|
27
|
+
export declare function buildCachedSnapshotCachePolicy(context: BuildSnapshotContext, storeLookup: $64$luvio_engine_StoreLookup<types_AINaturalLangProcessResultCollectionRepresentation_AINaturalLangProcessResultCollectionRepresentation>): $64$luvio_engine_Snapshot<types_AINaturalLangProcessResultCollectionRepresentation_AINaturalLangProcessResultCollectionRepresentation, any>;
|
|
28
|
+
export declare const getAINaturalLangProcessResultsBySourceIdAdapterFactory: $64$luvio_engine_AdapterFactory<GetAINaturalLangProcessResultsBySourceIdConfig, types_AINaturalLangProcessResultCollectionRepresentation_AINaturalLangProcessResultCollectionRepresentation>;
|