skapi-js 1.7.3 → 1.7.7

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
@@ -935,6 +935,36 @@ declare class Skapi {
935
935
  removed: boolean;
936
936
  message: string;
937
937
  }>;
938
+ /**
939
+ * Stops live polling for client secret requests without cancelling the requests
940
+ * themselves. The server-side work continues; only this client stops asking about it.
941
+ *
942
+ * Use it to drop polling traffic while the user is not looking at the results (a
943
+ * hidden tab, a closed view), then simply poll again when they return. Polls run
944
+ * one-at-a-time per queue, so a poll for a request that never settles otherwise
945
+ * blocks every poll queued behind it.
946
+ *
947
+ * Pass `id` (with `url` and `method`) to stop one request, `queue` to stop a queue's
948
+ * polls, or neither to stop all of them. A stopped poll resolves with
949
+ * `{ id, status: 'stopped' }` rather than rejecting, and its `onResponse`/`onError`
950
+ * callbacks are not called.
951
+ *
952
+ * @param params Which polls to stop.
953
+ * @returns The number of polls stopped.
954
+ */
955
+ stopClientSecretPolling(params?: {
956
+ url?: string;
957
+ method?: 'GET' | 'POST' | 'DELETE' | 'PUT';
958
+ id?: string;
959
+ queue?: string;
960
+ service?: string;
961
+ owner?: string;
962
+ }): number;
963
+ /**
964
+ * True if a poll result came from stopClientSecretPolling rather than the server.
965
+ * @param res A resolved poll result.
966
+ */
967
+ isPollStopped(res: any): boolean;
938
968
  /**
939
969
  * Returns the number of requests currently waiting in a named client secret request queue.
940
970
  * @param params Request parameters.
package/dist/skapi.d.ts CHANGED
@@ -935,6 +935,36 @@ declare class Skapi {
935
935
  removed: boolean;
936
936
  message: string;
937
937
  }>;
938
+ /**
939
+ * Stops live polling for client secret requests without cancelling the requests
940
+ * themselves. The server-side work continues; only this client stops asking about it.
941
+ *
942
+ * Use it to drop polling traffic while the user is not looking at the results (a
943
+ * hidden tab, a closed view), then simply poll again when they return. Polls run
944
+ * one-at-a-time per queue, so a poll for a request that never settles otherwise
945
+ * blocks every poll queued behind it.
946
+ *
947
+ * Pass `id` (with `url` and `method`) to stop one request, `queue` to stop a queue's
948
+ * polls, or neither to stop all of them. A stopped poll resolves with
949
+ * `{ id, status: 'stopped' }` rather than rejecting, and its `onResponse`/`onError`
950
+ * callbacks are not called.
951
+ *
952
+ * @param params Which polls to stop.
953
+ * @returns The number of polls stopped.
954
+ */
955
+ stopClientSecretPolling(params?: {
956
+ url?: string;
957
+ method?: 'GET' | 'POST' | 'DELETE' | 'PUT';
958
+ id?: string;
959
+ queue?: string;
960
+ service?: string;
961
+ owner?: string;
962
+ }): number;
963
+ /**
964
+ * True if a poll result came from stopClientSecretPolling rather than the server.
965
+ * @param res A resolved poll result.
966
+ */
967
+ isPollStopped(res: any): boolean;
938
968
  /**
939
969
  * Returns the number of requests currently waiting in a named client secret request queue.
940
970
  * @param params Request parameters.