@xata.io/client
Advanced tools
Comparing version 0.0.0-alpha.b8b17fa to 0.0.0-alpha.bcdf304
@@ -7,3 +7,3 @@ import type * as Types from './components'; | ||
export interface XataApiClientOptions { | ||
fetchImpl: FetchImpl; | ||
fetch: FetchImpl; | ||
apiKey: string; | ||
@@ -13,3 +13,3 @@ host?: HostProvider; | ||
export declare class XataApiClient { | ||
#private; | ||
private extraProps; | ||
constructor(options: XataApiClientOptions); | ||
@@ -59,3 +59,3 @@ get user(): UserApi; | ||
getBranchDetails(workspace: Schemas.WorkspaceID, database: Schemas.DBName, branch: Schemas.BranchName): Promise<Schemas.DBBranch>; | ||
createBranch(workspace: Schemas.WorkspaceID, database: Schemas.DBName, branch: Schemas.BranchName, from?: string, options?: Types.CreateBranchRequestBody): Promise<undefined>; | ||
createBranch(workspace: Schemas.WorkspaceID, database: Schemas.DBName, branch: Schemas.BranchName, from?: string, options?: Types.CreateBranchRequestBody): Promise<void>; | ||
deleteBranch(workspace: Schemas.WorkspaceID, database: Schemas.DBName, branch: Schemas.BranchName): Promise<void>; | ||
@@ -87,5 +87,3 @@ updateBranchMetadata(workspace: Schemas.WorkspaceID, database: Schemas.DBName, branch: Schemas.BranchName, metadata?: Schemas.BranchMetadata): Promise<void>; | ||
insertRecord(workspace: Schemas.WorkspaceID, database: Schemas.DBName, branch: Schemas.BranchName, tableName: Schemas.TableName, record: Record<string, any>): Promise<Types.InsertRecordResponse>; | ||
insertRecordWithID(workspace: Schemas.WorkspaceID, database: Schemas.DBName, branch: Schemas.BranchName, tableName: Schemas.TableName, recordId: Schemas.RecordID, record: Record<string, any>, options?: Types.InsertRecordWithIDQueryParams): Promise<Responses.RecordUpdateResponse>; | ||
updateRecordWithID(workspace: Schemas.WorkspaceID, database: Schemas.DBName, branch: Schemas.BranchName, tableName: Schemas.TableName, recordId: Schemas.RecordID, record: Record<string, any>, options?: Types.UpdateRecordWithIDQueryParams): Promise<Responses.RecordUpdateResponse>; | ||
upsertRecordWithID(workspace: Schemas.WorkspaceID, database: Schemas.DBName, branch: Schemas.BranchName, tableName: Schemas.TableName, recordId: Schemas.RecordID, record: Record<string, any>, options?: Types.UpsertRecordWithIDQueryParams): Promise<Responses.RecordUpdateResponse>; | ||
insertRecordWithID(workspace: Schemas.WorkspaceID, database: Schemas.DBName, branch: Schemas.BranchName, tableName: Schemas.TableName, recordId: Schemas.RecordID, record: Record<string, any>, options?: Types.InsertRecordWithIDQueryParams): Promise<Types.InsertRecordWithIDResponse>; | ||
deleteRecord(workspace: Schemas.WorkspaceID, database: Schemas.DBName, branch: Schemas.BranchName, tableName: Schemas.TableName, recordId: Schemas.RecordID): Promise<void>; | ||
@@ -95,4 +93,3 @@ getRecord(workspace: Schemas.WorkspaceID, database: Schemas.DBName, branch: Schemas.BranchName, tableName: Schemas.TableName, recordId: Schemas.RecordID, options?: Types.GetRecordRequestBody): Promise<Schemas.XataRecord>; | ||
queryTable(workspace: Schemas.WorkspaceID, database: Schemas.DBName, branch: Schemas.BranchName, tableName: Schemas.TableName, query: Types.QueryTableRequestBody): Promise<Responses.QueryResponse>; | ||
searchBranch(workspace: Schemas.WorkspaceID, database: Schemas.DBName, branch: Schemas.BranchName, query: Types.SearchBranchRequestBody): Promise<Responses.SearchResponse>; | ||
} | ||
export {}; |
"use strict"; | ||
var __classPrivateFieldSet = (this && this.__classPrivateFieldSet) || function (receiver, state, value, kind, f) { | ||
if (kind === "m") throw new TypeError("Private method is not writable"); | ||
if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a setter"); | ||
if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot write private member to an object whose class did not declare it"); | ||
return (kind === "a" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value)), value; | ||
}; | ||
var __classPrivateFieldGet = (this && this.__classPrivateFieldGet) || function (receiver, state, kind, f) { | ||
if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a getter"); | ||
if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot read private member from an object whose class did not declare it"); | ||
return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver); | ||
}; | ||
var _XataApiClient_extraProps; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
@@ -21,4 +9,3 @@ exports.XataApiClient = void 0; | ||
var _a; | ||
_XataApiClient_extraProps.set(this, void 0); | ||
const fetchImpl = typeof fetch !== 'undefined' ? fetch : options.fetchImpl; | ||
const fetchImpl = typeof fetch !== 'undefined' ? fetch : options.fetch; | ||
if (!fetchImpl) { | ||
@@ -29,3 +16,3 @@ /** @todo add a link after docs exist */ | ||
const provider = (_a = options.host) !== null && _a !== void 0 ? _a : 'production'; | ||
__classPrivateFieldSet(this, _XataApiClient_extraProps, { | ||
this.extraProps = { | ||
apiUrl: (0, providers_1.getHostUrl)(provider, 'main'), | ||
@@ -35,25 +22,24 @@ workspacesApiUrl: (0, providers_1.getHostUrl)(provider, 'workspaces'), | ||
apiKey: options.apiKey | ||
}, "f"); | ||
}; | ||
} | ||
get user() { | ||
return new UserApi(__classPrivateFieldGet(this, _XataApiClient_extraProps, "f")); | ||
return new UserApi(this.extraProps); | ||
} | ||
get workspaces() { | ||
return new WorkspaceApi(__classPrivateFieldGet(this, _XataApiClient_extraProps, "f")); | ||
return new WorkspaceApi(this.extraProps); | ||
} | ||
get databases() { | ||
return new DatabaseApi(__classPrivateFieldGet(this, _XataApiClient_extraProps, "f")); | ||
return new DatabaseApi(this.extraProps); | ||
} | ||
get branches() { | ||
return new BranchApi(__classPrivateFieldGet(this, _XataApiClient_extraProps, "f")); | ||
return new BranchApi(this.extraProps); | ||
} | ||
get tables() { | ||
return new TableApi(__classPrivateFieldGet(this, _XataApiClient_extraProps, "f")); | ||
return new TableApi(this.extraProps); | ||
} | ||
get records() { | ||
return new RecordsApi(__classPrivateFieldGet(this, _XataApiClient_extraProps, "f")); | ||
return new RecordsApi(this.extraProps); | ||
} | ||
} | ||
exports.XataApiClient = XataApiClient; | ||
_XataApiClient_extraProps = new WeakMap(); | ||
class UserApi { | ||
@@ -211,8 +197,2 @@ constructor(extraProps) { | ||
} | ||
updateRecordWithID(workspace, database, branch, tableName, recordId, record, options = {}) { | ||
return components_1.operationsByTag.records.updateRecordWithID(Object.assign({ pathParams: { workspace, dbBranchName: `${database}:${branch}`, tableName, recordId }, queryParams: options, body: record }, this.extraProps)); | ||
} | ||
upsertRecordWithID(workspace, database, branch, tableName, recordId, record, options = {}) { | ||
return components_1.operationsByTag.records.upsertRecordWithID(Object.assign({ pathParams: { workspace, dbBranchName: `${database}:${branch}`, tableName, recordId }, queryParams: options, body: record }, this.extraProps)); | ||
} | ||
deleteRecord(workspace, database, branch, tableName, recordId) { | ||
@@ -230,5 +210,2 @@ return components_1.operationsByTag.records.deleteRecord(Object.assign({ pathParams: { workspace, dbBranchName: `${database}:${branch}`, tableName, recordId } }, this.extraProps)); | ||
} | ||
searchBranch(workspace, database, branch, query) { | ||
return components_1.operationsByTag.records.searchBranch(Object.assign({ pathParams: { workspace, dbBranchName: `${database}:${branch}` }, body: query }, this.extraProps)); | ||
} | ||
} |
@@ -164,2 +164,40 @@ /** | ||
export declare const inviteWorkspaceMember: (variables: InviteWorkspaceMemberVariables) => Promise<Schemas.WorkspaceInvite>; | ||
export declare type UpdateWorkspaceMemberInvitePathParams = { | ||
workspaceId: Schemas.WorkspaceID; | ||
inviteId: Schemas.InviteID; | ||
}; | ||
export declare type UpdateWorkspaceMemberInviteRequestBody = { | ||
role: Schemas.Role; | ||
}; | ||
export declare type UpdateWorkspaceMemberInviteVariables = { | ||
body: UpdateWorkspaceMemberInviteRequestBody; | ||
pathParams: UpdateWorkspaceMemberInvitePathParams; | ||
} & FetcherExtraProps; | ||
/** | ||
* This operation provides a way to update an invite. | ||
* The role can be updated while the email cannot. | ||
*/ | ||
export declare const updateWorkspaceMemberInvite: (variables: UpdateWorkspaceMemberInviteVariables) => Promise<Schemas.WorkspaceInvite>; | ||
export declare type CancelWorkspaceMemberInvitePathParams = { | ||
workspaceId: Schemas.WorkspaceID; | ||
inviteId: Schemas.InviteID; | ||
}; | ||
export declare type CancelWorkspaceMemberInviteVariables = { | ||
pathParams: CancelWorkspaceMemberInvitePathParams; | ||
} & FetcherExtraProps; | ||
/** | ||
* This operation provides a way to cancel invites by deleting them. Already accepted invites cannot be deleted. | ||
*/ | ||
export declare const cancelWorkspaceMemberInvite: (variables: CancelWorkspaceMemberInviteVariables) => Promise<undefined>; | ||
export declare type ResendWorkspaceMemberInvitePathParams = { | ||
workspaceId: Schemas.WorkspaceID; | ||
inviteId: Schemas.InviteID; | ||
}; | ||
export declare type ResendWorkspaceMemberInviteVariables = { | ||
pathParams: ResendWorkspaceMemberInvitePathParams; | ||
} & FetcherExtraProps; | ||
/** | ||
* This operation provides a way to resend an Invite notification. Invite notifications can only be sent for Invites not yet accepted. | ||
*/ | ||
export declare const resendWorkspaceMemberInvite: (variables: ResendWorkspaceMemberInviteVariables) => Promise<undefined>; | ||
export declare type AcceptWorkspaceMemberInvitePathParams = { | ||
@@ -532,2 +570,8 @@ workspaceId: Schemas.WorkspaceID; | ||
}; | ||
export declare type InsertRecordWithIDResponse = { | ||
id: string; | ||
xata: { | ||
version: number; | ||
}; | ||
}; | ||
export declare type InsertRecordWithIDVariables = { | ||
@@ -541,33 +585,3 @@ body?: Record<string, any>; | ||
*/ | ||
export declare const insertRecordWithID: (variables: InsertRecordWithIDVariables) => Promise<Responses.RecordUpdateResponse>; | ||
export declare type UpdateRecordWithIDPathParams = { | ||
dbBranchName: Schemas.DBBranchName; | ||
tableName: Schemas.TableName; | ||
recordId: Schemas.RecordID; | ||
workspace: string; | ||
}; | ||
export declare type UpdateRecordWithIDQueryParams = { | ||
ifVersion?: number; | ||
}; | ||
export declare type UpdateRecordWithIDVariables = { | ||
body?: Record<string, any>; | ||
pathParams: UpdateRecordWithIDPathParams; | ||
queryParams?: UpdateRecordWithIDQueryParams; | ||
} & FetcherExtraProps; | ||
export declare const updateRecordWithID: (variables: UpdateRecordWithIDVariables) => Promise<Responses.RecordUpdateResponse>; | ||
export declare type UpsertRecordWithIDPathParams = { | ||
dbBranchName: Schemas.DBBranchName; | ||
tableName: Schemas.TableName; | ||
recordId: Schemas.RecordID; | ||
workspace: string; | ||
}; | ||
export declare type UpsertRecordWithIDQueryParams = { | ||
ifVersion?: number; | ||
}; | ||
export declare type UpsertRecordWithIDVariables = { | ||
body?: Record<string, any>; | ||
pathParams: UpsertRecordWithIDPathParams; | ||
queryParams?: UpsertRecordWithIDQueryParams; | ||
} & FetcherExtraProps; | ||
export declare const upsertRecordWithID: (variables: UpsertRecordWithIDVariables) => Promise<Responses.RecordUpdateResponse>; | ||
export declare const insertRecordWithID: (variables: InsertRecordWithIDVariables) => Promise<InsertRecordWithIDResponse>; | ||
export declare type DeleteRecordPathParams = { | ||
@@ -1348,3 +1362,2 @@ dbBranchName: Schemas.DBBranchName; | ||
query: string; | ||
fuzziness?: number; | ||
}; | ||
@@ -1356,3 +1369,3 @@ export declare type SearchBranchVariables = { | ||
/** | ||
* Run a free text search operation across the database branch. | ||
* Run a free text search operation across the Database. | ||
*/ | ||
@@ -1379,2 +1392,5 @@ export declare const searchBranch: (variables: SearchBranchVariables) => Promise<Responses.SearchResponse>; | ||
inviteWorkspaceMember: (variables: InviteWorkspaceMemberVariables) => Promise<Schemas.WorkspaceInvite>; | ||
updateWorkspaceMemberInvite: (variables: UpdateWorkspaceMemberInviteVariables) => Promise<Schemas.WorkspaceInvite>; | ||
cancelWorkspaceMemberInvite: (variables: CancelWorkspaceMemberInviteVariables) => Promise<undefined>; | ||
resendWorkspaceMemberInvite: (variables: ResendWorkspaceMemberInviteVariables) => Promise<undefined>; | ||
acceptWorkspaceMemberInvite: (variables: AcceptWorkspaceMemberInviteVariables) => Promise<undefined>; | ||
@@ -1413,5 +1429,3 @@ }; | ||
insertRecord: (variables: InsertRecordVariables) => Promise<InsertRecordResponse>; | ||
insertRecordWithID: (variables: InsertRecordWithIDVariables) => Promise<Responses.RecordUpdateResponse>; | ||
updateRecordWithID: (variables: UpdateRecordWithIDVariables) => Promise<Responses.RecordUpdateResponse>; | ||
upsertRecordWithID: (variables: UpsertRecordWithIDVariables) => Promise<Responses.RecordUpdateResponse>; | ||
insertRecordWithID: (variables: InsertRecordWithIDVariables) => Promise<InsertRecordWithIDResponse>; | ||
deleteRecord: (variables: DeleteRecordVariables) => Promise<undefined>; | ||
@@ -1418,0 +1432,0 @@ getRecord: (variables: GetRecordVariables) => Promise<Schemas.XataRecord>; |
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.operationsByTag = exports.searchBranch = exports.queryTable = exports.bulkInsertTableRecords = exports.getRecord = exports.deleteRecord = exports.upsertRecordWithID = exports.updateRecordWithID = exports.insertRecordWithID = exports.insertRecord = exports.updateColumn = exports.deleteColumn = exports.getColumn = exports.addTableColumn = exports.getTableColumns = exports.setTableSchema = exports.getTableSchema = exports.updateTable = exports.deleteTable = exports.createTable = exports.getBranchStats = exports.getBranchMigrationPlan = exports.executeBranchMigrationPlan = exports.getBranchMigrationHistory = exports.getBranchMetadata = exports.updateBranchMetadata = exports.deleteBranch = exports.createBranch = exports.getBranchDetails = exports.deleteDatabase = exports.createDatabase = exports.getBranchList = exports.getDatabaseList = exports.acceptWorkspaceMemberInvite = exports.inviteWorkspaceMember = exports.removeWorkspaceMember = exports.updateWorkspaceMemberRole = exports.getWorkspaceMembersList = exports.deleteWorkspace = exports.updateWorkspace = exports.getWorkspace = exports.getWorkspacesList = exports.createWorkspace = exports.deleteUserAPIKey = exports.createUserAPIKey = exports.getUserAPIKeys = exports.deleteUser = exports.updateUser = exports.getUser = void 0; | ||
exports.operationsByTag = exports.searchBranch = exports.queryTable = exports.bulkInsertTableRecords = exports.getRecord = exports.deleteRecord = exports.insertRecordWithID = exports.insertRecord = exports.updateColumn = exports.deleteColumn = exports.getColumn = exports.addTableColumn = exports.getTableColumns = exports.setTableSchema = exports.getTableSchema = exports.updateTable = exports.deleteTable = exports.createTable = exports.getBranchStats = exports.getBranchMigrationPlan = exports.executeBranchMigrationPlan = exports.getBranchMigrationHistory = exports.getBranchMetadata = exports.updateBranchMetadata = exports.deleteBranch = exports.createBranch = exports.getBranchDetails = exports.deleteDatabase = exports.createDatabase = exports.getBranchList = exports.getDatabaseList = exports.acceptWorkspaceMemberInvite = exports.resendWorkspaceMemberInvite = exports.cancelWorkspaceMemberInvite = exports.updateWorkspaceMemberInvite = exports.inviteWorkspaceMember = exports.removeWorkspaceMember = exports.updateWorkspaceMemberRole = exports.getWorkspaceMembersList = exports.deleteWorkspace = exports.updateWorkspace = exports.getWorkspace = exports.getWorkspacesList = exports.createWorkspace = exports.deleteUserAPIKey = exports.createUserAPIKey = exports.getUserAPIKeys = exports.deleteUser = exports.updateUser = exports.getUser = void 0; | ||
/** | ||
@@ -86,2 +86,18 @@ * Generated by @openapi-codegen | ||
/** | ||
* This operation provides a way to update an invite. | ||
* The role can be updated while the email cannot. | ||
*/ | ||
const updateWorkspaceMemberInvite = (variables) => (0, fetcher_1.fetch)(Object.assign({ url: '/workspaces/{workspaceId}/invites/{inviteId}', method: 'patch' }, variables)); | ||
exports.updateWorkspaceMemberInvite = updateWorkspaceMemberInvite; | ||
/** | ||
* This operation provides a way to cancel invites by deleting them. Already accepted invites cannot be deleted. | ||
*/ | ||
const cancelWorkspaceMemberInvite = (variables) => (0, fetcher_1.fetch)(Object.assign({ url: '/workspaces/{workspaceId}/invites/{inviteId}', method: 'delete' }, variables)); | ||
exports.cancelWorkspaceMemberInvite = cancelWorkspaceMemberInvite; | ||
/** | ||
* This operation provides a way to resend an Invite notification. Invite notifications can only be sent for Invites not yet accepted. | ||
*/ | ||
const resendWorkspaceMemberInvite = (variables) => (0, fetcher_1.fetch)(Object.assign({ url: '/workspaces/{workspaceId}/invites/{inviteId}/resend', method: 'post' }, variables)); | ||
exports.resendWorkspaceMemberInvite = resendWorkspaceMemberInvite; | ||
/** | ||
* Accept the invitation to join a workspace. If the operation succeeds the user will be a member of the workspace | ||
@@ -210,6 +226,2 @@ */ | ||
exports.insertRecordWithID = insertRecordWithID; | ||
const updateRecordWithID = (variables) => (0, fetcher_1.fetch)(Object.assign({ url: '/db/{dbBranchName}/tables/{tableName}/data/{recordId}', method: 'patch' }, variables)); | ||
exports.updateRecordWithID = updateRecordWithID; | ||
const upsertRecordWithID = (variables) => (0, fetcher_1.fetch)(Object.assign({ url: '/db/{dbBranchName}/tables/{tableName}/data/{recordId}', method: 'post' }, variables)); | ||
exports.upsertRecordWithID = upsertRecordWithID; | ||
const deleteRecord = (variables) => (0, fetcher_1.fetch)(Object.assign({ url: '/db/{dbBranchName}/tables/{tableName}/data/{recordId}', method: 'delete' }, variables)); | ||
@@ -936,3 +948,3 @@ exports.deleteRecord = deleteRecord; | ||
/** | ||
* Run a free text search operation across the database branch. | ||
* Run a free text search operation across the Database. | ||
*/ | ||
@@ -953,2 +965,5 @@ const searchBranch = (variables) => (0, fetcher_1.fetch)(Object.assign({ url: '/db/{dbBranchName}/search', method: 'post' }, variables)); | ||
inviteWorkspaceMember: exports.inviteWorkspaceMember, | ||
updateWorkspaceMemberInvite: exports.updateWorkspaceMemberInvite, | ||
cancelWorkspaceMemberInvite: exports.cancelWorkspaceMemberInvite, | ||
resendWorkspaceMemberInvite: exports.resendWorkspaceMemberInvite, | ||
acceptWorkspaceMemberInvite: exports.acceptWorkspaceMemberInvite | ||
@@ -984,4 +999,2 @@ }, | ||
insertRecordWithID: exports.insertRecordWithID, | ||
updateRecordWithID: exports.updateRecordWithID, | ||
upsertRecordWithID: exports.upsertRecordWithID, | ||
deleteRecord: exports.deleteRecord, | ||
@@ -988,0 +1001,0 @@ getRecord: exports.getRecord, |
@@ -10,6 +10,5 @@ export declare type FetchImpl = (url: string, init?: { | ||
}>; | ||
export declare type WorkspaceApiUrlBuilder = (path: string, pathParams: Record<string, string>) => string; | ||
export declare type FetcherExtraProps = { | ||
apiUrl: string; | ||
workspacesApiUrl: string | WorkspaceApiUrlBuilder; | ||
workspacesApiUrl: string; | ||
fetchImpl: FetchImpl; | ||
@@ -26,2 +25,2 @@ apiKey: string; | ||
}; | ||
export declare function fetch<TData, TBody extends Record<string, unknown> | undefined, THeaders extends Record<string, unknown>, TQueryParams extends Record<string, unknown>, TPathParams extends Record<string, string>>({ url: path, method, body, headers, pathParams, queryParams, fetchImpl, apiKey, apiUrl, workspacesApiUrl }: FetcherOptions<TBody, THeaders, TQueryParams, TPathParams> & FetcherExtraProps): Promise<TData>; | ||
export declare function fetch<TData, TBody extends Record<string, unknown> | undefined, THeaders extends Record<string, unknown>, TQueryParams extends Record<string, unknown>, TPathParams extends Record<string, string>>({ url, method, body, headers, pathParams, queryParams, fetchImpl, apiKey, apiUrl, workspacesApiUrl }: FetcherOptions<TBody, THeaders, TQueryParams, TPathParams> & FetcherExtraProps): Promise<TData>; |
@@ -19,27 +19,24 @@ "use strict"; | ||
const fallbackError = { message: 'Network response was not ok' }; | ||
function buildBaseUrl({ path, workspacesApiUrl, apiUrl, pathParams }) { | ||
if (!(pathParams === null || pathParams === void 0 ? void 0 : pathParams.workspace)) | ||
return `${apiUrl}${path}`; | ||
const url = typeof workspacesApiUrl === 'string' ? `${workspacesApiUrl}${path}` : workspacesApiUrl(path, pathParams); | ||
function baseURLForWorkspace(workspacesApiUrl, workspace) { | ||
// Node.js on localhost won't resolve localhost subdomains unless mapped in /etc/hosts | ||
// So, instead, we use localhost without subdomains, but will add a Host header | ||
if (typeof window === 'undefined' && url.includes('localhost:')) { | ||
return url.replace('{workspaceId}.', ''); | ||
if (typeof window === 'undefined' && workspacesApiUrl.includes('localhost:')) { | ||
return workspacesApiUrl.replace('{workspaceId}.', ''); | ||
} | ||
return url.replace('{workspaceId}', pathParams.workspace); | ||
return workspacesApiUrl.replace('{workspaceId}', workspace); | ||
} | ||
function hostHeaderForWorkspace(url) { | ||
var _a; | ||
const pattern = /.*:\/\/(?<host>[^/]+).*/; | ||
const { groups } = (_a = pattern.exec(url)) !== null && _a !== void 0 ? _a : {}; | ||
return groups === null || groups === void 0 ? void 0 : groups.host; | ||
function hostHeaderForWorkspace(workspacesApiUrl, workspace) { | ||
const url = baseURLForWorkspace(workspacesApiUrl, workspace); | ||
if (!url) | ||
return; | ||
const [, hostname] = url.split('://'); | ||
return hostname; | ||
} | ||
function fetch({ url: path, method, body, headers, pathParams, queryParams, fetchImpl, apiKey, apiUrl, workspacesApiUrl }) { | ||
function fetch({ url, method, body, headers, pathParams, queryParams, fetchImpl, apiKey, apiUrl, workspacesApiUrl }) { | ||
return __awaiter(this, void 0, void 0, function* () { | ||
const baseUrl = buildBaseUrl({ path, workspacesApiUrl, pathParams, apiUrl }); | ||
const url = resolveUrl(baseUrl, queryParams, pathParams); | ||
const response = yield fetchImpl(url, { | ||
const baseURL = (pathParams === null || pathParams === void 0 ? void 0 : pathParams.workspace) ? baseURLForWorkspace(workspacesApiUrl, pathParams.workspace) : apiUrl; | ||
const response = yield fetchImpl(`${baseURL}${resolveUrl(url, queryParams, pathParams)}`, { | ||
method: method.toUpperCase(), | ||
body: body ? JSON.stringify(body) : undefined, | ||
headers: Object.assign(Object.assign(Object.assign({ 'Content-Type': 'application/json' }, headers), { Authorization: `Bearer ${apiKey}` }), ((pathParams === null || pathParams === void 0 ? void 0 : pathParams.workspace) ? { Host: hostHeaderForWorkspace(url) } : {})) | ||
headers: Object.assign(Object.assign(Object.assign({ 'Content-Type': 'application/json' }, headers), { Authorization: `Bearer ${apiKey}` }), ((pathParams === null || pathParams === void 0 ? void 0 : pathParams.workspace) ? { Host: hostHeaderForWorkspace(workspacesApiUrl, pathParams.workspace) } : {})) | ||
}); | ||
@@ -46,0 +43,0 @@ // No content |
@@ -8,2 +8,3 @@ /** | ||
export declare type APIKeyNameParam = Schemas.APIKeyName; | ||
export declare type InviteIDParam = Schemas.InviteID; | ||
export declare type InviteKeyParam = Schemas.InviteKey; | ||
@@ -10,0 +11,0 @@ export declare type UserIDParam = Schemas.UserID; |
@@ -26,8 +26,2 @@ /** | ||
}; | ||
export declare type RecordUpdateResponse = { | ||
id: string; | ||
xata: { | ||
version: number; | ||
}; | ||
}; | ||
export declare type QueryResponse = { | ||
@@ -34,0 +28,0 @@ records: Schemas.XataRecord[]; |
@@ -133,3 +133,3 @@ /** | ||
name: string; | ||
type: 'bool' | 'int' | 'string' | 'text' | 'email' | 'multiple' | 'link' | 'object'; | ||
type: 'bool' | 'int' | 'float' | 'string' | 'text' | 'email' | 'multiple' | 'link' | 'object'; | ||
link?: { | ||
@@ -136,0 +136,0 @@ table: string; |
@@ -1,2 +0,1 @@ | ||
import { FetchImpl } from './api/fetcher'; | ||
import { Page } from './schema/pagination'; | ||
@@ -25,7 +24,8 @@ import { Query, QueryOptions } from './schema/query'; | ||
constructor(client: BaseClient<any>, table: string); | ||
request<T>(method: string, path: string, body?: unknown): Promise<T | undefined>; | ||
create(object: T): Promise<T>; | ||
createMany(objects: T[]): Promise<T[]>; | ||
read(recordId: string): Promise<T | null>; | ||
update(recordId: string, object: Partial<T>): Promise<T>; | ||
delete(recordId: string): Promise<void>; | ||
read(id: string): Promise<T | null>; | ||
update(id: string, object: Partial<T>): Promise<T>; | ||
delete(id: string): Promise<void>; | ||
query<R extends XataRecord, Options extends QueryOptions<T>>(query: Query<T, R>, options: Options): Promise<Page<T, typeof options['columns'] extends SelectableColumn<T>[] ? Select<T, typeof options['columns'][number]> : R>>; | ||
@@ -44,3 +44,3 @@ } | ||
export declare type XataClientOptions = { | ||
fetch?: FetchImpl; | ||
fetch?: unknown; | ||
databaseURL?: string; | ||
@@ -52,4 +52,5 @@ branch: BranchStrategyOption; | ||
export declare class BaseClient<D extends Record<string, Repository<any>>> { | ||
#private; | ||
options: XataClientOptions; | ||
private links; | ||
private branch; | ||
db: D; | ||
@@ -56,0 +57,0 @@ constructor(options: XataClientOptions, links: Links); |
@@ -39,6 +39,5 @@ "use strict"; | ||
}; | ||
var _RestRepository_instances, _RestRepository_client, _RestRepository_fetch, _RestRepository_table, _RestRepository_getFetchProps, _BaseClient_links, _BaseClient_branch; | ||
var _RestRepository_client, _RestRepository_fetch, _RestRepository_table; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.XataError = exports.BaseClient = exports.RestRespositoryFactory = exports.RestRepository = exports.Repository = void 0; | ||
const api_1 = require("./api"); | ||
const filters_1 = require("./schema/filters"); | ||
@@ -53,3 +52,2 @@ const pagination_1 = require("./schema/pagination"); | ||
super(null, table, {}); | ||
_RestRepository_instances.add(this); | ||
_RestRepository_client.set(this, void 0); | ||
@@ -67,7 +65,44 @@ _RestRepository_fetch.set(this, void 0); | ||
} | ||
request(method, path, body) { | ||
return __awaiter(this, void 0, void 0, function* () { | ||
const { databaseURL, apiKey } = __classPrivateFieldGet(this, _RestRepository_client, "f").options; | ||
const branch = yield __classPrivateFieldGet(this, _RestRepository_client, "f").getBranch(); | ||
const fetchImpl = __classPrivateFieldGet(this, _RestRepository_fetch, "f"); | ||
const resp = yield fetchImpl(`${databaseURL}:${branch}${path}`, { | ||
method, | ||
headers: { | ||
Accept: '*/*', | ||
'Content-Type': 'application/json', | ||
Authorization: `Bearer ${apiKey}` | ||
}, | ||
body: JSON.stringify(body) | ||
}); | ||
if (!resp.ok) { | ||
try { | ||
const json = yield resp.json(); | ||
const message = json.message; | ||
if (typeof message === 'string') { | ||
throw new XataError(message, resp.status); | ||
} | ||
} | ||
catch (err) { | ||
if (err instanceof XataError) | ||
throw err; | ||
// Ignore errors for other reasons. | ||
// For example if the response's body cannot be parsed as JSON | ||
} | ||
throw new XataError(resp.statusText, resp.status); | ||
} | ||
if (resp.status === 204) | ||
return undefined; | ||
return resp.json(); | ||
}); | ||
} | ||
create(object) { | ||
return __awaiter(this, void 0, void 0, function* () { | ||
const fetchProps = yield __classPrivateFieldGet(this, _RestRepository_instances, "m", _RestRepository_getFetchProps).call(this); | ||
const record = transformObjectLinks(object); | ||
const response = yield (0, api_1.insertRecord)(Object.assign({ pathParams: { workspace: '{workspaceId}', dbBranchName: '{dbBranch}', tableName: __classPrivateFieldGet(this, _RestRepository_table, "f") }, body: record }, fetchProps)); | ||
const response = yield this.request('POST', `/tables/${__classPrivateFieldGet(this, _RestRepository_table, "f")}/data`, record); | ||
if (!response) { | ||
throw new Error("The server didn't return any data for the query"); | ||
} | ||
const finalObject = yield this.read(response.id); | ||
@@ -82,5 +117,7 @@ if (!finalObject) { | ||
return __awaiter(this, void 0, void 0, function* () { | ||
const fetchProps = yield __classPrivateFieldGet(this, _RestRepository_instances, "m", _RestRepository_getFetchProps).call(this); | ||
const records = objects.map((object) => transformObjectLinks(object)); | ||
const response = yield (0, api_1.bulkInsertTableRecords)(Object.assign({ pathParams: { workspace: '{workspaceId}', dbBranchName: '{dbBranch}', tableName: __classPrivateFieldGet(this, _RestRepository_table, "f") }, body: { records } }, fetchProps)); | ||
const response = yield this.request('POST', `/tables/${__classPrivateFieldGet(this, _RestRepository_table, "f")}/bulk`, { records }); | ||
if (!response) { | ||
throw new Error("The server didn't return any data for the query"); | ||
} | ||
// TODO: Use filer.$any() to get all the records | ||
@@ -94,13 +131,23 @@ const finalObjects = yield Promise.all(response.recordIDs.map((id) => this.read(id))); | ||
} | ||
read(recordId) { | ||
read(id) { | ||
return __awaiter(this, void 0, void 0, function* () { | ||
const fetchProps = yield __classPrivateFieldGet(this, _RestRepository_instances, "m", _RestRepository_getFetchProps).call(this); | ||
const response = yield (0, api_1.getRecord)(Object.assign({ pathParams: { workspace: '{workspaceId}', dbBranchName: '{dbBranch}', tableName: __classPrivateFieldGet(this, _RestRepository_table, "f"), recordId } }, fetchProps)); | ||
return __classPrivateFieldGet(this, _RestRepository_client, "f").initObject(__classPrivateFieldGet(this, _RestRepository_table, "f"), response); | ||
try { | ||
const response = yield this.request('GET', `/tables/${__classPrivateFieldGet(this, _RestRepository_table, "f")}/data/${id}`); | ||
if (!response) | ||
return null; | ||
return __classPrivateFieldGet(this, _RestRepository_client, "f").initObject(__classPrivateFieldGet(this, _RestRepository_table, "f"), response); | ||
} | ||
catch (err) { | ||
if (err.status === 404) | ||
return null; | ||
throw err; | ||
} | ||
}); | ||
} | ||
update(recordId, object) { | ||
update(id, object) { | ||
return __awaiter(this, void 0, void 0, function* () { | ||
const fetchProps = yield __classPrivateFieldGet(this, _RestRepository_instances, "m", _RestRepository_getFetchProps).call(this); | ||
const response = yield (0, api_1.insertRecordWithID)(Object.assign({ pathParams: { workspace: '{workspaceId}', dbBranchName: '{dbBranch}', tableName: __classPrivateFieldGet(this, _RestRepository_table, "f"), recordId }, body: object }, fetchProps)); | ||
const response = yield this.request('PUT', `/tables/${__classPrivateFieldGet(this, _RestRepository_table, "f")}/data/${id}`, object); | ||
if (!response) { | ||
throw new Error("The server didn't return any data for the query"); | ||
} | ||
// TODO: Review this, not sure we are properly initializing the object | ||
@@ -110,6 +157,5 @@ return __classPrivateFieldGet(this, _RestRepository_client, "f").initObject(__classPrivateFieldGet(this, _RestRepository_table, "f"), response); | ||
} | ||
delete(recordId) { | ||
delete(id) { | ||
return __awaiter(this, void 0, void 0, function* () { | ||
const fetchProps = yield __classPrivateFieldGet(this, _RestRepository_instances, "m", _RestRepository_getFetchProps).call(this); | ||
yield (0, api_1.deleteRecord)(Object.assign({ pathParams: { workspace: '{workspaceId}', dbBranchName: '{dbBranch}', tableName: __classPrivateFieldGet(this, _RestRepository_table, "f"), recordId } }, fetchProps)); | ||
yield this.request('DELETE', `/tables/${__classPrivateFieldGet(this, _RestRepository_table, "f")}/data/${id}`); | ||
}); | ||
@@ -120,3 +166,3 @@ } | ||
return __awaiter(this, void 0, void 0, function* () { | ||
const data = query.getData(); | ||
const data = query.getQueryOptions(); | ||
const body = { | ||
@@ -128,4 +174,7 @@ filter: Object.values(data.filter).some(Boolean) ? data.filter : undefined, | ||
}; | ||
const fetchProps = yield __classPrivateFieldGet(this, _RestRepository_instances, "m", _RestRepository_getFetchProps).call(this); | ||
const { meta, records: objects } = yield (0, api_1.queryTable)(Object.assign({ pathParams: { workspace: '{workspaceId}', dbBranchName: '{dbBranch}', tableName: __classPrivateFieldGet(this, _RestRepository_table, "f") }, body }, fetchProps)); | ||
const response = yield this.request('POST', `/tables/${__classPrivateFieldGet(this, _RestRepository_table, "f")}/query`, body); | ||
if (!response) { | ||
throw new Error("The server didn't return any data for the query"); | ||
} | ||
const { meta, records: objects } = response; | ||
const records = objects.map((record) => __classPrivateFieldGet(this, _RestRepository_client, "f").initObject(__classPrivateFieldGet(this, _RestRepository_table, "f"), record)); | ||
@@ -138,20 +187,3 @@ // TODO: We should properly type this any | ||
exports.RestRepository = RestRepository; | ||
_RestRepository_client = new WeakMap(), _RestRepository_fetch = new WeakMap(), _RestRepository_table = new WeakMap(), _RestRepository_instances = new WeakSet(), _RestRepository_getFetchProps = function _RestRepository_getFetchProps() { | ||
return __awaiter(this, void 0, void 0, function* () { | ||
const branch = yield __classPrivateFieldGet(this, _RestRepository_client, "f").getBranch(); | ||
return { | ||
fetchImpl: __classPrivateFieldGet(this, _RestRepository_fetch, "f"), | ||
apiKey: __classPrivateFieldGet(this, _RestRepository_client, "f").options.apiKey, | ||
apiUrl: '', | ||
// Instead of using workspace and dbBranch, we inject a probably CNAME'd URL | ||
workspacesApiUrl: (path, params) => { | ||
var _a, _b; | ||
const baseUrl = (_a = __classPrivateFieldGet(this, _RestRepository_client, "f").options.databaseURL) !== null && _a !== void 0 ? _a : ''; | ||
const hasBranch = (_b = params.dbBranchName) !== null && _b !== void 0 ? _b : params.branch; | ||
const newPath = path.replace(/^\/db\/[^/]+/, hasBranch ? `:${branch}` : ''); | ||
return baseUrl + newPath; | ||
} | ||
}; | ||
}); | ||
}; | ||
_RestRepository_client = new WeakMap(), _RestRepository_fetch = new WeakMap(), _RestRepository_table = new WeakMap(); | ||
class RestRespositoryFactory { | ||
@@ -165,4 +197,2 @@ createRepository(client, table) { | ||
constructor(options, links) { | ||
_BaseClient_links.set(this, void 0); | ||
_BaseClient_branch.set(this, void 0); | ||
if (!options.databaseURL || !options.apiKey || !options.branch) { | ||
@@ -172,3 +202,3 @@ throw new Error('Options databaseURL, apiKey and branch are required'); | ||
this.options = options; | ||
__classPrivateFieldSet(this, _BaseClient_links, links, "f"); | ||
this.links = links; | ||
} | ||
@@ -178,3 +208,3 @@ initObject(table, object) { | ||
Object.assign(o, object); | ||
const tableLinks = __classPrivateFieldGet(this, _BaseClient_links, "f")[table] || []; | ||
const tableLinks = this.links[table] || []; | ||
for (const link of tableLinks) { | ||
@@ -218,4 +248,4 @@ const [field, linkTable] = link; | ||
return __awaiter(this, void 0, void 0, function* () { | ||
if (__classPrivateFieldGet(this, _BaseClient_branch, "f")) | ||
return __classPrivateFieldGet(this, _BaseClient_branch, "f"); | ||
if (this.branch) | ||
return this.branch; | ||
const { branch: param } = this.options; | ||
@@ -231,3 +261,3 @@ const strategies = Array.isArray(param) ? [...param] : [param]; | ||
if (branch) { | ||
__classPrivateFieldSet(this, _BaseClient_branch, branch, "f"); | ||
this.branch = branch; | ||
return branch; | ||
@@ -249,3 +279,2 @@ } | ||
exports.BaseClient = BaseClient; | ||
_BaseClient_links = new WeakMap(), _BaseClient_branch = new WeakMap(); | ||
class XataError extends Error { | ||
@@ -252,0 +281,0 @@ constructor(message, status) { |
@@ -9,3 +9,12 @@ import { XataRecord } from '..'; | ||
}; | ||
export declare class Page<T extends XataRecord, R extends XataRecord> { | ||
export interface Paginable<T extends XataRecord, R extends XataRecord = T> { | ||
meta: PaginationQueryMeta; | ||
records: R[]; | ||
nextPage(size?: number, offset?: number): Promise<Page<T, R>>; | ||
previousPage(size?: number, offset?: number): Promise<Page<T, R>>; | ||
firstPage(size?: number, offset?: number): Promise<Page<T, R>>; | ||
lastPage(size?: number, offset?: number): Promise<Page<T, R>>; | ||
hasNextPage(): boolean; | ||
} | ||
export declare class Page<T extends XataRecord, R extends XataRecord> implements Paginable<T, R> { | ||
#private; | ||
@@ -12,0 +21,0 @@ readonly meta: PaginationQueryMeta; |
import { XataRecord, Repository } from '..'; | ||
import { FilterExpression, SortExpression, PageConfig, ColumnsFilter } from '../api/schemas'; | ||
import { DeepConstraint, FilterConstraints, SortDirection, SortFilter } from './filters'; | ||
import { PaginationOptions, Page } from './pagination'; | ||
import { PaginationOptions, Page, Paginable, PaginationQueryMeta } from './pagination'; | ||
import { Selectable, SelectableColumn, Select } from './selection'; | ||
export declare type QueryOptions<T> = { | ||
page?: PaginationOptions; | ||
columns?: Extract<keyof Selectable<T>, string>[]; | ||
columns?: Array<keyof Selectable<T>>; | ||
sort?: SortFilter<T> | SortFilter<T>[]; | ||
}; | ||
export declare type QueryTableData = { | ||
export declare type FilterExpression = { | ||
$exists?: string; | ||
$existsNot?: string; | ||
$any?: FilterList; | ||
$all?: FilterList; | ||
$none?: FilterList; | ||
$not?: FilterList; | ||
} & { | ||
[key: string]: FilterColumn; | ||
}; | ||
export declare type FilterList = FilterExpression | FilterExpression[]; | ||
export declare type FilterColumn = FilterColumnIncludes | FilterPredicate | FilterList; | ||
/** | ||
* @maxProperties 1 | ||
* @minProperties 1 | ||
*/ | ||
export declare type FilterColumnIncludes = { | ||
$includes?: FilterPredicate; | ||
$includesAny?: FilterPredicate; | ||
$includesAll?: FilterPredicate; | ||
$includesNone?: FilterPredicate; | ||
}; | ||
export declare type FilterPredicate = FilterValue | FilterPredicate[] | FilterPredicateOp | FilterPredicateRangeOp; | ||
/** | ||
* @maxProperties 1 | ||
* @minProperties 1 | ||
*/ | ||
export declare type FilterPredicateOp = { | ||
$any?: FilterPredicate[]; | ||
$all?: FilterPredicate[]; | ||
$none?: FilterPredicate | FilterPredicate[]; | ||
$not?: FilterPredicate | FilterPredicate[]; | ||
$is?: FilterValue | FilterValue[]; | ||
$isNot?: FilterValue | FilterValue[]; | ||
$lt?: FilterRangeValue; | ||
$le?: FilterRangeValue; | ||
$gt?: FilterRangeValue; | ||
$ge?: FilterRangeValue; | ||
$contains?: string; | ||
$startsWith?: string; | ||
$endsWith?: string; | ||
$pattern?: string; | ||
}; | ||
export declare type FilterPredicateRangeOp = { | ||
$lt?: FilterRangeValue; | ||
$le?: FilterRangeValue; | ||
$gt?: FilterRangeValue; | ||
$ge?: FilterRangeValue; | ||
}; | ||
export declare type FilterRangeValue = number | string; | ||
export declare type FilterValue = number | string | boolean; | ||
export declare type SortExpression = string[] | { | ||
[key: string]: SortOrder; | ||
} | { | ||
[key: string]: SortOrder; | ||
}[]; | ||
export declare type SortOrder = 'asc' | 'desc'; | ||
export declare type PageConfig = { | ||
after?: string; | ||
before?: string; | ||
first?: string; | ||
last?: string; | ||
size?: number; | ||
offset?: number; | ||
}; | ||
export declare type ColumnsFilter = string[]; | ||
export declare type QueryTableOptions = { | ||
filter: FilterExpression; | ||
@@ -17,6 +82,8 @@ sort?: SortExpression; | ||
}; | ||
export declare class Query<T extends XataRecord, R extends XataRecord = T> { | ||
export declare class Query<T extends XataRecord, R extends XataRecord = T> implements Paginable<T, R> { | ||
#private; | ||
constructor(repository: Repository<T> | null, table: string, data: Partial<QueryTableData>, parent?: Partial<QueryTableData>); | ||
getData(): QueryTableData; | ||
readonly meta: PaginationQueryMeta; | ||
readonly records: R[]; | ||
constructor(repository: Repository<T> | null, table: string, data: Partial<QueryTableOptions>, parent?: Partial<QueryTableOptions>); | ||
getQueryOptions(): QueryTableOptions; | ||
any(...queries: Query<T, R>[]): Query<T, R>; | ||
@@ -40,4 +107,6 @@ all(...queries: Query<T, R>[]): Query<T, R>; | ||
nextPage(size?: number, offset?: number): Promise<Page<T, R>>; | ||
previousPage(size?: number, offset?: number): Promise<Page<T, R>>; | ||
firstPage(size?: number, offset?: number): Promise<Page<T, R>>; | ||
lastPage(size?: number, offset?: number): Promise<Page<T, R>>; | ||
hasNextPage(): boolean; | ||
} |
@@ -51,2 +51,5 @@ "use strict"; | ||
_Query_data.set(this, { filter: {} }); | ||
// Implements pagination | ||
this.meta = { page: { cursor: 'start', more: true } }; | ||
this.records = []; | ||
__classPrivateFieldSet(this, _Query_table, table, "f"); | ||
@@ -74,19 +77,19 @@ if (repository) { | ||
} | ||
getData() { | ||
getQueryOptions() { | ||
return __classPrivateFieldGet(this, _Query_data, "f"); | ||
} | ||
any(...queries) { | ||
const $any = (0, lang_1.compact)(queries.map((query) => query.getData().filter.$any)).flat(); | ||
const $any = (0, lang_1.compact)(queries.map((query) => query.getQueryOptions().filter.$any)).flat(); | ||
return new Query(__classPrivateFieldGet(this, _Query_repository, "f"), __classPrivateFieldGet(this, _Query_table, "f"), { filter: { $any } }, __classPrivateFieldGet(this, _Query_data, "f")); | ||
} | ||
all(...queries) { | ||
const $all = (0, lang_1.compact)(queries.map((query) => query.getData().filter.$all)).flat(); | ||
const $all = (0, lang_1.compact)(queries.map((query) => query.getQueryOptions().filter.$all)).flat(); | ||
return new Query(__classPrivateFieldGet(this, _Query_repository, "f"), __classPrivateFieldGet(this, _Query_table, "f"), { filter: { $all } }, __classPrivateFieldGet(this, _Query_data, "f")); | ||
} | ||
not(...queries) { | ||
const $not = (0, lang_1.compact)(queries.map((query) => query.getData().filter.$not)).flat(); | ||
const $not = (0, lang_1.compact)(queries.map((query) => query.getQueryOptions().filter.$not)).flat(); | ||
return new Query(__classPrivateFieldGet(this, _Query_repository, "f"), __classPrivateFieldGet(this, _Query_table, "f"), { filter: { $not } }, __classPrivateFieldGet(this, _Query_data, "f")); | ||
} | ||
none(...queries) { | ||
const $none = (0, lang_1.compact)(queries.map((query) => query.getData().filter.$none)).flat(); | ||
const $none = (0, lang_1.compact)(queries.map((query) => query.getQueryOptions().filter.$none)).flat(); | ||
return new Query(__classPrivateFieldGet(this, _Query_repository, "f"), __classPrivateFieldGet(this, _Query_table, "f"), { filter: { $none } }, __classPrivateFieldGet(this, _Query_data, "f")); | ||
@@ -170,2 +173,7 @@ } | ||
} | ||
previousPage(size, offset) { | ||
return __awaiter(this, void 0, void 0, function* () { | ||
return this.firstPage(size, offset); | ||
}); | ||
} | ||
firstPage(size, offset) { | ||
@@ -181,3 +189,6 @@ return __awaiter(this, void 0, void 0, function* () { | ||
} | ||
hasNextPage() { | ||
return this.meta.page.more; | ||
} | ||
} | ||
exports.Query = Query; |
{ | ||
"name": "@xata.io/client", | ||
"version": "0.0.0-alpha.b8b17fa", | ||
"version": "0.0.0-alpha.bcdf304", | ||
"description": "Xata.io SDK for TypeScript and JavaScript", | ||
@@ -23,3 +23,3 @@ "main": "./dist/index.js", | ||
"homepage": "https://github.com/xataio/client-ts/blob/main/client/README.md", | ||
"gitHead": "b8b17fa338fdbdc560de1ef3cc5810581e493437" | ||
"gitHead": "bcdf3045916c776027e6e56c78a0b04f52080ca4" | ||
} |
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
171126
4169
5