@arizeai/phoenix-client 5.7.0 → 5.8.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.
@@ -1,4 +1,5 @@
1
1
  export * from "./getPrompt";
2
2
  export * from "./createPrompt";
3
+ export * from "./listPrompts";
3
4
  export * from "./sdks";
4
5
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/prompts/index.ts"],"names":[],"mappings":"AAAA,cAAc,aAAa,CAAC;AAC5B,cAAc,gBAAgB,CAAC;AAC/B,cAAc,QAAQ,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/prompts/index.ts"],"names":[],"mappings":"AAAA,cAAc,aAAa,CAAC;AAC5B,cAAc,gBAAgB,CAAC;AAC/B,cAAc,eAAe,CAAC;AAC9B,cAAc,QAAQ,CAAC"}
@@ -16,5 +16,6 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
16
16
  Object.defineProperty(exports, "__esModule", { value: true });
17
17
  __exportStar(require("./getPrompt"), exports);
18
18
  __exportStar(require("./createPrompt"), exports);
19
+ __exportStar(require("./listPrompts"), exports);
19
20
  __exportStar(require("./sdks"), exports);
20
21
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/prompts/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,8CAA4B;AAC5B,iDAA+B;AAC/B,yCAAuB"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/prompts/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,8CAA4B;AAC5B,iDAA+B;AAC/B,gDAA8B;AAC9B,yCAAuB"}
@@ -0,0 +1,18 @@
1
+ import { ClientFn } from "../types/core";
2
+ import { Prompt } from "../types/prompts";
3
+ export type ListPromptsParams = ClientFn;
4
+ /**
5
+ * List all prompts available to the client.
6
+ *
7
+ * @example
8
+ * ```ts
9
+ * import { listPrompts } from "@arizeai/phoenix-client/prompts";
10
+ *
11
+ * const prompts = await listPrompts({});
12
+ * console.log(prompts);
13
+ * ```
14
+ *
15
+ * @throws {Error} If the prompts cannot be listed or the response is invalid.
16
+ */
17
+ export declare function listPrompts({ client: _client, }: ListPromptsParams): Promise<Prompt[]>;
18
+ //# sourceMappingURL=listPrompts.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"listPrompts.d.ts","sourceRoot":"","sources":["../../../src/prompts/listPrompts.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,QAAQ,EAAE,MAAM,eAAe,CAAC;AACzC,OAAO,EAAE,MAAM,EAAE,MAAM,kBAAkB,CAAC;AAI1C,MAAM,MAAM,iBAAiB,GAAG,QAAQ,CAAC;AAEzC;;;;;;;;;;;;GAYG;AACH,wBAAsB,WAAW,CAAC,EAChC,MAAM,EAAE,OAAO,GAChB,EAAE,iBAAiB,GAAG,OAAO,CAAC,MAAM,EAAE,CAAC,CAKvC"}
@@ -0,0 +1,29 @@
1
+ "use strict";
2
+ var __importDefault = (this && this.__importDefault) || function (mod) {
3
+ return (mod && mod.__esModule) ? mod : { "default": mod };
4
+ };
5
+ Object.defineProperty(exports, "__esModule", { value: true });
6
+ exports.listPrompts = listPrompts;
7
+ const client_1 = require("../client");
8
+ const tiny_invariant_1 = __importDefault(require("tiny-invariant"));
9
+ /**
10
+ * List all prompts available to the client.
11
+ *
12
+ * @example
13
+ * ```ts
14
+ * import { listPrompts } from "@arizeai/phoenix-client/prompts";
15
+ *
16
+ * const prompts = await listPrompts({});
17
+ * console.log(prompts);
18
+ * ```
19
+ *
20
+ * @throws {Error} If the prompts cannot be listed or the response is invalid.
21
+ */
22
+ async function listPrompts({ client: _client, }) {
23
+ var _a;
24
+ const client = _client || (0, client_1.createClient)();
25
+ const response = await client.GET("/v1/prompts");
26
+ (0, tiny_invariant_1.default)((_a = response.data) === null || _a === void 0 ? void 0 : _a.data, "Failed to list prompts");
27
+ return response.data.data;
28
+ }
29
+ //# sourceMappingURL=listPrompts.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"listPrompts.js","sourceRoot":"","sources":["../../../src/prompts/listPrompts.ts"],"names":[],"mappings":";;;;;AAqBA,kCAOC;AA5BD,sCAAyC;AAIzC,oEAAuC;AAIvC;;;;;;;;;;;;GAYG;AACI,KAAK,UAAU,WAAW,CAAC,EAChC,MAAM,EAAE,OAAO,GACG;;IAClB,MAAM,MAAM,GAAG,OAAO,IAAI,IAAA,qBAAY,GAAE,CAAC;IACzC,MAAM,QAAQ,GAAG,MAAM,MAAM,CAAC,GAAG,CAAC,aAAa,CAAC,CAAC;IACjD,IAAA,wBAAS,EAAC,MAAA,QAAQ,CAAC,IAAI,0CAAE,IAAI,EAAE,wBAAwB,CAAC,CAAC;IACzD,OAAO,QAAQ,CAAC,IAAI,CAAC,IAAI,CAAC;AAC5B,CAAC"}