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