@premai/api-sdk 1.0.33 → 1.0.35

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.
package/dist/cli.cjs CHANGED
@@ -56,7 +56,7 @@ async function loadPrem() {
56
56
  return cachedPrem;
57
57
  const isBare = typeof globalThis.Bare !== "undefined";
58
58
  if (isBare) {
59
- cachedPrem = await import("@premai/reticle", { with: { type: "script" } });
59
+ cachedPrem = await (async (s, y) => await import(s, y))("@premai/reticle", { with: { type: "script" } });
60
60
  return cachedPrem;
61
61
  }
62
62
  cachedPrem = await import("@premai/reticle");
@@ -24,7 +24,7 @@ async function loadPrem() {
24
24
  return cachedPrem;
25
25
  const isBare = typeof globalThis.Bare !== "undefined";
26
26
  if (isBare) {
27
- cachedPrem = await import("@premai/reticle", { with: { type: "script" } });
27
+ cachedPrem = await (async (s, y) => await import(s, y))("@premai/reticle", { with: { type: "script" } });
28
28
  return cachedPrem;
29
29
  }
30
30
  cachedPrem = await import("@premai/reticle");
@@ -1414,6 +1414,7 @@ async function createRvencClient(options) {
1414
1414
  var core_default = createRvencClient;
1415
1415
  export {
1416
1416
  serializeDEKStore,
1417
+ loadPrem,
1417
1418
  isGatewayError,
1418
1419
  isAttestationError,
1419
1420
  initializeDEKStore,
@@ -255,7 +255,7 @@ async function loadPrem() {
255
255
  return cachedPrem;
256
256
  const isBare = typeof globalThis.Bare !== "undefined";
257
257
  if (isBare) {
258
- cachedPrem = await import("@premai/reticle", { with: { type: "script" } });
258
+ cachedPrem = await (async (s, y) => await import(s, y))("@premai/reticle", { with: { type: "script" } });
259
259
  return cachedPrem;
260
260
  }
261
261
  cachedPrem = await import("@premai/reticle");
@@ -25684,6 +25684,7 @@ async function createRvencClient(options) {
25684
25684
  var core_default = createRvencClient;
25685
25685
  export {
25686
25686
  serializeDEKStore,
25687
+ loadPrem,
25687
25688
  isGatewayError,
25688
25689
  isAttestationError,
25689
25690
  initializeDEKStore,
package/dist/core.d.ts CHANGED
@@ -33,5 +33,5 @@ export type { ApiErrorResponse, DEKStore, DecryptedFile, DeleteFileOptions, Dele
33
33
  export { generateEncryptionKeys } from "./utils/crypto";
34
34
  export { deserializeDEKStore, generateNewClientKEK, getClientKEK, getClientKID, initializeDEKStore, serializeDEKStore, } from "./utils/dek-store";
35
35
  export type { OpenAI };
36
- export { getGatewayErrorMessage, isAttestationError, isGatewayError } from './utils/attestation';
36
+ export { getGatewayErrorMessage, isAttestationError, isGatewayError, loadPrem } from './utils/attestation';
37
37
  export default createRvencClient;
package/dist/index.cjs CHANGED
@@ -66,6 +66,7 @@ __export(exports_src, {
66
66
  startServer: () => startServer,
67
67
  serverApp: () => server_default,
68
68
  serializeDEKStore: () => serializeDEKStore,
69
+ loadPrem: () => loadPrem,
69
70
  isGatewayError: () => isGatewayError,
70
71
  isAttestationError: () => isAttestationError,
71
72
  initializeDEKStore: () => initializeDEKStore,
@@ -104,7 +105,7 @@ async function loadPrem() {
104
105
  return cachedPrem;
105
106
  const isBare = typeof globalThis.Bare !== "undefined";
106
107
  if (isBare) {
107
- cachedPrem = await import("@premai/reticle", { with: { type: "script" } });
108
+ cachedPrem = await (async (s, y) => await import(s, y))("@premai/reticle", { with: { type: "script" } });
108
109
  return cachedPrem;
109
110
  }
110
111
  cachedPrem = await import("@premai/reticle");
package/dist/index.mjs CHANGED
@@ -27,7 +27,7 @@ async function loadPrem() {
27
27
  return cachedPrem;
28
28
  const isBare = typeof globalThis.Bare !== "undefined";
29
29
  if (isBare) {
30
- cachedPrem = await import("@premai/reticle", { with: { type: "script" } });
30
+ cachedPrem = await (async (s, y) => await import(s, y))("@premai/reticle", { with: { type: "script" } });
31
31
  return cachedPrem;
32
32
  }
33
33
  cachedPrem = await import("@premai/reticle");
@@ -1696,6 +1696,7 @@ export {
1696
1696
  startServer,
1697
1697
  server_default as serverApp,
1698
1698
  serializeDEKStore,
1699
+ loadPrem,
1699
1700
  isGatewayError,
1700
1701
  isAttestationError,
1701
1702
  initializeDEKStore,
@@ -3,6 +3,7 @@ type AttestationError = Error & {
3
3
  cause: string[];
4
4
  kind?: PremRs.GatewayError;
5
5
  };
6
+ export declare function loadPrem(): Promise<typeof PremRs>;
6
7
  export declare function isAttestationError(err: unknown): err is AttestationError;
7
8
  export declare function isGatewayError(err: unknown): err is AttestationError & {
8
9
  kind: PremRs.GatewayError;
package/package.json CHANGED
@@ -4,7 +4,7 @@
4
4
  },
5
5
  "homepage": "https://github.com/premai-io/api-sdk-ts",
6
6
  "name": "@premai/api-sdk",
7
- "version": "1.0.33",
7
+ "version": "1.0.35",
8
8
  "main": "./dist/index.cjs",
9
9
  "bin": {
10
10
  "pcci-proxy": "./dist/cli.cjs"
@@ -82,7 +82,7 @@
82
82
  },
83
83
  "devDependencies": {
84
84
  "@biomejs/biome": "2.3.10",
85
- "@types/bun": "^1.3.6",
85
+ "@types/bun": "^1.3.13",
86
86
  "@types/express": "^4.17.21",
87
87
  "@types/multer": "^2.0.0",
88
88
  "@types/node": "^22.15.21",