@surf-ai/sdk 1.0.2 → 1.0.4

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/db/index.cjs CHANGED
@@ -218,7 +218,7 @@ async function doSyncSchema(schemaPath) {
218
218
  for (const t of existingTables) {
219
219
  const cfg = getTableConfig(t);
220
220
  try {
221
- const live = await get("db/table-schema", { table: cfg.name });
221
+ const live = await get(`db/tables/${encodeURIComponent(cfg.name)}/schema`);
222
222
  const liveCols = new Set((live.columns || []).map((c) => c.name));
223
223
  for (const col of cfg.columns) {
224
224
  if (!liveCols.has(col.name)) {
@@ -274,7 +274,7 @@ async function dbTables() {
274
274
  return get("db/tables");
275
275
  }
276
276
  async function dbTableSchema(table) {
277
- return get("db/table-schema", { table });
277
+ return get(`db/tables/${encodeURIComponent(table)}/schema`);
278
278
  }
279
279
  async function dbStatus() {
280
280
  return get("db/status");
package/dist/db/index.js CHANGED
@@ -183,7 +183,7 @@ async function doSyncSchema(schemaPath) {
183
183
  for (const t of existingTables) {
184
184
  const cfg = getTableConfig(t);
185
185
  try {
186
- const live = await get("db/table-schema", { table: cfg.name });
186
+ const live = await get(`db/tables/${encodeURIComponent(cfg.name)}/schema`);
187
187
  const liveCols = new Set((live.columns || []).map((c) => c.name));
188
188
  for (const col of cfg.columns) {
189
189
  if (!liveCols.has(col.name)) {
@@ -239,7 +239,7 @@ async function dbTables() {
239
239
  return get("db/tables");
240
240
  }
241
241
  async function dbTableSchema(table) {
242
- return get("db/table-schema", { table });
242
+ return get(`db/tables/${encodeURIComponent(table)}/schema`);
243
243
  }
244
244
  async function dbStatus() {
245
245
  return get("db/status");
@@ -225,7 +225,7 @@ async function doSyncSchema(schemaPath) {
225
225
  for (const t of existingTables) {
226
226
  const cfg = getTableConfig(t);
227
227
  try {
228
- const live = await get("db/table-schema", { table: cfg.name });
228
+ const live = await get(`db/tables/${encodeURIComponent(cfg.name)}/schema`);
229
229
  const liveCols = new Set((live.columns || []).map((c) => c.name));
230
230
  for (const col of cfg.columns) {
231
231
  if (!liveCols.has(col.name)) {
@@ -195,7 +195,7 @@ async function doSyncSchema(schemaPath) {
195
195
  for (const t of existingTables) {
196
196
  const cfg = getTableConfig(t);
197
197
  try {
198
- const live = await get("db/table-schema", { table: cfg.name });
198
+ const live = await get(`db/tables/${encodeURIComponent(cfg.name)}/schema`);
199
199
  const liveCols = new Set((live.columns || []).map((c) => c.name));
200
200
  for (const col of cfg.columns) {
201
201
  if (!liveCols.has(col.name)) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@surf-ai/sdk",
3
- "version": "1.0.2",
3
+ "version": "1.0.4",
4
4
  "description": "Surf platform SDK — data API client, server runtime, and database helpers",
5
5
  "type": "module",
6
6
  "exports": {