@budibase/types 3.13.24 → 3.13.26

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/sdk/db.d.ts CHANGED
@@ -47,6 +47,7 @@ export type DatabaseOpts = {
47
47
  };
48
48
  export type DatabasePutOpts = {
49
49
  force?: boolean;
50
+ returnDoc?: boolean;
50
51
  };
51
52
  export type DatabaseCreateIndexOpts = {
52
53
  index: {
@@ -106,7 +107,14 @@ export interface Database {
106
107
  bulkRemove(documents: Document[], opts?: {
107
108
  silenceErrors?: boolean;
108
109
  }): Promise<void>;
109
- put(document: AnyDocument, opts?: DatabasePutOpts): Promise<Nano.DocumentInsertResponse>;
110
+ put<T extends AnyDocument>(document: T, opts?: DatabasePutOpts & {
111
+ returnDoc: true;
112
+ }): Promise<Nano.DocumentInsertResponse & {
113
+ doc: T;
114
+ }>;
115
+ put<T extends AnyDocument>(document: T, opts?: DatabasePutOpts & {
116
+ returnDoc?: false;
117
+ }): Promise<Nano.DocumentInsertResponse>;
110
118
  bulkDocs(documents: AnyDocument[]): Promise<Nano.DocumentBulkResponse[]>;
111
119
  sql<T extends Document>(sql: string, parameters?: SqlQueryBinding): Promise<T[]>;
112
120
  sqlPurgeDocument(docIds: string[] | string): Promise<void>;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@budibase/types",
3
- "version": "3.13.24",
3
+ "version": "3.13.26",
4
4
  "description": "Budibase types",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",
@@ -27,5 +27,5 @@
27
27
  "dependencies": {
28
28
  "scim-patch": "^0.8.1"
29
29
  },
30
- "gitHead": "9dea790829ad44142eb0baa2bfa7fb7a5d3531ad"
30
+ "gitHead": "9a55f2f9e6b196e6779a01425bb17a00b3643431"
31
31
  }