@one_deploy/sdk 1.0.3 → 1.0.5

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 (53) hide show
  1. package/dist/{engine-CrlhH0nw.d.mts → engine-BeVuHpVx.d.mts} +163 -0
  2. package/dist/{engine-5ndtBaCr.d.ts → engine-DSc1Em4V.d.ts} +163 -0
  3. package/dist/hooks/index.d.mts +132 -3
  4. package/dist/hooks/index.d.ts +132 -3
  5. package/dist/hooks/index.js +351 -0
  6. package/dist/hooks/index.js.map +1 -1
  7. package/dist/hooks/index.mjs +345 -2
  8. package/dist/hooks/index.mjs.map +1 -1
  9. package/dist/index.d.mts +3 -3
  10. package/dist/index.d.ts +3 -3
  11. package/dist/index.js +352 -1
  12. package/dist/index.js.map +1 -1
  13. package/dist/index.mjs +345 -2
  14. package/dist/index.mjs.map +1 -1
  15. package/dist/providers/index.d.mts +1 -1
  16. package/dist/providers/index.d.ts +1 -1
  17. package/dist/providers/index.js +98 -0
  18. package/dist/providers/index.js.map +1 -1
  19. package/dist/providers/index.mjs +98 -0
  20. package/dist/providers/index.mjs.map +1 -1
  21. package/dist/react-native.d.mts +140 -3
  22. package/dist/react-native.d.ts +140 -3
  23. package/dist/react-native.js +642 -0
  24. package/dist/react-native.js.map +1 -1
  25. package/dist/react-native.mjs +636 -1
  26. package/dist/react-native.mjs.map +1 -1
  27. package/dist/services/index.d.mts +99 -79
  28. package/dist/services/index.d.ts +99 -79
  29. package/dist/services/index.js +254 -0
  30. package/dist/services/index.js.map +1 -1
  31. package/dist/services/index.mjs +252 -1
  32. package/dist/services/index.mjs.map +1 -1
  33. package/dist/supabase-BT0c7q9e.d.mts +82 -0
  34. package/dist/supabase-BT0c7q9e.d.ts +82 -0
  35. package/package.json +5 -1
  36. package/src/components/OneSwapWidget.tsx +1 -1
  37. package/src/components/ai/OneChainSelector.tsx +183 -0
  38. package/src/components/ai/OneCycleSelector.tsx +187 -0
  39. package/src/components/ai/OnePairSelector.tsx +181 -0
  40. package/src/components/ai/OneTierSelector.tsx +187 -0
  41. package/src/components/ai/index.ts +17 -0
  42. package/src/components/index.ts +3 -0
  43. package/src/hooks/index.ts +20 -0
  44. package/src/hooks/useAITrading.ts +444 -0
  45. package/src/index.ts +20 -0
  46. package/src/react-native.ts +23 -0
  47. package/src/services/engine.ts +184 -0
  48. package/src/services/index.ts +16 -0
  49. package/src/services/usage.ts +249 -0
  50. package/.turbo/turbo-build.log +0 -0
  51. package/.turbo/turbo-type-check.log +0 -0
  52. package/tsconfig.json +0 -22
  53. package/tsup.config.ts +0 -25
@@ -1065,6 +1065,43 @@ var OneEngineClient = class {
1065
1065
  async adminClearRateLimits(identifier) {
1066
1066
  return this.request(`/api/v1/admin/rate-limits/${identifier}`, { method: "DELETE" });
1067
1067
  }
1068
+ // ========== AI Agent Configuration ==========
1069
+ /**
1070
+ * Get all AI agent configurations
1071
+ * This returns the full agent setup including tiers, cycles, and trading parameters
1072
+ */
1073
+ async getAgentConfigs(options) {
1074
+ const params = new URLSearchParams();
1075
+ if (options?.includeInactive) params.set("includeInactive", "true");
1076
+ if (options?.agentId) params.set("agentId", options.agentId);
1077
+ const query = params.toString();
1078
+ return this.request(`/api/v1/agents${query ? `?${query}` : ""}`, { method: "GET" });
1079
+ }
1080
+ /**
1081
+ * Calculate subscription parameters for an agent
1082
+ */
1083
+ async calculateAgentParams(params) {
1084
+ return this.request("/api/v1/agents/calculate", {
1085
+ method: "POST",
1086
+ body: JSON.stringify(params)
1087
+ });
1088
+ }
1089
+ /**
1090
+ * Get supported trading pairs from agents
1091
+ */
1092
+ async getTradingPairs() {
1093
+ const result = await this.getAgentConfigs();
1094
+ if (result.success && result.data?.agents) {
1095
+ const allPairs = /* @__PURE__ */ new Set();
1096
+ const byAgent = {};
1097
+ for (const agent of result.data.agents) {
1098
+ byAgent[agent.id] = agent.supported_pairs;
1099
+ agent.supported_pairs.forEach((p) => allPairs.add(p));
1100
+ }
1101
+ return { success: true, data: { pairs: Array.from(allPairs), byAgent } };
1102
+ }
1103
+ return { success: false, error: result.error };
1104
+ }
1068
1105
  // ========== AI Quant Trading ==========
1069
1106
  /**
1070
1107
  * Get all AI trading strategies
@@ -1203,6 +1240,67 @@ var OneEngineClient = class {
1203
1240
  async getCryptoMarketOverview() {
1204
1241
  return this.request("/api/v1/prices?type=overview", { method: "GET" });
1205
1242
  }
1243
+ // ========== Project Management ==========
1244
+ /**
1245
+ * Get user's projects
1246
+ */
1247
+ async getProjects(options) {
1248
+ const params = new URLSearchParams();
1249
+ if (options?.isActive !== void 0) params.set("isActive", String(options.isActive));
1250
+ const query = params.toString();
1251
+ return this.request(`/api/v1/projects${query ? `?${query}` : ""}`, { method: "GET" });
1252
+ }
1253
+ /**
1254
+ * Create a new project for ecosystem partners
1255
+ */
1256
+ async createProject(params) {
1257
+ return this.request("/api/v1/projects", {
1258
+ method: "POST",
1259
+ body: JSON.stringify(params)
1260
+ });
1261
+ }
1262
+ /**
1263
+ * Get project details
1264
+ */
1265
+ async getProject(projectId) {
1266
+ return this.request(`/api/v1/projects/${projectId}`, { method: "GET" });
1267
+ }
1268
+ /**
1269
+ * Update project settings
1270
+ */
1271
+ async updateProject(projectId, updates) {
1272
+ return this.request(`/api/v1/projects/${projectId}`, {
1273
+ method: "PATCH",
1274
+ body: JSON.stringify(updates)
1275
+ });
1276
+ }
1277
+ /**
1278
+ * Get project features status
1279
+ */
1280
+ async getProjectFeatures(projectId) {
1281
+ return this.request(`/api/v1/projects/${projectId}/features`, { method: "GET" });
1282
+ }
1283
+ /**
1284
+ * Enable/disable features for a project
1285
+ */
1286
+ async updateProjectFeatures(projectId, features) {
1287
+ return this.request(`/api/v1/projects/${projectId}/features`, {
1288
+ method: "PATCH",
1289
+ body: JSON.stringify(features)
1290
+ });
1291
+ }
1292
+ /**
1293
+ * Regenerate project API key
1294
+ */
1295
+ async regenerateProjectApiKey(projectId) {
1296
+ return this.request(`/api/v1/projects/${projectId}/api-key`, { method: "POST" });
1297
+ }
1298
+ /**
1299
+ * Delete project
1300
+ */
1301
+ async deleteProject(projectId) {
1302
+ return this.request(`/api/v1/projects/${projectId}`, { method: "DELETE" });
1303
+ }
1206
1304
  };
1207
1305
  function createOneEngineClient(options) {
1208
1306
  return new OneEngineClient(options);