@manyos/smileconnect-api 1.64.9 → 1.65.1

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/docs/releases.md CHANGED
@@ -1,6 +1,9 @@
1
1
  # Release Notes
2
2
 
3
3
  ## API
4
+ ### 1.65.1 - 01.03.24
5
+ Add foundation data to dynamic api spec
6
+
4
7
  ### 1.64.8 - 26.10.23
5
8
  Add port in Metadata Request.
6
9
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@manyos/smileconnect-api",
3
- "version": "1.64.9",
3
+ "version": "1.65.1",
4
4
  "description": "A proxy and abstraction layer for BMCs IT Service Management Suite",
5
5
  "main": "app.js",
6
6
  "scripts": {
package/util/config.js CHANGED
@@ -341,7 +341,7 @@ async function getDesignPackage(clientId) {
341
341
  let paths = {}
342
342
 
343
343
  //generate docs for normal tickets
344
- const keys = Object.keys(ticketConfig)
344
+ const keys = Object.keys(ticketConfig);
345
345
 
346
346
  for (let x=0; x<keys.length; x++) {
347
347
  const key = keys[x]
@@ -365,6 +365,40 @@ async function getDesignPackage(clientId) {
365
365
  }
366
366
  }
367
367
 
368
+ //foundation data & templates
369
+ const foundationKeys = [
370
+ {
371
+ type: "organisation",
372
+ path: "/v1/organisation",
373
+ name: "Organisation",
374
+ form: CONSTANTS.FORM_ORGANISATION
375
+ },
376
+ {
377
+ type: "supportGroup",
378
+ path: "/v1/supportgroups",
379
+ name: "Support Group",
380
+ form: CONSTANTS.FORM_SUPPORTGROUP
381
+ },
382
+ {
383
+ type: "person",
384
+ path: "/v1/persons",
385
+ name: "Person",
386
+ form: CONSTANTS.FORM_PEOPLE
387
+ }
388
+ ];
389
+
390
+ for (let x=0; x<foundationKeys.length; x++) {
391
+ const key = foundationKeys[x]
392
+ const orgConfig = clientConfig[key.type];
393
+ if (orgConfig) {
394
+ if (orgConfig.fields && orgConfig.fields.length > 0) {
395
+ const mapping = getDeprecatedMappingAsCustom(key.type);
396
+ schemas[key.type] = await getObjectSchema(orgConfig.fields, mapping, key.form);
397
+ paths = {...paths, ...await getPathDef(key.name, key.path, key.type, false, true, true)}
398
+ }
399
+ }
400
+ }
401
+
368
402
 
369
403
  //generate docs for custom Forms
370
404
  const customFormMappings = await getCustomFormMapping()
@@ -632,7 +666,7 @@ const ticketConfig = {
632
666
  "requestIdField": "Entry ID",
633
667
  "requestType": "incident",
634
668
  "ticketIdField": "Incident Number",
635
- businessServiceReconIdField: "ServiceCI_ReconID",
669
+ "businessServiceReconIdField": "ServiceCI_ReconID",
636
670
  "requestTypeWorkLog": "incidentWorklog",
637
671
  "requestTemplate": "incidentTemplate",
638
672
  "baseURI": "/v1/incidents",
@@ -651,7 +685,7 @@ const ticketConfig = {
651
685
  "requestIdField": "Request ID",
652
686
  "requestType": "change",
653
687
  "ticketIdField": "Infrastructure Change Id",
654
- businessServiceReconIdField: "ServiceCI_ReconID",
688
+ "businessServiceReconIdField": "ServiceCI_ReconID",
655
689
  "requestTypeWorkLog": "changeWorklog",
656
690
  "requestTemplate": "changeTemplate",
657
691
  "baseURI": "/v1/changes",
@@ -670,7 +704,7 @@ const ticketConfig = {
670
704
  "requestIdField": "Sys-Problem Investigation ID",
671
705
  "requestType": "problem",
672
706
  "ticketIdField": "Problem Investigation ID",
673
- businessServiceReconIdField: "ServiceCI_ReconID",
707
+ "businessServiceReconIdField": "ServiceCI_ReconID",
674
708
  "requestTypeWorkLog": "problemWorklog",
675
709
  "requestTemplate": "problemTemplate",
676
710
  "baseURI": "/v1/problems",