@bzr/bazaar
Advanced tools
Comparing version 1.1.0 to 1.1.1
import { API } from "./raw"; | ||
import type { SubscribeListener, BazaarMessage, CollectionOptions, FilterObject, OrderBy, Doc, AnyDoc } from "../types"; | ||
import type { SubscribeListener, BazaarMessage, CollectionOptions, FilterObject, OrderBy, Doc, AnyDoc, DeepPartial } from "../types"; | ||
/** | ||
@@ -36,3 +36,3 @@ * @internal | ||
insertOne(doc: Omit<T, "id"> | T): Promise<string>; | ||
updateOne(docId: string, doc: Partial<T>): Promise<BazaarMessage>; | ||
updateOne(docId: string, doc: DeepPartial<T>): Promise<BazaarMessage>; | ||
replaceOne(docId: string, doc: Omit<T, "id"> | T): Promise<BazaarMessage>; | ||
@@ -39,0 +39,0 @@ deleteOne(docId: string): Promise<BazaarMessage>; |
@@ -123,2 +123,5 @@ import io from 'socket.io-client'; | ||
this.waitForConnection = () => { | ||
if (!this.dataApi) { | ||
return Promise.reject(new Error("Uninitialized data API. Possible unauthenticated request")); | ||
} | ||
return new Promise((resolve, reject) => { | ||
@@ -125,0 +128,0 @@ if (this.dataApi.connected) { |
@@ -18,3 +18,3 @@ import { CollectionAPI } from "./api/collection"; | ||
export { OrderByType, PermissionType, LoginType } from "./types"; | ||
export type { User, Contact, Permission, NewPermission, PermissionTemplate, GrantedPermission, SendNotification, SharingNotification, FilterObject, FilterComparison, OrderBy, BazaarMessage, Link, Doc, AnyDoc, SubscribeListener, BazaarOptions, MirrorOptions, } from "./types"; | ||
export type { User, Contact, Permission, NewPermission, PermissionTemplate, GrantedPermission, SendNotification, SharingNotification, FilterObject, FilterComparison, OrderBy, BazaarMessage, Link, Doc, AnyDoc, DeepPartial, SubscribeListener, BazaarOptions, MirrorOptions, } from "./types"; | ||
/** | ||
@@ -21,0 +21,0 @@ * The primary class of the Bazaar JS SDK to help you more easily build web apps with Bazaar. |
@@ -166,2 +166,5 @@ import { BazaarApp } from ".."; | ||
}; | ||
export type DeepPartial<T> = { | ||
[P in keyof T]?: T[P] extends (infer U)[] ? DeepPartial<U>[] : T[P] extends object | undefined ? DeepPartial<T[P]> : T[P]; | ||
}; | ||
/** | ||
@@ -168,0 +171,0 @@ * |
{ | ||
"name": "@bzr/bazaar", | ||
"version": "1.1.0", | ||
"version": "1.1.1", | ||
"description": "The Bazaar SDK. Conveniently use Bazaar with your app in the browser.", | ||
@@ -5,0 +5,0 @@ "files": [ |
@@ -1,2 +0,2 @@ | ||
[![NPM Version](https://img.shields.io/npm/v/bzr/bazaar.svg?style=flat)](https://www.npmjs.com/package/@bzr/bazaar) | ||
[![NPM Version](https://img.shields.io/npm/v/@bzr/bazaar.svg?style=flat)](https://www.npmjs.com/package/@bzr/bazaar) | ||
[![NPM License](https://img.shields.io/npm/l/all-contributors.svg?style=flat)](https://github.com/bzr-sys/bazaar-js/blob/master/LICENSE) | ||
@@ -3,0 +3,0 @@ |
Sorry, the diff of this file is too big to display
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
171783
2895