@boltic/sdk 0.0.8 → 0.1.0
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/dist/databases/index.d.ts +116 -15
- package/dist/databases/index.js +1 -1
- package/dist/databases/index.js.map +1 -1
- package/dist/databases/index.mjs +1 -519
- package/dist/databases/index.mjs.map +1 -1
- package/dist/databases/test-client-Bo_BCApL.js +2 -0
- package/dist/databases/test-client-Bo_BCApL.js.map +1 -0
- package/dist/databases/test-client-C9T839dW.mjs +2 -0
- package/dist/databases/test-client-C9T839dW.mjs.map +1 -0
- package/dist/databases/testing.d.ts +27 -13
- package/dist/databases/testing.js +1 -1
- package/dist/databases/testing.mjs +1 -138
- package/dist/databases/testing.mjs.map +1 -1
- package/dist/sdk.js +122 -29
- package/dist/sdk.js.map +1 -1
- package/dist/sdk.mjs +122 -29
- package/dist/sdk.mjs.map +1 -1
- package/dist/types/index.d.ts +25 -9
- package/package.json +82 -82
- package/dist/databases/test-client-BuQuW6Y-.js +0 -2
- package/dist/databases/test-client-BuQuW6Y-.js.map +0 -1
- package/dist/databases/test-client-D8i2zDgI.mjs +0 -5112
- package/dist/databases/test-client-D8i2zDgI.mjs.map +0 -1
|
@@ -16,6 +16,24 @@ export declare type AlignmentType = 'left' | 'right' | 'center';
|
|
|
16
16
|
|
|
17
17
|
declare type AlignmentType_2 = 'left' | 'center' | 'right';
|
|
18
18
|
|
|
19
|
+
export declare const ALLOWED_FIELD_TYPE_CONVERSIONS: {
|
|
20
|
+
text: FieldTypeEnum[];
|
|
21
|
+
email: FieldTypeEnum[];
|
|
22
|
+
"long-text": FieldTypeEnum[];
|
|
23
|
+
"date-time": FieldTypeEnum[];
|
|
24
|
+
number: FieldTypeEnum[];
|
|
25
|
+
currency: FieldTypeEnum[];
|
|
26
|
+
checkbox: FieldTypeEnum[];
|
|
27
|
+
dropdown: never[];
|
|
28
|
+
"phone-number": FieldTypeEnum[];
|
|
29
|
+
link: FieldTypeEnum[];
|
|
30
|
+
json: FieldTypeEnum[];
|
|
31
|
+
vector: FieldTypeEnum[];
|
|
32
|
+
sparsevec: FieldTypeEnum[];
|
|
33
|
+
halfvec: FieldTypeEnum[];
|
|
34
|
+
encrypted: never[];
|
|
35
|
+
};
|
|
36
|
+
|
|
19
37
|
/**
|
|
20
38
|
* API error for HTTP/API related failures
|
|
21
39
|
*/
|
|
@@ -202,9 +220,13 @@ export declare class BolticClient {
|
|
|
202
220
|
validation?: boolean;
|
|
203
221
|
}) => Promise<RecordBulkInsertResponse | BolticErrorResponse>;
|
|
204
222
|
findAll: (tableName: string, options?: RecordQueryOptions) => Promise<BolticErrorResponse | BolticListResponse<RecordWithId>>;
|
|
205
|
-
findOne: (tableName: string, recordId: string
|
|
223
|
+
findOne: (tableName: string, recordId: string, options?: {
|
|
224
|
+
show_decrypted?: boolean;
|
|
225
|
+
}) => Promise<BolticErrorResponse | BolticSuccessResponse<RecordWithId>>;
|
|
206
226
|
update: (tableName: string, options: RecordUpdateOptions) => Promise<BolticErrorResponse | BolticListResponse<RecordWithId>>;
|
|
207
|
-
updateById: (tableName: string, recordId: string, data: RecordData
|
|
227
|
+
updateById: (tableName: string, recordId: string, data: RecordData, options?: {
|
|
228
|
+
show_decrypted?: boolean;
|
|
229
|
+
}) => Promise<BolticErrorResponse | BolticSuccessResponse<RecordWithId>>;
|
|
208
230
|
delete: (tableName: string, options: RecordDeleteOptions) => Promise<BolticErrorResponse | BolticSuccessResponse<{
|
|
209
231
|
message: string;
|
|
210
232
|
}>>;
|
|
@@ -409,6 +431,18 @@ declare interface ColumnBuilderOptions {
|
|
|
409
431
|
columnResource: ColumnResource;
|
|
410
432
|
}
|
|
411
433
|
|
|
434
|
+
export declare interface ColumnCreateRequest {
|
|
435
|
+
columns: FieldDefinition[];
|
|
436
|
+
fields?: Array<keyof ColumnDetails>;
|
|
437
|
+
}
|
|
438
|
+
|
|
439
|
+
export declare interface ColumnDeleteOptions {
|
|
440
|
+
where: {
|
|
441
|
+
id?: string;
|
|
442
|
+
name?: string;
|
|
443
|
+
};
|
|
444
|
+
}
|
|
445
|
+
|
|
412
446
|
export declare interface ColumnDetails {
|
|
413
447
|
id: string;
|
|
414
448
|
name: string;
|
|
@@ -436,6 +470,8 @@ export declare interface ColumnDetails {
|
|
|
436
470
|
multiple_selections?: boolean;
|
|
437
471
|
phone_format?: string;
|
|
438
472
|
vector_dimension?: number;
|
|
473
|
+
show_decrypted?: boolean;
|
|
474
|
+
is_deterministic?: boolean;
|
|
439
475
|
}
|
|
440
476
|
|
|
441
477
|
export declare class ColumnHelpers {
|
|
@@ -457,6 +493,16 @@ export declare class ColumnHelpers {
|
|
|
457
493
|
static getColumnTypeDisplayName(type: FieldType): string;
|
|
458
494
|
}
|
|
459
495
|
|
|
496
|
+
export declare interface ColumnListResponse {
|
|
497
|
+
columns: ColumnDetails[];
|
|
498
|
+
pagination: {
|
|
499
|
+
total: number;
|
|
500
|
+
page: number;
|
|
501
|
+
limit: number;
|
|
502
|
+
pages: number;
|
|
503
|
+
};
|
|
504
|
+
}
|
|
505
|
+
|
|
460
506
|
export declare interface ColumnQueryOptions {
|
|
461
507
|
where?: {
|
|
462
508
|
id?: string;
|
|
@@ -477,7 +523,7 @@ export declare interface ColumnQueryOptions {
|
|
|
477
523
|
offset?: number;
|
|
478
524
|
}
|
|
479
525
|
|
|
480
|
-
declare interface ColumnRecord {
|
|
526
|
+
export declare interface ColumnRecord {
|
|
481
527
|
id: string;
|
|
482
528
|
}
|
|
483
529
|
|
|
@@ -535,6 +581,14 @@ declare class ColumnResource extends BaseResource {
|
|
|
535
581
|
private getTableId;
|
|
536
582
|
}
|
|
537
583
|
|
|
584
|
+
export declare interface ColumnUpdateOptions {
|
|
585
|
+
set: ColumnUpdateRequest;
|
|
586
|
+
where: {
|
|
587
|
+
id?: string;
|
|
588
|
+
name?: string;
|
|
589
|
+
};
|
|
590
|
+
}
|
|
591
|
+
|
|
538
592
|
export declare interface ColumnUpdateRequest {
|
|
539
593
|
name?: string;
|
|
540
594
|
type?: FieldType;
|
|
@@ -559,6 +613,8 @@ export declare interface ColumnUpdateRequest {
|
|
|
559
613
|
time_format?: keyof typeof TimeFormatEnum;
|
|
560
614
|
timezone?: string;
|
|
561
615
|
vector_dimension?: number;
|
|
616
|
+
show_decrypted?: boolean;
|
|
617
|
+
is_deterministic?: boolean;
|
|
562
618
|
}
|
|
563
619
|
|
|
564
620
|
export declare function createClient(apiKey: string, options?: ClientOptions): BolticClient;
|
|
@@ -773,7 +829,7 @@ export declare interface DatabaseUpdateRequest {
|
|
|
773
829
|
db_name: string;
|
|
774
830
|
}
|
|
775
831
|
|
|
776
|
-
declare const DateFormatEnum: Readonly<{
|
|
832
|
+
export declare const DateFormatEnum: Readonly<{
|
|
777
833
|
MMDDYY: "%m/%d/%y";
|
|
778
834
|
MMDDYYYY: "%m/%d/%Y";
|
|
779
835
|
MM_DD_YYYY: "%m-%d-%Y";
|
|
@@ -786,7 +842,7 @@ declare const DateFormatEnum: Readonly<{
|
|
|
786
842
|
ddd__MMM__DD__YYYY: "%a %b %d %Y";
|
|
787
843
|
}>;
|
|
788
844
|
|
|
789
|
-
declare type DecimalType = '00' | '0.0' | '0.00' | '0.000' | '0.0000' | '0.00000' | '0.000000';
|
|
845
|
+
export declare type DecimalType = '00' | '0.0' | '0.00' | '0.000' | '0.0000' | '0.00000' | '0.000000';
|
|
790
846
|
|
|
791
847
|
export declare interface DeleteIndexRequest {
|
|
792
848
|
index_name: string;
|
|
@@ -834,10 +890,8 @@ export declare interface ExecuteSQLApiRequest {
|
|
|
834
890
|
}
|
|
835
891
|
|
|
836
892
|
export declare interface ExecuteSQLApiResponse {
|
|
837
|
-
data: [
|
|
838
|
-
|
|
839
|
-
unknown
|
|
840
|
-
];
|
|
893
|
+
data: Record<string, unknown>[];
|
|
894
|
+
count?: number;
|
|
841
895
|
pagination?: {
|
|
842
896
|
total_count: number;
|
|
843
897
|
total_pages: number;
|
|
@@ -860,6 +914,24 @@ export declare interface ExecutionResult {
|
|
|
860
914
|
pagination?: PaginationInfo;
|
|
861
915
|
}
|
|
862
916
|
|
|
917
|
+
export declare const FIELD_SPECIFIC_KEYS_MAP: {
|
|
918
|
+
text: never[];
|
|
919
|
+
email: never[];
|
|
920
|
+
"long-text": never[];
|
|
921
|
+
number: string[];
|
|
922
|
+
currency: string[];
|
|
923
|
+
checkbox: never[];
|
|
924
|
+
dropdown: string[];
|
|
925
|
+
"date-time": string[];
|
|
926
|
+
"phone-number": string[];
|
|
927
|
+
link: never[];
|
|
928
|
+
json: never[];
|
|
929
|
+
vector: string[];
|
|
930
|
+
sparsevec: string[];
|
|
931
|
+
halfvec: string[];
|
|
932
|
+
encrypted: string[];
|
|
933
|
+
};
|
|
934
|
+
|
|
863
935
|
export declare interface FieldDefinition {
|
|
864
936
|
name: string;
|
|
865
937
|
type: FieldType;
|
|
@@ -883,10 +955,30 @@ export declare interface FieldDefinition {
|
|
|
883
955
|
multiple_selections?: boolean;
|
|
884
956
|
phone_format?: string;
|
|
885
957
|
vector_dimension?: number;
|
|
958
|
+
show_decrypted?: boolean;
|
|
959
|
+
is_deterministic?: boolean;
|
|
960
|
+
}
|
|
961
|
+
|
|
962
|
+
export declare type FieldType = 'text' | 'long-text' | 'number' | 'currency' | 'checkbox' | 'dropdown' | 'email' | 'phone-number' | 'link' | 'json' | 'date-time' | 'vector' | 'halfvec' | 'sparsevec' | 'encrypted';
|
|
963
|
+
|
|
964
|
+
export declare enum FieldTypeEnum {
|
|
965
|
+
TEXT = "text",
|
|
966
|
+
EMAIL = "email",
|
|
967
|
+
LONG_TEXT = "long-text",
|
|
968
|
+
DATE_TIME = "date-time",
|
|
969
|
+
NUMBER = "number",
|
|
970
|
+
CURRENCY = "currency",
|
|
971
|
+
CHECKBOX = "checkbox",
|
|
972
|
+
DROPDOWN = "dropdown",
|
|
973
|
+
PHONE_NUMBER = "phone-number",
|
|
974
|
+
LINK = "link",
|
|
975
|
+
JSON = "json",
|
|
976
|
+
VECTOR = "vector",
|
|
977
|
+
SPARSEVECTOR = "sparsevec",
|
|
978
|
+
HALFVECTOR = "halfvec",
|
|
979
|
+
ENCRYPTED = "encrypted"
|
|
886
980
|
}
|
|
887
981
|
|
|
888
|
-
export declare type FieldType = 'text' | 'long-text' | 'number' | 'currency' | 'checkbox' | 'dropdown' | 'email' | 'phone-number' | 'link' | 'json' | 'date-time' | 'vector' | 'halfvec' | 'sparsevec';
|
|
889
|
-
|
|
890
982
|
/**
|
|
891
983
|
* Comprehensive filter operators based on backend buildWhereClause function
|
|
892
984
|
*/
|
|
@@ -1107,7 +1199,7 @@ export declare interface PaginationParams {
|
|
|
1107
1199
|
page_size?: number;
|
|
1108
1200
|
}
|
|
1109
1201
|
|
|
1110
|
-
declare type PhoneFormatType = '+91 123 456 7890' | '(123) 456-7890' | '+1 (123) 456-7890' | '+91 12 3456 7890';
|
|
1202
|
+
export declare type PhoneFormatType = '+91 123 456 7890' | '(123) 456-7890' | '+1 (123) 456-7890' | '+91 12 3456 7890';
|
|
1111
1203
|
|
|
1112
1204
|
export declare interface QueryOperator<T = unknown> {
|
|
1113
1205
|
$eq?: T;
|
|
@@ -1318,7 +1410,10 @@ declare class RecordResource {
|
|
|
1318
1410
|
/**
|
|
1319
1411
|
* Get a single record by ID
|
|
1320
1412
|
*/
|
|
1321
|
-
get(tableName: string, recordId: string,
|
|
1413
|
+
get(tableName: string, recordId: string, optionsOrDbId?: {
|
|
1414
|
+
show_decrypted?: boolean;
|
|
1415
|
+
dbId?: string;
|
|
1416
|
+
} | string, dbId?: string): Promise<BolticSuccessResponse<RecordWithId> | BolticErrorResponse>;
|
|
1322
1417
|
/**
|
|
1323
1418
|
* List records with filtering and pagination
|
|
1324
1419
|
*/
|
|
@@ -1330,7 +1425,10 @@ declare class RecordResource {
|
|
|
1330
1425
|
/**
|
|
1331
1426
|
* Update a single record by ID
|
|
1332
1427
|
*/
|
|
1333
|
-
updateById(tableName: string, recordId: string, data: RecordData,
|
|
1428
|
+
updateById(tableName: string, recordId: string, data: RecordData, optionsOrDbId?: {
|
|
1429
|
+
show_decrypted?: boolean;
|
|
1430
|
+
dbId?: string;
|
|
1431
|
+
} | string, dbId?: string): Promise<BolticSuccessResponse<RecordWithId> | BolticErrorResponse>;
|
|
1334
1432
|
/**
|
|
1335
1433
|
* Unified delete method that supports both record IDs and filters
|
|
1336
1434
|
*/
|
|
@@ -1358,12 +1456,14 @@ export declare interface RecordUpdateByIdOptions {
|
|
|
1358
1456
|
id: string;
|
|
1359
1457
|
set: RecordData;
|
|
1360
1458
|
fields?: string[];
|
|
1459
|
+
show_decrypted?: boolean;
|
|
1361
1460
|
}
|
|
1362
1461
|
|
|
1363
1462
|
export declare interface RecordUpdateOptions {
|
|
1364
1463
|
set: RecordData;
|
|
1365
1464
|
filters: ApiFilter[] | Record<string, unknown>[];
|
|
1366
1465
|
fields?: string[];
|
|
1466
|
+
show_decrypted?: boolean;
|
|
1367
1467
|
}
|
|
1368
1468
|
|
|
1369
1469
|
export declare interface RecordUpdateRequest {
|
|
@@ -1703,6 +1803,7 @@ export declare interface TableQueryOptions {
|
|
|
1703
1803
|
id?: string;
|
|
1704
1804
|
name?: string;
|
|
1705
1805
|
db_id?: string;
|
|
1806
|
+
resource_id?: string;
|
|
1706
1807
|
is_public?: boolean;
|
|
1707
1808
|
created_by?: string;
|
|
1708
1809
|
created_at?: {
|
|
@@ -1819,7 +1920,7 @@ export declare interface TextToSQLOptions {
|
|
|
1819
1920
|
currentQuery?: string;
|
|
1820
1921
|
}
|
|
1821
1922
|
|
|
1822
|
-
declare const TimeFormatEnum: Readonly<{
|
|
1923
|
+
export declare const TimeFormatEnum: Readonly<{
|
|
1823
1924
|
HH_mm_ss: "%H:%M:%S";
|
|
1824
1925
|
HH_mm_ssZ: "%H:%M:%SZ";
|
|
1825
1926
|
HH_mm_ss_SSS: "%H:%M:%S.%f";
|
package/dist/databases/index.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./test-client-
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./test-client-Bo_BCApL.js");class i{constructor(e){this.queryOptions={},this.updateData={},this.tableName=e.tableName,this.columnResource=e.columnResource}where(e){return this.queryOptions.where={...this.queryOptions.where,...e},this}orderBy(e,i="asc"){return this.queryOptions.sort||(this.queryOptions.sort=[]),this.queryOptions.sort.push({field:e,order:i}),this}limit(e){return this.queryOptions.limit=e,this}offset(e){return this.queryOptions.offset=e,this}select(e){return this.queryOptions.fields=e,this}set(e){return this.updateData={...this.updateData,...e},this}async findAll(){return this.columnResource.findAll(this.tableName,this.queryOptions)}async get(){return this.queryOptions.where?.name?this.columnResource.get(this.tableName,this.queryOptions.where.name):{error:{code:"MISSING_COLUMN_NAME",message:"Column name is required for get operation"}}}async update(){return this.queryOptions.where?.name?this.columnResource.update(this.tableName,this.queryOptions.where.name,this.updateData):{error:{code:"MISSING_COLUMN_NAME",message:"Column name is required for update operation"}}}async delete(){return this.queryOptions.where?.name?this.columnResource.delete(this.tableName,this.queryOptions.where.name):{error:{code:"MISSING_COLUMN_NAME",message:"Column name is required for delete operation"}}}getQueryOptions(){return{...this.queryOptions}}getUpdateData(){return{...this.updateData}}}exports.ALLOWED_FIELD_TYPE_CONVERSIONS=e.ALLOWED_FIELD_TYPE_CONVERSIONS,exports.ApiError=e.ApiError,exports.BolticClient=e.BolticClient,exports.DateFormatEnum=e.DateFormatEnum,exports.ENV_CONFIGS=e.ENV_CONFIGS,exports.FIELD_SPECIFIC_KEYS_MAP=e.FIELD_SPECIFIC_KEYS_MAP,exports.FILTER_OPERATORS=e.FILTER_OPERATORS,exports.FieldTypeEnum=e.FieldTypeEnum,exports.FilterBuilder=e.FilterBuilder,exports.REGION_CONFIGS=e.REGION_CONFIGS,exports.SqlResource=e.SqlResource,exports.TimeFormatEnum=e.TimeFormatEnum,exports.ValidationError=e.ValidationError,exports.buildApiFilters=e.buildApiFilters,exports.createErrorResponse=e.createErrorResponse,exports.createErrorWithContext=e.createErrorWithContext,exports.createFilter=e.createFilter,exports.createMockResponse=e.createMockResponse,exports.createRecordBuilder=e.createRecordBuilder,exports.createTableBuilder=e.createTableBuilder,exports.createTestClient=e.createTestClient,exports.formatError=e.formatError,exports.getHttpStatusCode=e.getHttpStatusCode,exports.isErrorResponse=e.isErrorResponse,exports.isListResponse=e.isListResponse,exports.isNetworkError=e.isNetworkError,exports.mapFiltersToWhere=e.mapFiltersToWhere,exports.mapWhereToFilters=e.mapWhereToFilters,exports.normalizeFilters=e.normalizeFilters,exports.ColumnHelpers=class{static fieldToUpdateRequest(e){return{name:e.name,type:e.type,description:e.description,is_nullable:e.is_nullable,is_unique:e.is_unique,is_indexed:e.is_indexed,is_visible:e.is_visible,is_primary_key:e.is_primary_key,is_readonly:e.is_readonly,field_order:e.field_order,default_value:e.default_value,alignment:e.alignment,decimals:e.decimals,currency_format:e.currency_format,selectable_items:e.selectable_items,multiple_selections:e.multiple_selections,phone_format:e.phone_format,date_format:e.date_format,time_format:e.time_format,timezone:e.timezone,vector_dimension:e.vector_dimension,show_decrypted:e.show_decrypted,is_deterministic:e.is_deterministic}}static applyDefaultValues(e){if(!e.name||!e.type)throw new Error("Column name and type are required");return{name:e.name,type:e.type,is_nullable:!0,is_unique:!1,is_indexed:!1,is_primary_key:!1,is_visible:!0,is_readonly:!1,field_order:1,alignment:"left",multiple_selections:!1,...e}}static createColumnDefinition(e,i,r={}){return this.applyDefaultValues({name:e,type:i,...r})}static getColumnTypeDisplayName(e){return{text:"Text","long-text":"Long Text",number:"Number",currency:"Currency",checkbox:"Checkbox",dropdown:"Dropdown",email:"Email","phone-number":"Phone Number",link:"Link",json:"JSON","date-time":"Date & Time",vector:"Vector",halfvec:"Half Vector",sparsevec:"Sparse Vector",encrypted:"Encrypted"}[e]||e}},exports.SchemaHelpers=class{static textField(e,i={}){return{name:e,type:"text",is_nullable:!0,is_primary_key:!1,is_unique:!1,is_visible:!0,is_readonly:!1,is_indexed:!1,field_order:1,...i}}static numberField(e,i={}){return{name:e,type:"number",is_nullable:!0,is_primary_key:!1,is_unique:!1,is_visible:!0,is_readonly:!1,is_indexed:!1,field_order:1,decimals:"0.00",...i}}static currencyField(e,i="USD",r={}){return{name:e,type:"currency",is_nullable:!0,is_primary_key:!1,is_unique:!1,is_visible:!0,is_readonly:!1,is_indexed:!1,field_order:1,decimals:"0.00",currency_format:i,...r}}static dropdownField(e,i,r={}){return{name:e,type:"dropdown",is_nullable:!0,is_primary_key:!1,is_unique:!1,is_visible:!0,is_readonly:!1,is_indexed:!1,field_order:1,selection_source:"provide-static-list",selectable_items:i,multiple_selections:!1,...r}}static vectorField(e,i,r={}){return{name:e,type:"vector",is_nullable:!0,is_primary_key:!1,is_unique:!1,is_visible:!0,is_readonly:!1,is_indexed:!1,field_order:1,vector_dimension:i,...r}}static jsonField(e,i={}){return{name:e,type:"json",is_nullable:!0,is_primary_key:!1,is_unique:!1,is_visible:!0,is_readonly:!1,is_indexed:!1,field_order:1,...i}}static dateTimeField(e,i={}){return{name:e,type:"date-time",is_nullable:!0,is_primary_key:!1,is_unique:!1,is_visible:!0,is_readonly:!1,is_indexed:!1,field_order:1,date_format:"YYYY-MM-DD",time_format:"HH:mm:ss",...i}}static emailField(e,i={}){return{name:e,type:"email",is_nullable:!0,is_primary_key:!1,is_unique:!1,is_visible:!0,is_readonly:!1,is_indexed:!1,field_order:1,...i}}static longTextField(e,i={}){return{name:e,type:"long-text",is_nullable:!0,is_primary_key:!1,is_unique:!1,is_visible:!0,is_readonly:!1,is_indexed:!1,field_order:1,...i}}static linkField(e,i={}){return{name:e,type:"link",is_nullable:!0,is_primary_key:!1,is_unique:!1,is_visible:!0,is_readonly:!1,is_indexed:!1,field_order:1,...i}}static phoneNumberField(e,i="international",r={}){return{name:e,type:"phone-number",is_nullable:!0,is_primary_key:!1,is_unique:!1,is_visible:!0,is_readonly:!1,is_indexed:!1,field_order:1,phone_format:i,...r}}static checkboxField(e,i={}){return{name:e,type:"checkbox",is_nullable:!0,is_primary_key:!1,is_unique:!1,is_visible:!0,is_readonly:!1,is_indexed:!1,field_order:1,default_value:!1,...i}}static halfVectorField(e,i,r={}){return{name:e,type:"halfvec",is_nullable:!0,is_primary_key:!1,is_unique:!1,is_visible:!0,is_readonly:!1,is_indexed:!1,field_order:1,vector_dimension:i,...r}}static sparseVectorField(e,i,r={}){return{name:e,type:"sparsevec",is_nullable:!0,is_primary_key:!1,is_unique:!1,is_visible:!0,is_readonly:!1,is_indexed:!1,field_order:1,vector_dimension:i,...r}}static createBasicSchema(e){return e.map((e,i)=>({name:e.name,type:e.type,is_nullable:!0,is_primary_key:!1,is_unique:!1,is_visible:!0,is_readonly:!1,is_indexed:!1,field_order:i+1}))}},exports.VERSION="1.0.0",exports.createClient=function(i,r={}){return new e.BolticClient(i,r)},exports.createColumnBuilder=function(e){return new i(e)};
|
|
2
2
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sources":["../src/client/resources/column-builder.ts","../src/utils/column/helpers.ts","../src/utils/table/schema-helpers.ts","../src/index.ts","../src/client/index.ts"],"sourcesContent":["import {\n ColumnDetails,\n ColumnQueryOptions,\n ColumnUpdateRequest,\n} from '../../types/api/column';\nimport {\n BolticErrorResponse,\n BolticListResponse,\n BolticSuccessResponse,\n} from '../../types/common/responses';\nimport { ColumnResource } from './column';\n\nexport interface ColumnBuilderOptions {\n tableName: string;\n columnResource: ColumnResource;\n}\n\n/**\n * Column Builder - provides a fluent interface for building column queries and operations\n */\nexport class ColumnBuilder {\n private tableName: string;\n private columnResource: ColumnResource;\n private queryOptions: ColumnQueryOptions = {};\n private updateData: ColumnUpdateRequest = {};\n\n constructor(options: ColumnBuilderOptions) {\n this.tableName = options.tableName;\n this.columnResource = options.columnResource;\n }\n\n /**\n * Add filter conditions\n */\n where(conditions: Partial<ColumnQueryOptions['where']>): ColumnBuilder {\n this.queryOptions.where = { ...this.queryOptions.where, ...conditions };\n return this;\n }\n\n /**\n * Set sorting\n */\n orderBy(\n field: keyof ColumnDetails,\n direction: 'asc' | 'desc' = 'asc'\n ): ColumnBuilder {\n if (!this.queryOptions.sort) {\n this.queryOptions.sort = [];\n }\n this.queryOptions.sort.push({ field, order: direction });\n return this;\n }\n\n /**\n * Set limit\n */\n limit(count: number): ColumnBuilder {\n this.queryOptions.limit = count;\n return this;\n }\n\n /**\n * Set offset\n */\n offset(count: number): ColumnBuilder {\n this.queryOptions.offset = count;\n return this;\n }\n\n /**\n * Set fields to select\n */\n select(fields: Array<keyof ColumnDetails>): ColumnBuilder {\n this.queryOptions.fields = fields;\n return this;\n }\n\n /**\n * Set data for update operations\n */\n set(data: ColumnUpdateRequest): ColumnBuilder {\n this.updateData = { ...this.updateData, ...data };\n return this;\n }\n\n /**\n * Execute findAll operation\n */\n async findAll(): Promise<\n BolticListResponse<ColumnDetails> | BolticErrorResponse\n > {\n return this.columnResource.findAll(this.tableName, this.queryOptions);\n }\n\n /**\n * Execute get operation (was findOne) - requires column name\n */\n async get(): Promise<\n BolticSuccessResponse<ColumnDetails> | BolticErrorResponse\n > {\n if (!this.queryOptions.where?.name) {\n return {\n error: {\n code: 'MISSING_COLUMN_NAME',\n message: 'Column name is required for get operation',\n },\n };\n }\n\n return this.columnResource.get(\n this.tableName,\n this.queryOptions.where.name as string\n );\n }\n\n /**\n * Execute update operation - requires column name\n */\n async update(): Promise<\n BolticSuccessResponse<ColumnDetails> | BolticErrorResponse\n > {\n if (!this.queryOptions.where?.name) {\n return {\n error: {\n code: 'MISSING_COLUMN_NAME',\n message: 'Column name is required for update operation',\n },\n };\n }\n\n return this.columnResource.update(\n this.tableName,\n this.queryOptions.where.name as string,\n this.updateData\n );\n }\n\n /**\n * Execute delete operation - requires column name\n */\n async delete(): Promise<\n | BolticSuccessResponse<{ success: boolean; message?: string }>\n | BolticErrorResponse\n > {\n if (!this.queryOptions.where?.name) {\n return {\n error: {\n code: 'MISSING_COLUMN_NAME',\n message: 'Column name is required for delete operation',\n },\n };\n }\n\n return this.columnResource.delete(\n this.tableName,\n this.queryOptions.where.name as string\n );\n }\n\n /**\n * Get the built query options (for debugging)\n */\n getQueryOptions(): ColumnQueryOptions {\n return { ...this.queryOptions };\n }\n\n /**\n * Get the update data (for debugging)\n */\n getUpdateData(): ColumnUpdateRequest {\n return { ...this.updateData };\n }\n}\n\n/**\n * Create a new column builder\n */\nexport function createColumnBuilder(\n options: ColumnBuilderOptions\n): ColumnBuilder {\n return new ColumnBuilder(options);\n}\n","import {\n ColumnUpdateRequest,\n DateFormatEnum,\n DecimalType,\n PhoneFormatType,\n TimeFormatEnum,\n} from '../../types/api/column';\nimport { FieldDefinition, FieldType } from '../../types/api/table';\n\nexport class ColumnHelpers {\n /**\n * Convert FieldDefinition to ColumnUpdateRequest\n */\n static fieldToUpdateRequest(field: FieldDefinition): ColumnUpdateRequest {\n return {\n name: field.name,\n type: field.type,\n description: field.description,\n is_nullable: field.is_nullable,\n is_unique: field.is_unique,\n is_indexed: field.is_indexed,\n is_visible: field.is_visible,\n is_primary_key: field.is_primary_key,\n is_readonly: field.is_readonly,\n field_order: field.field_order,\n default_value: field.default_value,\n alignment: field.alignment,\n decimals: field.decimals as DecimalType,\n currency_format: field.currency_format,\n selectable_items: field.selectable_items,\n multiple_selections: field.multiple_selections,\n phone_format: field.phone_format as PhoneFormatType,\n date_format: field.date_format as keyof typeof DateFormatEnum,\n time_format: field.time_format as keyof typeof TimeFormatEnum,\n timezone: field.timezone,\n vector_dimension: field.vector_dimension,\n };\n }\n\n /**\n * Apply default values to column definition\n */\n static applyDefaultValues(column: Partial<FieldDefinition>): FieldDefinition {\n if (!column.name || !column.type) {\n throw new Error('Column name and type are required');\n }\n\n return {\n name: column.name,\n type: column.type,\n is_nullable: true,\n is_unique: false,\n is_indexed: false,\n is_primary_key: false,\n is_visible: true,\n is_readonly: false,\n field_order: 1,\n alignment: 'left',\n multiple_selections: false,\n ...column,\n };\n }\n\n /**\n * Create a column definition with proper defaults\n */\n static createColumnDefinition(\n name: string,\n type: FieldType,\n options: Partial<FieldDefinition> = {}\n ): FieldDefinition {\n return this.applyDefaultValues({\n name,\n type,\n ...options,\n });\n }\n\n /**\n * Get column type display name\n */\n static getColumnTypeDisplayName(type: FieldType): string {\n const typeNames: Record<FieldType, string> = {\n text: 'Text',\n 'long-text': 'Long Text',\n number: 'Number',\n currency: 'Currency',\n checkbox: 'Checkbox',\n dropdown: 'Dropdown',\n email: 'Email',\n 'phone-number': 'Phone Number',\n link: 'Link',\n json: 'JSON',\n 'date-time': 'Date & Time',\n vector: 'Vector',\n halfvec: 'Half Vector',\n sparsevec: 'Sparse Vector',\n };\n\n return typeNames[type] || type;\n }\n}\n","import { FieldDefinition, FieldType } from '../../types/api/table';\n\nexport class SchemaHelpers {\n /**\n * Create a text field definition\n */\n static textField(\n name: string,\n options: Partial<FieldDefinition> = {}\n ): FieldDefinition {\n return {\n name,\n type: 'text',\n is_nullable: true,\n is_primary_key: false,\n is_unique: false,\n is_visible: true,\n is_readonly: false,\n is_indexed: false,\n field_order: 1,\n ...options,\n };\n }\n\n /**\n * Create a number field definition\n */\n static numberField(\n name: string,\n options: Partial<FieldDefinition> = {}\n ): FieldDefinition {\n return {\n name,\n type: 'number',\n is_nullable: true,\n is_primary_key: false,\n is_unique: false,\n is_visible: true,\n is_readonly: false,\n is_indexed: false,\n field_order: 1,\n decimals: '0.00',\n ...options,\n };\n }\n\n /**\n * Create a currency field definition\n */\n static currencyField(\n name: string,\n currency: string = 'USD',\n options: Partial<FieldDefinition> = {}\n ): FieldDefinition {\n return {\n name,\n type: 'currency',\n is_nullable: true,\n is_primary_key: false,\n is_unique: false,\n is_visible: true,\n is_readonly: false,\n is_indexed: false,\n field_order: 1,\n decimals: '0.00',\n currency_format: currency,\n ...options,\n };\n }\n\n /**\n * Create a dropdown field definition\n */\n static dropdownField(\n name: string,\n items: string[],\n options: Partial<FieldDefinition> = {}\n ): FieldDefinition {\n return {\n name,\n type: 'dropdown',\n is_nullable: true,\n is_primary_key: false,\n is_unique: false,\n is_visible: true,\n is_readonly: false,\n is_indexed: false,\n field_order: 1,\n selection_source: 'provide-static-list',\n selectable_items: items,\n multiple_selections: false,\n ...options,\n };\n }\n\n /**\n * Create a vector field definition\n */\n static vectorField(\n name: string,\n dimension: number,\n options: Partial<FieldDefinition> = {}\n ): FieldDefinition {\n return {\n name,\n type: 'vector',\n is_nullable: true,\n is_primary_key: false,\n is_unique: false,\n is_visible: true,\n is_readonly: false,\n is_indexed: false,\n field_order: 1,\n vector_dimension: dimension,\n ...options,\n };\n }\n\n /**\n * Create a JSON field definition\n */\n static jsonField(\n name: string,\n options: Partial<FieldDefinition> = {}\n ): FieldDefinition {\n return {\n name,\n type: 'json',\n is_nullable: true,\n is_primary_key: false,\n is_unique: false,\n is_visible: true,\n is_readonly: false,\n is_indexed: false,\n field_order: 1,\n ...options,\n };\n }\n\n /**\n * Create a date-time field definition\n */\n static dateTimeField(\n name: string,\n options: Partial<FieldDefinition> = {}\n ): FieldDefinition {\n return {\n name,\n type: 'date-time',\n is_nullable: true,\n is_primary_key: false,\n is_unique: false,\n is_visible: true,\n is_readonly: false,\n is_indexed: false,\n field_order: 1,\n date_format: 'YYYY-MM-DD',\n time_format: 'HH:mm:ss',\n ...options,\n };\n }\n\n /**\n * Create an email field definition\n */\n static emailField(\n name: string,\n options: Partial<FieldDefinition> = {}\n ): FieldDefinition {\n return {\n name,\n type: 'email',\n is_nullable: true,\n is_primary_key: false,\n is_unique: false,\n is_visible: true,\n is_readonly: false,\n is_indexed: false,\n field_order: 1,\n ...options,\n };\n }\n\n /**\n * Create a long-text field definition\n */\n static longTextField(\n name: string,\n options: Partial<FieldDefinition> = {}\n ): FieldDefinition {\n return {\n name,\n type: 'long-text',\n is_nullable: true,\n is_primary_key: false,\n is_unique: false,\n is_visible: true,\n is_readonly: false,\n is_indexed: false,\n field_order: 1,\n ...options,\n };\n }\n\n /**\n * Create a link field definition\n */\n static linkField(\n name: string,\n options: Partial<FieldDefinition> = {}\n ): FieldDefinition {\n return {\n name,\n type: 'link',\n is_nullable: true,\n is_primary_key: false,\n is_unique: false,\n is_visible: true,\n is_readonly: false,\n is_indexed: false,\n field_order: 1,\n ...options,\n };\n }\n\n /**\n * Create a phone number field definition\n */\n static phoneNumberField(\n name: string,\n format: string = 'international',\n options: Partial<FieldDefinition> = {}\n ): FieldDefinition {\n return {\n name,\n type: 'phone-number',\n is_nullable: true,\n is_primary_key: false,\n is_unique: false,\n is_visible: true,\n is_readonly: false,\n is_indexed: false,\n field_order: 1,\n phone_format: format,\n ...options,\n };\n }\n\n /**\n * Create a checkbox field definition\n */\n static checkboxField(\n name: string,\n options: Partial<FieldDefinition> = {}\n ): FieldDefinition {\n return {\n name,\n type: 'checkbox',\n is_nullable: true,\n is_primary_key: false,\n is_unique: false,\n is_visible: true,\n is_readonly: false,\n is_indexed: false,\n field_order: 1,\n default_value: false,\n ...options,\n };\n }\n\n /**\n * Create a half-vector field definition\n */\n static halfVectorField(\n name: string,\n dimension: number,\n options: Partial<FieldDefinition> = {}\n ): FieldDefinition {\n return {\n name,\n type: 'halfvec',\n is_nullable: true,\n is_primary_key: false,\n is_unique: false,\n is_visible: true,\n is_readonly: false,\n is_indexed: false,\n field_order: 1,\n vector_dimension: dimension,\n ...options,\n };\n }\n\n /**\n * Create a sparse vector field definition\n */\n static sparseVectorField(\n name: string,\n dimension: number,\n options: Partial<FieldDefinition> = {}\n ): FieldDefinition {\n return {\n name,\n type: 'sparsevec',\n is_nullable: true,\n is_primary_key: false,\n is_unique: false,\n is_visible: true,\n is_readonly: false,\n is_indexed: false,\n field_order: 1,\n vector_dimension: dimension,\n ...options,\n };\n }\n\n /**\n * Create a basic schema from field definitions\n */\n static createBasicSchema(\n fields: Array<{ name: string; type: FieldType }>\n ): FieldDefinition[] {\n return fields.map((field, index) => ({\n name: field.name,\n type: field.type,\n is_nullable: true,\n is_primary_key: false,\n is_unique: false,\n is_visible: true,\n is_readonly: false,\n is_indexed: false,\n field_order: index + 1,\n }));\n }\n}\n","// Main SDK exports\nexport { BolticClient, createClient } from './client';\nexport type { ClientOptions } from './client';\n\n// Type exports for external use\nexport type {\n ColumnDetails,\n ColumnQueryOptions,\n ColumnUpdateRequest,\n} from './types/api/column';\nexport type {\n DatabaseCreateRequest,\n DatabaseDeletionJobResponse,\n DatabaseDeletionStatusResponse,\n DatabaseJobAction,\n DatabaseJobListRequest,\n DatabaseJobQueryOptions,\n DatabaseJobRecord,\n DatabaseJobStatus,\n DatabaseListQueryParams,\n DatabaseListRequest,\n DatabaseQueryOptions,\n DatabaseRecord,\n DatabaseStatus,\n DatabaseUpdateRequest,\n FilterParams,\n PaginationMetadata,\n PaginationParams,\n SortParams,\n} from './types/api/database';\nexport type {\n AddIndexRequest,\n AddIndexResponse,\n DeleteIndexRequest,\n DeleteIndexResponse,\n ListIndexesQuery,\n ListIndexesResponse,\n} from './types/api/index';\nexport type {\n RecordData,\n RecordDeleteOptions,\n RecordQueryOptions,\n RecordWithId,\n} from './types/api/record';\nexport type {\n FieldDefinition,\n TableCreateRequest,\n TableRecord,\n TableUpdateRequest,\n} from './types/api/table';\n\n// Response types and helpers - Essential for type checking\nexport { isErrorResponse, isListResponse } from './types/common/responses';\nexport type {\n ApiResponse,\n BolticErrorResponse,\n BolticListResponse,\n BolticSuccessResponse,\n BulkResponse,\n ErrorResponse,\n QueryOptions,\n SuccessResponse,\n} from './types/common/responses';\n\n// Pagination and operation types\nexport type { PaginationInfo } from './types/common/operations';\n\n// Utility classes for schema and column management\nexport { ColumnHelpers } from './utils/column/helpers';\nexport { SchemaHelpers } from './utils/table/schema-helpers';\n\n// Filter utilities and constants\nexport {\n FILTER_OPERATORS,\n FilterBuilder,\n buildApiFilters,\n createFilter,\n mapFiltersToWhere,\n mapWhereToFilters,\n normalizeFilters,\n} from './utils/filters/filter-mapper';\nexport type { ApiFilter } from './utils/filters/filter-mapper';\n\n// Builder creation functions\nexport { createColumnBuilder } from './client/resources/column-builder';\nexport { createRecordBuilder } from './client/resources/record-builder';\nexport { createTableBuilder } from './client/resources/table-builder';\n\n// Error handling utilities\nexport {\n ApiError,\n ValidationError,\n createErrorWithContext,\n formatError,\n getHttpStatusCode,\n isNetworkError,\n} from './errors/utils';\nexport type { ValidationFailure } from './errors/utils';\n\n// HTTP adapter types for advanced users\nexport type {\n HttpAdapter,\n HttpRequestConfig,\n HttpResponse,\n} from './utils/http/adapter';\n\n// Testing utilities for SDK users\nexport {\n createErrorResponse,\n createMockResponse,\n createTestClient,\n} from './testing/test-client';\nexport type { MockClientOptions } from './testing/test-client';\n\n// Export all errors\nexport * from './errors';\n\n// Export all types\nexport * from './types';\n\n// SQL exports\nexport * from './client/resources/sql';\n\n// Version information\nexport const VERSION = '1.0.0';\n","import { BolticClient, ClientOptions } from './boltic-client';\n\nexport function createClient(\n apiKey: string,\n options: ClientOptions = {}\n): BolticClient {\n return new BolticClient(apiKey, options);\n}\n\nexport type { Region } from '../types/config/environment';\nexport * from './core/auth-manager';\nexport * from './core/base-client';\nexport * from './core/base-resource';\nexport * from './core/config';\nexport * from './resources/database';\nexport * from './resources/record';\nexport * from './resources/record-builder';\nexport * from './resources/table';\nexport {\n createTableBuilder,\n TableBuilder,\n type TableBuilderOptions,\n} from './resources/table-builder';\nexport { BolticClient };\nexport type { ClientOptions };\n"],"names":["ColumnBuilder","constructor","options","this","queryOptions","updateData","tableName","columnResource","where","conditions","orderBy","field","direction","sort","push","order","limit","count","offset","select","fields","set","data","findAll","get","_a","name","error","code","message","update","delete","getQueryOptions","getUpdateData","fieldToUpdateRequest","type","description","is_nullable","is_unique","is_indexed","is_visible","is_primary_key","is_readonly","field_order","default_value","alignment","decimals","currency_format","selectable_items","multiple_selections","phone_format","date_format","time_format","timezone","vector_dimension","applyDefaultValues","column","Error","createColumnDefinition","getColumnTypeDisplayName","text","number","currency","checkbox","dropdown","email","link","json","vector","halfvec","sparsevec","textField","numberField","currencyField","dropdownField","items","selection_source","vectorField","dimension","jsonField","dateTimeField","emailField","longTextField","linkField","phoneNumberField","format","checkboxField","halfVectorField","sparseVectorField","createBasicSchema","map","index","apiKey","BolticClient"],"mappings":"6HAoBO,MAAMA,EAMX,WAAAC,CAAYC,GAHZC,KAAQC,aAAmC,CAAA,EAC3CD,KAAQE,WAAkC,CAAA,EAGxCF,KAAKG,UAAYJ,EAAQI,UACzBH,KAAKI,eAAiBL,EAAQK,cAChC,CAKA,KAAAC,CAAMC,GAEJ,OADAN,KAAKC,aAAaI,MAAQ,IAAKL,KAAKC,aAAaI,SAAUC,GACpDN,IACT,CAKA,OAAAO,CACEC,EACAC,EAA4B,OAM5B,OAJKT,KAAKC,aAAaS,OACrBV,KAAKC,aAAaS,KAAO,IAE3BV,KAAKC,aAAaS,KAAKC,KAAK,CAAEH,QAAOI,MAAOH,IACrCT,IACT,CAKA,KAAAa,CAAMC,GAEJ,OADAd,KAAKC,aAAaY,MAAQC,EACnBd,IACT,CAKA,MAAAe,CAAOD,GAEL,OADAd,KAAKC,aAAac,OAASD,EACpBd,IACT,CAKA,MAAAgB,CAAOC,GAEL,OADAjB,KAAKC,aAAagB,OAASA,EACpBjB,IACT,CAKA,GAAAkB,CAAIC,GAEF,OADAnB,KAAKE,WAAa,IAAKF,KAAKE,cAAeiB,GACpCnB,IACT,CAKA,aAAMoB,GAGJ,OAAOpB,KAAKI,eAAegB,QAAQpB,KAAKG,UAAWH,KAAKC,aAC1D,CAKA,SAAMoB,SAGJ,OAAK,OAAAC,EAAAtB,KAAKC,aAAaI,gBAAOkB,MASvBvB,KAAKI,eAAeiB,IACzBrB,KAAKG,UACLH,KAAKC,aAAaI,MAAMkB,MAVjB,CACLC,MAAO,CACLC,KAAM,sBACNC,QAAS,6CASjB,CAKA,YAAMC,SAGJ,OAAK,OAAAL,EAAAtB,KAAKC,aAAaI,gBAAOkB,MASvBvB,KAAKI,eAAeuB,OACzB3B,KAAKG,UACLH,KAAKC,aAAaI,MAAMkB,KACxBvB,KAAKE,Y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WACNE,aAAa,EACbI,gBAAgB,EAChBH,WAAW,EACXE,YAAY,EACZE,aAAa,EACbH,YAAY,EACZI,YAAa,EACbC,eAAe,KACZ1C,EAEP,CAKA,sBAAOqF,CACL7D,EACAoD,EACA5E,EAAoC,CAAA,GAEpC,MAAO,CACLwB,OACAS,KAAM,UACNE,aAAa,EACbI,gBAAgB,EAChBH,WAAW,EACXE,YAAY,EACZE,aAAa,EACbH,YAAY,EACZI,YAAa,EACbW,iBAAkBwB,KACf5E,EAEP,CAKA,wBAAOsF,CACL9D,EACAoD,EACA5E,EAAoC,CAAA,GAEpC,MAAO,CACLwB,OACAS,KAAM,YACNE,aAAa,EACbI,gBAAgB,EAChBH,WAAW,EACXE,YAAY,EACZE,aAAa,EACbH,YAAY,EACZI,YAAa,EACbW,iBAAkBwB,KACf5E,EAEP,CAKA,wBAAOuF,CACLrE,GAEA,OAAOA,EAAOsE,IAAI,CAAC/E,EAAOgF,KAAA,CACxBjE,KAAMf,EAAMe,KACZS,KAAMxB,EAAMwB,KACZE,aAAa,EACbI,gBAAgB,EAChBH,WAAW,EACXE,YAAY,EACZE,aAAa,EACbH,YAAY,EACZI,YAAagD,EAAQ,IAEzB,mBCjNqB,6BC1HhB,SACLC,EACA1F,EAAyB,IAEzB,OAAO,IAAI2F,EAAAA,aAAaD,EAAQ1F,EAClC,8BJ0KO,SACLA,GAEA,OAAO,IAAIF,EAAcE,EAC3B"}
|
|
1
|
+
{"version":3,"file":"index.js","sources":["../src/client/resources/column-builder.ts","../src/utils/column/helpers.ts","../src/utils/table/schema-helpers.ts","../src/index.ts","../src/client/index.ts"],"sourcesContent":["import {\n ColumnDetails,\n ColumnQueryOptions,\n ColumnUpdateRequest,\n} from '../../types/api/column';\nimport {\n BolticErrorResponse,\n BolticListResponse,\n BolticSuccessResponse,\n} from '../../types/common/responses';\nimport { ColumnResource } from './column';\n\nexport interface ColumnBuilderOptions {\n tableName: string;\n columnResource: ColumnResource;\n}\n\n/**\n * Column Builder - provides a fluent interface for building column queries and operations\n */\nexport class ColumnBuilder {\n private tableName: string;\n private columnResource: ColumnResource;\n private queryOptions: ColumnQueryOptions = {};\n private updateData: ColumnUpdateRequest = {};\n\n constructor(options: ColumnBuilderOptions) {\n this.tableName = options.tableName;\n this.columnResource = options.columnResource;\n }\n\n /**\n * Add filter conditions\n */\n where(conditions: Partial<ColumnQueryOptions['where']>): ColumnBuilder {\n this.queryOptions.where = { ...this.queryOptions.where, ...conditions };\n return this;\n }\n\n /**\n * Set sorting\n */\n orderBy(\n field: keyof ColumnDetails,\n direction: 'asc' | 'desc' = 'asc'\n ): ColumnBuilder {\n if (!this.queryOptions.sort) {\n this.queryOptions.sort = [];\n }\n this.queryOptions.sort.push({ field, order: direction });\n return this;\n }\n\n /**\n * Set limit\n */\n limit(count: number): ColumnBuilder {\n this.queryOptions.limit = count;\n return this;\n }\n\n /**\n * Set offset\n */\n offset(count: number): ColumnBuilder {\n this.queryOptions.offset = count;\n return this;\n }\n\n /**\n * Set fields to select\n */\n select(fields: Array<keyof ColumnDetails>): ColumnBuilder {\n this.queryOptions.fields = fields;\n return this;\n }\n\n /**\n * Set data for update operations\n */\n set(data: ColumnUpdateRequest): ColumnBuilder {\n this.updateData = { ...this.updateData, ...data };\n return this;\n }\n\n /**\n * Execute findAll operation\n */\n async findAll(): Promise<\n BolticListResponse<ColumnDetails> | BolticErrorResponse\n > {\n return this.columnResource.findAll(this.tableName, this.queryOptions);\n }\n\n /**\n * Execute get operation (was findOne) - requires column name\n */\n async get(): Promise<\n BolticSuccessResponse<ColumnDetails> | BolticErrorResponse\n > {\n if (!this.queryOptions.where?.name) {\n return {\n error: {\n code: 'MISSING_COLUMN_NAME',\n message: 'Column name is required for get operation',\n },\n };\n }\n\n return this.columnResource.get(\n this.tableName,\n this.queryOptions.where.name as string\n );\n }\n\n /**\n * Execute update operation - requires column name\n */\n async update(): Promise<\n BolticSuccessResponse<ColumnDetails> | BolticErrorResponse\n > {\n if (!this.queryOptions.where?.name) {\n return {\n error: {\n code: 'MISSING_COLUMN_NAME',\n message: 'Column name is required for update operation',\n },\n };\n }\n\n return this.columnResource.update(\n this.tableName,\n this.queryOptions.where.name as string,\n this.updateData\n );\n }\n\n /**\n * Execute delete operation - requires column name\n */\n async delete(): Promise<\n | BolticSuccessResponse<{ success: boolean; message?: string }>\n | BolticErrorResponse\n > {\n if (!this.queryOptions.where?.name) {\n return {\n error: {\n code: 'MISSING_COLUMN_NAME',\n message: 'Column name is required for delete operation',\n },\n };\n }\n\n return this.columnResource.delete(\n this.tableName,\n this.queryOptions.where.name as string\n );\n }\n\n /**\n * Get the built query options (for debugging)\n */\n getQueryOptions(): ColumnQueryOptions {\n return { ...this.queryOptions };\n }\n\n /**\n * Get the update data (for debugging)\n */\n getUpdateData(): ColumnUpdateRequest {\n return { ...this.updateData };\n }\n}\n\n/**\n * Create a new column builder\n */\nexport function createColumnBuilder(\n options: ColumnBuilderOptions\n): ColumnBuilder {\n return new ColumnBuilder(options);\n}\n","import {\n ColumnUpdateRequest,\n DateFormatEnum,\n DecimalType,\n PhoneFormatType,\n TimeFormatEnum,\n} from '../../types/api/column';\nimport { FieldDefinition, FieldType } from '../../types/api/table';\n\nexport class ColumnHelpers {\n /**\n * Convert FieldDefinition to ColumnUpdateRequest\n */\n static fieldToUpdateRequest(field: FieldDefinition): ColumnUpdateRequest {\n return {\n name: field.name,\n type: field.type,\n description: field.description,\n is_nullable: field.is_nullable,\n is_unique: field.is_unique,\n is_indexed: field.is_indexed,\n is_visible: field.is_visible,\n is_primary_key: field.is_primary_key,\n is_readonly: field.is_readonly,\n field_order: field.field_order,\n default_value: field.default_value,\n alignment: field.alignment,\n decimals: field.decimals as DecimalType,\n currency_format: field.currency_format,\n selectable_items: field.selectable_items,\n multiple_selections: field.multiple_selections,\n phone_format: field.phone_format as PhoneFormatType,\n date_format: field.date_format as keyof typeof DateFormatEnum,\n time_format: field.time_format as keyof typeof TimeFormatEnum,\n timezone: field.timezone,\n vector_dimension: field.vector_dimension,\n show_decrypted: field.show_decrypted,\n is_deterministic: field.is_deterministic,\n };\n }\n\n /**\n * Apply default values to column definition\n */\n static applyDefaultValues(column: Partial<FieldDefinition>): FieldDefinition {\n if (!column.name || !column.type) {\n throw new Error('Column name and type are required');\n }\n\n return {\n name: column.name,\n type: column.type,\n is_nullable: true,\n is_unique: false,\n is_indexed: false,\n is_primary_key: false,\n is_visible: true,\n is_readonly: false,\n field_order: 1,\n alignment: 'left',\n multiple_selections: false,\n ...column,\n };\n }\n\n /**\n * Create a column definition with proper defaults\n */\n static createColumnDefinition(\n name: string,\n type: FieldType,\n options: Partial<FieldDefinition> = {}\n ): FieldDefinition {\n return this.applyDefaultValues({\n name,\n type,\n ...options,\n });\n }\n\n /**\n * Get column type display name\n */\n static getColumnTypeDisplayName(type: FieldType): string {\n const typeNames: Record<FieldType, string> = {\n text: 'Text',\n 'long-text': 'Long Text',\n number: 'Number',\n currency: 'Currency',\n checkbox: 'Checkbox',\n dropdown: 'Dropdown',\n email: 'Email',\n 'phone-number': 'Phone Number',\n link: 'Link',\n json: 'JSON',\n 'date-time': 'Date & Time',\n vector: 'Vector',\n halfvec: 'Half Vector',\n sparsevec: 'Sparse Vector',\n encrypted: 'Encrypted',\n };\n\n return typeNames[type] || type;\n }\n}\n","import { FieldDefinition, FieldType } from '../../types/api/table';\n\nexport class SchemaHelpers {\n /**\n * Create a text field definition\n */\n static textField(\n name: string,\n options: Partial<FieldDefinition> = {}\n ): FieldDefinition {\n return {\n name,\n type: 'text',\n is_nullable: true,\n is_primary_key: false,\n is_unique: false,\n is_visible: true,\n is_readonly: false,\n is_indexed: false,\n field_order: 1,\n ...options,\n };\n }\n\n /**\n * Create a number field definition\n */\n static numberField(\n name: string,\n options: Partial<FieldDefinition> = {}\n ): FieldDefinition {\n return {\n name,\n type: 'number',\n is_nullable: true,\n is_primary_key: false,\n is_unique: false,\n is_visible: true,\n is_readonly: false,\n is_indexed: false,\n field_order: 1,\n decimals: '0.00',\n ...options,\n };\n }\n\n /**\n * Create a currency field definition\n */\n static currencyField(\n name: string,\n currency: string = 'USD',\n options: Partial<FieldDefinition> = {}\n ): FieldDefinition {\n return {\n name,\n type: 'currency',\n is_nullable: true,\n is_primary_key: false,\n is_unique: false,\n is_visible: true,\n is_readonly: false,\n is_indexed: false,\n field_order: 1,\n decimals: '0.00',\n currency_format: currency,\n ...options,\n };\n }\n\n /**\n * Create a dropdown field definition\n */\n static dropdownField(\n name: string,\n items: string[],\n options: Partial<FieldDefinition> = {}\n ): FieldDefinition {\n return {\n name,\n type: 'dropdown',\n is_nullable: true,\n is_primary_key: false,\n is_unique: false,\n is_visible: true,\n is_readonly: false,\n is_indexed: false,\n field_order: 1,\n selection_source: 'provide-static-list',\n selectable_items: items,\n multiple_selections: false,\n ...options,\n };\n }\n\n /**\n * Create a vector field definition\n */\n static vectorField(\n name: string,\n dimension: number,\n options: Partial<FieldDefinition> = {}\n ): FieldDefinition {\n return {\n name,\n type: 'vector',\n is_nullable: true,\n is_primary_key: false,\n is_unique: false,\n is_visible: true,\n is_readonly: false,\n is_indexed: false,\n field_order: 1,\n vector_dimension: dimension,\n ...options,\n };\n }\n\n /**\n * Create a JSON field definition\n */\n static jsonField(\n name: string,\n options: Partial<FieldDefinition> = {}\n ): FieldDefinition {\n return {\n name,\n type: 'json',\n is_nullable: true,\n is_primary_key: false,\n is_unique: false,\n is_visible: true,\n is_readonly: false,\n is_indexed: false,\n field_order: 1,\n ...options,\n };\n }\n\n /**\n * Create a date-time field definition\n */\n static dateTimeField(\n name: string,\n options: Partial<FieldDefinition> = {}\n ): FieldDefinition {\n return {\n name,\n type: 'date-time',\n is_nullable: true,\n is_primary_key: false,\n is_unique: false,\n is_visible: true,\n is_readonly: false,\n is_indexed: false,\n field_order: 1,\n date_format: 'YYYY-MM-DD',\n time_format: 'HH:mm:ss',\n ...options,\n };\n }\n\n /**\n * Create an email field definition\n */\n static emailField(\n name: string,\n options: Partial<FieldDefinition> = {}\n ): FieldDefinition {\n return {\n name,\n type: 'email',\n is_nullable: true,\n is_primary_key: false,\n is_unique: false,\n is_visible: true,\n is_readonly: false,\n is_indexed: false,\n field_order: 1,\n ...options,\n };\n }\n\n /**\n * Create a long-text field definition\n */\n static longTextField(\n name: string,\n options: Partial<FieldDefinition> = {}\n ): FieldDefinition {\n return {\n name,\n type: 'long-text',\n is_nullable: true,\n is_primary_key: false,\n is_unique: false,\n is_visible: true,\n is_readonly: false,\n is_indexed: false,\n field_order: 1,\n ...options,\n };\n }\n\n /**\n * Create a link field definition\n */\n static linkField(\n name: string,\n options: Partial<FieldDefinition> = {}\n ): FieldDefinition {\n return {\n name,\n type: 'link',\n is_nullable: true,\n is_primary_key: false,\n is_unique: false,\n is_visible: true,\n is_readonly: false,\n is_indexed: false,\n field_order: 1,\n ...options,\n };\n }\n\n /**\n * Create a phone number field definition\n */\n static phoneNumberField(\n name: string,\n format: string = 'international',\n options: Partial<FieldDefinition> = {}\n ): FieldDefinition {\n return {\n name,\n type: 'phone-number',\n is_nullable: true,\n is_primary_key: false,\n is_unique: false,\n is_visible: true,\n is_readonly: false,\n is_indexed: false,\n field_order: 1,\n phone_format: format,\n ...options,\n };\n }\n\n /**\n * Create a checkbox field definition\n */\n static checkboxField(\n name: string,\n options: Partial<FieldDefinition> = {}\n ): FieldDefinition {\n return {\n name,\n type: 'checkbox',\n is_nullable: true,\n is_primary_key: false,\n is_unique: false,\n is_visible: true,\n is_readonly: false,\n is_indexed: false,\n field_order: 1,\n default_value: false,\n ...options,\n };\n }\n\n /**\n * Create a half-vector field definition\n */\n static halfVectorField(\n name: string,\n dimension: number,\n options: Partial<FieldDefinition> = {}\n ): FieldDefinition {\n return {\n name,\n type: 'halfvec',\n is_nullable: true,\n is_primary_key: false,\n is_unique: false,\n is_visible: true,\n is_readonly: false,\n is_indexed: false,\n field_order: 1,\n vector_dimension: dimension,\n ...options,\n };\n }\n\n /**\n * Create a sparse vector field definition\n */\n static sparseVectorField(\n name: string,\n dimension: number,\n options: Partial<FieldDefinition> = {}\n ): FieldDefinition {\n return {\n name,\n type: 'sparsevec',\n is_nullable: true,\n is_primary_key: false,\n is_unique: false,\n is_visible: true,\n is_readonly: false,\n is_indexed: false,\n field_order: 1,\n vector_dimension: dimension,\n ...options,\n };\n }\n\n /**\n * Create a basic schema from field definitions\n */\n static createBasicSchema(\n fields: Array<{ name: string; type: FieldType }>\n ): FieldDefinition[] {\n return fields.map((field, index) => ({\n name: field.name,\n type: field.type,\n is_nullable: true,\n is_primary_key: false,\n is_unique: false,\n is_visible: true,\n is_readonly: false,\n is_indexed: false,\n field_order: index + 1,\n }));\n }\n}\n","// Main SDK exports\nexport { BolticClient, createClient } from './client';\nexport type { ClientOptions } from './client';\n\n// Type exports for external use\nexport type {\n ColumnDetails,\n ColumnQueryOptions,\n ColumnUpdateRequest,\n} from './types/api/column';\nexport type {\n DatabaseCreateRequest,\n DatabaseDeletionJobResponse,\n DatabaseDeletionStatusResponse,\n DatabaseJobAction,\n DatabaseJobListRequest,\n DatabaseJobQueryOptions,\n DatabaseJobRecord,\n DatabaseJobStatus,\n DatabaseListQueryParams,\n DatabaseListRequest,\n DatabaseQueryOptions,\n DatabaseRecord,\n DatabaseStatus,\n DatabaseUpdateRequest,\n FilterParams,\n PaginationMetadata,\n PaginationParams,\n SortParams,\n} from './types/api/database';\nexport type {\n AddIndexRequest,\n AddIndexResponse,\n DeleteIndexRequest,\n DeleteIndexResponse,\n ListIndexesQuery,\n ListIndexesResponse,\n} from './types/api/index';\nexport type {\n RecordData,\n RecordDeleteOptions,\n RecordQueryOptions,\n RecordWithId,\n} from './types/api/record';\nexport type {\n FieldDefinition,\n TableCreateRequest,\n TableRecord,\n TableUpdateRequest,\n} from './types/api/table';\n\n// Response types and helpers - Essential for type checking\nexport { isErrorResponse, isListResponse } from './types/common/responses';\nexport type {\n ApiResponse,\n BolticErrorResponse,\n BolticListResponse,\n BolticSuccessResponse,\n BulkResponse,\n ErrorResponse,\n QueryOptions,\n SuccessResponse,\n} from './types/common/responses';\n\n// Pagination and operation types\nexport type { PaginationInfo } from './types/common/operations';\n\n// Utility classes for schema and column management\nexport { ColumnHelpers } from './utils/column/helpers';\nexport { SchemaHelpers } from './utils/table/schema-helpers';\n\n// Filter utilities and constants\nexport {\n FILTER_OPERATORS,\n FilterBuilder,\n buildApiFilters,\n createFilter,\n mapFiltersToWhere,\n mapWhereToFilters,\n normalizeFilters,\n} from './utils/filters/filter-mapper';\nexport type { ApiFilter } from './utils/filters/filter-mapper';\n\n// Builder creation functions\nexport { createColumnBuilder } from './client/resources/column-builder';\nexport { createRecordBuilder } from './client/resources/record-builder';\nexport { createTableBuilder } from './client/resources/table-builder';\n\n// Error handling utilities\nexport {\n ApiError,\n ValidationError,\n createErrorWithContext,\n formatError,\n getHttpStatusCode,\n isNetworkError,\n} from './errors/utils';\nexport type { ValidationFailure } from './errors/utils';\n\n// HTTP adapter types for advanced users\nexport type {\n HttpAdapter,\n HttpRequestConfig,\n HttpResponse,\n} from './utils/http/adapter';\n\n// Testing utilities for SDK users\nexport {\n createErrorResponse,\n createMockResponse,\n createTestClient,\n} from './testing/test-client';\nexport type { MockClientOptions } from './testing/test-client';\n\n// Export all errors\nexport * from './errors';\n\n// Export all types\nexport * from './types';\n\n// SQL exports\nexport * from './client/resources/sql';\n\n// Version information\nexport const VERSION = '1.0.0';\n","import { BolticClient, ClientOptions } from './boltic-client';\n\nexport function createClient(\n apiKey: string,\n options: ClientOptions = {}\n): BolticClient {\n return new BolticClient(apiKey, options);\n}\n\nexport type { Region } from '../types/config/environment';\nexport * from './core/auth-manager';\nexport * from './core/base-client';\nexport * from './core/base-resource';\nexport * from './core/config';\nexport * from './resources/database';\nexport * from './resources/record';\nexport * from './resources/record-builder';\nexport * from './resources/table';\nexport {\n createTableBuilder,\n TableBuilder,\n type TableBuilderOptions,\n} from './resources/table-builder';\nexport { BolticClient };\nexport type { ClientOptions };\n"],"names":["ColumnBuilder","constructor","options","this","queryOptions","updateData","tableName","columnResource","where","conditions","orderBy","field","direction","sort","push","order","limit","count","offset","select","fields","set","data","findAll","get","name","error","code","message","update","delete","getQueryOptions","getUpdateData","fieldToUpdateRequest","type","description","is_nullable","is_unique","is_indexed","is_visible","is_primary_key","is_readonly","field_order","default_value","alignment","decimals","currency_format","selectable_items","multiple_selections","phone_format","date_format","time_format","timezone","vector_dimension","show_decrypted","is_deterministic","applyDefaultValues","column","Error","createColumnDefinition","getColumnTypeDisplayName","text","number","currency","checkbox","dropdown","email","link","json","vector","halfvec","sparsevec","encrypted","textField","numberField","currencyField","dropdownField","items","selection_source","vectorField","dimension","jsonField","dateTimeField","emailField","longTextField","linkField","phoneNumberField","format","checkboxField","halfVectorField","sparseVectorField","createBasicSchema","map","index","apiKey","BolticClient"],"mappings":"6HAoBO,MAAMA,EAMX,WAAAC,CAAYC,GAHZC,KAAQC,aAAmC,CAAA,EAC3CD,KAAQE,WAAkC,CAAA,EAGxCF,KAAKG,UAAYJ,EAAQI,UACzBH,KAAKI,eAAiBL,EAAQK,cAChC,CAKA,KAAAC,CAAMC,GAEJ,OADAN,KAAKC,aAAaI,MAAQ,IAAKL,KAAKC,aAAaI,SAAUC,GACpDN,IACT,CAKA,OAAAO,CACEC,EACAC,EAA4B,OAM5B,OAJKT,KAAKC,aAAaS,OACrBV,KAAKC,aAAaS,KAAO,IAE3BV,KAAKC,aAAaS,KAAKC,KAAK,CAAEH,QAAOI,MAAOH,IACrCT,IACT,CAKA,KAAAa,CAAMC,GAEJ,OADAd,KAAKC,aAAaY,MAAQC,EACnBd,IACT,CAKA,MAAAe,CAAOD,GAEL,OADAd,KAAKC,aAAac,OAASD,EACpBd,IACT,CAKA,MAAAgB,CAAOC,GAEL,OADAjB,KAAKC,aAAagB,OAASA,EACpBjB,IACT,CAKA,GAAAkB,CAAIC,GAEF,OADAnB,KAAKE,WAAa,IAAKF,KAAKE,cAAeiB,GACpCnB,IACT,CAKA,aAAMoB,GAGJ,OAAOpB,KAAKI,eAAegB,QAAQpB,KAAKG,UAAWH,KAAKC,aAC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