skapi-js 1.7.3 → 1.8.0

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
@@ -69,6 +69,7 @@ type GetRecordQuery = {
69
69
  name: string | '$updated' | '$uploaded' | '$referenced_count' | '$user_id';
70
70
  /** String value max 256 chars. Allows punctuation (including / ! * #). Blocks control chars and sentinel 􏿿. */
71
71
  value: string | number | boolean;
72
+ /** For a string value: '>=' = 'starts with', '<=' = 'ends with'. When the name is a compound name ending in '.', '>=' / '<=' match the child name segment (starts / ends with). '>' / '<' are lexicographic; numbers/booleans compare normally. */
72
73
  condition?: Condition;
73
74
  range?: string | number | boolean;
74
75
  };
@@ -476,6 +477,7 @@ type RequestHistory = {
476
477
  status_code: number;
477
478
  response_body: any;
478
479
  error?: any;
480
+ created: number;
479
481
  updated: number;
480
482
  request_body: any;
481
483
  expires?: number;
@@ -935,6 +937,36 @@ declare class Skapi {
935
937
  removed: boolean;
936
938
  message: string;
937
939
  }>;
940
+ /**
941
+ * Stops live polling for client secret requests without cancelling the requests
942
+ * themselves. The server-side work continues; only this client stops asking about it.
943
+ *
944
+ * Use it to drop polling traffic while the user is not looking at the results (a
945
+ * hidden tab, a closed view), then simply poll again when they return. Polls run
946
+ * one-at-a-time per queue, so a poll for a request that never settles otherwise
947
+ * blocks every poll queued behind it.
948
+ *
949
+ * Pass `id` (with `url` and `method`) to stop one request, `queue` to stop a queue's
950
+ * polls, or neither to stop all of them. A stopped poll resolves with
951
+ * `{ id, status: 'stopped' }` rather than rejecting, and its `onResponse`/`onError`
952
+ * callbacks are not called.
953
+ *
954
+ * @param params Which polls to stop.
955
+ * @returns The number of polls stopped.
956
+ */
957
+ stopClientSecretPolling(params?: {
958
+ url?: string;
959
+ method?: 'GET' | 'POST' | 'DELETE' | 'PUT';
960
+ id?: string;
961
+ queue?: string;
962
+ service?: string;
963
+ owner?: string;
964
+ }): number;
965
+ /**
966
+ * True if a poll result came from stopClientSecretPolling rather than the server.
967
+ * @param res A resolved poll result.
968
+ */
969
+ isPollStopped(res: any): boolean;
938
970
  /**
939
971
  * Returns the number of requests currently waiting in a named client secret request queue.
940
972
  * @param params Request parameters.
package/dist/skapi.d.ts CHANGED
@@ -69,6 +69,7 @@ type GetRecordQuery = {
69
69
  name: string | '$updated' | '$uploaded' | '$referenced_count' | '$user_id';
70
70
  /** String value max 256 chars. Allows punctuation (including / ! * #). Blocks control chars and sentinel 􏿿. */
71
71
  value: string | number | boolean;
72
+ /** For a string value: '>=' = 'starts with', '<=' = 'ends with'. When the name is a compound name ending in '.', '>=' / '<=' match the child name segment (starts / ends with). '>' / '<' are lexicographic; numbers/booleans compare normally. */
72
73
  condition?: Condition;
73
74
  range?: string | number | boolean;
74
75
  };
@@ -476,6 +477,7 @@ type RequestHistory = {
476
477
  status_code: number;
477
478
  response_body: any;
478
479
  error?: any;
480
+ created: number;
479
481
  updated: number;
480
482
  request_body: any;
481
483
  expires?: number;
@@ -935,6 +937,36 @@ declare class Skapi {
935
937
  removed: boolean;
936
938
  message: string;
937
939
  }>;
940
+ /**
941
+ * Stops live polling for client secret requests without cancelling the requests
942
+ * themselves. The server-side work continues; only this client stops asking about it.
943
+ *
944
+ * Use it to drop polling traffic while the user is not looking at the results (a
945
+ * hidden tab, a closed view), then simply poll again when they return. Polls run
946
+ * one-at-a-time per queue, so a poll for a request that never settles otherwise
947
+ * blocks every poll queued behind it.
948
+ *
949
+ * Pass `id` (with `url` and `method`) to stop one request, `queue` to stop a queue's
950
+ * polls, or neither to stop all of them. A stopped poll resolves with
951
+ * `{ id, status: 'stopped' }` rather than rejecting, and its `onResponse`/`onError`
952
+ * callbacks are not called.
953
+ *
954
+ * @param params Which polls to stop.
955
+ * @returns The number of polls stopped.
956
+ */
957
+ stopClientSecretPolling(params?: {
958
+ url?: string;
959
+ method?: 'GET' | 'POST' | 'DELETE' | 'PUT';
960
+ id?: string;
961
+ queue?: string;
962
+ service?: string;
963
+ owner?: string;
964
+ }): number;
965
+ /**
966
+ * True if a poll result came from stopClientSecretPolling rather than the server.
967
+ * @param res A resolved poll result.
968
+ */
969
+ isPollStopped(res: any): boolean;
938
970
  /**
939
971
  * Returns the number of requests currently waiting in a named client secret request queue.
940
972
  * @param params Request parameters.