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.8.0 to 3.8.1

3

dist/index.js

@@ -536,2 +536,5 @@ 'use strict';

}
get cacheWith() {
return this.schema.schema;
}
toJSON() {

@@ -538,0 +541,0 @@ return {

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,n=!1;return[Object.keys(e).reduce(((t,i)=>{const o=`${i}`,[c,a,h]=s(t.get(o),e[o]);return a||(r=!1),h&&(n=!0),t.has(o)?t.set(o,c):t}),t),r,n]}const r=Symbol("ENTITY WAS DELETED"),n=r;class i{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){"_schemaAttribute"in e&&!this._schemaAttribute?(this.schema=e.schema,this._schemaAttribute=e._schemaAttribute):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,n,i,o,c){if(!e)return e;const a=this.inferSchema(e,t,s);if(!a)return e;const h=r(e,t,s,a,n,i,o,c);return this.isSingleSchema||null==h?h:{id:h,schema:this.getSchemaAttribute(e,t,s)}}denormalizeValue(e,s){const n=!this.isSingleSchema&&(t(e)?e.get("schema"):e.schema);if(!this.isSingleSchema&&!n)return e;const i=s((this.isSingleSchema?void 0:t(e)?e.get("id"):e.id)||e,this.isSingleSchema?this.schema:this.schema[n]);return Array.isArray(i)&&3===i.length?!0===i[2]?r:i[0]:i}}class o extends i{normalize(e,t,s,r,n,i,o,c){return Object.keys(e).reduce(((t,s,a)=>{const h=e[s];return null!=h?Object.assign({},t,{[s]:this.normalizeValue(h,e,s,r,n,i,o,c)}):t}),{})}denormalize(e,t){return[Object.keys(e).reduce(((s,r)=>{const n=e[r],i=this.denormalizeValue(n,t);return i&&"symbol"!=typeof i?Object.assign({},s,{[r]:i}):s}),{}),!0,!1]}denormalizeOnly(e,t,s){return Object.keys(e).reduce(((t,r)=>{const n=e[r],i=this.denormalizeValue(n,s);return i&&"symbol"!=typeof i?Object.assign({},t,{[r]:i}):t}),{})}infer(e,t,s){}}const c=e=>void 0!==e&&"symbol"!=typeof e;class a extends i{normalize(e,t,s,r,n,i,o,c){const a=(e=>Array.isArray(e)?e:Object.keys(e).map((t=>e[t])))(e);return a.map(((e,a)=>this.normalizeValue(e,t,s,r,n,i,o,c))).filter((e=>null!=e))}denormalize(e,t){return[this.denormalizeOnly(e,[],t),!0,!1]}denormalizeOnly(e,t,s){return e.map?e.map((e=>this.denormalizeValue(e,s))).filter(c):e}infer(e,t,s,r){}toJSON(){return[this.schema]}}function h(e,s,r,n){if(t(s))return function(e,t,s){var r;let n;const i=Object.keys(e).reduce(((t,r)=>{const i=`${r}`,o=s(t.get(i),e[i]);return"symbol"==typeof o&&(n=o),t.has(i)?t.set(i,o):t}),t);return null!=(r=n)?r:i}(e,s,n);const i=Object.assign({},s);for(const t of Object.keys(e)){const s=n(i[t],e[t]);if(void 0!==i[t]&&(i[t]=s),"symbol"==typeof s)return s}return i}class u{constructor(e){this._entity=e}get key(){return this._entity.key}normalize(e,t,s,r,i,o,c,a){const h=this._entity.process(e,t,s),u=this._entity.pk(h,t,s,a);return i(this,n,u),u}merge(e,t){return t}mergeWithStore(e,t,s,r){return this.merge(s,r)}mergeMetaWithStore(e,t,s,r){return t}infer(e,t,s){}denormalizeOnly(e,t,s){return s(e,this._entity)}_denormalizeNullable(){return{}}_normalizeNullable(){return{}}}const l=(e,t)=>[...e,...t],m=(e,t)=>[...t,...e],f=(e,t)=>Object.assign({},e,t),d=e=>[...e],y=e=>Object.assign({},e);const p=(e,t)=>s=>Object.entries(s).every((([s,r])=>s.startsWith("order")||e[s]==r||(null==t?void 0:t[s])==r));function b(e,t,s){const r={merge:{value:t},normalize:{value:O}};return e.schema instanceof a&&(r.createIfValid={value:g},r.denormalizeOnly={value:k}),s&&(r.createCollectionFilter={value:s}),Object.create(e,r)}function O(e,t,s,r,n,i,o,c){const h=this.schema.normalize(this.schema instanceof a&&!Array.isArray(e)?[e]:e,t,s,r,n,i,o,c),u=this.createCollectionFilter(...c);return Object.keys(o[this.key]).forEach((e=>{u(JSON.parse(e))&&n(this,h,e)})),h}function g(e){return Array.isArray(e)?[...e]:Object.assign({},e)}function k(e,t,s){return Array.isArray(e)?this.schema.denormalizeOnly(e,t,s):this.schema.schema.denormalizeOnly(e,t,s)}var j,v=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,n={},i=Object.keys(e);for(r=0;r<i.length;r++)s=i[r],t.indexOf(s)>=0||(n[s]=e[s]);return n},e.exports.__esModule=!0,e.exports.default=e.exports})),S=(j=v)&&j.__esModule&&Object.prototype.hasOwnProperty.call(j,"default")?j.default:j;const z=["pk","schema","key"];function A(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,r){return this.prototype.pk.call(e,t,s,r)}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 mergeMetaWithStore(e,t,s,r){return this.shouldReorder(e,t,s,r)?e:t}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,n,i,o,c){const a=this.process(e,t,s),h=this.pk(a,t,s,c);if(void 0===h||""===h)return;const u=this.key;if(u in i||(i[u]={}),h in i[u]||(i[u][h]=[]),i[u][h].some((t=>t===e)))return h;return function(e){if(e){const t=new Error(e);throw t.status=400,t}}(this.validate(a)),i[u][h].push(e),Object.keys(this.schema).forEach((e=>{if(Object.hasOwn(a,e)){const t=this.schema[e];a[e]=r(a[e],a,e,t,n,i,o,c)}})),n(this,a,h),h}static validate(e){}static infer(e,t,s,r){var n;if(!e[0])return;const i=function(e,t,s){if(["string","number"].includes(typeof t[0]))return`${t[0]}`;const r=e.pk(t[0],void 0,"",t);if(void 0!==r&&""!==r)return r;const n=function(e,t){return t?t.find((t=>Object.hasOwn(e,t))):void 0}(t[0],e.indexes);if(n&&s[e.key]){return s[e.key][n][t[0][n]]}}(this,e,t);return!r||null!=(n=r[this.key])&&n[i]?i:void 0}static denormalize(e,t){if("symbol"==typeof e)return[void 0,!0,!0];let s=!1;return Object.keys(this.schema).forEach((r=>{const n=this.schema[r],i=e[r],[o,,c]=t(i,n);c&&this.defaults[r]&&(s=!0),e[r]=o})),[e,!0,s]}static denormalizeOnly(e,t,s){if("symbol"==typeof e)return e;for(const t of Object.keys(this.schema)){const r=this.schema[t],n=s(e[t],r);if("symbol"==typeof n){if(this.defaults[t])return n;e[t]=void 0}else e[t]=n}return e}static get defaults(){return Object.hasOwn(this,"__defaults")||Object.defineProperty(this,"__defaults",{value:new this,writable:!0,configurable:!0}),this.__defaults}}const r=S(t,z);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 n(e){Object.defineProperty(this,"key",{value:e,writable:!0,enumerable:!0})}const i="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:n}),this.key}:function(){return"EntityMixin"===this.name?e.name:this.name};Object.defineProperty(s,"key",{get:i,set:n})}return s}var _=Object.freeze({__proto__:null,Union:class extends i{constructor(e,t){if(!t)throw new Error('Expected option "schemaAttribute" not found on UnionSchema.');super(e,t)}normalize(e,t,s,r,n,i,o,c){return this.normalizeValue(e,t,s,r,n,i,o,c)}denormalize(e,t){const s=this.denormalizeValue(e,t);return[s,void 0!==s,"symbol"==typeof s]}denormalizeOnly(e,t,s){return this.denormalizeValue(e,s)}infer(e,t,s,r){if(!e[0])return;const n=this.getSchemaAttribute(e[0],void 0,""),i=this.schema[n];return void 0!==i?{id:s(i,e,t,r),schema:n}:void 0}},Values:o,Array:a,All:class extends a{constructor(e,t){super(e,t)}normalize(e,t,s,r,n,i,o,c){super.normalize(e,t,s,r,n,i,o,c)}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 n=!1;const i=Object.values(this.schema).flatMap((e=>r[e.key]?(n=!0,Object.values(r[e.key]).map((t=>({id:t&&e.pk(t),schema:this.getSchemaAttribute(t,void 0,void 0)})))):[]));if(n)return i}},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,n,i,o,c,a)=>{const h=Object.assign({},t);return Object.keys(e).forEach((s=>{const r=e[s],u=n(t[s],t,s,r,i,o,c,a);null==u?delete h[s]:h[s]=u})),h})(this.schema,...e)}denormalize(...e){return((e,r,n)=>{if(t(r))return s(e,r,n);const i=Object.assign({},r);let o=!0,c=!1;return Object.keys(e).forEach((t=>{const[s,r,a]=n(i[t],e[t]);void 0!==i[t]&&(i[t]=s),a&&(c=!0),r||(o=!1)})),[i,o,c]})(this.schema,...e)}denormalizeOnly(e,t,s){return h(this.schema,e,0,s)}infer(e,t,s,r){return function(e,t,s,r,n){const i={};return Object.keys(e).forEach((o=>{i[o]=r(e[o],t,s,n)})),i}(this.schema,e,t,s,r)}},Delete:class extends u{denormalize(e,t){return t(e,this._entity)}},Invalidate:u,Collection:class{addWith(e,t){return b(this,e,t)}constructor(e,t){var s;this.schema=Array.isArray(e)?new a(e[0]):e,"nestKey"in t?this.nestKey=t.nestKey:this.argsKey=t.argsKey,this.createCollectionFilter=null!=(s=t.createCollectionFilter)?s:p,this.schema instanceof a?(this.createIfValid=d,this.push=b(this,l),this.unshift=b(this,m)):e instanceof o&&(this.createIfValid=y,this.assign=b(this,f))}toJSON(){return{name:`Collection(${this.schema.schema.name})`,schema:this.schema.schema,key:this.key}}get key(){return`COLLECT:${this.schema.constructor.name}(${this.schema.schema.key})`}pk(e,t,s,r){const n=this.argsKey?this.argsKey(...r):this.nestKey(t,s);for(const e in n)"string"!=typeof n[e]&&(n[e]=`${n[e]}`);return JSON.stringify(n)}normalize(e,t,s,r,n,i,o,c){const a=this.schema.normalize(e,t,s,r,n,i,o,c),h=this.pk(a,t,s,c);return n(this,a,h),h}merge(e,t){return t}shouldReorder(e,t,s,r){return t.fetchedAt<e.fetchedAt}mergeWithStore(e,t,s,r){return this.shouldReorder(e,t,s,r)?this.merge(r,s):this.merge(s,r)}mergeMetaWithStore(e,t,s,r){return this.shouldReorder(e,t,s,r)?e:t}infer(e,t,s,r){}denormalizeOnly(e,t,s){return this.schema.denormalizeOnly(e,t,s)}},Entity:A});const x=class{};class E extends(A(x)){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 mergeMetaWithStore(e,t,s,r){return{expiresAt:Math.max(this.expiresAt(t,r),e.expiresAt),date:Math.max(t.date,e.date),fetchedAt:Math.max(t.fetchedAt,e.fetchedAt)}}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,n,i]=s(this.schema,e,r);return[this.fromJS(t.toObject()),!0,i]}let n;if(e instanceof this)n=e;else{if(this.validate(e))return[void 0,!1,!0];n=this.fromJS(e),null==r.setLocal||r.setLocal(n)}let i=!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]&&(i=!0),e[t]!==c&&this.set(n,t,c)})),[n,!0,i]}static set(e,t,s){e[t]=s}}var w;E.expiresAt=function(e,t){return e.expiresAt};const P="undefined"!=typeof document;let V=P&&!(null!=(w=document.querySelector("meta[http-equiv='Content-Security-Policy']"))&&w.getAttribute("content"));try{V||Function()}catch(e){V=!0,P&&console.error("Content Security Policy: The previous CSP log can be safely ignored - @rest-hooks/endpoint will use setPrototypeOf instead")}function I(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 M extends Function{constructor(e,t){let s,r;return V?(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),I(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 I(s,Object.assign({},this.options,e)),s}}"runCompat"!==I.name&&(M.prototype.key=function(...e){return console.error("Rest Hooks Error: https://resthooks.io/errors/osid"),`${this.name} ${JSON.stringify(e)}`});const J=M;class N extends Error{}Object.hasOwn=Object.hasOwn||function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},e.AbortOptimistic=N,e.DELETED=r,e.Endpoint=M,e.Entity=E,e.ExtendableEndpoint=J,e.INVALID=n,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,!1];const[n,i,o]=e.denormalize(s,r);return[i?this.process(n,...t):void 0,i,o]},e.denormalizeOnly&&(t.denormalizeOnly=({args:t,input:s},r,n)=>{if(void 0===s)return;const i=e.denormalizeOnly(s,t,n);return"symbol"==typeof i?void 0:this.process(i,...t)}),t.infer=(t,s,r,n)=>({args:t,input:r(e,t,s,n)}),t}},e.schema=_,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,n=!1;return[Object.keys(e).reduce(((t,i)=>{const o=`${i}`,[c,a,h]=s(t.get(o),e[o]);return a||(r=!1),h&&(n=!0),t.has(o)?t.set(o,c):t}),t),r,n]}const r=Symbol("ENTITY WAS DELETED"),n=r;class i{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){"_schemaAttribute"in e&&!this._schemaAttribute?(this.schema=e.schema,this._schemaAttribute=e._schemaAttribute):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,n,i,o,c){if(!e)return e;const a=this.inferSchema(e,t,s);if(!a)return e;const h=r(e,t,s,a,n,i,o,c);return this.isSingleSchema||null==h?h:{id:h,schema:this.getSchemaAttribute(e,t,s)}}denormalizeValue(e,s){const n=!this.isSingleSchema&&(t(e)?e.get("schema"):e.schema);if(!this.isSingleSchema&&!n)return e;const i=s((this.isSingleSchema?void 0:t(e)?e.get("id"):e.id)||e,this.isSingleSchema?this.schema:this.schema[n]);return Array.isArray(i)&&3===i.length?!0===i[2]?r:i[0]:i}}class o extends i{normalize(e,t,s,r,n,i,o,c){return Object.keys(e).reduce(((t,s,a)=>{const h=e[s];return null!=h?Object.assign({},t,{[s]:this.normalizeValue(h,e,s,r,n,i,o,c)}):t}),{})}denormalize(e,t){return[Object.keys(e).reduce(((s,r)=>{const n=e[r],i=this.denormalizeValue(n,t);return i&&"symbol"!=typeof i?Object.assign({},s,{[r]:i}):s}),{}),!0,!1]}denormalizeOnly(e,t,s){return Object.keys(e).reduce(((t,r)=>{const n=e[r],i=this.denormalizeValue(n,s);return i&&"symbol"!=typeof i?Object.assign({},t,{[r]:i}):t}),{})}infer(e,t,s){}}const c=e=>void 0!==e&&"symbol"!=typeof e;class a extends i{normalize(e,t,s,r,n,i,o,c){const a=(e=>Array.isArray(e)?e:Object.keys(e).map((t=>e[t])))(e);return a.map(((e,a)=>this.normalizeValue(e,t,s,r,n,i,o,c))).filter((e=>null!=e))}denormalize(e,t){return[this.denormalizeOnly(e,[],t),!0,!1]}denormalizeOnly(e,t,s){return e.map?e.map((e=>this.denormalizeValue(e,s))).filter(c):e}infer(e,t,s,r){}toJSON(){return[this.schema]}}function h(e,s,r,n){if(t(s))return function(e,t,s){var r;let n;const i=Object.keys(e).reduce(((t,r)=>{const i=`${r}`,o=s(t.get(i),e[i]);return"symbol"==typeof o&&(n=o),t.has(i)?t.set(i,o):t}),t);return null!=(r=n)?r:i}(e,s,n);const i=Object.assign({},s);for(const t of Object.keys(e)){const s=n(i[t],e[t]);if(void 0!==i[t]&&(i[t]=s),"symbol"==typeof s)return s}return i}class u{constructor(e){this._entity=e}get key(){return this._entity.key}normalize(e,t,s,r,i,o,c,a){const h=this._entity.process(e,t,s),u=this._entity.pk(h,t,s,a);return i(this,n,u),u}merge(e,t){return t}mergeWithStore(e,t,s,r){return this.merge(s,r)}mergeMetaWithStore(e,t,s,r){return t}infer(e,t,s){}denormalizeOnly(e,t,s){return s(e,this._entity)}_denormalizeNullable(){return{}}_normalizeNullable(){return{}}}const l=(e,t)=>[...e,...t],m=(e,t)=>[...t,...e],f=(e,t)=>Object.assign({},e,t),d=e=>[...e],y=e=>Object.assign({},e);const p=(e,t)=>s=>Object.entries(s).every((([s,r])=>s.startsWith("order")||e[s]==r||(null==t?void 0:t[s])==r));function b(e,t,s){const r={merge:{value:t},normalize:{value:O}};return e.schema instanceof a&&(r.createIfValid={value:g},r.denormalizeOnly={value:k}),s&&(r.createCollectionFilter={value:s}),Object.create(e,r)}function O(e,t,s,r,n,i,o,c){const h=this.schema.normalize(this.schema instanceof a&&!Array.isArray(e)?[e]:e,t,s,r,n,i,o,c),u=this.createCollectionFilter(...c);return Object.keys(o[this.key]).forEach((e=>{u(JSON.parse(e))&&n(this,h,e)})),h}function g(e){return Array.isArray(e)?[...e]:Object.assign({},e)}function k(e,t,s){return Array.isArray(e)?this.schema.denormalizeOnly(e,t,s):this.schema.schema.denormalizeOnly(e,t,s)}var j,v=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,n={},i=Object.keys(e);for(r=0;r<i.length;r++)s=i[r],t.indexOf(s)>=0||(n[s]=e[s]);return n},e.exports.__esModule=!0,e.exports.default=e.exports})),S=(j=v)&&j.__esModule&&Object.prototype.hasOwnProperty.call(j,"default")?j.default:j;const z=["pk","schema","key"];function A(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,r){return this.prototype.pk.call(e,t,s,r)}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 mergeMetaWithStore(e,t,s,r){return this.shouldReorder(e,t,s,r)?e:t}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,n,i,o,c){const a=this.process(e,t,s),h=this.pk(a,t,s,c);if(void 0===h||""===h)return;const u=this.key;if(u in i||(i[u]={}),h in i[u]||(i[u][h]=[]),i[u][h].some((t=>t===e)))return h;return function(e){if(e){const t=new Error(e);throw t.status=400,t}}(this.validate(a)),i[u][h].push(e),Object.keys(this.schema).forEach((e=>{if(Object.hasOwn(a,e)){const t=this.schema[e];a[e]=r(a[e],a,e,t,n,i,o,c)}})),n(this,a,h),h}static validate(e){}static infer(e,t,s,r){var n;if(!e[0])return;const i=function(e,t,s){if(["string","number"].includes(typeof t[0]))return`${t[0]}`;const r=e.pk(t[0],void 0,"",t);if(void 0!==r&&""!==r)return r;const n=function(e,t){return t?t.find((t=>Object.hasOwn(e,t))):void 0}(t[0],e.indexes);if(n&&s[e.key]){return s[e.key][n][t[0][n]]}}(this,e,t);return!r||null!=(n=r[this.key])&&n[i]?i:void 0}static denormalize(e,t){if("symbol"==typeof e)return[void 0,!0,!0];let s=!1;return Object.keys(this.schema).forEach((r=>{const n=this.schema[r],i=e[r],[o,,c]=t(i,n);c&&this.defaults[r]&&(s=!0),e[r]=o})),[e,!0,s]}static denormalizeOnly(e,t,s){if("symbol"==typeof e)return e;for(const t of Object.keys(this.schema)){const r=this.schema[t],n=s(e[t],r);if("symbol"==typeof n){if(this.defaults[t])return n;e[t]=void 0}else e[t]=n}return e}static get defaults(){return Object.hasOwn(this,"__defaults")||Object.defineProperty(this,"__defaults",{value:new this,writable:!0,configurable:!0}),this.__defaults}}const r=S(t,z);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 n(e){Object.defineProperty(this,"key",{value:e,writable:!0,enumerable:!0})}const i="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:n}),this.key}:function(){return"EntityMixin"===this.name?e.name:this.name};Object.defineProperty(s,"key",{get:i,set:n})}return s}var _=Object.freeze({__proto__:null,Union:class extends i{constructor(e,t){if(!t)throw new Error('Expected option "schemaAttribute" not found on UnionSchema.');super(e,t)}normalize(e,t,s,r,n,i,o,c){return this.normalizeValue(e,t,s,r,n,i,o,c)}denormalize(e,t){const s=this.denormalizeValue(e,t);return[s,void 0!==s,"symbol"==typeof s]}denormalizeOnly(e,t,s){return this.denormalizeValue(e,s)}infer(e,t,s,r){if(!e[0])return;const n=this.getSchemaAttribute(e[0],void 0,""),i=this.schema[n];return void 0!==i?{id:s(i,e,t,r),schema:n}:void 0}},Values:o,Array:a,All:class extends a{constructor(e,t){super(e,t)}normalize(e,t,s,r,n,i,o,c){super.normalize(e,t,s,r,n,i,o,c)}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 n=!1;const i=Object.values(this.schema).flatMap((e=>r[e.key]?(n=!0,Object.values(r[e.key]).map((t=>({id:t&&e.pk(t),schema:this.getSchemaAttribute(t,void 0,void 0)})))):[]));if(n)return i}},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,n,i,o,c,a)=>{const h=Object.assign({},t);return Object.keys(e).forEach((s=>{const r=e[s],u=n(t[s],t,s,r,i,o,c,a);null==u?delete h[s]:h[s]=u})),h})(this.schema,...e)}denormalize(...e){return((e,r,n)=>{if(t(r))return s(e,r,n);const i=Object.assign({},r);let o=!0,c=!1;return Object.keys(e).forEach((t=>{const[s,r,a]=n(i[t],e[t]);void 0!==i[t]&&(i[t]=s),a&&(c=!0),r||(o=!1)})),[i,o,c]})(this.schema,...e)}denormalizeOnly(e,t,s){return h(this.schema,e,0,s)}infer(e,t,s,r){return function(e,t,s,r,n){const i={};return Object.keys(e).forEach((o=>{i[o]=r(e[o],t,s,n)})),i}(this.schema,e,t,s,r)}},Delete:class extends u{denormalize(e,t){return t(e,this._entity)}},Invalidate:u,Collection:class{addWith(e,t){return b(this,e,t)}constructor(e,t){var s;this.schema=Array.isArray(e)?new a(e[0]):e,"nestKey"in t?this.nestKey=t.nestKey:this.argsKey=t.argsKey,this.createCollectionFilter=null!=(s=t.createCollectionFilter)?s:p,this.schema instanceof a?(this.createIfValid=d,this.push=b(this,l),this.unshift=b(this,m)):e instanceof o&&(this.createIfValid=y,this.assign=b(this,f))}get cacheWith(){return this.schema.schema}toJSON(){return{name:`Collection(${this.schema.schema.name})`,schema:this.schema.schema,key:this.key}}get key(){return`COLLECT:${this.schema.constructor.name}(${this.schema.schema.key})`}pk(e,t,s,r){const n=this.argsKey?this.argsKey(...r):this.nestKey(t,s);for(const e in n)"string"!=typeof n[e]&&(n[e]=`${n[e]}`);return JSON.stringify(n)}normalize(e,t,s,r,n,i,o,c){const a=this.schema.normalize(e,t,s,r,n,i,o,c),h=this.pk(a,t,s,c);return n(this,a,h),h}merge(e,t){return t}shouldReorder(e,t,s,r){return t.fetchedAt<e.fetchedAt}mergeWithStore(e,t,s,r){return this.shouldReorder(e,t,s,r)?this.merge(r,s):this.merge(s,r)}mergeMetaWithStore(e,t,s,r){return this.shouldReorder(e,t,s,r)?e:t}infer(e,t,s,r){}denormalizeOnly(e,t,s){return this.schema.denormalizeOnly(e,t,s)}},Entity:A});const x=class{};class E extends(A(x)){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 mergeMetaWithStore(e,t,s,r){return{expiresAt:Math.max(this.expiresAt(t,r),e.expiresAt),date:Math.max(t.date,e.date),fetchedAt:Math.max(t.fetchedAt,e.fetchedAt)}}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,n,i]=s(this.schema,e,r);return[this.fromJS(t.toObject()),!0,i]}let n;if(e instanceof this)n=e;else{if(this.validate(e))return[void 0,!1,!0];n=this.fromJS(e),null==r.setLocal||r.setLocal(n)}let i=!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]&&(i=!0),e[t]!==c&&this.set(n,t,c)})),[n,!0,i]}static set(e,t,s){e[t]=s}}var w;E.expiresAt=function(e,t){return e.expiresAt};const P="undefined"!=typeof document;let V=P&&!(null!=(w=document.querySelector("meta[http-equiv='Content-Security-Policy']"))&&w.getAttribute("content"));try{V||Function()}catch(e){V=!0,P&&console.error("Content Security Policy: The previous CSP log can be safely ignored - @rest-hooks/endpoint will use setPrototypeOf instead")}function I(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 M extends Function{constructor(e,t){let s,r;return V?(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),I(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 I(s,Object.assign({},this.options,e)),s}}"runCompat"!==I.name&&(M.prototype.key=function(...e){return console.error("Rest Hooks Error: https://resthooks.io/errors/osid"),`${this.name} ${JSON.stringify(e)}`});const J=M;class N extends Error{}Object.hasOwn=Object.hasOwn||function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},e.AbortOptimistic=N,e.DELETED=r,e.Endpoint=M,e.Entity=E,e.ExtendableEndpoint=J,e.INVALID=n,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,!1];const[n,i,o]=e.denormalize(s,r);return[i?this.process(n,...t):void 0,i,o]},e.denormalizeOnly&&(t.denormalizeOnly=({args:t,input:s},r,n)=>{if(void 0===s)return;const i=e.denormalizeOnly(s,t,n);return"symbol"==typeof i?void 0:this.process(i,...t)}),t.infer=(t,s,r,n)=>({args:t,input:r(e,t,s,n)}),t}},e.schema=_,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})}));

@@ -13,2 +13,2 @@ Object.hasOwn = Object.hasOwn || /* istanbul ignore next */function hasOwn(it, key) {

export { default as AbortOptimistic } from './AbortOptimistic.js';
//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJuYW1lcyI6WyJPYmplY3QiLCJoYXNPd24iLCJpdCIsImtleSIsInByb3RvdHlwZSIsImhhc093blByb3BlcnR5IiwiY2FsbCIsIl9zY2hlbWEiLCJzY2hlbWEiLCJkZWZhdWx0IiwiRW50aXR5IiwidmFsaWRhdGVSZXF1aXJlZCIsIkRFTEVURUQiLCJJTlZBTElEIiwiRW5kcG9pbnQiLCJFeHRlbmRhYmxlRW5kcG9pbnQiLCJBYm9ydE9wdGltaXN0aWMiXSwic291cmNlcyI6WyIuLi9zcmMvaW5kZXgudHMiXSwic291cmNlc0NvbnRlbnQiOlsiT2JqZWN0L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FBSUssUUFBUSxFQUFFQyxrQkFBa0IsUUFBUSxlQUFlO0FBRXZFLGNBQWMsb0JBQW9CO0FBQ2xDLGNBQWMsb0JBQW9CO0FBQ2xDLFNBQVNOLE9BQU8sSUFBSU8sZUFBZSxRQUFRLHNCQUFzQiJ9
export * from './SnapshotInterface.js';
/** Represents Array or Values */
/** Defines a networking endpoint */

@@ -9,2 +11,2 @@

export {};
//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJuYW1lcyI6W10sInNvdXJjZXMiOlsiLi4vc3JjL2ludGVyZmFjZS50cyJdLCJzb3VyY2VzQ29udGVudCI6WyJpbXBvcnQgeyBBYnN0cmFjdEluc3RhbmNlVHlwZSwgRGVub3JtYWxpemUsIEVudGl0eU1hcCB9IGZyb20gJy4vbm9ybWFsLmpzJztcbmltcG9ydCB0eXBlIHsgRW5kcG9pbnRFeHRyYU9wdGlvbnMsIEZldGNoRnVuY3Rpb24gfSBmcm9tICcuL3R5cGVzLmpzJztcblxuZXhwb3J0ICogZnJvbSAnLi9TbmFwc2hvdEludGVyZmFjZS5qcyc7XG5cbmV4cG9ydCB0eXBlIFNjaGVtYSA9XG4gIHwgbnVsbFxuICB8IHN0cmluZ1xuICB8IHsgW0s6IHN0cmluZ106IGFueSB9XG4gIHwgU2NoZW1hW11cbiAgfCBTY2hlbWFTaW1wbGVcbiAgfCBTZXJpYWxpemFibGU7XG5cbmV4cG9ydCB0eXBlIFNlcmlhbGl6YWJsZTxcbiAgVCBleHRlbmRzIHsgdG9KU09OKCk6IHN0cmluZyB9ID0geyB0b0pTT04oKTogc3RyaW5nIH0sXG4+ID0ge1xuICBwcm90b3R5cGU6IFQ7XG59O1xuXG5leHBvcnQgaW50ZXJmYWNlIFNjaGVtYVNpbXBsZTxUID0gYW55PiB7XG4gIG5vcm1hbGl6ZShcbiAgICBpbnB1dDogYW55LFxuICAgIHBhcmVudDogYW55LFxuICAgIGtleTogYW55LFxuICAgIHZpc2l0OiA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WFuLCBzdXNwZW5kOiBib29sZWFuXTtcbiAgZGVub3JtYWxpemVPbmx5PyhcbiAgICBpbnB1dDoge30sXG4gICAgYXJnczogYW55LFxuICAgIHVudmlzaXQ6IChpbnB1dDogYW55LCBzY2hlbWE6IGFueSkgPT4gYW55LFxuICApOiBUO1xuICBpbmZlcihcbiAgICBhcmdzOiByZWFkb25seSBhbnlbXSxcbiAgICBpbmRleGVzOiBOb3JtYWxpemVkSW5kZXgsXG4gICAgcmVjdXJzZTogKC4uLmFyZ3M6IGFueSkgPT4gYW55LFxuICAgIGVudGl0aWVzOiBFbnRpdHlUYWJsZSxcbiAgKTogYW55O1xufVxuXG5leHBvcnQgaW50ZXJmYWNlIFNjaGVtYVNpbXBsZU5ldzxUID0gYW55PiB7XG4gIG5vcm1hbGl6ZShcbiAgICBpbnB1dDogYW55LFxuICAgIHBhcmVudDogYW55LFxuICAgIGtleTogYW55LFxuICAgIHZpc2l0OiAoLi4uYXJnczogYW55KSA9PiBhbnksXG4gICAgYWRkRW50aXR5OiAoLi4uYXJnczogYW55KSA9PiBhbnksXG4gICAgdmlzaXRlZEVudGl0aWVzOiBSZWNvcmQ8c3RyaW5nLCBhbnk+LFxuICAgIHN0b3JlRW50aXRpZXM6IGFueSxcbiAgICBhcmdzPzogYW55W10sXG4gICk6IGFueTtcbiAgZGVub3JtYWxpemVPbmx5KFxuICAgIGlucHV0OiB7fSxcbiAgICBhcmdzOiByZWFkb25seSBhbnlbXSxcbiAgICB1bnZpc2l0OiAoaW5wdXQ6IGFueSwgc2NoZW1hOiBhbnkpID0+IGFueSxcbiAgKTogVDtcbiAgaW5mZXIoXG4gICAgYXJnczogcmVhZG9ubHkgYW55W10sXG4gICAgaW5kZXhlczogTm9ybWFsaXplZEluZGV4LFxuICAgIHJlY3Vyc2U6ICguLi5hcmdzOiBhbnkpID0+IGFueSxcbiAgICBlbnRpdGllczogRW50aXR5VGFibGUsXG4gICk6IGFueTtcbn1cblxuZXhwb3J0IGludGVyZmFj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V4cG9ydCBpbnRlcmZhY2UgTXV0YXRlRW5kcG9pbnQ8XG4gIEYgZXh0ZW5kcyBGZXRjaEZ1bmN0aW9uID0gRmV0Y2hGdW5jdGlvbixcbiAgUyBleHRlbmRzIFNjaGVtYSB8IHVuZGVmaW5lZCA9IFNjaGVtYSB8IHVuZGVmaW5lZCxcbj4gZXh0ZW5kcyBFbmRwb2ludEludGVyZmFjZTxGLCBTLCB0cnVlPiB7XG4gIHNpZGVFZmZlY3Q6IHRydWU7XG59XG5cbi8qKiBGb3IgcmV0cmlldmFsIHJlcXVlc3RzICovXG5leHBvcnQgdHlwZSBSZWFkRW5kcG9pbnQ8XG4gIEYgZXh0ZW5kcyBGZXRjaEZ1bmN0aW9uID0gRmV0Y2hGdW5jdGlvbixcbiAgUyBleHRlbmRzIFNjaGVtYSB8IHVuZGVmaW5lZCA9IFNjaGVtYSB8IHVuZGVmaW5lZCxcbj4gPSBFbmRwb2ludEludGVyZmFjZTxGLCBTLCB1bmRlZmluZWQ+O1xuIl0sIm1hcHBpbmdzIjoiQUFHQSxjQUFjLHdCQUF3Qjs7QUEyR3RDOztBQTZCQTs7QUFZQTs7QUFRQTtBQUFBIn0=

@@ -45,2 +45,5 @@ import { Values, Array as ArraySchema } from '../schema.js';

}
get cacheWith() {
return this.schema.schema;
}
toJSON() {

@@ -147,2 +150,2 @@ return {

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

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

export type { EndpointInterface, ReadEndpoint, MutateEndpoint, } from './interface.js';
export type { EndpointOptions, EndpointInstance, EndpointInstanceInterface, EndpointExtendOptions, } from './endpoint.js';
export * as schema from './schema.js';
export type { CollectionInterface, CollectionFromSchema, } from './schema.js';
export { default as Entity } from './schemas/Entity.js';
export { default as validateRequired } from './validateRequired.js';
export { DELETED, INVALID } from './special.js';
export type { Schema, SnapshotInterface, ExpiryStatusInterface, } from './interface.js';
export type { EndpointInterface, ReadEndpoint, MutateEndpoint, Schema, SnapshotInterface, ExpiryStatusInterface, SchemaSimple, SchemaClass, SchemaSimpleNew, PolymorphicInterface, } from './interface.js';
export type { AbstractInstanceType, Normalize, NormalizeNullable, Denormalize, DenormalizeNullable, } from './normal.js';

@@ -9,0 +9,0 @@ export type { EndpointExtraOptions, FetchFunction, SchemaDetail, SchemaList, ResolveType, EndpointParam, NetworkError, UnknownError, ErrorTypes, } from './types.js';

@@ -13,2 +13,2 @@ Object.hasOwn = Object.hasOwn || /* istanbul ignore next */function hasOwn(it, key) {

export { default as AbortOptimistic } from './AbortOptimistic.js';
//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJuYW1lcyI6WyJPYmplY3QiLCJoYXNPd24iLCJpdCIsImtleSIsInByb3RvdHlwZSIsImhhc093blByb3BlcnR5IiwiY2FsbCIsIl9zY2hlbWEiLCJzY2hlbWEiLCJkZWZhdWx0IiwiRW50aXR5IiwidmFsaWRhdGVSZXF1aXJlZCIsIkRFTEVURUQiLCJJTlZBTElEIiwiRW5kcG9pbnQiLCJFeHRlbmRhYmxlRW5kcG9pbnQiLCJBYm9ydE9wdGltaXN0aWMiXSwic291cmNlcyI6WyIuLi9zcmMvaW5kZXgudHMiXSwic291cmNlc0NvbnRlbnQi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QVNKLE9BQU8sSUFBSUssUUFBUSxFQUFFQyxrQkFBa0IsUUFBUSxlQUFlO0FBRXZFLGNBQWMsb0JBQW9CO0FBQ2xDLGNBQWMsb0JBQW9CO0FBQ2xDLFNBQVNOLE9BQU8sSUFBSU8sZUFBZSxRQUFRLHNCQUFzQiJ9

@@ -19,2 +19,7 @@ import type { EndpointExtraOptions, FetchFunction } from './types.js';

}
export interface SchemaSimpleNew<T = any> {
normalize(input: any, parent: any, key: any, visit: (...args: any) => any, addEntity: (...args: any) => any, visitedEntities: Record<string, any>, storeEntities: any, args?: any[]): any;
denormalizeOnly(input: {}, args: readonly any[], unvisit: (input: any, schema: any) => any): T;
infer(args: readonly any[], indexes: NormalizedIndex, recurse: (...args: any) => any, entities: EntityTable): any;
}
export interface SchemaClass<T = any, N = T | undefined> extends SchemaSimple<T> {

@@ -37,2 +42,8 @@ _normalizeNullable(): any;

}
/** Represents Array or Values */
export interface PolymorphicInterface<T = any> extends SchemaSimpleNew<T> {
readonly schema: any;
_normalizeNullable(): any;
_denormalizeNullable(): [any, boolean, boolean];
}
export interface UnvisitFunction {

@@ -39,0 +50,0 @@ (input: any, schema: any): [any, boolean, boolean] | any;

export * from './SnapshotInterface.js';
/** Represents Array or Values */
/** Defines a networking endpoint */

@@ -9,2 +11,2 @@

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

@@ -0,3 +1,5 @@

import type { schema } from './index.js';
import type {
SchemaSimple,
SchemaSimpleNew,
Schema,

@@ -8,2 +10,3 @@ UnvisitFunction,

EntityInterface,
PolymorphicInterface,
} from './interface.js';

@@ -354,4 +357,4 @@ import type {

*/
export class CollectionSchema<
S extends Array<any> | Values<any> = any,
export class CollectionInterface<
S extends PolymorphicInterface = any,
Parent extends any[] = any,

@@ -364,4 +367,6 @@ > {

) => (collectionKey: Record<string, any>) => boolean,
): CollectionSchema<S, P>;
): Collection<S, P>;
readonly cacheWith: object;
readonly schema: S;

@@ -444,8 +449,16 @@ key: string;

push: S extends Array<any> ? CollectionSchema<S, Parent> : never;
unshift: S extends Array<any> ? CollectionSchema<S, Parent> : never;
assign: S extends Values<any> ? CollectionSchema<S, Parent> : never;
push: S extends { denormalizeOnly(...args: any): any[] }
? Collection<S, Parent>
: never;
unshift: S extends { denormalizeOnly(...args: any): any }
? Collection<S, Parent>
: never;
assign: S extends { denormalizeOnly(...args: any): Record<string, unknown> }
? Collection<S, Parent>
: never;
}
export type CollectionType<
S extends any[] | Array<any> | Values<any> = any,
export type CollectionFromSchema<
S extends any[] | PolymorphicInterface = any,
Parent extends any[] = [

@@ -455,7 +468,7 @@ urlParams: Record<string, any>,

],
> = CollectionSchema<S extends any[] ? Array<S[number]> : S, Parent>;
> = CollectionInterface<S extends any[] ? schema.Array<S[number]> : S, Parent>;
export interface CollectionConstructor {
new <
S extends SchemaSimple[] | Array<any> | Values<any> = any,
S extends SchemaSimpleNew[] | PolymorphicInterface = any,
Parent extends any[] = [

@@ -468,4 +481,4 @@ urlParams: Record<string, any>,

options: CollectionOptions,
): CollectionType<S, Parent>;
readonly prototype: CollectionSchema;
): CollectionFromSchema<S, Parent>;
readonly prototype: CollectionInterface;
}

@@ -478,3 +491,3 @@ export declare let CollectionRoot: CollectionConstructor;

export declare class Collection<
S extends any[] | Array<any> | Values<any> = any,
S extends any[] | PolymorphicInterface = any,
Parent extends any[] = [

@@ -511,26 +524,2 @@ urlParams: Record<string, any>,

export interface SchemaSimpleNew<T = any> {
normalize(
input: any,
parent: any,
key: any,
visit: (...args: any) => any,
addEntity: (...args: any) => any,
visitedEntities: Record<string, any>,
storeEntities: any,
args?: any[],
): any;
denormalizeOnly(
input: {},
args: readonly any[],
unvisit: (input: any, schema: any) => any,
): T;
infer(
args: readonly any[],
indexes: NormalizedIndex,
recurse: (...args: any) => any,
entities: EntityTable,
): any;
}
// id is in Instance, so we default to that as pk

@@ -537,0 +526,0 @@ /**

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

import { PolymorphicInterface } from '../interface.js';
import { Values, Array as ArraySchema } from '../schema.js';

@@ -6,3 +7,3 @@ /**

*/
export default class CollectionSchema<S extends ArraySchema<any> | Values<any> = any, Parent extends any[] = [
export default class CollectionSchema<S extends PolymorphicInterface = any, Parent extends any[] = [
urlParams: Record<string, any>,

@@ -20,2 +21,3 @@ body?: Record<string, any>

constructor(schema: S, options: CollectionOptions);
get cacheWith(): object;
toJSON(): {

@@ -22,0 +24,0 @@ name: string;

@@ -50,2 +50,5 @@ import { Values, Array as ArraySchema } from '../schema.js';

}
get cacheWith() {
return this.schema.schema;
}
toJSON() {

@@ -154,2 +157,2 @@ return {

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

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

import type { EntityInterface } from '../interface.js';
import type { EntityInterface, SchemaSimpleNew } from '../interface.js';
import type { AbstractInstanceType } from '../normal.js';
import { SchemaSimpleNew } from '../schema.js';
/**

@@ -5,0 +4,0 @@ * Marks entity as Invalid.

@@ -79,2 +79,2 @@ /* eslint-disable @typescript-eslint/explicit-module-boundary-types */

}
//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJuYW1lcyI6WyJJTlZBTElEIiwiSW52YWxpZGF0ZSIsImNvbnN0cnVjdG9yIiwiZW50aXR5IiwicHJvY2VzcyIsIm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0FBQ1gsT0FBTyxDQUFDO0VBQ2xDOztFQUVBO0VBQ0FnQyxvQkFBb0JBLENBQUEsRUFJbEI7SUFDQSxPQUFPLENBQUMsQ0FBQztFQUNYOztFQUVBO0VBQ0FDLGtCQUFrQkEsQ0FBQSxFQUF1QjtJQUN2QyxPQUFPLENBQUMsQ0FBQztFQUNYO0FBQ0YifQ==
{
"name": "@rest-hooks/endpoint",
"version": "3.8.0",
"version": "3.8.1",
"description": "Declarative Network Interface Definitions",

@@ -5,0 +5,0 @@ "sideEffects": false,

@@ -8,7 +8,2 @@ Object.hasOwn =

export type {
EndpointInterface,
ReadEndpoint,
MutateEndpoint,
} from './interface.js';
export type {
EndpointOptions,

@@ -20,2 +15,8 @@ EndpointInstance,

export * as schema from './schema.js';
export type {
CollectionInterface,
CollectionFromSchema,
//Array,
//Invalidate,
} from './schema.js';
export { default as Entity } from './schemas/Entity.js';

@@ -25,5 +26,12 @@ export { default as validateRequired } from './validateRequired.js';

export type {
EndpointInterface,
ReadEndpoint,
MutateEndpoint,
Schema,
SnapshotInterface,
ExpiryStatusInterface,
SchemaSimple,
SchemaClass,
SchemaSimpleNew,
PolymorphicInterface,
} from './interface.js';

@@ -30,0 +38,0 @@ export type {

@@ -49,2 +49,26 @@ import { AbstractInstanceType, Denormalize, EntityMap } from './normal.js';

export interface SchemaSimpleNew<T = any> {
normalize(
input: any,
parent: any,
key: any,
visit: (...args: any) => any,
addEntity: (...args: any) => any,
visitedEntities: Record<string, any>,
storeEntities: any,
args?: any[],
): any;
denormalizeOnly(
input: {},
args: readonly any[],
unvisit: (input: any, schema: any) => any,
): T;
infer(
args: readonly any[],
indexes: NormalizedIndex,
recurse: (...args: any) => any,
entities: EntityTable,
): any;
}
export interface SchemaClass<T = any, N = T | undefined>

@@ -88,2 +112,11 @@ extends SchemaSimple<T> {

/** Represents Array or Values */
export interface PolymorphicInterface<T = any> extends SchemaSimpleNew<T> {
readonly schema: any;
// this is not an actual member, but is needed for the recursive NormalizeNullable<> type algo
_normalizeNullable(): any;
// this is not an actual member, but is needed for the recursive DenormalizeNullable<> type algo
_denormalizeNullable(): [any, boolean, boolean];
}
export interface UnvisitFunction {

@@ -90,0 +123,0 @@ (input: any, schema: any): [any, boolean, boolean] | any;

@@ -0,3 +1,5 @@

import type { schema } from './index.js';
import type {
SchemaSimple,
SchemaSimpleNew,
Schema,

@@ -8,2 +10,3 @@ UnvisitFunction,

EntityInterface,
PolymorphicInterface,
} from './interface.js';

@@ -354,4 +357,4 @@ import type {

*/
export class CollectionSchema<
S extends Array<any> | Values<any> = any,
export class CollectionInterface<
S extends PolymorphicInterface = any,
Parent extends any[] = any,

@@ -364,4 +367,6 @@ > {

) => (collectionKey: Record<string, any>) => boolean,
): CollectionSchema<S, P>;
): Collection<S, P>;
readonly cacheWith: object;
readonly schema: S;

@@ -444,8 +449,16 @@ key: string;

push: S extends Array<any> ? CollectionSchema<S, Parent> : never;
unshift: S extends Array<any> ? CollectionSchema<S, Parent> : never;
assign: S extends Values<any> ? CollectionSchema<S, Parent> : never;
push: S extends { denormalizeOnly(...args: any): any[] }
? Collection<S, Parent>
: never;
unshift: S extends { denormalizeOnly(...args: any): any }
? Collection<S, Parent>
: never;
assign: S extends { denormalizeOnly(...args: any): Record<string, unknown> }
? Collection<S, Parent>
: never;
}
export type CollectionType<
S extends any[] | Array<any> | Values<any> = any,
export type CollectionFromSchema<
S extends any[] | PolymorphicInterface = any,
Parent extends any[] = [

@@ -455,7 +468,7 @@ urlParams: Record<string, any>,

],
> = CollectionSchema<S extends any[] ? Array<S[number]> : S, Parent>;
> = CollectionInterface<S extends any[] ? schema.Array<S[number]> : S, Parent>;
export interface CollectionConstructor {
new <
S extends SchemaSimple[] | Array<any> | Values<any> = any,
S extends SchemaSimpleNew[] | PolymorphicInterface = any,
Parent extends any[] = [

@@ -468,4 +481,4 @@ urlParams: Record<string, any>,

options: CollectionOptions,
): CollectionType<S, Parent>;
readonly prototype: CollectionSchema;
): CollectionFromSchema<S, Parent>;
readonly prototype: CollectionInterface;
}

@@ -478,3 +491,3 @@ export declare let CollectionRoot: CollectionConstructor;

export declare class Collection<
S extends any[] | Array<any> | Values<any> = any,
S extends any[] | PolymorphicInterface = any,
Parent extends any[] = [

@@ -511,26 +524,2 @@ urlParams: Record<string, any>,

export interface SchemaSimpleNew<T = any> {
normalize(
input: any,
parent: any,
key: any,
visit: (...args: any) => any,
addEntity: (...args: any) => any,
visitedEntities: Record<string, any>,
storeEntities: any,
args?: any[],
): any;
denormalizeOnly(
input: {},
args: readonly any[],
unvisit: (input: any, schema: any) => any,
): T;
infer(
args: readonly any[],
indexes: NormalizedIndex,
recurse: (...args: any) => any,
entities: EntityTable,
): any;
}
// id is in Instance, so we default to that as pk

@@ -537,0 +526,0 @@ /**

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

import { PolymorphicInterface } from '../interface.js';
import {

@@ -24,3 +25,3 @@ Entity as EntitySchema,

export default class CollectionSchema<
S extends ArraySchema<any> | Values<any> = any,
S extends PolymorphicInterface = any,
Parent extends any[] = [

@@ -89,2 +90,6 @@ urlParams: Record<string, any>,

get cacheWith(): object {
return this.schema.schema;
}
toJSON() {

@@ -91,0 +96,0 @@ return {

/* eslint-disable @typescript-eslint/explicit-module-boundary-types */
import type { EntityInterface } from '../interface.js';
import type { EntityInterface, SchemaSimpleNew } from '../interface.js';
import type { AbstractInstanceType } from '../normal.js';
import { SchemaSimpleNew, UnvisitFunction } from '../schema.js';
import { INVALID } from '../special.js';

@@ -6,0 +5,0 @@

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

export { EndpointInterface, ReadEndpoint, MutateEndpoint, } from './interface.js';
export { EndpointOptions, EndpointInstance, EndpointInstanceInterface, EndpointExtendOptions, } from './endpoint.js';
import * as schema_1 from './schema.js';
export { schema_1 as schema };
export { CollectionInterface, CollectionFromSchema, } from './schema.js';
export { default as Entity } from './schemas/Entity.js';
export { default as validateRequired } from './validateRequired.js';
export { DELETED, INVALID } from './special.js';
export { Schema, SnapshotInterface, ExpiryStatusInterface, } from './interface.js';
export { EndpointInterface, ReadEndpoint, MutateEndpoint, Schema, SnapshotInterface, ExpiryStatusInterface, SchemaSimple, SchemaClass, SchemaSimpleNew, PolymorphicInterface, } from './interface.js';
export { AbstractInstanceType, Normalize, NormalizeNullable, Denormalize, DenormalizeNullable, } from './normal.js';

@@ -10,0 +10,0 @@ export { EndpointExtraOptions, FetchFunction, SchemaDetail, SchemaList, ResolveType, EndpointParam, NetworkError, UnknownError, ErrorTypes, } from './types.js';

@@ -23,2 +23,7 @@ import { EndpointExtraOptions, FetchFunction } from './types.js';

}
export interface SchemaSimpleNew<T = any> {
normalize(input: any, parent: any, key: any, visit: (...args: any) => any, addEntity: (...args: any) => any, visitedEntities: Record<string, any>, storeEntities: any, args?: any[]): any;
denormalizeOnly(input: {}, args: readonly any[], unvisit: (input: any, schema: any) => any): T;
infer(args: readonly any[], indexes: NormalizedIndex, recurse: (...args: any) => any, entities: EntityTable): any;
}
export interface SchemaClass<T = any, N = T | undefined> extends SchemaSimple<T> {

@@ -45,2 +50,12 @@ _normalizeNullable(): any;

}
/** Represents Array or Values */
export interface PolymorphicInterface<T = any> extends SchemaSimpleNew<T> {
readonly schema: any;
_normalizeNullable(): any;
_denormalizeNullable(): [
any,
boolean,
boolean
];
}
export interface UnvisitFunction {

@@ -47,0 +62,0 @@ (input: any, schema: any): [

@@ -1,2 +0,3 @@

import { SchemaSimple, Schema, UnvisitFunction, NormalizedIndex, EntityTable, EntityInterface, } from './interface.js';
import { schema } from './index.js';
import { SchemaSimple, SchemaSimpleNew, Schema, UnvisitFunction, NormalizedIndex, EntityTable, EntityInterface, PolymorphicInterface, } from './interface.js';
import { AbstractInstanceType, Normalize, NormalizeNullable, Denormalize, DenormalizeNullable, DenormalizeObject, DenormalizeNullableObject, NormalizeObject, NormalizedNullableObject, EntityMap, } from './normal.js';

@@ -146,4 +147,5 @@ import { CollectionOptions } from './schemas/Collection.js';

*/
export class CollectionSchema<S extends Array<any> | Values<any> = any, Parent extends any[] = any> {
addWith<P extends any[] = Parent>(merge: (existing: any, incoming: any) => any, createCollectionFilter?: (...args: P) => (collectionKey: Record<string, any>) => boolean): CollectionSchema<S, P>;
export class CollectionInterface<S extends PolymorphicInterface = any, Parent extends any[] = any> {
addWith<P extends any[] = Parent>(merge: (existing: any, incoming: any) => any, createCollectionFilter?: (...args: P) => (collectionKey: Record<string, any>) => boolean): Collection<S, P>;
readonly cacheWith: object;
readonly schema: S;

@@ -186,16 +188,22 @@ key: string;

_normalizeNullable(): ReturnType<S['_normalizeNullable']>;
push: S extends Array<any> ? CollectionSchema<S, Parent> : never;
unshift: S extends Array<any> ? CollectionSchema<S, Parent> : never;
assign: S extends Values<any> ? CollectionSchema<S, Parent> : never;
push: S extends {
denormalizeOnly(...args: any): any[];
} ? Collection<S, Parent> : never;
unshift: S extends {
denormalizeOnly(...args: any): any;
} ? Collection<S, Parent> : never;
assign: S extends {
denormalizeOnly(...args: any): Record<string, unknown>;
} ? Collection<S, Parent> : never;
}
export type CollectionType<S extends any[] | Array<any> | Values<any> = any, Parent extends any[] = [
export type CollectionFromSchema<S extends any[] | PolymorphicInterface = any, Parent extends any[] = [
urlParams: Record<string, any>,
body?: Record<string, any>
]> = CollectionSchema<S extends any[] ? Array<S[number]> : S, Parent>;
]> = CollectionInterface<S extends any[] ? schema.Array<S[number]> : S, Parent>;
export interface CollectionConstructor {
new <S extends SchemaSimple[] | Array<any> | Values<any> = any, Parent extends any[] = [
new <S extends SchemaSimpleNew[] | PolymorphicInterface = any, Parent extends any[] = [
urlParams: Record<string, any>,
body?: Record<string, any>
]>(schema: S, options: CollectionOptions): CollectionType<S, Parent>;
readonly prototype: CollectionSchema;
]>(schema: S, options: CollectionOptions): CollectionFromSchema<S, Parent>;
readonly prototype: CollectionInterface;
}

@@ -207,3 +215,3 @@ export declare let CollectionRoot: CollectionConstructor;

*/
export declare class Collection<S extends any[] | Array<any> | Values<any> = any, Parent extends any[] = [
export declare class Collection<S extends any[] | PolymorphicInterface = any, Parent extends any[] = [
urlParams: Record<string, any>,

@@ -232,7 +240,2 @@ body?: Record<string, any>

}
export interface SchemaSimpleNew<T = any> {
normalize(input: any, parent: any, key: any, visit: (...args: any) => any, addEntity: (...args: any) => any, visitedEntities: Record<string, any>, storeEntities: any, args?: any[]): any;
denormalizeOnly(input: {}, args: readonly any[], unvisit: (input: any, schema: any) => any): T;
infer(args: readonly any[], indexes: NormalizedIndex, recurse: (...args: any) => any, entities: EntityTable): any;
}
// id is in Instance, so we default to that as pk

@@ -239,0 +242,0 @@ /**

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

import { PolymorphicInterface } from '../interface.js';
import { Values, Array as ArraySchema } from '../schema.js';

@@ -6,3 +7,3 @@ /**

*/
export default class CollectionSchema<S extends ArraySchema<any> | Values<any> = any, Parent extends any[] = [
export default class CollectionSchema<S extends PolymorphicInterface = any, Parent extends any[] = [
urlParams: Record<string, any>,

@@ -20,2 +21,3 @@ body?: Record<string, any>

constructor(schema: S, options: CollectionOptions);
readonly cacheWith: object;
toJSON(): {

@@ -22,0 +24,0 @@ name: string;

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

import { EntityInterface } from '../interface.js';
import { EntityInterface, SchemaSimpleNew } from '../interface.js';
import { AbstractInstanceType } from '../normal.js';
import { SchemaSimpleNew } from '../schema.js';
/**

@@ -5,0 +4,0 @@ * Marks entity as Invalid.

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

export type { EndpointInterface, ReadEndpoint, MutateEndpoint, } from './interface.js';
export type { EndpointOptions, EndpointInstance, EndpointInstanceInterface, EndpointExtendOptions, } from './endpoint.js';
export * as schema from './schema.js';
export type { CollectionInterface, CollectionFromSchema, } from './schema.js';
export { default as Entity } from './schemas/Entity.js';
export { default as validateRequired } from './validateRequired.js';
export { DELETED, INVALID } from './special.js';
export type { Schema, SnapshotInterface, ExpiryStatusInterface, } from './interface.js';
export type { EndpointInterface, ReadEndpoint, MutateEndpoint, Schema, SnapshotInterface, ExpiryStatusInterface, SchemaSimple, SchemaClass, SchemaSimpleNew, PolymorphicInterface, } from './interface.js';
export type { AbstractInstanceType, Normalize, NormalizeNullable, Denormalize, DenormalizeNullable, } from './normal.js';

@@ -9,0 +9,0 @@ export type { EndpointExtraOptions, FetchFunction, SchemaDetail, SchemaList, ResolveType, EndpointParam, NetworkError, UnknownError, ErrorTypes, } from './types.js';

@@ -23,2 +23,7 @@ import type { EndpointExtraOptions, FetchFunction } from './types.js';

}
export interface SchemaSimpleNew<T = any> {
normalize(input: any, parent: any, key: any, visit: (...args: any) => any, addEntity: (...args: any) => any, visitedEntities: Record<string, any>, storeEntities: any, args?: any[]): any;
denormalizeOnly(input: {}, args: readonly any[], unvisit: (input: any, schema: any) => any): T;
infer(args: readonly any[], indexes: NormalizedIndex, recurse: (...args: any) => any, entities: EntityTable): any;
}
export interface SchemaClass<T = any, N = T | undefined> extends SchemaSimple<T> {

@@ -45,2 +50,12 @@ _normalizeNullable(): any;

}
/** Represents Array or Values */
export interface PolymorphicInterface<T = any> extends SchemaSimpleNew<T> {
readonly schema: any;
_normalizeNullable(): any;
_denormalizeNullable(): [
any,
boolean,
boolean
];
}
export interface UnvisitFunction {

@@ -47,0 +62,0 @@ (input: any, schema: any): [

@@ -1,2 +0,3 @@

import type { SchemaSimple, Schema, UnvisitFunction, NormalizedIndex, EntityTable, EntityInterface, } from './interface.js';
import type { schema } from './index.js';
import type { SchemaSimple, SchemaSimpleNew, Schema, UnvisitFunction, NormalizedIndex, EntityTable, EntityInterface, PolymorphicInterface, } from './interface.js';
import type { AbstractInstanceType, Normalize, NormalizeNullable, Denormalize, DenormalizeNullable, DenormalizeObject, DenormalizeNullableObject, NormalizeObject, NormalizedNullableObject, EntityMap, } from './normal.js';

@@ -146,4 +147,5 @@ import { CollectionOptions } from './schemas/Collection.js';

*/
export class CollectionSchema<S extends Array<any> | Values<any> = any, Parent extends any[] = any> {
addWith<P extends any[] = Parent>(merge: (existing: any, incoming: any) => any, createCollectionFilter?: (...args: P) => (collectionKey: Record<string, any>) => boolean): CollectionSchema<S, P>;
export class CollectionInterface<S extends PolymorphicInterface = any, Parent extends any[] = any> {
addWith<P extends any[] = Parent>(merge: (existing: any, incoming: any) => any, createCollectionFilter?: (...args: P) => (collectionKey: Record<string, any>) => boolean): Collection<S, P>;
readonly cacheWith: object;
readonly schema: S;

@@ -186,16 +188,22 @@ key: string;

_normalizeNullable(): ReturnType<S['_normalizeNullable']>;
push: S extends Array<any> ? CollectionSchema<S, Parent> : never;
unshift: S extends Array<any> ? CollectionSchema<S, Parent> : never;
assign: S extends Values<any> ? CollectionSchema<S, Parent> : never;
push: S extends {
denormalizeOnly(...args: any): any[];
} ? Collection<S, Parent> : never;
unshift: S extends {
denormalizeOnly(...args: any): any;
} ? Collection<S, Parent> : never;
assign: S extends {
denormalizeOnly(...args: any): Record<string, unknown>;
} ? Collection<S, Parent> : never;
}
export type CollectionType<S extends any[] | Array<any> | Values<any> = any, Parent extends any[] = [
export type CollectionFromSchema<S extends any[] | PolymorphicInterface = any, Parent extends any[] = [
urlParams: Record<string, any>,
body?: Record<string, any>
]> = CollectionSchema<S extends any[] ? Array<S[number]> : S, Parent>;
]> = CollectionInterface<S extends any[] ? schema.Array<S[number]> : S, Parent>;
export interface CollectionConstructor {
new <S extends SchemaSimple[] | Array<any> | Values<any> = any, Parent extends any[] = [
new <S extends SchemaSimpleNew[] | PolymorphicInterface = any, Parent extends any[] = [
urlParams: Record<string, any>,
body?: Record<string, any>
]>(schema: S, options: CollectionOptions): CollectionType<S, Parent>;
readonly prototype: CollectionSchema;
]>(schema: S, options: CollectionOptions): CollectionFromSchema<S, Parent>;
readonly prototype: CollectionInterface;
}

@@ -207,3 +215,3 @@ export declare let CollectionRoot: CollectionConstructor;

*/
export declare class Collection<S extends any[] | Array<any> | Values<any> = any, Parent extends any[] = [
export declare class Collection<S extends any[] | PolymorphicInterface = any, Parent extends any[] = [
urlParams: Record<string, any>,

@@ -232,7 +240,2 @@ body?: Record<string, any>

}
export interface SchemaSimpleNew<T = any> {
normalize(input: any, parent: any, key: any, visit: (...args: any) => any, addEntity: (...args: any) => any, visitedEntities: Record<string, any>, storeEntities: any, args?: any[]): any;
denormalizeOnly(input: {}, args: readonly any[], unvisit: (input: any, schema: any) => any): T;
infer(args: readonly any[], indexes: NormalizedIndex, recurse: (...args: any) => any, entities: EntityTable): any;
}
// id is in Instance, so we default to that as pk

@@ -239,0 +242,0 @@ /**

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

import { PolymorphicInterface } from '../interface.js';
import { Values, Array as ArraySchema } from '../schema.js';

@@ -6,3 +7,3 @@ /**

*/
export default class CollectionSchema<S extends ArraySchema<any> | Values<any> = any, Parent extends any[] = [
export default class CollectionSchema<S extends PolymorphicInterface = any, Parent extends any[] = [
urlParams: Record<string, any>,

@@ -20,2 +21,3 @@ body?: Record<string, any>

constructor(schema: S, options: CollectionOptions);
get cacheWith(): object;
toJSON(): {

@@ -22,0 +24,0 @@ name: string;

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

import type { EntityInterface } from '../interface.js';
import type { EntityInterface, SchemaSimpleNew } from '../interface.js';
import type { AbstractInstanceType } from '../normal.js';
import { SchemaSimpleNew } from '../schema.js';
/**

@@ -5,0 +4,0 @@ * Marks entity as Invalid.

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

export type { EndpointInterface, ReadEndpoint, MutateEndpoint, } from './interface.js';
export type { EndpointOptions, EndpointInstance, EndpointInstanceInterface, EndpointExtendOptions, } from './endpoint.js';
export * as schema from './schema.js';
export type { CollectionInterface, CollectionFromSchema, } from './schema.js';
export { default as Entity } from './schemas/Entity.js';
export { default as validateRequired } from './validateRequired.js';
export { DELETED, INVALID } from './special.js';
export type { Schema, SnapshotInterface, ExpiryStatusInterface, } from './interface.js';
export type { EndpointInterface, ReadEndpoint, MutateEndpoint, Schema, SnapshotInterface, ExpiryStatusInterface, SchemaSimple, SchemaClass, SchemaSimpleNew, PolymorphicInterface, } from './interface.js';
export type { AbstractInstanceType, Normalize, NormalizeNullable, Denormalize, DenormalizeNullable, } from './normal.js';

@@ -9,0 +9,0 @@ export type { EndpointExtraOptions, FetchFunction, SchemaDetail, SchemaList, ResolveType, EndpointParam, NetworkError, UnknownError, ErrorTypes, } from './types.js';

@@ -23,2 +23,7 @@ import type { EndpointExtraOptions, FetchFunction } from './types.js';

}
export interface SchemaSimpleNew<T = any> {
normalize(input: any, parent: any, key: any, visit: (...args: any) => any, addEntity: (...args: any) => any, visitedEntities: Record<string, any>, storeEntities: any, args?: any[]): any;
denormalizeOnly(input: {}, args: readonly any[], unvisit: (input: any, schema: any) => any): T;
infer(args: readonly any[], indexes: NormalizedIndex, recurse: (...args: any) => any, entities: EntityTable): any;
}
export interface SchemaClass<T = any, N = T | undefined> extends SchemaSimple<T> {

@@ -45,2 +50,12 @@ _normalizeNullable(): any;

}
/** Represents Array or Values */
export interface PolymorphicInterface<T = any> extends SchemaSimpleNew<T> {
readonly schema: any;
_normalizeNullable(): any;
_denormalizeNullable(): [
any,
boolean,
boolean
];
}
export interface UnvisitFunction {

@@ -47,0 +62,0 @@ (input: any, schema: any): [

@@ -1,2 +0,3 @@

import type { SchemaSimple, Schema, UnvisitFunction, NormalizedIndex, EntityTable, EntityInterface, } from './interface.js';
import type { schema } from './index.js';
import type { SchemaSimple, SchemaSimpleNew, Schema, UnvisitFunction, NormalizedIndex, EntityTable, EntityInterface, PolymorphicInterface, } from './interface.js';
import type { AbstractInstanceType, Normalize, NormalizeNullable, Denormalize, DenormalizeNullable, DenormalizeObject, DenormalizeNullableObject, NormalizeObject, NormalizedNullableObject, EntityMap, } from './normal.js';

@@ -146,4 +147,5 @@ import { CollectionOptions } from './schemas/Collection.js';

*/
export class CollectionSchema<S extends Array<any> | Values<any> = any, Parent extends any[] = any> {
addWith<P extends any[] = Parent>(merge: (existing: any, incoming: any) => any, createCollectionFilter?: (...args: P) => (collectionKey: Record<string, any>) => boolean): CollectionSchema<S, P>;
export class CollectionInterface<S extends PolymorphicInterface = any, Parent extends any[] = any> {
addWith<P extends any[] = Parent>(merge: (existing: any, incoming: any) => any, createCollectionFilter?: (...args: P) => (collectionKey: Record<string, any>) => boolean): Collection<S, P>;
readonly cacheWith: object;
readonly schema: S;

@@ -186,16 +188,22 @@ key: string;

_normalizeNullable(): ReturnType<S['_normalizeNullable']>;
push: S extends Array<any> ? CollectionSchema<S, Parent> : never;
unshift: S extends Array<any> ? CollectionSchema<S, Parent> : never;
assign: S extends Values<any> ? CollectionSchema<S, Parent> : never;
push: S extends {
denormalizeOnly(...args: any): any[];
} ? Collection<S, Parent> : never;
unshift: S extends {
denormalizeOnly(...args: any): any;
} ? Collection<S, Parent> : never;
assign: S extends {
denormalizeOnly(...args: any): Record<string, unknown>;
} ? Collection<S, Parent> : never;
}
export type CollectionType<S extends any[] | Array<any> | Values<any> = any, Parent extends any[] = [
export type CollectionFromSchema<S extends any[] | PolymorphicInterface = any, Parent extends any[] = [
urlParams: Record<string, any>,
body?: Record<string, any>
]> = CollectionSchema<S extends any[] ? Array<S[number]> : S, Parent>;
]> = CollectionInterface<S extends any[] ? schema.Array<S[number]> : S, Parent>;
export interface CollectionConstructor {
new <S extends SchemaSimple[] | Array<any> | Values<any> = any, Parent extends any[] = [
new <S extends SchemaSimpleNew[] | PolymorphicInterface = any, Parent extends any[] = [
urlParams: Record<string, any>,
body?: Record<string, any>
]>(schema: S, options: CollectionOptions): CollectionType<S, Parent>;
readonly prototype: CollectionSchema;
]>(schema: S, options: CollectionOptions): CollectionFromSchema<S, Parent>;
readonly prototype: CollectionInterface;
}

@@ -207,3 +215,3 @@ export declare let CollectionRoot: CollectionConstructor;

*/
export declare class Collection<S extends any[] | Array<any> | Values<any> = any, Parent extends any[] = [
export declare class Collection<S extends any[] | PolymorphicInterface = any, Parent extends any[] = [
urlParams: Record<string, any>,

@@ -232,7 +240,2 @@ body?: Record<string, any>

}
export interface SchemaSimpleNew<T = any> {
normalize(input: any, parent: any, key: any, visit: (...args: any) => any, addEntity: (...args: any) => any, visitedEntities: Record<string, any>, storeEntities: any, args?: any[]): any;
denormalizeOnly(input: {}, args: readonly any[], unvisit: (input: any, schema: any) => any): T;
infer(args: readonly any[], indexes: NormalizedIndex, recurse: (...args: any) => any, entities: EntityTable): any;
}
// id is in Instance, so we default to that as pk

@@ -239,0 +242,0 @@ /**

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

import { PolymorphicInterface } from '../interface.js';
import { Values, Array as ArraySchema } from '../schema.js';

@@ -6,3 +7,3 @@ /**

*/
export default class CollectionSchema<S extends ArraySchema<any> | Values<any> = any, Parent extends any[] = [
export default class CollectionSchema<S extends PolymorphicInterface = any, Parent extends any[] = [
urlParams: Record<string, any>,

@@ -20,2 +21,3 @@ body?: Record<string, any>

constructor(schema: S, options: CollectionOptions);
get cacheWith(): object;
toJSON(): {

@@ -22,0 +24,0 @@ name: string;

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

import type { EntityInterface } from '../interface.js';
import type { EntityInterface, SchemaSimpleNew } from '../interface.js';
import type { AbstractInstanceType } from '../normal.js';
import { SchemaSimpleNew } from '../schema.js';
/**

@@ -5,0 +4,0 @@ * Marks entity as Invalid.

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