New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.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 3.7.0 to 3.7.1

5

dist/index.js

@@ -550,3 +550,3 @@ 'use strict';

Or use debugging tools: https://resthooks.io/docs/guides/debugging
Learn more about nesting schemas: https://resthooks.io/rest/guides/nested-response
Learn more about nesting schemas: https://resthooks.io/rest/guides/relational-data

@@ -660,6 +660,7 @@ Entity keys: ${Object.keys(this.defaults)}

CLASSNAMEMANGLING ? /* istanbul ignore next */function () {
const name = this.name === 'EntityMixin' ? Base.name : this.name;
console.error('Rest Hooks Error: https://resthooks.io/errors/dklj');
Object.defineProperty(this, 'key', {
get() {
return Base.name;
return name;
},

@@ -666,0 +667,0 @@ set

2

dist/index.umd.min.js

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

!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports):"function"==typeof define&&define.amd?define(["exports"],t):t((e="undefined"!=typeof globalThis?globalThis:e||self).restHookEndpoint={})}(this,(function(e){"use strict";function t(e){return!("function"!=typeof e.hasOwnProperty||!(Object.hasOwnProperty.call(e,"__ownerID")||e._map&&Object.hasOwnProperty.call(e._map,"__ownerID")))}function s(e,t,s){let r=!0,i=!1;return[Object.keys(e).reduce(((t,n)=>{const o=`${n}`,[c,a,h]=s(t.get(o),e[o]);return a||(r=!1),h&&(i=!0),t.has(o)?t.set(o,c):t}),t),r,i]}class r{constructor(e,t){this.schema=void 0,t&&(this._schemaAttribute="string"==typeof t?e=>e[t]:t),this.define(e)}get isSingleSchema(){return!this._schemaAttribute}define(e){this.schema=e}getSchemaAttribute(e,t,s){return!this.isSingleSchema&&this._schemaAttribute(e,t,s)}inferSchema(e,t,s){if(this.isSingleSchema)return this.schema;const r=this.getSchemaAttribute(e,t,s);return this.schema[r]}normalizeValue(e,t,s,r,i,n){const o=this.inferSchema(e,t,s);if(!o)return e;const c=r(e,t,s,o,i,n);return this.isSingleSchema||null==c?c:{id:c,schema:this.getSchemaAttribute(e,t,s)}}denormalizeValue(e,s){const r=!this.isSingleSchema&&(t(e)?e.get("schema"):e.schema);if(!this.isSingleSchema&&!r)return[e,!0,!1];return s((this.isSingleSchema?void 0:t(e)?e.get("id"):e.id)||e,this.isSingleSchema?this.schema:this.schema[r])}}const i=([e,,t])=>void 0!==e&&!t;class n extends r{normalize(e,t,s,r,i,n){const o=(e=>Array.isArray(e)?e:Object.keys(e).map((t=>e[t])))(e);return o.map(((e,o)=>this.normalizeValue(e,t,s,r,i,n))).filter((e=>null!=e))}denormalize(e,t){return[e.map?e.map((e=>this.denormalizeValue(e,t))).filter(i).map((([e])=>e)):e,!0,!1]}infer(e,t,s,r){}toJSON(){return[this.schema]}}const o=Symbol("ENTITY WAS DELETED");var c,a=function(e,t){return e(t={exports:{}},t.exports),t.exports}((function(e){e.exports=function(e,t){if(null==e)return{};var s,r,i={},n=Object.keys(e);for(r=0;r<n.length;r++)s=n[r],t.indexOf(s)>=0||(i[s]=e[s]);return i},e.exports.__esModule=!0,e.exports.default=e.exports})),h=(c=a)&&c.__esModule&&Object.prototype.hasOwnProperty.call(c,"default")?c.default:c;const u=["pk","schema","key"];function l(e,t={}){class s extends e{static toString(){return this.key}static toJSON(){return{name:this.name,schema:this.schema,key:this.key}}static pk(e,t,s){return this.prototype.pk.call(e,t,s)}static useIncoming(e,t,s,r){return!0}static shouldReorder(e,t,s,r){return t.fetchedAt<e.fetchedAt}static merge(e,t){return Object.assign({},e,t)}static mergeWithStore(e,t,s,r){return this.useIncoming(e,t,s,r)?typeof r!=typeof s?r:this.shouldReorder(e,t,s,r)?this.merge(r,s):this.merge(s,r):s}static fromJS(e={}){const t=new this(e);return Object.assign(t,e),t}static createIfValid(e){if(!this.validate(e))return this.fromJS(e)}static process(e,t,s){return Object.assign({},e)}static normalize(e,t,s,r,i,n){const o=this.process(e,t,s),c=this.pk(o,t,s);if(void 0===c||""===c)return;const a=this.key;if(a in n||(n[a]={}),c in n[a]||(n[a][c]=[]),n[a][c].some((t=>t===e)))return c;return function(e){if(e){const t=new Error(e);throw t.status=400,t}}(this.validate(o)),n[a][c].push(e),Object.keys(this.schema).forEach((e=>{if(Object.hasOwn(o,e)){const t=this.schema[e];o[e]=r(o[e],o,e,t,i,n)}})),i(this,o,c),c}static validate(e){}static infer(e,t,s){if(!e[0])return;if(["string","number"].includes(typeof e[0]))return`${e[0]}`;const r=this.pk(e[0],void 0,"");if(void 0!==r&&""!==r)return r;const i=function(e,t){return t?t.find((t=>Object.hasOwn(e,t))):void 0}(e[0],this.indexes);if(i&&t[this.key]){return t[this.key][i][e[0][i]]}}static expiresAt(e,t){return e.expiresAt}static denormalize(e,t){if("symbol"==typeof e)return[void 0,!0,!0];let s=!1;return Object.keys(this.schema).forEach((r=>{const i=this.schema[r],n=e[r],[o,,c]=t(n,i);c&&this.defaults[r]&&(s=!0),e[r]=o})),[e,!0,s]}static get defaults(){return Object.hasOwn(this,"__defaults")||Object.defineProperty(this,"__defaults",{value:new this,writable:!0,configurable:!0}),this.__defaults}}const r=h(t,u);if(Object.assign(s,r),"schema"in t?s.schema=t.schema:e.schema||(s.schema={}),"pk"in t?"function"==typeof t.pk?s.prototype.pk=function(e,s){return t.pk(this,e,s)}:s.prototype.pk=function(){return this[t.pk]}:"function"!=typeof e.prototype.pk&&(s.prototype.pk=function(){return this.id}),"key"in t)Object.defineProperty(s,"key",{value:t.key,configurable:!0,writable:!0});else if(!("key"in e)){function i(e){Object.defineProperty(this,"key",{value:e,writable:!0,enumerable:!0})}const n="EntityMixin"!==s.name?function(){return console.error("Rest Hooks Error: https://resthooks.io/errors/dklj"),Object.defineProperty(this,"key",{get:()=>e.name,set:i}),this.key}:function(){return"EntityMixin"===this.name?e.name:this.name};Object.defineProperty(s,"key",{get:n,set:i})}return s}var m=Object.freeze({__proto__:null,Union:class extends r{constructor(e,t){if(!t)throw new Error('Expected option "schemaAttribute" not found on UnionSchema.');super(e,t)}normalize(e,t,s,r,i,n){return this.normalizeValue(e,t,s,r,i,n)}denormalize(e,t){return this.denormalizeValue(e,t)}infer(e,t,s,r){if(!e[0])return;const i=this.getSchemaAttribute(e[0],void 0,""),n=this.schema[i];return void 0!==n?{id:s(n,e,t,r),schema:i}:void 0}},Values:class extends r{normalize(e,t,s,r,i,n){return Object.keys(e).reduce(((t,s,o)=>{const c=e[s];return null!=c?Object.assign({},t,{[s]:this.normalizeValue(c,e,s,r,i,n)}):t}),{})}denormalize(e,t){let s=!0,r=!1;return[Object.keys(e).reduce(((i,n)=>{const o=e[n],[c,a,h]=this.denormalizeValue(o,t);return a||(s=!1),h&&(r=!0),!a||h?i:Object.assign({},i,{[n]:c})}),{}),s,r]}infer(e,t,s){}},Array:n,All:class extends n{constructor(e,t){super(e,t)}normalize(e,t,s,r,i,n){super.normalize(e,t,s,r,i,n)}infer(e,t,s,r){if(this.isSingleSchema){const e=r[this.schema.key];if(void 0===e)return;return Object.values(e).map((e=>e&&this.schema.pk(e)))}let i=!1;const n=Object.values(this.schema).flatMap((e=>r[e.key]?(i=!0,Object.values(r[e.key]).map((t=>({id:t&&e.pk(t),schema:this.getSchemaAttribute(t,void 0,void 0)})))):[]));if(i)return n}},Object:class{constructor(e){this.schema=void 0,this.define(e)}define(e){this.schema=Object.keys(e).reduce(((t,s)=>{const r=e[s];return Object.assign({},t,{[s]:r})}),this.schema||{})}normalize(...e){return((e,t,s,r,i,n,o)=>{const c=Object.assign({},t);return Object.keys(e).forEach((s=>{const r=e[s],a=i(t[s],t,s,r,n,o);null==a?delete c[s]:c[s]=a})),c})(this.schema,...e)}denormalize(...e){return((e,r,i)=>{if(t(r))return s(e,r,i);const n=Object.assign({},r);let o=!0,c=!1;return Object.keys(e).forEach((t=>{const[s,r,a]=i(n[t],e[t]);void 0!==n[t]&&(n[t]=s),a&&(c=!0),r||(o=!1)})),[n,o,c]})(this.schema,...e)}infer(e,t,s,r){return function(e,t,s,r,i){const n={};return Object.keys(e).forEach((o=>{n[o]=r(e[o],t,s,i)})),n}(this.schema,e,t,s,r)}},Delete:class{constructor(e){this._entity=e}get key(){return this._entity.key}normalize(e,t,s,r,i,n){const c=this._entity.process(e,t,s),a=this._entity.pk(c,t,s);return i(this,o,a),a}infer(e,t,s){}denormalize(e,t){return t(e,this._entity)}_denormalizeNullable(){return[]}_normalizeNullable(){return[]}merge(e,t){return t}useIncoming(e,t,s,r){return e.date<=t.date}},Entity:l});const f=class{};class d extends(l(f)){static useIncoming(e,t,s,r){return e.fetchedAt<=t.fetchedAt}static mergeWithStore(e,t,s,r){return!e||this.useIncoming(e,t,s,r)?typeof r!=typeof s?r:this.merge(s,r):s}static process(e,t,s){return super.process(e,t,s)}static validate(e){return super.validate(e)}static denormalize(e,r){if("symbol"==typeof e)return[void 0,!0,!0];if(t(e)){if(this.validate(e.toJS()))return[void 0,!1,!0];null==r.setLocal||r.setLocal(e);const[t,i,n]=s(this.schema,e,r);return[this.fromJS(t.toObject()),!0,n]}let i;if(e instanceof this)i=e;else{if(this.validate(e))return[void 0,!1,!0];i=this.fromJS(e),null==r.setLocal||r.setLocal(i)}let n=!1;return Object.keys(this.schema).forEach((t=>{const s=this.schema[t],o=e[t],[c,,a]=r(o,s);a&&this.defaults[t]&&(n=!0),e[t]!==c&&this.set(i,t,c)})),[i,!0,n]}static set(e,t,s){e[t]=s}}let p=!1;try{Function()}catch(e){p=!0,console.error("Content Security Policy: The previous CSP log can be safely ignored - @rest-hooks/endpoint will use setPrototypeOf instead")}function y(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)}class b extends Function{constructor(e,t){let s,r;return p?(s=(...e)=>s.fetch(...e),Object.setPrototypeOf(s,new.target.prototype)):(super("return arguments.callee.fetch.apply(arguments.callee, arguments)"),s=this),s.getFetchKey=e=>s.key(e),e&&(s.fetch=e),t&&"name"in t||!e||!e.name||"anonymous"===e.name||(r=e.name),Object.defineProperty(s,"name",{get(){return r||this.__name},set(e){this.__name=e}}),Object.assign(s,t),y(s,t),s}key(...e){return`${this.name} ${JSON.stringify(e)}`}testKey(e){return e.startsWith(this.name)}bind(e,...t){const s=this.fetch,r=this.key;return this.extend({fetch(){return s.apply(null!=e?e:this,t)},key(){return r.apply(this,t)}})}extend(e){class t extends this.constructor{}Object.assign(t.prototype,this);const s=new t(e.fetch,e);return y(s,Object.assign({},this.options,e)),s}}"runCompat"!==y.name&&(b.prototype.key=function(...e){return console.error("Rest Hooks Error: https://resthooks.io/errors/osid"),`${this.name} ${JSON.stringify(e)}`});const g=b;class O extends Error{}Object.hasOwn=Object.hasOwn||function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},e.AbortOptimistic=O,e.DELETED=o,e.Endpoint=b,e.Entity=d,e.ExtendableEndpoint=g,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)}},e.Query=class{constructor(e,t){this.sideEffect=void 0,this.schema=this.createQuerySchema(e),t?this.process=t:this.process||(this.process=e=>e)}key(...e){return`QUERY ${JSON.stringify(e)}`}createQuerySchema(e){const t=Object.create(e);return t.denormalize=({args:t,input:s},r)=>{if(void 0===s)return[void 0,!1,!0];const[i,n,o]=e.denormalize(s,r);return[n?this.process(i,...t):void 0,n,o]},t.infer=(t,s,r,i)=>({args:t,input:r(e,t,s,i)}),t}},e.schema=m,e.validateRequired=function(e,t){let s="";if(Object.keys(t).some((t=>!Object.hasOwn(e,t)&&(s=t,!0))))return`Missing key ${s}`},Object.defineProperty(e,"__esModule",{value:!0})}));
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports):"function"==typeof define&&define.amd?define(["exports"],t):t((e="undefined"!=typeof globalThis?globalThis:e||self).restHookEndpoint={})}(this,(function(e){"use strict";function t(e){return!("function"!=typeof e.hasOwnProperty||!(Object.hasOwnProperty.call(e,"__ownerID")||e._map&&Object.hasOwnProperty.call(e._map,"__ownerID")))}function s(e,t,s){let r=!0,i=!1;return[Object.keys(e).reduce(((t,n)=>{const o=`${n}`,[c,a,h]=s(t.get(o),e[o]);return a||(r=!1),h&&(i=!0),t.has(o)?t.set(o,c):t}),t),r,i]}class r{constructor(e,t){this.schema=void 0,t&&(this._schemaAttribute="string"==typeof t?e=>e[t]:t),this.define(e)}get isSingleSchema(){return!this._schemaAttribute}define(e){this.schema=e}getSchemaAttribute(e,t,s){return!this.isSingleSchema&&this._schemaAttribute(e,t,s)}inferSchema(e,t,s){if(this.isSingleSchema)return this.schema;const r=this.getSchemaAttribute(e,t,s);return this.schema[r]}normalizeValue(e,t,s,r,i,n){const o=this.inferSchema(e,t,s);if(!o)return e;const c=r(e,t,s,o,i,n);return this.isSingleSchema||null==c?c:{id:c,schema:this.getSchemaAttribute(e,t,s)}}denormalizeValue(e,s){const r=!this.isSingleSchema&&(t(e)?e.get("schema"):e.schema);if(!this.isSingleSchema&&!r)return[e,!0,!1];return s((this.isSingleSchema?void 0:t(e)?e.get("id"):e.id)||e,this.isSingleSchema?this.schema:this.schema[r])}}const i=([e,,t])=>void 0!==e&&!t;class n extends r{normalize(e,t,s,r,i,n){const o=(e=>Array.isArray(e)?e:Object.keys(e).map((t=>e[t])))(e);return o.map(((e,o)=>this.normalizeValue(e,t,s,r,i,n))).filter((e=>null!=e))}denormalize(e,t){return[e.map?e.map((e=>this.denormalizeValue(e,t))).filter(i).map((([e])=>e)):e,!0,!1]}infer(e,t,s,r){}toJSON(){return[this.schema]}}const o=Symbol("ENTITY WAS DELETED");var c,a=function(e,t){return e(t={exports:{}},t.exports),t.exports}((function(e){e.exports=function(e,t){if(null==e)return{};var s,r,i={},n=Object.keys(e);for(r=0;r<n.length;r++)s=n[r],t.indexOf(s)>=0||(i[s]=e[s]);return i},e.exports.__esModule=!0,e.exports.default=e.exports})),h=(c=a)&&c.__esModule&&Object.prototype.hasOwnProperty.call(c,"default")?c.default:c;const u=["pk","schema","key"];function l(e,t={}){class s extends e{static toString(){return this.key}static toJSON(){return{name:this.name,schema:this.schema,key:this.key}}static pk(e,t,s){return this.prototype.pk.call(e,t,s)}static useIncoming(e,t,s,r){return!0}static shouldReorder(e,t,s,r){return t.fetchedAt<e.fetchedAt}static merge(e,t){return Object.assign({},e,t)}static mergeWithStore(e,t,s,r){return this.useIncoming(e,t,s,r)?typeof r!=typeof s?r:this.shouldReorder(e,t,s,r)?this.merge(r,s):this.merge(s,r):s}static fromJS(e={}){const t=new this(e);return Object.assign(t,e),t}static createIfValid(e){if(!this.validate(e))return this.fromJS(e)}static process(e,t,s){return Object.assign({},e)}static normalize(e,t,s,r,i,n){const o=this.process(e,t,s),c=this.pk(o,t,s);if(void 0===c||""===c)return;const a=this.key;if(a in n||(n[a]={}),c in n[a]||(n[a][c]=[]),n[a][c].some((t=>t===e)))return c;return function(e){if(e){const t=new Error(e);throw t.status=400,t}}(this.validate(o)),n[a][c].push(e),Object.keys(this.schema).forEach((e=>{if(Object.hasOwn(o,e)){const t=this.schema[e];o[e]=r(o[e],o,e,t,i,n)}})),i(this,o,c),c}static validate(e){}static infer(e,t,s){if(!e[0])return;if(["string","number"].includes(typeof e[0]))return`${e[0]}`;const r=this.pk(e[0],void 0,"");if(void 0!==r&&""!==r)return r;const i=function(e,t){return t?t.find((t=>Object.hasOwn(e,t))):void 0}(e[0],this.indexes);if(i&&t[this.key]){return t[this.key][i][e[0][i]]}}static expiresAt(e,t){return e.expiresAt}static denormalize(e,t){if("symbol"==typeof e)return[void 0,!0,!0];let s=!1;return Object.keys(this.schema).forEach((r=>{const i=this.schema[r],n=e[r],[o,,c]=t(n,i);c&&this.defaults[r]&&(s=!0),e[r]=o})),[e,!0,s]}static get defaults(){return Object.hasOwn(this,"__defaults")||Object.defineProperty(this,"__defaults",{value:new this,writable:!0,configurable:!0}),this.__defaults}}const r=h(t,u);if(Object.assign(s,r),"schema"in t?s.schema=t.schema:e.schema||(s.schema={}),"pk"in t?"function"==typeof t.pk?s.prototype.pk=function(e,s){return t.pk(this,e,s)}:s.prototype.pk=function(){return this[t.pk]}:"function"!=typeof e.prototype.pk&&(s.prototype.pk=function(){return this.id}),"key"in t)Object.defineProperty(s,"key",{value:t.key,configurable:!0,writable:!0});else if(!("key"in e)){function i(e){Object.defineProperty(this,"key",{value:e,writable:!0,enumerable:!0})}const n="EntityMixin"!==s.name?function(){const t="EntityMixin"===this.name?e.name:this.name;return console.error("Rest Hooks Error: https://resthooks.io/errors/dklj"),Object.defineProperty(this,"key",{get:()=>t,set:i}),this.key}:function(){return"EntityMixin"===this.name?e.name:this.name};Object.defineProperty(s,"key",{get:n,set:i})}return s}var m=Object.freeze({__proto__:null,Union:class extends r{constructor(e,t){if(!t)throw new Error('Expected option "schemaAttribute" not found on UnionSchema.');super(e,t)}normalize(e,t,s,r,i,n){return this.normalizeValue(e,t,s,r,i,n)}denormalize(e,t){return this.denormalizeValue(e,t)}infer(e,t,s,r){if(!e[0])return;const i=this.getSchemaAttribute(e[0],void 0,""),n=this.schema[i];return void 0!==n?{id:s(n,e,t,r),schema:i}:void 0}},Values:class extends r{normalize(e,t,s,r,i,n){return Object.keys(e).reduce(((t,s,o)=>{const c=e[s];return null!=c?Object.assign({},t,{[s]:this.normalizeValue(c,e,s,r,i,n)}):t}),{})}denormalize(e,t){let s=!0,r=!1;return[Object.keys(e).reduce(((i,n)=>{const o=e[n],[c,a,h]=this.denormalizeValue(o,t);return a||(s=!1),h&&(r=!0),!a||h?i:Object.assign({},i,{[n]:c})}),{}),s,r]}infer(e,t,s){}},Array:n,All:class extends n{constructor(e,t){super(e,t)}normalize(e,t,s,r,i,n){super.normalize(e,t,s,r,i,n)}infer(e,t,s,r){if(this.isSingleSchema){const e=r[this.schema.key];if(void 0===e)return;return Object.values(e).map((e=>e&&this.schema.pk(e)))}let i=!1;const n=Object.values(this.schema).flatMap((e=>r[e.key]?(i=!0,Object.values(r[e.key]).map((t=>({id:t&&e.pk(t),schema:this.getSchemaAttribute(t,void 0,void 0)})))):[]));if(i)return n}},Object:class{constructor(e){this.schema=void 0,this.define(e)}define(e){this.schema=Object.keys(e).reduce(((t,s)=>{const r=e[s];return Object.assign({},t,{[s]:r})}),this.schema||{})}normalize(...e){return((e,t,s,r,i,n,o)=>{const c=Object.assign({},t);return Object.keys(e).forEach((s=>{const r=e[s],a=i(t[s],t,s,r,n,o);null==a?delete c[s]:c[s]=a})),c})(this.schema,...e)}denormalize(...e){return((e,r,i)=>{if(t(r))return s(e,r,i);const n=Object.assign({},r);let o=!0,c=!1;return Object.keys(e).forEach((t=>{const[s,r,a]=i(n[t],e[t]);void 0!==n[t]&&(n[t]=s),a&&(c=!0),r||(o=!1)})),[n,o,c]})(this.schema,...e)}infer(e,t,s,r){return function(e,t,s,r,i){const n={};return Object.keys(e).forEach((o=>{n[o]=r(e[o],t,s,i)})),n}(this.schema,e,t,s,r)}},Delete:class{constructor(e){this._entity=e}get key(){return this._entity.key}normalize(e,t,s,r,i,n){const c=this._entity.process(e,t,s),a=this._entity.pk(c,t,s);return i(this,o,a),a}infer(e,t,s){}denormalize(e,t){return t(e,this._entity)}_denormalizeNullable(){return[]}_normalizeNullable(){return[]}merge(e,t){return t}useIncoming(e,t,s,r){return e.date<=t.date}},Entity:l});const f=class{};class d extends(l(f)){static useIncoming(e,t,s,r){return e.fetchedAt<=t.fetchedAt}static mergeWithStore(e,t,s,r){return!e||this.useIncoming(e,t,s,r)?typeof r!=typeof s?r:this.merge(s,r):s}static process(e,t,s){return super.process(e,t,s)}static validate(e){return super.validate(e)}static denormalize(e,r){if("symbol"==typeof e)return[void 0,!0,!0];if(t(e)){if(this.validate(e.toJS()))return[void 0,!1,!0];null==r.setLocal||r.setLocal(e);const[t,i,n]=s(this.schema,e,r);return[this.fromJS(t.toObject()),!0,n]}let i;if(e instanceof this)i=e;else{if(this.validate(e))return[void 0,!1,!0];i=this.fromJS(e),null==r.setLocal||r.setLocal(i)}let n=!1;return Object.keys(this.schema).forEach((t=>{const s=this.schema[t],o=e[t],[c,,a]=r(o,s);a&&this.defaults[t]&&(n=!0),e[t]!==c&&this.set(i,t,c)})),[i,!0,n]}static set(e,t,s){e[t]=s}}let p=!1;try{Function()}catch(e){p=!0,console.error("Content Security Policy: The previous CSP log can be safely ignored - @rest-hooks/endpoint will use setPrototypeOf instead")}function y(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)}class b extends Function{constructor(e,t){let s,r;return p?(s=(...e)=>s.fetch(...e),Object.setPrototypeOf(s,new.target.prototype)):(super("return arguments.callee.fetch.apply(arguments.callee, arguments)"),s=this),s.getFetchKey=e=>s.key(e),e&&(s.fetch=e),t&&"name"in t||!e||!e.name||"anonymous"===e.name||(r=e.name),Object.defineProperty(s,"name",{get(){return r||this.__name},set(e){this.__name=e}}),Object.assign(s,t),y(s,t),s}key(...e){return`${this.name} ${JSON.stringify(e)}`}testKey(e){return e.startsWith(this.name)}bind(e,...t){const s=this.fetch,r=this.key;return this.extend({fetch(){return s.apply(null!=e?e:this,t)},key(){return r.apply(this,t)}})}extend(e){class t extends this.constructor{}Object.assign(t.prototype,this);const s=new t(e.fetch,e);return y(s,Object.assign({},this.options,e)),s}}"runCompat"!==y.name&&(b.prototype.key=function(...e){return console.error("Rest Hooks Error: https://resthooks.io/errors/osid"),`${this.name} ${JSON.stringify(e)}`});const g=b;class O extends Error{}Object.hasOwn=Object.hasOwn||function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},e.AbortOptimistic=O,e.DELETED=o,e.Endpoint=b,e.Entity=d,e.ExtendableEndpoint=g,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)}},e.Query=class{constructor(e,t){this.sideEffect=void 0,this.schema=this.createQuerySchema(e),t?this.process=t:this.process||(this.process=e=>e)}key(...e){return`QUERY ${JSON.stringify(e)}`}createQuerySchema(e){const t=Object.create(e);return t.denormalize=({args:t,input:s},r)=>{if(void 0===s)return[void 0,!1,!0];const[i,n,o]=e.denormalize(s,r);return[n?this.process(i,...t):void 0,n,o]},t.infer=(t,s,r,i)=>({args:t,input:r(e,t,s,i)}),t}},e.schema=m,e.validateRequired=function(e,t){let s="";if(Object.keys(t).some((t=>!Object.hasOwn(e,t)&&(s=t,!0))))return`Missing key ${s}`},Object.defineProperty(e,"__esModule",{value:!0})}));

@@ -159,3 +159,3 @@ import _objectWithoutPropertiesLoose from "@babel/runtime/helpers/objectWithoutPropertiesLoose";

Or use debugging tools: https://resthooks.io/docs/guides/debugging
Learn more about nesting schemas: https://resthooks.io/rest/guides/nested-response
Learn more about nesting schemas: https://resthooks.io/rest/guides/relational-data

@@ -268,6 +268,7 @@ Entity keys: ${Object.keys(this.defaults)}

CLASSNAMEMANGLING ? /* istanbul ignore next */function () {
const name = this.name === 'EntityMixin' ? Base.name : this.name;
console.error('Rest Hooks Error: https://resthooks.io/errors/dklj');
Object.defineProperty(this, 'key', {
get() {
return Base.name;
return name;
},

@@ -303,2 +304,2 @@ set

}
//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJuYW1lcyI6WyJFbnRpdHlTY2hlbWEiLCJCYXNlIiwib3B0aW9ucyIsIkVudGl0eU1peGluIiwidG9TdHJpbmciLCJrZXkiLCJ0b0pTT04iLCJuYW1lIiwic2NoZW1hIiwicGsiLCJ2YWx1ZSIsInBhcmVudCIsInByb3RvdHlwZSIsImNhbGwiLCJ1c2VJbmNvbWluZyIsImV4aXN0aW5nTWV0YSIsImluY29taW5nTWV0YSIsImV4aXN0aW5nIiwiaW5jb21pbmciLCJzaG91bGRSZW9yZGVyIiwiZmV0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ICAgIGlmIChPYmplY3QuaGFzT3duKHByb2Nlc3NlZEVudGl0eSwga2V5KSkge1xuICAgICAgICAgIGNvbnN0IHNjaGVtYSA9IHRoaXMuc2NoZW1hW2tleV07XG4gICAgICAgICAgcHJvY2Vzc2VkRW50aXR5W2tleV0gPSB2aXNpdChcbiAgICAgICAgICAgIHByb2Nlc3NlZEVudGl0eVtrZXldLFxuICAgICAgICAgICAgcHJvY2Vzc2VkRW50aXR5LFxuICAgICAgICAgICAga2V5LFxuICAgICAgICAgICAgc2NoZW1hLFxuICAgICAgICAgICAgYWRkRW50aXR5LFxuICAgICAgICAgICAgdmlzaXRlZEVudGl0aWVzLFxuICAgICAgICAgICk7XG4gICAgICAgIH1cbiAgICAgIH0pO1xuXG4gICAgICBhZGRFbnRpdHkodGhpcywgcHJvY2Vzc2VkRW50aXR5LCBpZCk7XG4gICAgICByZXR1cm4gaWQ7XG4gICAgfVxuXG4gICAgc3RhdGljIHZhbGlkYXRlKHByb2Nlc3NlZEVudGl0eTogYW55KTogc3RyaW5nIHwgdW5kZWZpbmVkIHtcbiAgICAgIGlmIChwcm9jZXNzLmVudi5OT0RFX0VOViAhPT0gJ3Byb2R1Y3Rpb24nKSB7XG4gICAgICAgIGZvciAoY29uc3Qga2V5IG9mIE9iamVjdC5rZXlzKHRoaXMuc2NoZW1hKSkge1xuICAgICAgICAgIGlmICghT2JqZWN0Lmhhc093bihwcm9jZXNzZWRFbnRpdHksIGtleSkpIHtcbiAgICAgICAgICAgIGlmICghT2JqZWN0Lmhhc093bih0aGlzLmRlZmF1bHRzLCBrZXkpKSB7XG4gICAgICAgICAgICAgIHJldHVybiBgU2NoZW1hIGtleSBpcyBtaXNzaW5nIGluIEVudGl0eVxuXG4gIEJlIHN1cmUgYWxsIHNjaGVtYSBtZW1iZXJzIGFyZSBhbHNvIHBhcnQgb2YgdGhlIGVudGl0eVxuICBPciB1c2UgZGVidWdnaW5nIHRvb2xzOiBodHRwczovL3Jlc3Rob29rcy5pby9kb2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gICAgICBjb25zb2xlLmVycm9yKCdSZXN0IEhvb2tzIEVycm9yOiBodHRwczovL3Jlc3Rob29rcy5pby9lcnJvcnMvZGtsaicpO1xuICAgICAgICAgICAgT2JqZWN0LmRlZmluZVByb3BlcnR5KHRoaXMsICdrZXknLCB7XG4gICAgICAgICAgICAgIGdldCgpIHtcbiAgICAgICAgICAgICAgICByZXR1cm4gQmFzZS5uYW1lO1xuICAgICAgICAgICAgICB9LFxuICAgICAgICAgICAgICBzZXQsXG4gICAgICAgICAgICB9KTtcbiAgICAgICAgICAgIHJldHVybiB0aGlzLmtleTtcbiAgICAgICAgICB9XG4gICAgICAgIDogZnVuY3Rpb24gKHRoaXM6IHsgbmFtZTogc3RyaW5nIH0pOiBzdHJpbmcge1xuICAgICAgICAgICAgY29uc3QgbmFtZSA9IHRoaXMubmFtZSA9PT0gJ0VudGl0eU1peGluJyA/IEJhc2UubmFtZSA6IHRoaXMubmFtZTtcbiAgICAgICAgICAgIC8qIGlzdGFuYnVsIGlnbm9yZSBuZXh0ICovXG4gICAgICAgICAgICBpZiAoXG4gICAgICAgICAgICAgIHByb2Nlc3MuZW52Lk5PREVfRU5WICE9PSAncHJvZHVjdGlvbicgJiZcbiAgICAgICAgICAgICAgKG5hbWUgPT09ICcnIHx8IG5hbWUgPT09ICdFbnRpdHlNaXhpbicgfHwgbmFtZSA9PT0gJ190ZW1wJylcbiAgICAgICAgICAgIClcbiAgICAgICAgICAgICAgdGhyb3cgbmV3IEVycm9yKFxuICAgICAgICAgICAgICAgICdFbnRpdHkgY2xhc3NlcyB3aXRob3V0IGEgbmFtZSBtdXN0IGRlZmluZSBgc3RhdGljIGtleWBcXG5TZWU6IGh0dHBzOi8vcmVzdGhvb2tzLmlvL3Jlc3QvYXBpL0VudGl0eSNrZXknLFxuICAgICAgICAgICAgICApO1xuICAgICAgICAgICAgcmV0dXJuIG5hbWU7XG4gICAgICAgICAgfTtcblxuICAgIE9iamVjdC5kZWZpbmVQcm9wZXJ0eShFbn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W5nOiBhbnksXG4gICAgKSB7XG4gICAgICBjb25zdCB1c2VJbmNvbWluZyA9IHRoaXMudXNlSW5jb21pbmcoXG4gICAgICAgIGV4aXN0aW5nTWV0YSxcbiAgICAgICAgaW5jb21pbmdNZXRhLFxuICAgICAgICBleGlzdGluZyxcbiAgICAgICAgaW5jb21pbmcsXG4gICAgICApO1xuXG4gICAgICBpZiAodXNlSW5jb21pbmcpIHtcbiAgICAgICAgLy8gZGlzdGluY3QgdHlwZXMgYXJlIG5vdCBtZXJnZWFibGUgKGxpa2UgZGVsZXRlIHN5bWJvbCksIHNvIGp1c3QgcmVwbGFjZVxuICAgICAgICBpZiAodHlwZW9mIGluY29taW5nICE9PSB0eXBlb2YgZXhpc3RpbmcpIHtcbiAgICAgICAgICByZXR1cm4gaW5jb21pbmc7XG4gICAgICAgIH0gZWxzZSB7XG4gICAgICAgICAgcmV0dXJuIHRoaXMuc2hvdWxkUmVvcmRlcihcbiAgICAgICAgICAgIGV4aXN0aW5nTWV0YSxcbiAgICAgICAgICAgIGluY29taW5nTWV0YSxcbiAgICAgICAgICAgIGV4aXN0aW5nLFxuICAgICAgICAgICAgaW5jb21pbmcsXG4gICAgICAgICAgKVxuICAgICAgICAgICAgPyB0aGlzLm1lcmdlKGluY29taW5nLCBleGlzdGluZylcbiAgICAgICAgICAgIDogdGhpcy5tZXJnZShleGlzdGluZywgaW5jb21pbmcpO1xuICAgICAgICB9XG4gICAgICB9IGVsc2Uge1xuICAgICAgICByZXR1cm4gZXhpc3Rpbmc7XG4gICAgICB9XG4gICAgfVxuXG4gICAgLyoqIEZhY3RvcnkgbWV0aG9kIHRvIGNvbnZlcnQgZnJvbSBQbGFpbiBKUyBPYmplY3RzLlxuICAgICAqXG4gICAgICogQHBhcmFtIFtwcm9wc10gUGxhaW4gT2JqZWN0IG9mIHByb3BlcnRpZXMgdG8gYXNzaWduLlxuICAgICAqL1xuICAgIHN0YXRpYyBmcm9tSlM8VCBleHRlbmRzIHR5cGVvZiBFb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50aXR5VHlwZV0gPSB7fTtcbiAgICAgIH1cbiAgICAgIGlmICghKGlkIGluIHZpc2l0ZWRFbnRpdGllc1tlbnRpdHlUeXBlXSkpIHtcbiAgICAgICAgdmlzaXRlZEVudGl0aWVzW2VudGl0eVR5cGVdW2lkXSA9IFtdO1xuICAgICAgfVxuICAgICAgaWYgKFxuICAgICAgICB2aXNpdGVkRW50aXRpZXNbZW50aXR5VHlwZV1baWRdLnNvbWUoKGVudGl0eTogYW55KSA9PiBlbnRpdHkgPT09IGlucHV0KVxuICAgICAgKSB7XG4gICAgICAgIHJldHVybiBpZDtcbiAgICAgIH1cbiAgICAgIGNvbnN0IGVycm9yTWVzc2FnZSA9IHRoaXMudmFsaWRhdGUocHJvY2Vzc2VkRW50aXR5KTtcbiAgICAgIHRocm93VmFsaWRhdGlvbkVycm9yKGVycm9yTWVzc2FnZSk7XG5cbiAgICAgIHZpc2l0ZWRFbnRpdGllc1tlbnRpdHlUeXBlXVtpZF0ucHVzaChpbnB1dCk7XG5cbiAgICAgIE9iamVjdC5rZXlzKHRoaXMuc2NoZW1hKS5mb3JFYWNoKGtleSA9PiB7XG4gICAgICAgIGlmIChPYmplY3QuaGFzT3duKHByb2Nlc3NlZEVudGl0eSwga2V5KSkge1xuICAgICAgICAgIGNvbnN0IHNjaGVtYSA9IHRoaXMuc2NoZW1hW2tleV07XG4gICAgICAgICAgcHJvY2Vzc2VkRW50aXR5W2tleV0gPSB2aXNpdChcbiAgICAgICAgICAgIHByb2Nlc3NlZEVudGl0eVtrZXldLFxuICAgICAgICAgICAgcHJvY2Vzc2VkRW50aXR5LFxuICAgICAgICAgICAga2V5LFxuICAgICAgICAgICAgc2NoZW1hLFxuICAgICAgICAgICAgYWRkRW50aXR5LFxuICAgICAgICAgICAgdmlzaXRlZEVudGl0aWVzLFxuICAgICAgICAgICk7XG4gICAgICAgIH1cbiAgICAgIH0pO1xuXG4gICAgICBhZGRFbnRpdHkodGhpcywgcHJvY2Vzc2VkRW50aXR5L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h0LWxpbmUgbm8taW5uZXItZGVjbGFyYXRpb25zXG4gICAgZnVuY3Rpb24gc2V0KHRoaXM6IGFueSwgdmFsdWU6IHN0cmluZykge1xuICAgICAgT2JqZWN0LmRlZmluZVByb3BlcnR5KHRoaXMsICdrZXknLCB7XG4gICAgICAgIHZhbHVlLFxuICAgICAgICB3cml0YWJsZTogdHJ1ZSxcbiAgICAgICAgZW51bWVyYWJsZTogdHJ1ZSxcbiAgICAgIH0pO1xuICAgIH1cbiAgICBjb25zdCBDTEFTU05BTUVNQU5HTElORyA9IEVudGl0eU1peGluLm5hbWUgIT09ICdFbnRpdHlNaXhpbic7XG4gICAgY29uc3QgZ2V0ID1cbiAgICAgIC8qIGlzdGFuYnVsIGlnbm9yZSBpZiAqL1xuICAgICAgQ0xBU1NOQU1FTUFOR0xJTkdcbiAgICAgICAgPyAvKiBpc3RhbmJ1bCBpZ25vcmUgbmV4dCAqLyBmdW5jdGlvbiAodGhpczoge1xuICAgICAgICAgICAgbmFtZTogc3RyaW5nO1xuICAgICAgICAgICAga2V5OiBzdHJpbmc7XG4gICAgICAgICAgfSk6IHN0cmluZyB7XG4gICAgICAgICAgICBjb25zdCBuYW1lID0gdGhpcy5uYW1lID09PSAnRW50aXR5TWl4aW4nID8gQmFzZS5uYW1lIDogdGhpcy5uYW1lO1xuICAgICAgICAgICAgY29uc29sZS5lcnJvcignUmVzdCBIb29rcyBFcnJvcjogaHR0cHM6Ly9yZXN0aG9va3MuaW8vZXJyb3JzL2RrbGonKTtcbiAgICAgICAgICAgIE9iamVjdC5kZWZpbmVQcm9wZXJ0eSh0aGlzLCAna2V5Jywge1xuICAgICAgICAgICAgICBnZXQoKSB7XG4gICAgICAgICAgICAgICAgcmV0dXJuIG5hbWU7XG4gICAgICAgICAgICAgIH0sXG4gICAgICAgICAgICAgIHNldCxcbiAgICAgICAgICAgIH0pO1xuICAgICAgICAgICAgcmV0dXJuIHRoaXMua2V5O1xuICAgICAgICAgIH1cbiAgICAgICAgOiBmdW5jdGlvbiAodGhpczogeyBuYW1lOiBzdHJpbmcgfSk6IHN0cmluZyB7XG4gICAgICAgICAgICBjb25zdCBuYW1lID0gdGhpcy5uYW1lID09PSAnRW50aXR5TWl4aW4nID8gQmFzZS5uYW1lIDogdGhpcy5uYW1lO1xuICAgICAgICAgICAgLyogaXN0YW5idWwgaWdub3JlIG5leHQgKi9cbiAgICAgICAgICAgIGlmIChcbiAgICAgICAgICAgICAgcHJvY2Vzcy5lbnYuTk9ERV9FTlYgIT09ICdwcm9kdWN0aW9uJyAmJlxuICAgICAgICAgICAgICAobmFtZSA9PT0gJycgfHwgbmFtZSA9PT0gJ0VudGl0eU1peGluJyB8fCBuYW1lID09PSAnX3RlbXAnKVxuICAgICAgICAgICAgKVxuICAgICAgICAgICAgICB0aHJvdyBuZXcgRXJyb3IoXG4gICAgICAgICAgICAgICAgJ0VudGl0eSBjbGFzc2VzIHdpdGhvdXQgYSBuYW1lIG11c3QgZGVmaW5lIGBzdGF0aWMga2V5YFxcblNlZTogaHR0cHM6Ly9yZXN0aG9va3MuaW8vcmVzdC9hcGkvRW50aXR5I2tleScsXG4gICAgICAgICAgICAgICk7XG4gICAgICAgICAgICByZXR1cm4gbmFtZTtcbiAgICAgICAgICB9O1xuXG4gICAgT2JqZWN0LmRlZmluZVByb3BlcnR5KEVudGl0eU1peGluLCAna2V5Jywge1xuICAgICAgZ2V0LFxuICAgICAgc2V0LFxuICAgIH0pO1xuICB9XG5cbiAgcmV0dXJuIEVudGl0eU1peGluIGFzIGFueTtcbn1cblxuZnVuY3Rpb24gaW5kZXhGcm9tUGFyYW1zPEkgZXh0ZW5kcyBzdHJpbmc+KFxuICBwYXJhbXM6IFJlYWRvbmx5PG9iamVjdD4sXG4gIGluZGV4ZXM/OiBSZWFkb25seTxJW10+LFxuKSB7XG4gIGlmICghaW5kZXhlcykgcmV0dXJuIHVuZGVmaW5lZDtcbiAgcmV0dXJuIGluZGV4ZXMuZmluZChpbmRleCA9PiBPYmplY3Qu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FhLEdBQUdOLElBQUksQ0FBQ00sSUFBSSxHQUFHLElBQUksQ0FBQ0EsSUFBSTtNQUNoRTtNQUNBLElBQ0V3QixPQUFPLENBQUNRLEdBQUcsQ0FBQ0MsUUFBUSxLQUFLLFlBQVksS0FDcENqQyxJQUFJLEtBQUssRUFBRSxJQUFJQSxJQUFJLEtBQUssYUFBYSxJQUFJQSxJQUFJLEtBQUssT0FBTyxDQUFDLEVBRTNELE1BQU0sSUFBSW1DLEtBQUssQ0FDYix1R0FBdUcsQ0FDeEc7TUFDSCxPQUFPbkMsSUFBSTtJQUNiLENBQUM7SUFFUGUsTUFBTSxDQUFDZ0QsY0FBYyxDQUFDbkUsV0FBVyxFQUFFLEtBQUssRUFBRTtNQUN4QzZFLEdBQUc7TUFDSEg7SUFDRixDQUFDLENBQUM7RUFDSjtFQUVBLE9BQU8xRSxXQUFXO0FBQ3BCO0FBRUEsU0FBUzJELGVBQWVBLENBQ3RCb0IsTUFBd0IsRUFDeEJ4QixPQUF1QixFQUN2QjtFQUNBLElBQUksQ0FBQ0EsT0FBTyxFQUFFLE9BQU81QixTQUFTO0VBQzlCLE9BQU80QixPQUFPLENBQUN5QixJQUFJLENBQUNDLEtBQUssSUFBSTlELE1BQU0sQ0FBQ2dDLE1BQU0sQ0FBQzRCLE1BQU0sRUFBRUUsS0FBSyxDQUFDLENBQUM7QUFDNUQ7O0FBRUE7QUFDQSxTQUFTbEMsb0JBQW9CQSxDQUFDRCxZQUFnQyxFQUFFO0VBQzlELElBQUlBLFlBQVksRUFBRTtJQUNoQixNQUFNUixLQUFLLEdBQUcsSUFBSUMsS0FBSyxDQUFDTyxZQUFZLENBQUM7SUFDcENSLEtBQUssQ0FBU0ksTUFBTSxHQUFHLEdBQUc7SUFDM0IsTUFBTUosS0FBSztFQUNiO0FBQ0YifQ==

@@ -162,3 +162,3 @@ /* eslint-disable @typescript-eslint/explicit-module-boundary-types */

Or use debugging tools: https://resthooks.io/docs/guides/debugging
Learn more about nesting schemas: https://resthooks.io/rest/guides/nested-response
Learn more about nesting schemas: https://resthooks.io/rest/guides/relational-data

@@ -272,6 +272,7 @@ Entity keys: ${Object.keys(this.defaults)}

CLASSNAMEMANGLING ? /* istanbul ignore next */function () {
const name = this.name === 'EntityMixin' ? Base.name : this.name;
console.error('Rest Hooks Error: https://resthooks.io/errors/dklj');
Object.defineProperty(this, 'key', {
get() {
return Base.name;
return name;
},

@@ -307,2 +308,2 @@ set

}
//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJuYW1lcyI6WyJFbnRpdHlTY2hlbWEiLCJCYXNlIiwib3B0aW9ucyIsIkVudGl0eU1peGluIiwidG9TdHJpbmciLCJrZXkiLCJ0b0pTT04iLCJuYW1lIiwic2NoZW1hIiwicGsiLCJ2YWx1ZSIsInBhcmVudCIsInByb3RvdHlwZSIsImNhbGwiLCJ1c2VJbmNvbWluZyIsImV4aXN0aW5nTWV0YSIsImluY29taW5nTWV0YSIsImV4aXN0aW5nIiwiaW5jb21pbmciLCJzaG91bGRSZW9yZGVyIiwiZmV0Y2hlZEF0IiwibWVyZ2UiLCJtZXJnZVdpdGhTdG9yZSIsImZyb21KUyIsInByb3BzIiwiaW5zdGFuY2UiLCJPYmplY3QiLCJhc3NpZ24iLCJjcmVhdGVJZlZhbGlkIiwidmFsaWRhdGUiLCJ1bmRlZmluZWQiLCJwcm9jZXNzIiwiaW5wdXQiLCJub3JtYWxpemUiLCJ2aXNpdCIsImFkZEVudGl0eSIsInZpc2l0ZWRFbnRpdGllcyIsInByb2Nlc3NlZEVudGl0eSIsImlkIiwiZW52IiwiTk9ERV9FTlYiLCJlcnJvciIsIkVycm9yIiwiSlNPTiIsInN0cmluZ2lmeSIsInN0YXR1cyIsImVudGl0eVR5cGUiLCJzb21lIiwiZW50aXR5IiwiZXJyb3JNZXNzYWdlIiwidGhyb3dWYWxpZGF0aW9uRXJyb3IiLCJwdXNoIiwia2V5cyIsImZvckVhY2giLCJoYXNPd24iLC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91bGRSZW9yZGVyKFxuICAgICAgZXhpc3RpbmdNZXRhOiB7IGRhdGU6IG51bWJlcjsgZmV0Y2hlZEF0OiBudW1iZXIgfSxcbiAgICAgIGluY29taW5nTWV0YTogeyBkYXRlOiBudW1iZXI7IGZldGNoZWRBdDogbnVtYmVyIH0sXG4gICAgICBleGlzdGluZzogYW55LFxuICAgICAgaW5jb21pbmc6IGFueSxcbiAgICApIHtcbiAgICAgIHJldHVybiBpbmNvbWluZ01ldGEuZmV0Y2hlZEF0IDwgZXhpc3RpbmdNZXRhLmZldGNoZWRBdDtcbiAgICB9XG5cbiAgICAvKiogQ3JlYXRlcyBuZXcgaW5zdGFuY2UgY29weWluZyBvdmVyIGRlZmluZWQgdmFsdWVzIG9mIGFyZ3VtZW50cyAqL1xuICAgIHN0YXRpYyBtZXJnZShleGlzdGluZzogYW55LCBpbmNvbWluZzogYW55KSB7XG4gICAgICByZXR1cm4ge1xuICAgICAgICAuLi5leGlzdGluZyxcbiAgICAgICAgLi4uaW5jb21pbmcsXG4gICAgICB9O1xuICAgIH1cblxuICAgIC8qKiBSdW4gd2hlbiBhbiBleGlzdGluZyBlbnRpdHkgaXMgZm91bmQgaW4gdGhlIHN0b3JlICovXG4gICAgc3RhdGljIG1lcmdlV2l0aFN0b3JlKFxuICAgICAgZXhpc3RpbmdNZXRhOiB7XG4gICAgICAgIGRhdGU6IG51bWJlcjtcbiAgICAgICAgZmV0Y2hlZEF0OiBudW1iZXI7XG4gICAgICB9LFxuICAgICAgaW5jb21pbmdNZXRhOiB7IGRhdGU6IG51bWJlcjsgZmV0Y2hlZEF0OiBudW1iZXIgfSxcbiAgICAgIGV4aXN0aW5nOiBhbnksXG4gICAgICBpbmNvbWluZzogYW55LFxuICAgICkge1xuICAgICAgY29uc3QgdXNlSW5jb21pbmcgPSB0aGlzLnVzZUluY29taW5nKFxuICAgICAgICBleGlzdGluZ01ldGEsXG4gICAgICAgIGluY29taW5nTWV0YSxcbiAgICAgICAgZXhpc3Rpbm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HtcbiAgICAgIE9iamVjdC5kZWZpbmVQcm9wZXJ0eSh0aGlzLCAna2V5Jywge1xuICAgICAgICB2YWx1ZSxcbiAgICAgICAgd3JpdGFibGU6IHRydWUsXG4gICAgICAgIGVudW1lcmFibGU6IHRydWUsXG4gICAgICB9KTtcbiAgICB9XG4gICAgY29uc3QgQ0xBU1NOQU1FTUFOR0xJTkcgPSBFbnRpdHlNaXhpbi5uYW1lICE9PSAnRW50aXR5TWl4aW4nO1xuICAgIGNvbnN0IGdldCA9XG4gICAgICAvKiBpc3RhbmJ1bCBpZ25vcmUgaWYgKi9cbiAgICAgIENMQVNTTkFNRU1BTkdMSU5HXG4gICAgICAgID8gLyogaXN0YW5idWwgaWdub3JlIG5leHQgKi8gZnVuY3Rpb24gKHRoaXM6IHtcbiAgICAgICAgICAgIG5hbWU6IHN0cmluZztcbiAgICAgICAgICAgIGtleTogc3RyaW5nO1xuICAgICAgICAgIH0pOiBzdHJpbmcge1xuICAgICAgICAgICAgY29uc29sZS5lcnJvcignUmVzdCBIb29rcyBFcnJvcjogaHR0cHM6Ly9yZXN0aG9va3MuaW8vZXJyb3JzL2RrbGonKTtcbiAgICAgICAgICAgIE9iamVjdC5kZWZpbmVQcm9wZXJ0eSh0aGlzLCAna2V5Jywge1xuICAgICAgICAgICAgICBnZXQoKSB7XG4gICAgICAgICAgICAgICAgcmV0dXJuIEJhc2UubmFtZTtcbiAgICAgICAgICAgICAgfSxcbiAgICAgICAgICAgICAgc2V0LFxuICAgICAgICAgICAgfSk7XG4gICAgICAgICAgICByZXR1cm4gdGhpcy5rZXk7XG4gICAgICAgICAgfVxuICAgICAgICA6IGZ1bmN0aW9uICh0aGlzOiB7IG5hbWU6IHN0cmluZyB9KTogc3RyaW5nIHtcbiAgICAgICAgICAgIGNvbnN0IG5hbWUgPSB0aGlzLm5hbWUgPT09ICdFbnRpdHlNaXhpbicgPyBCYXNlLm5hbWUgOiB0aGlzLm5hbWU7XG4gICAgICAgICAgICAvKiBpc3Rh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biAgICAgIGluY29taW5nTWV0YTogeyBkYXRlOiBudW1iZXI7IGZldGNoZWRBdDogbnVtYmVyIH0sXG4gICAgICBleGlzdGluZzogYW55LFxuICAgICAgaW5jb21pbmc6IGFueSxcbiAgICApIHtcbiAgICAgIHJldHVybiB0cnVlO1xuICAgIH1cblxuICAgIC8qKiBEZXRlcm1pbmVzIHRoZSBvcmRlciBvZiBpbmNvbWluZyBlbnRpdHkgdnMgZW50aXR5IGFscmVhZHkgaW4gc3RvcmVcXFxuICAgICAqXG4gICAgICogQHNlZSBodHRwczovL3Jlc3Rob29rcy5pby9kb2NzL2FwaS9zY2hlbWEuRW50aXR5I3Nob3VsZFJlb3JkZXJcbiAgICAgKiBAcmV0dXJucyB0cnVlIGlmIGluY29taW5nIGVudGl0eSBzaG91bGQgYmUgZmlyc3QgYXJndW1lbnQgb2YgbWVyZ2UoKVxuICAgICAqL1xuICAgIHN0YXRpYyBzaG91bGRSZW9yZGVyKFxuICAgICAgZXhpc3RpbmdNZXRhOiB7IGRhdGU6IG51bWJlcjsgZmV0Y2hlZEF0OiBudW1iZXIgfSxcbiAgICAgIGluY29taW5nTWV0YTogeyBkYXRlOiBudW1iZXI7IGZldGNoZWRBdDogbnVtYmVyIH0sXG4gICAgICBleGlzdGluZzogYW55LFxuICAgICAgaW5jb21pbmc6IGFueSxcbiAgICApIHtcbiAgICAgIHJldHVybiBpbmNvbWluZ01ldGEuZmV0Y2hlZEF0IDwgZXhpc3RpbmdNZXRhLmZldGNoZWRBdDtcbiAgICB9XG5cbiAgICAvKiogQ3JlYXRlcyBuZXcgaW5zdGFuY2UgY29weWluZyBvdmVyIGRlZmluZWQgdmFsdWVzIG9mIGFyZ3VtZW50cyAqL1xuICAgIHN0YXRpYyBtZXJnZShleGlzdGluZzogYW55LCBpbmNvbWluZzogYW55KSB7XG4gICAgICByZXR1cm4ge1xuICAgICAgICAuLi5leGlzdGluZyxcbiAgICAgICAgLi4uaW5jb21pbmcsXG4gICAgICB9O1xuICAgIH1cblxuICAgIC8qKiBSdW4gd2hlbiBhbiBleGlzdGluZyBlbnRpdHkgaXMgZm91bmQgaW4gdGhlIHN0b3JlICovXG4gICAgc3RhdGljIG1lcmdlV2l0aFN0b3JlKFxuICAgICAgZXhpc3RpbmdNZXRhOiB7XG4gICAgICAgIGRhdGU6IG51bWJlcjtcbiAgICAgICAgZmV0Y2hlZEF0OiBudW1iZXI7XG4gICAgICB9LFxuICAgICAgaW5jb21pbmdNZXRhOiB7IGRhdGU6IG51bWJlcjsgZmV0Y2hlZEF0OiBudW1iZXIgfSxcbiAgICAgIGV4aXN0aW5nOiBhbnksXG4gICAgICBpbmNvbWluZzogYW55LFxuICAgICkge1xuICAgICAgY29uc3QgdXNlSW5jb21pbmcgPSB0aGlzLnVzZUluY29taW5nKFxuICAgICAgICBleGlzdGluZ01ldGEsXG4gICAgICAgIGluY29taW5nTWV0YSxcbiAgICAgICAgZXhpc3RpbmcsXG4gICAgICAgIGluY29taW5nLFxuICAgICAgKTtcblxuICAgICAgaWYgKHVzZUluY29taW5nKSB7XG4gICAgICAgIC8vIGRpc3RpbmN0IHR5cGVzIGFyZSBub3QgbWVyZ2VhYmxlIChsaWtlIGRlbGV0ZSBzeW1ib2wpLCBzbyBqdXN0IHJlcGxhY2VcbiAgICAgICAgaWYgKHR5cGVvZiBpbmNvbWluZyAhPT0gdHlwZW9mIGV4aXN0aW5nKSB7XG4gICAgICAgICAgcmV0dXJuIGluY29taW5nO1xuICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgIHJldHVybiB0aGlzLnNob3VsZFJlb3JkZXIoXG4gICAgICAgICAgICBleGlzdGluZ01ldGEsXG4gICAgICAgICAgICBpbmNvbWluZ01ldGEsXG4gICAgICAgICAgICBleGlzdGluZyxcbiAgICAgICAgICAgIGluY29taW5nLFxuICAgICAgICAgIClcbiAgICAgICAgICAgID8gdGhpcy5tZXJnZShpbmNvbWluZywgZXhpc3RpbmcpXG4gICAgICAgICAgICA6IHRoaXMubWVyZ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0VudGl0eU1peGluJyA/IEJhc2UubmFtZSA6IHRoaXMubmFtZTtcbiAgICAgICAgICAgIGNvbnNvbGUuZXJyb3IoJ1Jlc3QgSG9va3MgRXJyb3I6IGh0dHBzOi8vcmVzdGhvb2tzLmlvL2Vycm9ycy9ka2xqJyk7XG4gICAgICAgICAgICBPYmplY3QuZGVmaW5lUHJvcGVydHkodGhpcywgJ2tleScsIHtcbiAgICAgICAgICAgICAgZ2V0KCkge1xuICAgICAgICAgICAgICAgIHJldHVybiBuYW1lO1xuICAgICAgICAgICAgICB9LFxuICAgICAgICAgICAgICBzZXQsXG4gICAgICAgICAgICB9KTtcbiAgICAgICAgICAgIHJldHVybiB0aGlzLmtleTtcbiAgICAgICAgICB9XG4gICAgICAgIDogZnVuY3Rpb24gKHRoaXM6IHsgbmFtZTogc3RyaW5nIH0pOiBzdHJpbmcge1xuICAgICAgICAgICAgY29uc3QgbmFtZSA9IHRoaXMubmFtZSA9PT0gJ0VudGl0eU1peGluJyA/IEJhc2UubmFtZSA6IHRoaXMubmFtZTtcbiAgICAgICAgICAgIC8qIGlzdGFuYnVsIGlnbm9yZSBuZXh0ICovXG4gICAgICAgICAgICBpZiAoXG4gICAgICAgICAgICAgIHByb2Nlc3MuZW52Lk5PREVfRU5WICE9PSAncHJvZHVjdGlvbicgJiZcbiAgICAgICAgICAgICAgKG5hbWUgPT09ICcnIHx8IG5hbWUgPT09ICdFbnRpdHlNaXhpbicgfHwgbmFtZSA9PT0gJ190ZW1wJylcbiAgICAgICAgICAgIClcbiAgICAgICAgICAgICAgdGhyb3cgbmV3IEVycm9yKFxuICAgICAgICAgICAgICAgICdFbnRpdHkgY2xhc3NlcyB3aXRob3V0IGEgbmFtZSBtdXN0IGRlZmluZSBgc3RhdGljIGtleWBcXG5TZWU6IGh0dHBzOi8vcmVzdGhvb2tzLmlvL3Jlc3QvYXBpL0VudGl0eSNrZXknLFxuICAgICAgICAgICAgICApO1xuICAgICAgICAgICAgcmV0dXJuIG5hbWU7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xNQUFNLENBQUM0QixNQUFNLENBQUMwQixNQUFNLEVBQUVFLEtBQUssQ0FBQyxDQUFDO0FBQzVEOztBQUVBO0FBQ0EsU0FBU2hDLG9CQUFvQkEsQ0FBQ0QsWUFBZ0MsRUFBRTtFQUM5RCxJQUFJQSxZQUFZLEVBQUU7SUFDaEIsTUFBTVIsS0FBSyxHQUFHLElBQUlDLEtBQUssQ0FBQ08sWUFBWSxDQUFDO0lBQ3BDUixLQUFLLENBQVNJLE1BQU0sR0FBRyxHQUFHO0lBQzNCLE1BQU1KLEtBQUs7RUFDYjtBQUNGIn0=
{
"name": "@rest-hooks/endpoint",
"version": "3.7.0",
"version": "3.7.1",
"description": "Declarative Network Interface Definitions",

@@ -120,3 +120,3 @@ "sideEffects": false,

},
"gitHead": "80c7f846fbd77c58b61ba92941dc0514e266f9a9"
"gitHead": "922ed06e929151f59b51161629e220824da0b080"
}

@@ -284,3 +284,3 @@ /* eslint-disable @typescript-eslint/explicit-module-boundary-types */

Or use debugging tools: https://resthooks.io/docs/guides/debugging
Learn more about nesting schemas: https://resthooks.io/rest/guides/nested-response
Learn more about nesting schemas: https://resthooks.io/rest/guides/relational-data

@@ -421,6 +421,7 @@ Entity keys: ${Object.keys(this.defaults)}

}): string {
const name = this.name === 'EntityMixin' ? Base.name : this.name;
console.error('Rest Hooks Error: https://resthooks.io/errors/dklj');
Object.defineProperty(this, 'key', {
get() {
return Base.name;
return name;
},

@@ -427,0 +428,0 @@ set,

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

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