@bitbitpress/client 0.1.3 → 0.1.4

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/README.md CHANGED
@@ -43,7 +43,9 @@ More details can also be found in your control room's API docs @ https://your-co
43
43
  - [User Methods](#user-methods)
44
44
  - [authenticate](#authenticate)
45
45
  - [token](#token)
46
+ - [profile](#profile)
46
47
  - [recommendations](#recommendations)
48
+ - [report](#report)
47
49
  - [signal](#signal)
48
50
  - [synthesizeItem](#synthesizeitem)
49
51
  - [synthesize](#synthesize)
@@ -151,6 +153,32 @@ console.log('Access token:', tokenResponse.accessToken);
151
153
 
152
154
  ---
153
155
 
156
+ #### profile
157
+
158
+ Get user profile information, including suggested interest topics.
159
+
160
+ ```typescript
161
+ client.user.profile(): Promise<ProfileResponse>
162
+ ```
163
+
164
+ ##### Returns
165
+
166
+ - `Promise<ProfileResponse>`: Response containing:
167
+ - `suggestedInterestTopics?: string[]`: Suggested interest topics for the user
168
+
169
+ ##### Example
170
+
171
+ ```typescript
172
+ const profile = await client.user.profile();
173
+ console.log('Suggested topics:', profile.suggestedInterestTopics);
174
+ ```
175
+
176
+ ##### Throws
177
+
178
+ - `Error`: If the request fails or no data is returned
179
+
180
+ ---
181
+
154
182
  #### recommendations
155
183
 
156
184
  Get recommended articles for the authenticated user.
@@ -197,6 +225,38 @@ console.log('Next cursor:', recommendations.cursor);
197
225
 
198
226
  ---
199
227
 
228
+ #### report
229
+
230
+ Report a bit (create a user-provided bit to be ingested into the system). This may include news or any other content that the user wants to share.
231
+
232
+ ```typescript
233
+ client.user.report(options: ReportRequest): Promise<ReportResponse>
234
+ ```
235
+
236
+ ##### Parameters
237
+
238
+ - `options.title` (optional): Title of the reported content
239
+ - `options.content` (required): Content body of the report
240
+
241
+ ##### Returns
242
+
243
+ - `Promise<ReportResponse>`: Response containing the report data
244
+
245
+ ##### Example
246
+
247
+ ```typescript
248
+ await client.user.report({
249
+ title: 'Breaking News: Important Update',
250
+ content: 'This is the content of the news article or bit that the user wants to share.',
251
+ });
252
+ ```
253
+
254
+ ##### Throws
255
+
256
+ - `Error`: If the request fails or no data is returned
257
+
258
+ ---
259
+
200
260
  #### signal
201
261
 
202
262
  Record a user signal (e.g., clicked topic, read article) to inform profile interests. Signals are used to power a user's recommendations.
@@ -431,6 +491,14 @@ type RecommendationsRequest = {
431
491
  }
432
492
  ```
433
493
 
494
+ #### ProfileResponse
495
+
496
+ ```typescript
497
+ type ProfileResponse = {
498
+ suggestedInterestTopics?: string[];
499
+ }
500
+ ```
501
+
434
502
  #### RecommendationsResponse
435
503
 
436
504
  ```typescript
@@ -448,6 +516,21 @@ type RecommendationsResponse = {
448
516
  }
449
517
  ```
450
518
 
519
+ #### ReportRequest
520
+
521
+ ```typescript
522
+ type ReportRequest = {
523
+ title?: string;
524
+ content: string;
525
+ }
526
+ ```
527
+
528
+ #### ReportResponse
529
+
530
+ ```typescript
531
+ type ReportResponse = unknown;
532
+ ```
533
+
451
534
  #### SignalRequest
452
535
 
453
536
  ```typescript
@@ -115,6 +115,104 @@ export interface paths {
115
115
  patch?: never;
116
116
  trace?: never;
117
117
  };
118
+ "/v1/user/profile": {
119
+ parameters: {
120
+ query?: never;
121
+ header?: never;
122
+ path?: never;
123
+ cookie?: never;
124
+ };
125
+ /**
126
+ * Get User Profile
127
+ * @description **GET** `/app/v1/user/profile` Returns information relevant for the user's profile.
128
+ */
129
+ get: {
130
+ parameters: {
131
+ query?: never;
132
+ header: {
133
+ /** @description Bearer token for authentication */
134
+ authorization: string;
135
+ };
136
+ path?: never;
137
+ cookie?: never;
138
+ };
139
+ requestBody?: never;
140
+ responses: {
141
+ /** @description Successful response */
142
+ 200: {
143
+ headers: {
144
+ [name: string]: unknown;
145
+ };
146
+ content: {
147
+ "application/json": {
148
+ /** @example true */
149
+ success?: boolean;
150
+ /** @description User profile related information */
151
+ data?: {
152
+ /**
153
+ * @description Suggested interest topics for the user
154
+ * @example [
155
+ * "Technology",
156
+ * "Science",
157
+ * "Business"
158
+ * ]
159
+ */
160
+ suggestedInterestTopics?: string[];
161
+ };
162
+ };
163
+ };
164
+ };
165
+ /** @description Bad request - missing or invalid parameters */
166
+ 400: {
167
+ headers: {
168
+ [name: string]: unknown;
169
+ };
170
+ content: {
171
+ "application/json": {
172
+ /** @example Bad request */
173
+ error?: string;
174
+ };
175
+ };
176
+ };
177
+ /** @description Unauthorized errors */
178
+ 401: {
179
+ headers: {
180
+ [name: string]: unknown;
181
+ };
182
+ content: {
183
+ "application/json": {
184
+ /**
185
+ * @example Unauthorized: No authentication token provided
186
+ * @enum {string}
187
+ */
188
+ error?: "Unauthorized: No authentication token provided" | "Unauthorized: Token has expired" | "Unauthorized: Invalid token" | "Unauthorized: Authentication failed";
189
+ };
190
+ };
191
+ };
192
+ /** @description Internal server error */
193
+ 500: {
194
+ headers: {
195
+ [name: string]: unknown;
196
+ };
197
+ content: {
198
+ "application/json": {
199
+ /** @example false */
200
+ success?: boolean;
201
+ /** @example Internal server error: An unknown error occurred */
202
+ error?: string;
203
+ };
204
+ };
205
+ };
206
+ };
207
+ };
208
+ put?: never;
209
+ post?: never;
210
+ delete?: never;
211
+ options?: never;
212
+ head?: never;
213
+ patch?: never;
214
+ trace?: never;
215
+ };
118
216
  "/v1/user/recommendations": {
119
217
  parameters: {
120
218
  query?: never;
@@ -230,6 +328,102 @@ export interface paths {
230
328
  patch?: never;
231
329
  trace?: never;
232
330
  };
331
+ "/v1/user/report": {
332
+ parameters: {
333
+ query?: never;
334
+ header?: never;
335
+ path?: never;
336
+ cookie?: never;
337
+ };
338
+ get?: never;
339
+ put?: never;
340
+ /**
341
+ * Report Bit
342
+ * @description **POST** `/v1/user/report` Creates a user-provided bit to be ingested into the system. This may include news or any other content that the user wants to share.
343
+ */
344
+ post: {
345
+ parameters: {
346
+ query?: never;
347
+ header: {
348
+ /** @description Bearer token for authentication */
349
+ authorization: string;
350
+ };
351
+ path?: never;
352
+ cookie?: never;
353
+ };
354
+ requestBody: {
355
+ content: {
356
+ "application/json": {
357
+ /** @description Title of the reported content */
358
+ title?: string;
359
+ /** @description Content body of the report */
360
+ content: string;
361
+ };
362
+ };
363
+ };
364
+ responses: {
365
+ /** @description Successful response */
366
+ 200: {
367
+ headers: {
368
+ [name: string]: unknown;
369
+ };
370
+ content: {
371
+ "application/json": {
372
+ /** @example true */
373
+ success?: boolean;
374
+ data?: unknown;
375
+ };
376
+ };
377
+ };
378
+ /** @description Bad request - missing or invalid parameters */
379
+ 400: {
380
+ headers: {
381
+ [name: string]: unknown;
382
+ };
383
+ content: {
384
+ "application/json": {
385
+ /** @example Bad request */
386
+ error?: string;
387
+ };
388
+ };
389
+ };
390
+ /** @description Unauthorized errors */
391
+ 401: {
392
+ headers: {
393
+ [name: string]: unknown;
394
+ };
395
+ content: {
396
+ "application/json": {
397
+ /**
398
+ * @example Unauthorized: No authentication token provided
399
+ * @enum {string}
400
+ */
401
+ error?: "Unauthorized: No authentication token provided" | "Unauthorized: Token has expired" | "Unauthorized: Invalid token" | "Unauthorized: Authentication failed";
402
+ };
403
+ };
404
+ };
405
+ /** @description Internal server error */
406
+ 500: {
407
+ headers: {
408
+ [name: string]: unknown;
409
+ };
410
+ content: {
411
+ "application/json": {
412
+ /** @example false */
413
+ success?: boolean;
414
+ /** @example Internal server error: An unknown error occurred */
415
+ error?: string;
416
+ };
417
+ };
418
+ };
419
+ };
420
+ };
421
+ delete?: never;
422
+ options?: never;
423
+ head?: never;
424
+ patch?: never;
425
+ trace?: never;
426
+ };
233
427
  "/v1/user/signal": {
234
428
  parameters: {
235
429
  query?: never;
package/dist/index.d.ts CHANGED
@@ -10,6 +10,8 @@ export type * from './generated/openapi.js';
10
10
  export type { UserMethods } from './user/index.js';
11
11
  export type { SignalRequest, SignalResponse } from './user/signal.js';
12
12
  export type { RecommendationsRequest, RecommendationsResponse } from './user/recommendations.js';
13
+ export type { ProfileResponse } from './user/profile.js';
14
+ export type { ReportRequest, ReportResponse } from './user/report.js';
13
15
  export type { TokenRequest, TokenResponse } from './user/token.js';
14
16
  export type { SynthesizeRequest } from './user/typeDefs.js';
15
17
  export type { SynthesizeEvent } from './user/synthesize.js';
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,YAAY,EAAE,uBAAuB,EAAE,wBAAwB,EAAE,MAAM,aAAa,CAAC;AACrF,OAAO,EAAE,iBAAiB,EAAE,MAAM,aAAa,CAAC;AAGhD,mBAAmB,wBAAwB,CAAC;AAG5C,YAAY,EAAE,WAAW,EAAE,MAAM,iBAAiB,CAAC;AACnD,YAAY,EAAE,aAAa,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AACtE,YAAY,EAAE,sBAAsB,EAAE,uBAAuB,EAAE,MAAM,2BAA2B,CAAC;AACjG,YAAY,EAAE,YAAY,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AACnE,YAAY,EAAE,iBAAiB,EAAE,MAAM,oBAAoB,CAAC;AAC5D,YAAY,EAAE,eAAe,EAAE,MAAM,sBAAsB,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,YAAY,EAAE,uBAAuB,EAAE,wBAAwB,EAAE,MAAM,aAAa,CAAC;AACrF,OAAO,EAAE,iBAAiB,EAAE,MAAM,aAAa,CAAC;AAGhD,mBAAmB,wBAAwB,CAAC;AAG5C,YAAY,EAAE,WAAW,EAAE,MAAM,iBAAiB,CAAC;AACnD,YAAY,EAAE,aAAa,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AACtE,YAAY,EAAE,sBAAsB,EAAE,uBAAuB,EAAE,MAAM,2BAA2B,CAAC;AACjG,YAAY,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAC;AACzD,YAAY,EAAE,aAAa,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AACtE,YAAY,EAAE,YAAY,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AACnE,YAAY,EAAE,iBAAiB,EAAE,MAAM,oBAAoB,CAAC;AAC5D,YAAY,EAAE,eAAe,EAAE,MAAM,sBAAsB,CAAC"}
@@ -1,5 +1,7 @@
1
1
  import type { RequestConfig } from '../request.js';
2
2
  import { type RecommendationsRequest, type RecommendationsResponse } from './recommendations.js';
3
+ import { type ProfileResponse } from './profile.js';
4
+ import { type ReportRequest, type ReportResponse } from './report.js';
3
5
  import { type SignalRequest, type SignalResponse } from './signal.js';
4
6
  import { type SynthesizeEvent } from './synthesize.js';
5
7
  import { type TokenRequest, type TokenResponse } from './token.js';
@@ -24,6 +26,12 @@ export interface UserMethods {
24
26
  * @returns Promise that resolves with the token response containing idToken or accessToken
25
27
  */
26
28
  token(ssoToken: TokenRequest['ssoToken']): Promise<TokenResponse>;
29
+ /**
30
+ * Get user profile information
31
+ *
32
+ * @returns Promise that resolves with user profile data
33
+ */
34
+ profile(): Promise<NonNullable<ProfileResponse>>;
27
35
  /**
28
36
  * Get recommended articles for the authenticated user
29
37
  *
@@ -31,6 +39,13 @@ export interface UserMethods {
31
39
  * @returns Promise that resolves with recommended articles
32
40
  */
33
41
  recommendations(options?: RecommendationsRequest): Promise<NonNullable<RecommendationsResponse>>;
42
+ /**
43
+ * Report a bit (create a user-provided bit to be ingested into the system)
44
+ *
45
+ * @param options - Report request parameters
46
+ * @returns Promise that resolves with report response data
47
+ */
48
+ report(options: ReportRequest): Promise<NonNullable<ReportResponse>>;
34
49
  /**
35
50
  * Record a user signal (e.g. clicked topic, read article) to inform profile interests
36
51
  *
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/user/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,eAAe,CAAC;AAEnD,OAAO,EAEL,KAAK,sBAAsB,EAC3B,KAAK,uBAAuB,EAC7B,MAAM,sBAAsB,CAAC;AAC9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;;;;;OAMG;IACH,cAAc,CAAC,IAAI,EAAE,iBAAiB,CAAC,OAAO,CAAC,CAAC,MAAM,CAAC,GAAG,OAAO,CAAC,OAAO,CAAC,CAAC;CAC5E;AAED;;GAEG;AACH,wBAAgB,iBAAiB,CAAC,MAAM,EAAE,aAAa,EAAE,sBAAsB,GAAE,MAAY,GAAG,WAAW,CAyC1G"}
@@ -3,6 +3,8 @@ Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.createUserMethods = createUserMethods;
4
4
  const batch_manager_js_1 = require("./batch-manager.js");
5
5
  const recommendations_js_1 = require("./recommendations.js");
6
+ const profile_js_1 = require("./profile.js");
7
+ const report_js_1 = require("./report.js");
6
8
  const signal_js_1 = require("./signal.js");
7
9
  const synthesize_js_1 = require("./synthesize.js");
8
10
  const token_js_1 = require("./token.js");
@@ -32,7 +34,9 @@ function createUserMethods(config, synthesizeBatchTimeout = 250) {
32
34
  }
33
35
  },
34
36
  token: (ssoToken) => (0, token_js_1.exchangeToken)(config, ssoToken),
37
+ profile: () => (0, profile_js_1.getProfile)(getConfigWithToken()),
35
38
  recommendations: (options) => (0, recommendations_js_1.getRecommendations)(getConfigWithToken(), options),
39
+ report: (options) => (0, report_js_1.reportBit)(getConfigWithToken(), options),
36
40
  signal: (options) => (0, signal_js_1.recordSignal)(getConfigWithToken(), options),
37
41
  synthesize: (items) => (0, synthesize_js_1.synthesize)(getConfigWithToken(), items),
38
42
  synthesizeItem: (item) => batchManager.addItem(item),
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/user/index.ts"],"names":[],"mappings":";;AAuEA,8CAqCC;AA3GD,yDAA4D;AAC5D,6DAI8B;AAC9B,2CAAoF;AACpF,mDAAmE;AACnE,yCAAkF;AA2DlF;;GAEG;AACH,SAAgB,iBAAiB,CAAC,MAAqB,EAAE,yBAAiC,GAAG;IAC3F,8DAA8D;IAC9D,IAAI,SAA6B,CAAC;IAElC,sDAAsD;IACtD,MAAM,kBA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E,MAAM,EAAE,CAAC,OAAsB,EAAE,EAAE,CAAC,IAAA,wBAAY,EAAC,kBAAkB,EAAE,EAAE,OAAO,CAAC;QAE/E,UAAU,EAAE,CAAC,KAAiC,EAAE,EAAE,CAAC,IAAA,0BAAU,EAAC,kBAAkB,EAAE,EAAE,KAAK,CAAC;QAE1F,cAAc,EAAE,CAAC,IAAwC,EAAoB,EAAE,CAC7E,YAAY,CAAC,OAAO,CAAC,IAAI,CAAC;KAC7B,CAAC;AACJ,CAAC"}
@@ -0,0 +1,11 @@
1
+ import type { paths } from '../generated/openapi.js';
2
+ import type { RequestConfig } from '../request.js';
3
+ export type ProfileResponse = paths['/v1/user/profile']['get']['responses'][200]['content']['application/json']['data'];
4
+ /**
5
+ * Get user profile information
6
+ *
7
+ * @param config - Request configuration with base URL, timeout, fetch, and optional token
8
+ * @returns Promise that resolves with user profile data
9
+ */
10
+ export declare function getProfile(config: RequestConfig): Promise<NonNullable<ProfileResponse>>;
11
+ //# sourceMappingURL=profile.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"profile.d.ts","sourceRoot":"","sources":["../../src/user/profile.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,yBAAyB,CAAC;AACrD,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,eAAe,CAAC;AAInD,MAAM,MAAM,eAAe,GACzB,KAAK,CAAC,kBAAkB,CAAC,CAAC,KAAK,CAAC,CAAC,WAAW,CAAC,CAAC,GAAG,CAAC,CAAC,SAAS,CAAC,CAAC,kBAAkB,CAAC,CAAC,MAAM,CAAC,CAAC;AAE5F;;;;;GAKG;AACH,wBAAsB,UAAU,CAC9B,MAAM,EAAE,aAAa,GACpB,OAAO,CAAC,WAAW,CAAC,eAAe,CAAC,CAAC,CAavC"}
@@ -0,0 +1,21 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.getProfile = getProfile;
4
+ const request_js_1 = require("../request.js");
5
+ /**
6
+ * Get user profile information
7
+ *
8
+ * @param config - Request configuration with base URL, timeout, fetch, and optional token
9
+ * @returns Promise that resolves with user profile data
10
+ */
11
+ async function getProfile(config) {
12
+ const response = await (0, request_js_1.makeRequest)(config, {
13
+ method: 'GET',
14
+ path: '/v1/user/profile',
15
+ });
16
+ if (!response) {
17
+ throw new Error('Failed to get profile: no data in response');
18
+ }
19
+ return response;
20
+ }
21
+ //# sourceMappingURL=profile.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"profile.js","sourceRoot":"","sources":["../../src/user/profile.ts"],"names":[],"mappings":";;AAcA,gCAeC;AA3BD,8CAA4C;AAM5C;;;;;GAKG;AACI,KAAK,UAAU,UAAU,CAC9B,MAAqB;IAErB,MAAM,QAAQ,GAAG,MAAM,IAAA,wBAAW,EAEhC,MAAM,EAAE;QACR,MAAM,EAAE,KAAK;QACb,IAAI,EAAE,kBAAkB;KACzB,CAAC,CAAC;IAEH,IAAI,CAAC,QAAQ,EAAE,CAAC;QACd,MAAM,IAAI,KAAK,CAAC,4CAA4C,CAAC,CAAC;IAChE,CAAC;IAED,OAAO,QAAQ,CAAC;AAClB,CAAC"}
@@ -0,0 +1,13 @@
1
+ import type { paths } from '../generated/openapi.js';
2
+ import type { RequestConfig } from '../request.js';
3
+ export type ReportRequest = paths['/v1/user/report']['post']['requestBody']['content']['application/json'];
4
+ export type ReportResponse = paths['/v1/user/report']['post']['responses'][200]['content']['application/json']['data'];
5
+ /**
6
+ * Report a bit (create a user-provided bit to be ingested into the system)
7
+ *
8
+ * @param config - Request configuration with base URL, timeout, fetch, and optional token
9
+ * @param options - Report request parameters
10
+ * @returns Promise that resolves with report response data
11
+ */
12
+ export declare function reportBit(config: RequestConfig, options: ReportRequest): Promise<NonNullable<ReportResponse>>;
13
+ //# sourceMappingURL=report.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"report.d.ts","sourceRoot":"","sources":["../../src/user/report.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,yBAAyB,CAAC;AACrD,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,eAAe,CAAC;AAInD,MAAM,MAAM,aAAa,GACvB,KAAK,CAAC,iBAAiB,CAAC,CAAC,MAAM,CAAC,CAAC,aAAa,CAAC,CAAC,SAAS,CAAC,CAAC,kBAAkB,CAAC,CAAC;AACjF,MAAM,MAAM,cAAc,GACxB,KAAK,CAAC,iBAAiB,CAAC,CAAC,MAAM,CAAC,CAAC,WAAW,CAAC,CAAC,GAAG,CAAC,CAAC,SAAS,CAAC,CAAC,kBAAkB,CAAC,CAAC,MAAM,CAAC,CAAC;AAE5F;;;;;;GAMG;AACH,wBAAsB,SAAS,CAC7B,MAAM,EAAE,aAAa,EACrB,OAAO,EAAE,aAAa,GACrB,OAAO,CAAC,WAAW,CAAC,cAAc,CAAC,CAAC,CActC"}
@@ -0,0 +1,23 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.reportBit = reportBit;
4
+ const request_js_1 = require("../request.js");
5
+ /**
6
+ * Report a bit (create a user-provided bit to be ingested into the system)
7
+ *
8
+ * @param config - Request configuration with base URL, timeout, fetch, and optional token
9
+ * @param options - Report request parameters
10
+ * @returns Promise that resolves with report response data
11
+ */
12
+ async function reportBit(config, options) {
13
+ const response = await (0, request_js_1.makeRequest)(config, {
14
+ method: 'POST',
15
+ path: '/v1/user/report',
16
+ body: options,
17
+ });
18
+ if (!response) {
19
+ throw new Error('Failed to report bit: no data in response');
20
+ }
21
+ return response;
22
+ }
23
+ //# sourceMappingURL=report.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"report.js","sourceRoot":"","sources":["../../src/user/report.ts"],"names":[],"mappings":";;AAiBA,8BAiBC;AAhCD,8CAA4C;AAQ5C;;;;;;GAMG;AACI,KAAK,UAAU,SAAS,CAC7B,MAAqB,EACrB,OAAsB;IAEtB,MAAM,QAAQ,GAAG,MAAM,IAAA,wBAAW,EAEhC,MAAM,EAAE;QACR,MAAM,EAAE,MAAM;QACd,IAAI,EAAE,iBAAiB;QACvB,IAAI,EAAE,OAAO;KACd,CAAC,CAAC;IAEH,IAAI,CAAC,QAAQ,EAAE,CAAC;QACd,MAAM,IAAI,KAAK,CAAC,2CAA2C,CAAC,CAAC;IAC/D,CAAC;IAED,OAAO,QAAQ,CAAC;AAClB,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@bitbitpress/client",
3
- "version": "0.1.3",
3
+ "version": "0.1.4",
4
4
  "description": "BitBitPress TypeScript client library",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",