@boltic/sdk 0.0.7 → 0.0.9

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.
@@ -105,10 +105,44 @@ export declare class BolticClient {
105
105
  private recordResource;
106
106
  private sqlResource;
107
107
  private indexResource;
108
+ private databaseResource;
108
109
  private currentDatabase;
109
110
  private clientOptions;
110
111
  constructor(apiKey: string, options?: ClientOptions);
112
+ /**
113
+ * Get current database context
114
+ */
111
115
  getCurrentDatabase(): DatabaseContext | null;
116
+ /**
117
+ * Switch to a different database using its internal name (slug).
118
+ * All subsequent operations will use this database.
119
+ *
120
+ * If no internal name is provided, the SDK will switch back to the default database.
121
+ *
122
+ * @param dbInternalName - Database internal name/slug to switch to. If omitted or empty, default DB is used.
123
+ *
124
+ * @example
125
+ * ```typescript
126
+ * // Switch to a specific database by slug
127
+ * await client.useDatabase('my_database_slug');
128
+ *
129
+ * // Switch back to default database
130
+ * await client.useDatabase();
131
+ * ```
132
+ */
133
+ useDatabase(dbInternalName?: string): Promise<void>;
134
+ get databases(): {
135
+ create: (data: DatabaseCreateRequest) => Promise<BolticErrorResponse | BolticSuccessResponse<DatabaseRecord>>;
136
+ findAll: (options?: DatabaseQueryOptions) => Promise<BolticErrorResponse | BolticListResponse<DatabaseRecord>>;
137
+ findOne: (dbInternalName: string, options?: {
138
+ fields?: string[];
139
+ }) => Promise<BolticErrorResponse | BolticSuccessResponse<DatabaseRecord>>;
140
+ getDefault: () => Promise<BolticErrorResponse | BolticSuccessResponse<DatabaseRecord>>;
141
+ update: (dbInternalName: string, data: DatabaseUpdateRequest) => Promise<BolticErrorResponse | BolticSuccessResponse<DatabaseRecord>>;
142
+ delete: (dbInternalName: string) => Promise<BolticErrorResponse | BolticSuccessResponse<DatabaseDeletionJobResponse>>;
143
+ listJobs: (options?: DatabaseJobQueryOptions) => Promise<BolticErrorResponse | BolticListResponse<DatabaseJobRecord>>;
144
+ pollDeleteStatus: (jobId: string) => Promise<BolticErrorResponse | BolticSuccessResponse<DatabaseDeletionStatusResponse>>;
145
+ };
112
146
  get tables(): {
113
147
  create: (data: TableCreateRequest) => Promise<BolticSuccessResponse<TableCreateResponse>>;
114
148
  findAll: (options?: TableQueryOptions) => Promise<ApiResponse<TableRecord>>;
@@ -116,8 +150,8 @@ export declare class BolticClient {
116
150
  findByName: (name: string) => Promise<BolticErrorResponse | BolticSuccessResponse<TableRecord | null>>;
117
151
  findOne: (options: TableQueryOptions) => Promise<BolticErrorResponse | BolticSuccessResponse<TableRecord | null>>;
118
152
  update: (name: string, data: TableUpdateRequest) => Promise<BolticErrorResponse | BolticSuccessResponse<TableRecord>>;
119
- delete: (name: string) => Promise<BolticErrorResponse | BolticSuccessResponse< {
120
- message: string;
153
+ delete: (name: string) => Promise<BolticErrorResponse | BolticSuccessResponse<{
154
+ message: string;
121
155
  }>>;
122
156
  rename: (oldName: string, newName: string) => Promise<BolticSuccessResponse<TableRecord>>;
123
157
  setAccess: (request: {
@@ -132,9 +166,9 @@ export declare class BolticClient {
132
166
  findOne: (tableName: string, columnName: string) => Promise<BolticErrorResponse | BolticSuccessResponse<ColumnDetails>>;
133
167
  findById: (tableName: string, columnId: string) => Promise<BolticErrorResponse | BolticSuccessResponse<ColumnDetails>>;
134
168
  update: (tableName: string, columnName: string, updates: ColumnUpdateRequest) => Promise<BolticErrorResponse | BolticSuccessResponse<ColumnDetails>>;
135
- delete: (tableName: string, columnName: string) => Promise<BolticErrorResponse | BolticSuccessResponse< {
136
- success: boolean;
137
- message?: string | undefined;
169
+ delete: (tableName: string, columnName: string) => Promise<BolticErrorResponse | BolticSuccessResponse<{
170
+ success: boolean;
171
+ message?: string | undefined;
138
172
  }>>;
139
173
  };
140
174
  get indexes(): {
@@ -144,15 +178,10 @@ export declare class BolticClient {
144
178
  };
145
179
  table(name: string): TableBuilder;
146
180
  from(tableName: string): {
147
- columns: () => {
148
- create: (column: FieldDefinition) => Promise<BolticErrorResponse | BolticSuccessResponse<ColumnRecord>>;
149
- findAll: (options?: ColumnQueryOptions) => Promise<BolticErrorResponse | BolticListResponse<ColumnDetails>>;
150
- get: (columnName: string) => Promise<BolticErrorResponse | BolticSuccessResponse<ColumnDetails>>;
151
- update: (columnName: string, updates: ColumnUpdateRequest) => Promise<BolticErrorResponse | BolticSuccessResponse<ColumnDetails>>;
152
- delete: (columnName: string) => Promise<BolticErrorResponse | BolticSuccessResponse< {
153
- success: boolean;
154
- message?: string | undefined;
155
- }>>;
181
+ indexes: () => {
182
+ addIndex: (payload: AddIndexRequest) => Promise<BolticErrorResponse | BolticSuccessResponse<AddIndexResponse>>;
183
+ listIndexes: (query: ListIndexesQuery) => Promise<BolticErrorResponse | BolticSuccessResponse<ListIndexesResponse>>;
184
+ deleteIndex: (indexName: string) => Promise<BolticErrorResponse | BolticSuccessResponse<DeleteIndexResponse>>;
156
185
  };
157
186
  records: () => {
158
187
  insert: (data: RecordData) => Promise<BolticErrorResponse | BolticSuccessResponse<RecordWithId>>;
@@ -162,19 +191,13 @@ export declare class BolticClient {
162
191
  findOne: (recordId: string) => Promise<BolticErrorResponse | BolticSuccessResponse<RecordWithId>>;
163
192
  update: (options: RecordUpdateOptions) => Promise<BolticErrorResponse | BolticListResponse<RecordWithId>>;
164
193
  updateById: (recordId: string, data: RecordData) => Promise<BolticErrorResponse | BolticSuccessResponse<RecordWithId>>;
165
- delete: (options: RecordDeleteOptions) => Promise<BolticErrorResponse | BolticSuccessResponse< {
166
- message: string;
194
+ delete: (options: RecordDeleteOptions) => Promise<BolticErrorResponse | BolticSuccessResponse<{
195
+ message: string;
167
196
  }>>;
168
- deleteById: (recordId: string) => Promise<BolticErrorResponse | BolticSuccessResponse< {
169
- message: string;
197
+ deleteById: (recordId: string) => Promise<BolticErrorResponse | BolticSuccessResponse<{
198
+ message: string;
170
199
  }>>;
171
200
  };
172
- record: () => RecordBuilder;
173
- indexes: () => {
174
- addIndex: (payload: AddIndexRequest) => Promise<BolticErrorResponse | BolticSuccessResponse<AddIndexResponse>>;
175
- listIndexes: (query: ListIndexesQuery) => Promise<BolticErrorResponse | BolticSuccessResponse<ListIndexesResponse>>;
176
- deleteIndex: (indexName: string) => Promise<BolticErrorResponse | BolticSuccessResponse<DeleteIndexResponse>>;
177
- };
178
201
  };
179
202
  get records(): {
180
203
  insert: (tableName: string, data: RecordData) => Promise<BolticErrorResponse | BolticSuccessResponse<RecordWithId>>;
@@ -182,14 +205,18 @@ export declare class BolticClient {
182
205
  validation?: boolean;
183
206
  }) => Promise<RecordBulkInsertResponse | BolticErrorResponse>;
184
207
  findAll: (tableName: string, options?: RecordQueryOptions) => Promise<BolticErrorResponse | BolticListResponse<RecordWithId>>;
185
- findOne: (tableName: string, recordId: string) => Promise<BolticErrorResponse | BolticSuccessResponse<RecordWithId>>;
208
+ findOne: (tableName: string, recordId: string, options?: {
209
+ show_decrypted?: boolean;
210
+ }) => Promise<BolticErrorResponse | BolticSuccessResponse<RecordWithId>>;
186
211
  update: (tableName: string, options: RecordUpdateOptions) => Promise<BolticErrorResponse | BolticListResponse<RecordWithId>>;
187
- updateById: (tableName: string, recordId: string, data: RecordData) => Promise<BolticErrorResponse | BolticSuccessResponse<RecordWithId>>;
188
- delete: (tableName: string, options: RecordDeleteOptions) => Promise<BolticErrorResponse | BolticSuccessResponse< {
189
- message: string;
212
+ updateById: (tableName: string, recordId: string, data: RecordData, options?: {
213
+ show_decrypted?: boolean;
214
+ }) => Promise<BolticErrorResponse | BolticSuccessResponse<RecordWithId>>;
215
+ delete: (tableName: string, options: RecordDeleteOptions) => Promise<BolticErrorResponse | BolticSuccessResponse<{
216
+ message: string;
190
217
  }>>;
191
- deleteById: (tableName: string, recordId: string) => Promise<BolticErrorResponse | BolticSuccessResponse< {
192
- message: string;
218
+ deleteById: (tableName: string, recordId: string) => Promise<BolticErrorResponse | BolticSuccessResponse<{
219
+ message: string;
193
220
  }>>;
194
221
  };
195
222
  record(tableName: string): RecordBuilder;
@@ -328,6 +355,8 @@ declare interface ColumnDetails {
328
355
  multiple_selections?: boolean;
329
356
  phone_format?: string;
330
357
  vector_dimension?: number;
358
+ show_decrypted?: boolean;
359
+ is_deterministic?: boolean;
331
360
  }
332
361
 
333
362
  declare interface ColumnQueryOptions {
@@ -378,6 +407,8 @@ declare interface ColumnUpdateRequest {
378
407
  time_format?: keyof typeof TimeFormatEnum;
379
408
  timezone?: string;
380
409
  vector_dimension?: number;
410
+ show_decrypted?: boolean;
411
+ is_deterministic?: boolean;
381
412
  }
382
413
 
383
414
  export declare function createClient(apiKey: string, options?: ClientOptions): BolticClient;
@@ -391,7 +422,126 @@ export declare function createClient(apiKey: string, options?: ClientOptions): B
391
422
  export declare function createErrorWithContext(message: string, context?: Record<string, unknown>): Error;
392
423
 
393
424
  declare interface DatabaseContext {
394
- databaseName: string;
425
+ databaseId?: string;
426
+ dbInternalName?: string;
427
+ }
428
+
429
+ /**
430
+ * Request to create a new database
431
+ */
432
+ declare interface DatabaseCreateRequest {
433
+ db_name: string;
434
+ db_internal_name?: string;
435
+ resource_id?: string;
436
+ }
437
+
438
+ /**
439
+ * Database deletion job initial response
440
+ */
441
+ declare interface DatabaseDeletionJobResponse {
442
+ job_id: string;
443
+ db_id: string;
444
+ status: 'pending';
445
+ }
446
+
447
+ /**
448
+ * Database deletion status response
449
+ */
450
+ declare interface DatabaseDeletionStatusResponse {
451
+ jobId: string;
452
+ status: DatabaseJobStatus;
453
+ message: string;
454
+ }
455
+
456
+ /**
457
+ * Database Job action enum
458
+ */
459
+ declare type DatabaseJobAction = 'DELETE';
460
+
461
+ /**
462
+ * Database job query options for SDK methods
463
+ */
464
+ declare interface DatabaseJobQueryOptions {
465
+ deleted_by_me?: boolean;
466
+ page?: PaginationParams;
467
+ sort?: SortParams[];
468
+ filters?: FilterParams[];
469
+ fields?: string[];
470
+ }
471
+
472
+ /**
473
+ * Database job record from API
474
+ */
475
+ declare interface DatabaseJobRecord {
476
+ id: string;
477
+ account_id: string;
478
+ resource_id: string;
479
+ type: string;
480
+ action: DatabaseJobAction;
481
+ db_id: string;
482
+ db_internal_name: string;
483
+ db_username: string;
484
+ job_status: DatabaseJobStatus;
485
+ total_dbs: number;
486
+ successful_dbs: number;
487
+ failed_dbs: number;
488
+ error: string | null;
489
+ is_read: boolean;
490
+ created_by: string;
491
+ created_at: string;
492
+ updated_at: string;
493
+ }
494
+
495
+ /**
496
+ * Database Job status enum
497
+ */
498
+ declare type DatabaseJobStatus = 'pending' | 'in_progress' | 'success' | 'failed';
499
+
500
+ /**
501
+ * Database query options for SDK methods
502
+ */
503
+ declare interface DatabaseQueryOptions {
504
+ connector_id?: string;
505
+ add_default_if_missing?: boolean;
506
+ page?: PaginationParams;
507
+ sort?: SortParams[];
508
+ filters?: FilterParams[];
509
+ fields?: string[];
510
+ }
511
+
512
+ /**
513
+ * Database record from API
514
+ */
515
+ declare interface DatabaseRecord {
516
+ id: string;
517
+ account_id: string;
518
+ db_name: string;
519
+ db_internal_name: string;
520
+ db_username: string;
521
+ resource_id: string;
522
+ status: DatabaseStatus;
523
+ is_default: boolean;
524
+ rank: number;
525
+ created_by: string;
526
+ updated_by: string;
527
+ created_at: string;
528
+ updated_at: string;
529
+ }
530
+
531
+ /**
532
+ * Database Management API Types
533
+ * Based on DATABASE_MANAGEMENT_API_CONTRACT.md
534
+ */
535
+ /**
536
+ * Database status enum
537
+ */
538
+ declare type DatabaseStatus = 'ACTIVE' | 'INACTIVE';
539
+
540
+ /**
541
+ * Request to update a database
542
+ */
543
+ declare interface DatabaseUpdateRequest {
544
+ db_name: string;
395
545
  }
396
546
 
397
547
  declare const DateFormatEnum: Readonly<{
@@ -425,10 +575,8 @@ declare interface EnvironmentConfig {
425
575
  declare type ErrorInterceptor = (error: unknown) => unknown | Promise<unknown>;
426
576
 
427
577
  declare interface ExecuteSQLApiResponse {
428
- data: [
429
- Record<string, unknown>[],
430
- unknown
431
- ];
578
+ data: Record<string, unknown>[];
579
+ count?: number;
432
580
  pagination?: {
433
581
  total_count: number;
434
582
  total_pages: number;
@@ -467,9 +615,20 @@ export declare interface FieldDefinition {
467
615
  multiple_selections?: boolean;
468
616
  phone_format?: string;
469
617
  vector_dimension?: number;
618
+ show_decrypted?: boolean;
619
+ is_deterministic?: boolean;
470
620
  }
471
621
 
472
- export declare type FieldType = 'text' | 'long-text' | 'number' | 'currency' | 'checkbox' | 'dropdown' | 'email' | 'phone-number' | 'link' | 'json' | 'date-time' | 'vector' | 'halfvec' | 'sparsevec';
622
+ export declare type FieldType = 'text' | 'long-text' | 'number' | 'currency' | 'checkbox' | 'dropdown' | 'email' | 'phone-number' | 'link' | 'json' | 'date-time' | 'vector' | 'halfvec' | 'sparsevec' | 'encrypted';
623
+
624
+ /**
625
+ * Filter parameters
626
+ */
627
+ declare interface FilterParams {
628
+ field: string;
629
+ operator: string;
630
+ values: any[];
631
+ }
473
632
 
474
633
  /**
475
634
  * Formats error for logging/debugging
@@ -574,6 +733,14 @@ declare interface ListIndexesResponse {
574
733
  };
575
734
  }
576
735
 
736
+ /**
737
+ * Pagination parameters
738
+ */
739
+ declare interface PaginationParams {
740
+ page_no?: number;
741
+ page_size?: number;
742
+ }
743
+
577
744
  declare type PhoneFormatType = '+91 123 456 7890' | '(123) 456-7890' | '+1 (123) 456-7890' | '+91 12 3456 7890';
578
745
 
579
746
  export declare interface QueryOperator<T = unknown> {
@@ -735,37 +902,43 @@ declare class RecordResource {
735
902
  /**
736
903
  * Insert a single record
737
904
  */
738
- insert(tableName: string, data: RecordData): Promise<BolticSuccessResponse<RecordWithId> | BolticErrorResponse>;
905
+ insert(tableName: string, data: RecordData, dbId?: string): Promise<BolticSuccessResponse<RecordWithId> | BolticErrorResponse>;
739
906
  /**
740
907
  * Insert multiple records in bulk
741
908
  */
742
- insertMany(tableName: string, records: RecordData[], options?: RecordBulkInsertOptions): Promise<RecordBulkInsertResponse | BolticErrorResponse>;
909
+ insertMany(tableName: string, records: RecordData[], options?: RecordBulkInsertOptions, dbId?: string): Promise<RecordBulkInsertResponse | BolticErrorResponse>;
743
910
  /**
744
911
  * Get a single record by ID
745
912
  */
746
- get(tableName: string, recordId: string): Promise<BolticSuccessResponse<RecordWithId> | BolticErrorResponse>;
913
+ get(tableName: string, recordId: string, optionsOrDbId?: {
914
+ show_decrypted?: boolean;
915
+ dbId?: string;
916
+ } | string, dbId?: string): Promise<BolticSuccessResponse<RecordWithId> | BolticErrorResponse>;
747
917
  /**
748
918
  * List records with filtering and pagination
749
919
  */
750
- list(tableName: string, options?: RecordQueryOptions): Promise<BolticListResponse<RecordWithId> | BolticErrorResponse>;
920
+ list(tableName: string, options?: RecordQueryOptions, dbId?: string): Promise<BolticListResponse<RecordWithId> | BolticErrorResponse>;
751
921
  /**
752
922
  * Update records by filters
753
923
  */
754
- update(tableName: string, options: RecordUpdateOptions): Promise<BolticListResponse<RecordWithId> | BolticErrorResponse>;
924
+ update(tableName: string, options: RecordUpdateOptions, dbId?: string): Promise<BolticListResponse<RecordWithId> | BolticErrorResponse>;
755
925
  /**
756
926
  * Update a single record by ID
757
927
  */
758
- updateById(tableName: string, recordId: string, data: RecordData): Promise<BolticSuccessResponse<RecordWithId> | BolticErrorResponse>;
928
+ updateById(tableName: string, recordId: string, data: RecordData, optionsOrDbId?: {
929
+ show_decrypted?: boolean;
930
+ dbId?: string;
931
+ } | string, dbId?: string): Promise<BolticSuccessResponse<RecordWithId> | BolticErrorResponse>;
759
932
  /**
760
933
  * Unified delete method that supports both record IDs and filters
761
934
  */
762
- delete(tableName: string, options: RecordDeleteOptions): Promise<BolticSuccessResponse<{
935
+ delete(tableName: string, options: RecordDeleteOptions, dbId?: string): Promise<BolticSuccessResponse<{
763
936
  message: string;
764
937
  }> | BolticErrorResponse>;
765
938
  /**
766
939
  * Delete a single record by ID
767
940
  */
768
- deleteById(tableName: string, recordId: string): Promise<BolticSuccessResponse<{
941
+ deleteById(tableName: string, recordId: string, dbId?: string): Promise<BolticSuccessResponse<{
769
942
  message: string;
770
943
  }> | BolticErrorResponse>;
771
944
  /**
@@ -783,6 +956,7 @@ declare interface RecordUpdateOptions {
783
956
  set: RecordData;
784
957
  filters: ApiFilter[] | Record<string, unknown>[];
785
958
  fields?: string[];
959
+ show_decrypted?: boolean;
786
960
  }
787
961
 
788
962
  export declare interface RecordWithId extends RecordData {
@@ -802,6 +976,14 @@ export declare interface ServiceAuthConfig extends AuthConfig {
802
976
  serviceEndpoint?: string;
803
977
  }
804
978
 
979
+ /**
980
+ * Sort parameters
981
+ */
982
+ declare interface SortParams {
983
+ field: string;
984
+ direction: 'asc' | 'desc';
985
+ }
986
+
805
987
  declare class SqlResource {
806
988
  private sqlApiClient;
807
989
  constructor(client: BaseClient);
@@ -814,7 +996,7 @@ declare class SqlResource {
814
996
  * @returns AsyncIterable<string> for streaming SQL generation
815
997
  *
816
998
  */
817
- textToSQL(prompt: string, options?: TextToSQLOptions): Promise<AsyncIterable<string>>;
999
+ textToSQL(prompt: string, options?: TextToSQLOptions, dbId?: string): Promise<AsyncIterable<string>>;
818
1000
  /**
819
1001
  * Execute SQL query with built-in safety measures and performance optimization
820
1002
  *
@@ -822,7 +1004,7 @@ declare class SqlResource {
822
1004
  * @returns Promise<ExecuteSQLApiResponse> with raw API response following Boltic API Response Structure
823
1005
  *
824
1006
  */
825
- executeSQL(query: string): Promise<ExecuteSQLApiResponse | BolticErrorResponse>;
1007
+ executeSQL(query: string, dbId?: string): Promise<ExecuteSQLApiResponse | BolticErrorResponse>;
826
1008
  }
827
1009
 
828
1010
  /**
@@ -995,6 +1177,7 @@ declare interface TableBuilderOptions {
995
1177
  declare interface TableCreateOptions {
996
1178
  is_ai_generated_schema?: boolean;
997
1179
  is_template?: boolean;
1180
+ db_id?: string;
998
1181
  }
999
1182
 
1000
1183
  export declare interface TableCreateRequest {
@@ -1015,6 +1198,7 @@ declare interface TableListOptions extends TableQueryOptions {
1015
1198
  page?: number;
1016
1199
  pageSize?: number;
1017
1200
  isShared?: boolean;
1201
+ db_id?: string;
1018
1202
  }
1019
1203
 
1020
1204
  declare interface TableQueryOptions {
@@ -1083,6 +1267,7 @@ declare class TablesApiClient {
1083
1267
  */
1084
1268
  getTable(tableId: string, options?: {
1085
1269
  fields?: Array<keyof TableRecord>;
1270
+ db_id?: string;
1086
1271
  }): Promise<BolticSuccessResponse_2<TableRecord> | BolticErrorResponse_2>;
1087
1272
  /**
1088
1273
  * Update an existing table
@@ -1092,11 +1277,14 @@ declare class TablesApiClient {
1092
1277
  description?: string;
1093
1278
  is_shared?: boolean;
1094
1279
  fields?: Array<keyof TableRecord>;
1280
+ db_id?: string;
1095
1281
  }): Promise<BolticSuccessResponse_2<TableRecord> | BolticErrorResponse_2>;
1096
1282
  /**
1097
1283
  * Delete a table
1098
1284
  */
1099
- deleteTable(tableId: string): Promise<BolticSuccessResponse_2<{
1285
+ deleteTable(tableId: string, options?: {
1286
+ db_id?: string;
1287
+ }): Promise<BolticSuccessResponse_2<{
1100
1288
  message: string;
1101
1289
  }> | BolticErrorResponse_2>;
1102
1290
  private buildHeaders;
package/package.json CHANGED
@@ -1,82 +1,85 @@
1
1
  {
2
- "name": "@boltic/sdk",
3
- "version": "0.0.7",
4
- "description": "TypeScript SDK for Boltic databases infrastructure",
5
- "main": "dist/sdk.js",
6
- "module": "dist/sdk.mjs",
7
- "types": "dist/types/index.d.ts",
8
- "license": "MIT",
9
- "engines": {
10
- "node": ">=18.0.0",
11
- "npm": ">=8.0.0"
12
- },
13
- "exports": {
14
- ".": {
15
- "import": "./dist/sdk.mjs",
16
- "require": "./dist/sdk.js",
17
- "types": "./dist/types/index.d.ts"
18
- }
19
- },
20
- "files": [
21
- "dist/",
22
- "README.md",
23
- "LICENSE"
24
- ],
25
- "sideEffects": false,
26
- "keywords": [
27
- "boltic",
28
- "sdk",
29
- "typescript",
30
- "api",
31
- "database",
32
- "auth"
33
- ],
34
- "repository": {
35
- "type": "git",
36
- "url": "https://github.com/bolticio/boltic-sdk.git"
37
- },
38
- "scripts": {
39
- "build": "vite build && node scripts/build.js",
40
- "dev": "vite build --watch",
41
- "test": "vitest",
42
- "test:ui": "vitest --ui",
43
- "test:coverage": "vitest --coverage",
44
- "test:module": "node scripts/test-module-imports.js",
45
- "type-check": "tsc --noEmit",
46
- "lint": "eslint \"src/**/*.{ts,tsx}\"",
47
- "lint:fix": "eslint \"src/**/*.{ts,tsx}\" --fix",
48
- "format": "prettier --write src tests examples docs",
49
- "docs:generate": "typedoc src/index.ts",
50
- "docs:serve": "npx serve docs/api",
51
- "publish:branch": "npm run build && npm publish --tag $(git branch --show-current | sed 's/[^a-zA-Z0-9]/-/g')",
52
- "publish:latest": "npm run build && npm publish",
53
- "release": "npm run build && npm run test && npm publish",
54
- "prepublishOnly": "npm run build"
55
- },
56
- "devDependencies": {
57
- "@types/node": "^20.0.0",
58
- "@typescript-eslint/eslint-plugin": "^6.21.0",
59
- "@typescript-eslint/parser": "^6.0.0",
60
- "@vitest/ui": "^1.0.0",
61
- "eslint": "^8.0.0",
62
- "eslint-config-prettier": "^9.0.0",
63
- "eslint-plugin-prettier": "^5.0.0",
64
- "jsdom": "^26.1.0",
65
- "lint-staged": "^15.0.0",
66
- "prettier": "^3.0.0",
67
- "terser": "^5.0.0",
68
- "typedoc": "^0.25.0",
69
- "typescript": "^5.0.0",
70
- "vite": "^5.0.0",
71
- "vite-plugin-dts": "^3.0.0",
72
- "vitest": "^1.0.0"
73
- },
74
- "peerDependencies": {
75
- "axios": "^1.0.0"
76
- },
77
- "peerDependenciesMeta": {
78
- "axios": {
79
- "optional": true
80
- }
2
+ "name": "@boltic/sdk",
3
+ "version": "0.0.9",
4
+ "description": "TypeScript SDK for Boltic databases infrastructure",
5
+ "main": "dist/sdk.js",
6
+ "module": "dist/sdk.mjs",
7
+ "types": "dist/types/index.d.ts",
8
+ "license": "MIT",
9
+ "engines": {
10
+ "node": ">=18.0.0",
11
+ "npm": ">=8.0.0"
12
+ },
13
+ "exports": {
14
+ ".": {
15
+ "types": "./dist/types/index.d.ts",
16
+ "import": "./dist/sdk.mjs",
17
+ "require": "./dist/sdk.js"
81
18
  }
82
- }
19
+ },
20
+ "files": [
21
+ "dist/",
22
+ "README.md",
23
+ "LICENSE"
24
+ ],
25
+ "sideEffects": false,
26
+ "keywords": [
27
+ "boltic",
28
+ "sdk",
29
+ "typescript",
30
+ "api",
31
+ "database",
32
+ "auth"
33
+ ],
34
+ "repository": {
35
+ "type": "git",
36
+ "url": "https://github.com/bolticio/boltic-sdk.git"
37
+ },
38
+ "scripts": {
39
+ "build": "vite build && node scripts/build.js",
40
+ "dev": "vite build --watch",
41
+ "test": "vitest",
42
+ "test:ui": "vitest --ui",
43
+ "test:coverage": "vitest --coverage",
44
+ "test:module": "node scripts/test-module-imports.js",
45
+ "type-check": "tsc --noEmit",
46
+ "lint": "eslint \"src/**/*.{ts,tsx}\"",
47
+ "lint:fix": "eslint \"src/**/*.{ts,tsx}\" --fix",
48
+ "format": "prettier --write src tests examples docs",
49
+ "docs:generate": "typedoc src/index.ts",
50
+ "docs:serve": "npx serve docs/api",
51
+ "publish:branch": "npm run build && npm publish --tag $(git branch --show-current | sed 's/[^a-zA-Z0-9]/-/g')",
52
+ "publish:latest": "npm run build && npm publish",
53
+ "release": "npm run build && npm run test && npm publish",
54
+ "prepublishOnly": "npm run build"
55
+ },
56
+ "devDependencies": {
57
+ "@types/node": "^20.0.0",
58
+ "@typescript-eslint/eslint-plugin": "^6.21.0",
59
+ "@typescript-eslint/parser": "^6.0.0",
60
+ "@vitest/ui": "^4.0.16",
61
+ "eslint": "^8.0.0",
62
+ "eslint-config-prettier": "^9.0.0",
63
+ "eslint-plugin-prettier": "^5.0.0",
64
+ "jsdom": "^26.1.0",
65
+ "lint-staged": "^15.0.0",
66
+ "prettier": "^3.0.0",
67
+ "terser": "^5.0.0",
68
+ "typedoc": "^0.25.0",
69
+ "typescript": "^5.0.0",
70
+ "vite": "^7.3.0",
71
+ "vite-plugin-dts": "^4.5.4",
72
+ "vitest": "^4.0.16"
73
+ },
74
+ "peerDependencies": {
75
+ "axios": "^1.0.0"
76
+ },
77
+ "peerDependenciesMeta": {
78
+ "axios": {
79
+ "optional": true
80
+ }
81
+ },
82
+ "dependencies": {
83
+ "dotenv": "^17.2.3"
84
+ }
85
+ }