-
Notifications
You must be signed in to change notification settings - Fork 1
/
typescript-api-platform.umd.js.map
1 lines (1 loc) · 26.8 KB
/
typescript-api-platform.umd.js.map
1
{"version":3,"file":"typescript-api-platform.umd.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":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;IAAA;QAAA;YACE,OAAE,GAAc,IAAI,CAAA;SACrB;QAAD,aAAC;IAAD,CAAC,IAAA;;ICAD;QAA0C,gCAAc;QAAxD;;SACC;QAAD,mBAAC;IAAD,CADA,CAA0C,MAAM,GAC/C;;ICHD;QAAA;YACE,YAAO,GAAmB,IAAI,CAAA;SAC/B;QAAD,cAAC;IAAD,CAAC,IAAA;;aCAuB,eAAe,CAAE,iBAAqC,EAAE,MAA2B;QACzG,IAAI,CAAC,iBAAiB,EAAE;YACtB,OAAO,MAAM,CAAA;SACd;QAED,IAAI,CAAC,MAAM,EAAE;YACX,MAAM,GAAG,EAAE,CAA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