Skip to content

Commit 375d6ba

Browse files
committed
renamed CollectionModel.schema to CollectionModel.fields
1 parent bd69374 commit 375d6ba

14 files changed

+31
-27
lines changed

CHANGELOG.md

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -106,14 +106,18 @@
106106
```
107107

108108
- ⚠️ Soft-deprecated and aliased `*Url()` -> `*URL()` methods for consistency with other similar native JS APIs and the accepted Go conventions.
109-
_The old methods still works but you may get a console warning to replace it because they will be removed in the future._
109+
_The old methods still works but you may get a console warning to replace them because they will be removed in the future._
110110
```js
111111
pb.baseUrl -> pb.baseURL
112112
pb.buildUrl() -> pb.buildURL()
113113
pb.files.getUrl() -> pb.files.getURL()
114114
pb.backups.getDownloadUrl() -> pb.backups.getDownloadURL()
115115
```
116116

117+
- ⚠️ Renamed `CollectionModel.schema` to `CollectionModel.fields`.
118+
119+
- ⚠️ Renamed type `SchemaField` to `CollectionField`.
120+
117121

118122
## 0.21.5
119123

dist/pocketbase.cjs.d.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ interface RecordModel extends BaseModel {
3939
// -------------------------------------------------------------------
4040
// Collection types
4141
// -------------------------------------------------------------------
42-
interface SchemaField {
42+
interface CollectionField {
4343
[key: string]: any;
4444
id: string;
4545
name: string;
@@ -94,7 +94,7 @@ interface EmailTemplate {
9494
}
9595
interface collection extends BaseModel {
9696
name: string;
97-
schema: Array<SchemaField>;
97+
fields: Array<CollectionField>;
9898
indexes: Array<string>;
9999
system: boolean;
100100
listRule?: string;
@@ -922,7 +922,7 @@ declare class CollectionService extends CrudService<CollectionModel> {
922922
/**
923923
* Imports the provided collections.
924924
*
925-
* If `deleteMissing` is `true`, all local collections and schema fields,
925+
* If `deleteMissing` is `true`, all local collections and their fields,
926926
* that are not present in the imported configuration, WILL BE DELETED
927927
* (including their related records data)!
928928
*

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: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ interface RecordModel extends BaseModel {
6060
// -------------------------------------------------------------------
6161
// Collection types
6262
// -------------------------------------------------------------------
63-
interface SchemaField {
63+
interface CollectionField {
6464
[key: string]: any;
6565
id: string;
6666
name: string;
@@ -115,7 +115,7 @@ interface EmailTemplate {
115115
}
116116
interface collection extends BaseModel {
117117
name: string;
118-
schema: Array<SchemaField>;
118+
fields: Array<CollectionField>;
119119
indexes: Array<string>;
120120
system: boolean;
121121
listRule?: string;
@@ -965,7 +965,7 @@ declare class CollectionService extends CrudService<CollectionModel> {
965965
/**
966966
* Imports the provided collections.
967967
*
968-
* If `deleteMissing` is `true`, all local collections and schema fields,
968+
* If `deleteMissing` is `true`, all local collections and their fields,
969969
* that are not present in the imported configuration, WILL BE DELETED
970970
* (including their related records data)!
971971
*
@@ -1519,4 +1519,4 @@ declare function getTokenPayload(token: string): {
15191519
* @param [expirationThreshold] Time in seconds that will be subtracted from the token `exp` property.
15201520
*/
15211521
declare function isTokenExpired(token: string, expirationThreshold?: number): boolean;
1522-
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, SchemaField, 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 };
1522+
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 };

dist/pocketbase.es.d.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ interface RecordModel extends BaseModel {
6060
// -------------------------------------------------------------------
6161
// Collection types
6262
// -------------------------------------------------------------------
63-
interface SchemaField {
63+
interface CollectionField {
6464
[key: string]: any;
6565
id: string;
6666
name: string;
@@ -115,7 +115,7 @@ interface EmailTemplate {
115115
}
116116
interface collection extends BaseModel {
117117
name: string;
118-
schema: Array<SchemaField>;
118+
fields: Array<CollectionField>;
119119
indexes: Array<string>;
120120
system: boolean;
121121
listRule?: string;
@@ -965,7 +965,7 @@ declare class CollectionService extends CrudService<CollectionModel> {
965965
/**
966966
* Imports the provided collections.
967967
*
968-
* If `deleteMissing` is `true`, all local collections and schema fields,
968+
* If `deleteMissing` is `true`, all local collections and their fields,
969969
* that are not present in the imported configuration, WILL BE DELETED
970970
* (including their related records data)!
971971
*
@@ -1519,4 +1519,4 @@ declare function getTokenPayload(token: string): {
15191519
* @param [expirationThreshold] Time in seconds that will be subtracted from the token `exp` property.
15201520
*/
15211521
declare function isTokenExpired(token: string, expirationThreshold?: number): boolean;
1522-
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, SchemaField, 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 };
1522+
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 };

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: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ interface RecordModel extends BaseModel {
3939
// -------------------------------------------------------------------
4040
// Collection types
4141
// -------------------------------------------------------------------
42-
interface SchemaField {
42+
interface CollectionField {
4343
[key: string]: any;
4444
id: string;
4545
name: string;
@@ -94,7 +94,7 @@ interface EmailTemplate {
9494
}
9595
interface collection extends BaseModel {
9696
name: string;
97-
schema: Array<SchemaField>;
97+
fields: Array<CollectionField>;
9898
indexes: Array<string>;
9999
system: boolean;
100100
listRule?: string;
@@ -922,7 +922,7 @@ declare class CollectionService extends CrudService<CollectionModel> {
922922
/**
923923
* Imports the provided collections.
924924
*
925-
* If `deleteMissing` is `true`, all local collections and schema fields,
925+
* If `deleteMissing` is `true`, all local collections and their fields,
926926
* that are not present in the imported configuration, WILL BE DELETED
927927
* (including their related records data)!
928928
*

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: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ interface RecordModel extends BaseModel {
3939
// -------------------------------------------------------------------
4040
// Collection types
4141
// -------------------------------------------------------------------
42-
interface SchemaField {
42+
interface CollectionField {
4343
[key: string]: any;
4444
id: string;
4545
name: string;
@@ -94,7 +94,7 @@ interface EmailTemplate {
9494
}
9595
interface collection extends BaseModel {
9696
name: string;
97-
schema: Array<SchemaField>;
97+
fields: Array<CollectionField>;
9898
indexes: Array<string>;
9999
system: boolean;
100100
listRule?: string;
@@ -922,7 +922,7 @@ declare class CollectionService extends CrudService<CollectionModel> {
922922
/**
923923
* Imports the provided collections.
924924
*
925-
* If `deleteMissing` is `true`, all local collections and schema fields,
925+
* If `deleteMissing` is `true`, all local collections and their fields,
926926
* that are not present in the imported configuration, WILL BE DELETED
927927
* (including their related records data)!
928928
*

0 commit comments

Comments
 (0)