@salesforce/lds-adapters-industries-stagemanagement 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.
package/sfdc/index.js ADDED
@@ -0,0 +1,481 @@
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$1, typeCheckConfig as typeCheckConfig$1, StoreKeyMap, createResourceParams as createResourceParams$1 } from 'force/luvioEngine';
18
+
19
+ const { hasOwnProperty: ObjectPrototypeHasOwnProperty } = Object.prototype;
20
+ const { keys: ObjectKeys$1, create: ObjectCreate$1 } = 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$1(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 = 'stage-management-connect-api';
83
+
84
+ const { keys: ObjectKeys, create: ObjectCreate, assign: ObjectAssign } = Object;
85
+ const { isArray: ArrayIsArray } = Array;
86
+ const { stringify: JSONStringify } = JSON;
87
+ function createLink(ref) {
88
+ return {
89
+ __ref: serializeStructuredKey(ref),
90
+ };
91
+ }
92
+
93
+ function validate$3(obj, path = 'FulfillmentStepInfo') {
94
+ const v_error = (() => {
95
+ if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
96
+ return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
97
+ }
98
+ const obj_actions = obj.actions;
99
+ const path_actions = path + '.actions';
100
+ if (typeof obj_actions !== 'object' || ArrayIsArray(obj_actions) || obj_actions === null) {
101
+ return new TypeError('Expected "object" but received "' + typeof obj_actions + '" (at "' + path_actions + '")');
102
+ }
103
+ const obj_actions_keys = ObjectKeys(obj_actions);
104
+ for (let i = 0; i < obj_actions_keys.length; i++) {
105
+ const key = obj_actions_keys[i];
106
+ const obj_actions_prop = obj_actions[key];
107
+ const path_actions_prop = path_actions + '["' + key + '"]';
108
+ if (obj_actions_prop === undefined) {
109
+ return new TypeError('Expected "defined" but received "' + typeof obj_actions_prop + '" (at "' + path_actions_prop + '")');
110
+ }
111
+ }
112
+ const obj_details = obj.details;
113
+ const path_details = path + '.details';
114
+ if (typeof obj_details !== 'object' || ArrayIsArray(obj_details) || obj_details === null) {
115
+ return new TypeError('Expected "object" but received "' + typeof obj_details + '" (at "' + path_details + '")');
116
+ }
117
+ const obj_details_keys = ObjectKeys(obj_details);
118
+ for (let i = 0; i < obj_details_keys.length; i++) {
119
+ const key = obj_details_keys[i];
120
+ const obj_details_prop = obj_details[key];
121
+ const path_details_prop = path_details + '["' + key + '"]';
122
+ if (obj_details_prop === undefined) {
123
+ return new TypeError('Expected "defined" but received "' + typeof obj_details_prop + '" (at "' + path_details_prop + '")');
124
+ }
125
+ }
126
+ const obj_displayNumber = obj.displayNumber;
127
+ const path_displayNumber = path + '.displayNumber';
128
+ if (typeof obj_displayNumber !== 'number' || (typeof obj_displayNumber === 'number' && Math.floor(obj_displayNumber) !== obj_displayNumber)) {
129
+ return new TypeError('Expected "integer" but received "' + typeof obj_displayNumber + '" (at "' + path_displayNumber + '")');
130
+ }
131
+ const obj_id = obj.id;
132
+ const path_id = path + '.id';
133
+ if (typeof obj_id !== 'string') {
134
+ return new TypeError('Expected "string" but received "' + typeof obj_id + '" (at "' + path_id + '")');
135
+ }
136
+ const obj_name = obj.name;
137
+ const path_name = path + '.name';
138
+ if (typeof obj_name !== 'string') {
139
+ return new TypeError('Expected "string" but received "' + typeof obj_name + '" (at "' + path_name + '")');
140
+ }
141
+ const obj_status = obj.status;
142
+ const path_status = path + '.status';
143
+ if (typeof obj_status !== 'string') {
144
+ return new TypeError('Expected "string" but received "' + typeof obj_status + '" (at "' + path_status + '")');
145
+ }
146
+ const obj_statusReason = obj.statusReason;
147
+ const path_statusReason = path + '.statusReason';
148
+ if (typeof obj_statusReason !== 'string') {
149
+ return new TypeError('Expected "string" but received "' + typeof obj_statusReason + '" (at "' + path_statusReason + '")');
150
+ }
151
+ const obj_stepType = obj.stepType;
152
+ const path_stepType = path + '.stepType';
153
+ if (typeof obj_stepType !== 'string') {
154
+ return new TypeError('Expected "string" but received "' + typeof obj_stepType + '" (at "' + path_stepType + '")');
155
+ }
156
+ })();
157
+ return v_error === undefined ? null : v_error;
158
+ }
159
+
160
+ function validate$2(obj, path = 'StageTransitionEntryInfo') {
161
+ const v_error = (() => {
162
+ if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
163
+ return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
164
+ }
165
+ const obj_createdDate = obj.createdDate;
166
+ const path_createdDate = path + '.createdDate';
167
+ if (typeof obj_createdDate !== 'string') {
168
+ return new TypeError('Expected "string" but received "' + typeof obj_createdDate + '" (at "' + path_createdDate + '")');
169
+ }
170
+ const obj_fulfillmentSteps = obj.fulfillmentSteps;
171
+ const path_fulfillmentSteps = path + '.fulfillmentSteps';
172
+ if (!ArrayIsArray(obj_fulfillmentSteps)) {
173
+ return new TypeError('Expected "array" but received "' + typeof obj_fulfillmentSteps + '" (at "' + path_fulfillmentSteps + '")');
174
+ }
175
+ for (let i = 0; i < obj_fulfillmentSteps.length; i++) {
176
+ const obj_fulfillmentSteps_item = obj_fulfillmentSteps[i];
177
+ const path_fulfillmentSteps_item = path_fulfillmentSteps + '[' + i + ']';
178
+ const referencepath_fulfillmentSteps_itemValidationError = validate$3(obj_fulfillmentSteps_item, path_fulfillmentSteps_item);
179
+ if (referencepath_fulfillmentSteps_itemValidationError !== null) {
180
+ let message = 'Object doesn\'t match FulfillmentStepInfo (at "' + path_fulfillmentSteps_item + '")\n';
181
+ message += referencepath_fulfillmentSteps_itemValidationError.message.split('\n').map((line) => '\t' + line).join('\n');
182
+ return new TypeError(message);
183
+ }
184
+ }
185
+ const obj_name = obj.name;
186
+ const path_name = path + '.name';
187
+ if (typeof obj_name !== 'string') {
188
+ return new TypeError('Expected "string" but received "' + typeof obj_name + '" (at "' + path_name + '")');
189
+ }
190
+ const obj_toStage = obj.toStage;
191
+ const path_toStage = path + '.toStage';
192
+ if (typeof obj_toStage !== 'string') {
193
+ return new TypeError('Expected "string" but received "' + typeof obj_toStage + '" (at "' + path_toStage + '")');
194
+ }
195
+ const obj_transitionId = obj.transitionId;
196
+ const path_transitionId = path + '.transitionId';
197
+ if (typeof obj_transitionId !== 'string') {
198
+ return new TypeError('Expected "string" but received "' + typeof obj_transitionId + '" (at "' + path_transitionId + '")');
199
+ }
200
+ })();
201
+ return v_error === undefined ? null : v_error;
202
+ }
203
+
204
+ function validate$1(obj, path = 'StageValueInfo') {
205
+ const v_error = (() => {
206
+ if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
207
+ return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
208
+ }
209
+ const obj_fulfillmentSteps = obj.fulfillmentSteps;
210
+ const path_fulfillmentSteps = path + '.fulfillmentSteps';
211
+ if (!ArrayIsArray(obj_fulfillmentSteps)) {
212
+ return new TypeError('Expected "array" but received "' + typeof obj_fulfillmentSteps + '" (at "' + path_fulfillmentSteps + '")');
213
+ }
214
+ for (let i = 0; i < obj_fulfillmentSteps.length; i++) {
215
+ const obj_fulfillmentSteps_item = obj_fulfillmentSteps[i];
216
+ const path_fulfillmentSteps_item = path_fulfillmentSteps + '[' + i + ']';
217
+ const referencepath_fulfillmentSteps_itemValidationError = validate$3(obj_fulfillmentSteps_item, path_fulfillmentSteps_item);
218
+ if (referencepath_fulfillmentSteps_itemValidationError !== null) {
219
+ let message = 'Object doesn\'t match FulfillmentStepInfo (at "' + path_fulfillmentSteps_item + '")\n';
220
+ message += referencepath_fulfillmentSteps_itemValidationError.message.split('\n').map((line) => '\t' + line).join('\n');
221
+ return new TypeError(message);
222
+ }
223
+ }
224
+ const obj_isActive = obj.isActive;
225
+ const path_isActive = path + '.isActive';
226
+ if (typeof obj_isActive !== 'boolean') {
227
+ return new TypeError('Expected "boolean" but received "' + typeof obj_isActive + '" (at "' + path_isActive + '")');
228
+ }
229
+ const obj_stageName = obj.stageName;
230
+ const path_stageName = path + '.stageName';
231
+ if (typeof obj_stageName !== 'string') {
232
+ return new TypeError('Expected "string" but received "' + typeof obj_stageName + '" (at "' + path_stageName + '")');
233
+ }
234
+ const obj_stageTransitions = obj.stageTransitions;
235
+ const path_stageTransitions = path + '.stageTransitions';
236
+ if (!ArrayIsArray(obj_stageTransitions)) {
237
+ return new TypeError('Expected "array" but received "' + typeof obj_stageTransitions + '" (at "' + path_stageTransitions + '")');
238
+ }
239
+ for (let i = 0; i < obj_stageTransitions.length; i++) {
240
+ const obj_stageTransitions_item = obj_stageTransitions[i];
241
+ const path_stageTransitions_item = path_stageTransitions + '[' + i + ']';
242
+ const referencepath_stageTransitions_itemValidationError = validate$2(obj_stageTransitions_item, path_stageTransitions_item);
243
+ if (referencepath_stageTransitions_itemValidationError !== null) {
244
+ let message = 'Object doesn\'t match StageTransitionEntryInfo (at "' + path_stageTransitions_item + '")\n';
245
+ message += referencepath_stageTransitions_itemValidationError.message.split('\n').map((line) => '\t' + line).join('\n');
246
+ return new TypeError(message);
247
+ }
248
+ }
249
+ })();
250
+ return v_error === undefined ? null : v_error;
251
+ }
252
+
253
+ const TTL = 10000;
254
+ const VERSION = "80703a0eccf6c5549ed2d91cd6b613c4";
255
+ function validate(obj, path = 'StageMgmtKanbanVisualization') {
256
+ const v_error = (() => {
257
+ if (typeof obj !== 'object' || ArrayIsArray(obj) || obj === null) {
258
+ return new TypeError('Expected "object" but received "' + typeof obj + '" (at "' + path + '")');
259
+ }
260
+ const obj_stages = obj.stages;
261
+ const path_stages = path + '.stages';
262
+ if (!ArrayIsArray(obj_stages)) {
263
+ return new TypeError('Expected "array" but received "' + typeof obj_stages + '" (at "' + path_stages + '")');
264
+ }
265
+ for (let i = 0; i < obj_stages.length; i++) {
266
+ const obj_stages_item = obj_stages[i];
267
+ const path_stages_item = path_stages + '[' + i + ']';
268
+ const referencepath_stages_itemValidationError = validate$1(obj_stages_item, path_stages_item);
269
+ if (referencepath_stages_itemValidationError !== null) {
270
+ let message = 'Object doesn\'t match StageValueInfo (at "' + path_stages_item + '")\n';
271
+ message += referencepath_stages_itemValidationError.message.split('\n').map((line) => '\t' + line).join('\n');
272
+ return new TypeError(message);
273
+ }
274
+ }
275
+ })();
276
+ return v_error === undefined ? null : v_error;
277
+ }
278
+ const RepresentationType = 'StageMgmtKanbanVisualization';
279
+ function normalize(input, existing, path, luvio, store, timestamp) {
280
+ return input;
281
+ }
282
+ const select$1 = function StageMgmtKanbanVisualizationSelect() {
283
+ return {
284
+ kind: 'Fragment',
285
+ version: VERSION,
286
+ private: [],
287
+ opaque: true
288
+ };
289
+ };
290
+ function equals(existing, incoming) {
291
+ if (JSONStringify(incoming) !== JSONStringify(existing)) {
292
+ return false;
293
+ }
294
+ return true;
295
+ }
296
+ const ingest = function StageMgmtKanbanVisualizationIngest(input, path, luvio, store, timestamp) {
297
+ if (process.env.NODE_ENV !== 'production') {
298
+ const validateError = validate(input);
299
+ if (validateError !== null) {
300
+ throw validateError;
301
+ }
302
+ }
303
+ const key = path.fullPath;
304
+ const ttlToUse = TTL;
305
+ ingestShape(input, path, luvio, store, timestamp, ttlToUse, key, normalize, "stage-management-connect-api", VERSION, RepresentationType, equals);
306
+ return createLink(key);
307
+ };
308
+ function getTypeCacheKeys(rootKeySet, luvio, input, fullPathFactory) {
309
+ // root cache key (uses fullPathFactory if keyBuilderFromType isn't defined)
310
+ const rootKey = fullPathFactory();
311
+ rootKeySet.set(rootKey, {
312
+ namespace: keyPrefix,
313
+ representationName: RepresentationType,
314
+ mergeable: false
315
+ });
316
+ }
317
+
318
+ function select(luvio, params) {
319
+ return select$1();
320
+ }
321
+ function keyBuilder$1(luvio, params) {
322
+ return keyPrefix + '::StageMgmtKanbanVisualization:(' + 'recordId:' + params.urlParams.recordId + ')';
323
+ }
324
+ function getResponseCacheKeys(storeKeyMap, luvio, resourceParams, response) {
325
+ getTypeCacheKeys(storeKeyMap, luvio, response, () => keyBuilder$1(luvio, resourceParams));
326
+ }
327
+ function ingestSuccess(luvio, resourceParams, response, snapshotRefresh) {
328
+ const { body } = response;
329
+ const key = keyBuilder$1(luvio, resourceParams);
330
+ luvio.storeIngest(key, ingest, body);
331
+ const snapshot = luvio.storeLookup({
332
+ recordId: key,
333
+ node: select(),
334
+ variables: {},
335
+ }, snapshotRefresh);
336
+ if (process.env.NODE_ENV !== 'production') {
337
+ if (snapshot.state !== 'Fulfilled') {
338
+ throw new Error('Invalid network response. Expected resource response to result in Fulfilled snapshot');
339
+ }
340
+ }
341
+ deepFreeze(snapshot.data);
342
+ return snapshot;
343
+ }
344
+ function ingestError(luvio, params, error, snapshotRefresh) {
345
+ const key = keyBuilder$1(luvio, params);
346
+ const errorSnapshot = luvio.errorSnapshot(error, snapshotRefresh);
347
+ const storeMetadataParams = {
348
+ ttl: TTL,
349
+ namespace: keyPrefix,
350
+ version: VERSION,
351
+ representationName: RepresentationType
352
+ };
353
+ luvio.storeIngestError(key, errorSnapshot, storeMetadataParams);
354
+ return errorSnapshot;
355
+ }
356
+ function createResourceRequest(config) {
357
+ const headers = {};
358
+ return {
359
+ baseUri: '/services/data/v66.0',
360
+ basePath: '/connect/stage-management/kanban-view/' + config.urlParams.recordId + '',
361
+ method: 'get',
362
+ body: null,
363
+ urlParams: config.urlParams,
364
+ queryParams: {},
365
+ headers,
366
+ priority: 'normal',
367
+ };
368
+ }
369
+
370
+ const adapterName = 'getStageDetails';
371
+ const getStageDetails_ConfigPropertyMetadata = [
372
+ generateParamConfigMetadata('recordId', true, 0 /* UrlParameter */, 0 /* String */),
373
+ ];
374
+ const getStageDetails_ConfigPropertyNames = /*#__PURE__*/ buildAdapterValidationConfig(adapterName, getStageDetails_ConfigPropertyMetadata);
375
+ const createResourceParams = /*#__PURE__*/ createResourceParams$1(getStageDetails_ConfigPropertyMetadata);
376
+ function keyBuilder(luvio, config) {
377
+ const resourceParams = createResourceParams(config);
378
+ return keyBuilder$1(luvio, resourceParams);
379
+ }
380
+ function typeCheckConfig(untrustedConfig) {
381
+ const config = {};
382
+ typeCheckConfig$1(untrustedConfig, config, getStageDetails_ConfigPropertyMetadata);
383
+ return config;
384
+ }
385
+ function validateAdapterConfig(untrustedConfig, configPropertyNames) {
386
+ if (!untrustedIsObject(untrustedConfig)) {
387
+ return null;
388
+ }
389
+ if (process.env.NODE_ENV !== 'production') {
390
+ validateConfig(untrustedConfig, configPropertyNames);
391
+ }
392
+ const config = typeCheckConfig(untrustedConfig);
393
+ if (!areRequiredParametersPresent(config, configPropertyNames)) {
394
+ return null;
395
+ }
396
+ return config;
397
+ }
398
+ function adapterFragment(luvio, config) {
399
+ createResourceParams(config);
400
+ return select();
401
+ }
402
+ function onFetchResponseSuccess(luvio, config, resourceParams, response) {
403
+ const snapshot = ingestSuccess(luvio, resourceParams, response, {
404
+ config,
405
+ resolve: () => buildNetworkSnapshot(luvio, config, snapshotRefreshOptions)
406
+ });
407
+ return luvio.storeBroadcast().then(() => snapshot);
408
+ }
409
+ function onFetchResponseError(luvio, config, resourceParams, response) {
410
+ const snapshot = ingestError(luvio, resourceParams, response, {
411
+ config,
412
+ resolve: () => buildNetworkSnapshot(luvio, config, snapshotRefreshOptions)
413
+ });
414
+ return luvio.storeBroadcast().then(() => snapshot);
415
+ }
416
+ function buildNetworkSnapshot(luvio, config, options) {
417
+ const resourceParams = createResourceParams(config);
418
+ const request = createResourceRequest(resourceParams);
419
+ return luvio.dispatchResourceRequest(request, options)
420
+ .then((response) => {
421
+ return luvio.handleSuccessResponse(() => onFetchResponseSuccess(luvio, config, resourceParams, response), () => {
422
+ const cache = new StoreKeyMap();
423
+ getResponseCacheKeys(cache, luvio, resourceParams, response.body);
424
+ return cache;
425
+ });
426
+ }, (response) => {
427
+ return luvio.handleErrorResponse(() => onFetchResponseError(luvio, config, resourceParams, response));
428
+ });
429
+ }
430
+ function buildNetworkSnapshotCachePolicy(context, coercedAdapterRequestContext) {
431
+ return buildNetworkSnapshotCachePolicy$1(context, coercedAdapterRequestContext, buildNetworkSnapshot, undefined, false);
432
+ }
433
+ function buildCachedSnapshotCachePolicy(context, storeLookup) {
434
+ const { luvio, config } = context;
435
+ const selector = {
436
+ recordId: keyBuilder(luvio, config),
437
+ node: adapterFragment(luvio, config),
438
+ variables: {},
439
+ };
440
+ const cacheSnapshot = storeLookup(selector, {
441
+ config,
442
+ resolve: () => buildNetworkSnapshot(luvio, config, snapshotRefreshOptions)
443
+ });
444
+ return cacheSnapshot;
445
+ }
446
+ const getStageDetailsAdapterFactory = (luvio) => function stageManagementConnectApi__getStageDetails(untrustedConfig, requestContext) {
447
+ const config = validateAdapterConfig(untrustedConfig, getStageDetails_ConfigPropertyNames);
448
+ // Invalid or incomplete config
449
+ if (config === null) {
450
+ return null;
451
+ }
452
+ return luvio.applyCachePolicy((requestContext || {}), { config, luvio }, // BuildSnapshotContext
453
+ buildCachedSnapshotCachePolicy, buildNetworkSnapshotCachePolicy);
454
+ };
455
+
456
+ let getStageDetails;
457
+ // Imperative GET Adapters
458
+ let getStageDetails_imperative;
459
+ // Adapter Metadata
460
+ const getStageDetailsMetadata = {
461
+ apiFamily: 'stagemanagement-connect-api',
462
+ name: 'getStageDetails',
463
+ ttl: 10000,
464
+ };
465
+ // Notify Update Available
466
+ function bindExportsTo(luvio) {
467
+ // LDS Adapters
468
+ const getStageDetails_ldsAdapter = createInstrumentedAdapter(createLDSAdapter(luvio, 'getStageDetails', getStageDetailsAdapterFactory), getStageDetailsMetadata);
469
+ return {
470
+ getStageDetails: createWireAdapterConstructor(luvio, getStageDetails_ldsAdapter, getStageDetailsMetadata),
471
+ // Imperative GET Adapters
472
+ getStageDetails_imperative: createImperativeAdapter(luvio, getStageDetails_ldsAdapter, getStageDetailsMetadata),
473
+ // Notify Update Availables
474
+ };
475
+ }
476
+ withDefaultLuvio((luvio) => {
477
+ ({ getStageDetails, getStageDetails_imperative } = bindExportsTo(luvio));
478
+ });
479
+
480
+ export { getStageDetails, getStageDetails_imperative };
481
+ // version: 0.1.0-dev1-c978a7b010
@@ -0,0 +1,127 @@
1
+ #%RAML 1.0
2
+ securedBy:
3
+ - OAuth2
4
+ title: Salesforce Connect API
5
+ version: '61.0'
6
+ mediaType: application/json
7
+ protocols:
8
+ - https
9
+ baseUri: /services/data/v66.0
10
+ securitySchemes:
11
+ OAuth2:
12
+ type: OAuth 2.0
13
+ settings:
14
+ authorizationUri: https://example.com/oauth/authorize
15
+ accessTokenUri: ''
16
+ authorizationGrants:
17
+ - implicit
18
+ annotationTypes:
19
+ oas-readOnly:
20
+ type: boolean
21
+ allowedTargets: TypeDeclaration
22
+ oas-collectionFormat:
23
+ type: string
24
+ oas-body-name:
25
+ type: string
26
+ allowedTargets: TypeDeclaration
27
+ types:
28
+ FulfillmentStepInfo:
29
+ description: Output representation of Fulfillment Step Info Object
30
+ type: object
31
+ properties:
32
+ actions:
33
+ description: Details of actions being performed for a fulfillment step based
34
+ on step type.
35
+ type: object
36
+ properties:
37
+ //:
38
+ type: any
39
+ details:
40
+ description: Details of any other field that may be present for step.
41
+ type: object
42
+ properties:
43
+ //:
44
+ type: any
45
+ displayNumber:
46
+ description: Display number for ordering fulfillment steps.
47
+ type: integer
48
+ id:
49
+ description: Id of fulfillment step.
50
+ type: string
51
+ name:
52
+ description: Name of fulfillment step.
53
+ type: string
54
+ status:
55
+ description: Status of current fulfillment step.
56
+ type: string
57
+ statusReason:
58
+ description: Reason for current status of current fulfillment step.
59
+ type: string
60
+ stepType:
61
+ description: Step type of current fulfillment step.
62
+ type: string
63
+ StageMgmtKanbanVisualization:
64
+ description: Output representation of Stage Management Kanban View
65
+ type: object
66
+ properties:
67
+ stages:
68
+ description: List of information about stage value.
69
+ type: array
70
+ items:
71
+ type: StageValueInfo
72
+ StageTransitionEntryInfo:
73
+ description: Output representation of Stage Transition Entry
74
+ type: object
75
+ properties:
76
+ createdDate:
77
+ description: Created Date for this transition entry.
78
+ type: string
79
+ fulfillmentSteps:
80
+ description: List of fulfillment steps associated with this stage transition.
81
+ type: array
82
+ items:
83
+ type: FulfillmentStepInfo
84
+ name:
85
+ description: Name of the stage transition.
86
+ type: string
87
+ toStage:
88
+ description: Target stage for this transition.
89
+ type: string
90
+ transitionId:
91
+ description: Id of the stage transition.
92
+ type: string
93
+ StageValueInfo:
94
+ description: Output representation of Stage Value Info Object
95
+ type: object
96
+ properties:
97
+ fulfillmentSteps:
98
+ description: List of information about fulfillment steps.
99
+ type: array
100
+ items:
101
+ type: FulfillmentStepInfo
102
+ isActive:
103
+ description: Is Current State.
104
+ type: boolean
105
+ stageName:
106
+ description: Name of stage.
107
+ type: string
108
+ stageTransitions:
109
+ description: List of stage transitions associated with this stage.
110
+ type: array
111
+ items:
112
+ type: StageTransitionEntryInfo
113
+ /connect/stage-management/kanban-view/{recordId}:
114
+ get:
115
+ displayName: getStageManagement
116
+ description: Get stage details
117
+ responses:
118
+ '200':
119
+ description: Success
120
+ body:
121
+ application/json:
122
+ type: StageMgmtKanbanVisualization
123
+ uriParameters:
124
+ recordId:
125
+ description: The Id of ReferenceObject record.
126
+ type: string
127
+ required: true
@@ -0,0 +1,17 @@
1
+ #%RAML 1.0 Overlay
2
+ extends: ./api.raml
3
+
4
+ uses:
5
+ luvio: luvio://annotations.raml
6
+
7
+ (luvio.keyPrefix): 'stage-management-connect-api'
8
+
9
+ types:
10
+ StageMgmtKanbanVisualization:
11
+ (luvio.ttl): 10000
12
+ (luvio.opaque): true
13
+
14
+ /connect/stage-management/kanban-view/{recordId}:
15
+ get:
16
+ (luvio.adapter):
17
+ name: getStageDetails