-
Notifications
You must be signed in to change notification settings - Fork 1
/
typescript-api-platform.es5.js.map
1 lines (1 loc) · 26.6 KB
/
typescript-api-platform.es5.js.map
1
{"version":3,"file":"typescript-api-platform.es5.js","sources":["../src/model/IdData.ts","../src/model/AbstractData.ts","../src/model/Message.ts","../src/function/configureCancel.ts","../src/function/configurePage.ts","../src/function/createPropsParams.ts","../src/resource/AbstractResource.ts","../src/resource/AbstractApiResource.ts","../src/resource/AbstractGetEntityResource.ts","../src/resource/AbstractEntityResource.ts","../src/resource/AbstractDataResource.ts","../src/resource/DefaultDataResource.ts","../src/typescript-api-platform.ts"],"sourcesContent":["export default class IdData<T> {\n id?: T | null = null\n}\n","import IdData from './IdData'\r\n\r\nexport default class AbstractData extends IdData<number> {\r\n}\r\n","export default class Message {\r\n message?: string | null = null\r\n}\r\n","import { AxiosRequestConfig, CancelTokenSource } from 'axios'\r\n\r\nexport default function configureCancel (cancelTokenSource?: CancelTokenSource, config?: AxiosRequestConfig) {\r\n if (!cancelTokenSource) {\r\n return config\r\n }\r\n\r\n if (!config) {\r\n config = {}\r\n }\r\n\r\n config.cancelToken = cancelTokenSource.token\r\n return config\r\n}\r\n","import Page from '../model/Page'\nimport { AxiosRequestConfig } from 'axios'\n\nexport default function configurePage (page?: Page, config?: AxiosRequestConfig) {\n if (!page) {\n return config\n }\n\n if (!config) {\n config = {}\n }\n\n if (!config.headers) {\n config.headers = {}\n }\n\n config.headers['Pagination-Page'] = page.page\n config.headers['Pagination-ItemsPerPage'] = page.itemsPerPage\n\n return config\n}\n","export default function createPropsParams (props: string[]): string {\n const params: Set<string> = new Set<string>()\n\n for (const prop of props) {\n const path = prop.split('.')\n let i = 0\n let param = 'props'\n while (i < path.length) {\n if (i === path.length - 1) {\n if (path[i] === '*') {\n param += '=true'\n } else {\n param += `[]=${path[i]}`\n }\n } else {\n param += `[${path[i]}]`\n }\n i++\n }\n params.add(param)\n }\n return Array.from(params).join('&')\n}\n","import { AxiosInstance, AxiosPromise, AxiosResponse } from 'axios'\r\n\r\n/**\r\n * The basic comportment of a resource which access an API\r\n *\r\n * The Axios response stay available using the property `$axios`\r\n */\r\nexport default abstract class AbstractResource {\r\n protected axios: AxiosInstance\r\n protected objectFactory?: (data: any) => any\r\n\r\n constructor (axios: AxiosInstance, ObjectConstructor?: { new (): any }) {\r\n this.axios = axios\r\n\r\n if (ObjectConstructor) {\r\n this.objectFactory = (data: any) => {\r\n if (Array.isArray(data)) {\r\n data = data.map((item) => {\r\n const constructed = new ObjectConstructor()\r\n return Object.assign(constructed, item)\r\n })\r\n } else {\r\n const constructed = new ObjectConstructor()\r\n data = Object.assign(constructed, data)\r\n }\r\n return data\r\n }\r\n }\r\n }\r\n\r\n protected wrapHydraItem (data: any): any & { $hydra: any } {\r\n const $hydra: { [key: string]: any } = {}\r\n for (const key of Object.keys(data)) {\r\n if (key.startsWith('@') || (key.startsWith('hydra') && key !== 'hydra:member')) {\r\n $hydra[key] = data[key]\r\n delete data[key]\r\n }\r\n }\r\n if ($hydra['@type'] === 'hydra:Collection') {\r\n data = data['hydra:member']\r\n for (const key of Object.keys(data)) {\r\n data[key] = this.wrapHydraItem(data[key])\r\n }\r\n }\r\n data.$hydra = $hydra\r\n return data\r\n }\r\n\r\n protected wrapPromise (axiosPromise: AxiosPromise, objectFactory?: (data: any) => any) {\r\n return new Promise((resolve, reject) => {\r\n axiosPromise.then((axiosResponse: AxiosResponse) => {\r\n let data = axiosResponse.data\r\n if (typeof data === 'object') {\r\n data = this.wrapHydraItem(data)\r\n\r\n if (!objectFactory) {\r\n objectFactory = this.objectFactory\r\n }\r\n\r\n if (objectFactory) {\r\n data = objectFactory(data)\r\n axiosResponse.data = data\r\n }\r\n\r\n data.$axios = axiosResponse\r\n delete data.$axios.data\r\n\r\n const headers = axiosResponse.headers\r\n\r\n if ('pagination-page' in headers || 'pagination-itemsperpage' in headers || 'pagination-itemstotalcount' in headers) {\r\n data.$page = {\r\n page: parseInt(headers['pagination-page'], 10),\r\n itemsPerPage: parseInt(headers['pagination-itemsperpage'], 10),\r\n itemsTotalCount: parseInt(headers['pagination-itemstotalcount'], 10)\r\n }\r\n }\r\n\r\n resolve(data)\r\n } else {\r\n resolve(axiosResponse.data)\r\n }\r\n }).catch(reject)\r\n })\r\n }\r\n}\r\n","import AbstractResource from './AbstractResource'\nimport createPropsParams from '../function/createPropsParams'\nimport AxiosResponseExt from '../model/AxiosResponseExt'\nimport { AxiosRequestConfig } from 'axios'\nimport moment from 'moment'\nimport GetOptions from '../model/GetOptions'\nimport GetOneOptions from '../model/GetOneOptions'\n\nexport default abstract class AbstractApiResource<ResponseType, InputType = Partial<ResponseType>> extends AbstractResource {\n abstract readonly prefix: string\n\n private loadProps (params: string[], options: GetOneOptions) {\n if (options.props) {\n params.push(createPropsParams(options.props))\n }\n }\n\n private buildSearch (field: string, query: string | number, type: string | undefined, isArray: boolean = false) {\n if (type) {\n return `${field}[${type}]=${query}`\n }\n if (isArray) {\n return `${field}[]=${query}`\n }\n return `${field}=${query}`\n }\n\n private loadSearches (params: string[], options: GetOptions) {\n if (options.searches) {\n for (const search of options.searches) {\n if (Array.isArray(search.query)) {\n search.query.forEach((item: string | number) => {\n params.push(this.buildSearch(search.field, item, search.type, true))\n })\n } else {\n params.push(this.buildSearch(search.field, search.query, search.type))\n }\n }\n }\n }\n\n private loadSort (params: string[], options: GetOptions) {\n if (options.sort) {\n params.push(`order[${options.sort.field}]=${options.sort.desc ? 'desc' : 'asc'}`)\n }\n }\n\n private loadPage (params: string[], options: GetOptions) {\n if (options.page) {\n params.push('pagination=true')\n if (options.page.page) {\n params.push(`page=${options.page.page}`)\n }\n if (options.page.itemsPerPage) {\n params.push(`itemsPerPage=${options.page.itemsPerPage}`)\n }\n } else {\n params.push('pagination=false')\n }\n }\n\n private buildParams (options?: GetOptions | GetOneOptions): string[] {\n const params: string[] = []\n\n if (!options) options = {}\n\n this.loadProps(params, options)\n this.loadSearches(params, options)\n this.loadSort(params, options)\n this.loadPage(params, options)\n\n return params\n }\n\n private buildUrl (path: string, options?: GetOptions | GetOneOptions): string {\n const params = this.buildParams(options)\n\n // TODO: Les paramètres peuvent être pasés proprement dans AXIOS !\n return params && params.length > 0 ? `${path}?${params.join('&')}` : path\n }\n\n private preProcessData (item: any): any {\n Object.keys(item).forEach((key) => {\n if (item[key] instanceof Date) {\n const date = moment(item[key])\n item[key] = date.format('YYYY-MM-DD HH:mm:ss')\n }\n })\n return item\n }\n\n async count<GetResponseType = ResponseType> (options?: GetOptions): Promise<number & AxiosResponseExt> {\n const numberOfResultOptions: GetOptions = {\n ...options,\n ...{\n page: {\n page: 1,\n itemsPerPage: 1\n }\n }\n }\n const getNumberOfResults = await this.get(numberOfResultOptions)\n return getNumberOfResults.$hydra['hydra:totalItems']\n }\n\n async getAll<GetResponseType = ResponseType> (options?: GetOptions): Promise<GetResponseType[] & AxiosResponseExt> {\n return this.get(options)\n }\n\n get<GetResponseType = ResponseType> (options?: GetOptions): Promise<GetResponseType[] & AxiosResponseExt> {\n const url = this.buildUrl(this.prefix, options)\n const axiosConfig = options ? options.axiosConfig : undefined\n\n const promise = this.wrapPromise(this.axios.get(url, axiosConfig))\n return promise as Promise<GetResponseType[] & AxiosResponseExt>\n }\n\n getOne<GetResponseType = ResponseType> (id: number | string, options?: GetOneOptions): Promise<GetResponseType & AxiosResponseExt> {\n const url = this.buildUrl(`${this.prefix}/${id}`, options)\n const axiosConfig = options ? options.axiosConfig : undefined\n\n const promise = this.wrapPromise(this.axios.get(url, axiosConfig))\n return promise as Promise<GetResponseType & AxiosResponseExt>\n }\n\n post<PostInputType = InputType, PostResponseType = ResponseType> (item: PostInputType, options?: GetOneOptions): Promise<PostResponseType & AxiosResponseExt> {\n const url = this.buildUrl(this.prefix, options)\n const axiosConfig = options ? options.axiosConfig : undefined\n\n const promise = this.wrapPromise(this.axios.post(url, this.preProcessData(item), axiosConfig))\n return promise as Promise<PostResponseType & AxiosResponseExt>\n }\n\n delete<DeleteResponseType = ResponseType> (id: number | string, options?: GetOneOptions): Promise<ResponseType & AxiosResponseExt> {\n const url = this.buildUrl(`${this.prefix}/${id}`, options)\n const axiosConfig = options ? options.axiosConfig : undefined\n\n const promise = this.wrapPromise(this.axios.delete(url, axiosConfig))\n return promise as Promise<ResponseType & AxiosResponseExt>\n }\n\n put<PutInputType = InputType, PutResponseType = ResponseType> (id: number | string, item: PutInputType, options?: GetOneOptions): Promise<PutResponseType & AxiosResponseExt> {\n const url = this.buildUrl(`${this.prefix}/${id}`, options)\n const axiosConfig = options ? options.axiosConfig : undefined\n\n const promise = this.wrapPromise(this.axios.put(url, this.preProcessData(item), axiosConfig))\n return promise as Promise<PutResponseType & AxiosResponseExt>\n }\n\n patch<PatchInputType = InputType, PatchResponseType = ResponseType> (id: number | string, item: PatchInputType, options?: GetOneOptions): Promise<PatchResponseType & AxiosResponseExt> {\n const url = this.buildUrl(`${this.prefix}/${id}`, options)\n const axiosConfig = options && options.axiosConfig ? options.axiosConfig : {} as AxiosRequestConfig\n\n if (!axiosConfig.headers) {\n axiosConfig.headers = {}\n }\n\n if (!axiosConfig.headers['Content-Type']) {\n axiosConfig.headers['Content-Type'] = 'application/merge-patch+json'\n }\n\n const promise = this.wrapPromise(this.axios.patch(url, this.preProcessData(item), axiosConfig))\n return promise as Promise<PatchResponseType & AxiosResponseExt>\n }\n}\n","import { AxiosInstance, CancelTokenSource } from 'axios'\nimport AbstractResource from './AbstractResource'\nimport AxiosResponseExt from '../model/AxiosResponseExt'\n\nexport default abstract class AbstractGetEntityResource<T, K> extends AbstractResource {\n private prefix: string\n\n constructor (axios: AxiosInstance, prefix: string) {\n super(axios)\n this.prefix = prefix\n }\n\n getPath (id?: K): string {\n if (id === undefined) {\n return this.prefix\n } else {\n const idPath = this.getIdPathRepresentation(id)\n return `${this.prefix}/${idPath}`\n }\n }\n\n getIdPathRepresentation (id: K): string {\n return '' + id\n }\n\n get (id: K, cancelTokenSource?: CancelTokenSource): Promise<T & AxiosResponseExt> {\n const path = this.getPath(id)\n const cancelOptions = cancelTokenSource ? { cancelToken: cancelTokenSource.token } : undefined\n const promise = this.wrapPromise(this.axios.get(path, cancelOptions))\n return promise as Promise<T & AxiosResponseExt>\n }\n}\n","import { CancelTokenSource } from 'axios'\nimport AbstractGetEntityResource from './AbstractGetEntityResource'\nimport AxiosResponseExt from '../model/AxiosResponseExt'\n\nexport default abstract class AbstractEntityResource<T, K> extends AbstractGetEntityResource<T, K> {\n abstract getObjectId (object: T): K\n\n getPathFromObject (object?: T) {\n if (object === undefined) {\n return this.getPath()\n } else {\n const id = this.getObjectId(object)\n return this.getPath(id)\n }\n }\n\n getFromObject (object: T): Promise<T & AxiosResponseExt> {\n return this.get(this.getObjectId(object))\n }\n\n list (cancelTokenSource?: CancelTokenSource): Promise<T[] & AxiosResponseExt> {\n const cancelOptions = cancelTokenSource ? { cancelToken: cancelTokenSource.token } : undefined\n const promise = this.wrapPromise(this.axios.get(this.getPath(), cancelOptions))\n return promise as Promise<T[] & AxiosResponseExt>\n }\n\n create (object: T): Promise<T & AxiosResponseExt> {\n return this.wrapPromise(this.axios.post(this.getPath(), object)) as Promise<T & AxiosResponseExt>\n }\n\n deleteFromObject (object: T): Promise<T & AxiosResponseExt> {\n return this.delete(this.getObjectId(object))\n }\n\n delete (id: K): Promise<T & AxiosResponseExt> {\n const path = this.getPath(id)\n return this.wrapPromise(this.axios.delete(path)) as Promise<T & AxiosResponseExt>\n }\n\n update (object: T): Promise<T & AxiosResponseExt> {\n const path = this.getPathFromObject(object)\n return this.wrapPromise(this.axios.put(path, object)) as Promise<T & AxiosResponseExt>\n }\n}\n","import IdData from '../model/IdData'\nimport AbstractEntityResource from './AbstractEntityResource'\n\nexport default abstract class AbstractDataResource<T extends IdData<any>> extends AbstractEntityResource<T, string> {\n getObjectId (object: T): string {\n return object.id\n }\n}\n","import { AxiosInstance } from 'axios'\nimport IdData from '../model/IdData'\nimport AbstractDataResource from './AbstractDataResource'\n\nexport default class DefaultDataResource<T extends IdData<any>> extends AbstractDataResource<T> {\n constructor (axios: AxiosInstance, dataName: string) {\n super(axios, dataName)\n }\n}\n","// Expose all models\nimport AbstractData from './model/AbstractData'\nimport ApiSearch from './model/ApiSearch'\nimport AxiosResponseExt from './model/AxiosResponseExt'\nimport GetOneOptions from './model/GetOneOptions'\nimport GetOptions from './model/GetOptions'\nimport IdData from './model/IdData'\nimport Message from './model/Message'\nimport Page from './model/Page'\n// Expose all functions\nimport configureCancel from './function/configureCancel'\nimport configurePage from './function/configurePage'\nimport createPropsParams from './function/createPropsParams'\n// Expose all resouces\nimport AbstractApiResource from './resource/AbstractApiResource'\nimport AbstractDataResource from './resource/AbstractDataResource'\nimport AbstractEntityResource from './resource/AbstractEntityResource'\nimport AbstractGetEntityResource from './resource/AbstractGetEntityResource'\nimport AbstractResource from './resource/AbstractResource'\nimport DefaultDataResource from './resource/DefaultDataResource'\n\nexport {\n AbstractData,\n ApiSearch,\n AxiosResponseExt,\n GetOneOptions,\n GetOptions,\n IdData,\n Message,\n Page,\n configureCancel,\n configurePage,\n createPropsParams,\n AbstractApiResource,\n AbstractDataResource,\n AbstractEntityResource,\n AbstractGetEntityResource,\n AbstractResource,\n DefaultDataResource\n}\n"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;IAAA;QACE,OAAE,GAAc,IAAI,CAAA;KACrB;IAAD,aAAC;CAAA,IAAA;;ACAD;IAA0C,gCAAc;IAAxD;;KACC;IAAD,mBAAC;CADD,CAA0C,MAAM,GAC/C;;ACHD;IAAA;QACE,YAAO,GAAmB,IAAI,CAAA;KAC/B;IAAD,cAAC;CAAA,IAAA;;SCAuB,eAAe,CAAE,iBAAqC,EAAE,MAA2B;IACzG,IAAI,CAAC,iBAAiB,EAAE;QACtB,OAAO,MAAM,CAAA;KACd;IAED,IAAI,CAAC,MAAM,EAAE;QACX,MAAM,GAAG,EAAE,CAAA;KACZ;IAED,MAAM,CAAC,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