@xata.io/client 0.28.0 → 0.28.1
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/.turbo/turbo-add-version.log +1 -1
- package/.turbo/turbo-build.log +4 -4
- package/CHANGELOG.md +6 -0
- package/dist/index.cjs +10 -10
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.ts +21 -10
- package/dist/index.mjs +10 -10
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
@@ -414,6 +414,10 @@ type DatabaseMetadata = {
|
|
414
414
|
* @x-internal true
|
415
415
|
*/
|
416
416
|
newMigrations?: boolean;
|
417
|
+
/**
|
418
|
+
* @x-internal true
|
419
|
+
*/
|
420
|
+
defaultClusterID?: string;
|
417
421
|
/**
|
418
422
|
* Metadata about the database for display in Xata user interfaces
|
419
423
|
*/
|
@@ -1313,7 +1317,7 @@ type CreateDatabaseRequestBody = {
|
|
1313
1317
|
*/
|
1314
1318
|
region: string;
|
1315
1319
|
/**
|
1316
|
-
* The dedicated cluster where branches from this database will be created. Defaults to '
|
1320
|
+
* The dedicated cluster where branches from this database will be created. Defaults to 'shared-cluster'.
|
1317
1321
|
*
|
1318
1322
|
* @minLength 1
|
1319
1323
|
* @x-internal true
|
@@ -1416,6 +1420,13 @@ type UpdateDatabaseMetadataRequestBody = {
|
|
1416
1420
|
*/
|
1417
1421
|
color?: string;
|
1418
1422
|
};
|
1423
|
+
/**
|
1424
|
+
* The dedicated cluster where branches from this database will be created. Defaults to 'shared-cluster'.
|
1425
|
+
*
|
1426
|
+
* @minLength 1
|
1427
|
+
* @x-internal true
|
1428
|
+
*/
|
1429
|
+
defaultClusterID?: string;
|
1419
1430
|
};
|
1420
1431
|
type UpdateDatabaseMetadataVariables = {
|
1421
1432
|
body?: UpdateDatabaseMetadataRequestBody;
|
@@ -7603,11 +7614,11 @@ declare class XataFile {
|
|
7603
7614
|
/**
|
7604
7615
|
* Name of the file.
|
7605
7616
|
*/
|
7606
|
-
name
|
7617
|
+
name?: string;
|
7607
7618
|
/**
|
7608
7619
|
* Media type of the file.
|
7609
7620
|
*/
|
7610
|
-
mediaType
|
7621
|
+
mediaType?: string;
|
7611
7622
|
/**
|
7612
7623
|
* Base64 encoded content of the file.
|
7613
7624
|
*/
|
@@ -7615,11 +7626,11 @@ declare class XataFile {
|
|
7615
7626
|
/**
|
7616
7627
|
* Whether to enable public url for the file.
|
7617
7628
|
*/
|
7618
|
-
enablePublicUrl
|
7629
|
+
enablePublicUrl?: boolean;
|
7619
7630
|
/**
|
7620
7631
|
* Timeout for the signed url.
|
7621
7632
|
*/
|
7622
|
-
signedUrlTimeout
|
7633
|
+
signedUrlTimeout?: number;
|
7623
7634
|
/**
|
7624
7635
|
* Size of the file.
|
7625
7636
|
*/
|
@@ -7627,11 +7638,11 @@ declare class XataFile {
|
|
7627
7638
|
/**
|
7628
7639
|
* Version of the file.
|
7629
7640
|
*/
|
7630
|
-
version
|
7641
|
+
version?: number;
|
7631
7642
|
/**
|
7632
7643
|
* Url of the file.
|
7633
7644
|
*/
|
7634
|
-
url
|
7645
|
+
url?: string;
|
7635
7646
|
/**
|
7636
7647
|
* Signed url of the file.
|
7637
7648
|
*/
|
@@ -7639,7 +7650,7 @@ declare class XataFile {
|
|
7639
7650
|
/**
|
7640
7651
|
* Attributes of the file.
|
7641
7652
|
*/
|
7642
|
-
attributes
|
7653
|
+
attributes?: Record<string, any>;
|
7643
7654
|
constructor(file: Partial<XataFile>);
|
7644
7655
|
static fromBuffer(buffer: Buffer, options?: XataFileEditableFields): XataFile;
|
7645
7656
|
toBuffer(): Buffer;
|
@@ -7654,9 +7665,9 @@ declare class XataFile {
|
|
7654
7665
|
static fromBase64(base64Content: string, options?: XataFileEditableFields): XataFile;
|
7655
7666
|
toBase64(): string;
|
7656
7667
|
transform(...options: ImageTransformations[]): {
|
7657
|
-
url: string;
|
7668
|
+
url: string | undefined;
|
7658
7669
|
signedUrl: string | undefined;
|
7659
|
-
metadataUrl: string;
|
7670
|
+
metadataUrl: string | undefined;
|
7660
7671
|
metadataSignedUrl: string | undefined;
|
7661
7672
|
};
|
7662
7673
|
}
|
package/dist/index.mjs
CHANGED
@@ -526,7 +526,7 @@ function defaultOnOpen(response) {
|
|
526
526
|
}
|
527
527
|
}
|
528
528
|
|
529
|
-
const VERSION = "0.28.
|
529
|
+
const VERSION = "0.28.1";
|
530
530
|
|
531
531
|
class ErrorWithCause extends Error {
|
532
532
|
constructor(message, options) {
|
@@ -2664,16 +2664,16 @@ function transformImage(url, ...transformations) {
|
|
2664
2664
|
class XataFile {
|
2665
2665
|
constructor(file) {
|
2666
2666
|
this.id = file.id;
|
2667
|
-
this.name = file.name
|
2668
|
-
this.mediaType = file.mediaType
|
2667
|
+
this.name = file.name;
|
2668
|
+
this.mediaType = file.mediaType;
|
2669
2669
|
this.base64Content = file.base64Content;
|
2670
|
-
this.enablePublicUrl = file.enablePublicUrl
|
2671
|
-
this.signedUrlTimeout = file.signedUrlTimeout
|
2672
|
-
this.size = file.size
|
2673
|
-
this.version = file.version
|
2674
|
-
this.url = file.url
|
2670
|
+
this.enablePublicUrl = file.enablePublicUrl;
|
2671
|
+
this.signedUrlTimeout = file.signedUrlTimeout;
|
2672
|
+
this.size = file.size;
|
2673
|
+
this.version = file.version;
|
2674
|
+
this.url = file.url;
|
2675
2675
|
this.signedUrl = file.signedUrl;
|
2676
|
-
this.attributes = file.attributes
|
2676
|
+
this.attributes = file.attributes;
|
2677
2677
|
}
|
2678
2678
|
static fromBuffer(buffer, options = {}) {
|
2679
2679
|
const base64Content = buffer.toString("base64");
|
@@ -4370,7 +4370,7 @@ function getContentType(file) {
|
|
4370
4370
|
if (typeof file === "string") {
|
4371
4371
|
return "text/plain";
|
4372
4372
|
}
|
4373
|
-
if ("mediaType" in file) {
|
4373
|
+
if ("mediaType" in file && file.mediaType !== void 0) {
|
4374
4374
|
return file.mediaType;
|
4375
4375
|
}
|
4376
4376
|
if (isBlob(file)) {
|