@transcend-io/cli 4.108.0 → 4.109.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 (100) hide show
  1. package/README.md +103 -3
  2. package/build/ai/TranscendPromptManager.d.ts +137 -0
  3. package/build/ai/TranscendPromptManager.d.ts.map +1 -0
  4. package/build/ai/TranscendPromptManager.js +159 -0
  5. package/build/ai/TranscendPromptManager.js.map +1 -0
  6. package/build/ai/index.d.ts +1 -1
  7. package/build/ai/index.d.ts.map +1 -1
  8. package/build/ai/index.js +1 -1
  9. package/build/ai/index.js.map +1 -1
  10. package/build/codecs.d.ts +95 -1
  11. package/build/codecs.d.ts.map +1 -1
  12. package/build/codecs.js +56 -2
  13. package/build/codecs.js.map +1 -1
  14. package/build/constants.d.ts.map +1 -1
  15. package/build/constants.js +8 -0
  16. package/build/constants.js.map +1 -1
  17. package/build/enums.d.ts +5 -1
  18. package/build/enums.d.ts.map +1 -1
  19. package/build/enums.js +4 -0
  20. package/build/enums.js.map +1 -1
  21. package/build/graphql/fetchAllActions.js +1 -1
  22. package/build/graphql/fetchAllActions.js.map +1 -1
  23. package/build/graphql/fetchAllAttributeKeys.js +1 -1
  24. package/build/graphql/fetchAllAttributeKeys.js.map +1 -1
  25. package/build/graphql/fetchAllBusinessEntities.js +1 -1
  26. package/build/graphql/fetchAllBusinessEntities.js.map +1 -1
  27. package/build/graphql/fetchAssessmentTemplates.js +1 -1
  28. package/build/graphql/fetchAssessmentTemplates.js.map +1 -1
  29. package/build/graphql/fetchAssessments.js +1 -1
  30. package/build/graphql/fetchAssessments.js.map +1 -1
  31. package/build/graphql/fetchIdentifiers.js +1 -1
  32. package/build/graphql/fetchIdentifiers.js.map +1 -1
  33. package/build/graphql/fetchPromptGroups.d.ts +22 -0
  34. package/build/graphql/fetchPromptGroups.d.ts.map +1 -0
  35. package/build/graphql/fetchPromptGroups.js +32 -0
  36. package/build/graphql/fetchPromptGroups.js.map +1 -0
  37. package/build/graphql/fetchPromptPartials.d.ts +17 -0
  38. package/build/graphql/fetchPromptPartials.d.ts.map +1 -0
  39. package/build/graphql/fetchPromptPartials.js +32 -0
  40. package/build/graphql/fetchPromptPartials.js.map +1 -0
  41. package/build/graphql/fetchPromptTemplates.d.ts +17 -0
  42. package/build/graphql/fetchPromptTemplates.d.ts.map +1 -0
  43. package/build/graphql/fetchPromptTemplates.js +32 -0
  44. package/build/graphql/fetchPromptTemplates.js.map +1 -0
  45. package/build/graphql/fetchPrompts.d.ts +83 -0
  46. package/build/graphql/fetchPrompts.d.ts.map +1 -0
  47. package/build/graphql/fetchPrompts.js +55 -0
  48. package/build/graphql/fetchPrompts.js.map +1 -0
  49. package/build/graphql/gqls/assessment.js +1 -1
  50. package/build/graphql/gqls/index.d.ts +1 -0
  51. package/build/graphql/gqls/index.d.ts.map +1 -1
  52. package/build/graphql/gqls/index.js +1 -0
  53. package/build/graphql/gqls/index.js.map +1 -1
  54. package/build/graphql/gqls/prompt.d.ts +14 -0
  55. package/build/graphql/gqls/prompt.d.ts.map +1 -0
  56. package/build/graphql/gqls/prompt.js +183 -0
  57. package/build/graphql/gqls/prompt.js.map +1 -0
  58. package/build/graphql/index.d.ts +5 -0
  59. package/build/graphql/index.d.ts.map +1 -1
  60. package/build/graphql/index.js +5 -0
  61. package/build/graphql/index.js.map +1 -1
  62. package/build/graphql/pullTranscendConfiguration.d.ts.map +1 -1
  63. package/build/graphql/pullTranscendConfiguration.js +50 -1
  64. package/build/graphql/pullTranscendConfiguration.js.map +1 -1
  65. package/build/graphql/syncConfigurationToTranscend.d.ts.map +1 -1
  66. package/build/graphql/syncConfigurationToTranscend.js +22 -1
  67. package/build/graphql/syncConfigurationToTranscend.js.map +1 -1
  68. package/build/graphql/syncDataSilos.js +2 -2
  69. package/build/graphql/syncDataSilos.js.map +1 -1
  70. package/build/graphql/syncEnrichers.js +2 -2
  71. package/build/graphql/syncEnrichers.js.map +1 -1
  72. package/build/graphql/syncPromptGroups.d.ts +34 -0
  73. package/build/graphql/syncPromptGroups.d.ts.map +1 -0
  74. package/build/graphql/syncPromptGroups.js +126 -0
  75. package/build/graphql/syncPromptGroups.js.map +1 -0
  76. package/build/graphql/syncPromptPartials.d.ts +32 -0
  77. package/build/graphql/syncPromptPartials.d.ts.map +1 -0
  78. package/build/graphql/syncPromptPartials.js +102 -0
  79. package/build/graphql/syncPromptPartials.js.map +1 -0
  80. package/build/graphql/syncPromptTemplates.d.ts +32 -0
  81. package/build/graphql/syncPromptTemplates.d.ts.map +1 -0
  82. package/build/graphql/syncPromptTemplates.js +102 -0
  83. package/build/graphql/syncPromptTemplates.js.map +1 -0
  84. package/build/graphql/syncPrompts.d.ts +32 -0
  85. package/build/graphql/syncPrompts.d.ts.map +1 -0
  86. package/build/graphql/syncPrompts.js +102 -0
  87. package/build/graphql/syncPrompts.js.map +1 -0
  88. package/build/tests/TranscendPromptManager.test.d.ts +2 -0
  89. package/build/tests/TranscendPromptManager.test.d.ts.map +1 -0
  90. package/build/tests/{TranscendAiPrompt.test.js → TranscendPromptManager.test.js} +25 -13
  91. package/build/tests/TranscendPromptManager.test.js.map +1 -0
  92. package/build/tsbuildinfo +1 -1
  93. package/package.json +2 -2
  94. package/build/ai/TranscendAiPrompt.d.ts +0 -59
  95. package/build/ai/TranscendAiPrompt.d.ts.map +0 -1
  96. package/build/ai/TranscendAiPrompt.js +0 -129
  97. package/build/ai/TranscendAiPrompt.js.map +0 -1
  98. package/build/tests/TranscendAiPrompt.test.d.ts +0 -2
  99. package/build/tests/TranscendAiPrompt.test.d.ts.map +0 -1
  100. package/build/tests/TranscendAiPrompt.test.js.map +0 -1
@@ -25,12 +25,18 @@ var __importStar = (this && this.__importStar) || function (mod) {
25
25
  Object.defineProperty(exports, "__esModule", { value: true });
26
26
  const chai_1 = require("chai");
27
27
  const t = __importStar(require("io-ts"));
28
- const TranscendAiPrompt_1 = require("../ai/TranscendAiPrompt");
29
- describe('TranscendAiPrompt', () => {
30
- const aiPrompt = new TranscendAiPrompt_1.TranscendAiPrompt({
31
- title: 'test',
32
- codec: t.array(t.string),
33
- extractFromTag: 'json',
28
+ const TranscendPromptManager_1 = require("../ai/TranscendPromptManager");
29
+ describe('TranscendPromptManager', () => {
30
+ const aiPrompt = new TranscendPromptManager_1.TranscendPromptManager({
31
+ prompts: {
32
+ test: {
33
+ title: 'test',
34
+ paramCodec: t.type({ test: t.string }),
35
+ outputCodec: t.array(t.string),
36
+ extractFromTag: 'json',
37
+ },
38
+ },
39
+ transcendApiKey: '1234',
34
40
  });
35
41
  const TEST_DATA = `
36
42
  Unfortunately the sample dataset provided does not contain enough information to determine who is most important.
@@ -41,7 +47,7 @@ However, here is a JSON string list of fields that could be useful for answering
41
47
  These fields like name, title, department, salary, and tenure co
42
48
  `;
43
49
  it('should remove links', () => {
44
- (0, chai_1.expect)(aiPrompt.parseAiResponse(TEST_DATA)).to.deep.equal([
50
+ (0, chai_1.expect)(aiPrompt.parseAiResponse('test', TEST_DATA)).to.deep.equal([
45
51
  'Name',
46
52
  'Title',
47
53
  'Department',
@@ -61,13 +67,19 @@ These fields like name, title, department, salary, and tenure co
61
67
  }
62
68
  </json>
63
69
  `;
64
- const aiPrompt2 = new TranscendAiPrompt_1.TranscendAiPrompt({
65
- title: 'test',
66
- codec: t.record(t.string, t.string),
67
- extractFromTag: 'json',
70
+ const aiPrompt2 = new TranscendPromptManager_1.TranscendPromptManager({
71
+ prompts: {
72
+ test: {
73
+ title: 'test',
74
+ paramCodec: t.type({ test: t.string }),
75
+ outputCodec: t.record(t.string, t.string),
76
+ extractFromTag: 'json',
77
+ },
78
+ },
79
+ transcendApiKey: '1234',
68
80
  });
69
81
  it('should remove links', () => {
70
- (0, chai_1.expect)(aiPrompt2.parseAiResponse(TEST2_DATA)).to.deep.equal({
82
+ (0, chai_1.expect)(aiPrompt2.parseAiResponse('test', TEST2_DATA)).to.deep.equal({
71
83
  title: 'Ai usage of cli should not require assessment template title',
72
84
  description: 'The note indicates that the AI usage of the CLI should not require an assessment template title.',
73
85
  actionItem: 'Update CLI to not require template title when AI is using it.',
@@ -77,4 +89,4 @@ These fields like name, title, department, salary, and tenure co
77
89
  });
78
90
  });
79
91
  });
80
- //# sourceMappingURL=TranscendAiPrompt.test.js.map
92
+ //# sourceMappingURL=TranscendPromptManager.test.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"TranscendPromptManager.test.js","sourceRoot":"","sources":["../../src/tests/TranscendPromptManager.test.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;AAAA,+BAA8B;AAC9B,yCAA2B;AAC3B,yEAAsE;AAEtE,QAAQ,CAAC,wBAAwB,EAAE,GAAG,EAAE;IACtC,MAAM,QAAQ,GAAG,IAAI,+CAAsB,CAAC;QAC1C,OAAO,EAAE;YACP,IAAI,EAAE;gBACJ,KAAK,EAAE,MAAM;gBACb,UAAU,EAAE,CAAC,CAAC,IAAI,CAAC,EAAE,IAAI,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC;gBACtC,WAAW,EAAE,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,MAAM,CAAC;gBAC9B,cAAc,EAAE,MAAM;aACvB;SACF;QACD,eAAe,EAAE,MAAM;KACxB,CAAC,CAAC;IAEH,MAAM,SAAS,GAAG;;;;;;;CAOnB,CAAC;IAEA,EAAE,CAAC,qBAAqB,EAAE,GAAG,EAAE;QAC7B,IAAA,aAAM,EAAC,QAAQ,CAAC,eAAe,CAAC,MAAM,EAAE,SAAS,CAAC,CAAC,CAAC,EAAE,CAAC,IAAI,CAAC,KAAK,CAAC;YAChE,MAAM;YACN,OAAO;YACP,YAAY;YACZ,QAAQ;YACR,QAAQ;SACT,CAAC,CAAC;IACL,CAAC,CAAC,CAAC;IAEH,MAAM,UAAU,GAAG;;;;;;;;;;;GAWlB,CAAC;IAEF,MAAM,SAAS,GAAG,IAAI,+CAAsB,CAAC;QAC3C,OAAO,EAAE;YACP,IAAI,EAAE;gBACJ,KAAK,EAAE,MAAM;gBACb,UAAU,EAAE,CAAC,CAAC,IAAI,CAAC,EAAE,IAAI,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC;gBACtC,WAAW,EAAE,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,MAAM,EAAE,CAAC,CAAC,MAAM,CAAC;gBACzC,cAAc,EAAE,MAAM;aACvB;SACF;QACD,eAAe,EAAE,MAAM;KACxB,CAAC,CAAC;IAEH,EAAE,CAAC,qBAAqB,EAAE,GAAG,EAAE;QAC7B,IAAA,aAAM,EAAC,SAAS,CAAC,eAAe,CAAC,MAAM,EAAE,UAAU,CAAC,CAAC,CAAC,EAAE,CAAC,IAAI,CAAC,KAAK,CAAC;YAClE,KAAK,EAAE,8DAA8D;YACrE,WAAW,EACT,kGAAkG;YACpG,UAAU,EACR,+DAA+D;YACjE,IAAI,EAAE,iBAAiB;YACvB,QAAQ,EAAE,IAAI;YACd,QAAQ,EAAE,YAAY;SACvB,CAAC,CAAC;IACL,CAAC,CAAC,CAAC;AACL,CAAC,CAAC,CAAC"}