@flashbacktech/flashbackclient 0.2.58 → 0.2.60

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.
@@ -235,8 +235,8 @@ export declare class ApiClient implements IApiClient {
235
235
  nodeRegister: (data: RegisterRequest) => Promise<RegisterResponse>;
236
236
  nodeUnregister: (data: RegisterRequest) => Promise<RegisterResponse>;
237
237
  getSystemEvents: (data: SystemEventQueryRequest) => Promise<SystemEventQueryResponse>;
238
- markSystemEventAsRead: (systemEventLogId: number) => Promise<SystemEventReadStatusResponse>;
239
- markSystemEventAsUnread: (systemEventLogId: number) => Promise<SystemEventReadStatusResponse>;
238
+ markSystemEventAsRead: (systemEventLogId: number | number[]) => Promise<SystemEventReadStatusResponse>;
239
+ markSystemEventAsUnread: (systemEventLogId: number | number[]) => Promise<SystemEventReadStatusResponse>;
240
240
  createAiLlm: (data: CreateAiLlmRequest) => Promise<CreateAiLlmResponse>;
241
241
  getAiLlms: (workspaceId?: string) => Promise<GetAiLlmsResponse>;
242
242
  getAiLlmStats: (aiLlmId?: string) => Promise<AiLlmStatsResponse>;
@@ -582,10 +582,16 @@ class ApiClient {
582
582
  return this.makeRequest('systemevent', 'POST', data);
583
583
  };
584
584
  this.markSystemEventAsRead = async (systemEventLogId) => {
585
- return this.makeRequest(`systemevent/${systemEventLogId}/read`, 'POST', null);
585
+ const body = Array.isArray(systemEventLogId)
586
+ ? { ids: systemEventLogId }
587
+ : { id: systemEventLogId };
588
+ return this.makeRequest('systemevent/read', 'POST', body);
586
589
  };
587
590
  this.markSystemEventAsUnread = async (systemEventLogId) => {
588
- return this.makeRequest(`systemevent/${systemEventLogId}/read`, 'DELETE', null);
591
+ const body = Array.isArray(systemEventLogId)
592
+ ? { ids: systemEventLogId }
593
+ : { id: systemEventLogId };
594
+ return this.makeRequest('systemevent/read', 'DELETE', body);
589
595
  };
590
596
  ////// AI LLM API calls
591
597
  this.createAiLlm = async (data) => {
@@ -47,6 +47,14 @@ export interface PasskeyChallengeOptions {
47
47
  userVerification?: 'required' | 'preferred' | 'discouraged';
48
48
  timeout?: number;
49
49
  }
50
+ export interface PasskeyCredentialDescriptor {
51
+ id: string;
52
+ type?: 'public-key';
53
+ transports?: Array<'ble' | 'hybrid' | 'internal' | 'nfc' | 'usb'>;
54
+ }
55
+ export interface PasskeyAuthenticationOptions extends PasskeyChallengeOptions {
56
+ allowCredentials?: PasskeyCredentialDescriptor[];
57
+ }
50
58
  export interface PasskeyRegistrationOptions extends PasskeyChallengeOptions {
51
59
  rp: {
52
60
  name: string;
@@ -175,13 +183,16 @@ export interface MagicLinkSetupData {
175
183
  verificationRequired: boolean;
176
184
  }
177
185
  export interface PasskeySetupData {
178
- challenge: PasskeyRegistrationOptions;
186
+ challenge: string;
179
187
  rpName: string;
180
188
  userName: string;
189
+ rpID?: string;
190
+ origin?: string;
191
+ userId?: string;
181
192
  }
182
193
  export interface PasskeyAuthOptionsResult {
183
194
  success: boolean;
184
- data?: PasskeyChallengeOptions;
195
+ data?: PasskeyAuthenticationOptions;
185
196
  error?: string;
186
197
  }
187
198
  export interface PasskeyCompleteRegistrationResult {
@@ -238,7 +249,7 @@ export type MFADisableResponse = APIResponse<MFADisableResult>;
238
249
  export type MFAPrimaryResponse = APIResponse<MFAPrimaryResult>;
239
250
  export type MFAResetResponse = APIResponse<MFAResetResult>;
240
251
  export type MFAOrganizationEnforceResponse = APIResponse<MFAOrganizationEnforceResult>;
241
- export type PasskeyAuthOptionsResponse = APIResponse<PasskeyChallengeOptions>;
252
+ export type PasskeyAuthOptionsResponse = APIResponse<PasskeyAuthenticationOptions>;
242
253
  export type PasskeyCompleteRegistrationResponse = APIResponse<PasskeyCompleteRegistrationResult>;
243
254
  export type MagicLinkSendResponse = APIResponse<{
244
255
  message: string;
@@ -32,6 +32,11 @@ export interface SystemEventQueryResponse {
32
32
  skip: number;
33
33
  take: number;
34
34
  }
35
+ /** Request body for mark-as-read / mark-as-unread: single id or array of ids. */
36
+ export interface SystemEventReadIdsRequest {
37
+ id?: number;
38
+ ids?: number[];
39
+ }
35
40
  /** Response for mark-as-read / mark-as-unread. */
36
41
  export interface SystemEventReadStatusResponse {
37
42
  success: boolean;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@flashbacktech/flashbackclient",
3
- "version": "0.2.58",
3
+ "version": "0.2.60",
4
4
  "type": "commonjs",
5
5
  "publishConfig": {
6
6
  "access": "public"
@@ -25,7 +25,7 @@
25
25
  "license": "MIT",
26
26
  "dependencies": {
27
27
  "@aws-sdk/client-sts": "^3.777.0",
28
- "@flashbacktech/flashbackclient": "^0.2.21",
28
+ "@flashbacktech/flashbackclient": "^0.2.58",
29
29
  "@google-cloud/storage": "^7.15.0",
30
30
  "@stellar/stellar-sdk": "^14.0.0",
31
31
  "formdata-node": "^6.0.3",