@instantdb/react-native 0.22.139 → 0.22.140

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.
@@ -0,0 +1,15 @@
1
+ export declare const streamConstructors: {
2
+ ReadableStream: {
3
+ new (underlyingSource: UnderlyingByteSource, strategy?: {
4
+ highWaterMark?: number;
5
+ }): ReadableStream<Uint8Array<ArrayBuffer>>;
6
+ new <R = any>(underlyingSource: UnderlyingDefaultSource<R>, strategy?: QueuingStrategy<R>): ReadableStream<R>;
7
+ new <R = any>(underlyingSource?: UnderlyingSource<R>, strategy?: QueuingStrategy<R>): ReadableStream<R>;
8
+ prototype: ReadableStream;
9
+ };
10
+ WritableStream: {
11
+ new <W = any>(underlyingSink?: UnderlyingSink<W>, strategy?: QueuingStrategy<W>): WritableStream<W>;
12
+ prototype: WritableStream;
13
+ };
14
+ };
15
+ //# sourceMappingURL=Streams.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Streams.d.ts","sourceRoot":"","sources":["../src/Streams.ts"],"names":[],"mappings":"AACA,eAAO,MAAM,kBAAkB;;;yBAIgn5oC,CAAC;;;;;;;;;;CAD/o5oC,CAAC"}
@@ -0,0 +1,9 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.streamConstructors = void 0;
4
+ // RN may need a polyfill for streams, so we put those in Streams.native.ts
5
+ exports.streamConstructors = {
6
+ ReadableStream: ReadableStream,
7
+ WritableStream: WritableStream,
8
+ };
9
+ //# sourceMappingURL=Streams.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Streams.js","sourceRoot":"","sources":["../src/Streams.ts"],"names":[],"mappings":";;;AAAA,2EAA2E;AAC9D,QAAA,kBAAkB,GAAG;IAChC,cAAc,EAAE,cAAc;IAC9B,cAAc,EAAE,cAAc;CAC/B,CAAC","sourcesContent":["// RN may need a polyfill for streams, so we put those in Streams.native.ts\nexport const streamConstructors = {\n ReadableStream: ReadableStream,\n WritableStream: WritableStream,\n};\n"]}
@@ -0,0 +1,6 @@
1
+ import { ReadableStream, WritableStream } from 'web-streams-polyfill';
2
+ export declare const streamConstructors: {
3
+ ReadableStream: typeof ReadableStream;
4
+ WritableStream: typeof WritableStream;
5
+ };
6
+ //# sourceMappingURL=Streams.native.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Streams.native.d.ts","sourceRoot":"","sources":["../src/Streams.native.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,cAAc,EAAE,MAAM,sBAAsB,CAAC;AAEtE,eAAO,MAAM,kBAAkB;;;CAG9B,CAAC"}
@@ -0,0 +1,9 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.streamConstructors = void 0;
4
+ const web_streams_polyfill_1 = require("web-streams-polyfill");
5
+ exports.streamConstructors = {
6
+ ReadableStream: web_streams_polyfill_1.ReadableStream,
7
+ WritableStream: web_streams_polyfill_1.WritableStream,
8
+ };
9
+ //# sourceMappingURL=Streams.native.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Streams.native.js","sourceRoot":"","sources":["../src/Streams.native.ts"],"names":[],"mappings":";;;AAAA,+DAAsE;AAEzD,QAAA,kBAAkB,GAAG;IAChC,cAAc,EAAE,qCAAc;IAC9B,cAAc,EAAE,qCAAc;CAC/B,CAAC","sourcesContent":["import { ReadableStream, WritableStream } from 'web-streams-polyfill';\n\nexport const streamConstructors = {\n ReadableStream: ReadableStream,\n WritableStream: WritableStream,\n};\n"]}
package/dist/index.d.ts CHANGED
@@ -1,8 +1,8 @@
1
1
  import 'react-native-get-random-values';
2
- import Storage from './Storage';
2
+ import Store from './Storage';
3
3
  import NetworkListener from './NetworkListener';
4
4
  import { InstantReactAbstractDatabase } from '@instantdb/react-common';
5
- import { i, id, tx, lookup, InstantAPIError, setInstantWarningsEnabled, SyncTableCallbackEventType, createInstantRouteHandler, type RoomSchemaShape, type InstantQuery, type InstantQueryResult, type InstantSchema, type InstantSchemaDatabase, type ConnectionStatus, type BackwardsCompatibleSchema, type IInstantDatabase, type Config, type Query, type QueryResponse, type InstantObject, type AuthState, type User, type PresencePeer, type AttrsDefs, type CardinalityKind, type DataAttrDef, type EntitiesDef, type EntitiesWithLinks, type EntityDef, type InstantGraph, type InstantUnknownSchemaDef, type LinkAttrDef, type LinkDef, type LinksDef, type ResolveAttrs, type ValueTypes, type InstantEntity, type InstaQLEntity, type InstaQLResult, type InstaQLEntitySubquery, type RoomsOf, type RoomsDef, type PresenceOf, type TopicsOf, type TopicOf, type RoomHandle, type CreateParams, type InstantConfig, type InstantSchemaDef, type InstantUnknownSchema, type TransactionChunk, type InstantRules, type UpdateParams, type LinkParams, type ValidQuery, type ExchangeCodeForTokenParams, type SendMagicCodeParams, type SendMagicCodeResponse, type SignInWithIdTokenParams, type VerifyMagicCodeParams, type VerifyResponse, type FileOpts, type UploadFileResponse, type DeleteFileResponse, type SyncTableCallback, type SyncTableCallbackEvent, type SyncTableInitialSyncBatch, type SyncTableInitialSyncComplete, type SyncTableSyncTransaction, type SyncTableLoadFromStorage, type SyncTableSetupError, StoreInterface, type StoreInterfaceStoreName } from '@instantdb/core';
5
+ import { i, id, tx, lookup, InstantAPIError, setInstantWarningsEnabled, SyncTableCallbackEventType, createInstantRouteHandler, type RoomSchemaShape, type InstantQuery, type InstantQueryResult, type InstantSchema, type InstantSchemaDatabase, type ConnectionStatus, type BackwardsCompatibleSchema, type IInstantDatabase, type Config, type Query, type QueryResponse, type InstantObject, type AuthState, type User, type PresencePeer, type AttrsDefs, type CardinalityKind, type DataAttrDef, type EntitiesDef, type EntitiesWithLinks, type EntityDef, type InstantGraph, type InstantUnknownSchemaDef, type LinkAttrDef, type LinkDef, type LinksDef, type ResolveAttrs, type ValueTypes, type InstantEntity, type InstaQLEntity, type InstaQLResult, type InstaQLEntitySubquery, type RoomsOf, type RoomsDef, type PresenceOf, type TopicsOf, type TopicOf, type RoomHandle, type CreateParams, type InstantConfig, type InstantSchemaDef, type InstantUnknownSchema, type TransactionChunk, type InstantRules, type UpdateParams, type LinkParams, type ValidQuery, type ExchangeCodeForTokenParams, type SendMagicCodeParams, type SendMagicCodeResponse, type SignInWithIdTokenParams, type VerifyMagicCodeParams, type VerifyResponse, type FileOpts, type UploadFileResponse, type DeleteFileResponse, type SyncTableCallback, type SyncTableCallbackEvent, type SyncTableInitialSyncBatch, type SyncTableInitialSyncComplete, type SyncTableSyncTransaction, type SyncTableLoadFromStorage, type SyncTableSetupError, StoreInterface, type StoreInterfaceStoreName, CreateReadStreamOpts, CreateWriteStreamOpts, InstantWritableStream } from '@instantdb/core';
6
6
  /**
7
7
  *
8
8
  * The first step: init your application!
@@ -42,7 +42,7 @@ declare function init<Schema extends InstantSchemaDef<any, any, any> = InstantUn
42
42
  */
43
43
  declare const init_experimental: typeof init;
44
44
  declare class InstantReactNativeDatabase<Schema extends InstantSchemaDef<any, any, any>, UseDates extends boolean, Config extends InstantConfig<Schema, UseDates> = InstantConfig<Schema, UseDates>> extends InstantReactAbstractDatabase<Schema, UseDates, Config> {
45
- static Storage: typeof Storage;
45
+ static Store: typeof Store;
46
46
  static NetworkListener: typeof NetworkListener;
47
47
  static EventSourceImpl: {
48
48
  new (url: string | URL, eventSourceInitDict?: EventSourceInit): EventSource;
@@ -52,5 +52,5 @@ declare class InstantReactNativeDatabase<Schema extends InstantSchemaDef<any, an
52
52
  readonly CLOSED: 2;
53
53
  } | typeof import("./EventSourceShim").default;
54
54
  }
55
- export { init, init_experimental, id, tx, lookup, i, createInstantRouteHandler, InstantReactNativeDatabase, InstantAPIError, setInstantWarningsEnabled, SyncTableCallbackEventType, type Config, type Query, type QueryResponse, type InstantObject, type User, type AuthState, type ConnectionStatus, type InstantQuery, type InstantQueryResult, type InstantSchema, type InstantSchemaDatabase, type IInstantDatabase, type InstantEntity, type RoomSchemaShape, type PresencePeer, type AttrsDefs, type CardinalityKind, type DataAttrDef, type EntitiesDef, type EntitiesWithLinks, type EntityDef, type InstantGraph, type CreateParams, type LinkAttrDef, type InstantConfig, type LinkDef, type InstantUnknownSchemaDef, type LinksDef, type RoomsOf, type RoomsDef, type RoomHandle, type PresenceOf, type TopicsOf, type TopicOf, type ResolveAttrs, type ValueTypes, type InstaQLEntity, type InstaQLResult, type InstaQLEntitySubquery, type InstantSchemaDef, type InstantUnknownSchema, type BackwardsCompatibleSchema, type InstantRules, type UpdateParams, type LinkParams, type ValidQuery, type ExchangeCodeForTokenParams, type SendMagicCodeParams, type TransactionChunk, type SendMagicCodeResponse, type SignInWithIdTokenParams, type VerifyMagicCodeParams, type VerifyResponse, type FileOpts, type UploadFileResponse, type DeleteFileResponse, StoreInterface, type StoreInterfaceStoreName, type SyncTableCallback, type SyncTableCallbackEvent, type SyncTableInitialSyncBatch, type SyncTableInitialSyncComplete, type SyncTableSyncTransaction, type SyncTableLoadFromStorage, type SyncTableSetupError, };
55
+ export { init, init_experimental, id, tx, lookup, i, createInstantRouteHandler, InstantReactNativeDatabase, InstantAPIError, setInstantWarningsEnabled, SyncTableCallbackEventType, type Config, type Query, type QueryResponse, type InstantObject, type User, type AuthState, type ConnectionStatus, type InstantQuery, type InstantQueryResult, type InstantSchema, type InstantSchemaDatabase, type IInstantDatabase, type InstantEntity, type RoomSchemaShape, type PresencePeer, type AttrsDefs, type CardinalityKind, type DataAttrDef, type EntitiesDef, type EntitiesWithLinks, type EntityDef, type InstantGraph, type CreateParams, type LinkAttrDef, type InstantConfig, type LinkDef, type InstantUnknownSchemaDef, type LinksDef, type RoomsOf, type RoomsDef, type RoomHandle, type PresenceOf, type TopicsOf, type TopicOf, type ResolveAttrs, type ValueTypes, type InstaQLEntity, type InstaQLResult, type InstaQLEntitySubquery, type InstantSchemaDef, type InstantUnknownSchema, type BackwardsCompatibleSchema, type InstantRules, type UpdateParams, type LinkParams, type ValidQuery, type ExchangeCodeForTokenParams, type SendMagicCodeParams, type TransactionChunk, type SendMagicCodeResponse, type SignInWithIdTokenParams, type VerifyMagicCodeParams, type VerifyResponse, type FileOpts, type UploadFileResponse, type DeleteFileResponse, type CreateReadStreamOpts, type CreateWriteStreamOpts, type InstantWritableStream, StoreInterface, type StoreInterfaceStoreName, type SyncTableCallback, type SyncTableCallbackEvent, type SyncTableInitialSyncBatch, type SyncTableInitialSyncComplete, type SyncTableSyncTransaction, type SyncTableLoadFromStorage, type SyncTableSetupError, };
56
56
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,gCAAgC,CAAC;AAExC,OAAO,OAAO,MAAM,WAAW,CAAC;AAEhC,OAAO,eAAe,MAAM,mBAAmB,CAAC;AAGhD,OAAO,EAAE,4BAA4B,EAAE,MAAM,yBAAyB,CAAC;AAEvE,OAAO,EACL,CAAC,EACD,EAAE,EACF,EAAE,EACF,MAAM,EAEN,eAAe,EACf,yBAAyB,EAGzB,0BAA0B,EAG1B,yBAAyB,EACzB,KAAK,eAAe,EACpB,KAAK,YAAY,EACjB,KAAK,kBAAkB,EACvB,KAAK,aAAa,EAClB,KAAK,qBAAqB,EAC1B,KAAK,gBAAgB,EACrB,KAAK,yBAAyB,EAC9B,KAAK,gBAAgB,EACrB,KAAK,MAAM,EACX,KAAK,KAAK,EACV,KAAK,aAAa,EAClB,KAAK,aAAa,EAClB,KAAK,SAAS,EACd,KAAK,IAAI,EAGT,KAAK,YAAY,EAGjB,KAAK,SAAS,EACd,KAAK,eAAe,EACpB,KAAK,WAAW,EAChB,KAAK,WAAW,EAChB,KAAK,iBAAiB,EACtB,KAAK,SAAS,EACd,KAAK,YAAY,EACjB,KAAK,uBAAuB,EAC5B,KAAK,WAAW,EAChB,KAAK,OAAO,EACZ,KAAK,QAAQ,EACb,KAAK,YAAY,EACjB,KAAK,UAAU,EACf,KAAK,aAAa,EAElB,KAAK,aAAa,EAClB,KAAK,aAAa,EAClB,KAAK,qBAAqB,EAC1B,KAAK,OAAO,EACZ,KA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AAK,OAAO,EACZ,KAAK,YAAY,EACjB,KAAK,UAAU,EACf,KAAK,aAAa,EAClB,KAAK,aAAa,EAClB,KAAK,qBAAqB,EAC1B,KAAK,gBAAgB,EACrB,KAAK,oBAAoB,EACzB,KAAK,yBAAyB,EAC9B,KAAK,YAAY,EACjB,KAAK,YAAY,EACjB,KAAK,UAAU,EACf,KAAK,UAAU,EACf,KAAK,0BAA0B,EAC/B,KAAK,mBAAmB,EACxB,KAAK,gBAAgB,EACrB,KAAK,qBAAqB,EAC1B,KAAK,uBAAuB,EAC5B,KAAK,qBAAqB,EAC1B,KAAK,cAAc,EAGnB,KAAK,QAAQ,EACb,KAAK,kBAAkB,EACvB,KAAK,kBAAkB,EAGvB,KAAK,oBAAoB,EACzB,KAAK,qBAAqB,EAC1B,KAAK,qBAAqB,EAG1B,cAAc,EACd,KAAK,uBAAuB,EAG5B,KAAK,iBAAiB,EACtB,KAAK,sBAAsB,EAC3B,KAAK,yBAAyB,EAC9B,KAAK,4BAA4B,EACjC,KAAK,wBAAwB,EAC7B,KAAK,wBAAwB,EAC7B,KAAK,mBAAmB,GACzB,CAAC"}
package/dist/index.js CHANGED
@@ -10,6 +10,7 @@ const Storage_1 = __importDefault(require("./Storage"));
10
10
  const EventSourceImpl_1 = __importDefault(require("./EventSourceImpl"));
11
11
  const NetworkListener_1 = __importDefault(require("./NetworkListener"));
12
12
  const version_1 = __importDefault(require("./version"));
13
+ const Streams_1 = require("./Streams");
13
14
  const react_common_1 = require("@instantdb/react-common");
14
15
  const core_1 = require("@instantdb/core");
15
16
  Object.defineProperty(exports, "i", { enumerable: true, get: function () { return core_1.i; } });
@@ -52,6 +53,8 @@ function init(
52
53
  // as a non-nullable in the InstantConfig type.
53
54
  config) {
54
55
  const configStrict = {
56
+ ReadableStream: Streams_1.streamConstructors.ReadableStream,
57
+ WritableStream: Streams_1.streamConstructors.WritableStream,
55
58
  ...config,
56
59
  useDateObjects: (config.useDateObjects ?? false),
57
60
  };
@@ -76,7 +79,7 @@ config) {
76
79
  const init_experimental = init;
77
80
  exports.init_experimental = init_experimental;
78
81
  class InstantReactNativeDatabase extends react_common_1.InstantReactAbstractDatabase {
79
- static Storage = Storage_1.default;
82
+ static Store = Storage_1.default;
80
83
  static NetworkListener = NetworkListener_1.default;
81
84
  static EventSourceImpl = EventSourceImpl_1.default;
82
85
  }
package/dist/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";;;;;;AAgLE,oBAAI;AAhLN,0CAAwC;AAExC,wDAAgC;AAChC,wEAAgD;AAChD,wEAAgD;AAChD,wDAAgC;AAEhC,0DAAuE;AAEvE,0CAwFyB;AAoFvB,kFA3KA,QAAC,OA2KA;AAHD,mFAvKA,SAAE,OAuKA;AACF,mFAvKA,SAAE,OAuKA;AACF,uFAvKA,aAAM,OAuKA;AAMN;IA5KA,QAAQ;IACR,sBAAe,OA2KA;AACf,0GA3KA,gCAAyB,OA2KA;AAGzB;IA5KA,mBAAmB;IACnB,iCAA0B,OA2KA;AAR1B;IAjKA,QAAQ;IACR,gCAAyB,OAgKA;AA2EzB,+FAlKA,qBAAc,OAkKA;AA9JhB;;;;;;;;;;;;;;;;;;;GAmBG;AACH,SAAS,IAAI;AAIX,oEAAoE;AACpE,+CAA+C;AAC/C,MAEC;IAMD,MAAM,YAAY,GAAG;QACnB,GAAG,MAAM;QACT,cAAc,EAAE,CAAC,MAAM,CAAC,cAAc,IAAI,KAAK,CAAa;KAC7D,CAAC;IACF,OAAO,IAAI,0BAA0B,CAInC,YAAY,EAAE;QACd,kBAAkB,EAAE,iBAAO;KAC5B,CAAC,CAAC;AACL,CAAC;AAED;;;;;;;;;;;;;GAaG;AACH,MAAM,iBAAiB,GAAG,IAAI,CAAC;AAiB7B,8CAAiB;AAfnB,MAAM,0BAOJ,SAAQ,2CAAsD;IAC9D,MAAM,CAAC,OAAO,GAAG,iBAAO,CAAC;IACzB,MAAM,CAAC,eAAe,GAAG,yBAAe,CAAC;IACzC,MAAM,CAAC,eAAe,GAAG,yBAAe,CAAC;;AAWzC,gEAA0B","sourcesContent":["import 'react-native-get-random-values';\n\nimport Storage from './Storage';\nimport EventSourceImpl from './EventSourceImpl';\nimport NetworkListener from './NetworkListener';\nimport version from './version';\n\nimport { InstantReactAbstractDatabase } from '@instantdb/react-common';\n\nimport {\n i,\n id,\n tx,\n lookup,\n // error\n InstantAPIError,\n setInstantWarningsEnabled,\n\n // sync table enums\n SyncTableCallbackEventType,\n\n // types\n createInstantRouteHandler,\n type RoomSchemaShape,\n type InstantQuery,\n type InstantQueryResult,\n type InstantSchema,\n type InstantSchemaDatabase,\n type ConnectionStatus,\n type BackwardsCompatibleSchema,\n type IInstantDatabase,\n type Config,\n type Query,\n type QueryResponse,\n type InstantObject,\n type AuthState,\n type User,\n\n // presence types\n type PresencePeer,\n\n // schema types\n type AttrsDefs,\n type CardinalityKind,\n type DataAttrDef,\n type EntitiesDef,\n type EntitiesWithLinks,\n type EntityDef,\n type InstantGraph,\n type InstantUnknownSchemaDef,\n type LinkAttrDef,\n type LinkDef,\n type LinksDef,\n type ResolveAttrs,\n type ValueTypes,\n type InstantEntity,\n type ConfigWithSchema,\n type InstaQLEntity,\n type InstaQLResult,\n type InstaQLEntitySubquery,\n type RoomsOf,\n type RoomsDef,\n type PresenceOf,\n type TopicsOf,\n type TopicOf,\n type RoomHandle,\n type CreateParams,\n type InstantConfig,\n type InstantSchemaDef,\n type InstantUnknownSchema,\n type TransactionChunk,\n type InstantRules,\n type UpdateParams,\n type LinkParams,\n type ValidQuery,\n type ExchangeCodeForTokenParams,\n type SendMagicCodeParams,\n type SendMagicCodeResponse,\n type SignInWithIdTokenParams,\n type VerifyMagicCodeParams,\n type VerifyResponse,\n\n // storage types\n type FileOpts,\n type UploadFileResponse,\n type DeleteFileResponse,\n\n // sync table types\n type SyncTableCallback,\n type SyncTableCallbackEvent,\n type SyncTableInitialSyncBatch,\n type SyncTableInitialSyncComplete,\n type SyncTableSyncTransaction,\n type SyncTableLoadFromStorage,\n type SyncTableSetupError,\n StoreInterface,\n type StoreInterfaceStoreName,\n} from '@instantdb/core';\n\n/**\n *\n * The first step: init your application!\n *\n * Visit https://instantdb.com/dash to get your `appId` :)\n *\n * @example\n * import { init } from \"@instantdb/react-native\"\n *\n * const db = init({ appId: \"my-app-id\" })\n *\n * // You can also provide a schema for type safety and editor autocomplete!\n *\n * import { init } from \"@instantdb/react-native\"\n * import schema from \"\"../instant.schema.ts\";\n *\n * const db = init({ appId: \"my-app-id\", schema })\n *\n * // To learn more: https://instantdb.com/docs/modeling-data\n */\nfunction init<\n Schema extends InstantSchemaDef<any, any, any> = InstantUnknownSchema,\n UseDates extends boolean = false,\n>(\n // Allows config with missing `useDateObjects`, but keeps `UseDates`\n // as a non-nullable in the InstantConfig type.\n config: Omit<InstantConfig<Schema, UseDates>, 'useDateObjects'> & {\n useDateObjects?: UseDates;\n },\n): InstantReactNativeDatabase<\n Schema,\n UseDates,\n InstantConfig<Schema, UseDates>\n> {\n const configStrict = {\n ...config,\n useDateObjects: (config.useDateObjects ?? false) as UseDates,\n };\n return new InstantReactNativeDatabase<\n Schema,\n UseDates,\n InstantConfig<Schema, UseDates>\n >(configStrict, {\n '@instantdb/react': version,\n });\n}\n\n/**\n * @deprecated\n * `init_experimental` is deprecated. You can replace it with `init`.\n *\n * @example\n *\n * // Before\n * import { init_experimental } from \"@instantdb/react-native\"\n * const db = init_experimental({ ... });\n *\n * // After\n * import { init } from \"@instantdb/react-native\"\n * const db = init({ ... });\n */\nconst init_experimental = init;\n\nclass InstantReactNativeDatabase<\n Schema extends InstantSchemaDef<any, any, any>,\n UseDates extends boolean,\n Config extends InstantConfig<Schema, UseDates> = InstantConfig<\n Schema,\n UseDates\n >,\n> extends InstantReactAbstractDatabase<Schema, UseDates, Config> {\n static Storage = Storage;\n static NetworkListener = NetworkListener;\n static EventSourceImpl = EventSourceImpl;\n}\n\nexport {\n init,\n init_experimental,\n id,\n tx,\n lookup,\n i,\n createInstantRouteHandler,\n InstantReactNativeDatabase,\n\n // error\n InstantAPIError,\n setInstantWarningsEnabled,\n\n // sync table enums\n SyncTableCallbackEventType,\n\n // types\n type Config,\n type Query,\n type QueryResponse,\n type InstantObject,\n type User,\n type AuthState,\n type ConnectionStatus,\n type InstantQuery,\n type InstantQueryResult,\n type InstantSchema,\n type InstantSchemaDatabase,\n type IInstantDatabase,\n type InstantEntity,\n type RoomSchemaShape,\n\n // presence types\n type PresencePeer,\n\n // schema types\n type AttrsDefs,\n type CardinalityKind,\n type DataAttrDef,\n type EntitiesDef,\n type EntitiesWithLinks,\n type EntityDef,\n type InstantGraph,\n type CreateParams,\n type LinkAttrDef,\n type InstantConfig,\n type LinkDef,\n type InstantUnknownSchemaDef,\n type LinksDef,\n type RoomsOf,\n type RoomsDef,\n type RoomHandle,\n type PresenceOf,\n type TopicsOf,\n type TopicOf,\n type ResolveAttrs,\n type ValueTypes,\n type InstaQLEntity,\n type InstaQLResult,\n type InstaQLEntitySubquery,\n type InstantSchemaDef,\n type InstantUnknownSchema,\n type BackwardsCompatibleSchema,\n type InstantRules,\n type UpdateParams,\n type LinkParams,\n type ValidQuery,\n type ExchangeCodeForTokenParams,\n type SendMagicCodeParams,\n type TransactionChunk,\n type SendMagicCodeResponse,\n type SignInWithIdTokenParams,\n type VerifyMagicCodeParams,\n type VerifyResponse,\n\n // storage types\n type FileOpts,\n type UploadFileResponse,\n type DeleteFileResponse,\n\n // custom store\n StoreInterface,\n type StoreInterfaceStoreName,\n\n // sync table types\n type SyncTableCallback,\n type SyncTableCallbackEvent,\n type SyncTableInitialSyncBatch,\n type SyncTableInitialSyncComplete,\n type SyncTableSyncTransaction,\n type SyncTableLoadFromStorage,\n type SyncTableSetupError,\n};\n"]}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";;;;;;AAsLE,oBAAI;AAtLN,0CAAwC;AAExC,wDAA8B;AAC9B,wEAAgD;AAChD,wEAAgD;AAChD,wDAAgC;AAChC,uCAA+C;AAE/C,0DAAuE;AAEvE,0CA2FyB;AAsFvB,kFAhLA,QAAC,OAgLA;AAHD,mFA5KA,SAAE,OA4KA;AACF,mFA5KA,SAAE,OA4KA;AACF,uFA5KA,aAAM,OA4KA;AAMN;IAjLA,QAAQ;IACR,sBAAe,OAgLA;AACf,0GAhLA,gCAAyB,OAgLA;AAGzB;IAjLA,mBAAmB;IACnB,iCAA0B,OAgLA;AAR1B;IAtKA,QAAQ;IACR,gCAAyB,OAqKA;AAgFzB,+FA5KA,qBAAc,OA4KA;AArKhB;;;;;;;;;;;;;;;;;;;GAmBG;AACH,SAAS,IAAI;AAIX,oEAAoE;AACpE,+CAA+C;AAC/C,MAEC;IAMD,MAAM,YAAY,GAAG;QACnB,cAAc,EAAE,4BAAkB,CAAC,cAAc;QACjD,cAAc,EAAE,4BAAkB,CAAC,cAAc;QACjD,GAAG,MAAM;QACT,cAAc,EAAE,CAAC,MAAM,CAAC,cAAc,IAAI,KAAK,CAAa;KAC7D,CAAC;IACF,OAAO,IAAI,0BAA0B,CAInC,YAAY,EAAE;QACd,kBAAkB,EAAE,iBAAO;KAC5B,CAAC,CAAC;AACL,CAAC;AAED;;;;;;;;;;;;;GAaG;AACH,MAAM,iBAAiB,GAAG,IAAI,CAAC;AAiB7B,8CAAiB;AAfnB,MAAM,0BAOJ,SAAQ,2CAAsD;IAC9D,MAAM,CAAC,KAAK,GAAG,iBAAK,CAAC;IACrB,MAAM,CAAC,eAAe,GAAG,yBAAe,CAAC;IACzC,MAAM,CAAC,eAAe,GAAG,yBAAe,CAAC;;AAWzC,gEAA0B","sourcesContent":["import 'react-native-get-random-values';\n\nimport Store from './Storage';\nimport EventSourceImpl from './EventSourceImpl';\nimport NetworkListener from './NetworkListener';\nimport version from './version';\nimport { streamConstructors } from './Streams';\n\nimport { InstantReactAbstractDatabase } from '@instantdb/react-common';\n\nimport {\n i,\n id,\n tx,\n lookup,\n // error\n InstantAPIError,\n setInstantWarningsEnabled,\n\n // sync table enums\n SyncTableCallbackEventType,\n\n // types\n createInstantRouteHandler,\n type RoomSchemaShape,\n type InstantQuery,\n type InstantQueryResult,\n type InstantSchema,\n type InstantSchemaDatabase,\n type ConnectionStatus,\n type BackwardsCompatibleSchema,\n type IInstantDatabase,\n type Config,\n type Query,\n type QueryResponse,\n type InstantObject,\n type AuthState,\n type User,\n\n // presence types\n type PresencePeer,\n\n // schema types\n type AttrsDefs,\n type CardinalityKind,\n type DataAttrDef,\n type EntitiesDef,\n type EntitiesWithLinks,\n type EntityDef,\n type InstantGraph,\n type InstantUnknownSchemaDef,\n type LinkAttrDef,\n type LinkDef,\n type LinksDef,\n type ResolveAttrs,\n type ValueTypes,\n type InstantEntity,\n type ConfigWithSchema,\n type InstaQLEntity,\n type InstaQLResult,\n type InstaQLEntitySubquery,\n type RoomsOf,\n type RoomsDef,\n type PresenceOf,\n type TopicsOf,\n type TopicOf,\n type RoomHandle,\n type CreateParams,\n type InstantConfig,\n type InstantSchemaDef,\n type InstantUnknownSchema,\n type TransactionChunk,\n type InstantRules,\n type UpdateParams,\n type LinkParams,\n type ValidQuery,\n type ExchangeCodeForTokenParams,\n type SendMagicCodeParams,\n type SendMagicCodeResponse,\n type SignInWithIdTokenParams,\n type VerifyMagicCodeParams,\n type VerifyResponse,\n\n // storage types\n type FileOpts,\n type UploadFileResponse,\n type DeleteFileResponse,\n\n // sync table types\n type SyncTableCallback,\n type SyncTableCallbackEvent,\n type SyncTableInitialSyncBatch,\n type SyncTableInitialSyncComplete,\n type SyncTableSyncTransaction,\n type SyncTableLoadFromStorage,\n type SyncTableSetupError,\n StoreInterface,\n type StoreInterfaceStoreName,\n CreateReadStreamOpts,\n CreateWriteStreamOpts,\n InstantWritableStream,\n} from '@instantdb/core';\n\n/**\n *\n * The first step: init your application!\n *\n * Visit https://instantdb.com/dash to get your `appId` :)\n *\n * @example\n * import { init } from \"@instantdb/react-native\"\n *\n * const db = init({ appId: \"my-app-id\" })\n *\n * // You can also provide a schema for type safety and editor autocomplete!\n *\n * import { init } from \"@instantdb/react-native\"\n * import schema from \"\"../instant.schema.ts\";\n *\n * const db = init({ appId: \"my-app-id\", schema })\n *\n * // To learn more: https://instantdb.com/docs/modeling-data\n */\nfunction init<\n Schema extends InstantSchemaDef<any, any, any> = InstantUnknownSchema,\n UseDates extends boolean = false,\n>(\n // Allows config with missing `useDateObjects`, but keeps `UseDates`\n // as a non-nullable in the InstantConfig type.\n config: Omit<InstantConfig<Schema, UseDates>, 'useDateObjects'> & {\n useDateObjects?: UseDates;\n },\n): InstantReactNativeDatabase<\n Schema,\n UseDates,\n InstantConfig<Schema, UseDates>\n> {\n const configStrict = {\n ReadableStream: streamConstructors.ReadableStream,\n WritableStream: streamConstructors.WritableStream,\n ...config,\n useDateObjects: (config.useDateObjects ?? false) as UseDates,\n };\n return new InstantReactNativeDatabase<\n Schema,\n UseDates,\n InstantConfig<Schema, UseDates>\n >(configStrict, {\n '@instantdb/react': version,\n });\n}\n\n/**\n * @deprecated\n * `init_experimental` is deprecated. You can replace it with `init`.\n *\n * @example\n *\n * // Before\n * import { init_experimental } from \"@instantdb/react-native\"\n * const db = init_experimental({ ... });\n *\n * // After\n * import { init } from \"@instantdb/react-native\"\n * const db = init({ ... });\n */\nconst init_experimental = init;\n\nclass InstantReactNativeDatabase<\n Schema extends InstantSchemaDef<any, any, any>,\n UseDates extends boolean,\n Config extends InstantConfig<Schema, UseDates> = InstantConfig<\n Schema,\n UseDates\n >,\n> extends InstantReactAbstractDatabase<Schema, UseDates, Config> {\n static Store = Store;\n static NetworkListener = NetworkListener;\n static EventSourceImpl = EventSourceImpl;\n}\n\nexport {\n init,\n init_experimental,\n id,\n tx,\n lookup,\n i,\n createInstantRouteHandler,\n InstantReactNativeDatabase,\n\n // error\n InstantAPIError,\n setInstantWarningsEnabled,\n\n // sync table enums\n SyncTableCallbackEventType,\n\n // types\n type Config,\n type Query,\n type QueryResponse,\n type InstantObject,\n type User,\n type AuthState,\n type ConnectionStatus,\n type InstantQuery,\n type InstantQueryResult,\n type InstantSchema,\n type InstantSchemaDatabase,\n type IInstantDatabase,\n type InstantEntity,\n type RoomSchemaShape,\n\n // presence types\n type PresencePeer,\n\n // schema types\n type AttrsDefs,\n type CardinalityKind,\n type DataAttrDef,\n type EntitiesDef,\n type EntitiesWithLinks,\n type EntityDef,\n type InstantGraph,\n type CreateParams,\n type LinkAttrDef,\n type InstantConfig,\n type LinkDef,\n type InstantUnknownSchemaDef,\n type LinksDef,\n type RoomsOf,\n type RoomsDef,\n type RoomHandle,\n type PresenceOf,\n type TopicsOf,\n type TopicOf,\n type ResolveAttrs,\n type ValueTypes,\n type InstaQLEntity,\n type InstaQLResult,\n type InstaQLEntitySubquery,\n type InstantSchemaDef,\n type InstantUnknownSchema,\n type BackwardsCompatibleSchema,\n type InstantRules,\n type UpdateParams,\n type LinkParams,\n type ValidQuery,\n type ExchangeCodeForTokenParams,\n type SendMagicCodeParams,\n type TransactionChunk,\n type SendMagicCodeResponse,\n type SignInWithIdTokenParams,\n type VerifyMagicCodeParams,\n type VerifyResponse,\n\n // storage types\n type FileOpts,\n type UploadFileResponse,\n type DeleteFileResponse,\n\n // stream types\n type CreateReadStreamOpts,\n type CreateWriteStreamOpts,\n type InstantWritableStream,\n\n // custom store\n StoreInterface,\n type StoreInterfaceStoreName,\n\n // sync table types\n type SyncTableCallback,\n type SyncTableCallbackEvent,\n type SyncTableInitialSyncBatch,\n type SyncTableInitialSyncComplete,\n type SyncTableSyncTransaction,\n type SyncTableLoadFromStorage,\n type SyncTableSetupError,\n};\n"]}
@@ -0,0 +1,15 @@
1
+ export declare const streamConstructors: {
2
+ ReadableStream: {
3
+ new (underlyingSource: UnderlyingByteSource, strategy?: {
4
+ highWaterMark?: number;
5
+ }): ReadableStream<Uint8Array<ArrayBuffer>>;
6
+ new <R = any>(underlyingSource: UnderlyingDefaultSource<R>, strategy?: QueuingStrategy<R>): ReadableStream<R>;
7
+ new <R = any>(underlyingSource?: UnderlyingSource<R>, strategy?: QueuingStrategy<R>): ReadableStream<R>;
8
+ prototype: ReadableStream;
9
+ };
10
+ WritableStream: {
11
+ new <W = any>(underlyingSink?: UnderlyingSink<W>, strategy?: QueuingStrategy<W>): WritableStream<W>;
12
+ prototype: WritableStream;
13
+ };
14
+ };
15
+ //# sourceMappingURL=Streams.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Streams.d.ts","sourceRoot":"","sources":["../../src/Streams.ts"],"names":[],"mappings":"AACA,eAAO,MAAM,kBAAkB;;;yBAIgn5oC,CAAC;;;;;;;;;;CAD/o5oC,CAAC"}
@@ -0,0 +1,6 @@
1
+ // RN may need a polyfill for streams, so we put those in Streams.native.ts
2
+ export const streamConstructors = {
3
+ ReadableStream: ReadableStream,
4
+ WritableStream: WritableStream,
5
+ };
6
+ //# sourceMappingURL=Streams.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Streams.js","sourceRoot":"","sources":["../../src/Streams.ts"],"names":[],"mappings":"AAAA,2EAA2E;AAC3E,MAAM,CAAC,MAAM,kBAAkB,GAAG;IAChC,cAAc,EAAE,cAAc;IAC9B,cAAc,EAAE,cAAc;CAC/B,CAAC","sourcesContent":["// RN may need a polyfill for streams, so we put those in Streams.native.ts\nexport const streamConstructors = {\n ReadableStream: ReadableStream,\n WritableStream: WritableStream,\n};\n"]}
@@ -0,0 +1,6 @@
1
+ import { ReadableStream, WritableStream } from 'web-streams-polyfill';
2
+ export declare const streamConstructors: {
3
+ ReadableStream: typeof ReadableStream;
4
+ WritableStream: typeof WritableStream;
5
+ };
6
+ //# sourceMappingURL=Streams.native.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Streams.native.d.ts","sourceRoot":"","sources":["../../src/Streams.native.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,cAAc,EAAE,MAAM,sBAAsB,CAAC;AAEtE,eAAO,MAAM,kBAAkB;;;CAG9B,CAAC"}
@@ -0,0 +1,6 @@
1
+ import { ReadableStream, WritableStream } from 'web-streams-polyfill';
2
+ export const streamConstructors = {
3
+ ReadableStream: ReadableStream,
4
+ WritableStream: WritableStream,
5
+ };
6
+ //# sourceMappingURL=Streams.native.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Streams.native.js","sourceRoot":"","sources":["../../src/Streams.native.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,cAAc,EAAE,MAAM,sBAAsB,CAAC;AAEtE,MAAM,CAAC,MAAM,kBAAkB,GAAG;IAChC,cAAc,EAAE,cAAc;IAC9B,cAAc,EAAE,cAAc;CAC/B,CAAC","sourcesContent":["import { ReadableStream, WritableStream } from 'web-streams-polyfill';\n\nexport const streamConstructors = {\n ReadableStream: ReadableStream,\n WritableStream: WritableStream,\n};\n"]}
@@ -1,8 +1,8 @@
1
1
  import 'react-native-get-random-values';
2
- import Storage from './Storage';
2
+ import Store from './Storage';
3
3
  import NetworkListener from './NetworkListener';
4
4
  import { InstantReactAbstractDatabase } from '@instantdb/react-common';
5
- import { i, id, tx, lookup, InstantAPIError, setInstantWarningsEnabled, SyncTableCallbackEventType, createInstantRouteHandler, type RoomSchemaShape, type InstantQuery, type InstantQueryResult, type InstantSchema, type InstantSchemaDatabase, type ConnectionStatus, type BackwardsCompatibleSchema, type IInstantDatabase, type Config, type Query, type QueryResponse, type InstantObject, type AuthState, type User, type PresencePeer, type AttrsDefs, type CardinalityKind, type DataAttrDef, type EntitiesDef, type EntitiesWithLinks, type EntityDef, type InstantGraph, type InstantUnknownSchemaDef, type LinkAttrDef, type LinkDef, type LinksDef, type ResolveAttrs, type ValueTypes, type InstantEntity, type InstaQLEntity, type InstaQLResult, type InstaQLEntitySubquery, type RoomsOf, type RoomsDef, type PresenceOf, type TopicsOf, type TopicOf, type RoomHandle, type CreateParams, type InstantConfig, type InstantSchemaDef, type InstantUnknownSchema, type TransactionChunk, type InstantRules, type UpdateParams, type LinkParams, type ValidQuery, type ExchangeCodeForTokenParams, type SendMagicCodeParams, type SendMagicCodeResponse, type SignInWithIdTokenParams, type VerifyMagicCodeParams, type VerifyResponse, type FileOpts, type UploadFileResponse, type DeleteFileResponse, type SyncTableCallback, type SyncTableCallbackEvent, type SyncTableInitialSyncBatch, type SyncTableInitialSyncComplete, type SyncTableSyncTransaction, type SyncTableLoadFromStorage, type SyncTableSetupError, StoreInterface, type StoreInterfaceStoreName } from '@instantdb/core';
5
+ import { i, id, tx, lookup, InstantAPIError, setInstantWarningsEnabled, SyncTableCallbackEventType, createInstantRouteHandler, type RoomSchemaShape, type InstantQuery, type InstantQueryResult, type InstantSchema, type InstantSchemaDatabase, type ConnectionStatus, type BackwardsCompatibleSchema, type IInstantDatabase, type Config, type Query, type QueryResponse, type InstantObject, type AuthState, type User, type PresencePeer, type AttrsDefs, type CardinalityKind, type DataAttrDef, type EntitiesDef, type EntitiesWithLinks, type EntityDef, type InstantGraph, type InstantUnknownSchemaDef, type LinkAttrDef, type LinkDef, type LinksDef, type ResolveAttrs, type ValueTypes, type InstantEntity, type InstaQLEntity, type InstaQLResult, type InstaQLEntitySubquery, type RoomsOf, type RoomsDef, type PresenceOf, type TopicsOf, type TopicOf, type RoomHandle, type CreateParams, type InstantConfig, type InstantSchemaDef, type InstantUnknownSchema, type TransactionChunk, type InstantRules, type UpdateParams, type LinkParams, type ValidQuery, type ExchangeCodeForTokenParams, type SendMagicCodeParams, type SendMagicCodeResponse, type SignInWithIdTokenParams, type VerifyMagicCodeParams, type VerifyResponse, type FileOpts, type UploadFileResponse, type DeleteFileResponse, type SyncTableCallback, type SyncTableCallbackEvent, type SyncTableInitialSyncBatch, type SyncTableInitialSyncComplete, type SyncTableSyncTransaction, type SyncTableLoadFromStorage, type SyncTableSetupError, StoreInterface, type StoreInterfaceStoreName, CreateReadStreamOpts, CreateWriteStreamOpts, InstantWritableStream } from '@instantdb/core';
6
6
  /**
7
7
  *
8
8
  * The first step: init your application!
@@ -42,7 +42,7 @@ declare function init<Schema extends InstantSchemaDef<any, any, any> = InstantUn
42
42
  */
43
43
  declare const init_experimental: typeof init;
44
44
  declare class InstantReactNativeDatabase<Schema extends InstantSchemaDef<any, any, any>, UseDates extends boolean, Config extends InstantConfig<Schema, UseDates> = InstantConfig<Schema, UseDates>> extends InstantReactAbstractDatabase<Schema, UseDates, Config> {
45
- static Storage: typeof Storage;
45
+ static Store: typeof Store;
46
46
  static NetworkListener: typeof NetworkListener;
47
47
  static EventSourceImpl: {
48
48
  new (url: string | URL, eventSourceInitDict?: EventSourceInit): EventSource;
@@ -52,5 +52,5 @@ declare class InstantReactNativeDatabase<Schema extends InstantSchemaDef<any, an
52
52
  readonly CLOSED: 2;
53
53
  } | typeof import("./EventSourceShim").default;
54
54
  }
55
- export { init, init_experimental, id, tx, lookup, i, createInstantRouteHandler, InstantReactNativeDatabase, InstantAPIError, setInstantWarningsEnabled, SyncTableCallbackEventType, type Config, type Query, type QueryResponse, type InstantObject, type User, type AuthState, type ConnectionStatus, type InstantQuery, type InstantQueryResult, type InstantSchema, type InstantSchemaDatabase, type IInstantDatabase, type InstantEntity, type RoomSchemaShape, type PresencePeer, type AttrsDefs, type CardinalityKind, type DataAttrDef, type EntitiesDef, type EntitiesWithLinks, type EntityDef, type InstantGraph, type CreateParams, type LinkAttrDef, type InstantConfig, type LinkDef, type InstantUnknownSchemaDef, type LinksDef, type RoomsOf, type RoomsDef, type RoomHandle, type PresenceOf, type TopicsOf, type TopicOf, type ResolveAttrs, type ValueTypes, type InstaQLEntity, type InstaQLResult, type InstaQLEntitySubquery, type InstantSchemaDef, type InstantUnknownSchema, type BackwardsCompatibleSchema, type InstantRules, type UpdateParams, type LinkParams, type ValidQuery, type ExchangeCodeForTokenParams, type SendMagicCodeParams, type TransactionChunk, type SendMagicCodeResponse, type SignInWithIdTokenParams, type VerifyMagicCodeParams, type VerifyResponse, type FileOpts, type UploadFileResponse, type DeleteFileResponse, StoreInterface, type StoreInterfaceStoreName, type SyncTableCallback, type SyncTableCallbackEvent, type SyncTableInitialSyncBatch, type SyncTableInitialSyncComplete, type SyncTableSyncTransaction, type SyncTableLoadFromStorage, type SyncTableSetupError, };
55
+ export { init, init_experimental, id, tx, lookup, i, createInstantRouteHandler, InstantReactNativeDatabase, InstantAPIError, setInstantWarningsEnabled, SyncTableCallbackEventType, type Config, type Query, type QueryResponse, type InstantObject, type User, type AuthState, type ConnectionStatus, type InstantQuery, type InstantQueryResult, type InstantSchema, type InstantSchemaDatabase, type IInstantDatabase, type InstantEntity, type RoomSchemaShape, type PresencePeer, type AttrsDefs, type CardinalityKind, type DataAttrDef, type EntitiesDef, type EntitiesWithLinks, type EntityDef, type InstantGraph, type CreateParams, type LinkAttrDef, type InstantConfig, type LinkDef, type InstantUnknownSchemaDef, type LinksDef, type RoomsOf, type RoomsDef, type RoomHandle, type PresenceOf, type TopicsOf, type TopicOf, type ResolveAttrs, type ValueTypes, type InstaQLEntity, type InstaQLResult, type InstaQLEntitySubquery, type InstantSchemaDef, type InstantUnknownSchema, type BackwardsCompatibleSchema, type InstantRules, type UpdateParams, type LinkParams, type ValidQuery, type ExchangeCodeForTokenParams, type SendMagicCodeParams, type TransactionChunk, type SendMagicCodeResponse, type SignInWithIdTokenParams, type VerifyMagicCodeParams, type VerifyResponse, type FileOpts, type UploadFileResponse, type DeleteFileResponse, type CreateReadStreamOpts, type CreateWriteStreamOpts, type InstantWritableStream, StoreInterface, type StoreInterfaceStoreName, type SyncTableCallback, type SyncTableCallbackEvent, type SyncTableInitialSyncBatch, type SyncTableInitialSyncComplete, type SyncTableSyncTransaction, type SyncTableLoadFromStorage, type SyncTableSetupError, };
56
56
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,gCAAgC,CAAC;AAExC,OAAO,OAAO,MAAM,WAAW,CAAC;AAEhC,OAAO,eAAe,MAAM,mBAAmB,CAAC;AAGhD,OAAO,EAAE,4BAA4B,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KAAK,qBAAqB,EAC1B,KAAK,qBAAqB,EAG1B,cAAc,EACd,KAAK,uBAAuB,EAG5B,KAAK,iBAAiB,EACtB,KAAK,sBAAsB,EAC3B,KAAK,yBAAyB,EAC9B,KAAK,4BAA4B,EACjC,KAAK,wBAAwB,EAC7B,KAAK,wBAAwB,EAC7B,KAAK,mBAAmB,GACzB,CAAC"}
@@ -1,8 +1,9 @@
1
1
  import 'react-native-get-random-values';
2
- import Storage from './Storage';
2
+ import Store from './Storage';
3
3
  import EventSourceImpl from './EventSourceImpl';
4
4
  import NetworkListener from './NetworkListener';
5
5
  import version from './version';
6
+ import { streamConstructors } from './Streams';
6
7
  import { InstantReactAbstractDatabase } from '@instantdb/react-common';
7
8
  import { i, id, tx, lookup,
8
9
  // error
@@ -36,6 +37,8 @@ function init(
36
37
  // as a non-nullable in the InstantConfig type.
37
38
  config) {
38
39
  const configStrict = {
40
+ ReadableStream: streamConstructors.ReadableStream,
41
+ WritableStream: streamConstructors.WritableStream,
39
42
  ...config,
40
43
  useDateObjects: (config.useDateObjects ?? false),
41
44
  };
@@ -59,7 +62,7 @@ config) {
59
62
  */
60
63
  const init_experimental = init;
61
64
  class InstantReactNativeDatabase extends InstantReactAbstractDatabase {
62
- static Storage = Storage;
65
+ static Store = Store;
63
66
  static NetworkListener = NetworkListener;
64
67
  static EventSourceImpl = EventSourceImpl;
65
68
  }
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,gCAAgC,CAAC;AAExC,OAAO,OAAO,MAAM,WAAW,CAAC;AAChC,OAAO,eAAe,MAAM,mBAAmB,CAAC;AAChD,OAAO,eAAe,MAAM,mBAAmB,CAAC;AAChD,OAAO,OAAO,MAAM,WAAW,CAAC;AAEhC,OAAO,EAAE,4BAA4B,EAAE,MAAM,yBAAyB,CAAC;AAEvE,OAAO,EACL,CAAC,EACD,EAAE,EACF,EAAE,EACF,MAAM;AACN,QAAQ;AACR,eAAe,EACf,yBAAyB;AAEzB,mBAAmB;AACnB,0BAA0B;AAE1B,QAAQ;AACR,yBAAyB,EAyEzB,cAAc,GAEf,MAAM,iBAAiB,CAAC;AAEzB;;;;;;;;;;;;;;;;;;;GAmBG;AACH,SAAS,IAAI;AAIX,oEAAoE;AACpE,+CAA+C;AAC/C,MAEC;IAMD,MAAM,YAAY,GAAG;QACnB,GAAG,MAAM;QACT,cAAc,EAAE,CAAC,MAAM,CAAC,cAAc,IAAI,KAAK,CAAa;KAC7D,CAAC;IACF,OAAO,IAAI,0BAA0B,CAInC,YAAY,EAAE;QACd,kBAAkB,EAAE,OAAO;KAC5B,CAAC,CAAC;AACL,CAAC;AAED;;;;;;;;;;;;;GAaG;AACH,MAAM,iBAAiB,GAAG,IAAI,CAAC;AAE/B,MAAM,0BAOJ,SAAQ,4BAAsD;IAC9D,MAAM,CAAC,OAAO,GAAG,OAAO,CAAC;IACzB,MAAM,CAAC,eAAe,GAAG,eAAe,CAAC;IACzC,MAAM,CAAC,eAAe,GAAG,eAAe,CAAC;;AAG3C,OAAO,EACL,IAAI,EACJ,iBAAiB,EACjB,EAAE,EACF,EAAE,EACF,MAAM,EACN,CAAC,EACD,yBAAyB,EACzB,0BAA0B;AAE1B,QAAQ;AACR,eAAe,EACf,yBAAyB;AAEzB,mBAAmB;AACnB,0BAA0B;AAkE1B,eAAe;AACf,cAAc,GAWf,CAAC","sourcesContent":["import 'react-native-get-random-values';\n\nimport Storage from './Storage';\nimport EventSourceImpl from './EventSourceImpl';\nimport NetworkListener from './NetworkListener';\nimport version from './version';\n\nimport { InstantReactAbstractDatabase } from '@instantdb/react-common';\n\nimport {\n i,\n id,\n tx,\n lookup,\n // error\n InstantAPIError,\n setInstantWarningsEnabled,\n\n // sync table enums\n SyncTableCallbackEventType,\n\n // types\n createInstantRouteHandler,\n type RoomSchemaShape,\n type InstantQuery,\n type InstantQueryResult,\n type InstantSchema,\n type InstantSchemaDatabase,\n type ConnectionStatus,\n type BackwardsCompatibleSchema,\n type IInstantDatabase,\n type Config,\n type Query,\n type QueryResponse,\n type InstantObject,\n type AuthState,\n type User,\n\n // presence types\n type PresencePeer,\n\n // schema types\n type AttrsDefs,\n type CardinalityKind,\n type DataAttrDef,\n type EntitiesDef,\n type EntitiesWithLinks,\n type EntityDef,\n type InstantGraph,\n type InstantUnknownSchemaDef,\n type LinkAttrDef,\n type LinkDef,\n type LinksDef,\n type ResolveAttrs,\n type ValueTypes,\n type InstantEntity,\n type ConfigWithSchema,\n type InstaQLEntity,\n type InstaQLResult,\n type InstaQLEntitySubquery,\n type RoomsOf,\n type RoomsDef,\n type PresenceOf,\n type TopicsOf,\n type TopicOf,\n type RoomHandle,\n type CreateParams,\n type InstantConfig,\n type InstantSchemaDef,\n type InstantUnknownSchema,\n type TransactionChunk,\n type InstantRules,\n type UpdateParams,\n type LinkParams,\n type ValidQuery,\n type ExchangeCodeForTokenParams,\n type SendMagicCodeParams,\n type SendMagicCodeResponse,\n type SignInWithIdTokenParams,\n type VerifyMagicCodeParams,\n type VerifyResponse,\n\n // storage types\n type FileOpts,\n type UploadFileResponse,\n type DeleteFileResponse,\n\n // sync table types\n type SyncTableCallback,\n type SyncTableCallbackEvent,\n type SyncTableInitialSyncBatch,\n type SyncTableInitialSyncComplete,\n type SyncTableSyncTransaction,\n type SyncTableLoadFromStorage,\n type SyncTableSetupError,\n StoreInterface,\n type StoreInterfaceStoreName,\n} from '@instantdb/core';\n\n/**\n *\n * The first step: init your application!\n *\n * Visit https://instantdb.com/dash to get your `appId` :)\n *\n * @example\n * import { init } from \"@instantdb/react-native\"\n *\n * const db = init({ appId: \"my-app-id\" })\n *\n * // You can also provide a schema for type safety and editor autocomplete!\n *\n * import { init } from \"@instantdb/react-native\"\n * import schema from \"\"../instant.schema.ts\";\n *\n * const db = init({ appId: \"my-app-id\", schema })\n *\n * // To learn more: https://instantdb.com/docs/modeling-data\n */\nfunction init<\n Schema extends InstantSchemaDef<any, any, any> = InstantUnknownSchema,\n UseDates extends boolean = false,\n>(\n // Allows config with missing `useDateObjects`, but keeps `UseDates`\n // as a non-nullable in the InstantConfig type.\n config: Omit<InstantConfig<Schema, UseDates>, 'useDateObjects'> & {\n useDateObjects?: UseDates;\n },\n): InstantReactNativeDatabase<\n Schema,\n UseDates,\n InstantConfig<Schema, UseDates>\n> {\n const configStrict = {\n ...config,\n useDateObjects: (config.useDateObjects ?? false) as UseDates,\n };\n return new InstantReactNativeDatabase<\n Schema,\n UseDates,\n InstantConfig<Schema, UseDates>\n >(configStrict, {\n '@instantdb/react': version,\n });\n}\n\n/**\n * @deprecated\n * `init_experimental` is deprecated. You can replace it with `init`.\n *\n * @example\n *\n * // Before\n * import { init_experimental } from \"@instantdb/react-native\"\n * const db = init_experimental({ ... });\n *\n * // After\n * import { init } from \"@instantdb/react-native\"\n * const db = init({ ... });\n */\nconst init_experimental = init;\n\nclass InstantReactNativeDatabase<\n Schema extends InstantSchemaDef<any, any, any>,\n UseDates extends boolean,\n Config extends InstantConfig<Schema, UseDates> = InstantConfig<\n Schema,\n UseDates\n >,\n> extends InstantReactAbstractDatabase<Schema, UseDates, Config> {\n static Storage = Storage;\n static NetworkListener = NetworkListener;\n static EventSourceImpl = EventSourceImpl;\n}\n\nexport {\n init,\n init_experimental,\n id,\n tx,\n lookup,\n i,\n createInstantRouteHandler,\n InstantReactNativeDatabase,\n\n // error\n InstantAPIError,\n setInstantWarningsEnabled,\n\n // sync table enums\n SyncTableCallbackEventType,\n\n // types\n type Config,\n type Query,\n type QueryResponse,\n type InstantObject,\n type User,\n type AuthState,\n type ConnectionStatus,\n type InstantQuery,\n type InstantQueryResult,\n type InstantSchema,\n type InstantSchemaDatabase,\n type IInstantDatabase,\n type InstantEntity,\n type RoomSchemaShape,\n\n // presence types\n type PresencePeer,\n\n // schema types\n type AttrsDefs,\n type CardinalityKind,\n type DataAttrDef,\n type EntitiesDef,\n type EntitiesWithLinks,\n type EntityDef,\n type InstantGraph,\n type CreateParams,\n type LinkAttrDef,\n type InstantConfig,\n type LinkDef,\n type InstantUnknownSchemaDef,\n type LinksDef,\n type RoomsOf,\n type RoomsDef,\n type RoomHandle,\n type PresenceOf,\n type TopicsOf,\n type TopicOf,\n type ResolveAttrs,\n type ValueTypes,\n type InstaQLEntity,\n type InstaQLResult,\n type InstaQLEntitySubquery,\n type InstantSchemaDef,\n type InstantUnknownSchema,\n type BackwardsCompatibleSchema,\n type InstantRules,\n type UpdateParams,\n type LinkParams,\n type ValidQuery,\n type ExchangeCodeForTokenParams,\n type SendMagicCodeParams,\n type TransactionChunk,\n type SendMagicCodeResponse,\n type SignInWithIdTokenParams,\n type VerifyMagicCodeParams,\n type VerifyResponse,\n\n // storage types\n type FileOpts,\n type UploadFileResponse,\n type DeleteFileResponse,\n\n // custom store\n StoreInterface,\n type StoreInterfaceStoreName,\n\n // sync table types\n type SyncTableCallback,\n type SyncTableCallbackEvent,\n type SyncTableInitialSyncBatch,\n type SyncTableInitialSyncComplete,\n type SyncTableSyncTransaction,\n type SyncTableLoadFromStorage,\n type SyncTableSetupError,\n};\n"]}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,gCAAgC,CAAC;AAExC,OAAO,KAAK,MAAM,WAAW,CAAC;AAC9B,OAAO,eAAe,MAAM,mBAAmB,CAAC;AAChD,OAAO,eAAe,MAAM,mBAAmB,CAAC;AAChD,OAAO,OAAO,MAAM,WAAW,CAAC;AAChC,OAAO,EAAE,kBAAkB,EAAE,MAAM,WAAW,CAAC;AAE/C,OAAO,EAAE,4BAA4B,EAAE,MAAM,yBAAyB,CAAC;AAEvE,OAAO,EACL,CAAC,EACD,EAAE,EACF,EAAE,EACF,MAAM;AACN,QAAQ;AACR,eAAe,EACf,yBAAyB;AAEzB,mBAAmB;AACnB,0BAA0B;AAE1B,QAAQ;AACR,yBAAyB,EAyEzB,cAAc,GAKf,MAAM,iBAAiB,CAAC;AAEzB;;;;;;;;;;;;;;;;;;;GAmBG;AACH,SAAS,IAAI;AAIX,oEAAoE;AACpE,+CAA+C;AAC/C,MAEC;IAMD,MAAM,YAAY,GAAG;QACnB,cAAc,EAAE,kBAAkB,CAAC,cAAc;QACjD,cAAc,EAAE,kBAAkB,CAAC,cAAc;QACjD,GAAG,MAAM;QACT,cAAc,EAAE,CAAC,MAAM,CAAC,cAAc,IAAI,KAAK,CAAa;KAC7D,CAAC;IACF,OAAO,IAAI,0BAA0B,CAInC,YAAY,EAAE;QACd,kBAAkB,EAAE,OAAO;KAC5B,CAAC,CAAC;AACL,CAAC;AAED;;;;;;;;;;;;;GAaG;AACH,MAAM,iBAAiB,GAAG,IAAI,CAAC;AAE/B,MAAM,0BAOJ,SAAQ,4BAAsD;IAC9D,MAAM,CAAC,KAAK,GAAG,KAAK,CAAC;IACrB,MAAM,CAAC,eAAe,GAAG,eAAe,CAAC;IACzC,MAAM,CAAC,eAAe,GAAG,eAAe,CAAC;;AAG3C,OAAO,EACL,IAAI,EACJ,iBAAiB,EACjB,EAAE,EACF,EAAE,EACF,MAAM,EACN,CAAC,EACD,yBAAyB,EACzB,0BAA0B;AAE1B,QAAQ;AACR,eAAe,EACf,yBAAyB;AAEzB,mBAAmB;AACnB,0BAA0B;AAuE1B,eAAe;AACf,cAAc,GAWf,CAAC","sourcesContent":["import 'react-native-get-random-values';\n\nimport Store from './Storage';\nimport EventSourceImpl from './EventSourceImpl';\nimport NetworkListener from './NetworkListener';\nimport version from './version';\nimport { streamConstructors } from './Streams';\n\nimport { InstantReactAbstractDatabase } from '@instantdb/react-common';\n\nimport {\n i,\n id,\n tx,\n lookup,\n // error\n InstantAPIError,\n setInstantWarningsEnabled,\n\n // sync table enums\n SyncTableCallbackEventType,\n\n // types\n createInstantRouteHandler,\n type RoomSchemaShape,\n type InstantQuery,\n type InstantQueryResult,\n type InstantSchema,\n type InstantSchemaDatabase,\n type ConnectionStatus,\n type BackwardsCompatibleSchema,\n type IInstantDatabase,\n type Config,\n type Query,\n type QueryResponse,\n type InstantObject,\n type AuthState,\n type User,\n\n // presence types\n type PresencePeer,\n\n // schema types\n type AttrsDefs,\n type CardinalityKind,\n type DataAttrDef,\n type EntitiesDef,\n type EntitiesWithLinks,\n type EntityDef,\n type InstantGraph,\n type InstantUnknownSchemaDef,\n type LinkAttrDef,\n type LinkDef,\n type LinksDef,\n type ResolveAttrs,\n type ValueTypes,\n type InstantEntity,\n type ConfigWithSchema,\n type InstaQLEntity,\n type InstaQLResult,\n type InstaQLEntitySubquery,\n type RoomsOf,\n type RoomsDef,\n type PresenceOf,\n type TopicsOf,\n type TopicOf,\n type RoomHandle,\n type CreateParams,\n type InstantConfig,\n type InstantSchemaDef,\n type InstantUnknownSchema,\n type TransactionChunk,\n type InstantRules,\n type UpdateParams,\n type LinkParams,\n type ValidQuery,\n type ExchangeCodeForTokenParams,\n type SendMagicCodeParams,\n type SendMagicCodeResponse,\n type SignInWithIdTokenParams,\n type VerifyMagicCodeParams,\n type VerifyResponse,\n\n // storage types\n type FileOpts,\n type UploadFileResponse,\n type DeleteFileResponse,\n\n // sync table types\n type SyncTableCallback,\n type SyncTableCallbackEvent,\n type SyncTableInitialSyncBatch,\n type SyncTableInitialSyncComplete,\n type SyncTableSyncTransaction,\n type SyncTableLoadFromStorage,\n type SyncTableSetupError,\n StoreInterface,\n type StoreInterfaceStoreName,\n CreateReadStreamOpts,\n CreateWriteStreamOpts,\n InstantWritableStream,\n} from '@instantdb/core';\n\n/**\n *\n * The first step: init your application!\n *\n * Visit https://instantdb.com/dash to get your `appId` :)\n *\n * @example\n * import { init } from \"@instantdb/react-native\"\n *\n * const db = init({ appId: \"my-app-id\" })\n *\n * // You can also provide a schema for type safety and editor autocomplete!\n *\n * import { init } from \"@instantdb/react-native\"\n * import schema from \"\"../instant.schema.ts\";\n *\n * const db = init({ appId: \"my-app-id\", schema })\n *\n * // To learn more: https://instantdb.com/docs/modeling-data\n */\nfunction init<\n Schema extends InstantSchemaDef<any, any, any> = InstantUnknownSchema,\n UseDates extends boolean = false,\n>(\n // Allows config with missing `useDateObjects`, but keeps `UseDates`\n // as a non-nullable in the InstantConfig type.\n config: Omit<InstantConfig<Schema, UseDates>, 'useDateObjects'> & {\n useDateObjects?: UseDates;\n },\n): InstantReactNativeDatabase<\n Schema,\n UseDates,\n InstantConfig<Schema, UseDates>\n> {\n const configStrict = {\n ReadableStream: streamConstructors.ReadableStream,\n WritableStream: streamConstructors.WritableStream,\n ...config,\n useDateObjects: (config.useDateObjects ?? false) as UseDates,\n };\n return new InstantReactNativeDatabase<\n Schema,\n UseDates,\n InstantConfig<Schema, UseDates>\n >(configStrict, {\n '@instantdb/react': version,\n });\n}\n\n/**\n * @deprecated\n * `init_experimental` is deprecated. You can replace it with `init`.\n *\n * @example\n *\n * // Before\n * import { init_experimental } from \"@instantdb/react-native\"\n * const db = init_experimental({ ... });\n *\n * // After\n * import { init } from \"@instantdb/react-native\"\n * const db = init({ ... });\n */\nconst init_experimental = init;\n\nclass InstantReactNativeDatabase<\n Schema extends InstantSchemaDef<any, any, any>,\n UseDates extends boolean,\n Config extends InstantConfig<Schema, UseDates> = InstantConfig<\n Schema,\n UseDates\n >,\n> extends InstantReactAbstractDatabase<Schema, UseDates, Config> {\n static Store = Store;\n static NetworkListener = NetworkListener;\n static EventSourceImpl = EventSourceImpl;\n}\n\nexport {\n init,\n init_experimental,\n id,\n tx,\n lookup,\n i,\n createInstantRouteHandler,\n InstantReactNativeDatabase,\n\n // error\n InstantAPIError,\n setInstantWarningsEnabled,\n\n // sync table enums\n SyncTableCallbackEventType,\n\n // types\n type Config,\n type Query,\n type QueryResponse,\n type InstantObject,\n type User,\n type AuthState,\n type ConnectionStatus,\n type InstantQuery,\n type InstantQueryResult,\n type InstantSchema,\n type InstantSchemaDatabase,\n type IInstantDatabase,\n type InstantEntity,\n type RoomSchemaShape,\n\n // presence types\n type PresencePeer,\n\n // schema types\n type AttrsDefs,\n type CardinalityKind,\n type DataAttrDef,\n type EntitiesDef,\n type EntitiesWithLinks,\n type EntityDef,\n type InstantGraph,\n type CreateParams,\n type LinkAttrDef,\n type InstantConfig,\n type LinkDef,\n type InstantUnknownSchemaDef,\n type LinksDef,\n type RoomsOf,\n type RoomsDef,\n type RoomHandle,\n type PresenceOf,\n type TopicsOf,\n type TopicOf,\n type ResolveAttrs,\n type ValueTypes,\n type InstaQLEntity,\n type InstaQLResult,\n type InstaQLEntitySubquery,\n type InstantSchemaDef,\n type InstantUnknownSchema,\n type BackwardsCompatibleSchema,\n type InstantRules,\n type UpdateParams,\n type LinkParams,\n type ValidQuery,\n type ExchangeCodeForTokenParams,\n type SendMagicCodeParams,\n type TransactionChunk,\n type SendMagicCodeResponse,\n type SignInWithIdTokenParams,\n type VerifyMagicCodeParams,\n type VerifyResponse,\n\n // storage types\n type FileOpts,\n type UploadFileResponse,\n type DeleteFileResponse,\n\n // stream types\n type CreateReadStreamOpts,\n type CreateWriteStreamOpts,\n type InstantWritableStream,\n\n // custom store\n StoreInterface,\n type StoreInterfaceStoreName,\n\n // sync table types\n type SyncTableCallback,\n type SyncTableCallbackEvent,\n type SyncTableInitialSyncBatch,\n type SyncTableInitialSyncComplete,\n type SyncTableSyncTransaction,\n type SyncTableLoadFromStorage,\n type SyncTableSetupError,\n};\n"]}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@instantdb/react-native",
3
- "version": "0.22.139",
3
+ "version": "0.22.140",
4
4
  "description": "Instant DB for React Native",
5
5
  "homepage": "https://github.com/instantdb/instant/tree/main/client/packages/react-native",
6
6
  "repository": {
@@ -29,9 +29,10 @@
29
29
  "react-native-get-random-values": ">=1.5"
30
30
  },
31
31
  "dependencies": {
32
- "@instantdb/core": "0.22.139",
33
- "@instantdb/version": "0.22.139",
34
- "@instantdb/react-common": "0.22.139"
32
+ "web-streams-polyfill": "^4.2.0",
33
+ "@instantdb/core": "0.22.140",
34
+ "@instantdb/react-common": "0.22.140",
35
+ "@instantdb/version": "0.22.140"
35
36
  },
36
37
  "scripts": {
37
38
  "test": "vitest",
@@ -0,0 +1,6 @@
1
+ import { ReadableStream, WritableStream } from 'web-streams-polyfill';
2
+
3
+ export const streamConstructors = {
4
+ ReadableStream: ReadableStream,
5
+ WritableStream: WritableStream,
6
+ };
package/src/Streams.ts ADDED
@@ -0,0 +1,5 @@
1
+ // RN may need a polyfill for streams, so we put those in Streams.native.ts
2
+ export const streamConstructors = {
3
+ ReadableStream: ReadableStream,
4
+ WritableStream: WritableStream,
5
+ };
package/src/index.ts CHANGED
@@ -1,9 +1,10 @@
1
1
  import 'react-native-get-random-values';
2
2
 
3
- import Storage from './Storage';
3
+ import Store from './Storage';
4
4
  import EventSourceImpl from './EventSourceImpl';
5
5
  import NetworkListener from './NetworkListener';
6
6
  import version from './version';
7
+ import { streamConstructors } from './Streams';
7
8
 
8
9
  import { InstantReactAbstractDatabase } from '@instantdb/react-common';
9
10
 
@@ -95,6 +96,9 @@ import {
95
96
  type SyncTableSetupError,
96
97
  StoreInterface,
97
98
  type StoreInterfaceStoreName,
99
+ CreateReadStreamOpts,
100
+ CreateWriteStreamOpts,
101
+ InstantWritableStream,
98
102
  } from '@instantdb/core';
99
103
 
100
104
  /**
@@ -132,6 +136,8 @@ function init<
132
136
  InstantConfig<Schema, UseDates>
133
137
  > {
134
138
  const configStrict = {
139
+ ReadableStream: streamConstructors.ReadableStream,
140
+ WritableStream: streamConstructors.WritableStream,
135
141
  ...config,
136
142
  useDateObjects: (config.useDateObjects ?? false) as UseDates,
137
143
  };
@@ -168,7 +174,7 @@ class InstantReactNativeDatabase<
168
174
  UseDates
169
175
  >,
170
176
  > extends InstantReactAbstractDatabase<Schema, UseDates, Config> {
171
- static Storage = Storage;
177
+ static Store = Store;
172
178
  static NetworkListener = NetworkListener;
173
179
  static EventSourceImpl = EventSourceImpl;
174
180
  }
@@ -254,6 +260,11 @@ export {
254
260
  type UploadFileResponse,
255
261
  type DeleteFileResponse,
256
262
 
263
+ // stream types
264
+ type CreateReadStreamOpts,
265
+ type CreateWriteStreamOpts,
266
+ type InstantWritableStream,
267
+
257
268
  // custom store
258
269
  StoreInterface,
259
270
  type StoreInterfaceStoreName,