@salesforce/lds-adapters-platform-devworkspace 0.1.0-dev1

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.
Files changed (24) hide show
  1. package/LICENSE.txt +82 -0
  2. package/dist/es/es2018/platform-devworkspace.js +883 -0
  3. package/dist/es/es2018/types/src/generated/adapters/adapter-utils.d.ts +62 -0
  4. package/dist/es/es2018/types/src/generated/adapters/getDevWorkspaceDetails.d.ts +27 -0
  5. package/dist/es/es2018/types/src/generated/adapters/getDevWorkspaceMetadata.d.ts +28 -0
  6. package/dist/es/es2018/types/src/generated/adapters/getDevWorkspaces.d.ts +26 -0
  7. package/dist/es/es2018/types/src/generated/adapters/updateDevWorkspaceMetadata.d.ts +17 -0
  8. package/dist/es/es2018/types/src/generated/artifacts/main.d.ts +4 -0
  9. package/dist/es/es2018/types/src/generated/artifacts/sfdc.d.ts +9 -0
  10. package/dist/es/es2018/types/src/generated/resources/getConnectWorkspaces.d.ts +12 -0
  11. package/dist/es/es2018/types/src/generated/resources/getConnectWorkspacesByDevWorkspaceId.d.ts +15 -0
  12. package/dist/es/es2018/types/src/generated/resources/getConnectWorkspacesMetadataByDevWorkspaceId.d.ts +16 -0
  13. package/dist/es/es2018/types/src/generated/resources/patchConnectWorkspacesMetadataByDevWorkspaceId.d.ts +16 -0
  14. package/dist/es/es2018/types/src/generated/types/DevWorkspaceDetailsCollectionRepresentation.d.ts +33 -0
  15. package/dist/es/es2018/types/src/generated/types/DevWorkspaceDetailsRepresentation.d.ts +44 -0
  16. package/dist/es/es2018/types/src/generated/types/DevWorkspaceMetadataCollectionOutputRepresentation.d.ts +42 -0
  17. package/dist/es/es2018/types/src/generated/types/DevWorkspaceMetadataDetailOutputRepresentation.d.ts +50 -0
  18. package/dist/es/es2018/types/src/generated/types/DevWorkspaceMetadataIdCollectionInputRepresentation.d.ts +31 -0
  19. package/dist/es/es2018/types/src/generated/types/type-utils.d.ts +32 -0
  20. package/package.json +66 -0
  21. package/sfdc/index.d.ts +1 -0
  22. package/sfdc/index.js +996 -0
  23. package/src/raml/api.raml +176 -0
  24. package/src/raml/luvio.raml +43 -0
package/sfdc/index.js ADDED
@@ -0,0 +1,996 @@
1
+ /**
2
+ * Copyright (c) 2022, Salesforce, Inc.,
3
+ * All rights reserved.
4
+ * For full license text, see the LICENSE.txt file
5
+ */
6
+
7
+ /*
8
+ * ATTENTION!
9
+ * THIS IS A GENERATED FILE FROM https://github.com/salesforce-experience-platform-emu/lds-lightning-platform
10
+ * If you would like to contribute to LDS, please follow the steps outlined in the git repo.
11
+ * Any changes made to this file in p4 will be automatically overwritten.
12
+ * *******************************************************************************************
13
+ */
14
+ /* proxy-compat-disable */
15
+ import { createInstrumentedAdapter, createLDSAdapter, createWireAdapterConstructor, createImperativeAdapter } from 'force/ldsBindings';
16
+ import { withDefaultLuvio } from 'force/ldsEngine';
17
+ import { serializeStructuredKey, ingestShape, deepFreeze, buildNetworkSnapshotCachePolicy as buildNetworkSnapshotCachePolicy$3, typeCheckConfig as typeCheckConfig$4, StoreKeyMap, createResourceParams as createResourceParams$4 } from 'force/luvioEngine';
18
+
19
+ const { hasOwnProperty: ObjectPrototypeHasOwnProperty } = Object.prototype;
20
+ const { keys: ObjectKeys, create: ObjectCreate } = Object;
21
+ const { isArray: ArrayIsArray$1 } = Array;
22
+ /**
23
+ * Validates an adapter config is well-formed.
24
+ * @param config The config to validate.
25
+ * @param adapter The adapter validation configuration.
26
+ * @param oneOf The keys the config must contain at least one of.
27
+ * @throws A TypeError if config doesn't satisfy the adapter's config validation.
28
+ */
29
+ function validateConfig(config, adapter, oneOf) {
30
+ const { displayName } = adapter;
31
+ const { required, optional, unsupported } = adapter.parameters;
32
+ if (config === undefined ||
33
+ required.every(req => ObjectPrototypeHasOwnProperty.call(config, req)) === false) {
34
+ throw new TypeError(`adapter ${displayName} configuration must specify ${required.sort().join(', ')}`);
35
+ }
36
+ if (oneOf && oneOf.some(req => ObjectPrototypeHasOwnProperty.call(config, req)) === false) {
37
+ throw new TypeError(`adapter ${displayName} configuration must specify one of ${oneOf.sort().join(', ')}`);
38
+ }
39
+ if (unsupported !== undefined &&
40
+ unsupported.some(req => ObjectPrototypeHasOwnProperty.call(config, req))) {
41
+ throw new TypeError(`adapter ${displayName} does not yet support ${unsupported.sort().join(', ')}`);
42
+ }
43
+ const supported = required.concat(optional);
44
+ if (ObjectKeys(config).some(key => !supported.includes(key))) {
45
+ throw new TypeError(`adapter ${displayName} configuration supports only ${supported.sort().join(', ')}`);
46
+ }
47
+ }
48
+ function untrustedIsObject(untrusted) {
49
+ return typeof untrusted === 'object' && untrusted !== null && ArrayIsArray$1(untrusted) === false;
50
+ }
51
+ function areRequiredParametersPresent(config, configPropertyNames) {
52
+ return configPropertyNames.parameters.required.every(req => req in config);
53
+ }
54
+ const snapshotRefreshOptions = {
55
+ overrides: {
56
+ headers: {
57
+ 'Cache-Control': 'no-cache',
58
+ },
59
+ }
60
+ };
61
+ function generateParamConfigMetadata(name, required, resourceType, typeCheckShape, isArrayShape = false, coerceFn) {
62
+ return {
63
+ name,
64
+ required,
65
+ resourceType,
66
+ typeCheckShape,
67
+ isArrayShape,
68
+ coerceFn,
69
+ };
70
+ }
71
+ function buildAdapterValidationConfig(displayName, paramsMeta) {
72
+ const required = paramsMeta.filter(p => p.required).map(p => p.name);
73
+ const optional = paramsMeta.filter(p => !p.required).map(p => p.name);
74
+ return {
75
+ displayName,
76
+ parameters: {
77
+ required,
78
+ optional,
79
+ }
80
+ };
81
+ }
82
+ const keyPrefix = 'DevWorkspace';
83
+
84
+ const { isArray: ArrayIsArray } = Array;
85
+ const { stringify: JSONStringify } = JSON;
86
+ function createLink(ref) {
87
+ return {
88
+ __ref: serializeStructuredKey(ref),
89
+ };
90
+ }
91
+
92
+ const TTL$2 = 30000;
93
+ const VERSION$2 = "8f4504d0a42e5b49c9d2e98ab0b7c264";
94
+ function validate$3(obj, path = 'DevWorkspaceDetailsRepresentation') {
95
+ const v_error = (() => {
96
+ if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
97
+ return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
98
+ }
99
+ if (obj.activePlan !== undefined) {
100
+ const obj_activePlan = obj.activePlan;
101
+ const path_activePlan = path + '.activePlan';
102
+ if (typeof obj_activePlan !== 'string') {
103
+ return new TypeError('Expected "string" but received "' + typeof obj_activePlan + '" (at "' + path_activePlan + '")');
104
+ }
105
+ }
106
+ if (obj.description !== undefined) {
107
+ const obj_description = obj.description;
108
+ const path_description = path + '.description';
109
+ if (typeof obj_description !== 'string') {
110
+ return new TypeError('Expected "string" but received "' + typeof obj_description + '" (at "' + path_description + '")');
111
+ }
112
+ }
113
+ const obj_devWorkspaceId = obj.devWorkspaceId;
114
+ const path_devWorkspaceId = path + '.devWorkspaceId';
115
+ if (typeof obj_devWorkspaceId !== 'string') {
116
+ return new TypeError('Expected "string" but received "' + typeof obj_devWorkspaceId + '" (at "' + path_devWorkspaceId + '")');
117
+ }
118
+ const obj_developerName = obj.developerName;
119
+ const path_developerName = path + '.developerName';
120
+ if (typeof obj_developerName !== 'string') {
121
+ return new TypeError('Expected "string" but received "' + typeof obj_developerName + '" (at "' + path_developerName + '")');
122
+ }
123
+ const obj_lastModifiedDate = obj.lastModifiedDate;
124
+ const path_lastModifiedDate = path + '.lastModifiedDate';
125
+ if (typeof obj_lastModifiedDate !== 'string') {
126
+ return new TypeError('Expected "string" but received "' + typeof obj_lastModifiedDate + '" (at "' + path_lastModifiedDate + '")');
127
+ }
128
+ const obj_masterLabel = obj.masterLabel;
129
+ const path_masterLabel = path + '.masterLabel';
130
+ if (typeof obj_masterLabel !== 'string') {
131
+ return new TypeError('Expected "string" but received "' + typeof obj_masterLabel + '" (at "' + path_masterLabel + '")');
132
+ }
133
+ })();
134
+ return v_error === undefined ? null : v_error;
135
+ }
136
+ const RepresentationType$2 = 'DevWorkspaceDetailsRepresentation';
137
+ function normalize$2(input, existing, path, luvio, store, timestamp) {
138
+ return input;
139
+ }
140
+ const select$6 = function DevWorkspaceDetailsRepresentationSelect() {
141
+ return {
142
+ kind: 'Fragment',
143
+ version: VERSION$2,
144
+ private: [],
145
+ opaque: true
146
+ };
147
+ };
148
+ function equals$2(existing, incoming) {
149
+ if (JSONStringify(incoming) !== JSONStringify(existing)) {
150
+ return false;
151
+ }
152
+ return true;
153
+ }
154
+ const ingest$2 = function DevWorkspaceDetailsRepresentationIngest(input, path, luvio, store, timestamp) {
155
+ if (process.env.NODE_ENV !== 'production') {
156
+ const validateError = validate$3(input);
157
+ if (validateError !== null) {
158
+ throw validateError;
159
+ }
160
+ }
161
+ const key = path.fullPath;
162
+ const ttlToUse = TTL$2;
163
+ ingestShape(input, path, luvio, store, timestamp, ttlToUse, key, normalize$2, "DevWorkspace", VERSION$2, RepresentationType$2, equals$2);
164
+ return createLink(key);
165
+ };
166
+ function getTypeCacheKeys$2(rootKeySet, luvio, input, fullPathFactory) {
167
+ // root cache key (uses fullPathFactory if keyBuilderFromType isn't defined)
168
+ const rootKey = fullPathFactory();
169
+ rootKeySet.set(rootKey, {
170
+ namespace: keyPrefix,
171
+ representationName: RepresentationType$2,
172
+ mergeable: false
173
+ });
174
+ }
175
+
176
+ function select$5(luvio, params) {
177
+ return select$6();
178
+ }
179
+ function keyBuilder$6(luvio, params) {
180
+ return keyPrefix + '::DevWorkspaceDetailsRepresentation:(' + 'devWorkspaceId:' + params.urlParams.devWorkspaceId + ')';
181
+ }
182
+ function getResponseCacheKeys$3(storeKeyMap, luvio, resourceParams, response) {
183
+ getTypeCacheKeys$2(storeKeyMap, luvio, response, () => keyBuilder$6(luvio, resourceParams));
184
+ }
185
+ function ingestSuccess$3(luvio, resourceParams, response, snapshotRefresh) {
186
+ const { body } = response;
187
+ const key = keyBuilder$6(luvio, resourceParams);
188
+ luvio.storeIngest(key, ingest$2, body);
189
+ const snapshot = luvio.storeLookup({
190
+ recordId: key,
191
+ node: select$5(),
192
+ variables: {},
193
+ }, snapshotRefresh);
194
+ if (process.env.NODE_ENV !== 'production') {
195
+ if (snapshot.state !== 'Fulfilled') {
196
+ throw new Error('Invalid network response. Expected resource response to result in Fulfilled snapshot');
197
+ }
198
+ }
199
+ deepFreeze(snapshot.data);
200
+ return snapshot;
201
+ }
202
+ function ingestError$2(luvio, params, error, snapshotRefresh) {
203
+ const key = keyBuilder$6(luvio, params);
204
+ const errorSnapshot = luvio.errorSnapshot(error, snapshotRefresh);
205
+ const storeMetadataParams = {
206
+ ttl: TTL$2,
207
+ namespace: keyPrefix,
208
+ version: VERSION$2,
209
+ representationName: RepresentationType$2
210
+ };
211
+ luvio.storeIngestError(key, errorSnapshot, storeMetadataParams);
212
+ return errorSnapshot;
213
+ }
214
+ function createResourceRequest$3(config) {
215
+ const headers = {};
216
+ return {
217
+ baseUri: '/services/data/v66.0',
218
+ basePath: '/connect/workspaces/' + config.urlParams.devWorkspaceId + '',
219
+ method: 'get',
220
+ body: null,
221
+ urlParams: config.urlParams,
222
+ queryParams: {},
223
+ headers,
224
+ priority: 'normal',
225
+ };
226
+ }
227
+
228
+ const adapterName$3 = 'getDevWorkspaceDetails';
229
+ const getDevWorkspaceDetails_ConfigPropertyMetadata = [
230
+ generateParamConfigMetadata('devWorkspaceId', true, 0 /* UrlParameter */, 0 /* String */),
231
+ ];
232
+ const getDevWorkspaceDetails_ConfigPropertyNames = /*#__PURE__*/ buildAdapterValidationConfig(adapterName$3, getDevWorkspaceDetails_ConfigPropertyMetadata);
233
+ const createResourceParams$3 = /*#__PURE__*/ createResourceParams$4(getDevWorkspaceDetails_ConfigPropertyMetadata);
234
+ function keyBuilder$5(luvio, config) {
235
+ const resourceParams = createResourceParams$3(config);
236
+ return keyBuilder$6(luvio, resourceParams);
237
+ }
238
+ function typeCheckConfig$3(untrustedConfig) {
239
+ const config = {};
240
+ typeCheckConfig$4(untrustedConfig, config, getDevWorkspaceDetails_ConfigPropertyMetadata);
241
+ return config;
242
+ }
243
+ function validateAdapterConfig$3(untrustedConfig, configPropertyNames) {
244
+ if (!untrustedIsObject(untrustedConfig)) {
245
+ return null;
246
+ }
247
+ if (process.env.NODE_ENV !== 'production') {
248
+ validateConfig(untrustedConfig, configPropertyNames);
249
+ }
250
+ const config = typeCheckConfig$3(untrustedConfig);
251
+ if (!areRequiredParametersPresent(config, configPropertyNames)) {
252
+ return null;
253
+ }
254
+ return config;
255
+ }
256
+ function adapterFragment$2(luvio, config) {
257
+ createResourceParams$3(config);
258
+ return select$5();
259
+ }
260
+ function onFetchResponseSuccess$2(luvio, config, resourceParams, response) {
261
+ const snapshot = ingestSuccess$3(luvio, resourceParams, response, {
262
+ config,
263
+ resolve: () => buildNetworkSnapshot$3(luvio, config, snapshotRefreshOptions)
264
+ });
265
+ return luvio.storeBroadcast().then(() => snapshot);
266
+ }
267
+ function onFetchResponseError$2(luvio, config, resourceParams, response) {
268
+ const snapshot = ingestError$2(luvio, resourceParams, response, {
269
+ config,
270
+ resolve: () => buildNetworkSnapshot$3(luvio, config, snapshotRefreshOptions)
271
+ });
272
+ return luvio.storeBroadcast().then(() => snapshot);
273
+ }
274
+ function buildNetworkSnapshot$3(luvio, config, options) {
275
+ const resourceParams = createResourceParams$3(config);
276
+ const request = createResourceRequest$3(resourceParams);
277
+ return luvio.dispatchResourceRequest(request, options)
278
+ .then((response) => {
279
+ return luvio.handleSuccessResponse(() => onFetchResponseSuccess$2(luvio, config, resourceParams, response), () => {
280
+ const cache = new StoreKeyMap();
281
+ getResponseCacheKeys$3(cache, luvio, resourceParams, response.body);
282
+ return cache;
283
+ });
284
+ }, (response) => {
285
+ return luvio.handleErrorResponse(() => onFetchResponseError$2(luvio, config, resourceParams, response));
286
+ });
287
+ }
288
+ function buildNetworkSnapshotCachePolicy$2(context, coercedAdapterRequestContext) {
289
+ return buildNetworkSnapshotCachePolicy$3(context, coercedAdapterRequestContext, buildNetworkSnapshot$3, undefined, false);
290
+ }
291
+ function buildCachedSnapshotCachePolicy$2(context, storeLookup) {
292
+ const { luvio, config } = context;
293
+ const selector = {
294
+ recordId: keyBuilder$5(luvio, config),
295
+ node: adapterFragment$2(luvio, config),
296
+ variables: {},
297
+ };
298
+ const cacheSnapshot = storeLookup(selector, {
299
+ config,
300
+ resolve: () => buildNetworkSnapshot$3(luvio, config, snapshotRefreshOptions)
301
+ });
302
+ return cacheSnapshot;
303
+ }
304
+ const getDevWorkspaceDetailsAdapterFactory = (luvio) => function DevWorkspace__getDevWorkspaceDetails(untrustedConfig, requestContext) {
305
+ const config = validateAdapterConfig$3(untrustedConfig, getDevWorkspaceDetails_ConfigPropertyNames);
306
+ // Invalid or incomplete config
307
+ if (config === null) {
308
+ return null;
309
+ }
310
+ return luvio.applyCachePolicy((requestContext || {}), { config, luvio }, // BuildSnapshotContext
311
+ buildCachedSnapshotCachePolicy$2, buildNetworkSnapshotCachePolicy$2);
312
+ };
313
+
314
+ function validate$2(obj, path = 'DevWorkspaceMetadataDetailOutputRepresentation') {
315
+ const v_error = (() => {
316
+ if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
317
+ return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
318
+ }
319
+ if (obj.actionURL !== undefined) {
320
+ const obj_actionURL = obj.actionURL;
321
+ const path_actionURL = path + '.actionURL';
322
+ if (typeof obj_actionURL !== 'string') {
323
+ return new TypeError('Expected "string" but received "' + typeof obj_actionURL + '" (at "' + path_actionURL + '")');
324
+ }
325
+ }
326
+ if (obj.developerName !== undefined) {
327
+ const obj_developerName = obj.developerName;
328
+ const path_developerName = path + '.developerName';
329
+ if (typeof obj_developerName !== 'string') {
330
+ return new TypeError('Expected "string" but received "' + typeof obj_developerName + '" (at "' + path_developerName + '")');
331
+ }
332
+ }
333
+ if (obj.isAiGenerated !== undefined) {
334
+ const obj_isAiGenerated = obj.isAiGenerated;
335
+ const path_isAiGenerated = path + '.isAiGenerated';
336
+ if (typeof obj_isAiGenerated !== 'boolean') {
337
+ return new TypeError('Expected "boolean" but received "' + typeof obj_isAiGenerated + '" (at "' + path_isAiGenerated + '")');
338
+ }
339
+ }
340
+ if (obj.label !== undefined) {
341
+ const obj_label = obj.label;
342
+ const path_label = path + '.label';
343
+ if (typeof obj_label !== 'string') {
344
+ return new TypeError('Expected "string" but received "' + typeof obj_label + '" (at "' + path_label + '")');
345
+ }
346
+ }
347
+ if (obj.lastModifiedDate !== undefined) {
348
+ const obj_lastModifiedDate = obj.lastModifiedDate;
349
+ const path_lastModifiedDate = path + '.lastModifiedDate';
350
+ if (typeof obj_lastModifiedDate !== 'string') {
351
+ return new TypeError('Expected "string" but received "' + typeof obj_lastModifiedDate + '" (at "' + path_lastModifiedDate + '")');
352
+ }
353
+ }
354
+ const obj_metadataId = obj.metadataId;
355
+ const path_metadataId = path + '.metadataId';
356
+ if (typeof obj_metadataId !== 'string') {
357
+ return new TypeError('Expected "string" but received "' + typeof obj_metadataId + '" (at "' + path_metadataId + '")');
358
+ }
359
+ if (obj.metadataType !== undefined) {
360
+ const obj_metadataType = obj.metadataType;
361
+ const path_metadataType = path + '.metadataType';
362
+ if (typeof obj_metadataType !== 'string') {
363
+ return new TypeError('Expected "string" but received "' + typeof obj_metadataType + '" (at "' + path_metadataType + '")');
364
+ }
365
+ }
366
+ if (obj.metadataTypeLabel !== undefined) {
367
+ const obj_metadataTypeLabel = obj.metadataTypeLabel;
368
+ const path_metadataTypeLabel = path + '.metadataTypeLabel';
369
+ if (typeof obj_metadataTypeLabel !== 'string') {
370
+ return new TypeError('Expected "string" but received "' + typeof obj_metadataTypeLabel + '" (at "' + path_metadataTypeLabel + '")');
371
+ }
372
+ }
373
+ })();
374
+ return v_error === undefined ? null : v_error;
375
+ }
376
+
377
+ const TTL$1 = 30000;
378
+ const VERSION$1 = "6f291079c7238a3cbf0e3ef2b6461767";
379
+ function validate$1(obj, path = 'DevWorkspaceMetadataCollectionOutputRepresentation') {
380
+ const v_error = (() => {
381
+ if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
382
+ return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
383
+ }
384
+ const obj_currentDevWorkspaceId = obj.currentDevWorkspaceId;
385
+ const path_currentDevWorkspaceId = path + '.currentDevWorkspaceId';
386
+ if (typeof obj_currentDevWorkspaceId !== 'string') {
387
+ return new TypeError('Expected "string" but received "' + typeof obj_currentDevWorkspaceId + '" (at "' + path_currentDevWorkspaceId + '")');
388
+ }
389
+ const obj_devWorkspaceMetadata = obj.devWorkspaceMetadata;
390
+ const path_devWorkspaceMetadata = path + '.devWorkspaceMetadata';
391
+ if (!ArrayIsArray(obj_devWorkspaceMetadata)) {
392
+ return new TypeError('Expected "array" but received "' + typeof obj_devWorkspaceMetadata + '" (at "' + path_devWorkspaceMetadata + '")');
393
+ }
394
+ for (let i = 0; i < obj_devWorkspaceMetadata.length; i++) {
395
+ const obj_devWorkspaceMetadata_item = obj_devWorkspaceMetadata[i];
396
+ const path_devWorkspaceMetadata_item = path_devWorkspaceMetadata + '[' + i + ']';
397
+ const referencepath_devWorkspaceMetadata_itemValidationError = validate$2(obj_devWorkspaceMetadata_item, path_devWorkspaceMetadata_item);
398
+ if (referencepath_devWorkspaceMetadata_itemValidationError !== null) {
399
+ let message = 'Object doesn\'t match DevWorkspaceMetadataDetailOutputRepresentation (at "' + path_devWorkspaceMetadata_item + '")\n';
400
+ message += referencepath_devWorkspaceMetadata_itemValidationError.message.split('\n').map((line) => '\t' + line).join('\n');
401
+ return new TypeError(message);
402
+ }
403
+ }
404
+ })();
405
+ return v_error === undefined ? null : v_error;
406
+ }
407
+ const RepresentationType$1 = 'DevWorkspaceMetadataCollectionOutputRepresentation';
408
+ function keyBuilder$4(luvio, config) {
409
+ return keyPrefix + '::' + RepresentationType$1 + ':' + config.workspaceId;
410
+ }
411
+ function keyBuilderFromType(luvio, object) {
412
+ const keyParams = {
413
+ workspaceId: object.currentDevWorkspaceId
414
+ };
415
+ return keyBuilder$4(luvio, keyParams);
416
+ }
417
+ function normalize$1(input, existing, path, luvio, store, timestamp) {
418
+ return input;
419
+ }
420
+ const select$4 = function DevWorkspaceMetadataCollectionOutputRepresentationSelect() {
421
+ return {
422
+ kind: 'Fragment',
423
+ version: VERSION$1,
424
+ private: [],
425
+ opaque: true
426
+ };
427
+ };
428
+ function equals$1(existing, incoming) {
429
+ if (JSONStringify(incoming) !== JSONStringify(existing)) {
430
+ return false;
431
+ }
432
+ return true;
433
+ }
434
+ const ingest$1 = function DevWorkspaceMetadataCollectionOutputRepresentationIngest(input, path, luvio, store, timestamp) {
435
+ if (process.env.NODE_ENV !== 'production') {
436
+ const validateError = validate$1(input);
437
+ if (validateError !== null) {
438
+ throw validateError;
439
+ }
440
+ }
441
+ const key = keyBuilderFromType(luvio, input);
442
+ const ttlToUse = TTL$1;
443
+ ingestShape(input, path, luvio, store, timestamp, ttlToUse, key, normalize$1, "DevWorkspace", VERSION$1, RepresentationType$1, equals$1);
444
+ return createLink(key);
445
+ };
446
+ function getTypeCacheKeys$1(rootKeySet, luvio, input, fullPathFactory) {
447
+ // root cache key (uses fullPathFactory if keyBuilderFromType isn't defined)
448
+ const rootKey = keyBuilderFromType(luvio, input);
449
+ rootKeySet.set(rootKey, {
450
+ namespace: keyPrefix,
451
+ representationName: RepresentationType$1,
452
+ mergeable: false
453
+ });
454
+ }
455
+
456
+ function select$3(luvio, params) {
457
+ return select$4();
458
+ }
459
+ function keyBuilder$3(luvio, params) {
460
+ return keyBuilder$4(luvio, {
461
+ workspaceId: params.urlParams.devWorkspaceId
462
+ });
463
+ }
464
+ function getResponseCacheKeys$2(storeKeyMap, luvio, resourceParams, response) {
465
+ getTypeCacheKeys$1(storeKeyMap, luvio, response);
466
+ }
467
+ function ingestSuccess$2(luvio, resourceParams, response, snapshotRefresh) {
468
+ const { body } = response;
469
+ const key = keyBuilder$3(luvio, resourceParams);
470
+ luvio.storeIngest(key, ingest$1, body);
471
+ const snapshot = luvio.storeLookup({
472
+ recordId: key,
473
+ node: select$3(),
474
+ variables: {},
475
+ }, snapshotRefresh);
476
+ if (process.env.NODE_ENV !== 'production') {
477
+ if (snapshot.state !== 'Fulfilled') {
478
+ throw new Error('Invalid network response. Expected resource response to result in Fulfilled snapshot');
479
+ }
480
+ }
481
+ deepFreeze(snapshot.data);
482
+ return snapshot;
483
+ }
484
+ function ingestError$1(luvio, params, error, snapshotRefresh) {
485
+ const key = keyBuilder$3(luvio, params);
486
+ const errorSnapshot = luvio.errorSnapshot(error, snapshotRefresh);
487
+ const storeMetadataParams = {
488
+ ttl: TTL$1,
489
+ namespace: keyPrefix,
490
+ version: VERSION$1,
491
+ representationName: RepresentationType$1
492
+ };
493
+ luvio.storeIngestError(key, errorSnapshot, storeMetadataParams);
494
+ return errorSnapshot;
495
+ }
496
+ function createResourceRequest$2(config) {
497
+ const headers = {};
498
+ return {
499
+ baseUri: '/services/data/v66.0',
500
+ basePath: '/connect/workspaces/' + config.urlParams.devWorkspaceId + '/metadata',
501
+ method: 'get',
502
+ body: null,
503
+ urlParams: config.urlParams,
504
+ queryParams: {},
505
+ headers,
506
+ priority: 'normal',
507
+ };
508
+ }
509
+ function createResourceRequestFromRepresentation(representation) {
510
+ const config = {
511
+ urlParams: {},
512
+ };
513
+ config.urlParams.devWorkspaceId = representation.currentDevWorkspaceId;
514
+ return createResourceRequest$2(config);
515
+ }
516
+
517
+ const adapterName$2 = 'getDevWorkspaceMetadata';
518
+ const getDevWorkspaceMetadata_ConfigPropertyMetadata = [
519
+ generateParamConfigMetadata('devWorkspaceId', true, 0 /* UrlParameter */, 0 /* String */),
520
+ ];
521
+ const getDevWorkspaceMetadata_ConfigPropertyNames = /*#__PURE__*/ buildAdapterValidationConfig(adapterName$2, getDevWorkspaceMetadata_ConfigPropertyMetadata);
522
+ const createResourceParams$2 = /*#__PURE__*/ createResourceParams$4(getDevWorkspaceMetadata_ConfigPropertyMetadata);
523
+ function keyBuilder$2(luvio, config) {
524
+ const resourceParams = createResourceParams$2(config);
525
+ return keyBuilder$3(luvio, resourceParams);
526
+ }
527
+ function typeCheckConfig$2(untrustedConfig) {
528
+ const config = {};
529
+ typeCheckConfig$4(untrustedConfig, config, getDevWorkspaceMetadata_ConfigPropertyMetadata);
530
+ return config;
531
+ }
532
+ function validateAdapterConfig$2(untrustedConfig, configPropertyNames) {
533
+ if (!untrustedIsObject(untrustedConfig)) {
534
+ return null;
535
+ }
536
+ if (process.env.NODE_ENV !== 'production') {
537
+ validateConfig(untrustedConfig, configPropertyNames);
538
+ }
539
+ const config = typeCheckConfig$2(untrustedConfig);
540
+ if (!areRequiredParametersPresent(config, configPropertyNames)) {
541
+ return null;
542
+ }
543
+ return config;
544
+ }
545
+ function adapterFragment$1(luvio, config) {
546
+ createResourceParams$2(config);
547
+ return select$3();
548
+ }
549
+ function onFetchResponseSuccess$1(luvio, config, resourceParams, response) {
550
+ const snapshot = ingestSuccess$2(luvio, resourceParams, response, {
551
+ config,
552
+ resolve: () => buildNetworkSnapshot$2(luvio, config, snapshotRefreshOptions)
553
+ });
554
+ return luvio.storeBroadcast().then(() => snapshot);
555
+ }
556
+ function onFetchResponseError$1(luvio, config, resourceParams, response) {
557
+ const snapshot = ingestError$1(luvio, resourceParams, response, {
558
+ config,
559
+ resolve: () => buildNetworkSnapshot$2(luvio, config, snapshotRefreshOptions)
560
+ });
561
+ return luvio.storeBroadcast().then(() => snapshot);
562
+ }
563
+ function buildNetworkSnapshot$2(luvio, config, options) {
564
+ const resourceParams = createResourceParams$2(config);
565
+ const request = createResourceRequest$2(resourceParams);
566
+ return luvio.dispatchResourceRequest(request, options)
567
+ .then((response) => {
568
+ return luvio.handleSuccessResponse(() => onFetchResponseSuccess$1(luvio, config, resourceParams, response), () => {
569
+ const cache = new StoreKeyMap();
570
+ getResponseCacheKeys$2(cache, luvio, resourceParams, response.body);
571
+ return cache;
572
+ });
573
+ }, (response) => {
574
+ return luvio.handleErrorResponse(() => onFetchResponseError$1(luvio, config, resourceParams, response));
575
+ });
576
+ }
577
+ function buildNetworkSnapshotCachePolicy$1(context, coercedAdapterRequestContext) {
578
+ return buildNetworkSnapshotCachePolicy$3(context, coercedAdapterRequestContext, buildNetworkSnapshot$2, undefined, false);
579
+ }
580
+ function buildCachedSnapshotCachePolicy$1(context, storeLookup) {
581
+ const { luvio, config } = context;
582
+ const selector = {
583
+ recordId: keyBuilder$2(luvio, config),
584
+ node: adapterFragment$1(luvio, config),
585
+ variables: {},
586
+ };
587
+ const cacheSnapshot = storeLookup(selector, {
588
+ config,
589
+ resolve: () => buildNetworkSnapshot$2(luvio, config, snapshotRefreshOptions)
590
+ });
591
+ return cacheSnapshot;
592
+ }
593
+ const getDevWorkspaceMetadataAdapterFactory = (luvio) => function DevWorkspace__getDevWorkspaceMetadata(untrustedConfig, requestContext) {
594
+ const config = validateAdapterConfig$2(untrustedConfig, getDevWorkspaceMetadata_ConfigPropertyNames);
595
+ // Invalid or incomplete config
596
+ if (config === null) {
597
+ return null;
598
+ }
599
+ return luvio.applyCachePolicy((requestContext || {}), { config, luvio }, // BuildSnapshotContext
600
+ buildCachedSnapshotCachePolicy$1, buildNetworkSnapshotCachePolicy$1);
601
+ };
602
+ const notifyChangeFactory = (luvio, options) => {
603
+ return function getConnectWorkspacesMetadataByDevWorkspaceIdNotifyChange(configs) {
604
+ const keys = configs.map(c => keyBuilder$4(luvio, c));
605
+ luvio.getNotifyChangeStoreEntries(keys).then(entries => {
606
+ for (let i = 0, len = entries.length; i < len; i++) {
607
+ const { key, record: val } = entries[i];
608
+ const refreshRequest = createResourceRequestFromRepresentation(val);
609
+ luvio.dispatchResourceRequest(refreshRequest, options)
610
+ .then((response) => {
611
+ return luvio.handleSuccessResponse(() => {
612
+ const { body } = response;
613
+ luvio.storeIngest(key, ingest$1, body);
614
+ return luvio.storeBroadcast();
615
+ }, () => {
616
+ const cache = new StoreKeyMap();
617
+ getTypeCacheKeys$1(cache, luvio, response.body);
618
+ return cache;
619
+ });
620
+ }, (error) => {
621
+ return luvio.handleErrorResponse(() => {
622
+ const errorSnapshot = luvio.errorSnapshot(error);
623
+ luvio.storeIngestError(key, errorSnapshot, {
624
+ ttl: TTL$1,
625
+ namespace: keyPrefix,
626
+ version: VERSION$1,
627
+ representationName: RepresentationType$1
628
+ });
629
+ return luvio.storeBroadcast().then(() => errorSnapshot);
630
+ });
631
+ });
632
+ }
633
+ });
634
+ };
635
+ };
636
+
637
+ const TTL = 30000;
638
+ const VERSION = "b17ed56948c949bdf3ffb0c5b035ea16";
639
+ function validate(obj, path = 'DevWorkspaceDetailsCollectionRepresentation') {
640
+ const v_error = (() => {
641
+ if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
642
+ return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
643
+ }
644
+ const obj_count = obj.count;
645
+ const path_count = path + '.count';
646
+ if (typeof obj_count !== 'number' || (typeof obj_count === 'number' && Math.floor(obj_count) !== obj_count)) {
647
+ return new TypeError('Expected "integer" but received "' + typeof obj_count + '" (at "' + path_count + '")');
648
+ }
649
+ const obj_devWorkspaces = obj.devWorkspaces;
650
+ const path_devWorkspaces = path + '.devWorkspaces';
651
+ if (!ArrayIsArray(obj_devWorkspaces)) {
652
+ return new TypeError('Expected "array" but received "' + typeof obj_devWorkspaces + '" (at "' + path_devWorkspaces + '")');
653
+ }
654
+ for (let i = 0; i < obj_devWorkspaces.length; i++) {
655
+ const obj_devWorkspaces_item = obj_devWorkspaces[i];
656
+ const path_devWorkspaces_item = path_devWorkspaces + '[' + i + ']';
657
+ const referencepath_devWorkspaces_itemValidationError = validate$3(obj_devWorkspaces_item, path_devWorkspaces_item);
658
+ if (referencepath_devWorkspaces_itemValidationError !== null) {
659
+ let message = 'Object doesn\'t match DevWorkspaceDetailsRepresentation (at "' + path_devWorkspaces_item + '")\n';
660
+ message += referencepath_devWorkspaces_itemValidationError.message.split('\n').map((line) => '\t' + line).join('\n');
661
+ return new TypeError(message);
662
+ }
663
+ }
664
+ })();
665
+ return v_error === undefined ? null : v_error;
666
+ }
667
+ const RepresentationType = 'DevWorkspaceDetailsCollectionRepresentation';
668
+ function normalize(input, existing, path, luvio, store, timestamp) {
669
+ return input;
670
+ }
671
+ const select$2 = function DevWorkspaceDetailsCollectionRepresentationSelect() {
672
+ return {
673
+ kind: 'Fragment',
674
+ version: VERSION,
675
+ private: [],
676
+ opaque: true
677
+ };
678
+ };
679
+ function equals(existing, incoming) {
680
+ if (JSONStringify(incoming) !== JSONStringify(existing)) {
681
+ return false;
682
+ }
683
+ return true;
684
+ }
685
+ const ingest = function DevWorkspaceDetailsCollectionRepresentationIngest(input, path, luvio, store, timestamp) {
686
+ if (process.env.NODE_ENV !== 'production') {
687
+ const validateError = validate(input);
688
+ if (validateError !== null) {
689
+ throw validateError;
690
+ }
691
+ }
692
+ const key = path.fullPath;
693
+ const ttlToUse = TTL;
694
+ ingestShape(input, path, luvio, store, timestamp, ttlToUse, key, normalize, "DevWorkspace", VERSION, RepresentationType, equals);
695
+ return createLink(key);
696
+ };
697
+ function getTypeCacheKeys(rootKeySet, luvio, input, fullPathFactory) {
698
+ // root cache key (uses fullPathFactory if keyBuilderFromType isn't defined)
699
+ const rootKey = fullPathFactory();
700
+ rootKeySet.set(rootKey, {
701
+ namespace: keyPrefix,
702
+ representationName: RepresentationType,
703
+ mergeable: false
704
+ });
705
+ }
706
+
707
+ function select$1(luvio, params) {
708
+ return select$2();
709
+ }
710
+ function keyBuilder$1(luvio, params) {
711
+ return keyPrefix + '::DevWorkspaceDetailsCollectionRepresentation:(' + ')';
712
+ }
713
+ function getResponseCacheKeys$1(storeKeyMap, luvio, resourceParams, response) {
714
+ getTypeCacheKeys(storeKeyMap, luvio, response, () => keyBuilder$1());
715
+ }
716
+ function ingestSuccess$1(luvio, resourceParams, response, snapshotRefresh) {
717
+ const { body } = response;
718
+ const key = keyBuilder$1();
719
+ luvio.storeIngest(key, ingest, body);
720
+ const snapshot = luvio.storeLookup({
721
+ recordId: key,
722
+ node: select$1(),
723
+ variables: {},
724
+ }, snapshotRefresh);
725
+ if (process.env.NODE_ENV !== 'production') {
726
+ if (snapshot.state !== 'Fulfilled') {
727
+ throw new Error('Invalid network response. Expected resource response to result in Fulfilled snapshot');
728
+ }
729
+ }
730
+ deepFreeze(snapshot.data);
731
+ return snapshot;
732
+ }
733
+ function ingestError(luvio, params, error, snapshotRefresh) {
734
+ const key = keyBuilder$1();
735
+ const errorSnapshot = luvio.errorSnapshot(error, snapshotRefresh);
736
+ const storeMetadataParams = {
737
+ ttl: TTL,
738
+ namespace: keyPrefix,
739
+ version: VERSION,
740
+ representationName: RepresentationType
741
+ };
742
+ luvio.storeIngestError(key, errorSnapshot, storeMetadataParams);
743
+ return errorSnapshot;
744
+ }
745
+ function createResourceRequest$1(config) {
746
+ const headers = {};
747
+ return {
748
+ baseUri: '/services/data/v66.0',
749
+ basePath: '/connect/workspaces',
750
+ method: 'get',
751
+ body: null,
752
+ urlParams: {},
753
+ queryParams: {},
754
+ headers,
755
+ priority: 'normal',
756
+ };
757
+ }
758
+
759
+ const adapterName$1 = 'getDevWorkspaces';
760
+ const getDevWorkspaces_ConfigPropertyMetadata = [];
761
+ const getDevWorkspaces_ConfigPropertyNames = /*#__PURE__*/ buildAdapterValidationConfig(adapterName$1, getDevWorkspaces_ConfigPropertyMetadata);
762
+ const createResourceParams$1 = /*#__PURE__*/ createResourceParams$4(getDevWorkspaces_ConfigPropertyMetadata);
763
+ function keyBuilder(luvio, config) {
764
+ createResourceParams$1(config);
765
+ return keyBuilder$1();
766
+ }
767
+ function typeCheckConfig$1(untrustedConfig) {
768
+ const config = {};
769
+ return config;
770
+ }
771
+ function validateAdapterConfig$1(untrustedConfig, configPropertyNames) {
772
+ if (!untrustedIsObject(untrustedConfig)) {
773
+ return null;
774
+ }
775
+ if (process.env.NODE_ENV !== 'production') {
776
+ validateConfig(untrustedConfig, configPropertyNames);
777
+ }
778
+ const config = typeCheckConfig$1();
779
+ if (!areRequiredParametersPresent(config, configPropertyNames)) {
780
+ return null;
781
+ }
782
+ return config;
783
+ }
784
+ function adapterFragment(luvio, config) {
785
+ createResourceParams$1(config);
786
+ return select$1();
787
+ }
788
+ function onFetchResponseSuccess(luvio, config, resourceParams, response) {
789
+ const snapshot = ingestSuccess$1(luvio, resourceParams, response, {
790
+ config,
791
+ resolve: () => buildNetworkSnapshot$1(luvio, config, snapshotRefreshOptions)
792
+ });
793
+ return luvio.storeBroadcast().then(() => snapshot);
794
+ }
795
+ function onFetchResponseError(luvio, config, resourceParams, response) {
796
+ const snapshot = ingestError(luvio, resourceParams, response, {
797
+ config,
798
+ resolve: () => buildNetworkSnapshot$1(luvio, config, snapshotRefreshOptions)
799
+ });
800
+ return luvio.storeBroadcast().then(() => snapshot);
801
+ }
802
+ function buildNetworkSnapshot$1(luvio, config, options) {
803
+ const resourceParams = createResourceParams$1(config);
804
+ const request = createResourceRequest$1();
805
+ return luvio.dispatchResourceRequest(request, options)
806
+ .then((response) => {
807
+ return luvio.handleSuccessResponse(() => onFetchResponseSuccess(luvio, config, resourceParams, response), () => {
808
+ const cache = new StoreKeyMap();
809
+ getResponseCacheKeys$1(cache, luvio, resourceParams, response.body);
810
+ return cache;
811
+ });
812
+ }, (response) => {
813
+ return luvio.handleErrorResponse(() => onFetchResponseError(luvio, config, resourceParams, response));
814
+ });
815
+ }
816
+ function buildNetworkSnapshotCachePolicy(context, coercedAdapterRequestContext) {
817
+ return buildNetworkSnapshotCachePolicy$3(context, coercedAdapterRequestContext, buildNetworkSnapshot$1, undefined, false);
818
+ }
819
+ function buildCachedSnapshotCachePolicy(context, storeLookup) {
820
+ const { luvio, config } = context;
821
+ const selector = {
822
+ recordId: keyBuilder(luvio, config),
823
+ node: adapterFragment(luvio, config),
824
+ variables: {},
825
+ };
826
+ const cacheSnapshot = storeLookup(selector, {
827
+ config,
828
+ resolve: () => buildNetworkSnapshot$1(luvio, config, snapshotRefreshOptions)
829
+ });
830
+ return cacheSnapshot;
831
+ }
832
+ const getDevWorkspacesAdapterFactory = (luvio) => function DevWorkspace__getDevWorkspaces(untrustedConfig, requestContext) {
833
+ const config = validateAdapterConfig$1(untrustedConfig, getDevWorkspaces_ConfigPropertyNames);
834
+ // Invalid or incomplete config
835
+ if (config === null) {
836
+ return null;
837
+ }
838
+ return luvio.applyCachePolicy((requestContext || {}), { config, luvio }, // BuildSnapshotContext
839
+ buildCachedSnapshotCachePolicy, buildNetworkSnapshotCachePolicy);
840
+ };
841
+
842
+ function select(luvio, params) {
843
+ return select$4();
844
+ }
845
+ function getResponseCacheKeys(storeKeyMap, luvio, resourceParams, response) {
846
+ getTypeCacheKeys$1(storeKeyMap, luvio, response);
847
+ }
848
+ function ingestSuccess(luvio, resourceParams, response) {
849
+ const { body } = response;
850
+ const key = keyBuilderFromType(luvio, body);
851
+ luvio.storeIngest(key, ingest$1, body);
852
+ const snapshot = luvio.storeLookup({
853
+ recordId: key,
854
+ node: select(),
855
+ variables: {},
856
+ });
857
+ if (process.env.NODE_ENV !== 'production') {
858
+ if (snapshot.state !== 'Fulfilled') {
859
+ throw new Error('Invalid network response. Expected resource response to result in Fulfilled snapshot');
860
+ }
861
+ }
862
+ deepFreeze(snapshot.data);
863
+ return snapshot;
864
+ }
865
+ function createResourceRequest(config) {
866
+ const headers = {};
867
+ return {
868
+ baseUri: '/services/data/v66.0',
869
+ basePath: '/connect/workspaces/' + config.urlParams.devWorkspaceId + '/metadata',
870
+ method: 'patch',
871
+ body: config.body,
872
+ urlParams: config.urlParams,
873
+ queryParams: {},
874
+ headers,
875
+ priority: 'normal',
876
+ };
877
+ }
878
+
879
+ const adapterName = 'updateDevWorkspaceMetadata';
880
+ const updateDevWorkspaceMetadata_ConfigPropertyMetadata = [
881
+ generateParamConfigMetadata('devWorkspaceId', true, 0 /* UrlParameter */, 0 /* String */),
882
+ generateParamConfigMetadata('metadataIds', true, 2 /* Body */, 0 /* String */, true),
883
+ generateParamConfigMetadata('operationType', true, 2 /* Body */, 0 /* String */),
884
+ ];
885
+ const updateDevWorkspaceMetadata_ConfigPropertyNames = /*#__PURE__*/ buildAdapterValidationConfig(adapterName, updateDevWorkspaceMetadata_ConfigPropertyMetadata);
886
+ const createResourceParams = /*#__PURE__*/ createResourceParams$4(updateDevWorkspaceMetadata_ConfigPropertyMetadata);
887
+ function typeCheckConfig(untrustedConfig) {
888
+ const config = {};
889
+ typeCheckConfig$4(untrustedConfig, config, updateDevWorkspaceMetadata_ConfigPropertyMetadata);
890
+ return config;
891
+ }
892
+ function validateAdapterConfig(untrustedConfig, configPropertyNames) {
893
+ if (!untrustedIsObject(untrustedConfig)) {
894
+ return null;
895
+ }
896
+ if (process.env.NODE_ENV !== 'production') {
897
+ validateConfig(untrustedConfig, configPropertyNames);
898
+ }
899
+ const config = typeCheckConfig(untrustedConfig);
900
+ if (!areRequiredParametersPresent(config, configPropertyNames)) {
901
+ return null;
902
+ }
903
+ return config;
904
+ }
905
+ function buildNetworkSnapshot(luvio, config, options) {
906
+ const resourceParams = createResourceParams(config);
907
+ const request = createResourceRequest(resourceParams);
908
+ return luvio.dispatchResourceRequest(request, options)
909
+ .then((response) => {
910
+ return luvio.handleSuccessResponse(() => {
911
+ const snapshot = ingestSuccess(luvio, resourceParams, response);
912
+ return luvio.storeBroadcast().then(() => snapshot);
913
+ }, () => {
914
+ const cache = new StoreKeyMap();
915
+ getResponseCacheKeys(cache, luvio, resourceParams, response.body);
916
+ return cache;
917
+ });
918
+ }, (response) => {
919
+ deepFreeze(response);
920
+ throw response;
921
+ });
922
+ }
923
+ const updateDevWorkspaceMetadataAdapterFactory = (luvio) => {
924
+ return function updateDevWorkspaceMetadata(untrustedConfig) {
925
+ const config = validateAdapterConfig(untrustedConfig, updateDevWorkspaceMetadata_ConfigPropertyNames);
926
+ // Invalid or incomplete config
927
+ if (config === null) {
928
+ throw new Error('Invalid config for "updateDevWorkspaceMetadata"');
929
+ }
930
+ return buildNetworkSnapshot(luvio, config);
931
+ };
932
+ };
933
+
934
+ let getDevWorkspaceDetails;
935
+ let getDevWorkspaceMetadata;
936
+ let getDevWorkspaceMetadataNotifyChange;
937
+ let getDevWorkspaces;
938
+ let updateDevWorkspaceMetadata;
939
+ // Imperative GET Adapters
940
+ let getDevWorkspaceDetails_imperative;
941
+ let getDevWorkspaceMetadata_imperative;
942
+ let getDevWorkspaces_imperative;
943
+ // Adapter Metadata
944
+ const getDevWorkspaceDetailsMetadata = {
945
+ apiFamily: 'DevWorkspace',
946
+ name: 'getDevWorkspaceDetails',
947
+ ttl: 30000,
948
+ };
949
+ const getDevWorkspaceMetadataMetadata = {
950
+ apiFamily: 'DevWorkspace',
951
+ name: 'getDevWorkspaceMetadata',
952
+ ttl: 30000,
953
+ };
954
+ const getDevWorkspacesMetadata = {
955
+ apiFamily: 'DevWorkspace',
956
+ name: 'getDevWorkspaces',
957
+ ttl: 30000,
958
+ };
959
+ // Notify Update Available
960
+ function bindExportsTo(luvio) {
961
+ // LDS Adapters
962
+ const getDevWorkspaceDetails_ldsAdapter = createInstrumentedAdapter(createLDSAdapter(luvio, 'getDevWorkspaceDetails', getDevWorkspaceDetailsAdapterFactory), getDevWorkspaceDetailsMetadata);
963
+ const getDevWorkspaceMetadata_ldsAdapter = createInstrumentedAdapter(createLDSAdapter(luvio, 'getDevWorkspaceMetadata', getDevWorkspaceMetadataAdapterFactory), getDevWorkspaceMetadataMetadata);
964
+ const getDevWorkspaces_ldsAdapter = createInstrumentedAdapter(createLDSAdapter(luvio, 'getDevWorkspaces', getDevWorkspacesAdapterFactory), getDevWorkspacesMetadata);
965
+ function unwrapSnapshotData(factory) {
966
+ const adapter = factory(luvio);
967
+ return (config) => adapter(config).then((snapshot) => snapshot.data);
968
+ }
969
+ return {
970
+ getDevWorkspaceDetails: createWireAdapterConstructor(luvio, getDevWorkspaceDetails_ldsAdapter, getDevWorkspaceDetailsMetadata),
971
+ getDevWorkspaceMetadata: createWireAdapterConstructor(luvio, getDevWorkspaceMetadata_ldsAdapter, getDevWorkspaceMetadataMetadata),
972
+ getDevWorkspaceMetadataNotifyChange: createLDSAdapter(luvio, 'getDevWorkspaceMetadataNotifyChange', notifyChangeFactory),
973
+ getDevWorkspaces: createWireAdapterConstructor(luvio, getDevWorkspaces_ldsAdapter, getDevWorkspacesMetadata),
974
+ updateDevWorkspaceMetadata: unwrapSnapshotData(updateDevWorkspaceMetadataAdapterFactory),
975
+ // Imperative GET Adapters
976
+ getDevWorkspaceDetails_imperative: createImperativeAdapter(luvio, getDevWorkspaceDetails_ldsAdapter, getDevWorkspaceDetailsMetadata),
977
+ getDevWorkspaceMetadata_imperative: createImperativeAdapter(luvio, getDevWorkspaceMetadata_ldsAdapter, getDevWorkspaceMetadataMetadata),
978
+ getDevWorkspaces_imperative: createImperativeAdapter(luvio, getDevWorkspaces_ldsAdapter, getDevWorkspacesMetadata),
979
+ // Notify Update Availables
980
+ };
981
+ }
982
+ withDefaultLuvio((luvio) => {
983
+ ({
984
+ getDevWorkspaceDetails,
985
+ getDevWorkspaceMetadata,
986
+ getDevWorkspaceMetadataNotifyChange,
987
+ getDevWorkspaces,
988
+ updateDevWorkspaceMetadata,
989
+ getDevWorkspaceDetails_imperative,
990
+ getDevWorkspaceMetadata_imperative,
991
+ getDevWorkspaces_imperative,
992
+ } = bindExportsTo(luvio));
993
+ });
994
+
995
+ export { getDevWorkspaceDetails, getDevWorkspaceDetails_imperative, getDevWorkspaceMetadata, getDevWorkspaceMetadataNotifyChange, getDevWorkspaceMetadata_imperative, getDevWorkspaces, getDevWorkspaces_imperative, updateDevWorkspaceMetadata };
996
+ // version: 0.1.0-dev1-c978a7b010