skapi-js 1.5.7 → 1.5.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.
package/dist/skapi.d.mts CHANGED
@@ -716,7 +716,7 @@ declare class Skapi {
716
716
  * @param params Request parameters.
717
717
  * @returns A promise that resolves to Promise<ConnectionInfo>.
718
718
  */
719
- getConnectionInfo(params: {
719
+ getConnectionInfo(params?: {
720
720
  refresh: Boolean;
721
721
  }): Promise<ConnectionInfo>;
722
722
  private _updateConnection;
@@ -752,7 +752,7 @@ declare class Skapi {
752
752
  * @param callback Callback invoked for events or updates.
753
753
  * @returns A promise that resolves to Promise<RTCConnector>.
754
754
  */
755
- connectRTC(params: RTCConnectorParams, callback?: (e: RTCEvent) => void): Promise<RTCConnector>;
755
+ connectRTC(params: RTCConnectorParams, callback: (e: RTCEvent) => void): Promise<RTCConnector>;
756
756
  /**
757
757
  * Opens a realtime WebSocket connection and registers a callback for incoming realtime messages.
758
758
  * @param callback Callback invoked for events or updates.
@@ -866,8 +866,9 @@ declare class Skapi {
866
866
  clientSecretRequest(params: {
867
867
  url: string;
868
868
  clientSecretName: string;
869
- poll?: boolean | number;
869
+ poll?: number;
870
870
  expires?: number;
871
+ queue?: string;
871
872
  method: 'GET' | 'POST' | 'DELETE' | 'PUT';
872
873
  headers?: {
873
874
  [key: string]: string;
@@ -889,6 +890,7 @@ declare class Skapi {
889
890
  url: string;
890
891
  method: 'GET' | 'POST' | 'DELETE' | 'PUT';
891
892
  poll?: number;
893
+ queue?: string;
892
894
  }, fetchOptions?: FetchOptions): Promise<DatabaseResponse<PollingResult[]> & {
893
895
  pending: Promise<PollingResult>[];
894
896
  }>;
@@ -913,7 +915,7 @@ declare class Skapi {
913
915
  */
914
916
  getConsumedTickets(params: {
915
917
  ticket_id?: string;
916
- }, fetchOptions: FetchOptions): Promise<DatabaseResponse<any[]>>;
918
+ }, fetchOptions?: FetchOptions): Promise<DatabaseResponse<any[]>>;
917
919
  /**
918
920
  * Lists issued tickets with optional filters and pagination.
919
921
  * @param params Request parameters.
@@ -922,7 +924,7 @@ declare class Skapi {
922
924
  */
923
925
  getTickets(params: {
924
926
  ticket_id?: string;
925
- }, fetchOptions: FetchOptions): Promise<DatabaseResponse<any[]>>;
927
+ }, fetchOptions?: FetchOptions): Promise<DatabaseResponse<any[]>>;
926
928
  /**
927
929
  * Closes the active realtime WebSocket connection.
928
930
  * @returns A promise that resolves to Promise<void>.
@@ -1056,7 +1058,7 @@ declare class Skapi {
1056
1058
  * @returns A promise that resolves to Promise<{ type: 'success', message: string }>.
1057
1059
  */
1058
1060
  joinRealtime(params: {
1059
- group: string | null;
1061
+ group?: string | null;
1060
1062
  }): Promise<{
1061
1063
  type: 'success';
1062
1064
  message: string;
@@ -1110,7 +1112,9 @@ declare class Skapi {
1110
1112
  * @param fetchOptions Pagination and fetch behavior options.
1111
1113
  * @returns A promise that resolves to Promise<DatabaseResponse<RecordData>>.
1112
1114
  */
1113
- getRecords(query: GetRecordQuery, fetchOptions?: FetchOptions): Promise<DatabaseResponse<RecordData>>;
1115
+ getRecords(query: GetRecordQuery & {
1116
+ private_key?: string;
1117
+ }, fetchOptions?: FetchOptions): Promise<DatabaseResponse<RecordData>>;
1114
1118
  /**
1115
1119
  * Lists table metadata with optional table-name filters.
1116
1120
  * @param query Query object used to filter results.
@@ -1164,7 +1168,9 @@ declare class Skapi {
1164
1168
  * @param fetchOptions Pagination and fetch behavior options.
1165
1169
  * @returns A promise that resolves to Promise<string | DatabaseResponse<RecordData>>.
1166
1170
  */
1167
- deleteRecords(params: DelRecordQuery, fetchOptions?: FetchOptions): Promise<string | DatabaseResponse<RecordData>>;
1171
+ deleteRecords(params: DelRecordQuery & {
1172
+ private_key?: string;
1173
+ }, fetchOptions?: FetchOptions): Promise<string | DatabaseResponse<RecordData>>;
1168
1174
  /**
1169
1175
  * Resends the signup confirmation email for the current pending account.
1170
1176
  * @returns A promise that resolves to Promise<'SUCCESS: Signup confirmation e-mail has been sent.'>.
@@ -1325,7 +1331,7 @@ declare class Skapi {
1325
1331
  listPrivateRecordAccess(params: {
1326
1332
  record_id?: string;
1327
1333
  user_id?: string | string[];
1328
- }): Promise<DatabaseResponse<{
1334
+ }, fetchOptions?: FetchOptions): Promise<DatabaseResponse<{
1329
1335
  record_id: string;
1330
1336
  user_id: string;
1331
1337
  }>>;
package/dist/skapi.d.ts CHANGED
@@ -716,7 +716,7 @@ declare class Skapi {
716
716
  * @param params Request parameters.
717
717
  * @returns A promise that resolves to Promise<ConnectionInfo>.
718
718
  */
719
- getConnectionInfo(params: {
719
+ getConnectionInfo(params?: {
720
720
  refresh: Boolean;
721
721
  }): Promise<ConnectionInfo>;
722
722
  private _updateConnection;
@@ -752,7 +752,7 @@ declare class Skapi {
752
752
  * @param callback Callback invoked for events or updates.
753
753
  * @returns A promise that resolves to Promise<RTCConnector>.
754
754
  */
755
- connectRTC(params: RTCConnectorParams, callback?: (e: RTCEvent) => void): Promise<RTCConnector>;
755
+ connectRTC(params: RTCConnectorParams, callback: (e: RTCEvent) => void): Promise<RTCConnector>;
756
756
  /**
757
757
  * Opens a realtime WebSocket connection and registers a callback for incoming realtime messages.
758
758
  * @param callback Callback invoked for events or updates.
@@ -866,8 +866,9 @@ declare class Skapi {
866
866
  clientSecretRequest(params: {
867
867
  url: string;
868
868
  clientSecretName: string;
869
- poll?: boolean | number;
869
+ poll?: number;
870
870
  expires?: number;
871
+ queue?: string;
871
872
  method: 'GET' | 'POST' | 'DELETE' | 'PUT';
872
873
  headers?: {
873
874
  [key: string]: string;
@@ -889,6 +890,7 @@ declare class Skapi {
889
890
  url: string;
890
891
  method: 'GET' | 'POST' | 'DELETE' | 'PUT';
891
892
  poll?: number;
893
+ queue?: string;
892
894
  }, fetchOptions?: FetchOptions): Promise<DatabaseResponse<PollingResult[]> & {
893
895
  pending: Promise<PollingResult>[];
894
896
  }>;
@@ -913,7 +915,7 @@ declare class Skapi {
913
915
  */
914
916
  getConsumedTickets(params: {
915
917
  ticket_id?: string;
916
- }, fetchOptions: FetchOptions): Promise<DatabaseResponse<any[]>>;
918
+ }, fetchOptions?: FetchOptions): Promise<DatabaseResponse<any[]>>;
917
919
  /**
918
920
  * Lists issued tickets with optional filters and pagination.
919
921
  * @param params Request parameters.
@@ -922,7 +924,7 @@ declare class Skapi {
922
924
  */
923
925
  getTickets(params: {
924
926
  ticket_id?: string;
925
- }, fetchOptions: FetchOptions): Promise<DatabaseResponse<any[]>>;
927
+ }, fetchOptions?: FetchOptions): Promise<DatabaseResponse<any[]>>;
926
928
  /**
927
929
  * Closes the active realtime WebSocket connection.
928
930
  * @returns A promise that resolves to Promise<void>.
@@ -1056,7 +1058,7 @@ declare class Skapi {
1056
1058
  * @returns A promise that resolves to Promise<{ type: 'success', message: string }>.
1057
1059
  */
1058
1060
  joinRealtime(params: {
1059
- group: string | null;
1061
+ group?: string | null;
1060
1062
  }): Promise<{
1061
1063
  type: 'success';
1062
1064
  message: string;
@@ -1110,7 +1112,9 @@ declare class Skapi {
1110
1112
  * @param fetchOptions Pagination and fetch behavior options.
1111
1113
  * @returns A promise that resolves to Promise<DatabaseResponse<RecordData>>.
1112
1114
  */
1113
- getRecords(query: GetRecordQuery, fetchOptions?: FetchOptions): Promise<DatabaseResponse<RecordData>>;
1115
+ getRecords(query: GetRecordQuery & {
1116
+ private_key?: string;
1117
+ }, fetchOptions?: FetchOptions): Promise<DatabaseResponse<RecordData>>;
1114
1118
  /**
1115
1119
  * Lists table metadata with optional table-name filters.
1116
1120
  * @param query Query object used to filter results.
@@ -1164,7 +1168,9 @@ declare class Skapi {
1164
1168
  * @param fetchOptions Pagination and fetch behavior options.
1165
1169
  * @returns A promise that resolves to Promise<string | DatabaseResponse<RecordData>>.
1166
1170
  */
1167
- deleteRecords(params: DelRecordQuery, fetchOptions?: FetchOptions): Promise<string | DatabaseResponse<RecordData>>;
1171
+ deleteRecords(params: DelRecordQuery & {
1172
+ private_key?: string;
1173
+ }, fetchOptions?: FetchOptions): Promise<string | DatabaseResponse<RecordData>>;
1168
1174
  /**
1169
1175
  * Resends the signup confirmation email for the current pending account.
1170
1176
  * @returns A promise that resolves to Promise<'SUCCESS: Signup confirmation e-mail has been sent.'>.
@@ -1325,7 +1331,7 @@ declare class Skapi {
1325
1331
  listPrivateRecordAccess(params: {
1326
1332
  record_id?: string;
1327
1333
  user_id?: string | string[];
1328
- }): Promise<DatabaseResponse<{
1334
+ }, fetchOptions?: FetchOptions): Promise<DatabaseResponse<{
1329
1335
  record_id: string;
1330
1336
  user_id: string;
1331
1337
  }>>;