@salesforce/lds-adapters-platform-appexchange 1.312.0
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/LICENSE.txt +82 -0
- package/dist/es/es2018/platform-appexchange.js +418 -0
- package/dist/es/es2018/types/src/generated/adapters/adapter-utils.d.ts +62 -0
- package/dist/es/es2018/types/src/generated/adapters/getAppExchangeSearchListingCollection.d.ts +39 -0
- package/dist/es/es2018/types/src/generated/artifacts/main.d.ts +1 -0
- package/dist/es/es2018/types/src/generated/artifacts/sfdc.d.ts +3 -0
- package/dist/es/es2018/types/src/generated/resources/getConnectAppexchangeSearchListings.d.ts +27 -0
- package/dist/es/es2018/types/src/generated/types/AppExchangeListingLogoRepresentation.d.ts +35 -0
- package/dist/es/es2018/types/src/generated/types/AppExchangeSearchListingCollectionRepresentation.d.ts +33 -0
- package/dist/es/es2018/types/src/generated/types/AppExchangeSearchListingRepresentation.d.ts +69 -0
- package/dist/es/es2018/types/src/generated/types/type-utils.d.ts +32 -0
- package/package.json +72 -0
- package/sfdc/index.d.ts +1 -0
- package/sfdc/index.js +454 -0
- package/src/raml/api.raml +348 -0
- package/src/raml/luvio.raml +23 -0
package/LICENSE.txt
ADDED
|
@@ -0,0 +1,82 @@
|
|
|
1
|
+
Terms of Use
|
|
2
|
+
|
|
3
|
+
Copyright 2022 Salesforce, Inc. All rights reserved.
|
|
4
|
+
|
|
5
|
+
These Terms of Use govern the download, installation, and/or use of this
|
|
6
|
+
software provided by Salesforce, Inc. ("Salesforce") (the "Software"), were
|
|
7
|
+
last updated on April 15, 2022, and constitute a legally binding
|
|
8
|
+
agreement between you and Salesforce. If you do not agree to these Terms of
|
|
9
|
+
Use, do not install or use the Software.
|
|
10
|
+
|
|
11
|
+
Salesforce grants you a worldwide, non-exclusive, no-charge, royalty-free
|
|
12
|
+
copyright license to reproduce, prepare derivative works of, publicly
|
|
13
|
+
display, publicly perform, sublicense, and distribute the Software and
|
|
14
|
+
derivative works subject to these Terms. These Terms shall be included in
|
|
15
|
+
all copies or substantial portions of the Software.
|
|
16
|
+
|
|
17
|
+
Subject to the limited rights expressly granted hereunder, Salesforce
|
|
18
|
+
reserves all rights, title, and interest in and to all intellectual
|
|
19
|
+
property subsisting in the Software. No rights are granted to you hereunder
|
|
20
|
+
other than as expressly set forth herein. Users residing in countries on
|
|
21
|
+
the United States Office of Foreign Assets Control sanction list, or which
|
|
22
|
+
are otherwise subject to a US export embargo, may not use the Software.
|
|
23
|
+
|
|
24
|
+
Implementation of the Software may require development work, for which you
|
|
25
|
+
are responsible. The Software may contain bugs, errors and
|
|
26
|
+
incompatibilities and is made available on an AS IS basis without support,
|
|
27
|
+
updates, or service level commitments.
|
|
28
|
+
|
|
29
|
+
Salesforce reserves the right at any time to modify, suspend, or
|
|
30
|
+
discontinue, the Software (or any part thereof) with or without notice. You
|
|
31
|
+
agree that Salesforce shall not be liable to you or to any third party for
|
|
32
|
+
any modification, suspension, or discontinuance.
|
|
33
|
+
|
|
34
|
+
You agree to defend Salesforce against any claim, demand, suit or
|
|
35
|
+
proceeding made or brought against Salesforce by a third party arising out
|
|
36
|
+
of or accruing from (a) your use of the Software, and (b) any application
|
|
37
|
+
you develop with the Software that infringes any copyright, trademark,
|
|
38
|
+
trade secret, trade dress, patent, or other intellectual property right of
|
|
39
|
+
any person or defames any person or violates their rights of publicity or
|
|
40
|
+
privacy (each a "Claim Against Salesforce"), and will indemnify Salesforce
|
|
41
|
+
from any damages, attorney fees, and costs finally awarded against
|
|
42
|
+
Salesforce as a result of, or for any amounts paid by Salesforce under a
|
|
43
|
+
settlement approved by you in writing of, a Claim Against Salesforce,
|
|
44
|
+
provided Salesforce (x) promptly gives you written notice of the Claim
|
|
45
|
+
Against Salesforce, (y) gives you sole control of the defense and
|
|
46
|
+
settlement of the Claim Against Salesforce (except that you may not settle
|
|
47
|
+
any Claim Against Salesforce unless it unconditionally releases Salesforce
|
|
48
|
+
of all liability), and (z) gives you all reasonable assistance, at your
|
|
49
|
+
expense.
|
|
50
|
+
|
|
51
|
+
WITHOUT LIMITING THE GENERALITY OF THE FOREGOING, THE SOFTWARE IS NOT
|
|
52
|
+
SUPPORTED AND IS PROVIDED "AS IS," WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
53
|
+
IMPLIED. IN NO EVENT SHALL SALESFORCE HAVE ANY LIABILITY FOR ANY DAMAGES,
|
|
54
|
+
INCLUDING, BUT NOT LIMITED TO, DIRECT, INDIRECT, SPECIAL, INCIDENTAL,
|
|
55
|
+
PUNITIVE, OR CONSEQUENTIAL DAMAGES, OR DAMAGES BASED ON LOST PROFITS, DATA,
|
|
56
|
+
OR USE, IN CONNECTION WITH THE SOFTWARE, HOWEVER CAUSED AND WHETHER IN
|
|
57
|
+
CONTRACT, TORT, OR UNDER ANY OTHER THEORY OF LIABILITY, WHETHER OR NOT YOU
|
|
58
|
+
HAVE BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
|
|
59
|
+
|
|
60
|
+
These Terms of Use shall be governed exclusively by the internal laws of
|
|
61
|
+
the State of California, without regard to its conflicts of laws
|
|
62
|
+
rules. Each party hereby consents to the exclusive jurisdiction of the
|
|
63
|
+
state and federal courts located in San Francisco County, California to
|
|
64
|
+
adjudicate any dispute arising out of or relating to these Terms of Use and
|
|
65
|
+
the download, installation, and/or use of the Software. Except as expressly
|
|
66
|
+
stated herein, these Terms of Use constitute the entire agreement between
|
|
67
|
+
the parties, and supersede all prior and contemporaneous agreements,
|
|
68
|
+
proposals, or representations, written or oral, concerning their subject
|
|
69
|
+
matter. No modification, amendment, or waiver of any provision of these
|
|
70
|
+
Terms of Use shall be effective unless it is by an update to these Terms of
|
|
71
|
+
Use that Salesforce makes available, or is in writing and signed by the
|
|
72
|
+
party against whom the modification, amendment, or waiver is to be
|
|
73
|
+
asserted.
|
|
74
|
+
|
|
75
|
+
Data Privacy: Salesforce may collect, process, and store device,
|
|
76
|
+
system, and other information related to your use of the Software. This
|
|
77
|
+
information includes, but is not limited to, IP address, user metrics, and
|
|
78
|
+
other data ("Usage Data"). Salesforce may use Usage Data for analytics,
|
|
79
|
+
product development, and marketing purposes. You acknowledge that files
|
|
80
|
+
generated in conjunction with the Software may contain sensitive or
|
|
81
|
+
confidential data, and you are solely responsible for anonymizing and
|
|
82
|
+
protecting such data.
|
|
@@ -0,0 +1,418 @@
|
|
|
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, buildNetworkSnapshotCachePolicy as buildNetworkSnapshotCachePolicy$1, typeCheckConfig as typeCheckConfig$1, StoreKeyMap, createResourceParams as createResourceParams$1 } 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, resourceType, typeCheckShape, isArrayShape = false, coerceFn) {
|
|
52
|
+
return {
|
|
53
|
+
name,
|
|
54
|
+
required,
|
|
55
|
+
resourceType,
|
|
56
|
+
typeCheckShape,
|
|
57
|
+
isArrayShape,
|
|
58
|
+
coerceFn,
|
|
59
|
+
};
|
|
60
|
+
}
|
|
61
|
+
function buildAdapterValidationConfig(displayName, paramsMeta) {
|
|
62
|
+
const required = paramsMeta.filter(p => p.required).map(p => p.name);
|
|
63
|
+
const optional = paramsMeta.filter(p => !p.required).map(p => p.name);
|
|
64
|
+
return {
|
|
65
|
+
displayName,
|
|
66
|
+
parameters: {
|
|
67
|
+
required,
|
|
68
|
+
optional,
|
|
69
|
+
}
|
|
70
|
+
};
|
|
71
|
+
}
|
|
72
|
+
const keyPrefix = 'appexchange';
|
|
73
|
+
|
|
74
|
+
const { isArray: ArrayIsArray } = Array;
|
|
75
|
+
const { stringify: JSONStringify } = JSON;
|
|
76
|
+
function createLink(ref) {
|
|
77
|
+
return {
|
|
78
|
+
__ref: serializeStructuredKey(ref),
|
|
79
|
+
};
|
|
80
|
+
}
|
|
81
|
+
|
|
82
|
+
function validate$2(obj, path = 'AppExchangeListingLogoRepresentation') {
|
|
83
|
+
const v_error = (() => {
|
|
84
|
+
if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
|
|
85
|
+
return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
|
|
86
|
+
}
|
|
87
|
+
const obj_externalId = obj.externalId;
|
|
88
|
+
const path_externalId = path + '.externalId';
|
|
89
|
+
if (typeof obj_externalId !== 'string') {
|
|
90
|
+
return new TypeError('Expected "string" but received "' + typeof obj_externalId + '" (at "' + path_externalId + '")');
|
|
91
|
+
}
|
|
92
|
+
const obj_logoType = obj.logoType;
|
|
93
|
+
const path_logoType = path + '.logoType';
|
|
94
|
+
if (typeof obj_logoType !== 'string') {
|
|
95
|
+
return new TypeError('Expected "string" but received "' + typeof obj_logoType + '" (at "' + path_logoType + '")');
|
|
96
|
+
}
|
|
97
|
+
const obj_mediaId = obj.mediaId;
|
|
98
|
+
const path_mediaId = path + '.mediaId';
|
|
99
|
+
if (typeof obj_mediaId !== 'string') {
|
|
100
|
+
return new TypeError('Expected "string" but received "' + typeof obj_mediaId + '" (at "' + path_mediaId + '")');
|
|
101
|
+
}
|
|
102
|
+
})();
|
|
103
|
+
return v_error === undefined ? null : v_error;
|
|
104
|
+
}
|
|
105
|
+
|
|
106
|
+
function validate$1(obj, path = 'AppExchangeSearchListingRepresentation') {
|
|
107
|
+
const v_error = (() => {
|
|
108
|
+
if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
|
|
109
|
+
return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
|
|
110
|
+
}
|
|
111
|
+
obj.averageRating;
|
|
112
|
+
const obj_collectionName = obj.collectionName;
|
|
113
|
+
const path_collectionName = path + '.collectionName';
|
|
114
|
+
if (typeof obj_collectionName !== 'string') {
|
|
115
|
+
return new TypeError('Expected "string" but received "' + typeof obj_collectionName + '" (at "' + path_collectionName + '")');
|
|
116
|
+
}
|
|
117
|
+
const obj_description = obj.description;
|
|
118
|
+
const path_description = path + '.description';
|
|
119
|
+
if (typeof obj_description !== 'string') {
|
|
120
|
+
return new TypeError('Expected "string" but received "' + typeof obj_description + '" (at "' + path_description + '")');
|
|
121
|
+
}
|
|
122
|
+
const obj_documentPosition = obj.documentPosition;
|
|
123
|
+
const path_documentPosition = path + '.documentPosition';
|
|
124
|
+
if (typeof obj_documentPosition !== 'number' || (typeof obj_documentPosition === 'number' && Math.floor(obj_documentPosition) !== obj_documentPosition)) {
|
|
125
|
+
return new TypeError('Expected "integer" but received "' + typeof obj_documentPosition + '" (at "' + path_documentPosition + '")');
|
|
126
|
+
}
|
|
127
|
+
const obj_documentTitle = obj.documentTitle;
|
|
128
|
+
const path_documentTitle = path + '.documentTitle';
|
|
129
|
+
if (typeof obj_documentTitle !== 'string') {
|
|
130
|
+
return new TypeError('Expected "string" but received "' + typeof obj_documentTitle + '" (at "' + path_documentTitle + '")');
|
|
131
|
+
}
|
|
132
|
+
const obj_listingCategories = obj.listingCategories;
|
|
133
|
+
const path_listingCategories = path + '.listingCategories';
|
|
134
|
+
if (!ArrayIsArray(obj_listingCategories)) {
|
|
135
|
+
return new TypeError('Expected "array" but received "' + typeof obj_listingCategories + '" (at "' + path_listingCategories + '")');
|
|
136
|
+
}
|
|
137
|
+
for (let i = 0; i < obj_listingCategories.length; i++) {
|
|
138
|
+
const obj_listingCategories_item = obj_listingCategories[i];
|
|
139
|
+
const path_listingCategories_item = path_listingCategories + '[' + i + ']';
|
|
140
|
+
if (typeof obj_listingCategories_item !== 'string') {
|
|
141
|
+
return new TypeError('Expected "string" but received "' + typeof obj_listingCategories_item + '" (at "' + path_listingCategories_item + '")');
|
|
142
|
+
}
|
|
143
|
+
}
|
|
144
|
+
const obj_logos = obj.logos;
|
|
145
|
+
const path_logos = path + '.logos';
|
|
146
|
+
if (!ArrayIsArray(obj_logos)) {
|
|
147
|
+
return new TypeError('Expected "array" but received "' + typeof obj_logos + '" (at "' + path_logos + '")');
|
|
148
|
+
}
|
|
149
|
+
for (let i = 0; i < obj_logos.length; i++) {
|
|
150
|
+
const obj_logos_item = obj_logos[i];
|
|
151
|
+
const path_logos_item = path_logos + '[' + i + ']';
|
|
152
|
+
const referencepath_logos_itemValidationError = validate$2(obj_logos_item, path_logos_item);
|
|
153
|
+
if (referencepath_logos_itemValidationError !== null) {
|
|
154
|
+
let message = 'Object doesn\'t match AppExchangeListingLogoRepresentation (at "' + path_logos_item + '")\n';
|
|
155
|
+
message += referencepath_logos_itemValidationError.message.split('\n').map((line) => '\t' + line).join('\n');
|
|
156
|
+
return new TypeError(message);
|
|
157
|
+
}
|
|
158
|
+
}
|
|
159
|
+
const obj_oafId = obj.oafId;
|
|
160
|
+
const path_oafId = path + '.oafId';
|
|
161
|
+
if (typeof obj_oafId !== 'string') {
|
|
162
|
+
return new TypeError('Expected "string" but received "' + typeof obj_oafId + '" (at "' + path_oafId + '")');
|
|
163
|
+
}
|
|
164
|
+
const obj_pricing = obj.pricing;
|
|
165
|
+
const path_pricing = path + '.pricing';
|
|
166
|
+
if (typeof obj_pricing !== 'string') {
|
|
167
|
+
return new TypeError('Expected "string" but received "' + typeof obj_pricing + '" (at "' + path_pricing + '")');
|
|
168
|
+
}
|
|
169
|
+
const obj_publisher = obj.publisher;
|
|
170
|
+
const path_publisher = path + '.publisher';
|
|
171
|
+
if (typeof obj_publisher !== 'string') {
|
|
172
|
+
return new TypeError('Expected "string" but received "' + typeof obj_publisher + '" (at "' + path_publisher + '")');
|
|
173
|
+
}
|
|
174
|
+
const obj_reviewsAmount = obj.reviewsAmount;
|
|
175
|
+
const path_reviewsAmount = path + '.reviewsAmount';
|
|
176
|
+
if (typeof obj_reviewsAmount !== 'number' || (typeof obj_reviewsAmount === 'number' && Math.floor(obj_reviewsAmount) !== obj_reviewsAmount)) {
|
|
177
|
+
return new TypeError('Expected "integer" but received "' + typeof obj_reviewsAmount + '" (at "' + path_reviewsAmount + '")');
|
|
178
|
+
}
|
|
179
|
+
const obj_sourceName = obj.sourceName;
|
|
180
|
+
const path_sourceName = path + '.sourceName';
|
|
181
|
+
if (typeof obj_sourceName !== 'string') {
|
|
182
|
+
return new TypeError('Expected "string" but received "' + typeof obj_sourceName + '" (at "' + path_sourceName + '")');
|
|
183
|
+
}
|
|
184
|
+
const obj_title = obj.title;
|
|
185
|
+
const path_title = path + '.title';
|
|
186
|
+
if (typeof obj_title !== 'string') {
|
|
187
|
+
return new TypeError('Expected "string" but received "' + typeof obj_title + '" (at "' + path_title + '")');
|
|
188
|
+
}
|
|
189
|
+
const obj_type = obj.type;
|
|
190
|
+
const path_type = path + '.type';
|
|
191
|
+
if (typeof obj_type !== 'string') {
|
|
192
|
+
return new TypeError('Expected "string" but received "' + typeof obj_type + '" (at "' + path_type + '")');
|
|
193
|
+
}
|
|
194
|
+
})();
|
|
195
|
+
return v_error === undefined ? null : v_error;
|
|
196
|
+
}
|
|
197
|
+
|
|
198
|
+
const TTL = 1000;
|
|
199
|
+
const VERSION = "a8547fef5ab9dc70a1e6077ff392fa82";
|
|
200
|
+
function validate(obj, path = 'AppExchangeSearchListingCollectionRepresentation') {
|
|
201
|
+
const v_error = (() => {
|
|
202
|
+
if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
|
|
203
|
+
return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
|
|
204
|
+
}
|
|
205
|
+
const obj_listings = obj.listings;
|
|
206
|
+
const path_listings = path + '.listings';
|
|
207
|
+
if (!ArrayIsArray(obj_listings)) {
|
|
208
|
+
return new TypeError('Expected "array" but received "' + typeof obj_listings + '" (at "' + path_listings + '")');
|
|
209
|
+
}
|
|
210
|
+
for (let i = 0; i < obj_listings.length; i++) {
|
|
211
|
+
const obj_listings_item = obj_listings[i];
|
|
212
|
+
const path_listings_item = path_listings + '[' + i + ']';
|
|
213
|
+
const referencepath_listings_itemValidationError = validate$1(obj_listings_item, path_listings_item);
|
|
214
|
+
if (referencepath_listings_itemValidationError !== null) {
|
|
215
|
+
let message = 'Object doesn\'t match AppExchangeSearchListingRepresentation (at "' + path_listings_item + '")\n';
|
|
216
|
+
message += referencepath_listings_itemValidationError.message.split('\n').map((line) => '\t' + line).join('\n');
|
|
217
|
+
return new TypeError(message);
|
|
218
|
+
}
|
|
219
|
+
}
|
|
220
|
+
const obj_totalCount = obj.totalCount;
|
|
221
|
+
const path_totalCount = path + '.totalCount';
|
|
222
|
+
if (typeof obj_totalCount !== 'number' || (typeof obj_totalCount === 'number' && Math.floor(obj_totalCount) !== obj_totalCount)) {
|
|
223
|
+
return new TypeError('Expected "integer" but received "' + typeof obj_totalCount + '" (at "' + path_totalCount + '")');
|
|
224
|
+
}
|
|
225
|
+
})();
|
|
226
|
+
return v_error === undefined ? null : v_error;
|
|
227
|
+
}
|
|
228
|
+
const RepresentationType = 'AppExchangeSearchListingCollectionRepresentation';
|
|
229
|
+
function normalize(input, existing, path, luvio, store, timestamp) {
|
|
230
|
+
return input;
|
|
231
|
+
}
|
|
232
|
+
const select$1 = function AppExchangeSearchListingCollectionRepresentationSelect() {
|
|
233
|
+
return {
|
|
234
|
+
kind: 'Fragment',
|
|
235
|
+
version: VERSION,
|
|
236
|
+
private: [],
|
|
237
|
+
opaque: true
|
|
238
|
+
};
|
|
239
|
+
};
|
|
240
|
+
function equals(existing, incoming) {
|
|
241
|
+
if (JSONStringify(incoming) !== JSONStringify(existing)) {
|
|
242
|
+
return false;
|
|
243
|
+
}
|
|
244
|
+
return true;
|
|
245
|
+
}
|
|
246
|
+
const ingest = function AppExchangeSearchListingCollectionRepresentationIngest(input, path, luvio, store, timestamp) {
|
|
247
|
+
if (process.env.NODE_ENV !== 'production') {
|
|
248
|
+
const validateError = validate(input);
|
|
249
|
+
if (validateError !== null) {
|
|
250
|
+
throw validateError;
|
|
251
|
+
}
|
|
252
|
+
}
|
|
253
|
+
const key = path.fullPath;
|
|
254
|
+
const ttlToUse = TTL;
|
|
255
|
+
ingestShape(input, path, luvio, store, timestamp, ttlToUse, key, normalize, "appexchange", VERSION, RepresentationType, equals);
|
|
256
|
+
return createLink(key);
|
|
257
|
+
};
|
|
258
|
+
function getTypeCacheKeys(rootKeySet, luvio, input, fullPathFactory) {
|
|
259
|
+
// root cache key (uses fullPathFactory if keyBuilderFromType isn't defined)
|
|
260
|
+
const rootKey = fullPathFactory();
|
|
261
|
+
rootKeySet.set(rootKey, {
|
|
262
|
+
namespace: keyPrefix,
|
|
263
|
+
representationName: RepresentationType,
|
|
264
|
+
mergeable: false
|
|
265
|
+
});
|
|
266
|
+
}
|
|
267
|
+
|
|
268
|
+
function select(luvio, params) {
|
|
269
|
+
return select$1();
|
|
270
|
+
}
|
|
271
|
+
function keyBuilder$1(luvio, params) {
|
|
272
|
+
return keyPrefix + '::AppExchangeSearchListingCollectionRepresentation:(' + 'category:' + params.queryParams.category + ',' + 'edition:' + params.queryParams.edition + ',' + 'keyword:' + params.queryParams.keyword + ',' + 'language:' + params.queryParams.language + ',' + 'languages:' + params.queryParams.languages + ',' + 'page:' + params.queryParams.page + ',' + 'pageSize:' + params.queryParams.pageSize + ',' + 'price:' + params.queryParams.price + ',' + 'product:' + params.queryParams.product + ',' + 'rating:' + params.queryParams.rating + ',' + 'sort:' + params.queryParams.sort + ',' + 'tech:' + params.queryParams.tech + ',' + 'type:' + params.queryParams.type + ')';
|
|
273
|
+
}
|
|
274
|
+
function getResponseCacheKeys(storeKeyMap, luvio, resourceParams, response) {
|
|
275
|
+
getTypeCacheKeys(storeKeyMap, luvio, response, () => keyBuilder$1(luvio, resourceParams));
|
|
276
|
+
}
|
|
277
|
+
function ingestSuccess(luvio, resourceParams, response, snapshotRefresh) {
|
|
278
|
+
const { body } = response;
|
|
279
|
+
const key = keyBuilder$1(luvio, resourceParams);
|
|
280
|
+
luvio.storeIngest(key, ingest, body);
|
|
281
|
+
const snapshot = luvio.storeLookup({
|
|
282
|
+
recordId: key,
|
|
283
|
+
node: select(),
|
|
284
|
+
variables: {},
|
|
285
|
+
}, snapshotRefresh);
|
|
286
|
+
if (process.env.NODE_ENV !== 'production') {
|
|
287
|
+
if (snapshot.state !== 'Fulfilled') {
|
|
288
|
+
throw new Error('Invalid network response. Expected resource response to result in Fulfilled snapshot');
|
|
289
|
+
}
|
|
290
|
+
}
|
|
291
|
+
deepFreeze(snapshot.data);
|
|
292
|
+
return snapshot;
|
|
293
|
+
}
|
|
294
|
+
function ingestError(luvio, params, error, snapshotRefresh) {
|
|
295
|
+
const key = keyBuilder$1(luvio, params);
|
|
296
|
+
const errorSnapshot = luvio.errorSnapshot(error, snapshotRefresh);
|
|
297
|
+
const storeMetadataParams = {
|
|
298
|
+
ttl: TTL,
|
|
299
|
+
namespace: keyPrefix,
|
|
300
|
+
version: VERSION,
|
|
301
|
+
representationName: RepresentationType
|
|
302
|
+
};
|
|
303
|
+
luvio.storeIngestError(key, errorSnapshot, storeMetadataParams);
|
|
304
|
+
return errorSnapshot;
|
|
305
|
+
}
|
|
306
|
+
function createResourceRequest(config) {
|
|
307
|
+
const headers = {};
|
|
308
|
+
return {
|
|
309
|
+
baseUri: '/services/data/v63.0',
|
|
310
|
+
basePath: '/connect/appexchange/search-listings',
|
|
311
|
+
method: 'get',
|
|
312
|
+
body: null,
|
|
313
|
+
urlParams: {},
|
|
314
|
+
queryParams: config.queryParams,
|
|
315
|
+
headers,
|
|
316
|
+
priority: 'normal',
|
|
317
|
+
};
|
|
318
|
+
}
|
|
319
|
+
|
|
320
|
+
const adapterName = 'getAppExchangeSearchListingCollection';
|
|
321
|
+
const getAppExchangeSearchListingCollection_ConfigPropertyMetadata = [
|
|
322
|
+
generateParamConfigMetadata('category', false, 1 /* QueryParameter */, 0 /* String */, true),
|
|
323
|
+
generateParamConfigMetadata('edition', false, 1 /* QueryParameter */, 0 /* String */, true),
|
|
324
|
+
generateParamConfigMetadata('keyword', false, 1 /* QueryParameter */, 0 /* String */),
|
|
325
|
+
generateParamConfigMetadata('language', false, 1 /* QueryParameter */, 0 /* String */),
|
|
326
|
+
generateParamConfigMetadata('languages', false, 1 /* QueryParameter */, 0 /* String */, true),
|
|
327
|
+
generateParamConfigMetadata('page', false, 1 /* QueryParameter */, 3 /* Integer */),
|
|
328
|
+
generateParamConfigMetadata('pageSize', false, 1 /* QueryParameter */, 3 /* Integer */),
|
|
329
|
+
generateParamConfigMetadata('price', false, 1 /* QueryParameter */, 0 /* String */, true),
|
|
330
|
+
generateParamConfigMetadata('product', false, 1 /* QueryParameter */, 0 /* String */),
|
|
331
|
+
generateParamConfigMetadata('rating', false, 1 /* QueryParameter */, 3 /* Integer */),
|
|
332
|
+
generateParamConfigMetadata('sort', false, 1 /* QueryParameter */, 0 /* String */),
|
|
333
|
+
generateParamConfigMetadata('tech', false, 1 /* QueryParameter */, 0 /* String */, true),
|
|
334
|
+
generateParamConfigMetadata('type', false, 1 /* QueryParameter */, 0 /* String */),
|
|
335
|
+
];
|
|
336
|
+
const getAppExchangeSearchListingCollection_ConfigPropertyNames = /*#__PURE__*/ buildAdapterValidationConfig(adapterName, getAppExchangeSearchListingCollection_ConfigPropertyMetadata);
|
|
337
|
+
const createResourceParams = /*#__PURE__*/ createResourceParams$1(getAppExchangeSearchListingCollection_ConfigPropertyMetadata);
|
|
338
|
+
function keyBuilder(luvio, config) {
|
|
339
|
+
const resourceParams = createResourceParams(config);
|
|
340
|
+
return keyBuilder$1(luvio, resourceParams);
|
|
341
|
+
}
|
|
342
|
+
function typeCheckConfig(untrustedConfig) {
|
|
343
|
+
const config = {};
|
|
344
|
+
typeCheckConfig$1(untrustedConfig, config, getAppExchangeSearchListingCollection_ConfigPropertyMetadata);
|
|
345
|
+
return config;
|
|
346
|
+
}
|
|
347
|
+
function validateAdapterConfig(untrustedConfig, configPropertyNames) {
|
|
348
|
+
if (!untrustedIsObject(untrustedConfig)) {
|
|
349
|
+
return null;
|
|
350
|
+
}
|
|
351
|
+
if (process.env.NODE_ENV !== 'production') {
|
|
352
|
+
validateConfig(untrustedConfig, configPropertyNames);
|
|
353
|
+
}
|
|
354
|
+
const config = typeCheckConfig(untrustedConfig);
|
|
355
|
+
if (!areRequiredParametersPresent(config, configPropertyNames)) {
|
|
356
|
+
return null;
|
|
357
|
+
}
|
|
358
|
+
return config;
|
|
359
|
+
}
|
|
360
|
+
function adapterFragment(luvio, config) {
|
|
361
|
+
createResourceParams(config);
|
|
362
|
+
return select();
|
|
363
|
+
}
|
|
364
|
+
function onFetchResponseSuccess(luvio, config, resourceParams, response) {
|
|
365
|
+
const snapshot = ingestSuccess(luvio, resourceParams, response, {
|
|
366
|
+
config,
|
|
367
|
+
resolve: () => buildNetworkSnapshot(luvio, config, snapshotRefreshOptions)
|
|
368
|
+
});
|
|
369
|
+
return luvio.storeBroadcast().then(() => snapshot);
|
|
370
|
+
}
|
|
371
|
+
function onFetchResponseError(luvio, config, resourceParams, response) {
|
|
372
|
+
const snapshot = ingestError(luvio, resourceParams, response, {
|
|
373
|
+
config,
|
|
374
|
+
resolve: () => buildNetworkSnapshot(luvio, config, snapshotRefreshOptions)
|
|
375
|
+
});
|
|
376
|
+
return luvio.storeBroadcast().then(() => snapshot);
|
|
377
|
+
}
|
|
378
|
+
function buildNetworkSnapshot(luvio, config, options) {
|
|
379
|
+
const resourceParams = createResourceParams(config);
|
|
380
|
+
const request = createResourceRequest(resourceParams);
|
|
381
|
+
return luvio.dispatchResourceRequest(request, options)
|
|
382
|
+
.then((response) => {
|
|
383
|
+
return luvio.handleSuccessResponse(() => onFetchResponseSuccess(luvio, config, resourceParams, response), () => {
|
|
384
|
+
const cache = new StoreKeyMap();
|
|
385
|
+
getResponseCacheKeys(cache, luvio, resourceParams, response.body);
|
|
386
|
+
return cache;
|
|
387
|
+
});
|
|
388
|
+
}, (response) => {
|
|
389
|
+
return luvio.handleErrorResponse(() => onFetchResponseError(luvio, config, resourceParams, response));
|
|
390
|
+
});
|
|
391
|
+
}
|
|
392
|
+
function buildNetworkSnapshotCachePolicy(context, coercedAdapterRequestContext) {
|
|
393
|
+
return buildNetworkSnapshotCachePolicy$1(context, coercedAdapterRequestContext, buildNetworkSnapshot, undefined, false);
|
|
394
|
+
}
|
|
395
|
+
function buildCachedSnapshotCachePolicy(context, storeLookup) {
|
|
396
|
+
const { luvio, config } = context;
|
|
397
|
+
const selector = {
|
|
398
|
+
recordId: keyBuilder(luvio, config),
|
|
399
|
+
node: adapterFragment(luvio, config),
|
|
400
|
+
variables: {},
|
|
401
|
+
};
|
|
402
|
+
const cacheSnapshot = storeLookup(selector, {
|
|
403
|
+
config,
|
|
404
|
+
resolve: () => buildNetworkSnapshot(luvio, config, snapshotRefreshOptions)
|
|
405
|
+
});
|
|
406
|
+
return cacheSnapshot;
|
|
407
|
+
}
|
|
408
|
+
const getAppExchangeSearchListingCollectionAdapterFactory = (luvio) => function appexchange__getAppExchangeSearchListingCollection(untrustedConfig, requestContext) {
|
|
409
|
+
const config = validateAdapterConfig(untrustedConfig, getAppExchangeSearchListingCollection_ConfigPropertyNames);
|
|
410
|
+
// Invalid or incomplete config
|
|
411
|
+
if (config === null) {
|
|
412
|
+
return null;
|
|
413
|
+
}
|
|
414
|
+
return luvio.applyCachePolicy((requestContext || {}), { config, luvio }, // BuildSnapshotContext
|
|
415
|
+
buildCachedSnapshotCachePolicy, buildNetworkSnapshotCachePolicy);
|
|
416
|
+
};
|
|
417
|
+
|
|
418
|
+
export { getAppExchangeSearchListingCollectionAdapterFactory };
|
|
@@ -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, resourceType: $64$luvio_engine_AdapterConfigMetadata['resourceType'], typeCheckShape: $64$luvio_engine_AdapterConfigMetadata['typeCheckShape'], isArrayShape?: 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 = "appexchange";
|
package/dist/es/es2018/types/src/generated/adapters/getAppExchangeSearchListingCollection.d.ts
ADDED
|
@@ -0,0 +1,39 @@
|
|
|
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_getConnectAppexchangeSearchListings_ResourceRequestConfig } from '../resources/getConnectAppexchangeSearchListings';
|
|
4
|
+
import { AppExchangeSearchListingCollectionRepresentation as types_AppExchangeSearchListingCollectionRepresentation_AppExchangeSearchListingCollectionRepresentation } from '../types/AppExchangeSearchListingCollectionRepresentation';
|
|
5
|
+
export declare const adapterName = "getAppExchangeSearchListingCollection";
|
|
6
|
+
export declare const getAppExchangeSearchListingCollection_ConfigPropertyMetadata: $64$luvio_engine_AdapterConfigMetadata[];
|
|
7
|
+
export declare const getAppExchangeSearchListingCollection_ConfigPropertyNames: adapter$45$utils_AdapterValidationConfig;
|
|
8
|
+
export interface GetAppExchangeSearchListingCollectionConfig {
|
|
9
|
+
category?: Array<string>;
|
|
10
|
+
edition?: Array<string>;
|
|
11
|
+
keyword?: string;
|
|
12
|
+
language?: string;
|
|
13
|
+
languages?: Array<string>;
|
|
14
|
+
page?: number;
|
|
15
|
+
pageSize?: number;
|
|
16
|
+
price?: Array<string>;
|
|
17
|
+
product?: string;
|
|
18
|
+
rating?: number;
|
|
19
|
+
sort?: string;
|
|
20
|
+
tech?: Array<string>;
|
|
21
|
+
type?: string;
|
|
22
|
+
}
|
|
23
|
+
export declare const createResourceParams: (config: GetAppExchangeSearchListingCollectionConfig) => resources_getConnectAppexchangeSearchListings_ResourceRequestConfig;
|
|
24
|
+
export declare function keyBuilder(luvio: $64$luvio_engine_Luvio, config: GetAppExchangeSearchListingCollectionConfig): string;
|
|
25
|
+
export declare function keyBuilder_StructuredKey(luvio: $64$luvio_engine_Luvio, config: GetAppExchangeSearchListingCollectionConfig): $64$luvio_engine_NormalizedKeyMetadata;
|
|
26
|
+
export declare function typeCheckConfig(untrustedConfig: adapter$45$utils_Untrusted<GetAppExchangeSearchListingCollectionConfig>): adapter$45$utils_Untrusted<GetAppExchangeSearchListingCollectionConfig>;
|
|
27
|
+
export declare function validateAdapterConfig(untrustedConfig: unknown, configPropertyNames: adapter$45$utils_AdapterValidationConfig): GetAppExchangeSearchListingCollectionConfig | null;
|
|
28
|
+
export declare function adapterFragment(luvio: $64$luvio_engine_Luvio, config: GetAppExchangeSearchListingCollectionConfig): $64$luvio_engine_Fragment;
|
|
29
|
+
export declare function buildCachedSnapshot(luvio: $64$luvio_engine_Luvio, config: GetAppExchangeSearchListingCollectionConfig): $64$luvio_engine_Snapshot<types_AppExchangeSearchListingCollectionRepresentation_AppExchangeSearchListingCollectionRepresentation, any>;
|
|
30
|
+
export declare function onFetchResponseSuccess(luvio: $64$luvio_engine_Luvio, config: GetAppExchangeSearchListingCollectionConfig, resourceParams: resources_getConnectAppexchangeSearchListings_ResourceRequestConfig, response: $64$luvio_engine_FetchResponse<types_AppExchangeSearchListingCollectionRepresentation_AppExchangeSearchListingCollectionRepresentation>): Promise<import("@luvio/engine").FulfilledSnapshot<types_AppExchangeSearchListingCollectionRepresentation_AppExchangeSearchListingCollectionRepresentation, {}> | import("@luvio/engine").StaleSnapshot<types_AppExchangeSearchListingCollectionRepresentation_AppExchangeSearchListingCollectionRepresentation, {}> | import("@luvio/engine").PendingSnapshot<types_AppExchangeSearchListingCollectionRepresentation_AppExchangeSearchListingCollectionRepresentation, any>>;
|
|
31
|
+
export declare function onFetchResponseError(luvio: $64$luvio_engine_Luvio, config: GetAppExchangeSearchListingCollectionConfig, resourceParams: resources_getConnectAppexchangeSearchListings_ResourceRequestConfig, response: $64$luvio_engine_ErrorResponse): Promise<import("@luvio/engine").ErrorSnapshot>;
|
|
32
|
+
export declare function buildNetworkSnapshot(luvio: $64$luvio_engine_Luvio, config: GetAppExchangeSearchListingCollectionConfig, options?: $64$luvio_engine_DispatchResourceRequestContext): Promise<$64$luvio_engine_Snapshot<types_AppExchangeSearchListingCollectionRepresentation_AppExchangeSearchListingCollectionRepresentation, any>>;
|
|
33
|
+
export type BuildSnapshotContext = {
|
|
34
|
+
luvio: $64$luvio_engine_Luvio;
|
|
35
|
+
config: GetAppExchangeSearchListingCollectionConfig;
|
|
36
|
+
};
|
|
37
|
+
export declare function buildNetworkSnapshotCachePolicy(context: BuildSnapshotContext, coercedAdapterRequestContext: $64$luvio_engine_CoercedAdapterRequestContext): Promise<$64$luvio_engine_Snapshot<types_AppExchangeSearchListingCollectionRepresentation_AppExchangeSearchListingCollectionRepresentation, any>>;
|
|
38
|
+
export declare function buildCachedSnapshotCachePolicy(context: BuildSnapshotContext, storeLookup: $64$luvio_engine_StoreLookup<types_AppExchangeSearchListingCollectionRepresentation_AppExchangeSearchListingCollectionRepresentation>): $64$luvio_engine_Snapshot<types_AppExchangeSearchListingCollectionRepresentation_AppExchangeSearchListingCollectionRepresentation, any>;
|
|
39
|
+
export declare const getAppExchangeSearchListingCollectionAdapterFactory: $64$luvio_engine_AdapterFactory<GetAppExchangeSearchListingCollectionConfig, types_AppExchangeSearchListingCollectionRepresentation_AppExchangeSearchListingCollectionRepresentation>;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { getAppExchangeSearchListingCollectionAdapterFactory } from '../adapters/getAppExchangeSearchListingCollection';
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import { Luvio as $64$luvio_engine_Luvio, Fragment as $64$luvio_engine_Fragment, NormalizedKeyMetadata as $64$luvio_engine_NormalizedKeyMetadata, FetchResponse as $64$luvio_engine_FetchResponse, SnapshotRefresh as $64$luvio_engine_SnapshotRefresh, FulfilledSnapshot as $64$luvio_engine_FulfilledSnapshot, StaleSnapshot as $64$luvio_engine_StaleSnapshot, PendingSnapshot as $64$luvio_engine_PendingSnapshot, ErrorResponse as $64$luvio_engine_ErrorResponse, ErrorSnapshot as $64$luvio_engine_ErrorSnapshot, ResourceRequest as $64$luvio_engine_ResourceRequest } from '@luvio/engine';
|
|
2
|
+
import { AppExchangeSearchListingCollectionRepresentation as types_AppExchangeSearchListingCollectionRepresentation_AppExchangeSearchListingCollectionRepresentation } from '../types/AppExchangeSearchListingCollectionRepresentation';
|
|
3
|
+
export interface ResourceRequestConfig {
|
|
4
|
+
queryParams: {
|
|
5
|
+
category?: Array<string>;
|
|
6
|
+
edition?: Array<string>;
|
|
7
|
+
keyword?: string;
|
|
8
|
+
language?: string;
|
|
9
|
+
languages?: Array<string>;
|
|
10
|
+
page?: number;
|
|
11
|
+
pageSize?: number;
|
|
12
|
+
price?: Array<string>;
|
|
13
|
+
product?: string;
|
|
14
|
+
rating?: number;
|
|
15
|
+
sort?: string;
|
|
16
|
+
tech?: Array<string>;
|
|
17
|
+
type?: string;
|
|
18
|
+
};
|
|
19
|
+
}
|
|
20
|
+
export declare function select(luvio: $64$luvio_engine_Luvio, params: ResourceRequestConfig): $64$luvio_engine_Fragment;
|
|
21
|
+
export declare function keyBuilder(luvio: $64$luvio_engine_Luvio, params: ResourceRequestConfig): string;
|
|
22
|
+
export declare function keyBuilder_StructuredKey(luvio: $64$luvio_engine_Luvio, params: ResourceRequestConfig): $64$luvio_engine_NormalizedKeyMetadata;
|
|
23
|
+
export declare function getResponseCacheKeys(storeKeyMap: any, luvio: $64$luvio_engine_Luvio, resourceParams: ResourceRequestConfig, response: types_AppExchangeSearchListingCollectionRepresentation_AppExchangeSearchListingCollectionRepresentation): void;
|
|
24
|
+
export declare function ingestSuccess(luvio: $64$luvio_engine_Luvio, resourceParams: ResourceRequestConfig, response: $64$luvio_engine_FetchResponse<types_AppExchangeSearchListingCollectionRepresentation_AppExchangeSearchListingCollectionRepresentation>, snapshotRefresh?: $64$luvio_engine_SnapshotRefresh<types_AppExchangeSearchListingCollectionRepresentation_AppExchangeSearchListingCollectionRepresentation>): $64$luvio_engine_FulfilledSnapshot<types_AppExchangeSearchListingCollectionRepresentation_AppExchangeSearchListingCollectionRepresentation, {}> | $64$luvio_engine_StaleSnapshot<types_AppExchangeSearchListingCollectionRepresentation_AppExchangeSearchListingCollectionRepresentation, {}> | $64$luvio_engine_PendingSnapshot<types_AppExchangeSearchListingCollectionRepresentation_AppExchangeSearchListingCollectionRepresentation, any>;
|
|
25
|
+
export declare function ingestError(luvio: $64$luvio_engine_Luvio, params: ResourceRequestConfig, error: $64$luvio_engine_ErrorResponse, snapshotRefresh?: $64$luvio_engine_SnapshotRefresh<types_AppExchangeSearchListingCollectionRepresentation_AppExchangeSearchListingCollectionRepresentation>): $64$luvio_engine_ErrorSnapshot;
|
|
26
|
+
export declare function createResourceRequest(config: ResourceRequestConfig): $64$luvio_engine_ResourceRequest;
|
|
27
|
+
export default createResourceRequest;
|