@salesforce/lds-adapters-service-einsteinllm 1.380.0-dev2 → 1.380.0-dev22

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 (42) hide show
  1. package/dist/es/es2018/service-einsteinllm.js +3314 -1562
  2. package/dist/es/es2018/types/src/generated/adapters/createPromptTemplate.d.ts +2 -3
  3. package/dist/es/es2018/types/src/generated/adapters/createPromptTemplateVersion.d.ts +2 -3
  4. package/dist/es/es2018/types/src/generated/adapters/getDataProviderInstanceConfig.d.ts +31 -0
  5. package/dist/es/es2018/types/src/generated/adapters/getDataProviderTypeConfigs.d.ts +27 -0
  6. package/dist/es/es2018/types/src/generated/adapters/getDataProviders.d.ts +29 -0
  7. package/dist/es/es2018/types/src/generated/adapters/getPromptTemplateVersion.d.ts +30 -0
  8. package/dist/es/es2018/types/src/generated/adapters/getPromptTemplateVersions.d.ts +29 -0
  9. package/dist/es/es2018/types/src/generated/adapters/getTemplateType.d.ts +27 -0
  10. package/dist/es/es2018/types/src/generated/adapters/putEinsteinPromptTemplateVersionStatus.d.ts +18 -0
  11. package/dist/es/es2018/types/src/generated/adapters/updatePromptTemplateVersion.d.ts +2 -3
  12. package/dist/es/es2018/types/src/generated/artifacts/main.d.ts +7 -0
  13. package/dist/es/es2018/types/src/generated/artifacts/sfdc.d.ts +14 -1
  14. package/dist/es/es2018/types/src/generated/resources/getEinsteinPromptTemplateTypesByTemplateTypeName.d.ts +15 -0
  15. package/dist/es/es2018/types/src/generated/resources/getEinsteinPromptTemplatesDataProviderTypesByTemplateType.d.ts +15 -0
  16. package/dist/es/es2018/types/src/generated/resources/getEinsteinPromptTemplatesDataProvidersByTemplateType.d.ts +19 -0
  17. package/dist/es/es2018/types/src/generated/resources/getEinsteinPromptTemplatesVersionsByPromptTemplateDevName.d.ts +19 -0
  18. package/dist/es/es2018/types/src/generated/resources/getEinsteinPromptTemplatesVersionsByPromptTemplateDevNameAndVersionId.d.ts +20 -0
  19. package/dist/es/es2018/types/src/generated/resources/postEinsteinPromptTemplates.d.ts +2 -3
  20. package/dist/es/es2018/types/src/generated/resources/postEinsteinPromptTemplatesDataProviderDescribe.d.ts +19 -0
  21. package/dist/es/es2018/types/src/generated/resources/postEinsteinPromptTemplatesVersionsByPromptTemplateDevName.d.ts +2 -3
  22. package/dist/es/es2018/types/src/generated/resources/putEinsteinPromptTemplatesVersionsByPromptTemplateDevNameAndVersionId.d.ts +2 -3
  23. package/dist/es/es2018/types/src/generated/resources/putEinsteinPromptTemplatesVersionsStatusByPromptTemplateDevNameAndVersionId.d.ts +17 -0
  24. package/dist/es/es2018/types/src/generated/types/EinsteinLlmGenerationCitationRepresentation.d.ts +29 -0
  25. package/dist/es/es2018/types/src/generated/types/EinsteinLlmGenerationGenAiCitedReferenceRepresentation.d.ts +43 -0
  26. package/dist/es/es2018/types/src/generated/types/EinsteinPromptRecordFieldRepresentation.d.ts +3 -3
  27. package/dist/es/es2018/types/src/generated/types/EinsteinPromptRecordInputRepresentation.d.ts +5 -8
  28. package/dist/es/es2018/types/src/generated/types/EinsteinPromptTemplateGenerationsRepresentation.d.ts +7 -1
  29. package/dist/es/es2018/types/src/generated/types/EinsteinPromptTypeRecordRepresentation.d.ts +35 -0
  30. package/dist/es/es2018/types/src/generated/types/EinsteinPromptTypeSchemaInputFieldRepresentation.d.ts +37 -0
  31. package/dist/es/es2018/types/src/generated/types/EinsteinPromptTypeSchemaRepresentation.d.ts +35 -0
  32. package/dist/es/es2018/types/src/generated/types/PromptTemplateDataProviderInstanceConfigCollectionRepresentation.d.ts +3 -3
  33. package/dist/es/es2018/types/src/generated/types/PromptTemplateDataProviderInstanceConfigInputRepresentation.d.ts +5 -5
  34. package/dist/es/es2018/types/src/generated/types/PromptTemplateDataProviderInstanceConfigRepresentation.d.ts +6 -5
  35. package/dist/es/es2018/types/src/generated/types/PromptTemplateDataProviderOutputParamRepresentation.d.ts +4 -1
  36. package/dist/es/es2018/types/src/generated/types/PromptTemplateDataProviderTypeConfigCollectionRepresentation.d.ts +30 -0
  37. package/dist/es/es2018/types/src/generated/types/PromptTemplateDataProviderTypeConfigRepresentation.d.ts +46 -0
  38. package/dist/es/es2018/types/src/generated/types/WrappedMap.d.ts +3 -3
  39. package/package.json +4 -4
  40. package/sfdc/index.js +2942 -1123
  41. package/src/raml/api.raml +286 -18
  42. package/src/raml/luvio.raml +41 -0
package/src/raml/api.raml CHANGED
@@ -356,7 +356,7 @@ types:
356
356
  type: string
357
357
  value:
358
358
  description: The value of a field in its raw data form.
359
- type: boolean | integer | string | nil
359
+ type: boolean | integer | string | string[] | nil # TODO Hand-rolled W-20175352
360
360
  EinsteinPromptRecordInputRepresentation:
361
361
  description: Input representation for creating a prompt template
362
362
  type: object
@@ -372,19 +372,14 @@ types:
372
372
  type: any # TODO Hand-rolled W-18886332
373
373
  fields:
374
374
  description: GenAiPromptTemplate Fields
375
- type: array
376
- items:
377
- type: object
378
- properties:
379
- //:
380
- type: any # TODO Hand-rolled W-18886332
375
+ type: object
376
+ properties:
377
+ //:
378
+ type: any # TODO Hand-rolled W-18886332
381
379
  id:
382
380
  description: The ID of the prompt template
383
381
  type: string
384
382
  required: false # TODO Hand-rolled W-18886332
385
- isStandard:
386
- description: isStandard
387
- type: boolean
388
383
  EinsteinPromptRecordRepresentation:
389
384
  description: Representation of a single Prompt Template
390
385
  type: object
@@ -467,6 +462,10 @@ types:
467
462
  description: Output of a einstein llm generations response for given prompt template
468
463
  type: object
469
464
  properties:
465
+ citations:
466
+ description: Generation Citations Mapping
467
+ required: false # TODO Hand-rolled W-19304625
468
+ type: EinsteinLlmGenerationCitationRepresentation
470
469
  generationErrors:
471
470
  description: generated prompt template generationErrors
472
471
  type: array
@@ -485,6 +484,9 @@ types:
485
484
  prompt:
486
485
  description: Prompt used for the generation
487
486
  type: string | nil # Hand-rolled union 'nil'
487
+ rawPrompt:
488
+ description: Raw prompt with unresolved merge fields
489
+ type: string | nil # Hand-rolled union 'nil'
488
490
  promptTemplateDevName:
489
491
  description: generated prompt template promptTemplateDevName
490
492
  type: string
@@ -518,6 +520,49 @@ types:
518
520
  required: false # TODO Hand-rolled W-17552098
519
521
  items:
520
522
  type: EinsteinPromptTemplateAttachmentRepresentation
523
+ EinsteinLlmGenerationCitationRepresentation:
524
+ description: Output of a Einstein LLM Generation Citation output
525
+ type: object
526
+ properties:
527
+ citedReferences:
528
+ description: Cited References
529
+ required: false # TODO Hand-rolled W-19304625
530
+ type: array
531
+ items:
532
+ type: EinsteinLlmGenerationGenAiCitedReferenceRepresentation
533
+ EinsteinLlmGenerationGenAiCitedReferenceRepresentation:
534
+ description: Output of a Einstein LLM Generation Gen AI Citation output
535
+ type: object
536
+ properties:
537
+ citationLocations:
538
+ description: Array of locations where that particular citation needs to appear
539
+ in the input text
540
+ type: array
541
+ required: false # TODO Hand-rolled W-19304625
542
+ items:
543
+ type: integer
544
+ claims:
545
+ description: Matching chunk from the input text
546
+ type: array
547
+ required: false # TODO Hand-rolled W-19304625
548
+ items:
549
+ type: string
550
+ link:
551
+ description: Link
552
+ type: string
553
+ required: false # TODO Hand-rolled W-19304625
554
+ label:
555
+ description: Label
556
+ type: string
557
+ required: false
558
+ sourceObjectApiName:
559
+ description: SourceObjectApiName
560
+ type: string
561
+ required: false # TODO Hand-rolled W-19304625
562
+ sourceObjectRecordId:
563
+ description: SourceObjectRecordId
564
+ type: string
565
+ required: false # TODO Hand-rolled W-19304625
521
566
  EinsteinPromptTemplateAttachmentRepresentation:
522
567
  description: Representation of file data for prompt template attachments
523
568
  type: object
@@ -645,6 +690,56 @@ types:
645
690
  languageDisplayName:
646
691
  description: Language Display Name
647
692
  type: string
693
+ EinsteinPromptTypeRecordRepresentation:
694
+ description: Representation of a single Prompt Template Type
695
+ type: object
696
+ properties:
697
+ excludedGlobalVariables:
698
+ description: The list of excluded global variables
699
+ type: array
700
+ items:
701
+ type: string
702
+ schema:
703
+ description: The schema of the prompt template type
704
+ type: EinsteinPromptTypeSchemaRepresentation
705
+ templateTypeName:
706
+ description: The unique name of the prompt template type
707
+ type: string
708
+ EinsteinPromptTypeSchemaInputFieldRepresentation:
709
+ description: Representation of an input in the schema of Prompt Template Type
710
+ type: object
711
+ properties:
712
+ apiName:
713
+ description: The unique API name of the input
714
+ type: string
715
+ label:
716
+ description: The label of the input
717
+ type: string
718
+ required: false
719
+ referenceName:
720
+ description: The reference name of the input
721
+ type: string
722
+ required: false
723
+ typeDefinition:
724
+ description: The type definition of the input
725
+ type: string
726
+ required: false
727
+ EinsteinPromptTypeSchemaRepresentation:
728
+ description: Representation of the schema of a Prompt Template type
729
+ type: object
730
+ properties:
731
+ allowInputExtension:
732
+ description: Whether to allow input extension
733
+ type: boolean
734
+ inputs:
735
+ description: Inputs in this template type
736
+ type: array
737
+ items:
738
+ type: EinsteinPromptTypeSchemaInputFieldRepresentation
739
+ primaryObjectId:
740
+ description: The ID of the primary object in the template type
741
+ type: string
742
+ required: false
648
743
  PromptTemplateDataProviderDiscoveryInputRepresentation:
649
744
  description: Input for data provider discovery API to find available data providers
650
745
  based on criteria
@@ -699,9 +794,10 @@ types:
699
794
  additionalParam:
700
795
  description: Additional parameters for the data provider configuration
701
796
  type: object
797
+ required: false # TODO Hand-rolled W-18968514
702
798
  properties:
703
799
  //:
704
- type: object
800
+ type: any #TODO Hand-rolled W-18968514
705
801
  definition:
706
802
  description: The definition of the data provider instance
707
803
  type: string
@@ -757,6 +853,7 @@ types:
757
853
  nodeIcon:
758
854
  description: The icon identifier for the data provider instance
759
855
  type: string | nil
856
+ required: false # TODO Hand-rolled W-18968514
760
857
  outputParams:
761
858
  description: The list of all output parameters for the data provider instance
762
859
  type: array
@@ -786,6 +883,49 @@ types:
786
883
  label:
787
884
  description: The label of the output parameter
788
885
  type: string
886
+ type:
887
+ description: The type of the output parameter
888
+ type: string
889
+ required: false # TODO Hand-rolled W-19622413
890
+ PromptTemplateDataProviderTypeConfigCollectionRepresentation:
891
+ description: Collection of data provider type configurations for a prompt template
892
+ type
893
+ type: object
894
+ properties:
895
+ dataProviderTypeConfigs:
896
+ description: List of data provider type configs
897
+ type: array
898
+ items:
899
+ type: PromptTemplateDataProviderTypeConfigRepresentation
900
+ PromptTemplateDataProviderTypeConfigRepresentation:
901
+ description: Output representation of a data provider type configuration
902
+ type: object
903
+ properties:
904
+ description:
905
+ description: The localized description of the data provider type
906
+ type: string
907
+ required: false # TODO Hand-rolled W-19333313
908
+ groupName:
909
+ description: The group name of the data provider type
910
+ type: string
911
+ icon:
912
+ description: The icon identifier for the data provider type
913
+ type: string
914
+ isTopLevel:
915
+ description: Indicates whether this is a top level data provider type
916
+ type: boolean
917
+ label:
918
+ description: The localized label of the data provider type
919
+ type: string
920
+ parentNode:
921
+ description: The parent node identifier for hierarchical data provider types
922
+ type: string
923
+ required: false # TODO Hand-rolled W-19333313
924
+ scope:
925
+ description: The scope configuration for the data provider type (can be 'ALL'
926
+ or list of specific scopes)
927
+ type: any # TODO Hand-rolled W-19333313, scope can be a string, list of string, or just "ALL"
928
+ required: false # TODO Hand-rolled W-19333313
789
929
  EinsteinPromptTemplateVersionOutputLanguagesRepresentation:
790
930
  description: Representation of all supported output languages for a given Prompt
791
931
  Template Version
@@ -828,7 +968,7 @@ types:
828
968
  type: object
829
969
  properties:
830
970
  //:
831
- type: object
971
+ type: any
832
972
  WrappedValue:
833
973
  description: Wrapped Object for use in Einstein LLM.
834
974
  type: object
@@ -945,20 +1085,78 @@ types:
945
1085
  application/json:
946
1086
  type: EinsteinPromptRecordInputRepresentation
947
1087
  (oas-body-name): templateInput
948
- /prompt-templates/data-providers/mapped:
1088
+ /prompt-templates/data-providers:
1089
+ /mapped:
1090
+ post:
1091
+ displayName: postDataProviderInputMatchDiscovery
1092
+ description: Get Data Provider Discovery Info List
1093
+ responses:
1094
+ '200':
1095
+ description: Success
1096
+ body:
1097
+ application/json:
1098
+ type: PromptTemplateDataProviderInstanceConfigCollectionRepresentation
1099
+ body:
1100
+ application/json:
1101
+ type: PromptTemplateDataProviderDiscoveryInputRepresentation
1102
+ (oas-body-name): dataProviderDiscoveryInput
1103
+ /{templateType}:
1104
+ get:
1105
+ displayName: getPromptTemplateDataProviderDiscovery
1106
+ description: Discover available data providers for prompt templates
1107
+ responses:
1108
+ '200':
1109
+ description: Success
1110
+ body:
1111
+ application/json:
1112
+ type: PromptTemplateDataProviderInstanceConfigCollectionRepresentation
1113
+ queryParameters:
1114
+ groupNames:
1115
+ description: The group names for data provider discovery
1116
+ type: array
1117
+ required: false
1118
+ items:
1119
+ type: string
1120
+ (oas-collectionFormat): csv
1121
+ targets:
1122
+ description: The scoped targets for data provider discovery
1123
+ type: array
1124
+ required: false
1125
+ items:
1126
+ type: string
1127
+ (oas-collectionFormat): csv
1128
+ uriParameters:
1129
+ templateType:
1130
+ type: string
1131
+ required: true
1132
+ /prompt-templates/data-provider/describe:
949
1133
  post:
950
- displayName: postDataProviderInputMatchDiscovery
951
- description: Get Data Provider Discovery Info List
1134
+ displayName: postPromptTemplateDataProviderInstanceConfig
1135
+ description: Get Data Provider Instance Configuration for given definition name
952
1136
  responses:
953
1137
  '200':
954
1138
  description: Success
955
1139
  body:
956
1140
  application/json:
957
- type: PromptTemplateDataProviderInstanceConfigCollectionRepresentation
1141
+ type: PromptTemplateDataProviderInstanceConfigRepresentation
958
1142
  body:
959
1143
  application/json:
960
- type: PromptTemplateDataProviderDiscoveryInputRepresentation
961
- (oas-body-name): dataProviderDiscoveryInput
1144
+ type: PromptTemplateDataProviderInstanceConfigInputRepresentation
1145
+ (oas-body-name): dataProviderInstanceConfigInput
1146
+ /prompt-templates/data-provider-types/{templateType}:
1147
+ get:
1148
+ displayName: getPromptTemplateDataProviderTypeConfig
1149
+ description: Get available data provider types for the specified template type
1150
+ responses:
1151
+ '200':
1152
+ description: Success
1153
+ body:
1154
+ application/json:
1155
+ type: PromptTemplateDataProviderTypeConfigCollectionRepresentation
1156
+ uriParameters:
1157
+ templateType:
1158
+ type: string
1159
+ required: true
962
1160
  /prompt-templates/{promptTemplateDevName}:
963
1161
  get:
964
1162
  displayName: getEinsteinPromptTemplate
@@ -978,6 +1176,22 @@ types:
978
1176
  type: string
979
1177
  required: true
980
1178
  /versions:
1179
+ get:
1180
+ displayName: getEinsteinPromptTemplateVersions
1181
+ description: Get Prompt Template Versions by DeveloperName
1182
+ responses:
1183
+ '200':
1184
+ description: Success
1185
+ body:
1186
+ application/json:
1187
+ type: EinsteinPromptRecordRepresentation
1188
+ queryParameters:
1189
+ includingContent:
1190
+ type: boolean
1191
+ required: false
1192
+ includingVersionDetail:
1193
+ type: boolean
1194
+ required: false
981
1195
  post:
982
1196
  displayName: postEinsteinPromptTemplateVersion
983
1197
  description: Create a prompt template Version
@@ -996,6 +1210,22 @@ types:
996
1210
  type: string
997
1211
  required: true
998
1212
  /versions/{versionId}:
1213
+ get:
1214
+ displayName: getEinsteinPromptTemplateVersion
1215
+ description: Get Prompt Template Version by DeveloperName and VersionId
1216
+ responses:
1217
+ '200':
1218
+ description: Success
1219
+ body:
1220
+ application/json:
1221
+ type: EinsteinPromptRecordRepresentation
1222
+ queryParameters:
1223
+ includingContent:
1224
+ type: boolean
1225
+ required: false
1226
+ includingVersionDetail:
1227
+ type: boolean
1228
+ required: false
999
1229
  put:
1000
1230
  displayName: putEinsteinPromptTemplateVersion
1001
1231
  description: Modify a prompt template Version
@@ -1016,6 +1246,30 @@ types:
1016
1246
  versionId:
1017
1247
  type: string
1018
1248
  required: true
1249
+ /versions/{versionId}/status:
1250
+ put:
1251
+ displayName: putEinsteinPromptTemplateVersionStatus
1252
+ description: Update prompt template version status (activate/deactivate)
1253
+ responses:
1254
+ '200':
1255
+ description: Success
1256
+ body:
1257
+ application/json:
1258
+ type: EinsteinPromptTemplateRepresentation
1259
+ queryParameters:
1260
+ action:
1261
+ type: string
1262
+ required: false
1263
+ ignoreWarnings:
1264
+ type: boolean
1265
+ required: false
1266
+ uriParameters:
1267
+ promptTemplateDevName:
1268
+ type: string
1269
+ required: true
1270
+ versionId:
1271
+ type: string
1272
+ required: true
1019
1273
  /prompt-templates/{promptTemplateDevName}/generations:
1020
1274
  post:
1021
1275
  displayName: postEinsteinPromptTemplateGenerations
@@ -1039,6 +1293,20 @@ types:
1039
1293
  promptTemplateDevName:
1040
1294
  type: string
1041
1295
  required: true
1296
+ /prompt-template-types/{templateTypeName}:
1297
+ get:
1298
+ displayName: getEinsteinPromptTemplateType
1299
+ description: Get A Prompt Type Configuration by templateTypeName
1300
+ responses:
1301
+ '200':
1302
+ description: Success
1303
+ body:
1304
+ application/json:
1305
+ type: EinsteinPromptTypeRecordRepresentation
1306
+ uriParameters:
1307
+ templateTypeName:
1308
+ type: string
1309
+ required: true
1042
1310
  /prompt-template/{promptTemplateDevName}/output-languages:
1043
1311
  get:
1044
1312
  displayName: getEinsteinPromptTemplateOutputLanguages
@@ -36,6 +36,14 @@ types:
36
36
  PromptTemplateDataProviderInstanceConfigCollectionRepresentation:
37
37
  (luvio.ttl): 300
38
38
  (luvio.opaque): true
39
+ PromptTemplateDataProviderInstanceConfigRepresentation:
40
+ (luvio.ttl): 300
41
+ (luvio.opaque): true
42
+ PromptTemplateDataProviderTypeConfigCollectionRepresentation:
43
+ (luvio.ttl): 300
44
+ (luvio.opaque): true
45
+ EinsteinPromptTypeRecordRepresentation:
46
+ (luvio.ttl): 300
39
47
 
40
48
  /einstein/llm/prompt/generations:
41
49
  post:
@@ -57,6 +65,23 @@ types:
57
65
  (luvio.adapter):
58
66
  name: getInputMappedDataProviders
59
67
 
68
+ # Treat this POST operation as GET, so LDS can handle automatic caching,
69
+ /einstein/prompt-templates/data-provider/describe:
70
+ post:
71
+ (luvio.method): get
72
+ (luvio.adapter):
73
+ name: getDataProviderInstanceConfig
74
+
75
+ /einstein/prompt-templates/data-providers/{templateType}:
76
+ get:
77
+ (luvio.adapter):
78
+ name: getDataProviders
79
+
80
+ /einstein/prompt-templates/data-provider-types/{templateType}:
81
+ get:
82
+ (luvio.adapter):
83
+ name: getDataProviderTypeConfigs
84
+
60
85
  /einstein/prompt-templates/{promptTemplateDevName}:
61
86
  get:
62
87
  (luvio.adapter):
@@ -71,11 +96,17 @@ types:
71
96
  post:
72
97
  (luvio.adapter):
73
98
  name: createPromptTemplateVersion
99
+ get:
100
+ (luvio.adapter):
101
+ name: getPromptTemplateVersions
74
102
 
75
103
  /einstein/prompt-templates/{promptTemplateDevName}/versions/{versionId}:
76
104
  put:
77
105
  (luvio.adapter):
78
106
  name: updatePromptTemplateVersion
107
+ get:
108
+ (luvio.adapter):
109
+ name: getPromptTemplateVersion
79
110
 
80
111
  /einstein/prompt-template/{promptTemplateDevName}/output-languages:
81
112
  get:
@@ -92,3 +123,13 @@ types:
92
123
  (luvio.method): get
93
124
  (luvio.adapter):
94
125
  name: createEmbeddings
126
+
127
+ /einstein/prompt-templates/{promptTemplateDevName}/versions/{versionId}/status:
128
+ put:
129
+ (luvio.adapter):
130
+ name: putEinsteinPromptTemplateVersionStatus
131
+
132
+ /einstein/prompt-template-types/{templateTypeName}:
133
+ get:
134
+ (luvio.adapter):
135
+ name: getTemplateType