@anuma/sdk 3.2.0 → 3.3.1

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/index.mjs CHANGED
@@ -5,14 +5,11 @@ import {
5
5
 
6
6
  // src/client/core/bodySerializer.gen.ts
7
7
  var jsonBodySerializer = {
8
- bodySerializer: (body) => JSON.stringify(
9
- body,
10
- (_key, value) => typeof value === "bigint" ? value.toString() : value
11
- )
8
+ bodySerializer: (body) => JSON.stringify(body, (_key, value) => typeof value === "bigint" ? value.toString() : value)
12
9
  };
13
10
 
14
11
  // src/client/core/serverSentEvents.gen.ts
15
- var createSseClient = ({
12
+ function createSseClient({
16
13
  onRequest,
17
14
  onSseError,
18
15
  onSseEvent,
@@ -24,7 +21,7 @@ var createSseClient = ({
24
21
  sseSleepFn,
25
22
  url,
26
23
  ...options
27
- }) => {
24
+ }) {
28
25
  let lastEventId;
29
26
  const sleep = sseSleepFn ?? ((ms) => new Promise((resolve) => setTimeout(resolve, ms)));
30
27
  const createStream = async function* () {
@@ -52,10 +49,7 @@ var createSseClient = ({
52
49
  }
53
50
  const _fetch = options.fetch ?? globalThis.fetch;
54
51
  const response = await _fetch(request);
55
- if (!response.ok)
56
- throw new Error(
57
- `SSE failed: ${response.status} ${response.statusText}`
58
- );
52
+ if (!response.ok) throw new Error(`SSE failed: ${response.status} ${response.statusText}`);
59
53
  if (!response.body) throw new Error("No body in SSE response");
60
54
  const reader = response.body.pipeThrough(new TextDecoderStream()).getReader();
61
55
  let buffer = "";
@@ -71,6 +65,7 @@ var createSseClient = ({
71
65
  const { done, value } = await reader.read();
72
66
  if (done) break;
73
67
  buffer += value;
68
+ buffer = buffer.replace(/\r\n?/g, "\n");
74
69
  const chunks = buffer.split("\n\n");
75
70
  buffer = chunks.pop() ?? "";
76
71
  for (const chunk of chunks) {
@@ -85,10 +80,7 @@ var createSseClient = ({
85
80
  } else if (line.startsWith("id:")) {
86
81
  lastEventId = line.replace(/^id:\s*/, "");
87
82
  } else if (line.startsWith("retry:")) {
88
- const parsed = Number.parseInt(
89
- line.replace(/^retry:\s*/, ""),
90
- 10
91
- );
83
+ const parsed = Number.parseInt(line.replace(/^retry:\s*/, ""), 10);
92
84
  if (!Number.isNaN(parsed)) {
93
85
  retryDelay = parsed;
94
86
  }
@@ -134,17 +126,14 @@ var createSseClient = ({
134
126
  if (sseMaxRetryAttempts !== void 0 && attempt >= sseMaxRetryAttempts) {
135
127
  break;
136
128
  }
137
- const backoff = Math.min(
138
- retryDelay * 2 ** (attempt - 1),
139
- sseMaxRetryDelay ?? 3e4
140
- );
129
+ const backoff = Math.min(retryDelay * 2 ** (attempt - 1), sseMaxRetryDelay ?? 3e4);
141
130
  await sleep(backoff);
142
131
  }
143
132
  }
144
133
  };
145
134
  const stream = createStream();
146
135
  return { stream };
147
- };
136
+ }
148
137
 
149
138
  // src/client/core/pathSerializer.gen.ts
150
139
  var separatorArrayExplode = (style) => {
@@ -245,11 +234,7 @@ var serializeObjectParam = ({
245
234
  if (style !== "deepObject" && !explode) {
246
235
  let values = [];
247
236
  Object.entries(value).forEach(([key, v]) => {
248
- values = [
249
- ...values,
250
- key,
251
- allowReserved ? v : encodeURIComponent(v)
252
- ];
237
+ values = [...values, key, allowReserved ? v : encodeURIComponent(v)];
253
238
  });
254
239
  const joinedValues2 = values.join(",");
255
240
  switch (style) {
@@ -332,10 +317,7 @@ var defaultPathSerializer = ({ path, url: _url }) => {
332
317
  continue;
333
318
  }
334
319
  if (Array.isArray(value)) {
335
- url = url.replace(
336
- match,
337
- serializeArrayParam({ explode, name, style, value })
338
- );
320
+ url = url.replace(match, serializeArrayParam({ explode, name, style, value }));
339
321
  continue;
340
322
  }
341
323
  if (typeof value === "object") {
@@ -430,9 +412,7 @@ var getParseAs = (contentType) => {
430
412
  if (cleanContent === "multipart/form-data") {
431
413
  return "formData";
432
414
  }
433
- if (["application/", "audio/", "image/", "video/"].some(
434
- (type) => cleanContent.startsWith(type)
435
- )) {
415
+ if (["application/", "audio/", "image/", "video/"].some((type) => cleanContent.startsWith(type))) {
436
416
  return "blob";
437
417
  }
438
418
  if (cleanContent.startsWith("text/")) {
@@ -449,11 +429,8 @@ var checkForExistence = (options, name) => {
449
429
  }
450
430
  return false;
451
431
  };
452
- var setAuthParams = async ({
453
- security,
454
- ...options
455
- }) => {
456
- for (const auth of security) {
432
+ async function setAuthParams(options) {
433
+ for (const auth of options.security ?? []) {
457
434
  if (checkForExistence(options, auth.name)) {
458
435
  continue;
459
436
  }
@@ -478,7 +455,7 @@ var setAuthParams = async ({
478
455
  break;
479
456
  }
480
457
  }
481
- };
458
+ }
482
459
  var buildUrl = (options) => {
483
460
  const url = getUrl({
484
461
  baseUrl: options.baseUrl,
@@ -630,10 +607,7 @@ var createClient = (config = {}) => {
630
607
  serializedBody: void 0
631
608
  };
632
609
  if (opts.security) {
633
- await setAuthParams({
634
- ...opts,
635
- security: opts.security
636
- });
610
+ await setAuthParams(opts);
637
611
  }
638
612
  if (opts.requestValidator) {
639
613
  await opts.requestValidator(opts);
@@ -644,105 +618,115 @@ var createClient = (config = {}) => {
644
618
  if (opts.body === void 0 || opts.serializedBody === "") {
645
619
  opts.headers.delete("Content-Type");
646
620
  }
647
- const url = buildUrl(opts);
648
- return { opts, url };
621
+ const resolvedOpts = opts;
622
+ const url = buildUrl(resolvedOpts);
623
+ return { opts: resolvedOpts, url };
649
624
  };
650
625
  const request = async (options) => {
651
- const { opts, url } = await beforeRequest(options);
652
- for (const fn of interceptors.request.fns) {
653
- if (fn) {
654
- await fn(opts);
626
+ const throwOnError = options.throwOnError ?? _config.throwOnError;
627
+ let response;
628
+ try {
629
+ const { opts, url } = await beforeRequest(options);
630
+ for (const fn of interceptors.request.fns) {
631
+ if (fn) {
632
+ await fn(opts);
633
+ }
655
634
  }
656
- }
657
- const _fetch = opts.fetch;
658
- const requestInit = {
659
- ...opts,
660
- body: getValidRequestBody(opts)
661
- };
662
- let response = await _fetch(url, requestInit);
663
- for (const fn of interceptors.response.fns) {
664
- if (fn) {
665
- response = await fn(response, opts);
635
+ const _fetch = opts.fetch;
636
+ const requestInit = {
637
+ ...opts,
638
+ body: getValidRequestBody(opts)
639
+ };
640
+ response = await _fetch(url, requestInit);
641
+ for (const fn of interceptors.response.fns) {
642
+ if (fn) {
643
+ response = await fn(response, opts);
644
+ }
666
645
  }
667
- }
668
- const result = {
669
- response
670
- };
671
- if (response.ok) {
672
- const parseAs = (opts.parseAs === "auto" ? getParseAs(response.headers.get("Content-Type")) : opts.parseAs) ?? "json";
673
- if (response.status === 204 || response.headers.get("Content-Length") === "0") {
674
- let emptyData;
646
+ const result = {
647
+ response
648
+ };
649
+ if (response.ok) {
650
+ const parseAs = (opts.parseAs === "auto" ? getParseAs(response.headers.get("Content-Type")) : opts.parseAs) ?? "json";
651
+ if (response.status === 204 || response.headers.get("Content-Length") === "0") {
652
+ let emptyData;
653
+ switch (parseAs) {
654
+ case "arrayBuffer":
655
+ case "blob":
656
+ case "text":
657
+ emptyData = await response[parseAs]();
658
+ break;
659
+ case "formData":
660
+ emptyData = new FormData();
661
+ break;
662
+ case "stream":
663
+ emptyData = response.body;
664
+ break;
665
+ case "json":
666
+ default:
667
+ emptyData = {};
668
+ break;
669
+ }
670
+ return {
671
+ data: emptyData,
672
+ ...result
673
+ };
674
+ }
675
+ let data;
675
676
  switch (parseAs) {
676
677
  case "arrayBuffer":
677
678
  case "blob":
679
+ case "formData":
678
680
  case "text":
679
- emptyData = await response[parseAs]();
681
+ data = await response[parseAs]();
680
682
  break;
681
- case "formData":
682
- emptyData = new FormData();
683
+ case "json": {
684
+ const text = await response.text();
685
+ data = text ? JSON.parse(text) : {};
683
686
  break;
687
+ }
684
688
  case "stream":
685
- emptyData = response.body;
686
- break;
687
- case "json":
688
- default:
689
- emptyData = {};
690
- break;
689
+ return {
690
+ data: response.body,
691
+ ...result
692
+ };
693
+ }
694
+ if (parseAs === "json") {
695
+ if (opts.responseValidator) {
696
+ await opts.responseValidator(data);
697
+ }
698
+ if (opts.responseTransformer) {
699
+ data = await opts.responseTransformer(data);
700
+ }
691
701
  }
692
702
  return {
693
- data: emptyData,
703
+ data,
694
704
  ...result
695
705
  };
696
706
  }
697
- let data;
698
- switch (parseAs) {
699
- case "arrayBuffer":
700
- case "blob":
701
- case "formData":
702
- case "json":
703
- case "text":
704
- data = await response[parseAs]();
705
- break;
706
- case "stream":
707
- return {
708
- data: response.body,
709
- ...result
710
- };
707
+ const textError = await response.text();
708
+ let jsonError;
709
+ try {
710
+ jsonError = JSON.parse(textError);
711
+ } catch {
711
712
  }
712
- if (parseAs === "json") {
713
- if (opts.responseValidator) {
714
- await opts.responseValidator(data);
715
- }
716
- if (opts.responseTransformer) {
717
- data = await opts.responseTransformer(data);
713
+ throw jsonError ?? textError;
714
+ } catch (error) {
715
+ let finalError = error;
716
+ for (const fn of interceptors.error.fns) {
717
+ if (fn) {
718
+ finalError = await fn(finalError, response, options);
718
719
  }
719
720
  }
721
+ finalError = finalError || {};
722
+ if (throwOnError) {
723
+ throw finalError;
724
+ }
720
725
  return {
721
- data,
722
- ...result
726
+ error: finalError,
727
+ response
723
728
  };
724
729
  }
725
- const textError = await response.text();
726
- let jsonError;
727
- try {
728
- jsonError = JSON.parse(textError);
729
- } catch {
730
- }
731
- const error = jsonError ?? textError;
732
- let finalError = error;
733
- for (const fn of interceptors.error.fns) {
734
- if (fn) {
735
- finalError = await fn(error, response, opts);
736
- }
737
- }
738
- finalError = finalError || {};
739
- if (opts.throwOnError) {
740
- throw finalError;
741
- }
742
- return {
743
- error: finalError,
744
- ...result
745
- };
746
730
  };
747
731
  const makeMethodFn = (method) => (options) => request({ ...options, method });
748
732
  const makeSseFn = (method) => async (options) => {
@@ -750,15 +734,10 @@ var createClient = (config = {}) => {
750
734
  return createSseClient({
751
735
  ...opts,
752
736
  body: opts.body,
753
- headers: opts.headers,
754
737
  method,
755
738
  onRequest: async (url2, init) => {
756
739
  let request2 = new Request(url2, init);
757
- const requestInit = {
758
- ...init,
759
- method: init.method,
760
- url: url2
761
- };
740
+ const requestInit = { ...init, url: url2 };
762
741
  for (const fn of interceptors.request.fns) {
763
742
  if (fn) {
764
743
  await fn(requestInit);
@@ -767,11 +746,13 @@ var createClient = (config = {}) => {
767
746
  }
768
747
  return request2;
769
748
  },
749
+ serializedBody: getValidRequestBody(opts),
770
750
  url
771
751
  });
772
752
  };
753
+ const _buildUrl = (options) => buildUrl({ ..._config, ...options });
773
754
  return {
774
- buildUrl,
755
+ buildUrl: _buildUrl,
775
756
  connect: makeMethodFn("CONNECT"),
776
757
  delete: makeMethodFn("DELETE"),
777
758
  get: makeMethodFn("GET"),
@@ -803,664 +784,350 @@ var createClient = (config = {}) => {
803
784
  var client = createClient(createClientConfig(createConfig()));
804
785
 
805
786
  // src/client/sdk.gen.ts
806
- var deleteApiV1Account = (options) => {
807
- return (options?.client ?? client).delete({
808
- url: "/api/v1/account",
809
- ...options
810
- });
811
- };
812
- var postApiV1AdminAddCredits = (options) => {
813
- return (options.client ?? client).post({
814
- url: "/api/v1/admin/add-credits",
815
- ...options,
816
- headers: {
817
- "Content-Type": "application/json",
818
- ...options.headers
819
- }
820
- });
821
- };
822
- var postApiV1AdminAgents = (options) => {
823
- return (options.client ?? client).post({
824
- url: "/api/v1/admin/agents",
825
- ...options,
826
- headers: {
827
- "Content-Type": "application/json",
828
- ...options.headers
829
- }
830
- });
831
- };
832
- var deleteApiV1AdminAgentsById = (options) => {
833
- return (options.client ?? client).delete({
834
- url: "/api/v1/admin/agents/{id}",
835
- ...options
836
- });
837
- };
838
- var putApiV1AdminAgentsById = (options) => {
839
- return (options.client ?? client).put({
840
- url: "/api/v1/admin/agents/{id}",
841
- ...options,
842
- headers: {
843
- "Content-Type": "application/json",
844
- ...options.headers
845
- }
846
- });
847
- };
848
- var getApiV1AdminApps = (options) => {
849
- return (options.client ?? client).get({
850
- url: "/api/v1/admin/apps",
851
- ...options
852
- });
853
- };
854
- var postApiV1AdminApps = (options) => {
855
- return (options.client ?? client).post({
856
- url: "/api/v1/admin/apps",
857
- ...options,
858
- headers: {
859
- "Content-Type": "application/json",
860
- ...options.headers
861
- }
862
- });
863
- };
864
- var getApiV1AdminAppsByAppIdApiKeys = (options) => {
865
- return (options.client ?? client).get({
866
- url: "/api/v1/admin/apps/{app_id}/api-keys",
867
- ...options
868
- });
869
- };
870
- var postApiV1AdminAppsByAppIdApiKeys = (options) => {
871
- return (options.client ?? client).post({
872
- url: "/api/v1/admin/apps/{app_id}/api-keys",
873
- ...options,
874
- headers: {
875
- "Content-Type": "application/json",
876
- ...options.headers
877
- }
878
- });
879
- };
880
- var deleteApiV1AdminAppsByAppIdApiKeysById = (options) => {
881
- return (options.client ?? client).delete({
882
- url: "/api/v1/admin/apps/{app_id}/api-keys/{id}",
883
- ...options
884
- });
885
- };
886
- var getApiV1AdminAppsByAppIdApiKeysById = (options) => {
887
- return (options.client ?? client).get({
888
- url: "/api/v1/admin/apps/{app_id}/api-keys/{id}",
889
- ...options
890
- });
891
- };
892
- var putApiV1AdminAppsByAppIdApiKeysById = (options) => {
893
- return (options.client ?? client).put({
894
- url: "/api/v1/admin/apps/{app_id}/api-keys/{id}",
895
- ...options,
896
- headers: {
897
- "Content-Type": "application/json",
898
- ...options.headers
899
- }
900
- });
901
- };
902
- var deleteApiV1AdminAppsById = (options) => {
903
- return (options.client ?? client).delete({
904
- url: "/api/v1/admin/apps/{id}",
905
- ...options
906
- });
907
- };
908
- var getApiV1AdminAppsById = (options) => {
909
- return (options.client ?? client).get({
910
- url: "/api/v1/admin/apps/{id}",
911
- ...options
912
- });
913
- };
914
- var putApiV1AdminAppsById = (options) => {
915
- return (options.client ?? client).put({
916
- url: "/api/v1/admin/apps/{id}",
917
- ...options,
918
- headers: {
919
- "Content-Type": "application/json",
920
- ...options.headers
921
- }
922
- });
923
- };
924
- var postApiV1AdminPersonas = (options) => {
925
- return (options.client ?? client).post({
926
- url: "/api/v1/admin/personas",
927
- ...options,
928
- headers: {
929
- "Content-Type": "application/json",
930
- ...options.headers
931
- }
932
- });
933
- };
934
- var deleteApiV1AdminPersonasById = (options) => {
935
- return (options.client ?? client).delete({
936
- url: "/api/v1/admin/personas/{id}",
937
- ...options
938
- });
939
- };
940
- var putApiV1AdminPersonasById = (options) => {
941
- return (options.client ?? client).put({
942
- url: "/api/v1/admin/personas/{id}",
943
- ...options,
944
- headers: {
945
- "Content-Type": "application/json",
946
- ...options.headers
947
- }
948
- });
949
- };
950
- var postApiV1AdminSeedApps = (options) => {
951
- return (options.client ?? client).post({
952
- url: "/api/v1/admin/seed-apps",
953
- ...options,
954
- headers: {
955
- "Content-Type": "application/json",
956
- ...options.headers
957
- }
958
- });
959
- };
960
- var postApiV1AdminSubscriptionTier = (options) => {
961
- return (options.client ?? client).post({
962
- url: "/api/v1/admin/subscription-tier",
963
- ...options,
964
- headers: {
965
- "Content-Type": "application/json",
966
- ...options.headers
967
- }
968
- });
969
- };
970
- var deleteApiV1AdminTextReset = (options) => {
971
- return (options.client ?? client).delete({
972
- url: "/api/v1/admin/text/reset",
973
- ...options
974
- });
975
- };
976
- var getApiV1AdminUsersLookup = (options) => {
977
- return (options.client ?? client).get({
978
- url: "/api/v1/admin/users/lookup",
979
- ...options
980
- });
981
- };
982
- var getApiV1AgentPreferences = (options) => {
983
- return (options?.client ?? client).get({
984
- url: "/api/v1/agent-preferences",
985
- ...options
986
- });
987
- };
988
- var getApiV1Agents = (options) => {
989
- return (options?.client ?? client).get({
990
- url: "/api/v1/agents",
991
- ...options
992
- });
993
- };
994
- var getApiV1AgentsById = (options) => {
995
- return (options.client ?? client).get({
996
- url: "/api/v1/agents/{id}",
997
- ...options
998
- });
999
- };
1000
- var putApiV1AgentsByIdPreference = (options) => {
1001
- return (options.client ?? client).put({
1002
- url: "/api/v1/agents/{id}/preference",
1003
- ...options,
1004
- headers: {
1005
- "Content-Type": "application/json",
1006
- ...options.headers
1007
- }
1008
- });
1009
- };
1010
- var postApiV1ChatCompletions = (options) => {
1011
- return (options.client ?? client).post({
1012
- url: "/api/v1/chat/completions",
1013
- ...options,
1014
- headers: {
1015
- "Content-Type": "application/json",
1016
- ...options.headers
1017
- }
1018
- });
1019
- };
1020
- var getApiV1Config = (options) => {
1021
- return (options?.client ?? client).get({
1022
- url: "/api/v1/config",
1023
- ...options
1024
- });
1025
- };
1026
- var getApiV1CreditsBalance = (options) => {
1027
- return (options?.client ?? client).get({
1028
- url: "/api/v1/credits/balance",
1029
- ...options
1030
- });
1031
- };
1032
- var getApiV1CreditsPacks = (options) => {
1033
- return (options?.client ?? client).get({
1034
- url: "/api/v1/credits/packs",
1035
- ...options
1036
- });
1037
- };
1038
- var postApiV1CreditsPurchase = (options) => {
1039
- return (options.client ?? client).post({
1040
- url: "/api/v1/credits/purchase",
1041
- ...options,
1042
- headers: {
1043
- "Content-Type": "application/json",
1044
- ...options.headers
1045
- }
1046
- });
1047
- };
1048
- var postApiV1CreditsRedeemTokens = (options) => {
1049
- return (options.client ?? client).post({
1050
- url: "/api/v1/credits/redeem-tokens",
1051
- ...options,
1052
- headers: {
1053
- "Content-Type": "application/json",
1054
- ...options.headers
1055
- }
1056
- });
1057
- };
1058
- var getApiV1DeveloperApps = (options) => {
1059
- return (options?.client ?? client).get({
1060
- url: "/api/v1/developer/apps",
1061
- ...options
1062
- });
1063
- };
1064
- var postApiV1DeveloperApps = (options) => {
1065
- return (options.client ?? client).post({
1066
- url: "/api/v1/developer/apps",
1067
- ...options,
1068
- headers: {
1069
- "Content-Type": "application/json",
1070
- ...options.headers
1071
- }
1072
- });
1073
- };
1074
- var deleteApiV1DeveloperAppsByAppUuid = (options) => {
1075
- return (options.client ?? client).delete({
1076
- url: "/api/v1/developer/apps/{app_uuid}",
1077
- ...options
1078
- });
1079
- };
1080
- var getApiV1DeveloperAppsByAppUuid = (options) => {
1081
- return (options.client ?? client).get({
1082
- url: "/api/v1/developer/apps/{app_uuid}",
1083
- ...options
1084
- });
1085
- };
1086
- var patchApiV1DeveloperAppsByAppUuid = (options) => {
1087
- return (options.client ?? client).patch({
1088
- url: "/api/v1/developer/apps/{app_uuid}",
1089
- ...options,
1090
- headers: {
1091
- "Content-Type": "application/json",
1092
- ...options.headers
1093
- }
1094
- });
1095
- };
1096
- var getApiV1DeveloperAppsByAppUuidApiKeys = (options) => {
1097
- return (options.client ?? client).get({
1098
- url: "/api/v1/developer/apps/{app_uuid}/api-keys",
1099
- ...options
1100
- });
1101
- };
1102
- var postApiV1DeveloperAppsByAppUuidApiKeys = (options) => {
1103
- return (options.client ?? client).post({
1104
- url: "/api/v1/developer/apps/{app_uuid}/api-keys",
1105
- ...options,
1106
- headers: {
1107
- "Content-Type": "application/json",
1108
- ...options.headers
1109
- }
1110
- });
1111
- };
1112
- var deleteApiV1DeveloperAppsByAppUuidApiKeysByKeyId = (options) => {
1113
- return (options.client ?? client).delete({
1114
- url: "/api/v1/developer/apps/{app_uuid}/api-keys/{key_id}",
1115
- ...options
1116
- });
1117
- };
1118
- var postApiV1DeveloperAppsByAppUuidFund = (options) => {
1119
- return (options.client ?? client).post({
1120
- url: "/api/v1/developer/apps/{app_uuid}/fund",
1121
- ...options,
1122
- headers: {
1123
- "Content-Type": "application/json",
1124
- ...options.headers
1125
- }
1126
- });
1127
- };
1128
- var deleteApiV1DeveloperAppsByAppUuidPrivy = (options) => {
1129
- return (options.client ?? client).delete({
1130
- url: "/api/v1/developer/apps/{app_uuid}/privy",
1131
- ...options
1132
- });
1133
- };
1134
- var postApiV1DeveloperAppsByAppUuidPrivy = (options) => {
1135
- return (options.client ?? client).post({
1136
- url: "/api/v1/developer/apps/{app_uuid}/privy",
1137
- ...options,
1138
- headers: {
1139
- "Content-Type": "application/json",
1140
- ...options.headers
1141
- }
1142
- });
1143
- };
1144
- var getApiV1DeveloperAppsByAppUuidUsage = (options) => {
1145
- return (options.client ?? client).get({
1146
- url: "/api/v1/developer/apps/{app_uuid}/usage",
1147
- ...options
1148
- });
1149
- };
1150
- var getApiV1DeveloperAppsByAppUuidUsageUsers = (options) => {
1151
- return (options.client ?? client).get({
1152
- url: "/api/v1/developer/apps/{app_uuid}/usage/users",
1153
- ...options
1154
- });
1155
- };
1156
- var getApiV1DeveloperAppsByAppUuidUsers = (options) => {
1157
- return (options.client ?? client).get({
1158
- url: "/api/v1/developer/apps/{app_uuid}/users",
1159
- ...options
1160
- });
1161
- };
1162
- var getApiV1DeveloperAppsByAppUuidUsersByAddress = (options) => {
1163
- return (options.client ?? client).get({
1164
- url: "/api/v1/developer/apps/{app_uuid}/users/{address}",
1165
- ...options
1166
- });
1167
- };
1168
- var patchApiV1DeveloperAppsByAppUuidUsersByAddress = (options) => {
1169
- return (options.client ?? client).patch({
1170
- url: "/api/v1/developer/apps/{app_uuid}/users/{address}",
1171
- ...options,
1172
- headers: {
1173
- "Content-Type": "application/json",
1174
- ...options.headers
1175
- }
1176
- });
1177
- };
1178
- var postApiV1DeveloperAppsByAppUuidUsersByAddressTopUp = (options) => {
1179
- return (options.client ?? client).post({
1180
- url: "/api/v1/developer/apps/{app_uuid}/users/{address}/top-up",
1181
- ...options,
1182
- headers: {
1183
- "Content-Type": "application/json",
1184
- ...options.headers
1185
- }
1186
- });
1187
- };
1188
- var getApiV1DeveloperBilling = (options) => {
1189
- return (options?.client ?? client).get({
1190
- url: "/api/v1/developer/billing",
1191
- ...options
1192
- });
1193
- };
1194
- var getApiV1DocsSwaggerJson = (options) => {
1195
- return (options?.client ?? client).get({
1196
- url: "/api/v1/docs/swagger.json",
1197
- ...options
1198
- });
1199
- };
1200
- var postApiV1Embeddings = (options) => {
1201
- return (options.client ?? client).post({
1202
- url: "/api/v1/embeddings",
1203
- ...options,
1204
- headers: {
1205
- "Content-Type": "application/json",
1206
- ...options.headers
1207
- }
1208
- });
1209
- };
1210
- var getApiV1Models = (options) => {
1211
- return (options?.client ?? client).get({
1212
- url: "/api/v1/models",
1213
- ...options
1214
- });
1215
- };
1216
- var getApiV1Personas = (options) => {
1217
- return (options?.client ?? client).get({
1218
- url: "/api/v1/personas",
1219
- ...options
1220
- });
1221
- };
1222
- var getApiV1PersonasById = (options) => {
1223
- return (options.client ?? client).get({
1224
- url: "/api/v1/personas/{id}",
1225
- ...options
1226
- });
1227
- };
1228
- var postApiV1PhoneCalls = (options) => {
1229
- return (options.client ?? client).post({
1230
- url: "/api/v1/phone-calls",
1231
- ...options,
1232
- headers: {
1233
- "Content-Type": "application/json",
1234
- ...options.headers
1235
- }
1236
- });
1237
- };
1238
- var getApiV1PhoneCallsByCallId = (options) => {
1239
- return (options.client ?? client).get({
1240
- url: "/api/v1/phone-calls/{call_id}",
1241
- ...options
1242
- });
1243
- };
1244
- var postApiV1Responses = (options) => {
1245
- return (options.client ?? client).post({
1246
- url: "/api/v1/responses",
1247
- ...options,
1248
- headers: {
1249
- "Content-Type": "application/json",
1250
- ...options.headers
1251
- }
1252
- });
1253
- };
1254
- var postApiV1SubscriptionsCancel = (options) => {
1255
- return (options?.client ?? client).post({
1256
- url: "/api/v1/subscriptions/cancel",
1257
- ...options,
1258
- headers: {
1259
- "Content-Type": "application/json",
1260
- ...options?.headers
1261
- }
1262
- });
1263
- };
1264
- var postApiV1SubscriptionsCancelScheduledDowngrade = (options) => {
1265
- return (options?.client ?? client).post({
1266
- url: "/api/v1/subscriptions/cancel-scheduled-downgrade",
1267
- ...options
1268
- });
1269
- };
1270
- var postApiV1SubscriptionsCreateCheckoutSession = (options) => {
1271
- return (options.client ?? client).post({
1272
- url: "/api/v1/subscriptions/create-checkout-session",
1273
- ...options,
1274
- headers: {
1275
- "Content-Type": "application/json",
1276
- ...options.headers
1277
- }
1278
- });
1279
- };
1280
- var postApiV1SubscriptionsCustomerPortal = (options) => {
1281
- return (options.client ?? client).post({
1282
- url: "/api/v1/subscriptions/customer-portal",
1283
- ...options,
1284
- headers: {
1285
- "Content-Type": "application/json",
1286
- ...options.headers
1287
- }
1288
- });
1289
- };
1290
- var getApiV1SubscriptionsPlans = (options) => {
1291
- return (options?.client ?? client).get({
1292
- url: "/api/v1/subscriptions/plans",
1293
- ...options
1294
- });
1295
- };
1296
- var postApiV1SubscriptionsRenew = (options) => {
1297
- return (options?.client ?? client).post({
1298
- url: "/api/v1/subscriptions/renew",
1299
- ...options
1300
- });
1301
- };
1302
- var postApiV1SubscriptionsScheduleDowngrade = (options) => {
1303
- return (options.client ?? client).post({
1304
- url: "/api/v1/subscriptions/schedule-downgrade",
1305
- ...options,
1306
- headers: {
1307
- "Content-Type": "application/json",
1308
- ...options.headers
1309
- }
1310
- });
1311
- };
1312
- var getApiV1SubscriptionsStatus = (options) => {
1313
- return (options?.client ?? client).get({
1314
- url: "/api/v1/subscriptions/status",
1315
- ...options
1316
- });
1317
- };
1318
- var postApiV1SubscriptionsUpgrade = (options) => {
1319
- return (options.client ?? client).post({
1320
- url: "/api/v1/subscriptions/upgrade",
1321
- ...options,
1322
- headers: {
1323
- "Content-Type": "application/json",
1324
- ...options.headers
1325
- }
1326
- });
1327
- };
1328
- var postApiV1SubscriptionsWebhook = (options) => {
1329
- return (options.client ?? client).post({
1330
- url: "/api/v1/subscriptions/webhook",
1331
- ...options,
1332
- headers: {
1333
- "Content-Type": "application/json",
1334
- ...options.headers
1335
- }
1336
- });
1337
- };
1338
- var getApiV1Tools = (options) => {
1339
- return (options?.client ?? client).get({
1340
- url: "/api/v1/tools",
1341
- ...options
1342
- });
1343
- };
1344
- var getApiV1UsageInferenceWeekly = (options) => {
1345
- return (options?.client ?? client).get({
1346
- url: "/api/v1/usage/inference-weekly",
1347
- ...options
1348
- });
1349
- };
1350
- var getApiV1UsageModels = (options) => {
1351
- return (options?.client ?? client).get({
1352
- url: "/api/v1/usage/models",
1353
- ...options
1354
- });
1355
- };
1356
- var getApiV1UserApiKeys = (options) => {
1357
- return (options?.client ?? client).get({
1358
- url: "/api/v1/user/api-keys",
1359
- ...options
1360
- });
1361
- };
1362
- var postApiV1UserApiKeys = (options) => {
1363
- return (options.client ?? client).post({
1364
- url: "/api/v1/user/api-keys",
1365
- ...options,
1366
- headers: {
1367
- "Content-Type": "application/json",
1368
- ...options.headers
1369
- }
1370
- });
1371
- };
1372
- var deleteApiV1UserApiKeysByKeyId = (options) => {
1373
- return (options.client ?? client).delete({
1374
- url: "/api/v1/user/api-keys/{key_id}",
1375
- ...options
1376
- });
1377
- };
1378
- var getApiV1WalletsBinding = (options) => {
1379
- return (options?.client ?? client).get({
1380
- url: "/api/v1/wallets/binding",
1381
- ...options
1382
- });
1383
- };
1384
- var postApiV1WalletsBinding = (options) => {
1385
- return (options.client ?? client).post({
1386
- url: "/api/v1/wallets/binding",
1387
- ...options,
1388
- headers: {
1389
- "Content-Type": "application/json",
1390
- ...options.headers
1391
- }
1392
- });
1393
- };
1394
- var postApiV1WalletsBindingNonce = (options) => {
1395
- return (options?.client ?? client).post({
1396
- url: "/api/v1/wallets/binding/nonce",
1397
- ...options
1398
- });
1399
- };
1400
- var deleteApiV1WalletsBindingByAddress = (options) => {
1401
- return (options.client ?? client).delete({
1402
- url: "/api/v1/wallets/binding/{address}",
1403
- ...options
1404
- });
1405
- };
1406
- var postApiV1WebhooksRevenuecat = (options) => {
1407
- return (options?.client ?? client).post({
1408
- url: "/api/v1/webhooks/revenuecat",
1409
- ...options,
1410
- headers: {
1411
- "Content-Type": "application/json",
1412
- ...options?.headers
1413
- }
1414
- });
1415
- };
1416
- var getApiV1ZetaCreditRate = (options) => {
1417
- return (options?.client ?? client).get({
1418
- url: "/api/v1/zeta/credit-rate",
1419
- ...options
1420
- });
1421
- };
1422
- var getApiV1ZetaMarket = (options) => {
1423
- return (options?.client ?? client).get({
1424
- url: "/api/v1/zeta/market",
1425
- ...options
1426
- });
1427
- };
1428
- var postAuthOauthByProviderExchange = (options) => {
1429
- return (options.client ?? client).post({
1430
- url: "/auth/oauth/{provider}/exchange",
1431
- ...options,
1432
- headers: {
1433
- "Content-Type": "application/json",
1434
- ...options.headers
1435
- }
1436
- });
1437
- };
1438
- var postAuthOauthByProviderRefresh = (options) => {
1439
- return (options.client ?? client).post({
1440
- url: "/auth/oauth/{provider}/refresh",
1441
- ...options,
1442
- headers: {
1443
- "Content-Type": "application/json",
1444
- ...options.headers
1445
- }
1446
- });
1447
- };
1448
- var postAuthOauthByProviderRevoke = (options) => {
1449
- return (options.client ?? client).post({
1450
- url: "/auth/oauth/{provider}/revoke",
1451
- ...options,
1452
- headers: {
1453
- "Content-Type": "application/json",
1454
- ...options.headers
1455
- }
1456
- });
1457
- };
1458
- var getHealth = (options) => {
1459
- return (options?.client ?? client).get({
1460
- url: "/health",
1461
- ...options
1462
- });
1463
- };
787
+ var deleteApiV1Account = (options) => (options?.client ?? client).delete({ url: "/api/v1/account", ...options });
788
+ var postApiV1AdminAddCredits = (options) => (options.client ?? client).post({
789
+ url: "/api/v1/admin/add-credits",
790
+ ...options,
791
+ headers: {
792
+ "Content-Type": "application/json",
793
+ ...options.headers
794
+ }
795
+ });
796
+ var postApiV1AdminAgents = (options) => (options.client ?? client).post({
797
+ url: "/api/v1/admin/agents",
798
+ ...options,
799
+ headers: {
800
+ "Content-Type": "application/json",
801
+ ...options.headers
802
+ }
803
+ });
804
+ var deleteApiV1AdminAgentsById = (options) => (options.client ?? client).delete({ url: "/api/v1/admin/agents/{id}", ...options });
805
+ var putApiV1AdminAgentsById = (options) => (options.client ?? client).put({
806
+ url: "/api/v1/admin/agents/{id}",
807
+ ...options,
808
+ headers: {
809
+ "Content-Type": "application/json",
810
+ ...options.headers
811
+ }
812
+ });
813
+ var getApiV1AdminApps = (options) => (options.client ?? client).get({ url: "/api/v1/admin/apps", ...options });
814
+ var postApiV1AdminApps = (options) => (options.client ?? client).post({
815
+ url: "/api/v1/admin/apps",
816
+ ...options,
817
+ headers: {
818
+ "Content-Type": "application/json",
819
+ ...options.headers
820
+ }
821
+ });
822
+ var getApiV1AdminAppsByAppIdApiKeys = (options) => (options.client ?? client).get({ url: "/api/v1/admin/apps/{app_id}/api-keys", ...options });
823
+ var postApiV1AdminAppsByAppIdApiKeys = (options) => (options.client ?? client).post({
824
+ url: "/api/v1/admin/apps/{app_id}/api-keys",
825
+ ...options,
826
+ headers: {
827
+ "Content-Type": "application/json",
828
+ ...options.headers
829
+ }
830
+ });
831
+ var deleteApiV1AdminAppsByAppIdApiKeysById = (options) => (options.client ?? client).delete({ url: "/api/v1/admin/apps/{app_id}/api-keys/{id}", ...options });
832
+ var getApiV1AdminAppsByAppIdApiKeysById = (options) => (options.client ?? client).get({ url: "/api/v1/admin/apps/{app_id}/api-keys/{id}", ...options });
833
+ var putApiV1AdminAppsByAppIdApiKeysById = (options) => (options.client ?? client).put({
834
+ url: "/api/v1/admin/apps/{app_id}/api-keys/{id}",
835
+ ...options,
836
+ headers: {
837
+ "Content-Type": "application/json",
838
+ ...options.headers
839
+ }
840
+ });
841
+ var deleteApiV1AdminAppsById = (options) => (options.client ?? client).delete({ url: "/api/v1/admin/apps/{id}", ...options });
842
+ var getApiV1AdminAppsById = (options) => (options.client ?? client).get({ url: "/api/v1/admin/apps/{id}", ...options });
843
+ var putApiV1AdminAppsById = (options) => (options.client ?? client).put({
844
+ url: "/api/v1/admin/apps/{id}",
845
+ ...options,
846
+ headers: {
847
+ "Content-Type": "application/json",
848
+ ...options.headers
849
+ }
850
+ });
851
+ var postApiV1AdminPersonas = (options) => (options.client ?? client).post({
852
+ url: "/api/v1/admin/personas",
853
+ ...options,
854
+ headers: {
855
+ "Content-Type": "application/json",
856
+ ...options.headers
857
+ }
858
+ });
859
+ var deleteApiV1AdminPersonasById = (options) => (options.client ?? client).delete({ url: "/api/v1/admin/personas/{id}", ...options });
860
+ var putApiV1AdminPersonasById = (options) => (options.client ?? client).put({
861
+ url: "/api/v1/admin/personas/{id}",
862
+ ...options,
863
+ headers: {
864
+ "Content-Type": "application/json",
865
+ ...options.headers
866
+ }
867
+ });
868
+ var postApiV1AdminSeedApps = (options) => (options.client ?? client).post({
869
+ url: "/api/v1/admin/seed-apps",
870
+ ...options,
871
+ headers: {
872
+ "Content-Type": "application/json",
873
+ ...options.headers
874
+ }
875
+ });
876
+ var postApiV1AdminSubscriptionTier = (options) => (options.client ?? client).post({
877
+ url: "/api/v1/admin/subscription-tier",
878
+ ...options,
879
+ headers: {
880
+ "Content-Type": "application/json",
881
+ ...options.headers
882
+ }
883
+ });
884
+ var deleteApiV1AdminTextReset = (options) => (options.client ?? client).delete({ url: "/api/v1/admin/text/reset", ...options });
885
+ var getApiV1AdminUsersLookup = (options) => (options.client ?? client).get({ url: "/api/v1/admin/users/lookup", ...options });
886
+ var getApiV1AgentPreferences = (options) => (options?.client ?? client).get({ url: "/api/v1/agent-preferences", ...options });
887
+ var getApiV1Agents = (options) => (options?.client ?? client).get({ url: "/api/v1/agents", ...options });
888
+ var getApiV1AgentsById = (options) => (options.client ?? client).get({ url: "/api/v1/agents/{id}", ...options });
889
+ var putApiV1AgentsByIdPreference = (options) => (options.client ?? client).put({
890
+ url: "/api/v1/agents/{id}/preference",
891
+ ...options,
892
+ headers: {
893
+ "Content-Type": "application/json",
894
+ ...options.headers
895
+ }
896
+ });
897
+ var postApiV1ChatCompletions = (options) => (options.client ?? client).post({
898
+ url: "/api/v1/chat/completions",
899
+ ...options,
900
+ headers: {
901
+ "Content-Type": "application/json",
902
+ ...options.headers
903
+ }
904
+ });
905
+ var getApiV1Config = (options) => (options?.client ?? client).get({ url: "/api/v1/config", ...options });
906
+ var getApiV1CreditsBalance = (options) => (options?.client ?? client).get({ url: "/api/v1/credits/balance", ...options });
907
+ var getApiV1CreditsPacks = (options) => (options?.client ?? client).get({ url: "/api/v1/credits/packs", ...options });
908
+ var postApiV1CreditsPurchase = (options) => (options.client ?? client).post({
909
+ url: "/api/v1/credits/purchase",
910
+ ...options,
911
+ headers: {
912
+ "Content-Type": "application/json",
913
+ ...options.headers
914
+ }
915
+ });
916
+ var postApiV1CreditsRedeemTokens = (options) => (options.client ?? client).post({
917
+ url: "/api/v1/credits/redeem-tokens",
918
+ ...options,
919
+ headers: {
920
+ "Content-Type": "application/json",
921
+ ...options.headers
922
+ }
923
+ });
924
+ var getApiV1DeveloperApps = (options) => (options?.client ?? client).get({ url: "/api/v1/developer/apps", ...options });
925
+ var postApiV1DeveloperApps = (options) => (options.client ?? client).post({
926
+ url: "/api/v1/developer/apps",
927
+ ...options,
928
+ headers: {
929
+ "Content-Type": "application/json",
930
+ ...options.headers
931
+ }
932
+ });
933
+ var deleteApiV1DeveloperAppsByAppUuid = (options) => (options.client ?? client).delete({ url: "/api/v1/developer/apps/{app_uuid}", ...options });
934
+ var getApiV1DeveloperAppsByAppUuid = (options) => (options.client ?? client).get({ url: "/api/v1/developer/apps/{app_uuid}", ...options });
935
+ var patchApiV1DeveloperAppsByAppUuid = (options) => (options.client ?? client).patch({
936
+ url: "/api/v1/developer/apps/{app_uuid}",
937
+ ...options,
938
+ headers: {
939
+ "Content-Type": "application/json",
940
+ ...options.headers
941
+ }
942
+ });
943
+ var getApiV1DeveloperAppsByAppUuidApiKeys = (options) => (options.client ?? client).get({ url: "/api/v1/developer/apps/{app_uuid}/api-keys", ...options });
944
+ var postApiV1DeveloperAppsByAppUuidApiKeys = (options) => (options.client ?? client).post({
945
+ url: "/api/v1/developer/apps/{app_uuid}/api-keys",
946
+ ...options,
947
+ headers: {
948
+ "Content-Type": "application/json",
949
+ ...options.headers
950
+ }
951
+ });
952
+ var deleteApiV1DeveloperAppsByAppUuidApiKeysByKeyId = (options) => (options.client ?? client).delete({ url: "/api/v1/developer/apps/{app_uuid}/api-keys/{key_id}", ...options });
953
+ var postApiV1DeveloperAppsByAppUuidFund = (options) => (options.client ?? client).post({
954
+ url: "/api/v1/developer/apps/{app_uuid}/fund",
955
+ ...options,
956
+ headers: {
957
+ "Content-Type": "application/json",
958
+ ...options.headers
959
+ }
960
+ });
961
+ var deleteApiV1DeveloperAppsByAppUuidPrivy = (options) => (options.client ?? client).delete({ url: "/api/v1/developer/apps/{app_uuid}/privy", ...options });
962
+ var postApiV1DeveloperAppsByAppUuidPrivy = (options) => (options.client ?? client).post({
963
+ url: "/api/v1/developer/apps/{app_uuid}/privy",
964
+ ...options,
965
+ headers: {
966
+ "Content-Type": "application/json",
967
+ ...options.headers
968
+ }
969
+ });
970
+ var getApiV1DeveloperAppsByAppUuidUsage = (options) => (options.client ?? client).get({ url: "/api/v1/developer/apps/{app_uuid}/usage", ...options });
971
+ var getApiV1DeveloperAppsByAppUuidUsageUsers = (options) => (options.client ?? client).get({ url: "/api/v1/developer/apps/{app_uuid}/usage/users", ...options });
972
+ var getApiV1DeveloperAppsByAppUuidUsers = (options) => (options.client ?? client).get({ url: "/api/v1/developer/apps/{app_uuid}/users", ...options });
973
+ var getApiV1DeveloperAppsByAppUuidUsersByAddress = (options) => (options.client ?? client).get({ url: "/api/v1/developer/apps/{app_uuid}/users/{address}", ...options });
974
+ var patchApiV1DeveloperAppsByAppUuidUsersByAddress = (options) => (options.client ?? client).patch({
975
+ url: "/api/v1/developer/apps/{app_uuid}/users/{address}",
976
+ ...options,
977
+ headers: {
978
+ "Content-Type": "application/json",
979
+ ...options.headers
980
+ }
981
+ });
982
+ var postApiV1DeveloperAppsByAppUuidUsersByAddressTopUp = (options) => (options.client ?? client).post({
983
+ url: "/api/v1/developer/apps/{app_uuid}/users/{address}/top-up",
984
+ ...options,
985
+ headers: {
986
+ "Content-Type": "application/json",
987
+ ...options.headers
988
+ }
989
+ });
990
+ var getApiV1DeveloperBilling = (options) => (options?.client ?? client).get({ url: "/api/v1/developer/billing", ...options });
991
+ var getApiV1DocsSwaggerJson = (options) => (options?.client ?? client).get({ url: "/api/v1/docs/swagger.json", ...options });
992
+ var postApiV1Embeddings = (options) => (options.client ?? client).post({
993
+ url: "/api/v1/embeddings",
994
+ ...options,
995
+ headers: {
996
+ "Content-Type": "application/json",
997
+ ...options.headers
998
+ }
999
+ });
1000
+ var getApiV1Models = (options) => (options?.client ?? client).get({ url: "/api/v1/models", ...options });
1001
+ var getApiV1Personas = (options) => (options?.client ?? client).get({ url: "/api/v1/personas", ...options });
1002
+ var getApiV1PersonasById = (options) => (options.client ?? client).get({ url: "/api/v1/personas/{id}", ...options });
1003
+ var postApiV1PhoneCalls = (options) => (options.client ?? client).post({
1004
+ url: "/api/v1/phone-calls",
1005
+ ...options,
1006
+ headers: {
1007
+ "Content-Type": "application/json",
1008
+ ...options.headers
1009
+ }
1010
+ });
1011
+ var getApiV1PhoneCallsByCallId = (options) => (options.client ?? client).get({ url: "/api/v1/phone-calls/{call_id}", ...options });
1012
+ var postApiV1Responses = (options) => (options.client ?? client).post({
1013
+ url: "/api/v1/responses",
1014
+ ...options,
1015
+ headers: {
1016
+ "Content-Type": "application/json",
1017
+ ...options.headers
1018
+ }
1019
+ });
1020
+ var postApiV1SubscriptionsCancel = (options) => (options?.client ?? client).post({
1021
+ url: "/api/v1/subscriptions/cancel",
1022
+ ...options,
1023
+ headers: {
1024
+ "Content-Type": "application/json",
1025
+ ...options?.headers
1026
+ }
1027
+ });
1028
+ var postApiV1SubscriptionsCancelScheduledDowngrade = (options) => (options?.client ?? client).post({ url: "/api/v1/subscriptions/cancel-scheduled-downgrade", ...options });
1029
+ var postApiV1SubscriptionsCreateCheckoutSession = (options) => (options.client ?? client).post({
1030
+ url: "/api/v1/subscriptions/create-checkout-session",
1031
+ ...options,
1032
+ headers: {
1033
+ "Content-Type": "application/json",
1034
+ ...options.headers
1035
+ }
1036
+ });
1037
+ var postApiV1SubscriptionsCustomerPortal = (options) => (options.client ?? client).post({
1038
+ url: "/api/v1/subscriptions/customer-portal",
1039
+ ...options,
1040
+ headers: {
1041
+ "Content-Type": "application/json",
1042
+ ...options.headers
1043
+ }
1044
+ });
1045
+ var getApiV1SubscriptionsPlans = (options) => (options?.client ?? client).get({ url: "/api/v1/subscriptions/plans", ...options });
1046
+ var postApiV1SubscriptionsRenew = (options) => (options?.client ?? client).post({ url: "/api/v1/subscriptions/renew", ...options });
1047
+ var postApiV1SubscriptionsScheduleDowngrade = (options) => (options.client ?? client).post({
1048
+ url: "/api/v1/subscriptions/schedule-downgrade",
1049
+ ...options,
1050
+ headers: {
1051
+ "Content-Type": "application/json",
1052
+ ...options.headers
1053
+ }
1054
+ });
1055
+ var getApiV1SubscriptionsStatus = (options) => (options?.client ?? client).get({ url: "/api/v1/subscriptions/status", ...options });
1056
+ var postApiV1SubscriptionsUpgrade = (options) => (options.client ?? client).post({
1057
+ url: "/api/v1/subscriptions/upgrade",
1058
+ ...options,
1059
+ headers: {
1060
+ "Content-Type": "application/json",
1061
+ ...options.headers
1062
+ }
1063
+ });
1064
+ var postApiV1SubscriptionsWebhook = (options) => (options.client ?? client).post({
1065
+ url: "/api/v1/subscriptions/webhook",
1066
+ ...options,
1067
+ headers: {
1068
+ "Content-Type": "application/json",
1069
+ ...options.headers
1070
+ }
1071
+ });
1072
+ var getApiV1Tools = (options) => (options?.client ?? client).get({ url: "/api/v1/tools", ...options });
1073
+ var getApiV1UsageInferenceWeekly = (options) => (options?.client ?? client).get({ url: "/api/v1/usage/inference-weekly", ...options });
1074
+ var getApiV1UsageModels = (options) => (options?.client ?? client).get({ url: "/api/v1/usage/models", ...options });
1075
+ var getApiV1UserApiKeys = (options) => (options?.client ?? client).get({ url: "/api/v1/user/api-keys", ...options });
1076
+ var postApiV1UserApiKeys = (options) => (options.client ?? client).post({
1077
+ url: "/api/v1/user/api-keys",
1078
+ ...options,
1079
+ headers: {
1080
+ "Content-Type": "application/json",
1081
+ ...options.headers
1082
+ }
1083
+ });
1084
+ var deleteApiV1UserApiKeysByKeyId = (options) => (options.client ?? client).delete({ url: "/api/v1/user/api-keys/{key_id}", ...options });
1085
+ var getApiV1WalletsBinding = (options) => (options?.client ?? client).get({ url: "/api/v1/wallets/binding", ...options });
1086
+ var postApiV1WalletsBinding = (options) => (options.client ?? client).post({
1087
+ url: "/api/v1/wallets/binding",
1088
+ ...options,
1089
+ headers: {
1090
+ "Content-Type": "application/json",
1091
+ ...options.headers
1092
+ }
1093
+ });
1094
+ var postApiV1WalletsBindingNonce = (options) => (options?.client ?? client).post({ url: "/api/v1/wallets/binding/nonce", ...options });
1095
+ var deleteApiV1WalletsBindingByAddress = (options) => (options.client ?? client).delete({ url: "/api/v1/wallets/binding/{address}", ...options });
1096
+ var postApiV1WebhooksRevenuecat = (options) => (options?.client ?? client).post({
1097
+ url: "/api/v1/webhooks/revenuecat",
1098
+ ...options,
1099
+ headers: {
1100
+ "Content-Type": "application/json",
1101
+ ...options?.headers
1102
+ }
1103
+ });
1104
+ var getApiV1ZetaCreditRate = (options) => (options?.client ?? client).get({ url: "/api/v1/zeta/credit-rate", ...options });
1105
+ var getApiV1ZetaMarket = (options) => (options?.client ?? client).get({ url: "/api/v1/zeta/market", ...options });
1106
+ var postAuthOauthByProviderExchange = (options) => (options.client ?? client).post({
1107
+ url: "/auth/oauth/{provider}/exchange",
1108
+ ...options,
1109
+ headers: {
1110
+ "Content-Type": "application/json",
1111
+ ...options.headers
1112
+ }
1113
+ });
1114
+ var postAuthOauthByProviderRefresh = (options) => (options.client ?? client).post({
1115
+ url: "/auth/oauth/{provider}/refresh",
1116
+ ...options,
1117
+ headers: {
1118
+ "Content-Type": "application/json",
1119
+ ...options.headers
1120
+ }
1121
+ });
1122
+ var postAuthOauthByProviderRevoke = (options) => (options.client ?? client).post({
1123
+ url: "/auth/oauth/{provider}/revoke",
1124
+ ...options,
1125
+ headers: {
1126
+ "Content-Type": "application/json",
1127
+ ...options.headers
1128
+ }
1129
+ });
1130
+ var getHealth = (options) => (options?.client ?? client).get({ url: "/health", ...options });
1464
1131
 
1465
1132
  // src/lib/memoryEngine/constants.ts
1466
1133
  var DEFAULT_API_EMBEDDING_MODEL = "qwen/qwen3-embedding-8b";
@@ -1489,6 +1156,9 @@ async function withEmbeddingRetry(call) {
1489
1156
  }
1490
1157
  }
1491
1158
  if (threw) throw lastThrown;
1159
+ if (last?.error instanceof Error && last.response?.status === void 0) {
1160
+ throw last.error;
1161
+ }
1492
1162
  return last;
1493
1163
  }
1494
1164
  var EmbeddingHttpError = class extends Error {