aeria-sdk 0.0.25 → 0.0.26

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/mirror.js CHANGED
@@ -83,10 +83,7 @@ declare module 'aeria-sdk' {
83
83
  export const url: string
84
84
  export const aeria: StrongelyTypedTLO
85
85
  }
86
-
87
-
88
- \n
89
- `;
86
+ \n`;
90
87
  };
91
88
  const runtimeCjs = (config) => `const config = ${JSON.stringify(config)}
92
89
  exports.config = config
package/dist/mirror.mjs CHANGED
@@ -129,7 +129,7 @@ import { topLevel } from "./topLevel.mjs";
129
129
  import { apiUrl } from "./utils.mjs";
130
130
  var mirrorDts = function(mirrorObj) {
131
131
  var collections = mirrorObj.descriptions;
132
- return "import type {\n InferProperty,\n InferResponse,\n SchemaWithId,\n MakeEndpoint,\n RequestMethod,\n CollectionFunctionsPaginated\n\n} from '@aeriajs/types'\n\ndeclare type MirrorDescriptions = ".concat(JSON.stringify(collections, null, 2), "\n\n\ndeclare type MirrorRouter = ").concat(JSON.stringify(mirrorObj.router, null, 2), "\n\n\ndeclare global {\n type Collections = {\n [K in keyof MirrorDescriptions]: {\n item: SchemaWithId<MirrorDescriptions[K]>\n }\n }\n}\n\ndeclare module 'aeria-sdk' {\n import { TopLevelObject, TLOFunctions } from 'aeria-sdk'\n\n type UnionToIntersection<T> = (T extends any ? ((x: T) => 0) : never) extends ((x: infer R) => 0)\n ? R\n : never\n\n type InferEndpoint<Route extends keyof MirrorRouter> = {\n [Method in keyof MirrorRouter[Route]]: Method extends RequestMethod\n ? MirrorRouter[Route][Method] extends infer Contract\n ? Contract extends\n | { response: infer RouteResponse }\n | { payload: infer RoutePayload }\n | { query: infer RoutePayload }\n ? MakeEndpoint<\n Route,\n Method,\n InferResponse<RouteResponse>,\n RoutePayload extends {}\n ? InferProperty<RoutePayload>\n : undefined\n >\n : MakeEndpoint<Route, Method>\n : never\n : never\n } extends infer Methods\n ? Methods[keyof Methods]\n : never\n\n type Endpoints = {\n [Route in keyof MirrorRouter]: Route extends `/${infer Coll}/${infer Fn}`\n ? Coll extends keyof Collections\n ? Fn extends keyof CollectionFunctionsPaginated<any>\n ? Record<Coll, Record<\n Fn, {\n POST: CollectionFunctionsPaginated<SchemaWithId<MirrorDescriptions[Coll]>>[Fn]\n }\n >>\n : InferEndpoint<Route>\n : InferEndpoint<Route>\n : InferEndpoint<Route>\n } extends infer Endpoints\n ? UnionToIntersection<Endpoints[keyof Endpoints]>\n : never\n\n type StrongelyTypedTLO = TopLevelObject & Endpoints\n\n export const url: string\n export const aeria: StrongelyTypedTLO\n}\n\n \n\n\n ");
132
+ return "import type {\n InferProperty,\n InferResponse,\n SchemaWithId,\n MakeEndpoint,\n RequestMethod,\n CollectionFunctionsPaginated\n\n} from '@aeriajs/types'\n\ndeclare type MirrorDescriptions = ".concat(JSON.stringify(collections, null, 2), "\n\n\ndeclare type MirrorRouter = ").concat(JSON.stringify(mirrorObj.router, null, 2), "\n\n\ndeclare global {\n type Collections = {\n [K in keyof MirrorDescriptions]: {\n item: SchemaWithId<MirrorDescriptions[K]>\n }\n }\n}\n\ndeclare module 'aeria-sdk' {\n import { TopLevelObject, TLOFunctions } from 'aeria-sdk'\n\n type UnionToIntersection<T> = (T extends any ? ((x: T) => 0) : never) extends ((x: infer R) => 0)\n ? R\n : never\n\n type InferEndpoint<Route extends keyof MirrorRouter> = {\n [Method in keyof MirrorRouter[Route]]: Method extends RequestMethod\n ? MirrorRouter[Route][Method] extends infer Contract\n ? Contract extends\n | { response: infer RouteResponse }\n | { payload: infer RoutePayload }\n | { query: infer RoutePayload }\n ? MakeEndpoint<\n Route,\n Method,\n InferResponse<RouteResponse>,\n RoutePayload extends {}\n ? InferProperty<RoutePayload>\n : undefined\n >\n : MakeEndpoint<Route, Method>\n : never\n : never\n } extends infer Methods\n ? Methods[keyof Methods]\n : never\n\n type Endpoints = {\n [Route in keyof MirrorRouter]: Route extends `/${infer Coll}/${infer Fn}`\n ? Coll extends keyof Collections\n ? Fn extends keyof CollectionFunctionsPaginated<any>\n ? Record<Coll, Record<\n Fn, {\n POST: CollectionFunctionsPaginated<SchemaWithId<MirrorDescriptions[Coll]>>[Fn]\n }\n >>\n : InferEndpoint<Route>\n : InferEndpoint<Route>\n : InferEndpoint<Route>\n } extends infer Endpoints\n ? UnionToIntersection<Endpoints[keyof Endpoints]>\n : never\n\n type StrongelyTypedTLO = TopLevelObject & Endpoints\n\n export const url: string\n export const aeria: StrongelyTypedTLO\n}\n\n");
133
133
  };
134
134
  export var runtimeCjs = function(config) {
135
135
  return "const config = ".concat(JSON.stringify(config), "\nexports.config = config\nexports.url = '").concat(apiUrl(config), "'\nexports.aeria = require('aeria-sdk/topLevel').topLevel(config)\nexports.storage = require('aeria-sdk/storage').getStorage(config)\n\n");
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "aeria-sdk",
3
- "version": "0.0.25",
3
+ "version": "0.0.26",
4
4
  "description": "",
5
5
  "main": "dist/index.js",
6
6
  "module": "dist/index.mjs",
@@ -49,8 +49,8 @@
49
49
  }
50
50
  },
51
51
  "peerDependencies": {
52
- "@aeriajs/common": "^0.0.6",
53
- "@aeriajs/types": "^0.0.5"
52
+ "@aeriajs/common": "^0.0.7",
53
+ "@aeriajs/types": "^0.0.6"
54
54
  },
55
55
  "scripts": {
56
56
  "test": "echo skipping",