@dittolive/ditto 1.1.2 → 1.1.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 +2 -2
- package/node/ditto.cjs.js +1 -1
- package/node/ditto.darwin-arm64.node +0 -0
- package/node/ditto.darwin-x64.node +0 -0
- package/node/ditto.linux-arm.node +0 -0
- package/node/ditto.linux-x64.node +0 -0
- package/node/transports.darwin-arm64.node +0 -0
- package/node/transports.darwin-x64.node +0 -0
- package/package.json +1 -1
- package/types/ditto.d.ts +67 -17
- package/web/ditto.es6.js +1 -1
- package/web/ditto.umd.js +1 -1
- package/web/ditto.wasm +0 -0
package/types/ditto.d.ts
CHANGED
|
@@ -334,6 +334,8 @@ interface IdentityManual {
|
|
|
334
334
|
certificate: string;
|
|
335
335
|
}
|
|
336
336
|
/**
|
|
337
|
+
* Deprecated - use `IdentityOnlinePlaygroundV2` instead.
|
|
338
|
+
*
|
|
337
339
|
* Test a Ditto Cloud app without authentication ("Playground mode"). This mode
|
|
338
340
|
* offers no security and must only be used for development.
|
|
339
341
|
*/
|
|
@@ -346,6 +348,40 @@ interface IdentityOnlinePlayground {
|
|
|
346
348
|
appID: string;
|
|
347
349
|
/** If true, auto-configure sync with Ditto Cloud. Default is `true`. */
|
|
348
350
|
enableDittoCloudSync?: boolean;
|
|
351
|
+
/**
|
|
352
|
+
* A custom Ditto Cloud URL.
|
|
353
|
+
* @internal
|
|
354
|
+
*/
|
|
355
|
+
customDittoCloudURL?: string;
|
|
356
|
+
}
|
|
357
|
+
/**
|
|
358
|
+
* Test a Ditto Cloud app with weak shared token authentication ("Playground
|
|
359
|
+
* mode"). This mode is not secure and must only be used for development.
|
|
360
|
+
*/
|
|
361
|
+
interface IdentityOnlinePlaygroundV2 {
|
|
362
|
+
type: 'onlinePlaygroundV2';
|
|
363
|
+
/**
|
|
364
|
+
* An ID identifying this app registration on the Ditto portal, which can be
|
|
365
|
+
* found at https://portal.ditto.live.
|
|
366
|
+
*/
|
|
367
|
+
appID: string;
|
|
368
|
+
/**
|
|
369
|
+
* A shared token used to set up the OnlinePlayground session. This token is
|
|
370
|
+
* provided by the Ditto Portal when setting up the application.
|
|
371
|
+
*/
|
|
372
|
+
token: string;
|
|
373
|
+
/** If true, auto-configure sync with Ditto Cloud. Default is `true`. */
|
|
374
|
+
enableDittoCloudSync?: boolean;
|
|
375
|
+
/**
|
|
376
|
+
* If specified, use a custom authentication service instead of Ditto Cloud.
|
|
377
|
+
* @internal
|
|
378
|
+
*/
|
|
379
|
+
customAuthURL?: string;
|
|
380
|
+
/**
|
|
381
|
+
* A custom Ditto Cloud URL.
|
|
382
|
+
* @internal
|
|
383
|
+
*/
|
|
384
|
+
customDittoCloudURL?: string;
|
|
349
385
|
}
|
|
350
386
|
/**
|
|
351
387
|
* Deprecated - use `IdentityOnlineWithAuthentication` instead.
|
|
@@ -391,6 +427,11 @@ interface IdentityOnline {
|
|
|
391
427
|
* If specified, use a custom authentication service instead of Ditto Cloud.
|
|
392
428
|
*/
|
|
393
429
|
customAuthURL?: string;
|
|
430
|
+
/**
|
|
431
|
+
* A custom Ditto Cloud URL.
|
|
432
|
+
* @internal
|
|
433
|
+
*/
|
|
434
|
+
customDittoCloudURL?: string;
|
|
394
435
|
}
|
|
395
436
|
/**
|
|
396
437
|
* Run Ditto in secure production mode, logging on to Ditto Cloud or an
|
|
@@ -431,19 +472,21 @@ interface IdentityOnlineWithAuthentication {
|
|
|
431
472
|
* If specified, use a custom authentication service instead of Ditto Cloud.
|
|
432
473
|
*/
|
|
433
474
|
customAuthURL?: string;
|
|
475
|
+
/**
|
|
476
|
+
* A custom Ditto Cloud URL.
|
|
477
|
+
* @internal
|
|
478
|
+
*/
|
|
479
|
+
customDittoCloudURL?: string;
|
|
434
480
|
}
|
|
435
481
|
/**
|
|
436
482
|
* The various identity configurations that you can use when initializing a
|
|
437
483
|
* `Ditto` instance.
|
|
438
484
|
*/
|
|
439
|
-
declare type Identity = IdentityDevelopment | IdentityOfflinePlayground | IdentitySharedKey | IdentityProduction | IdentityManual | IdentityOnlinePlayground | IdentityOnline | IdentityOnlineWithAuthentication;
|
|
485
|
+
declare type Identity = IdentityDevelopment | IdentityOfflinePlayground | IdentitySharedKey | IdentityProduction | IdentityManual | IdentityOnlinePlayground | IdentityOnlinePlaygroundV2 | IdentityOnline | IdentityOnlineWithAuthentication;
|
|
440
486
|
/** The list of identity types that require activation through an offlineLicenseToken */
|
|
441
487
|
declare const IdentityTypesRequiringOfflineLicenseToken: string[];
|
|
442
488
|
|
|
443
|
-
/**
|
|
444
|
-
* TODO: document.
|
|
445
|
-
* @internal
|
|
446
|
-
*/
|
|
489
|
+
/** @internal */
|
|
447
490
|
declare class Bridge<JSClass extends object, FFIType> {
|
|
448
491
|
type: Function;
|
|
449
492
|
release: (pointer: Pointer<FFIType>) => void;
|
|
@@ -452,18 +495,24 @@ declare class Bridge<JSClass extends object, FFIType> {
|
|
|
452
495
|
* that is called whenever a registered object is garbage collected, passing
|
|
453
496
|
* the associated `pointer` to it. The release function is then responsible
|
|
454
497
|
* to free or drop the corresponding native object.
|
|
498
|
+
*
|
|
499
|
+
* @internal
|
|
455
500
|
*/
|
|
456
501
|
constructor(type: Function, release: (pointer: Pointer<FFIType>) => void, options?: {});
|
|
457
502
|
/**
|
|
458
503
|
* Returns the FFI pointer for `object` if registered, otherwise returns
|
|
459
504
|
* `undefined`. If `object` has been unregistered before, returns
|
|
460
505
|
* `undefined`, too.
|
|
506
|
+
*
|
|
507
|
+
* @internal
|
|
461
508
|
*/
|
|
462
509
|
pointerFor(object: JSClass): Pointer<FFIType> | undefined;
|
|
463
510
|
/**
|
|
464
511
|
* Convenience method, returns the object for the FFI `pointer` if registered,
|
|
465
512
|
* otherwise returns `undefined`. If the object associated with the `pointer`
|
|
466
513
|
* has been unregistered before, returns `undefined`, too.
|
|
514
|
+
*
|
|
515
|
+
* @internal
|
|
467
516
|
*/
|
|
468
517
|
objectFor(pointer: Pointer<FFIType>): JSClass | undefined;
|
|
469
518
|
/**
|
|
@@ -472,16 +521,20 @@ declare class Bridge<JSClass extends object, FFIType> {
|
|
|
472
521
|
* returns after registering. If no `create` function is given, uses the
|
|
473
522
|
* type of the bridge as a constructor and creates a new instance of it
|
|
474
523
|
* without passing any parameters.
|
|
524
|
+
*
|
|
525
|
+
* @internal
|
|
475
526
|
*/
|
|
476
|
-
bridge(pointer: Pointer<FFIType>,
|
|
477
|
-
/**
|
|
478
|
-
* TODO: document.
|
|
479
|
-
*/
|
|
527
|
+
bridge(pointer: Pointer<FFIType>, objectOrCreate?: object | (() => JSClass), options?: {}): JSClass;
|
|
528
|
+
/** @internal */
|
|
480
529
|
register(object: JSClass, pointer: Pointer<FFIType>): void;
|
|
481
|
-
/**
|
|
482
|
-
* TODO: document.
|
|
483
|
-
*/
|
|
530
|
+
/** @internal */
|
|
484
531
|
unregister(object: JSClass): void;
|
|
532
|
+
/** @internal */
|
|
533
|
+
unregisterAll(): void;
|
|
534
|
+
/** @internal */
|
|
535
|
+
get count(): number;
|
|
536
|
+
/** @internal */
|
|
537
|
+
static readonly all: any[];
|
|
485
538
|
private metaByAddrMap;
|
|
486
539
|
private finalizationRegistry;
|
|
487
540
|
private finalize;
|
|
@@ -2244,9 +2297,7 @@ declare class Ditto {
|
|
|
2244
2297
|
private validateIdentity;
|
|
2245
2298
|
private setSyncEnabled;
|
|
2246
2299
|
}
|
|
2247
|
-
/**
|
|
2248
|
-
* @internal
|
|
2249
|
-
*/
|
|
2300
|
+
/** @internal */
|
|
2250
2301
|
declare const dittoBridge: Bridge<Ditto, "CDitto_t">;
|
|
2251
2302
|
|
|
2252
2303
|
/** @internal */
|
|
@@ -2424,7 +2475,6 @@ declare class NotAvailableAuthenticator extends Authenticator {
|
|
|
2424
2475
|
loginWithUsernameAndPassword(username: string, password: string, provider: string): Promise<void>;
|
|
2425
2476
|
logout(cleanupFn?: (Ditto: any) => void): Promise<void>;
|
|
2426
2477
|
'@ditto.authenticationExpiring': (secondsRemaining: any) => never;
|
|
2427
|
-
/** @internal */
|
|
2428
2478
|
'@ditto.authClientValidityChanged': (isWebValid: boolean, isX509Valid: boolean) => void;
|
|
2429
2479
|
}
|
|
2430
2480
|
|
|
@@ -2636,5 +2686,5 @@ declare class CBOR {
|
|
|
2636
2686
|
static decode(data: Uint8Array): any;
|
|
2637
2687
|
}
|
|
2638
2688
|
|
|
2639
|
-
export { Attachment, AttachmentFetchEvent, AttachmentFetchEventCompleted, AttachmentFetchEventDeleted, AttachmentFetchEventProgress, AttachmentFetchEventType, AttachmentFetcher, AttachmentToken, AuthenticationHandler, AuthenticationStatus, Authenticator, CBOR, Collection, CollectionsEvent, CollectionsEventParams, ConditionSource, Counter, CustomLogCallback, Ditto, Document, DocumentIDValue, DocumentLike, DocumentPath, DocumentValue, Identity, IdentityDevelopment, IdentityManual, IdentityOfflinePlayground, IdentityOnline, IdentityOnlinePlayground, IdentityOnlineWithAuthentication, IdentityProduction, IdentitySharedKey, IdentityTypesRequiringOfflineLicenseToken, InitOptions, InsertOptions, KeepAlive, LiveQuery, LiveQueryEvent, LiveQueryEventInitial, LiveQueryEventUpdate, LiveQueryEventUpdateParams, LiveQueryMove, LogLevel, Logger, MutableDocument, MutableDocumentLike, MutableDocumentPath, NotAvailableAuthenticator, Observer, ObserverOptions, OnlineAuthenticator, PendingCursorOperation, PendingIDSpecificOperation, PresenceConnectionType, QueryArguments, QueryObservationHandler, RemotePeer, SingleDocumentLiveQueryEvent, SingleObservationHandler, SortDirection, Store, Subscription, SubscriptionContextInfo, TransportCondition, TransportConfig, TransportConfigConnect, TransportConfigGlobal, TransportConfigLan, TransportConfigListen, TransportConfigListenHTTP, TransportConfigListenTCP, TransportConfigPeerToPeer, UpdateResult, UpdateResultType, UpdateResultsMap, UpsertOptions, Value, WebAssemblyModule, WriteStrategy, __log, attachmentBridge, dittoBridge, documentBridge, init, mutableDocumentBridge, validateDocumentIDCBOR, validateDocumentIDValue };
|
|
2689
|
+
export { Attachment, AttachmentFetchEvent, AttachmentFetchEventCompleted, AttachmentFetchEventDeleted, AttachmentFetchEventProgress, AttachmentFetchEventType, AttachmentFetcher, AttachmentToken, AuthenticationHandler, AuthenticationStatus, Authenticator, CBOR, Collection, CollectionsEvent, CollectionsEventParams, ConditionSource, Counter, CustomLogCallback, Ditto, Document, DocumentIDValue, DocumentLike, DocumentPath, DocumentValue, Identity, IdentityDevelopment, IdentityManual, IdentityOfflinePlayground, IdentityOnline, IdentityOnlinePlayground, IdentityOnlinePlaygroundV2, IdentityOnlineWithAuthentication, IdentityProduction, IdentitySharedKey, IdentityTypesRequiringOfflineLicenseToken, InitOptions, InsertOptions, KeepAlive, LiveQuery, LiveQueryEvent, LiveQueryEventInitial, LiveQueryEventUpdate, LiveQueryEventUpdateParams, LiveQueryMove, LogLevel, Logger, MutableDocument, MutableDocumentLike, MutableDocumentPath, NotAvailableAuthenticator, Observer, ObserverOptions, OnlineAuthenticator, PendingCursorOperation, PendingIDSpecificOperation, PresenceConnectionType, QueryArguments, QueryObservationHandler, RemotePeer, SingleDocumentLiveQueryEvent, SingleObservationHandler, SortDirection, Store, Subscription, SubscriptionContextInfo, TransportCondition, TransportConfig, TransportConfigConnect, TransportConfigGlobal, TransportConfigLan, TransportConfigListen, TransportConfigListenHTTP, TransportConfigListenTCP, TransportConfigPeerToPeer, UpdateResult, UpdateResultType, UpdateResultsMap, UpsertOptions, Value, WebAssemblyModule, WriteStrategy, __log, attachmentBridge, dittoBridge, documentBridge, init, mutableDocumentBridge, validateDocumentIDCBOR, validateDocumentIDValue };
|
|
2640
2690
|
//# sourceMappingURL=ditto.d.ts.map
|