skapi-js 1.8.3 → 2.0.0-rc.1

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
@@ -494,6 +494,10 @@ type RequestHistory = {
494
494
  expires?: number;
495
495
  status: 'pending' | 'running' | 'resolved' | 'failed';
496
496
  queue_name?: string;
497
+ request_text?: string;
498
+ response_text?: string;
499
+ response_complete_marker?: boolean;
500
+ compact?: boolean;
497
501
  poll?: (arg?: {
498
502
  latency?: number;
499
503
  onResponse?: (res: any) => void;
@@ -519,6 +523,8 @@ type FileInfo = {
519
523
  fileKey: string;
520
524
  };
521
525
  type ConnectionInfo = {
526
+ /** Public project ID (service + owner composed into the two-segment token). Empty when the service has no uuid owner. */
527
+ project_id: string;
522
528
  user_ip: string;
523
529
  user_agent: string;
524
530
  user_location: string;
@@ -638,7 +644,7 @@ declare function extractFormData(form: FormData | HTMLFormElement | SubmitEvent
638
644
  file: File;
639
645
  }[];
640
646
  };
641
- declare function decodeServiceId(service: any): {
647
+ declare function decodeProjectId(service: any): {
642
648
  service: any;
643
649
  owner: any;
644
650
  };
@@ -662,6 +668,13 @@ declare class Skapi {
662
668
  private __version;
663
669
  service: string;
664
670
  owner: string;
671
+ /**
672
+ * The public project ID: the single two-segment token composed from service + owner
673
+ * (the same value formatServiceId returns, and the form external tools accept).
674
+ * Empty string when the service has no uuid owner (e.g. host-owned), since the
675
+ * compound form cannot be built without one.
676
+ */
677
+ project_id: string;
665
678
  session: Record<string, any> | null;
666
679
  connection: Connection | null;
667
680
  /**
@@ -729,7 +742,7 @@ declare class Skapi {
729
742
  generateRandom: typeof generateRandom;
730
743
  toBase62: typeof toBase62;
731
744
  fromBase62: typeof fromBase62;
732
- decodeServiceId: typeof decodeServiceId;
745
+ decodeProjectId: typeof decodeProjectId;
733
746
  formatServiceId: typeof formatServiceId;
734
747
  extractFormData: typeof extractFormData;
735
748
  terminatePendingRequests: typeof terminatePendingRequests;
@@ -937,6 +950,15 @@ declare class Skapi {
937
950
  }>;
938
951
  /**
939
952
  * Retrieves the history of client secret requests for a given URL and method.
953
+ *
954
+ * Listing modifiers: `compact` returns lightweight label/marker stubs
955
+ * (request_text, response_text, response_complete_marker) instead of the
956
+ * full request/response bodies, which stay on the server; `queue_exact`
957
+ * restricts a queue listing to exactly the named queue (the queue lookup is
958
+ * otherwise a prefix range, so queue "u1" would also match "u1-bg");
959
+ * `queue_exclude` drops one queue's rows from the listing. Both queue
960
+ * filters are applied server-side after the range read, so a page can come
961
+ * back short while more matches remain - keep paging by startKey/endOfList.
940
962
  * @param params Request parameters.
941
963
  * @param fetchOptions Pagination and fetch behavior options.
942
964
  * @returns A promise that resolves to a paginated list of request history items.
@@ -946,6 +968,9 @@ declare class Skapi {
946
968
  method: 'GET' | 'POST' | 'DELETE' | 'PUT';
947
969
  queue?: string;
948
970
  status?: 'pending' | 'running' | 'resolved' | 'failed';
971
+ compact?: boolean;
972
+ queue_exact?: boolean;
973
+ queue_exclude?: string;
949
974
  }, fetchOptions?: FetchOptions): Promise<DatabaseResponse<RequestHistory[]>>;
950
975
  /**
951
976
  * Cancels a pending client secret request and removes it from the client-side queue if applicable.
package/dist/skapi.d.ts CHANGED
@@ -494,6 +494,10 @@ type RequestHistory = {
494
494
  expires?: number;
495
495
  status: 'pending' | 'running' | 'resolved' | 'failed';
496
496
  queue_name?: string;
497
+ request_text?: string;
498
+ response_text?: string;
499
+ response_complete_marker?: boolean;
500
+ compact?: boolean;
497
501
  poll?: (arg?: {
498
502
  latency?: number;
499
503
  onResponse?: (res: any) => void;
@@ -519,6 +523,8 @@ type FileInfo = {
519
523
  fileKey: string;
520
524
  };
521
525
  type ConnectionInfo = {
526
+ /** Public project ID (service + owner composed into the two-segment token). Empty when the service has no uuid owner. */
527
+ project_id: string;
522
528
  user_ip: string;
523
529
  user_agent: string;
524
530
  user_location: string;
@@ -638,7 +644,7 @@ declare function extractFormData(form: FormData | HTMLFormElement | SubmitEvent
638
644
  file: File;
639
645
  }[];
640
646
  };
641
- declare function decodeServiceId(service: any): {
647
+ declare function decodeProjectId(service: any): {
642
648
  service: any;
643
649
  owner: any;
644
650
  };
@@ -662,6 +668,13 @@ declare class Skapi {
662
668
  private __version;
663
669
  service: string;
664
670
  owner: string;
671
+ /**
672
+ * The public project ID: the single two-segment token composed from service + owner
673
+ * (the same value formatServiceId returns, and the form external tools accept).
674
+ * Empty string when the service has no uuid owner (e.g. host-owned), since the
675
+ * compound form cannot be built without one.
676
+ */
677
+ project_id: string;
665
678
  session: Record<string, any> | null;
666
679
  connection: Connection | null;
667
680
  /**
@@ -729,7 +742,7 @@ declare class Skapi {
729
742
  generateRandom: typeof generateRandom;
730
743
  toBase62: typeof toBase62;
731
744
  fromBase62: typeof fromBase62;
732
- decodeServiceId: typeof decodeServiceId;
745
+ decodeProjectId: typeof decodeProjectId;
733
746
  formatServiceId: typeof formatServiceId;
734
747
  extractFormData: typeof extractFormData;
735
748
  terminatePendingRequests: typeof terminatePendingRequests;
@@ -937,6 +950,15 @@ declare class Skapi {
937
950
  }>;
938
951
  /**
939
952
  * Retrieves the history of client secret requests for a given URL and method.
953
+ *
954
+ * Listing modifiers: `compact` returns lightweight label/marker stubs
955
+ * (request_text, response_text, response_complete_marker) instead of the
956
+ * full request/response bodies, which stay on the server; `queue_exact`
957
+ * restricts a queue listing to exactly the named queue (the queue lookup is
958
+ * otherwise a prefix range, so queue "u1" would also match "u1-bg");
959
+ * `queue_exclude` drops one queue's rows from the listing. Both queue
960
+ * filters are applied server-side after the range read, so a page can come
961
+ * back short while more matches remain - keep paging by startKey/endOfList.
940
962
  * @param params Request parameters.
941
963
  * @param fetchOptions Pagination and fetch behavior options.
942
964
  * @returns A promise that resolves to a paginated list of request history items.
@@ -946,6 +968,9 @@ declare class Skapi {
946
968
  method: 'GET' | 'POST' | 'DELETE' | 'PUT';
947
969
  queue?: string;
948
970
  status?: 'pending' | 'running' | 'resolved' | 'failed';
971
+ compact?: boolean;
972
+ queue_exact?: boolean;
973
+ queue_exclude?: string;
949
974
  }, fetchOptions?: FetchOptions): Promise<DatabaseResponse<RequestHistory[]>>;
950
975
  /**
951
976
  * Cancels a pending client secret request and removes it from the client-side queue if applicable.