updated db pool limits, added logs VACUUM, updated api docs
This commit is contained in:
@@ -24,21 +24,6 @@
|
||||
2
|
||||
),
|
||||
},
|
||||
{
|
||||
code: 400,
|
||||
body: `
|
||||
{
|
||||
"code": 400,
|
||||
"message": "Failed to authenticate.",
|
||||
"data": {
|
||||
"identity": {
|
||||
"code": "validation_required",
|
||||
"message": "Missing required value."
|
||||
}
|
||||
}
|
||||
}
|
||||
`,
|
||||
},
|
||||
{
|
||||
code: 401,
|
||||
body: `
|
||||
@@ -59,13 +44,23 @@
|
||||
}
|
||||
`,
|
||||
},
|
||||
{
|
||||
code: 404,
|
||||
body: `
|
||||
{
|
||||
"code": 404,
|
||||
"message": "Missing auth record context.",
|
||||
"data": {}
|
||||
}
|
||||
`,
|
||||
},
|
||||
];
|
||||
</script>
|
||||
|
||||
<h3 class="m-b-sm">Auth refresh ({collection.name})</h3>
|
||||
<div class="content txt-lg m-b-sm">
|
||||
<p>
|
||||
Returns a new auth response (token and account data) for an
|
||||
Returns a new auth response (token and record data) for an
|
||||
<strong>already authenticated record</strong>.
|
||||
</p>
|
||||
<p>
|
||||
@@ -140,7 +135,7 @@
|
||||
The expanded relations will be appended to the record under the
|
||||
<code>expand</code> property (eg. <code>{`"expand": {"relField1": {...}, ...}`}</code>).
|
||||
<br />
|
||||
Only the relations to which the account has permissions to <strong>view</strong> will be expanded.
|
||||
Only the relations to which the request user has permissions to <strong>view</strong> will be expanded.
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
|
||||
@@ -51,7 +51,7 @@
|
||||
|
||||
<h3 class="m-b-sm">Auth with OAuth2 ({collection.name})</h3>
|
||||
<div class="content txt-lg m-b-sm">
|
||||
<p>Authenticate with an OAuth2 provider and returns a new auth token and account data.</p>
|
||||
<p>Authenticate with an OAuth2 provider and returns a new auth token and record data.</p>
|
||||
<p>This action usually should be called right after the provider login page redirect.</p>
|
||||
<p>
|
||||
You could also check the
|
||||
@@ -232,7 +232,7 @@
|
||||
The expanded relations will be appended to the record under the
|
||||
<code>expand</code> property (eg. <code>{`"expand": {"relField1": {...}, ...}`}</code>).
|
||||
<br />
|
||||
Only the relations to which the account has permissions to <strong>view</strong> will be expanded.
|
||||
Only the relations to which the request user has permissions to <strong>view</strong> will be expanded.
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
|
||||
@@ -194,7 +194,7 @@
|
||||
The expanded relations will be appended to the record under the
|
||||
<code>expand</code> property (eg. <code>{`"expand": {"relField1": {...}, ...}`}</code>).
|
||||
<br />
|
||||
Only the relations to which the account has permissions to <strong>view</strong> will be expanded.
|
||||
Only the relations to which the request user has permissions to <strong>view</strong> will be expanded.
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
|
||||
@@ -114,34 +114,6 @@
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
<div class="section-title">Query parameters</div>
|
||||
<table class="table-compact table-border m-b-base">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>Param</th>
|
||||
<th>Type</th>
|
||||
<th width="60%">Description</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr>
|
||||
<td>expand</td>
|
||||
<td>
|
||||
<span class="label">String</span>
|
||||
</td>
|
||||
<td>
|
||||
Auto expand record relations. Ex.:
|
||||
<CodeBlock content={`?expand=relField1,relField2.subRelField`} />
|
||||
Supports up to 6-levels depth nested relations expansion. <br />
|
||||
The expanded relations will be appended to the record under the
|
||||
<code>expand</code> property (eg. <code>{`"expand": {"relField1": {...}, ...}`}</code>).
|
||||
<br />
|
||||
Only the relations to which the account has permissions to <strong>view</strong> will be expanded.
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
<div class="section-title">Responses</div>
|
||||
<div class="tabs">
|
||||
<div class="tabs-header compact left">
|
||||
|
||||
@@ -37,7 +37,7 @@
|
||||
|
||||
<h3 class="m-b-sm">Confirm password reset ({collection.name})</h3>
|
||||
<div class="content txt-lg m-b-sm">
|
||||
<p>Confirms <strong>{collection.name}</strong> password reset request.</p>
|
||||
<p>Confirms <strong>{collection.name}</strong> password reset request and sets a new password.</p>
|
||||
</div>
|
||||
|
||||
<SdkTabs
|
||||
@@ -128,34 +128,6 @@
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
<div class="section-title">Query parameters</div>
|
||||
<table class="table-compact table-border m-b-base">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>Param</th>
|
||||
<th>Type</th>
|
||||
<th width="60%">Description</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr>
|
||||
<td>expand</td>
|
||||
<td>
|
||||
<span class="label">String</span>
|
||||
</td>
|
||||
<td>
|
||||
Auto expand record relations. Ex.:
|
||||
<CodeBlock content={`?expand=relField1,relField2.subRelField`} />
|
||||
Supports up to 6-levels depth nested relations expansion. <br />
|
||||
The expanded relations will be appended to the record under the
|
||||
<code>expand</code> property (eg. <code>{`"expand": {"relField1": {...}, ...}`}</code>).
|
||||
<br />
|
||||
Only the relations to which the account has permissions to <strong>view</strong> will be expanded.
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
<div class="section-title">Responses</div>
|
||||
<div class="tabs">
|
||||
<div class="tabs-header compact left">
|
||||
|
||||
@@ -96,34 +96,6 @@
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
<div class="section-title">Query parameters</div>
|
||||
<table class="table-compact table-border m-b-base">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>Param</th>
|
||||
<th>Type</th>
|
||||
<th width="60%">Description</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr>
|
||||
<td>expand</td>
|
||||
<td>
|
||||
<span class="label">String</span>
|
||||
</td>
|
||||
<td>
|
||||
Auto expand record relations. Ex.:
|
||||
<CodeBlock content={`?expand=relField1,relField2.subRelField`} />
|
||||
Supports up to 6-levels depth nested relations expansion. <br />
|
||||
The expanded relations will be appended to the record under the
|
||||
<code>expand</code> property (eg. <code>{`"expand": {"relField1": {...}, ...}`}</code>).
|
||||
<br />
|
||||
Only the relations to which the account has permissions to <strong>view</strong> will be expanded.
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
<div class="section-title">Responses</div>
|
||||
<div class="tabs">
|
||||
<div class="tabs-header compact left">
|
||||
|
||||
@@ -308,7 +308,7 @@ await pb.collection('${collection?.name}').requestVerification('test@example.com
|
||||
The expanded relations will be appended to the record under the
|
||||
<code>expand</code> property (eg. <code>{`"expand": {"relField1": {...}, ...}`}</code>).
|
||||
<br />
|
||||
Only the relations to which the account has permissions to <strong>view</strong> will be expanded.
|
||||
Only the relations to which the request user has permissions to <strong>view</strong> will be expanded.
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
|
||||
@@ -57,17 +57,6 @@
|
||||
`,
|
||||
});
|
||||
}
|
||||
|
||||
responses.push({
|
||||
code: 404,
|
||||
body: `
|
||||
{
|
||||
"code": 404,
|
||||
"message": "The requested resource wasn't found.",
|
||||
"data": {}
|
||||
}
|
||||
`,
|
||||
});
|
||||
}
|
||||
</script>
|
||||
|
||||
@@ -109,13 +98,13 @@
|
||||
...
|
||||
|
||||
// fetch a paginated records list
|
||||
final result = await pb.collection('${collection?.name}').getList(
|
||||
final resultList = await pb.collection('${collection?.name}').getList(
|
||||
page: 1,
|
||||
perPage: 50,
|
||||
filter: 'created >= "2022-01-01 00:00:00" && someFiled1 != someField2',
|
||||
);
|
||||
|
||||
// alternatively you can also fetch all records at once via getFullList:
|
||||
// you can also fetch all records at once via getFullList
|
||||
final records = await pb.collection('${collection?.name}').getFullList(
|
||||
batch: 200,
|
||||
sort: '-created',
|
||||
@@ -210,7 +199,7 @@
|
||||
The expanded relations will be appended to each individual record under the
|
||||
<code>expand</code> property (eg. <code>{`"expand": {"relField1": {...}, ...}`}</code>).
|
||||
<br />
|
||||
Only the relations to which the account has permissions to <strong>view</strong> will be expanded.
|
||||
Only the relations to which the request user has permissions to <strong>view</strong> will be expanded.
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
|
||||
@@ -87,7 +87,7 @@
|
||||
|
||||
...
|
||||
|
||||
await pb.collection('${collection?.name}').authViaEmail('test@example.com', '123456');
|
||||
await pb.collection('${collection?.name}').authWithPassword('test@example.com', '123456');
|
||||
|
||||
const result = await pb.collection('${collection?.name}').listExternalAuths(
|
||||
pb.authStore.model.id
|
||||
@@ -100,7 +100,7 @@
|
||||
|
||||
...
|
||||
|
||||
await pb.collection('${collection?.name}').authViaEmail('test@example.com', '123456');
|
||||
await pb.collection('${collection?.name}').authWithPassword('test@example.com', '123456');
|
||||
|
||||
final result = await pb.collection('${collection?.name}').listExternalAuths(
|
||||
pb.authStore.model.id,
|
||||
|
||||
@@ -56,7 +56,7 @@
|
||||
});
|
||||
|
||||
// Subscribe to changes only in the specified record
|
||||
pb.collection('${collection?.name}').subscribeOne('RECORD_ID', function (e) {
|
||||
pb.collection('${collection?.name}').subscribe('RECORD_ID', function (e) {
|
||||
console.log(e.record);
|
||||
});
|
||||
|
||||
@@ -81,7 +81,7 @@
|
||||
});
|
||||
|
||||
// Subscribe to changes only in the specified record
|
||||
pb.collection('${collection?.name}').subscribeOne('RECORD_ID', (e) {
|
||||
pb.collection('${collection?.name}').subscribe('RECORD_ID', (e) {
|
||||
console.log(e.record);
|
||||
});
|
||||
|
||||
|
||||
@@ -68,7 +68,7 @@
|
||||
|
||||
...
|
||||
|
||||
await pb.collection('${collection?.name}').authViaEmail('test@example.com', '123456');
|
||||
await pb.collection('${collection?.name}').authWithPassword('test@example.com', '1234567890');
|
||||
|
||||
await pb.collection('${collection?.name}').requestEmailChange('new@example.com');
|
||||
`}
|
||||
@@ -79,7 +79,7 @@
|
||||
|
||||
...
|
||||
|
||||
await pb.collection('${collection?.name}').authViaEmail('test@example.com', '123456');
|
||||
await pb.collection('${collection?.name}').authWithPassword('test@example.com', '1234567890');
|
||||
|
||||
await pb.collection('${collection?.name}').requestEmailChange('new@example.com');
|
||||
`}
|
||||
@@ -90,7 +90,7 @@
|
||||
<strong class="label label-primary">POST</strong>
|
||||
<div class="content">
|
||||
<p>
|
||||
/api/collections/<strong>{collection.name}</strong>/confirm-email-change
|
||||
/api/collections/<strong>{collection.name}</strong>/request-email-change
|
||||
</p>
|
||||
</div>
|
||||
<p class="txt-hint txt-sm txt-right">Requires record <code>Authorization:TOKEN</code> header</p>
|
||||
|
||||
@@ -3,6 +3,9 @@
|
||||
|
||||
const SDK_PREFERENCE_KEY = "pb_sdk_preference";
|
||||
|
||||
let classes = "m-b-base";
|
||||
export { classes as class }; // export reserved keyword
|
||||
|
||||
export let js = "";
|
||||
export let dart = "";
|
||||
|
||||
@@ -29,7 +32,7 @@
|
||||
];
|
||||
</script>
|
||||
|
||||
<div class="tabs sdk-tabs m-b-base">
|
||||
<div class="tabs sdk-tabs {classes}">
|
||||
<div class="tabs-header compact left">
|
||||
{#each sdkExamples as example (example.language)}
|
||||
<button
|
||||
|
||||
@@ -66,7 +66,7 @@
|
||||
|
||||
...
|
||||
|
||||
await pb.collection('${collection?.name}').authViaEmail('test@example.com', '123456');
|
||||
await pb.collection('${collection?.name}').authWithPassword('test@example.com', '123456');
|
||||
|
||||
await pb.collection('${collection?.name}').unlinkExternalAuth(
|
||||
pb.authStore.model.id,
|
||||
@@ -80,7 +80,7 @@
|
||||
|
||||
...
|
||||
|
||||
await pb.collection('${collection?.name}').authViaEmail('test@example.com', '123456');
|
||||
await pb.collection('${collection?.name}').authWithPassword('test@example.com', '123456');
|
||||
|
||||
await pb.collection('${collection?.name}').unlinkExternalAuth(
|
||||
pb.authStore.model.id,
|
||||
|
||||
@@ -59,7 +59,7 @@
|
||||
|
||||
...
|
||||
|
||||
const record1 = await pb.collection('${collection?.name}').getOne('RECORD_ID', {
|
||||
const record = await pb.collection('${collection?.name}').getOne('RECORD_ID', {
|
||||
expand: 'relField1,relField2.subRelField',
|
||||
});
|
||||
`}
|
||||
@@ -70,7 +70,7 @@
|
||||
|
||||
...
|
||||
|
||||
final record1 = await pb.collection('${collection?.name}').getOne('RECORD_ID',
|
||||
final record = await pb.collection('${collection?.name}').getOne('RECORD_ID',
|
||||
'expand': 'relField1,relField2.subRelField',
|
||||
);
|
||||
`}
|
||||
@@ -131,7 +131,7 @@
|
||||
The expanded relations will be appended to the record under the
|
||||
<code>expand</code> property (eg. <code>{`"expand": {"relField1": {...}, ...}`}</code>).
|
||||
<br />
|
||||
Only the relations to which the account has permissions to <strong>view</strong> will be expanded.
|
||||
Only the relations to which the request user has permissions to <strong>view</strong> will be expanded.
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
|
||||
Reference in New Issue
Block a user