Skip to content

Commit 99a5c3d

Browse files
committed
added support for assigning FormData as body to individual batch requests
1 parent 53bf1f4 commit 99a5c3d

20 files changed

+194
-45
lines changed

CHANGELOG.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,8 @@
1+
## 0.24.0
2+
3+
- Added support for assigning `FormData` as body to individual batch requests ([pocketbase#6145](https://github.com/pocketbase/pocketbase/discussions/6145)).
4+
5+
16
## 0.23.0
27

38
- Added optional `pb.realtime.onDisconnect` hook function.

dist/pocketbase.cjs.d.ts

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1115,8 +1115,6 @@ declare class BatchService extends BaseService {
11151115
/**
11161116
* Sends the batch requests.
11171117
*
1118-
* Note: FormData as individual request body is not supported at the moment.
1119-
*
11201118
* @throws {ClientResponseError}
11211119
*/
11221120
send(options?: SendOptions): Promise<Array<BatchRequestResult>>;
@@ -1132,19 +1130,19 @@ declare class SubBatchService {
11321130
*/
11331131
upsert(bodyParams?: {
11341132
[key: string]: any;
1135-
}, options?: RecordOptions): void;
1133+
} | FormData, options?: RecordOptions): void;
11361134
/**
11371135
* Registers a record create request into the current batch queue.
11381136
*/
11391137
create(bodyParams?: {
11401138
[key: string]: any;
1141-
}, options?: RecordOptions): void;
1139+
} | FormData, options?: RecordOptions): void;
11421140
/**
11431141
* Registers a record update request into the current batch queue.
11441142
*/
11451143
update(id: string, bodyParams?: {
11461144
[key: string]: any;
1147-
}, options?: RecordOptions): void;
1145+
} | FormData, options?: RecordOptions): void;
11481146
/**
11491147
* Registers a record delete request into the current batch queue.
11501148
*/

dist/pocketbase.cjs.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/pocketbase.cjs.js.map

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/pocketbase.es.d.mts

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1158,8 +1158,6 @@ declare class BatchService extends BaseService {
11581158
/**
11591159
* Sends the batch requests.
11601160
*
1161-
* Note: FormData as individual request body is not supported at the moment.
1162-
*
11631161
* @throws {ClientResponseError}
11641162
*/
11651163
send(options?: SendOptions): Promise<Array<BatchRequestResult>>;
@@ -1175,19 +1173,19 @@ declare class SubBatchService {
11751173
*/
11761174
upsert(bodyParams?: {
11771175
[key: string]: any;
1178-
}, options?: RecordOptions): void;
1176+
} | FormData, options?: RecordOptions): void;
11791177
/**
11801178
* Registers a record create request into the current batch queue.
11811179
*/
11821180
create(bodyParams?: {
11831181
[key: string]: any;
1184-
}, options?: RecordOptions): void;
1182+
} | FormData, options?: RecordOptions): void;
11851183
/**
11861184
* Registers a record update request into the current batch queue.
11871185
*/
11881186
update(id: string, bodyParams?: {
11891187
[key: string]: any;
1190-
}, options?: RecordOptions): void;
1188+
} | FormData, options?: RecordOptions): void;
11911189
/**
11921190
* Registers a record delete request into the current batch queue.
11931191
*/

dist/pocketbase.es.d.ts

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1158,8 +1158,6 @@ declare class BatchService extends BaseService {
11581158
/**
11591159
* Sends the batch requests.
11601160
*
1161-
* Note: FormData as individual request body is not supported at the moment.
1162-
*
11631161
* @throws {ClientResponseError}
11641162
*/
11651163
send(options?: SendOptions): Promise<Array<BatchRequestResult>>;
@@ -1175,19 +1173,19 @@ declare class SubBatchService {
11751173
*/
11761174
upsert(bodyParams?: {
11771175
[key: string]: any;
1178-
}, options?: RecordOptions): void;
1176+
} | FormData, options?: RecordOptions): void;
11791177
/**
11801178
* Registers a record create request into the current batch queue.
11811179
*/
11821180
create(bodyParams?: {
11831181
[key: string]: any;
1184-
}, options?: RecordOptions): void;
1182+
} | FormData, options?: RecordOptions): void;
11851183
/**
11861184
* Registers a record update request into the current batch queue.
11871185
*/
11881186
update(id: string, bodyParams?: {
11891187
[key: string]: any;
1190-
}, options?: RecordOptions): void;
1188+
} | FormData, options?: RecordOptions): void;
11911189
/**
11921190
* Registers a record delete request into the current batch queue.
11931191
*/

dist/pocketbase.es.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/pocketbase.es.js.map

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/pocketbase.es.mjs

Lines changed: 1 addition & 1 deletion
Large diffs are not rendered by default.

dist/pocketbase.es.mjs.map

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)