Skip to content

chore!: Remove public abortController option #310

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 3 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 4 additions & 7 deletions source/session.ts
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ export class Session<
* @param {Object} [options.eventHubOptions={}] - Options to configure event hub with.
* @param {string} [options.clientToken] - Client token for update events.
* @param {string} [options.apiEndpoint=/api] - API endpoint.
* @param {object} [options.headers] - Additional headers to send with the request
* @param {object} [options.additionalHeaders] - Additional headers to send with the request
* @param {object} [options.strictApi] - Turn on strict API mode
* @param {object} [options.ensureSerializableResponse] - Disable normalization of response data
*
Expand Down Expand Up @@ -553,16 +553,15 @@ export class Session<
* @typeParam T - Either an array of response types to get return type `Tuple<T[0], ..., T[n]>`, or a single response type to get return type T[]. Default is ActionResponse.
* @param {Array} operations - API operations.
* @param {Object} options
* @param {AbortController} options.abortController - Abort controller, deprecated in favor of options.signal
* @param {AbortSignal} options.signal - Abort signal
* @param {string} options.pushToken - push token to associate with the request
* @param {object} options.headers - Additional headers to send with the request
* @param {object} options.additionalHeaders - Additional headers to send with the request
* @param {object} options.ensureSerializableResponse - Disable normalization of response data
*
*/
async call<T = ActionResponse<keyof TEntityTypeMap>>(
operations: operation.Operation<keyof TEntityTypeMap>[],
{
abortController,
pushToken,
signal,
additionalHeaders = {},
Expand Down Expand Up @@ -597,7 +596,7 @@ export class Session<
...additionalHeaders,
} as HeadersInit,
body: this.encodeOperations(operations),
signal: abortController ? abortController.signal : signal,
signal,
});
} catch (reason) {
if (reason instanceof Error) {
Expand Down Expand Up @@ -774,7 +773,6 @@ export class Session<
*
* @param {string} expression - API query expression.
* @param {object} options
* @param {object} options.abortController - Deprecated in favour of options.signal
* @param {object} options.signal - Abort signal user for aborting requests prematurely
* @param {object} options.headers - Additional headers to send with the request
* @param {object} options.ensureSerializableResponse - Disable normalization of response data
Expand Down Expand Up @@ -802,7 +800,6 @@ export class Session<
* @param {String} [options.contextId] Context id to limit the search result to
* @param {String[]} [options.objectTypeIds] Object type ids to limit the search result to
* @param {object} additionalOptions
* @param {object} options.abortController - Deprecated in favour of options.signal
* @param {object} options.signal - Abort signal user for aborting requests prematurely
* @param {object} options.headers - Additional headers to send with the request
* @param {object} options.ensureSerializableResponse - Disable normalization of response data
Expand Down
1 change: 0 additions & 1 deletion source/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -249,7 +249,6 @@ export interface Schema<
deprecated?: SchemaDeprecated;
}
export interface QueryOptions {
abortController?: AbortController;
signal?: AbortSignal;
additionalHeaders?: Data;
decodeDatesAsIso?: boolean;
Expand Down