@orq-ai/node 3.6.5 → 3.6.7

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 (120) hide show
  1. package/FUNCTIONS.md +5 -22
  2. package/README.md +45 -47
  3. package/bin/mcp-server.js +43 -43
  4. package/bin/mcp-server.js.map +23 -23
  5. package/docs/sdks/contacts/README.md +5 -9
  6. package/docs/sdks/datasets/README.md +65 -111
  7. package/docs/sdks/deployments/README.md +34 -44
  8. package/docs/sdks/feedback/README.md +5 -9
  9. package/docs/sdks/files/README.md +20 -34
  10. package/docs/sdks/knowledge/README.md +80 -138
  11. package/docs/sdks/metrics/README.md +5 -9
  12. package/docs/sdks/models/README.md +5 -9
  13. package/docs/sdks/prompts/README.md +35 -61
  14. package/docs/sdks/remoteconfigs/README.md +5 -9
  15. package/jsr.json +1 -1
  16. package/lib/config.d.ts +3 -3
  17. package/lib/config.js +3 -3
  18. package/mcp-server/mcp-server.js +1 -1
  19. package/mcp-server/server.js +1 -1
  20. package/models/errors/apierror.d.ts +14 -2
  21. package/models/errors/apierror.d.ts.map +1 -1
  22. package/models/errors/apierror.js +1 -1
  23. package/models/errors/apierror.js.map +1 -1
  24. package/models/operations/bulkcreatedatapoints.js +2 -2
  25. package/models/operations/createcontact.js +2 -2
  26. package/models/operations/createdataset.js +2 -2
  27. package/models/operations/createdatasetitem.js +2 -2
  28. package/models/operations/createdatasource.js +2 -2
  29. package/models/operations/fileget.js +2 -2
  30. package/models/operations/filelist.js +2 -2
  31. package/models/operations/fileupload.js +2 -2
  32. package/models/operations/listdatasetdatapoints.js +2 -2
  33. package/models/operations/listdatasets.js +2 -2
  34. package/models/operations/listdatasources.js +2 -2
  35. package/models/operations/retrievedatapoint.js +2 -2
  36. package/models/operations/retrievedataset.js +2 -2
  37. package/models/operations/retrievedatasource.js +2 -2
  38. package/models/operations/updatedatapoint.js +2 -2
  39. package/models/operations/updatedataset.js +2 -2
  40. package/models/operations/updatedatasource.js +2 -2
  41. package/package.json +1 -1
  42. package/packages/orq-rc/FUNCTIONS.md +5 -22
  43. package/packages/orq-rc/README.md +129 -47
  44. package/packages/orq-rc/docs/sdks/contacts/README.md +344 -11
  45. package/packages/orq-rc/docs/sdks/datasets/README.md +60 -102
  46. package/packages/orq-rc/docs/sdks/deployments/README.md +34 -44
  47. package/packages/orq-rc/docs/sdks/evals/README.md +175 -315
  48. package/packages/orq-rc/docs/sdks/feedback/README.md +5 -9
  49. package/packages/orq-rc/docs/sdks/files/README.md +20 -34
  50. package/packages/orq-rc/docs/sdks/knowledge/README.md +80 -138
  51. package/packages/orq-rc/docs/sdks/metrics/README.md +5 -9
  52. package/packages/orq-rc/docs/sdks/models/README.md +5 -9
  53. package/packages/orq-rc/docs/sdks/prompts/README.md +35 -61
  54. package/packages/orq-rc/docs/sdks/remoteconfigs/README.md +5 -9
  55. package/packages/orq-rc/jsr.json +1 -1
  56. package/packages/orq-rc/package-lock.json +2 -2
  57. package/packages/orq-rc/package.json +1 -1
  58. package/packages/orq-rc/src/funcs/contactsCreate.ts +12 -7
  59. package/packages/orq-rc/src/funcs/contactsDelete.ts +172 -0
  60. package/packages/orq-rc/src/funcs/contactsList.ts +165 -0
  61. package/packages/orq-rc/src/funcs/contactsRetrieve.ts +171 -0
  62. package/packages/orq-rc/src/funcs/contactsUpdate.ts +172 -0
  63. package/packages/orq-rc/src/lib/config.ts +3 -3
  64. package/packages/orq-rc/src/mcp-server/mcp-server.ts +1 -1
  65. package/packages/orq-rc/src/mcp-server/server.ts +9 -1
  66. package/packages/orq-rc/src/mcp-server/tools/contactsCreate.ts +3 -3
  67. package/packages/orq-rc/src/mcp-server/tools/contactsDelete.ts +35 -0
  68. package/packages/orq-rc/src/mcp-server/tools/contactsList.ts +37 -0
  69. package/packages/orq-rc/src/mcp-server/tools/contactsRetrieve.ts +37 -0
  70. package/packages/orq-rc/src/mcp-server/tools/contactsUpdate.ts +37 -0
  71. package/packages/orq-rc/src/models/errors/apierror.ts +18 -3
  72. package/packages/orq-rc/src/models/errors/deletecontact.ts +81 -0
  73. package/packages/orq-rc/src/models/errors/index.ts +3 -0
  74. package/packages/orq-rc/src/models/errors/retrievecontact.ts +81 -0
  75. package/packages/orq-rc/src/models/errors/updatecontact.ts +74 -0
  76. package/packages/orq-rc/src/models/operations/createcontact.ts +30 -19
  77. package/packages/orq-rc/src/models/operations/createdataset.ts +2 -2
  78. package/packages/orq-rc/src/models/operations/createdatasetitem.ts +2 -2
  79. package/packages/orq-rc/src/models/operations/createdatasource.ts +2 -2
  80. package/packages/orq-rc/src/models/operations/createeval.ts +16 -16
  81. package/packages/orq-rc/src/models/operations/deletecontact.ts +69 -0
  82. package/packages/orq-rc/src/models/operations/deployments.ts +69 -59
  83. package/packages/orq-rc/src/models/operations/fileget.ts +2 -2
  84. package/packages/orq-rc/src/models/operations/filelist.ts +2 -2
  85. package/packages/orq-rc/src/models/operations/fileupload.ts +2 -2
  86. package/packages/orq-rc/src/models/operations/index.ts +4 -0
  87. package/packages/orq-rc/src/models/operations/listcontacts.ts +490 -0
  88. package/packages/orq-rc/src/models/operations/listdatasetdatapoints.ts +2 -2
  89. package/packages/orq-rc/src/models/operations/listdatasets.ts +2 -2
  90. package/packages/orq-rc/src/models/operations/listdatasources.ts +2 -2
  91. package/packages/orq-rc/src/models/operations/retrievecontact.ts +210 -0
  92. package/packages/orq-rc/src/models/operations/retrievedatapoint.ts +2 -2
  93. package/packages/orq-rc/src/models/operations/retrievedataset.ts +2 -2
  94. package/packages/orq-rc/src/models/operations/retrievedatasource.ts +2 -2
  95. package/packages/orq-rc/src/models/operations/updatecontact.ts +325 -0
  96. package/packages/orq-rc/src/models/operations/updatedatapoint.ts +2 -2
  97. package/packages/orq-rc/src/models/operations/updatedataset.ts +2 -2
  98. package/packages/orq-rc/src/models/operations/updatedatasource.ts +2 -2
  99. package/packages/orq-rc/src/sdk/contacts.ts +75 -3
  100. package/src/lib/config.ts +3 -3
  101. package/src/mcp-server/mcp-server.ts +1 -1
  102. package/src/mcp-server/server.ts +1 -1
  103. package/src/models/errors/apierror.ts +18 -3
  104. package/src/models/operations/bulkcreatedatapoints.ts +2 -2
  105. package/src/models/operations/createcontact.ts +2 -2
  106. package/src/models/operations/createdataset.ts +2 -2
  107. package/src/models/operations/createdatasetitem.ts +2 -2
  108. package/src/models/operations/createdatasource.ts +2 -2
  109. package/src/models/operations/fileget.ts +2 -2
  110. package/src/models/operations/filelist.ts +2 -2
  111. package/src/models/operations/fileupload.ts +2 -2
  112. package/src/models/operations/listdatasetdatapoints.ts +2 -2
  113. package/src/models/operations/listdatasets.ts +2 -2
  114. package/src/models/operations/listdatasources.ts +2 -2
  115. package/src/models/operations/retrievedatapoint.ts +2 -2
  116. package/src/models/operations/retrievedataset.ts +2 -2
  117. package/src/models/operations/retrievedatasource.ts +2 -2
  118. package/src/models/operations/updatedatapoint.ts +2 -2
  119. package/src/models/operations/updatedataset.ts +2 -2
  120. package/src/models/operations/updatedatasource.ts +2 -2
@@ -34,7 +34,6 @@ const orq = new Orq({
34
34
  async function run() {
35
35
  const result = await orq.datasets.list({});
36
36
 
37
- // Handle the result
38
37
  console.log(result);
39
38
  }
40
39
 
@@ -57,15 +56,12 @@ const orq = new OrqCore({
57
56
 
58
57
  async function run() {
59
58
  const res = await datasetsList(orq, {});
60
-
61
- if (!res.ok) {
62
- throw res.error;
59
+ if (res.ok) {
60
+ const { value: result } = res;
61
+ console.log(result);
62
+ } else {
63
+ console.log("datasetsList failed:", res.error);
63
64
  }
64
-
65
- const { value: result } = res;
66
-
67
- // Handle the result
68
- console.log(result);
69
65
  }
70
66
 
71
67
  run();
@@ -109,7 +105,6 @@ async function run() {
109
105
  path: "Default",
110
106
  });
111
107
 
112
- // Handle the result
113
108
  console.log(result);
114
109
  }
115
110
 
@@ -135,15 +130,12 @@ async function run() {
135
130
  displayName: "Neva.Raynor10",
136
131
  path: "Default",
137
132
  });
138
-
139
- if (!res.ok) {
140
- throw res.error;
133
+ if (res.ok) {
134
+ const { value: result } = res;
135
+ console.log(result);
136
+ } else {
137
+ console.log("datasetsCreate failed:", res.error);
141
138
  }
142
-
143
- const { value: result } = res;
144
-
145
- // Handle the result
146
- console.log(result);
147
139
  }
148
140
 
149
141
  run();
@@ -186,7 +178,6 @@ async function run() {
186
178
  datasetId: "<id>",
187
179
  });
188
180
 
189
- // Handle the result
190
181
  console.log(result);
191
182
  }
192
183
 
@@ -211,15 +202,12 @@ async function run() {
211
202
  const res = await datasetsRetrieve(orq, {
212
203
  datasetId: "<id>",
213
204
  });
214
-
215
- if (!res.ok) {
216
- throw res.error;
205
+ if (res.ok) {
206
+ const { value: result } = res;
207
+ console.log(result);
208
+ } else {
209
+ console.log("datasetsRetrieve failed:", res.error);
217
210
  }
218
-
219
- const { value: result } = res;
220
-
221
- // Handle the result
222
- console.log(result);
223
211
  }
224
212
 
225
213
  run();
@@ -266,7 +254,6 @@ async function run() {
266
254
  },
267
255
  });
268
256
 
269
- // Handle the result
270
257
  console.log(result);
271
258
  }
272
259
 
@@ -294,15 +281,12 @@ async function run() {
294
281
  path: "Default",
295
282
  },
296
283
  });
297
-
298
- if (!res.ok) {
299
- throw res.error;
284
+ if (res.ok) {
285
+ const { value: result } = res;
286
+ console.log(result);
287
+ } else {
288
+ console.log("datasetsUpdate failed:", res.error);
300
289
  }
301
-
302
- const { value: result } = res;
303
-
304
- // Handle the result
305
- console.log(result);
306
290
  }
307
291
 
308
292
  run();
@@ -370,14 +354,12 @@ async function run() {
370
354
  const res = await datasetsDelete(orq, {
371
355
  datasetId: "<id>",
372
356
  });
373
-
374
- if (!res.ok) {
375
- throw res.error;
357
+ if (res.ok) {
358
+ const { value: result } = res;
359
+
360
+ } else {
361
+ console.log("datasetsDelete failed:", res.error);
376
362
  }
377
-
378
- const { value: result } = res;
379
-
380
-
381
363
  }
382
364
 
383
365
  run();
@@ -425,7 +407,6 @@ async function run() {
425
407
  },
426
408
  });
427
409
 
428
- // Handle the result
429
410
  console.log(result);
430
411
  }
431
412
 
@@ -455,15 +436,12 @@ async function run() {
455
436
  type: "dataset_experiment",
456
437
  },
457
438
  });
458
-
459
- if (!res.ok) {
460
- throw res.error;
439
+ if (res.ok) {
440
+ const { value: result } = res;
441
+ console.log(result);
442
+ } else {
443
+ console.log("datasetsCreateExperiment failed:", res.error);
461
444
  }
462
-
463
- const { value: result } = res;
464
-
465
- // Handle the result
466
- console.log(result);
467
445
  }
468
446
 
469
447
  run();
@@ -506,7 +484,6 @@ async function run() {
506
484
  datasetId: "<id>",
507
485
  });
508
486
 
509
- // Handle the result
510
487
  console.log(result);
511
488
  }
512
489
 
@@ -531,15 +508,12 @@ async function run() {
531
508
  const res = await datasetsListDatapoints(orq, {
532
509
  datasetId: "<id>",
533
510
  });
534
-
535
- if (!res.ok) {
536
- throw res.error;
511
+ if (res.ok) {
512
+ const { value: result } = res;
513
+ console.log(result);
514
+ } else {
515
+ console.log("datasetsListDatapoints failed:", res.error);
537
516
  }
538
-
539
- const { value: result } = res;
540
-
541
- // Handle the result
542
- console.log(result);
543
517
  }
544
518
 
545
519
  run();
@@ -582,7 +556,6 @@ async function run() {
582
556
  datasetId: "<id>",
583
557
  });
584
558
 
585
- // Handle the result
586
559
  console.log(result);
587
560
  }
588
561
 
@@ -607,15 +580,12 @@ async function run() {
607
580
  const res = await datasetsCreateDatapoint(orq, {
608
581
  datasetId: "<id>",
609
582
  });
610
-
611
- if (!res.ok) {
612
- throw res.error;
583
+ if (res.ok) {
584
+ const { value: result } = res;
585
+ console.log(result);
586
+ } else {
587
+ console.log("datasetsCreateDatapoint failed:", res.error);
613
588
  }
614
-
615
- const { value: result } = res;
616
-
617
- // Handle the result
618
- console.log(result);
619
589
  }
620
590
 
621
591
  run();
@@ -659,7 +629,6 @@ async function run() {
659
629
  datapointId: "<id>",
660
630
  });
661
631
 
662
- // Handle the result
663
632
  console.log(result);
664
633
  }
665
634
 
@@ -685,15 +654,12 @@ async function run() {
685
654
  datasetId: "<id>",
686
655
  datapointId: "<id>",
687
656
  });
688
-
689
- if (!res.ok) {
690
- throw res.error;
657
+ if (res.ok) {
658
+ const { value: result } = res;
659
+ console.log(result);
660
+ } else {
661
+ console.log("datasetsRetrieveDatapoint failed:", res.error);
691
662
  }
692
-
693
- const { value: result } = res;
694
-
695
- // Handle the result
696
- console.log(result);
697
663
  }
698
664
 
699
665
  run();
@@ -738,7 +704,6 @@ async function run() {
738
704
  datapointId: "<id>",
739
705
  });
740
706
 
741
- // Handle the result
742
707
  console.log(result);
743
708
  }
744
709
 
@@ -764,15 +729,12 @@ async function run() {
764
729
  datasetId: "<id>",
765
730
  datapointId: "<id>",
766
731
  });
767
-
768
- if (!res.ok) {
769
- throw res.error;
732
+ if (res.ok) {
733
+ const { value: result } = res;
734
+ console.log(result);
735
+ } else {
736
+ console.log("datasetsUpdateDatapoint failed:", res.error);
770
737
  }
771
-
772
- const { value: result } = res;
773
-
774
- // Handle the result
775
- console.log(result);
776
738
  }
777
739
 
778
740
  run();
@@ -842,14 +804,12 @@ async function run() {
842
804
  datasetId: "<id>",
843
805
  datapointId: "<id>",
844
806
  });
845
-
846
- if (!res.ok) {
847
- throw res.error;
807
+ if (res.ok) {
808
+ const { value: result } = res;
809
+
810
+ } else {
811
+ console.log("datasetsDeleteDatapoint failed:", res.error);
848
812
  }
849
-
850
- const { value: result } = res;
851
-
852
-
853
813
  }
854
814
 
855
815
  run();
@@ -917,14 +877,12 @@ async function run() {
917
877
  const res = await datasetsClear(orq, {
918
878
  datasetId: "<id>",
919
879
  });
920
-
921
- if (!res.ok) {
922
- throw res.error;
880
+ if (res.ok) {
881
+ const { value: result } = res;
882
+
883
+ } else {
884
+ console.log("datasetsClear failed:", res.error);
923
885
  }
924
-
925
- const { value: result } = res;
926
-
927
-
928
886
  }
929
887
 
930
888
  run();
@@ -27,7 +27,6 @@ const orq = new Orq({
27
27
  async function run() {
28
28
  const result = await orq.deployments.list({});
29
29
 
30
- // Handle the result
31
30
  console.log(result);
32
31
  }
33
32
 
@@ -50,15 +49,12 @@ const orq = new OrqCore({
50
49
 
51
50
  async function run() {
52
51
  const res = await deploymentsList(orq, {});
53
-
54
- if (!res.ok) {
55
- throw res.error;
52
+ if (res.ok) {
53
+ const { value: result } = res;
54
+ console.log(result);
55
+ } else {
56
+ console.log("deploymentsList failed:", res.error);
56
57
  }
57
-
58
- const { value: result } = res;
59
-
60
- // Handle the result
61
- console.log(result);
62
58
  }
63
59
 
64
60
  run();
@@ -102,7 +98,6 @@ async function run() {
102
98
  key: "<key>",
103
99
  });
104
100
 
105
- // Handle the result
106
101
  console.log(result);
107
102
  }
108
103
 
@@ -127,15 +122,12 @@ async function run() {
127
122
  const res = await deploymentsGetConfig(orq, {
128
123
  key: "<key>",
129
124
  });
130
-
131
- if (!res.ok) {
132
- throw res.error;
125
+ if (res.ok) {
126
+ const { value: result } = res;
127
+ console.log(result);
128
+ } else {
129
+ console.log("deploymentsGetConfig failed:", res.error);
133
130
  }
134
-
135
- const { value: result } = res;
136
-
137
- // Handle the result
138
- console.log(result);
139
131
  }
140
132
 
141
133
  run();
@@ -170,6 +162,8 @@ Invoke a deployment with a given payload
170
162
  import { Orq } from "@orq-ai/node";
171
163
 
172
164
  const orq = new Orq({
165
+ environment: "<value>",
166
+ contactId: "<id>",
173
167
  apiKey: process.env["ORQ_API_KEY"] ?? "",
174
168
  });
175
169
 
@@ -178,7 +172,6 @@ async function run() {
178
172
  key: "<key>",
179
173
  });
180
174
 
181
- // Handle the result
182
175
  console.log(result);
183
176
  }
184
177
 
@@ -196,6 +189,8 @@ import { deploymentsInvoke } from "@orq-ai/node/funcs/deploymentsInvoke.js";
196
189
  // Use `OrqCore` for best tree-shaking performance.
197
190
  // You can create one instance of it to use across an application.
198
191
  const orq = new OrqCore({
192
+ environment: "<value>",
193
+ contactId: "<id>",
199
194
  apiKey: process.env["ORQ_API_KEY"] ?? "",
200
195
  });
201
196
 
@@ -203,15 +198,12 @@ async function run() {
203
198
  const res = await deploymentsInvoke(orq, {
204
199
  key: "<key>",
205
200
  });
206
-
207
- if (!res.ok) {
208
- throw res.error;
201
+ if (res.ok) {
202
+ const { value: result } = res;
203
+ console.log(result);
204
+ } else {
205
+ console.log("deploymentsInvoke failed:", res.error);
209
206
  }
210
-
211
- const { value: result } = res;
212
-
213
- // Handle the result
214
- console.log(result);
215
207
  }
216
208
 
217
209
  run();
@@ -246,6 +238,8 @@ Stream deployment generation. Only supported for completions and chat completion
246
238
  import { Orq } from "@orq-ai/node";
247
239
 
248
240
  const orq = new Orq({
241
+ environment: "<value>",
242
+ contactId: "<id>",
249
243
  apiKey: process.env["ORQ_API_KEY"] ?? "",
250
244
  });
251
245
 
@@ -274,6 +268,8 @@ import { deploymentsStream } from "@orq-ai/node/funcs/deploymentsStream.js";
274
268
  // Use `OrqCore` for best tree-shaking performance.
275
269
  // You can create one instance of it to use across an application.
276
270
  const orq = new OrqCore({
271
+ environment: "<value>",
272
+ contactId: "<id>",
277
273
  apiKey: process.env["ORQ_API_KEY"] ?? "",
278
274
  });
279
275
 
@@ -281,17 +277,15 @@ async function run() {
281
277
  const res = await deploymentsStream(orq, {
282
278
  key: "<key>",
283
279
  });
284
-
285
- if (!res.ok) {
286
- throw res.error;
287
- }
288
-
289
- const { value: result } = res;
290
-
291
- for await (const event of result) {
280
+ if (res.ok) {
281
+ const { value: result } = res;
282
+ for await (const event of result) {
292
283
  // Handle the event
293
284
  console.log(event);
294
285
  }
286
+ } else {
287
+ console.log("deploymentsStream failed:", res.error);
288
+ }
295
289
  }
296
290
 
297
291
  run();
@@ -340,7 +334,6 @@ async function run() {
340
334
  },
341
335
  });
342
336
 
343
- // Handle the result
344
337
  console.log(result);
345
338
  }
346
339
 
@@ -371,15 +364,12 @@ async function run() {
371
364
  type: "deployment_experiment",
372
365
  },
373
366
  });
374
-
375
- if (!res.ok) {
376
- throw res.error;
367
+ if (res.ok) {
368
+ const { value: result } = res;
369
+ console.log(result);
370
+ } else {
371
+ console.log("deploymentsCreateExperiment failed:", res.error);
377
372
  }
378
-
379
- const { value: result } = res;
380
-
381
- // Handle the result
382
- console.log(result);
383
373
  }
384
374
 
385
375
  run();