Skip to content

Commit 11357a3

Browse files
committed
added dedicated RecordSubscribeOptions type
1 parent df26f6b commit 11357a3

12 files changed

+45
-13
lines changed

dist/pocketbase.cjs.d.ts

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -299,6 +299,11 @@ interface RecordListOptions extends ListOptions, RecordOptions {
299299
}
300300
interface RecordFullListOptions extends FullListOptions, RecordOptions {
301301
}
302+
interface RecordSubscribeOptions extends SendOptions {
303+
fields?: string;
304+
filter?: string;
305+
expand?: string;
306+
}
302307
interface LogStatsOptions extends CommonOptions {
303308
filter?: string;
304309
}
@@ -610,7 +615,7 @@ declare class RecordService<M = RecordModel> extends CrudService<M> {
610615
* You can use the returned `UnsubscribeFunc` to remove only a single subscription.
611616
* Or use `unsubscribe(topic)` if you want to remove all subscriptions attached to the topic.
612617
*/
613-
subscribe<T = M>(topic: string, callback: (data: RecordSubscription<T>) => void, options?: SendOptions): Promise<UnsubscribeFunc>;
618+
subscribe<T = M>(topic: string, callback: (data: RecordSubscription<T>) => void, options?: RecordSubscribeOptions): Promise<UnsubscribeFunc>;
614619
/**
615620
* Unsubscribe from all subscriptions of the specified topic
616621
* ("*" or record id).

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: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -321,6 +321,11 @@ interface RecordListOptions extends ListOptions, RecordOptions {
321321
}
322322
interface RecordFullListOptions extends FullListOptions, RecordOptions {
323323
}
324+
interface RecordSubscribeOptions extends SendOptions {
325+
fields?: string;
326+
filter?: string;
327+
expand?: string;
328+
}
324329
interface LogStatsOptions extends CommonOptions {
325330
filter?: string;
326331
}
@@ -653,7 +658,7 @@ declare class RecordService<M = RecordModel> extends CrudService<M> {
653658
* You can use the returned `UnsubscribeFunc` to remove only a single subscription.
654659
* Or use `unsubscribe(topic)` if you want to remove all subscriptions attached to the topic.
655660
*/
656-
subscribe<T = M>(topic: string, callback: (data: RecordSubscription<T>) => void, options?: SendOptions): Promise<UnsubscribeFunc>;
661+
subscribe<T = M>(topic: string, callback: (data: RecordSubscription<T>) => void, options?: RecordSubscribeOptions): Promise<UnsubscribeFunc>;
657662
/**
658663
* Unsubscribe from all subscriptions of the specified topic
659664
* ("*" or record id).
@@ -1525,4 +1530,4 @@ declare function getTokenPayload(token: string): {
15251530
* @param [expirationThreshold] Time in seconds that will be subtracted from the token `exp` property.
15261531
*/
15271532
declare function isTokenExpired(token: string, expirationThreshold?: number): boolean;
1528-
export { Client as default, BeforeSendResult, ClientResponseError, CollectionService, HealthCheckResponse, HealthService, HourlyStats, LogService, UnsubscribeFunc, RealtimeService, RecordAuthResponse, AuthProviderInfo, AuthMethodsList, RecordSubscription, OAuth2UrlCallback, OAuth2AuthConfig, OTPResponse, RecordService, CrudService, BatchRequest, BatchRequestResult, BatchService, SubBatchService, AsyncSaveFunc, AsyncClearFunc, AsyncAuthStore, AuthRecord, AuthModel, OnStoreChangeFunc, BaseAuthStore, LocalAuthStore, ListResult, BaseModel, LogModel, RecordModel, CollectionField, TokenConfig, AuthAlertConfig, OTPConfig, MFAConfig, PasswordAuthConfig, OAuth2Provider, OAuth2Config, EmailTemplate, BaseCollectionModel, ViewCollectionModel, AuthCollectionModel, CollectionModel, SendOptions, CommonOptions, ListOptions, FullListOptions, RecordOptions, RecordListOptions, RecordFullListOptions, LogStatsOptions, FileOptions, AuthOptions, normalizeUnknownQueryParams, serializeQueryParams, ParseOptions, cookieParse, SerializeOptions, cookieSerialize, getTokenPayload, isTokenExpired };
1533+
export { Client as default, BeforeSendResult, ClientResponseError, CollectionService, HealthCheckResponse, HealthService, HourlyStats, LogService, UnsubscribeFunc, RealtimeService, RecordAuthResponse, AuthProviderInfo, AuthMethodsList, RecordSubscription, OAuth2UrlCallback, OAuth2AuthConfig, OTPResponse, RecordService, CrudService, BatchRequest, BatchRequestResult, BatchService, SubBatchService, AsyncSaveFunc, AsyncClearFunc, AsyncAuthStore, AuthRecord, AuthModel, OnStoreChangeFunc, BaseAuthStore, LocalAuthStore, ListResult, BaseModel, LogModel, RecordModel, CollectionField, TokenConfig, AuthAlertConfig, OTPConfig, MFAConfig, PasswordAuthConfig, OAuth2Provider, OAuth2Config, EmailTemplate, BaseCollectionModel, ViewCollectionModel, AuthCollectionModel, CollectionModel, SendOptions, CommonOptions, ListOptions, FullListOptions, RecordOptions, RecordListOptions, RecordFullListOptions, RecordSubscribeOptions, LogStatsOptions, FileOptions, AuthOptions, normalizeUnknownQueryParams, serializeQueryParams, ParseOptions, cookieParse, SerializeOptions, cookieSerialize, getTokenPayload, isTokenExpired };

dist/pocketbase.es.d.ts

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -321,6 +321,11 @@ interface RecordListOptions extends ListOptions, RecordOptions {
321321
}
322322
interface RecordFullListOptions extends FullListOptions, RecordOptions {
323323
}
324+
interface RecordSubscribeOptions extends SendOptions {
325+
fields?: string;
326+
filter?: string;
327+
expand?: string;
328+
}
324329
interface LogStatsOptions extends CommonOptions {
325330
filter?: string;
326331
}
@@ -653,7 +658,7 @@ declare class RecordService<M = RecordModel> extends CrudService<M> {
653658
* You can use the returned `UnsubscribeFunc` to remove only a single subscription.
654659
* Or use `unsubscribe(topic)` if you want to remove all subscriptions attached to the topic.
655660
*/
656-
subscribe<T = M>(topic: string, callback: (data: RecordSubscription<T>) => void, options?: SendOptions): Promise<UnsubscribeFunc>;
661+
subscribe<T = M>(topic: string, callback: (data: RecordSubscription<T>) => void, options?: RecordSubscribeOptions): Promise<UnsubscribeFunc>;
657662
/**
658663
* Unsubscribe from all subscriptions of the specified topic
659664
* ("*" or record id).
@@ -1525,4 +1530,4 @@ declare function getTokenPayload(token: string): {
15251530
* @param [expirationThreshold] Time in seconds that will be subtracted from the token `exp` property.
15261531
*/
15271532
declare function isTokenExpired(token: string, expirationThreshold?: number): boolean;
1528-
export { Client as default, BeforeSendResult, ClientResponseError, CollectionService, HealthCheckResponse, HealthService, HourlyStats, LogService, UnsubscribeFunc, RealtimeService, RecordAuthResponse, AuthProviderInfo, AuthMethodsList, RecordSubscription, OAuth2UrlCallback, OAuth2AuthConfig, OTPResponse, RecordService, CrudService, BatchRequest, BatchRequestResult, BatchService, SubBatchService, AsyncSaveFunc, AsyncClearFunc, AsyncAuthStore, AuthRecord, AuthModel, OnStoreChangeFunc, BaseAuthStore, LocalAuthStore, ListResult, BaseModel, LogModel, RecordModel, CollectionField, TokenConfig, AuthAlertConfig, OTPConfig, MFAConfig, PasswordAuthConfig, OAuth2Provider, OAuth2Config, EmailTemplate, BaseCollectionModel, ViewCollectionModel, AuthCollectionModel, CollectionModel, SendOptions, CommonOptions, ListOptions, FullListOptions, RecordOptions, RecordListOptions, RecordFullListOptions, LogStatsOptions, FileOptions, AuthOptions, normalizeUnknownQueryParams, serializeQueryParams, ParseOptions, cookieParse, SerializeOptions, cookieSerialize, getTokenPayload, isTokenExpired };
1533+
export { Client as default, BeforeSendResult, ClientResponseError, CollectionService, HealthCheckResponse, HealthService, HourlyStats, LogService, UnsubscribeFunc, RealtimeService, RecordAuthResponse, AuthProviderInfo, AuthMethodsList, RecordSubscription, OAuth2UrlCallback, OAuth2AuthConfig, OTPResponse, RecordService, CrudService, BatchRequest, BatchRequestResult, BatchService, SubBatchService, AsyncSaveFunc, AsyncClearFunc, AsyncAuthStore, AuthRecord, AuthModel, OnStoreChangeFunc, BaseAuthStore, LocalAuthStore, ListResult, BaseModel, LogModel, RecordModel, CollectionField, TokenConfig, AuthAlertConfig, OTPConfig, MFAConfig, PasswordAuthConfig, OAuth2Provider, OAuth2Config, EmailTemplate, BaseCollectionModel, ViewCollectionModel, AuthCollectionModel, CollectionModel, SendOptions, CommonOptions, ListOptions, FullListOptions, RecordOptions, RecordListOptions, RecordFullListOptions, RecordSubscribeOptions, LogStatsOptions, FileOptions, AuthOptions, normalizeUnknownQueryParams, serializeQueryParams, ParseOptions, cookieParse, SerializeOptions, cookieSerialize, getTokenPayload, isTokenExpired };

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.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.iife.d.ts

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -299,6 +299,11 @@ interface RecordListOptions extends ListOptions, RecordOptions {
299299
}
300300
interface RecordFullListOptions extends FullListOptions, RecordOptions {
301301
}
302+
interface RecordSubscribeOptions extends SendOptions {
303+
fields?: string;
304+
filter?: string;
305+
expand?: string;
306+
}
302307
interface LogStatsOptions extends CommonOptions {
303308
filter?: string;
304309
}
@@ -610,7 +615,7 @@ declare class RecordService<M = RecordModel> extends CrudService<M> {
610615
* You can use the returned `UnsubscribeFunc` to remove only a single subscription.
611616
* Or use `unsubscribe(topic)` if you want to remove all subscriptions attached to the topic.
612617
*/
613-
subscribe<T = M>(topic: string, callback: (data: RecordSubscription<T>) => void, options?: SendOptions): Promise<UnsubscribeFunc>;
618+
subscribe<T = M>(topic: string, callback: (data: RecordSubscription<T>) => void, options?: RecordSubscribeOptions): Promise<UnsubscribeFunc>;
614619
/**
615620
* Unsubscribe from all subscriptions of the specified topic
616621
* ("*" or record id).

dist/pocketbase.iife.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.umd.d.ts

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -299,6 +299,11 @@ interface RecordListOptions extends ListOptions, RecordOptions {
299299
}
300300
interface RecordFullListOptions extends FullListOptions, RecordOptions {
301301
}
302+
interface RecordSubscribeOptions extends SendOptions {
303+
fields?: string;
304+
filter?: string;
305+
expand?: string;
306+
}
302307
interface LogStatsOptions extends CommonOptions {
303308
filter?: string;
304309
}
@@ -610,7 +615,7 @@ declare class RecordService<M = RecordModel> extends CrudService<M> {
610615
* You can use the returned `UnsubscribeFunc` to remove only a single subscription.
611616
* Or use `unsubscribe(topic)` if you want to remove all subscriptions attached to the topic.
612617
*/
613-
subscribe<T = M>(topic: string, callback: (data: RecordSubscription<T>) => void, options?: SendOptions): Promise<UnsubscribeFunc>;
618+
subscribe<T = M>(topic: string, callback: (data: RecordSubscription<T>) => void, options?: RecordSubscribeOptions): Promise<UnsubscribeFunc>;
614619
/**
615620
* Unsubscribe from all subscriptions of the specified topic
616621
* ("*" or record id).

dist/pocketbase.umd.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.

0 commit comments

Comments
 (0)