@mitway/sdk 0.7.1 → 0.7.3

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/README.md CHANGED
@@ -47,7 +47,7 @@ const { data: session, error } = await client.auth.signInWithPassword({
47
47
  password: 'a-strong-password',
48
48
  });
49
49
 
50
- // Database query (PostgREST query builder — same surface as Supabase)
50
+ // Database query (PostgREST query builder)
51
51
  const { data: posts, error: dbError } = await client.database
52
52
  .from('posts')
53
53
  .select('*, author:users(*)')
package/dist/index.d.cts CHANGED
@@ -471,11 +471,10 @@ declare class Realtime {
471
471
 
472
472
  interface MitwayBaasConfig {
473
473
  /**
474
- * Base URL of the MITWAY-BaaS backend. In production this is typically
475
- * `https://{cliente}.api.dev.nttmitway.com` (or the equivalent pro
476
- * domain). The SDK routes all traffic — auth, database (via the
477
- * backend's PostgREST proxy at `/api/database/records/*`), and future
478
- * storage/functions — through this one URL.
474
+ * Base URL of the MITWAY-BaaS backend the SDK should talk to. The SDK
475
+ * routes every request — auth, database (via the backend's PostgREST
476
+ * proxy at `/api/database/records/*`), storage, realtime (via
477
+ * `/socket.io/`) and functions through this single URL.
479
478
  *
480
479
  * @default "http://localhost:7130"
481
480
  */
@@ -723,9 +722,7 @@ type AuthResult<T> = {
723
722
  error: MitwayBaasError | null;
724
723
  };
725
724
  /**
726
- * Event names emitted by `auth.onAuthStateChange`. Mirrors
727
- * `@supabase/supabase-js` event names so consumers that already know that
728
- * contract do not have to re-learn ours.
725
+ * Event names emitted by `auth.onAuthStateChange`.
729
726
  *
730
727
  * - `INITIAL_SESSION` — emitted once per `auth.initialize()` call
731
728
  * regardless of whether a persisted session was found. `session` is
@@ -992,7 +989,7 @@ type UploadBody = Blob | ArrayBuffer | ArrayBufferView | ReadableStream<Uint8Arr
992
989
  * Storage module — thin wrapper over the /api/storage/* REST endpoints
993
990
  * exposed by MITWAY-BaaS.
994
991
  *
995
- * Surface mirrors what coding agents expect from a Supabase-style storage
992
+ * Surface exposes per-bucket object operations + admin bucket CRUD via `/api/storage/*`
996
993
  * SDK but routes through the Mitway backend (no direct S3 calls). Binary
997
994
  * upload/download uses `HttpClient.rawFetch`; JSON operations use the
998
995
  * standard typed `request<T>` path.
@@ -1122,7 +1119,7 @@ declare class Functions {
1122
1119
  * import { createClient } from '@mitway/sdk';
1123
1120
  *
1124
1121
  * const client = createClient({
1125
- * baseUrl: 'https://acme.api.dev.nttmitway.com',
1122
+ * baseUrl: 'https://your-baas.example.com',
1126
1123
  * anonKey: 'eyJhbGciOiJIUzI1NiIs...', // optional
1127
1124
  * });
1128
1125
  *
@@ -1162,7 +1159,7 @@ declare class MitwayBaasClient {
1162
1159
  *
1163
1160
  * Currently ships:
1164
1161
  * - auth (signUp, signInWithPassword, signOut, refreshSession, getSession, getUser)
1165
- * - database (PostgREST-backed query builder via @supabase/postgrest-js)
1162
+ * - database (PostgREST-backed query builder)
1166
1163
  * - realtime (Socket.IO transport: subscribe / unsubscribe / publish / on)
1167
1164
  * - storage (bucket admin + per-bucket object operations)
1168
1165
  * - functions (edge function CRUD, invoke, secrets management)
@@ -1179,11 +1176,11 @@ declare class MitwayBaasClient {
1179
1176
  *
1180
1177
  * @example
1181
1178
  * ```typescript
1182
- * import { createClient } from '@mitway-baas/sdk';
1179
+ * import { createClient } from '@mitway/sdk';
1183
1180
  *
1184
1181
  * const client = createClient({
1185
- * baseUrl: 'https://acme.api.dev.nttmitway.com',
1186
- * postgrestUrl: 'https://acme.db.dev.nttmitway.com',
1182
+ * baseUrl: 'https://your-baas.example.com',
1183
+ * anonKey: 'eyJhbGciOiJIUzI1NiIs...', // optional
1187
1184
  * });
1188
1185
  * ```
1189
1186
  */
package/dist/index.d.ts CHANGED
@@ -471,11 +471,10 @@ declare class Realtime {
471
471
 
472
472
  interface MitwayBaasConfig {
473
473
  /**
474
- * Base URL of the MITWAY-BaaS backend. In production this is typically
475
- * `https://{cliente}.api.dev.nttmitway.com` (or the equivalent pro
476
- * domain). The SDK routes all traffic — auth, database (via the
477
- * backend's PostgREST proxy at `/api/database/records/*`), and future
478
- * storage/functions — through this one URL.
474
+ * Base URL of the MITWAY-BaaS backend the SDK should talk to. The SDK
475
+ * routes every request — auth, database (via the backend's PostgREST
476
+ * proxy at `/api/database/records/*`), storage, realtime (via
477
+ * `/socket.io/`) and functions through this single URL.
479
478
  *
480
479
  * @default "http://localhost:7130"
481
480
  */
@@ -723,9 +722,7 @@ type AuthResult<T> = {
723
722
  error: MitwayBaasError | null;
724
723
  };
725
724
  /**
726
- * Event names emitted by `auth.onAuthStateChange`. Mirrors
727
- * `@supabase/supabase-js` event names so consumers that already know that
728
- * contract do not have to re-learn ours.
725
+ * Event names emitted by `auth.onAuthStateChange`.
729
726
  *
730
727
  * - `INITIAL_SESSION` — emitted once per `auth.initialize()` call
731
728
  * regardless of whether a persisted session was found. `session` is
@@ -992,7 +989,7 @@ type UploadBody = Blob | ArrayBuffer | ArrayBufferView | ReadableStream<Uint8Arr
992
989
  * Storage module — thin wrapper over the /api/storage/* REST endpoints
993
990
  * exposed by MITWAY-BaaS.
994
991
  *
995
- * Surface mirrors what coding agents expect from a Supabase-style storage
992
+ * Surface exposes per-bucket object operations + admin bucket CRUD via `/api/storage/*`
996
993
  * SDK but routes through the Mitway backend (no direct S3 calls). Binary
997
994
  * upload/download uses `HttpClient.rawFetch`; JSON operations use the
998
995
  * standard typed `request<T>` path.
@@ -1122,7 +1119,7 @@ declare class Functions {
1122
1119
  * import { createClient } from '@mitway/sdk';
1123
1120
  *
1124
1121
  * const client = createClient({
1125
- * baseUrl: 'https://acme.api.dev.nttmitway.com',
1122
+ * baseUrl: 'https://your-baas.example.com',
1126
1123
  * anonKey: 'eyJhbGciOiJIUzI1NiIs...', // optional
1127
1124
  * });
1128
1125
  *
@@ -1162,7 +1159,7 @@ declare class MitwayBaasClient {
1162
1159
  *
1163
1160
  * Currently ships:
1164
1161
  * - auth (signUp, signInWithPassword, signOut, refreshSession, getSession, getUser)
1165
- * - database (PostgREST-backed query builder via @supabase/postgrest-js)
1162
+ * - database (PostgREST-backed query builder)
1166
1163
  * - realtime (Socket.IO transport: subscribe / unsubscribe / publish / on)
1167
1164
  * - storage (bucket admin + per-bucket object operations)
1168
1165
  * - functions (edge function CRUD, invoke, secrets management)
@@ -1179,11 +1176,11 @@ declare class MitwayBaasClient {
1179
1176
  *
1180
1177
  * @example
1181
1178
  * ```typescript
1182
- * import { createClient } from '@mitway-baas/sdk';
1179
+ * import { createClient } from '@mitway/sdk';
1183
1180
  *
1184
1181
  * const client = createClient({
1185
- * baseUrl: 'https://acme.api.dev.nttmitway.com',
1186
- * postgrestUrl: 'https://acme.db.dev.nttmitway.com',
1182
+ * baseUrl: 'https://your-baas.example.com',
1183
+ * anonKey: 'eyJhbGciOiJIUzI1NiIs...', // optional
1187
1184
  * });
1188
1185
  * ```
1189
1186
  */
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mitway/sdk",
3
- "version": "0.7.1",
3
+ "version": "0.7.3",
4
4
  "description": "TypeScript/JavaScript client for MITWAY-BaaS — auth + database for end-user apps",
5
5
  "main": "./dist/index.cjs",
6
6
  "module": "./dist/index.js",