Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@rest-hooks/endpoint

Package Overview
Dependencies
Maintainers
2
Versions
120
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@rest-hooks/endpoint - npm Package Compare versions

Comparing version 2.2.12 to 2.3.0

6

dist/index.js

@@ -122,2 +122,3 @@ 'use strict';

}
const ExtendableEndpoint = Endpoint;

@@ -164,5 +165,10 @@ /**

});
Object.defineProperty(exports, 'validateRequired', {
enumerable: true,
get: function () { return normalizr.validateRequired; }
});
exports.AbortOptimistic = AbortOptimistic;
exports.Endpoint = Endpoint;
exports.ExpiryStatus = ExpiryStatus;
exports.ExtendableEndpoint = ExtendableEndpoint;
exports.Index = Index;

2

dist/index.umd.min.js

@@ -1,1 +0,1 @@

!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports,require("@rest-hooks/normalizr")):"function"==typeof define&&define.amd?define(["exports","@rest-hooks/normalizr"],t):t((e="undefined"!=typeof globalThis?globalThis:e||self).restHookEndpoint={},e.normalizr)}(this,(function(e,t){"use strict";function n(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}function r(e,t){return e(t={exports:{}},t.exports),t.exports}var o=n(r((function(e){e.exports=function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e},e.exports.__esModule=!0,e.exports.default=e.exports}))),s=r((function(e){function t(n,r){return e.exports=t=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},e.exports.__esModule=!0,e.exports.default=e.exports,t(n,r)}e.exports=t,e.exports.__esModule=!0,e.exports.default=e.exports}));n(s);var i=n(r((function(e){e.exports=function(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,s(e,t)},e.exports.__esModule=!0,e.exports.default=e.exports}))),u=r((function(e){function t(n){return e.exports=t=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},e.exports.__esModule=!0,e.exports.default=e.exports,t(n)}e.exports=t,e.exports.__esModule=!0,e.exports.default=e.exports}));n(u);var p=r((function(e){e.exports=function(e){return-1!==Function.toString.call(e).indexOf("[native code]")},e.exports.__esModule=!0,e.exports.default=e.exports}));n(p);var c=r((function(e){e.exports=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}},e.exports.__esModule=!0,e.exports.default=e.exports}));n(c);var f=r((function(e){function t(n,r,o){return c()?(e.exports=t=Reflect.construct.bind(),e.exports.__esModule=!0,e.exports.default=e.exports):(e.exports=t=function(e,t,n){var r=[null];r.push.apply(r,t);var o=new(Function.bind.apply(e,r));return n&&s(o,n.prototype),o},e.exports.__esModule=!0,e.exports.default=e.exports),t.apply(null,arguments)}e.exports=t,e.exports.__esModule=!0,e.exports.default=e.exports}));n(f);var a=r((function(e){function t(n){var r="function"==typeof Map?new Map:void 0;return e.exports=t=function(e){if(null===e||!p(e))return e;if("function"!=typeof e)throw new TypeError("Super expression must either be null or a function");if(void 0!==r){if(r.has(e))return r.get(e);r.set(e,t)}function t(){return f(e,arguments,u(this).constructor)}return t.prototype=Object.create(e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),s(t,e)},e.exports.__esModule=!0,e.exports.default=e.exports,t(n)}e.exports=t,e.exports.__esModule=!0,e.exports.default=e.exports})),l=n(a);function d(e,t){e.type=e.sideEffect?"mutate":"read",e.options=Object.assign({},t),delete e.options.key,delete e.options.schema,delete e.options.sideEffect,delete e.options.fetch,delete e.options.getFetchKey,delete e.options.options,0===Object.keys(e.options).length&&delete e.options,void 0===e.schema&&(e.schema=null)}var y=!1;try{Function()}catch(e){y=!0}var x=function(e){function t(n,r){var s,i;return y?(i=function(){var e;return(e=i).fetch.apply(e,arguments)},Object.setPrototypeOf(i,(this instanceof t?this.constructor:void 0).prototype)):(s=e.call(this,"return arguments.callee.fetch.apply(arguments.callee, arguments)")||this,i=o(s)),i.getFetchKey=function(e){return i.key(e)},n&&(i.fetch=n),r&&"name"in r?(i.__name=r.name,delete r.name):n&&(i.__name=n.name),Object.assign(i,r),Object.defineProperty(i,"name",{get:function(){return this.__name}}),d(i,r),i||o(s)}i(t,e);var n=t.prototype;return n.key=function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return this.name+" "+JSON.stringify(t)},n.bind=function(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];var o=this.fetch,s=this.key;return this.extend({fetch:function(){return o.apply(null!=e?e:this,n)},key:function(){return s.apply(this,n)}})},n.extend=function(e){var t=function(e){function t(){return e.apply(this,arguments)||this}return i(t,e),t}(this.constructor);Object.assign(t.prototype,this);var n=new t(e.fetch,e);return d(n,Object.assign({},this.options,e)),n},t}(l(Function)),h=function(){function e(e,t){var n=this;this.getFetchKey=function(e){return n.key(e)},this.schema=e,t&&(this.key=t)}return e.prototype.key=function(e){return JSON.stringify(e)},e}(),_=function(e){function t(){return e.apply(this,arguments)||this}return i(t,e),t}(l(Error));Object.defineProperty(e,"DELETED",{enumerable:!0,get:function(){return t.DELETED}}),Object.defineProperty(e,"Entity",{enumerable:!0,get:function(){return t.Entity}}),Object.defineProperty(e,"isEntity",{enumerable:!0,get:function(){return t.isEntity}}),Object.defineProperty(e,"schema",{enumerable:!0,get:function(){return t.schema}}),e.AbortOptimistic=_,e.Endpoint=x,e.ExpiryStatus={Invalid:1,InvalidIfStale:2,Valid:3},e.Index=h,Object.defineProperty(e,"__esModule",{value:!0})}));
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports,require("@rest-hooks/normalizr")):"function"==typeof define&&define.amd?define(["exports","@rest-hooks/normalizr"],t):t((e="undefined"!=typeof globalThis?globalThis:e||self).restHookEndpoint={},e.normalizr)}(this,(function(e,t){"use strict";function n(e,t){e.type=e.sideEffect?"mutate":"read",e.options={...t},delete e.options.key,delete e.options.schema,delete e.options.sideEffect,delete e.options.fetch,delete e.options.getFetchKey,delete e.options.options,0===Object.keys(e.options).length&&delete e.options,void 0===e.schema&&(e.schema=null)}let i=!1;try{Function()}catch(e){i=!0}class r extends Function{constructor(e,t){let r;return i?(r=(...e)=>r.fetch(...e),Object.setPrototypeOf(r,new.target.prototype)):(super("return arguments.callee.fetch.apply(arguments.callee, arguments)"),r=this),r.getFetchKey=e=>r.key(e),e&&(r.fetch=e),t&&"name"in t?(r.__name=t.name,delete t.name):e&&(r.__name=e.name),Object.assign(r,t),Object.defineProperty(r,"name",{get:function(){return this.__name}}),n(r,t),r}key(...e){return`${this.name} ${JSON.stringify(e)}`}bind(e,...t){const n=this.fetch,i=this.key;return this.extend({fetch(){return n.apply(null!=e?e:this,t)},key(){return i.apply(this,t)}})}extend(e){class t extends this.constructor{}Object.assign(t.prototype,this);const i=new t(e.fetch,e);return n(i,{...this.options,...e}),i}}const o=r;class s extends Error{}Object.defineProperty(e,"DELETED",{enumerable:!0,get:function(){return t.DELETED}}),Object.defineProperty(e,"Entity",{enumerable:!0,get:function(){return t.Entity}}),Object.defineProperty(e,"isEntity",{enumerable:!0,get:function(){return t.isEntity}}),Object.defineProperty(e,"schema",{enumerable:!0,get:function(){return t.schema}}),Object.defineProperty(e,"validateRequired",{enumerable:!0,get:function(){return t.validateRequired}}),e.AbortOptimistic=s,e.Endpoint=r,e.ExpiryStatus={Invalid:1,InvalidIfStale:2,Valid:3},e.ExtendableEndpoint=o,e.Index=class{constructor(e,t){this.getFetchKey=e=>this.key(e),this.schema=e,t&&(this.key=t)}key(e){return JSON.stringify(e)}},Object.defineProperty(e,"__esModule",{value:!0})}));

@@ -107,2 +107,3 @@ function runCompat(endpoint, options) {

}
//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJuYW1lcyI6WyJydW5Db21wYXQiLCJ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E9BQUQsRUFBVSxHQUFHZCxJQUFiLEVBQW1CO0lBQ3JCLE1BQU1lLFNBQVMsR0FBRyxLQUFLNUIsS0FBdkI7SUFDQSxNQUFNNkIsT0FBTyxHQUFHLEtBQUsvQixHQUFyQjtJQUNBLE9BQU8sS0FBS2dDLE1BQUwsQ0FBWTtNQUNqQjlCLEtBQUssR0FBRztRQUNOLE9BQU80QixTQUFTLENBQUNHLEtBQVYsQ0FBZ0JKLE9BQWhCLFdBQWdCQSxPQUFoQixHQUEyQixJQUEzQixFQUFpQ2QsSUFBakMsQ0FBUDtNQUNELENBSGdCOztNQUlqQmYsR0FBRyxHQUFHO1FBQ0osT0FBTytCLE9BQU8sQ0FBQ0UsS0FBUixDQUFjLElBQWQsRUFBb0JsQixJQUFwQixDQUFQO01BQ0Q7O0lBTmdCLENBQVosQ0FBUDtFQVFEOztFQUVEaUIsTUFBTSxDQUFDbkMsT0FBRCxFQUFVO0lBQ2Q7SUFDQTtJQUNBLE1BQU1xQyxDQUFOLFNBQWdCLEtBQUt0QixXQUFyQixDQUFpQzs7SUFFakNSLE1BQU0sQ0FBQ21CLE1BQVAsQ0FBY1csQ0FBQyxDQUFDZixTQUFoQixFQUEyQixJQUEzQjtJQUNBLE1BQU1nQixRQUFRLEdBQUcsSUFBSUQsQ0FBSixDQUFNckMsT0FBTyxDQUFDSyxLQUFkLEVBQXFCTCxPQUFyQixDQUFqQjtJQUVBOztJQUNBRixTQUFTLENBQUN3QyxRQUFELG9CQUFnQixLQUFLdEMsT0FBckIsRUFBaUNBLE9BQWpDLEVBQVQ7SUFFQSxPQUFPc0MsUUFBUDtFQUNEOztBQWpFNEM7QUFtRS9DLE9BQU8sTUFBTUMsa0JBQWtCLEdBQUd6QixRQUEzQiJ9

@@ -1,6 +0,6 @@

export { schema, Entity, isEntity, DELETED } from '@rest-hooks/normalizr';
export { schema, Entity, isEntity, DELETED, validateRequired } from '@rest-hooks/normalizr';
export { ExpiryStatus } from './Expiry.js';
export { default as Endpoint } from './endpoint.js';
export { default as Endpoint, ExtendableEndpoint } from './endpoint.js';
export { default as Index } from './indexEndpoint.js';
export { default as AbortOptimistic } from './AbortOptimistic.js';
//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJuYW1lcyI6WyJzY2hlbWEiLCJFbnRpdHkiLCJpc0VudGl0eSIsIkRFTEVURUQiLCJFeHBpcnlTdGF0dXMiLCJkZWZhdWx0IiwiRW5kcG9pbnQiLCJJbmRleCIsIkFib3J0T3B0aW1pc3RpYyJdLCJzb3VyY2VzIjpbIi4uL3NyYy9pbmRleC50cyJdLCJzb3VyY2VzQ29udGVudCI6WyJleHBvcnQgdHlwZSB7XG4gIEVuZHBvaW50SW50ZXJmYWNlLFxuICBSZWFkRW5kcG9pbnQsXG4gIE11dGF0ZUVuZHBvaW50LFxuICBJbmRleEludGVyZmFjZSxcbiAgSW5kZXhQYXJhbXMsXG4gIEFycmF5RWxlbWVudCxcbn0gZnJvbSAnLi9pbnRlcmZhY2UuanMnO1xuZXhwb3J0IHR5cGUgeyBFbmRwb2ludE9wdGlvbnMsIEVuZHBvaW50SW5zdGFuY2UgfSBmcm9tICcuL2VuZHBvaW50LmpzJztcbmV4cG9ydCB0eXBlIHtcbiAgTm9ybWFsaXplLFxuICBOb3JtYWxpemVOdWxsYWJsZSxcbiAgRGVub3JtYWxpemUsXG4gIERlbm9ybWFsaXplTnVsbGFibGUsXG59IGZyb20gJy4vbm9ybWFsLmpzJztcbmV4cG9ydCB7IHNjaGVtYSwgRW50aXR5LCBpc0VudGl0eSwgREVMRVRFRCB9IGZyb20gJ0ByZXN0LWhvb2tzL25vcm1hbGl6cic7XG5leHBvcnQgdHlwZSB7IEFic3RyYWN0SW5zdGFuY2VUeXBlLCBTY2hlbWEgfSBmcm9tICdAcmVzdC1ob29rcy9ub3JtYWxpenInO1xuZXhwb3J0IHR5cGUge1xuICBFbmRwb2ludEV4dHJhT3B0aW9ucyxcbiAgRmV0Y2hGdW5jdG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xuICBBcnJheVR5cGVbbnVtYmVyXTtcblxuZXhwb3J0IHR5cGUgSW5kZXhQYXJhbXM8UyBleHRlbmRzIFNjaGVtYT4gPSBTIGV4dGVuZHMge1xuICBpbmRleGVzOiByZWFkb25seSBzdHJpbmdbXTtcbn1cbiAgPyB7XG4gICAgICBbSyBpbiBFeHRyYWN0PFxuICAgICAgICBBcnJheUVsZW1lbnQ8U1snaW5kZXhlcyddPixcbiAgICAgICAga2V5b2YgQWJzdHJhY3RJbnN0YW5jZVR5cGU8Uz5cbiAgICAgID5dPzogQWJzdHJhY3RJbnN0YW5jZVR5cGU8Uz5bS107XG4gICAgfVxuICA6IFJlYWRvbmx5PG9iamVjdD47XG5cbmV4cG9ydCBpbnRlcmZhY2UgSW5kZXhJbnRlcmZhY2U8UyBleHRlbmRzIFNjaGVtYSA9IFNjaGVtYSwgUCA9IG9iamVjdD4ge1xuICBrZXkocGFyYW1zPzogUCk6IHN0cmluZztcbiAgcmVhZG9ubHkgc2NoZW1hOiBTO1xufVxuIl0sIm1hcHBpbmdzIjoiIn0=

@@ -0,3 +1,4 @@

/** @deprecated */
export * from './ErrorTypes';
export { default as SnapshotInterface } from './SnapshotInterface';
//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJuYW1lcyI6WyJkZWZhdWx0IiwiU25hcHNob3RJbnRlcmZhY2UiXSwic291cmNlcyI6WyIuLi9zcmMvdHlwZXMudHMiXSwic291cmNlc0NvbnRlbnQiOlsiaW1wb3J0IHsgc2NoZW1hLCBTY2hlbWEgfSBmcm9tICdAcmVzdC1ob29rcy9ub3JtYWxpenInO1xuXG5pbXBvcnQgeyBOb3JtYWxpemUgfSBmcm9tICcuL25vcm1hbC5qcyc7XG5pbXBvcnQgeyBFbmRwb2ludEludGVyZmFjZSB9IGZyb20gJy4vaW50ZXJmYWNlLmpzJztcbmltcG9ydCB7IFJlc29sdmVUeXBlIH0gZnJvbSAnLi91dGlsaXR5LmpzJztcbmltcG9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xuICB8IHNjaGVtYS5FbnRpdHlJbnRlcmZhY2U8VD5bXVxuICB8IHsgW0s6IHN0cmluZ106IGFueSB9XG4gIHwgU2NoZW1hW11cbiAgfCBzY2hlbWEuU2NoZW1hQ2xhc3M7XG5cbmV4cG9ydCAqIGZyb20gJy4vRXJyb3JUeXBlcyc7XG5leHBvcnQgeyBkZWZhdWx0IGFzIFNuYXBzaG90SW50ZXJmYWNlIH0gZnJvbSAnLi9TbmFwc2hvdEludGVyZmFjZSc7XG4iXSwibWFwcGluZ3MiOiJBQWtDQTtBQWlDQSxjQUFjLGNBQWQ7QUFDQSxTQUFTQSxPQUFPLElBQUlDLGlCQUFwQixRQUE2QyxxQkFBN0MifQ==

@@ -36,2 +36,4 @@ /* eslint-disable @typescript-eslint/ban-types */

export type KeyofEndpointInstance = keyof EndpointInstance<FetchFunction>;
export type ExtendedEndpoint<

@@ -45,9 +47,9 @@ O extends EndpointExtendOptions<F>,

F extends FetchFunction,
> = Omit<O, keyof EndpointInstance<FetchFunction>> &
Omit<E, keyof EndpointInstance<FetchFunction>> &
EndpointInstance<
'fetch' extends keyof O ? Exclude<O['fetch'], undefined> : E['fetch'],
'schema' extends keyof O ? O['schema'] : E['_schema'],
'sideEffect' extends keyof O ? O['sideEffect'] : E['sideEffect']
>;
> = EndpointInstance<
'fetch' extends keyof O ? Exclude<O['fetch'], undefined> : E['fetch'],
'schema' extends keyof O ? O['schema'] : E['_schema'],
'sideEffect' extends keyof O ? O['sideEffect'] : E['sideEffect']
> &
Omit<O, KeyofEndpointInstance> &
Omit<E, KeyofEndpointInstance>;

@@ -61,2 +63,25 @@ export function Make(...args: any[]): EndpointInstance<FetchFunction>;

export interface EndpointInstance<
F extends (...args: any) => Promise<any> = FetchFunction,
S extends Schema | undefined = Schema | undefined,
M extends true | undefined = true | undefined,
> extends EndpointInstanceInterface<F, S, M> {
extend<
E extends EndpointInstance<
(...args: any) => Promise<any>,
Schema | undefined,
true | undefined
>,
O extends EndpointExtendOptions<F> &
Partial<Omit<E, keyof EndpointInstance<FetchFunction>>>,
>(
this: E,
options: O,
): ExtendedEndpoint<typeof options, E, F>;
}
/**
* Defines an async data source.
* @see https://resthooks.io/docs/api/Endpoint
*/
export interface EndpointInstanceInterface<
F extends FetchFunction = FetchFunction,

@@ -100,14 +125,11 @@ S extends Schema | undefined = Schema | undefined,

*/
bind<
E extends EndpointInstance<
FetchFunction,
Schema | undefined,
true | undefined
>,
P extends Parameters<F>,
>(
bind<E extends FetchFunction, P extends Parameters<E>>(
this: E,
thisArg: ThisParameterType<E>,
...args: readonly [...P]
): EndpointInstance<() => ReturnType<E>, S, M> &
): EndpointInstance<
(...args: readonly [...RemoveArray<Parameters<E>, P>]) => ReturnType<E>,
S,
M
> &
Omit<E, keyof EndpointInstance<FetchFunction>>;

@@ -135,15 +157,2 @@

extend<
E extends EndpointInstance<
FetchFunction,
Schema | undefined,
true | undefined
>,
O extends EndpointExtendOptions<F> &
Partial<Omit<E, keyof EndpointInstance<FetchFunction>>>,
>(
this: E,
options: O,
): ExtendedEndpoint<typeof options, E, F>;
/** The following is for compatibility with FetchShape */

@@ -181,2 +190,20 @@ /** @deprecated */

interface ExtendableEndpointConstructor {
new <
F extends (
this: EndpointInstanceInterface<FetchFunction> & E,
params?: any,
body?: any,
) => Promise<any>,
S extends Schema | undefined = undefined,
M extends true | undefined = undefined,
E extends Record<string, any> = {},
>(
RestFetch: F,
options?: EndpointOptions<F, S, M> & E,
): EndpointInstanceInterface<F, S, M> & E;
readonly prototype: Function;
}
export declare let ExtendableEndpoint: ExtendableEndpointConstructor;
type IfAny<T, Y, N> = 0 extends 1 & T ? Y : N;

@@ -186,1 +213,10 @@ type IfTypeScriptLooseNull<Y, N> = 1 | undefined extends 1 ? Y : N;

type OnlyFirst<A extends unknown[]> = A extends [] ? [] : [A[0]];
type RemoveArray<Orig extends any[], Rem extends any[]> = Rem extends [
any,
...infer RestRem,
]
? Orig extends [any, ...infer RestOrig]
? RemoveArray<RestOrig, RestRem>
: never
: Orig;

@@ -110,2 +110,3 @@ function runCompat(endpoint, options) {

}
//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJuYW1lcyI6WyJydW5Db21wYXQiLCJlbmRwb2ludCIsIm9wdGlvbnMiLCJ0eXBlIiwic2lkZUVmZmVjdCIsImtleSIsInNjaGVtYSIsImZldGNoIiwiZ2V0RmV0Y2hLZXkiLCJPYmplY3QiLCJrZXlzIiwibGVuZ3RoIiwidW5kZWZpbmVkIiwiQ1NQIiwiRnVuY3Rpb24iLCJlIiwiRW5kcG9pbnQiLCJjb25zdHJ1Y3RvciIsImZldGNoRnVuY3Rpb24iLCJzZWxmIiwiYXJncyIsInNldFByb3RvdHlwZU9mIiwibmV3IiwidGFyZ2V0IiwicHJvdG90eXBlIiwicGFyYW1zIiwiX19uYW1lIiwibmFtZSIsImFzc2lnbiIsImRlZmluZVByb3BlcnR5IiwiZ2V0IiwiSlNPTiIsInN0cmluZ2lmeSIsImJpbmQiLCJ0aGlzQXJnIiwiZmV0Y2hGdW5jIiwia2V5RnVuYyIsImV4dGVuZCIsImFwcGx5IiwiRSIsImluc3RhbmNlIl0sInNvdXJjZXMiOlsiLi4vc3JjL2VuZHBvaW50LmpzIl0sInNvdXJjZXNDb250ZW50IjpbImZ1bmN0aW9uIHJ1bkNvbXBhdChlbmRwb2ludCwgb3B0aW9ucykge1xuICBlbmRwb2ludC50eXBlID0gZW5kcG9pbnQuc2lkZUVmZmVjdCA/ICdtdXRhdGUnIDogJ3JlYWQnO1xuICBlbmRwb2ludC5vcHRpb25zID0geyAuLi5vcHRpb25zIH07XG4gIGRlbGV0ZSBlbmRwb2ludC5vcHRpb25zLmtleTtcbiAgZGVsZXRlIGVuZHBvaW50Lm9wdGlvbnMuc2NoZW1hO1xuICBkZWxldGUgZW5kcG9pbnQub3B0aW9ucy5zaWRlRWZmZWN0O1xuICBkZWxldGUgZW5kcG9pbnQub3B0aW9ucy5mZXRjaDtcbiAgZGVsZXR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tCQUFrQixHQUFHekIsUUFBM0IifQ==
export type { EndpointInterface, ReadEndpoint, MutateEndpoint, IndexInterface, IndexParams, ArrayElement, } from './interface.js';
export type { EndpointOptions, EndpointInstance } from './endpoint.js';
export type { EndpointOptions, EndpointInstance, EndpointInstanceInterface, EndpointExtendOptions, } from './endpoint.js';
export type { Normalize, NormalizeNullable, Denormalize, DenormalizeNullable, } from './normal.js';
export { schema, Entity, isEntity, DELETED } from '@rest-hooks/normalizr';
export { schema, Entity, isEntity, DELETED, validateRequired, } from '@rest-hooks/normalizr';
export type { AbstractInstanceType, Schema } from '@rest-hooks/normalizr';
export type { EndpointExtraOptions, FetchFunction, OptimisticUpdateParams, UpdateFunction, SchemaDetail, SchemaList, SnapshotInterface, NetworkError, UnknownError, ErrorTypes, } from './types.js';
export type { EndpointExtraOptions, FetchFunction, SimpleFetchFunction as FetchFunctionOld, OptimisticUpdateParams, UpdateFunction, SchemaDetail, SchemaList, SnapshotInterface, NetworkError, UnknownError, ErrorTypes, } from './types.js';
export { ExpiryStatus } from './Expiry.js';
export type { ExpiryStatusInterface } from './Expiry.js';
export type { ResolveType, EndpointParam, InferReturn } from './utility.js';
export { default as Endpoint } from './endpoint.js';
export { default as Endpoint, ExtendableEndpoint } from './endpoint.js';
export type { KeyofEndpointInstance } from './endpoint.js';
export { default as Index } from './indexEndpoint.js';
export { default as AbortOptimistic } from './AbortOptimistic.js';
//# sourceMappingURL=index.d.ts.map

@@ -1,6 +0,6 @@

export { schema, Entity, isEntity, DELETED } from '@rest-hooks/normalizr';
export { schema, Entity, isEntity, DELETED, validateRequired } from '@rest-hooks/normalizr';
export { ExpiryStatus } from './Expiry.js';
export { default as Endpoint } from './endpoint.js';
export { default as Endpoint, ExtendableEndpoint } from './endpoint.js';
export { default as Index } from './indexEndpoint.js';
export { default as AbortOptimistic } from './AbortOptimistic.js';
//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJuYW1lcyI6WyJzY2hlbWEi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WlDLG9CQUFqQztBQUNBLFNBQVNILE9BQU8sSUFBSUksZUFBcEIsUUFBMkMsc0JBQTNDIn0=
import { Schema, AbstractInstanceType } from '@rest-hooks/normalizr';
import type { EndpointExtraOptions, FetchFunction } from './types.js';
import type { EndpointExtraOptions, FetchFunction, SimpleFetchFunction } from './types.js';
import { InferReturn } from './utility.js';
/** Defines a networking endpoint */
export interface EndpointInterface<F extends FetchFunction = FetchFunction, S extends Schema | undefined = Schema | undefined, M extends true | undefined = true | undefined> extends EndpointExtraOptions<F> {
export interface EndpointInterface<F extends FetchFunction = FetchFunction<any[]>, S extends Schema | undefined = Schema | undefined, M extends true | undefined = true | undefined> extends EndpointExtraOptions<F> {
(...args: Parameters<F>): InferReturn<F, S>;

@@ -12,3 +12,3 @@ key(...args: Parameters<F>): string;

/** To change values on the server */
export interface MutateEndpoint<F extends (params?: any, body?: any) => Promise<any> = FetchFunction, S extends Schema | undefined = Schema | undefined> extends EndpointInterface<F, S, true> {
export interface MutateEndpoint<F extends (params?: any, body?: any) => Promise<any> = SimpleFetchFunction, S extends Schema | undefined = Schema | undefined> extends EndpointInterface<F, S, true> {
sideEffect: true;

@@ -15,0 +15,0 @@ }

export {};
//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJuYW1lcyI6W10sInNvdXJjZXMiOlsiLi4vc3JjL2ludGVyZmFjZS50cyJdLCJzb3VyY2VzQ29udGVudCI6WyJpbXBvcnQgeyBTY2hlbWEsIEFic3RyYWN0SW5zdGFuY2VUeXBlIH0gZnJvbSAnQHJlc3QtaG9va3Mvbm9ybWFsaXpyJztcblxuaW1wb3J0IHR5cGUgeyBFbmRwb2ludEV4dHJhT3B0aW9ucywgRmV0Y2hGdW5jdGlvbiB9IGZyb20gJy4vdHlwZXMuanMnO1xuaW1wb3J0IHsgSW5mZXJSZXR1cm4gfSBmcm9tICcuL3V0aWxpdHkuanMnO1xuXG4vKiogRGVmaW5lcyBhIG5ldHdvcmtpbmcg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qKiBGb3IgcmV0cmlldmFsIHJlcXVlc3RzICovXG5leHBvcnQgdHlwZSBSZWFkRW5kcG9pbnQ8XG4gIEYgZXh0ZW5kcyAocGFyYW1zPzogYW55KSA9PiBQcm9taXNlPGFueT4gPSAocGFyYW1zPzogYW55KSA9PiBQcm9taXNlPGFueT4sXG4gIFMgZXh0ZW5kcyBTY2hlbWEgfCB1bmRlZmluZWQgPSBTY2hlbWEgfCB1bmRlZmluZWQsXG4+ID0gRW5kcG9pbnRJbnRlcmZhY2U8RiwgUywgdW5kZWZpbmVkPjtcblxuZXhwb3J0IHR5cGUgQXJyYXlFbGVtZW50PEFycmF5VHlwZSBleHRlbmRzIHVua25vd25bXSB8IHJlYWRvbmx5IHVua25vd25bXT4gPVxuICBBcnJheVR5cGVbbnVtYmVyXTtcblxuZXhwb3J0IHR5cGUgSW5kZXhQYXJhbXM8UyBleHRlbmRzIFNjaGVtYT4gPSBTIGV4dGVuZHMge1xuICBpbmRleGVzOiByZWFkb25seSBzdHJpbmdbXTtcbn1cbiAgPyB7XG4gICAgICBbSyBpbiBFeHRyYWN0PFxuICAgICAgICBBcnJheUVsZW1lbnQ8U1snaW5kZXhlcyddPixcbiAgICAgICAga2V5b2YgQWJzdHJhY3RJbnN0YW5jZVR5cGU8Uz5cbiAgICAgID5dPzogQWJzdHJhY3RJbnN0YW5jZVR5cGU8Uz5bS107XG4gICAgfVxuICA6IFJlYWRvbmx5PG9iamVjdD47XG5cbmV4cG9ydCBpbnRlcmZhY2UgSW5kZXhJbnRlcmZhY2U8UyBleHRlbmRzIFNjaGVtYSA9IFNjaGVtYSwgUCA9IG9iamVjdD4ge1xuICBrZXkocGFyYW1zPzogUCk6IHN0cmluZztcbiAgcmVhZG9ubHkgc2NoZW1hOiBTO1xufVxuIl0sIm1hcHBpbmdzIjoiIn0=

@@ -18,11 +18,13 @@ import { schema, Schema } from '@rest-hooks/normalizr';

*/
readonly optimisticUpdate?: (...args: Parameters<F>) => ResolveType<F>;
optimisticUpdate?(...args: Parameters<F>): ResolveType<F>;
/** Enables optimistic updates for this request - uses return value as assumed network response */
readonly getOptimisticResponse?: (snap: SnapshotInterface, ...args: Parameters<F>) => ResolveType<F>;
getOptimisticResponse?(snap: SnapshotInterface, ...args: Parameters<F>): ResolveType<F>;
/** Determines whether to throw or fallback to */
readonly errorPolicy?: (error: any) => 'soft' | undefined;
errorPolicy?(error: any): 'soft' | undefined;
/** User-land extra data to send */
readonly extra?: any;
}
export declare type FetchFunction<P = any, B = any, R = any> = (...args: readonly [params?: P, body?: B, ...rest: any]) => Promise<R>;
export declare type FetchFunction<A extends readonly any[] = any, R = any> = (...args: A) => Promise<R>;
/** @deprecated */
export declare type SimpleFetchFunction<P = any, B = any, R = any> = (...args: readonly [params?: P, body?: B, ...rest: any]) => Promise<R>;
export declare type OptimisticUpdateParams<SourceSchema extends Schema | undefined, Dest extends EndpointInterface<FetchFunction, Schema, any>> = [

@@ -29,0 +31,0 @@ Dest,

@@ -0,3 +1,4 @@

/** @deprecated */
export * from './ErrorTypes';
export { default as SnapshotInterface } from './SnapshotInterface';
//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJuYW1lcyI6WyJkZWZhdWx0IiwiU25hcHNob3RJbnRlcmZhY2UiXSwic291cmNlcyI6WyIuLi9zcmMvdHlwZXMudHMiXSwic291cmNlc0NvbnRlbnQiOlsiaW1wb3J0IHsgc2NoZW1hLCBTY2hlbWEgfSBmcm9tICdAcmVzdC1ob29rcy9ub3JtYWxpenInO1xuXG5pbXBvcnQgeyBOb3JtYWxpemUgfSBmcm9tICcuL25vcm1hbC5qcyc7XG5pbXBvcnQgeyBFbmRwb2ludEludGVyZmFjZSB9IGZyb20gJy4vaW50ZXJmYWNlLmpzJztcbmltcG9ydCB7IFJlc29sdmVUeXBlIH0gZnJvbSAnLi91dGlsaXR5LmpzJztcbmltcG9ydCBTbmFwc2hvdEludGVyZmFjZSBmcm9tICcuL1NuYXBzaG90SW50ZXJmYW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6IHN0cmluZ106IGFueSB9XG4gIHwgU2NoZW1hW11cbiAgfCBzY2hlbWEuU2NoZW1hQ2xhc3M7XG5cbmV4cG9ydCAqIGZyb20gJy4vRXJyb3JUeXBlcyc7XG5leHBvcnQgeyBkZWZhdWx0IGFzIFNuYXBzaG90SW50ZXJmYWNlIH0gZnJvbSAnLi9TbmFwc2hvdEludGVyZmFjZSc7XG4iXSwibWFwcGluZ3MiOiJBQWtDQTtBQWlDQSxjQUFjLGNBQWQ7QUFDQSxTQUFTQSxPQUFPLElBQUlDLGlCQUFwQixRQUE2QyxxQkFBN0MifQ==
{
"name": "@rest-hooks/endpoint",
"version": "2.2.12",
"version": "2.3.0",
"description": "Declarative Network Interface Definitions",

@@ -96,11 +96,11 @@ "sideEffects": false,

"@babel/runtime": "^7.13.0",
"@rest-hooks/normalizr": "^8.2.11"
"@rest-hooks/normalizr": "^8.3.0"
},
"devDependencies": {
"@babel/cli": "^7.18.9",
"@babel/core": "^7.18.9",
"@babel/cli": "7.18.10",
"@babel/core": "7.18.13",
"@types/babel__core": "^7",
"downlevel-dts": "^0.10.0",
"npm-run-all": "^4.1.5",
"rollup": "2.77.1",
"rollup": "2.79.0",
"rollup-plugin-babel": "^4.4.0",

@@ -114,3 +114,3 @@ "rollup-plugin-commonjs": "^10.1.0",

},
"gitHead": "5d2bfe84df68f8f76aaa2f223f721768f2cabc1e"
"gitHead": "c3fe597ffc0f2589756f26c21a5842493f06301e"
}

@@ -89,3 +89,3 @@ import nock from 'nock';

expect(UserDetail.key({ id: payload.id })).toMatchInlineSnapshot(
`"fetchUsers [{\\"id\\":\\"5\\"}]"`,
`"fetchUsers [{"id":"5"}]"`,
);

@@ -115,3 +115,3 @@ // @ts-expect-error

expect(Third.name).toBe('new');
expect(Third.key('5')).toMatchInlineSnapshot(`"new [\\"5\\"]"`);
expect(Third.key('5')).toMatchInlineSnapshot(`"new ["5"]"`);
const Fourth = Third.extend({ fetch: fetchUserList });

@@ -137,3 +137,3 @@ expect(Fourth.name).toBe('fetchUserList');

expect(UserDetail.key(payload.id)).toMatchInlineSnapshot(
`"fetchUsersIdParam [\\"5\\"]"`,
`"fetchUsersIdParam ["5"]"`,
);

@@ -209,5 +209,3 @@ // @ts-expect-error

expect(boundDetail.sideEffect).toBe(undefined);
expect(boundDetail.key()).toMatchInlineSnapshot(
`"fetch [{\\"id\\":\\"5\\"}]"`,
);
expect(boundDetail.key()).toMatchInlineSnapshot(`"fetch [{"id":"5"}]"`);
expect(boundDetail.root).toBe('moreusers');

@@ -319,3 +317,3 @@ // @ts-expect-error

expect(AssetDetail.key({ symbol: 'doge' })).toMatchInlineSnapshot(
`"fetchAsset [{\\"symbol\\":\\"doge\\"}]"`,
`"fetchAsset [{"symbol":"doge"}]"`,
);

@@ -322,0 +320,0 @@ });

@@ -21,3 +21,3 @@ import { Entity } from '@rest-hooks/normalizr';

expect(UserIndex.key({ username: 'hi' })).toMatchInlineSnapshot(
`"{\\"username\\":\\"hi\\"}"`,
`"{"username":"hi"}"`,
);

@@ -35,3 +35,3 @@

expect(UserIndex.getFetchKey({ username: 'hi' })).toMatchInlineSnapshot(
`"{\\"username\\":\\"hi\\"}"`,
`"{"username":"hi"}"`,
);

@@ -38,0 +38,0 @@

@@ -36,2 +36,4 @@ /* eslint-disable @typescript-eslint/ban-types */

export type KeyofEndpointInstance = keyof EndpointInstance<FetchFunction>;
export type ExtendedEndpoint<

@@ -45,9 +47,9 @@ O extends EndpointExtendOptions<F>,

F extends FetchFunction,
> = Omit<O, keyof EndpointInstance<FetchFunction>> &
Omit<E, keyof EndpointInstance<FetchFunction>> &
EndpointInstance<
'fetch' extends keyof O ? Exclude<O['fetch'], undefined> : E['fetch'],
'schema' extends keyof O ? O['schema'] : E['_schema'],
'sideEffect' extends keyof O ? O['sideEffect'] : E['sideEffect']
>;
> = EndpointInstance<
'fetch' extends keyof O ? Exclude<O['fetch'], undefined> : E['fetch'],
'schema' extends keyof O ? O['schema'] : E['_schema'],
'sideEffect' extends keyof O ? O['sideEffect'] : E['sideEffect']
> &
Omit<O, KeyofEndpointInstance> &
Omit<E, KeyofEndpointInstance>;

@@ -61,2 +63,25 @@ export function Make(...args: any[]): EndpointInstance<FetchFunction>;

export interface EndpointInstance<
F extends (...args: any) => Promise<any> = FetchFunction,
S extends Schema | undefined = Schema | undefined,
M extends true | undefined = true | undefined,
> extends EndpointInstanceInterface<F, S, M> {
extend<
E extends EndpointInstance<
(...args: any) => Promise<any>,
Schema | undefined,
true | undefined
>,
O extends EndpointExtendOptions<F> &
Partial<Omit<E, keyof EndpointInstance<FetchFunction>>>,
>(
this: E,
options: O,
): ExtendedEndpoint<typeof options, E, F>;
}
/**
* Defines an async data source.
* @see https://resthooks.io/docs/api/Endpoint
*/
export interface EndpointInstanceInterface<
F extends FetchFunction = FetchFunction,

@@ -100,14 +125,11 @@ S extends Schema | undefined = Schema | undefined,

*/
bind<
E extends EndpointInstance<
FetchFunction,
Schema | undefined,
true | undefined
>,
P extends Parameters<F>,
>(
bind<E extends FetchFunction, P extends Parameters<E>>(
this: E,
thisArg: ThisParameterType<E>,
...args: readonly [...P]
): EndpointInstance<() => ReturnType<E>, S, M> &
): EndpointInstance<
(...args: readonly [...RemoveArray<Parameters<E>, P>]) => ReturnType<E>,
S,
M
> &
Omit<E, keyof EndpointInstance<FetchFunction>>;

@@ -135,15 +157,2 @@

extend<
E extends EndpointInstance<
FetchFunction,
Schema | undefined,
true | undefined
>,
O extends EndpointExtendOptions<F> &
Partial<Omit<E, keyof EndpointInstance<FetchFunction>>>,
>(
this: E,
options: O,
): ExtendedEndpoint<typeof options, E, F>;
/** The following is for compatibility with FetchShape */

@@ -181,2 +190,20 @@ /** @deprecated */

interface ExtendableEndpointConstructor {
new <
F extends (
this: EndpointInstanceInterface<FetchFunction> & E,
params?: any,
body?: any,
) => Promise<any>,
S extends Schema | undefined = undefined,
M extends true | undefined = undefined,
E extends Record<string, any> = {},
>(
RestFetch: F,
options?: EndpointOptions<F, S, M> & E,
): EndpointInstanceInterface<F, S, M> & E;
readonly prototype: Function;
}
export declare let ExtendableEndpoint: ExtendableEndpointConstructor;
type IfAny<T, Y, N> = 0 extends 1 & T ? Y : N;

@@ -186,1 +213,10 @@ type IfTypeScriptLooseNull<Y, N> = 1 | undefined extends 1 ? Y : N;

type OnlyFirst<A extends unknown[]> = A extends [] ? [] : [A[0]];
type RemoveArray<Orig extends any[], Rem extends any[]> = Rem extends [
any,
...infer RestRem,
]
? Orig extends [any, ...infer RestOrig]
? RemoveArray<RestOrig, RestRem>
: never
: Orig;

@@ -95,1 +95,2 @@ function runCompat(endpoint, options) {

}
export const ExtendableEndpoint = Endpoint;

@@ -9,4 +9,9 @@ export type {

} from './interface.js';
export type { EndpointOptions, EndpointInstance } from './endpoint.js';
export type {
EndpointOptions,
EndpointInstance,
EndpointInstanceInterface,
EndpointExtendOptions,
} from './endpoint.js';
export type {
Normalize,

@@ -17,3 +22,9 @@ NormalizeNullable,

} from './normal.js';
export { schema, Entity, isEntity, DELETED } from '@rest-hooks/normalizr';
export {
schema,
Entity,
isEntity,
DELETED,
validateRequired,
} from '@rest-hooks/normalizr';
export type { AbstractInstanceType, Schema } from '@rest-hooks/normalizr';

@@ -23,2 +34,3 @@ export type {

FetchFunction,
SimpleFetchFunction as FetchFunctionOld,
OptimisticUpdateParams,

@@ -37,4 +49,5 @@ UpdateFunction,

export { default as Endpoint } from './endpoint.js';
export { default as Endpoint, ExtendableEndpoint } from './endpoint.js';
export type { KeyofEndpointInstance } from './endpoint.js';
export { default as Index } from './indexEndpoint.js';
export { default as AbortOptimistic } from './AbortOptimistic.js';
import { Schema, AbstractInstanceType } from '@rest-hooks/normalizr';
import type { EndpointExtraOptions, FetchFunction } from './types.js';
import type {
EndpointExtraOptions,
FetchFunction,
SimpleFetchFunction,
} from './types.js';
import { InferReturn } from './utility.js';

@@ -8,3 +12,3 @@

export interface EndpointInterface<
F extends FetchFunction = FetchFunction,
F extends FetchFunction = FetchFunction<any[]>,
S extends Schema | undefined = Schema | undefined,

@@ -21,3 +25,3 @@ M extends true | undefined = true | undefined,

export interface MutateEndpoint<
F extends (params?: any, body?: any) => Promise<any> = FetchFunction,
F extends (params?: any, body?: any) => Promise<any> = SimpleFetchFunction,
S extends Schema | undefined = Schema | undefined,

@@ -24,0 +28,0 @@ > extends EndpointInterface<F, S, true> {

@@ -20,15 +20,19 @@ import { schema, Schema } from '@rest-hooks/normalizr';

*/
readonly optimisticUpdate?: (...args: Parameters<F>) => ResolveType<F>;
optimisticUpdate?(...args: Parameters<F>): ResolveType<F>;
/** Enables optimistic updates for this request - uses return value as assumed network response */
readonly getOptimisticResponse?: (
getOptimisticResponse?(
snap: SnapshotInterface,
...args: Parameters<F>
) => ResolveType<F>;
): ResolveType<F>;
/** Determines whether to throw or fallback to */
readonly errorPolicy?: (error: any) => 'soft' | undefined;
errorPolicy?(error: any): 'soft' | undefined;
/** User-land extra data to send */
readonly extra?: any;
}
export type FetchFunction<A extends readonly any[] = any, R = any> = (
...args: A
) => Promise<R>;
export type FetchFunction<P = any, B = any, R = any> = (
/** @deprecated */
export type SimpleFetchFunction<P = any, B = any, R = any> = (
...args: readonly [params?: P, body?: B, ...rest: any]

@@ -35,0 +39,0 @@ ) => Promise<R>;

export { EndpointInterface, ReadEndpoint, MutateEndpoint, IndexInterface, IndexParams, ArrayElement, } from './interface.js';
export { EndpointOptions, EndpointInstance } from './endpoint.js';
export { EndpointOptions, EndpointInstance, EndpointInstanceInterface, EndpointExtendOptions, } from './endpoint.js';
export { Normalize, NormalizeNullable, Denormalize, DenormalizeNullable, } from './normal.js';
export { schema, Entity, isEntity, DELETED } from '@rest-hooks/normalizr';
export { schema, Entity, isEntity, DELETED, validateRequired, } from '@rest-hooks/normalizr';
export { AbstractInstanceType, Schema } from '@rest-hooks/normalizr';
export { EndpointExtraOptions, FetchFunction, OptimisticUpdateParams, UpdateFunction, SchemaDetail, SchemaList, SnapshotInterface, NetworkError, UnknownError, ErrorTypes, } from './types.js';
export { EndpointExtraOptions, FetchFunction, SimpleFetchFunction as FetchFunctionOld, OptimisticUpdateParams, UpdateFunction, SchemaDetail, SchemaList, SnapshotInterface, NetworkError, UnknownError, ErrorTypes, } from './types.js';
export { ExpiryStatus } from './Expiry.js';
export { ExpiryStatusInterface } from './Expiry.js';
export { ResolveType, EndpointParam, InferReturn } from './utility.js';
export { default as Endpoint } from './endpoint.js';
export { default as Endpoint, ExtendableEndpoint } from './endpoint.js';
export { KeyofEndpointInstance } from './endpoint.js';
export { default as Index } from './indexEndpoint.js';
export { default as AbortOptimistic } from './AbortOptimistic.js';
//# sourceMappingURL=index.d.ts.map
import { Schema, AbstractInstanceType } from '@rest-hooks/normalizr';
import { EndpointExtraOptions, FetchFunction } from './types.js';
import { EndpointExtraOptions, FetchFunction, SimpleFetchFunction } from './types.js';
import { InferReturn } from './utility.js';
/** Defines a networking endpoint */
export interface EndpointInterface<F extends FetchFunction = FetchFunction, S extends Schema | undefined = Schema | undefined, M extends true | undefined = true | undefined> extends EndpointExtraOptions<F> {
export interface EndpointInterface<F extends FetchFunction = FetchFunction<any[]>, S extends Schema | undefined = Schema | undefined, M extends true | undefined = true | undefined> extends EndpointExtraOptions<F> {
(...args: Parameters<F>): InferReturn<F, S>;

@@ -12,3 +12,3 @@ key(...args: Parameters<F>): string;

/** To change values on the server */
export interface MutateEndpoint<F extends (params?: any, body?: any) => Promise<any> = FetchFunction, S extends Schema | undefined = Schema | undefined> extends EndpointInterface<F, S, true> {
export interface MutateEndpoint<F extends (params?: any, body?: any) => Promise<any> = SimpleFetchFunction, S extends Schema | undefined = Schema | undefined> extends EndpointInterface<F, S, true> {
sideEffect: true;

@@ -15,0 +15,0 @@ }

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc