@crewdle/web-sdk-types 1.0.23 → 1.0.25

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 (153) hide show
  1. package/dist/core/cluster/Cluster.d.ts +16 -1
  2. package/dist/core/sdk/SDKOptions.d.ts +6 -1
  3. package/dist/core/stream/ContentType.d.ts +5 -1
  4. package/dist/core/stream/ContentType.js +4 -0
  5. package/dist/external-storage/ExternalStorageConnection.d.ts +54 -0
  6. package/dist/external-storage/ExternalStorageConnection.js +10 -0
  7. package/dist/external-storage/ExternalStorageConnectionConnector.d.ts +25 -0
  8. package/dist/external-storage/ExternalStorageConnectionConnectorConstructor.d.ts +6 -0
  9. package/dist/external-storage/ExternalStorageListOptions.d.ts +10 -0
  10. package/dist/external-storage/index.d.ts +4 -0
  11. package/dist/external-storage/index.js +4 -0
  12. package/dist/generative-ai/GenerativeAIContext.d.ts +42 -0
  13. package/dist/generative-ai/GenerativeAIJobType.d.ts +18 -0
  14. package/dist/{ai → generative-ai}/GenerativeAIWorkerConnector.d.ts +3 -1
  15. package/dist/generative-ai/IIndex.d.ts +18 -0
  16. package/dist/generative-ai/IIndex.js +1 -0
  17. package/dist/generative-ai/NLPLibraryConnector.js +1 -0
  18. package/dist/generative-ai/NLPLibraryConnectorConstructor.js +1 -0
  19. package/dist/{ai → generative-ai}/index.d.ts +6 -3
  20. package/dist/{ai → generative-ai}/index.js +6 -3
  21. package/dist/generative-ai/job/JobParametersGenerativeAI.d.ts +15 -0
  22. package/dist/generative-ai/job/JobParametersGenerativeAI.js +1 -0
  23. package/dist/generative-ai/job/JobResultGenerativeAI.d.ts +17 -0
  24. package/dist/generative-ai/job/JobResultGenerativeAI.js +1 -0
  25. package/dist/generative-ai/job/index.d.ts +2 -0
  26. package/dist/generative-ai/job/index.js +2 -0
  27. package/dist/generative-ai/jobs/download-document/GenerativeAIDownloadDocumentCreateJobParameters.d.ts +20 -0
  28. package/dist/generative-ai/jobs/download-document/GenerativeAIDownloadDocumentCreateJobParameters.js +1 -0
  29. package/dist/generative-ai/jobs/download-document/GenerativeAIDownloadDocumentJob.d.ts +25 -0
  30. package/dist/generative-ai/jobs/download-document/GenerativeAIDownloadDocumentJob.js +1 -0
  31. package/dist/generative-ai/jobs/download-document/GenerativeAIDownloadDocumentResult.d.ts +24 -0
  32. package/dist/generative-ai/jobs/download-document/GenerativeAIDownloadDocumentResult.js +1 -0
  33. package/dist/generative-ai/jobs/download-document/GenerativeAIDownloadDocumentWorkerParameters.d.ts +20 -0
  34. package/dist/generative-ai/jobs/download-document/GenerativeAIDownloadDocumentWorkerParameters.js +1 -0
  35. package/dist/generative-ai/jobs/download-document/index.d.ts +4 -0
  36. package/dist/generative-ai/jobs/download-document/index.js +4 -0
  37. package/dist/generative-ai/jobs/generic/GenerativeAICreateJobParameters.d.ts +11 -0
  38. package/dist/generative-ai/jobs/generic/GenerativeAICreateJobParameters.js +1 -0
  39. package/dist/generative-ai/jobs/generic/GenerativeAIJob.d.ts +10 -0
  40. package/dist/generative-ai/jobs/generic/GenerativeAIJob.js +1 -0
  41. package/dist/generative-ai/jobs/generic/GenerativeAIOptions.d.ts +7 -0
  42. package/dist/generative-ai/jobs/generic/GenerativeAIOptions.js +6 -0
  43. package/dist/generative-ai/jobs/generic/GenerativeAIWorkerConnectorParameters.d.ts +11 -0
  44. package/dist/generative-ai/jobs/generic/GenerativeAIWorkerConnectorParameters.js +1 -0
  45. package/dist/generative-ai/jobs/generic/GenerativeAIWorkerParameters.d.ts +12 -0
  46. package/dist/generative-ai/jobs/generic/GenerativeAIWorkerParameters.js +1 -0
  47. package/dist/generative-ai/jobs/generic/index.d.ts +5 -0
  48. package/dist/generative-ai/jobs/generic/index.js +5 -0
  49. package/dist/generative-ai/jobs/index.d.ts +4 -0
  50. package/dist/generative-ai/jobs/index.js +4 -0
  51. package/dist/generative-ai/jobs/prompt/GenerativeAIPromptCreateJobParameters.d.ts +21 -0
  52. package/dist/generative-ai/jobs/prompt/GenerativeAIPromptCreateJobParameters.js +1 -0
  53. package/dist/generative-ai/jobs/prompt/GenerativeAIPromptJob.d.ts +26 -0
  54. package/dist/generative-ai/jobs/prompt/GenerativeAIPromptJob.js +1 -0
  55. package/dist/generative-ai/jobs/prompt/GenerativeAIPromptOptions.d.ts +43 -0
  56. package/dist/generative-ai/jobs/prompt/GenerativeAIPromptOptions.js +1 -0
  57. package/dist/generative-ai/jobs/prompt/GenerativeAIPromptResult.d.ts +37 -0
  58. package/dist/generative-ai/jobs/prompt/GenerativeAIPromptResult.js +1 -0
  59. package/dist/generative-ai/jobs/prompt/GenerativeAIPromptWorkerConnectorParameters.d.ts +17 -0
  60. package/dist/generative-ai/jobs/prompt/GenerativeAIPromptWorkerConnectorParameters.js +1 -0
  61. package/dist/generative-ai/jobs/prompt/GenerativeAIPromptWorkerParameters.d.ts +20 -0
  62. package/dist/generative-ai/jobs/prompt/GenerativeAIPromptWorkerParameters.js +1 -0
  63. package/dist/generative-ai/jobs/prompt/GenerativeAIWorkerConnectorPromptResult.d.ts +7 -0
  64. package/dist/generative-ai/jobs/prompt/GenerativeAIWorkerConnectorPromptResult.js +1 -0
  65. package/dist/generative-ai/jobs/prompt/index.d.ts +9 -0
  66. package/dist/generative-ai/jobs/prompt/index.js +9 -0
  67. package/dist/generative-ai/jobs/prompt/options/PromptFunction.d.ts +22 -0
  68. package/dist/generative-ai/jobs/prompt/options/PromptFunction.js +1 -0
  69. package/dist/generative-ai/jobs/prompt/options/PromptFunctionParams.d.ts +11 -0
  70. package/dist/generative-ai/jobs/prompt/options/PromptFunctionParams.js +1 -0
  71. package/dist/generative-ai/jobs/prompt/options/PromptFunctionParamsType.d.ts +17 -0
  72. package/dist/generative-ai/jobs/prompt/options/PromptFunctionParamsType.js +18 -0
  73. package/dist/generative-ai/jobs/prompt/options/PromptHistory.d.ts +16 -0
  74. package/dist/generative-ai/jobs/prompt/options/PromptHistory.js +2 -0
  75. package/dist/generative-ai/jobs/prompt/options/PromptSource.d.ts +14 -0
  76. package/dist/generative-ai/jobs/prompt/options/PromptSource.js +16 -0
  77. package/dist/generative-ai/jobs/prompt/options/index.d.ts +5 -0
  78. package/dist/generative-ai/jobs/prompt/options/index.js +5 -0
  79. package/dist/generative-ai/jobs/prompt/result/PromptTypeText.d.ts +4 -0
  80. package/dist/generative-ai/jobs/prompt/result/PromptTypeText.js +1 -0
  81. package/dist/generative-ai/jobs/prompt/result/PromptTypeVector.d.ts +4 -0
  82. package/dist/generative-ai/jobs/prompt/result/PromptTypeVector.js +1 -0
  83. package/dist/generative-ai/jobs/prompt/result/index.d.ts +2 -0
  84. package/dist/generative-ai/jobs/prompt/result/index.js +2 -0
  85. package/dist/generative-ai/jobs/rating/GenerativeAIRating.d.ts +8 -0
  86. package/dist/generative-ai/jobs/rating/GenerativeAIRating.js +9 -0
  87. package/dist/generative-ai/jobs/rating/GenerativeAIRatingCreateJobParameters.d.ts +26 -0
  88. package/dist/generative-ai/jobs/rating/GenerativeAIRatingCreateJobParameters.js +1 -0
  89. package/dist/generative-ai/jobs/rating/GenerativeAIRatingJob.d.ts +25 -0
  90. package/dist/generative-ai/jobs/rating/GenerativeAIRatingJob.js +1 -0
  91. package/dist/generative-ai/jobs/rating/GenerativeAIRatingOptions.d.ts +16 -0
  92. package/dist/generative-ai/jobs/rating/GenerativeAIRatingOptions.js +1 -0
  93. package/dist/generative-ai/jobs/rating/GenerativeAIRatingResult.d.ts +18 -0
  94. package/dist/generative-ai/jobs/rating/GenerativeAIRatingResult.js +1 -0
  95. package/dist/generative-ai/jobs/rating/GenerativeAIRatingStatus.d.ts +8 -0
  96. package/dist/generative-ai/jobs/rating/GenerativeAIRatingStatus.js +9 -0
  97. package/dist/generative-ai/jobs/rating/GenerativeAIRatingWorkerParameters.d.ts +29 -0
  98. package/dist/generative-ai/jobs/rating/GenerativeAIRatingWorkerParameters.js +1 -0
  99. package/dist/generative-ai/jobs/rating/index.d.ts +7 -0
  100. package/dist/generative-ai/jobs/rating/index.js +7 -0
  101. package/dist/generative-ai/search/SearchConnector.js +1 -0
  102. package/dist/generative-ai/search/SearchConnectorConstructor.js +1 -0
  103. package/dist/generative-ai/search/SearchResult.d.ts +19 -0
  104. package/dist/generative-ai/search/SearchResult.js +5 -0
  105. package/dist/generative-ai/search/index.d.ts +3 -0
  106. package/dist/generative-ai/search/index.js +3 -0
  107. package/dist/generative-ai/union-types/CreateAIJobParameters.d.ts +8 -0
  108. package/dist/generative-ai/union-types/CreateAIJobParameters.js +1 -0
  109. package/dist/generative-ai/union-types/GenerativeAIJob.d.ts +8 -0
  110. package/dist/generative-ai/union-types/GenerativeAIJob.js +1 -0
  111. package/dist/generative-ai/union-types/GenerativeAIJobOptions.d.ts +7 -0
  112. package/dist/generative-ai/union-types/GenerativeAIJobOptions.js +1 -0
  113. package/dist/generative-ai/union-types/GenerativeAIJobResult.d.ts +9 -0
  114. package/dist/generative-ai/union-types/GenerativeAIJobResult.js +1 -0
  115. package/dist/generative-ai/union-types/GenerativeAIWorkerConnectorParameters.d.ts +6 -0
  116. package/dist/generative-ai/union-types/GenerativeAIWorkerConnectorParameters.js +1 -0
  117. package/dist/generative-ai/union-types/GenerativeAIWorkerConnectorResult.d.ts +12 -0
  118. package/dist/generative-ai/union-types/GenerativeAIWorkerConnectorResult.js +1 -0
  119. package/dist/generative-ai/union-types/GenerativeAIWorkerParameters.d.ts +8 -0
  120. package/dist/generative-ai/union-types/GenerativeAIWorkerParameters.js +1 -0
  121. package/dist/generative-ai/union-types/index.d.ts +7 -0
  122. package/dist/generative-ai/union-types/index.js +7 -0
  123. package/dist/graph-database/GraphDatabase.d.ts +11 -1
  124. package/dist/graph-database/GraphDatabaseConnector.d.ts +11 -1
  125. package/dist/graph-database/GraphDatabaseConnectorConstructor.d.ts +1 -1
  126. package/dist/index.d.ts +2 -1
  127. package/dist/index.js +2 -1
  128. package/dist/object-storage/ObjectStoreBucket.d.ts +1 -1
  129. package/dist/object-storage/event/SyncCompleteEvent.d.ts +2 -2
  130. package/dist/object-storage/event/SyncCompleteEventPayload.d.ts +10 -0
  131. package/dist/object-storage/event/SyncCompleteEventPayload.js +1 -0
  132. package/dist/object-storage/event/index.d.ts +1 -0
  133. package/dist/vector-database/VectorDatabase.d.ts +11 -1
  134. package/dist/vector-database/VectorDatabaseConnector.d.ts +11 -1
  135. package/dist/vector-database/VectorDatabaseConnectorConstructor.d.ts +1 -1
  136. package/package.json +1 -1
  137. package/dist/ai/GenerativeAI.d.ts +0 -328
  138. package/dist/ai/GenerativeAI.js +0 -53
  139. package/dist/ai/GenerativeAIContext.d.ts +0 -132
  140. /package/dist/{ai/GenerativeAIContext.js → external-storage/ExternalStorageConnectionConnector.js} +0 -0
  141. /package/dist/{ai/GenerativeAIWorker.js → external-storage/ExternalStorageConnectionConnectorConstructor.js} +0 -0
  142. /package/dist/{ai/GenerativeAIWorkerConnectorConstructor.js → external-storage/ExternalStorageListOptions.js} +0 -0
  143. /package/dist/{ai/NLPLibraryConnector.js → generative-ai/GenerativeAIContext.js} +0 -0
  144. /package/dist/{ai/NLPLibraryConnectorConstructor.js → generative-ai/GenerativeAIJobType.js} +0 -0
  145. /package/dist/{ai → generative-ai}/GenerativeAIWorker.d.ts +0 -0
  146. /package/dist/{ai/SearchConnector.js → generative-ai/GenerativeAIWorker.js} +0 -0
  147. /package/dist/{ai → generative-ai}/GenerativeAIWorkerConnector.js +0 -0
  148. /package/dist/{ai → generative-ai}/GenerativeAIWorkerConnectorConstructor.d.ts +0 -0
  149. /package/dist/{ai/SearchConnectorConstructor.js → generative-ai/GenerativeAIWorkerConnectorConstructor.js} +0 -0
  150. /package/dist/{ai → generative-ai}/NLPLibraryConnector.d.ts +0 -0
  151. /package/dist/{ai → generative-ai}/NLPLibraryConnectorConstructor.d.ts +0 -0
  152. /package/dist/{ai → generative-ai/search}/SearchConnector.d.ts +0 -0
  153. /package/dist/{ai → generative-ai/search}/SearchConnectorConstructor.d.ts +0 -0
@@ -1,132 +0,0 @@
1
- import { AIJobType, IPromptOptions, IGenerativeAIPromptResult, IRatingOptions, IGenerativeAIRatingResult, PromptRating } from '.';
2
- /**
3
- * Represents bounded prompt job ready to be run or streamed.
4
- */
5
- export interface IGenerativeAIPromptJob {
6
- /**
7
- * The job ID.
8
- */
9
- id: string;
10
- /**
11
- * The prompt to be processed
12
- */
13
- prompt: string;
14
- /**
15
- * The options for the prompt.
16
- */
17
- options: IPromptOptions;
18
- /**
19
- * Run the prompt job.
20
- * @returns A promise that resolves with the result
21
- */
22
- run: () => Promise<IGenerativeAIPromptResult>;
23
- /**
24
- * Stream the prompt job.
25
- * @returns An async generator that yields the result
26
- */
27
- stream: () => AsyncGenerator<IGenerativeAIPromptResult>;
28
- }
29
- /**
30
- * Represents a Generative AI job.
31
- */
32
- export type GenerativeAIJob = IGenerativeAIPromptJob | IGenerativeAIRatingJob;
33
- /**
34
- * Represents bounded rating job ready to be run or streamed.
35
- */
36
- export interface IGenerativeAIRatingJob {
37
- /**
38
- * The job ID.
39
- */
40
- id: string;
41
- /**
42
- * The rating for the job.
43
- */
44
- rating: PromptRating;
45
- /**
46
- * The feedback for the job.
47
- */
48
- feedback?: string;
49
- /**
50
- * The options for the rating.
51
- */
52
- options: IRatingOptions;
53
- /**
54
- * Run the rating job.
55
- * @returns A promise that resolves with the result
56
- */
57
- rate: () => Promise<IGenerativeAIRatingResult>;
58
- }
59
- /**
60
- * Represents the parameters of an AI job.
61
- */
62
- export type CreateAIJobParameters = IGenerativeAIPromptParameters | IGenerativeAIRatingParameters;
63
- /**
64
- * Represents the parameters of a prompt job.
65
- */
66
- export interface IGenerativeAIPromptParameters {
67
- /**
68
- * The prompt job type.
69
- */
70
- type: AIJobType.Prompt;
71
- /**
72
- * The prompt to be processed.
73
- */
74
- prompt: string;
75
- /**
76
- * The options for the prompt.
77
- */
78
- options?: IPromptOptions;
79
- }
80
- /**
81
- * Represents the parameters of a rating job.
82
- */
83
- export interface IGenerativeAIRatingParameters {
84
- /**
85
- * The rating job type.
86
- */
87
- type: AIJobType.Rating;
88
- /**
89
- * The job ID associated with the message.
90
- */
91
- jobId: string;
92
- /**
93
- * The rating of the prompt.
94
- */
95
- rating: PromptRating;
96
- /**
97
- * The feedback for the prompt.
98
- */
99
- feedback?: string;
100
- /**
101
- * The options for the rating.
102
- */
103
- options?: IRatingOptions;
104
- }
105
- /**
106
- * Represents a context for a Generative AI service.
107
- * @category AI
108
- */
109
- export interface IGenerativeAIContext {
110
- /**
111
- * Create an AI job. The job is bounded to the context.
112
- * @param parameters The parameters of the AI job.
113
- * @returns The job ready to be run or streamed.
114
- */
115
- createAIJob(parameters: IGenerativeAIPromptParameters): IGenerativeAIPromptJob;
116
- createAIJob(parameters: IGenerativeAIRatingParameters): IGenerativeAIRatingJob;
117
- /**
118
- * Rate a prompt.
119
- * @param parameters The parameters of the rating job.
120
- * @returns A promise that resolves with the result.
121
- */
122
- ratePrompt(parameters: IGenerativeAIRatingParameters): Promise<IGenerativeAIRatingResult>;
123
- /**
124
- * Get the data bucket IDs.
125
- * @returns An array of data bucket IDs.
126
- */
127
- getDataBucketIds(): Promise<string[]>;
128
- /**
129
- * Close the Generative AI Context.
130
- */
131
- close(): void;
132
- }