@geekmidas/client 0.3.0 → 0.5.0
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/auth-fetcher.cjs +2 -3
- package/dist/auth-fetcher.cjs.map +1 -1
- package/dist/auth-fetcher.d.cts +2 -1
- package/dist/auth-fetcher.d.cts.map +1 -0
- package/dist/auth-fetcher.d.mts +2 -1
- package/dist/auth-fetcher.d.mts.map +1 -0
- package/dist/auth-fetcher.mjs +2 -3
- package/dist/auth-fetcher.mjs.map +1 -1
- package/dist/endpoint-hooks.cjs +10 -5
- package/dist/endpoint-hooks.cjs.map +1 -1
- package/dist/endpoint-hooks.d.cts +2 -2
- package/dist/endpoint-hooks.d.cts.map +1 -0
- package/dist/endpoint-hooks.d.mts +2 -2
- package/dist/endpoint-hooks.d.mts.map +1 -0
- package/dist/endpoint-hooks.mjs +10 -5
- package/dist/endpoint-hooks.mjs.map +1 -1
- package/dist/{fetcher-DLDD_7Sa.mjs → fetcher-5fnBE7Dk.mjs} +2 -2
- package/dist/fetcher-5fnBE7Dk.mjs.map +1 -0
- package/dist/{fetcher-KdwHgdAl.cjs → fetcher-CgLEaIAC.cjs} +2 -2
- package/dist/fetcher-CgLEaIAC.cjs.map +1 -0
- package/dist/fetcher.cjs +1 -1
- package/dist/fetcher.d.cts +3 -1
- package/dist/fetcher.d.cts.map +1 -0
- package/dist/fetcher.d.mts +3 -1
- package/dist/fetcher.d.mts.map +1 -0
- package/dist/fetcher.mjs +1 -1
- package/dist/infer.d.cts.map +1 -0
- package/dist/infer.d.mts.map +1 -0
- package/dist/openapi-hooks.cjs +3 -5
- package/dist/openapi-hooks.cjs.map +1 -1
- package/dist/openapi-hooks.d.cts +3 -3
- package/dist/openapi-hooks.d.cts.map +1 -0
- package/dist/openapi-hooks.d.mts +6 -6
- package/dist/openapi-hooks.d.mts.map +1 -0
- package/dist/openapi-hooks.mjs +3 -5
- package/dist/openapi-hooks.mjs.map +1 -1
- package/dist/openapi-types.d.cts.map +1 -0
- package/dist/openapi-types.d.mts.map +1 -0
- package/dist/openapi.cjs.map +1 -1
- package/dist/openapi.mjs.map +1 -1
- package/dist/react-query.cjs +1 -1
- package/dist/react-query.cjs.map +1 -1
- package/dist/react-query.d.cts +3 -1
- package/dist/react-query.d.cts.map +1 -0
- package/dist/react-query.d.mts +10 -8
- package/dist/react-query.d.mts.map +1 -0
- package/dist/react-query.mjs +1 -1
- package/dist/react-query.mjs.map +1 -1
- package/dist/{types-D4OSWveN.d.cts → types-4K4N-Fl1.d.cts} +8 -6
- package/dist/types-4K4N-Fl1.d.cts.map +1 -0
- package/dist/{types-Cdv1XAWr.d.mts → types-hhkZWjQn.d.mts} +8 -6
- package/dist/types-hhkZWjQn.d.mts.map +1 -0
- package/dist/types.d.cts +1 -1
- package/dist/types.d.mts +1 -1
- package/package.json +6 -5
- package/src/__tests__/auth-fetcher.spec.ts +505 -0
- package/src/__tests__/endpoint-hooks.spec.tsx +348 -348
- package/src/__tests__/fetcher.spec.ts +403 -403
- package/src/__tests__/infer.integration.spec.ts +171 -171
- package/src/__tests__/infer.spec.ts +182 -182
- package/src/__tests__/method-restrictions.spec.tsx +165 -165
- package/src/__tests__/openapi-hooks.spec.tsx +536 -537
- package/src/__tests__/react-query-infinite.spec.tsx +989 -989
- package/src/__tests__/react-query-invalidation.spec.tsx +223 -222
- package/src/__tests__/react-query.spec.tsx +567 -567
- package/src/__tests__/setup.ts +260 -260
- package/src/__tests__/types.spec.ts +127 -127
- package/src/__tests__/url-parsing.spec.ts +191 -191
- package/src/auth-fetcher.ts +160 -162
- package/src/endpoint-hooks.ts +151 -150
- package/src/fetcher.ts +163 -163
- package/src/infer.ts +64 -63
- package/src/openapi-hooks.ts +146 -146
- package/src/openapi-types.d.ts +428 -428
- package/src/openapi.json +593 -593
- package/src/react-query.ts +281 -281
- package/src/types.ts +124 -125
- package/tsconfig.json +12 -0
- package/dist/fetcher-DLDD_7Sa.mjs.map +0 -1
- package/dist/fetcher-KdwHgdAl.cjs.map +0 -1
package/dist/openapi.mjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"openapi.mjs","names":[],"sources":["../src/openapi.json"],"sourcesContent":["{\n \"openapi\": \"3.0.0\",\n \"info\": {\n \"title\": \"API Documentation\",\n \"version\": \"1.0.0\",\n \"description\": \"Auto-generated API documentation from endpoints\"\n },\n \"paths\": {\n \"/explore/jobs\": {\n \"get\": {\n \"operationId\": \"exploreJobs\",\n \"responses\": {\n \"200\": {\n \"description\": \"Successful response\",\n \"content\": {\n \"application/json\": {\n \"schema\": {\n \"$schema\": \"https://json-schema.org/draft/2020-12/schema\",\n \"type\": \"object\",\n \"properties\": {\n \"items\": {\n \"type\": \"array\",\n \"items\": {\n \"type\": \"object\",\n \"properties\": {\n \"role\": {\n \"type\": \"string\",\n \"minLength\": 1,\n \"maxLength\": 255\n },\n \"type\": {\n \"type\": \"string\",\n \"enum\": [\n \"Server\",\n \"Waiter\",\n \"Host\",\n \"Bartender\",\n \"KitchenPorter\",\n \"Steward\",\n \"BusPerson\",\n \"Dishwasher\"\n ]\n },\n \"overview\": {\n \"type\": \"string\",\n \"minLength\": 1\n },\n \"qualifications\": {\n \"type\": \"string\",\n \"minLength\": 1\n },\n \"hourlyRate\": {\n \"type\": \"object\",\n \"properties\": {\n \"max\": {\n \"type\": \"number\"\n },\n \"min\": {\n \"type\": \"number\"\n }\n },\n \"required\": [\"max\", \"min\"],\n \"additionalProperties\": false\n },\n \"dateNeeded\": {\n \"type\": \"object\",\n \"properties\": {\n \"from\": {\n \"type\": \"string\"\n },\n \"to\": {\n \"type\": \"string\"\n }\n },\n \"required\": [\"from\", \"to\"],\n \"additionalProperties\": false\n },\n \"shiftHours\": {\n \"type\": \"object\",\n \"properties\": {\n \"from\": {\n \"type\": \"string\"\n },\n \"to\": {\n \"type\": \"string\"\n }\n },\n \"required\": [\"from\", \"to\"],\n \"additionalProperties\": false\n },\n \"id\": {\n \"type\": \"string\",\n \"format\": \"uuid\",\n \"pattern\": \"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000)$\"\n },\n \"createdAt\": {\n \"type\": \"string\",\n \"format\": \"date-time\",\n \"pattern\": \"^(?:(?:\\\\d\\\\d[2468][048]|\\\\d\\\\d[13579][26]|\\\\d\\\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\\\d|30)|(?:02)-(?:0[1-9]|1\\\\d|2[0-8])))T(?:(?:[01]\\\\d|2[0-3]):[0-5]\\\\d(?::[0-5]\\\\d(?:\\\\.\\\\d+)?)?(?:Z))$\"\n },\n \"updatedAt\": {\n \"type\": \"string\",\n \"format\": \"date-time\",\n \"pattern\": \"^(?:(?:\\\\d\\\\d[2468][048]|\\\\d\\\\d[13579][26]|\\\\d\\\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\\\d|30)|(?:02)-(?:0[1-9]|1\\\\d|2[0-8])))T(?:(?:[01]\\\\d|2[0-3]):[0-5]\\\\d(?::[0-5]\\\\d(?:\\\\.\\\\d+)?)?(?:Z))$\"\n },\n \"status\": {\n \"type\": \"string\",\n \"enum\": [\"Draft\", \"Active\", \"Closed\", \"Filled\"]\n },\n \"business\": {\n \"type\": \"object\",\n \"properties\": {\n \"name\": {\n \"type\": \"string\",\n \"minLength\": 1\n },\n \"description\": {\n \"type\": \"string\"\n },\n \"tags\": {\n \"type\": \"array\",\n \"items\": {\n \"type\": \"string\"\n }\n },\n \"id\": {\n \"type\": \"string\",\n \"format\": \"uuid\",\n \"pattern\": \"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000)$\"\n },\n \"createdAt\": {\n \"type\": \"string\",\n \"format\": \"date-time\",\n \"pattern\": \"^(?:(?:\\\\d\\\\d[2468][048]|\\\\d\\\\d[13579][26]|\\\\d\\\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\\\d|30)|(?:02)-(?:0[1-9]|1\\\\d|2[0-8])))T(?:(?:[01]\\\\d|2[0-3]):[0-5]\\\\d(?::[0-5]\\\\d(?:\\\\.\\\\d+)?)?(?:Z))$\"\n },\n \"updatedAt\": {\n \"type\": \"string\",\n \"format\": \"date-time\",\n \"pattern\": \"^(?:(?:\\\\d\\\\d[2468][048]|\\\\d\\\\d[13579][26]|\\\\d\\\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\\\d|30)|(?:02)-(?:0[1-9]|1\\\\d|2[0-8])))T(?:(?:[01]\\\\d|2[0-3]):[0-5]\\\\d(?::[0-5]\\\\d(?:\\\\.\\\\d+)?)?(?:Z))$\"\n },\n \"rating\": {\n \"type\": \"number\",\n \"minimum\": 0,\n \"maximum\": 5\n },\n \"status\": {\n \"type\": \"string\",\n \"enum\": [\n \"Active\",\n \"Inactive\",\n \"PendingVerification\",\n \"Suspended\"\n ]\n },\n \"ratingCount\": {\n \"type\": \"integer\",\n \"minimum\": 0,\n \"maximum\": 9007199254740991\n },\n \"address\": {\n \"type\": \"object\",\n \"properties\": {\n \"id\": {\n \"type\": \"string\",\n \"format\": \"uuid\",\n \"pattern\": \"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000)$\"\n },\n \"createdAt\": {\n \"type\": \"string\",\n \"format\": \"date-time\",\n \"pattern\": \"^(?:(?:\\\\d\\\\d[2468][048]|\\\\d\\\\d[13579][26]|\\\\d\\\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\\\d|30)|(?:02)-(?:0[1-9]|1\\\\d|2[0-8])))T(?:(?:[01]\\\\d|2[0-3]):[0-5]\\\\d(?::[0-5]\\\\d(?:\\\\.\\\\d+)?)?(?:Z))$\"\n },\n \"updatedAt\": {\n \"type\": \"string\",\n \"format\": \"date-time\",\n \"pattern\": \"^(?:(?:\\\\d\\\\d[2468][048]|\\\\d\\\\d[13579][26]|\\\\d\\\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\\\d|30)|(?:02)-(?:0[1-9]|1\\\\d|2[0-8])))T(?:(?:[01]\\\\d|2[0-3]):[0-5]\\\\d(?::[0-5]\\\\d(?:\\\\.\\\\d+)?)?(?:Z))$\"\n },\n \"placeId\": {\n \"anyOf\": [\n {\n \"type\": \"string\"\n },\n {\n \"type\": \"null\"\n }\n ]\n },\n \"text\": {\n \"type\": \"string\",\n \"minLength\": 1\n },\n \"city\": {\n \"type\": \"string\",\n \"minLength\": 1\n },\n \"state\": {\n \"type\": \"string\",\n \"minLength\": 1\n },\n \"postalCode\": {\n \"type\": \"string\",\n \"minLength\": 1\n },\n \"country\": {\n \"type\": \"string\",\n \"minLength\": 1\n },\n \"lat\": {\n \"type\": \"number\"\n },\n \"lng\": {\n \"type\": \"number\"\n }\n },\n \"required\": [\n \"id\",\n \"createdAt\",\n \"updatedAt\",\n \"text\",\n \"city\",\n \"state\",\n \"postalCode\",\n \"country\",\n \"lat\",\n \"lng\"\n ],\n \"additionalProperties\": false\n },\n \"image\": {\n \"type\": \"object\",\n \"properties\": {\n \"id\": {\n \"type\": \"string\",\n \"format\": \"uuid\",\n \"pattern\": \"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000)$\"\n },\n \"createdAt\": {\n \"type\": \"string\",\n \"format\": \"date-time\",\n \"pattern\": \"^(?:(?:\\\\d\\\\d[2468][048]|\\\\d\\\\d[13579][26]|\\\\d\\\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\\\d|30)|(?:02)-(?:0[1-9]|1\\\\d|2[0-8])))T(?:(?:[01]\\\\d|2[0-3]):[0-5]\\\\d(?::[0-5]\\\\d(?:\\\\.\\\\d+)?)?(?:Z))$\"\n },\n \"updatedAt\": {\n \"type\": \"string\",\n \"format\": \"date-time\",\n \"pattern\": \"^(?:(?:\\\\d\\\\d[2468][048]|\\\\d\\\\d[13579][26]|\\\\d\\\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\\\d|30)|(?:02)-(?:0[1-9]|1\\\\d|2[0-8])))T(?:(?:[01]\\\\d|2[0-3]):[0-5]\\\\d(?::[0-5]\\\\d(?:\\\\.\\\\d+)?)?(?:Z))$\"\n },\n \"mimeType\": {\n \"type\": \"string\",\n \"enum\": [\n \"image/jpeg\",\n \"image/png\",\n \"application/pdf\",\n \"application/vnd.openxmlformats-officedocument.wordprocessingml.document\"\n ]\n },\n \"name\": {\n \"type\": \"string\"\n },\n \"url\": {\n \"type\": \"string\",\n \"format\": \"uri\"\n },\n \"contentLength\": {\n \"type\": \"number\"\n },\n \"status\": {\n \"type\": \"string\",\n \"enum\": [\n \"Pending\",\n \"Uploaded\",\n \"Failed\",\n \"Deleted\"\n ]\n }\n },\n \"required\": [\n \"id\",\n \"createdAt\",\n \"updatedAt\",\n \"mimeType\",\n \"name\",\n \"url\",\n \"contentLength\",\n \"status\"\n ],\n \"additionalProperties\": false\n },\n \"licenses\": {\n \"type\": \"array\",\n \"items\": {\n \"type\": \"object\",\n \"properties\": {\n \"id\": {\n \"type\": \"string\",\n \"format\": \"uuid\",\n \"pattern\": \"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000)$\"\n },\n \"createdAt\": {\n \"type\": \"string\",\n \"format\": \"date-time\",\n \"pattern\": \"^(?:(?:\\\\d\\\\d[2468][048]|\\\\d\\\\d[13579][26]|\\\\d\\\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\\\d|30)|(?:02)-(?:0[1-9]|1\\\\d|2[0-8])))T(?:(?:[01]\\\\d|2[0-3]):[0-5]\\\\d(?::[0-5]\\\\d(?:\\\\.\\\\d+)?)?(?:Z))$\"\n },\n \"updatedAt\": {\n \"type\": \"string\",\n \"format\": \"date-time\",\n \"pattern\": \"^(?:(?:\\\\d\\\\d[2468][048]|\\\\d\\\\d[13579][26]|\\\\d\\\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\\\d|30)|(?:02)-(?:0[1-9]|1\\\\d|2[0-8])))T(?:(?:[01]\\\\d|2[0-3]):[0-5]\\\\d(?::[0-5]\\\\d(?:\\\\.\\\\d+)?)?(?:Z))$\"\n },\n \"mimeType\": {\n \"type\": \"string\",\n \"enum\": [\n \"image/jpeg\",\n \"image/png\",\n \"application/pdf\",\n \"application/vnd.openxmlformats-officedocument.wordprocessingml.document\"\n ]\n },\n \"name\": {\n \"type\": \"string\"\n },\n \"url\": {\n \"type\": \"string\",\n \"format\": \"uri\"\n },\n \"contentLength\": {\n \"type\": \"number\"\n },\n \"status\": {\n \"type\": \"string\",\n \"enum\": [\n \"Pending\",\n \"Uploaded\",\n \"Failed\",\n \"Deleted\"\n ]\n }\n },\n \"required\": [\n \"id\",\n \"createdAt\",\n \"updatedAt\",\n \"mimeType\",\n \"name\",\n \"url\",\n \"contentLength\",\n \"status\"\n ],\n \"additionalProperties\": false\n }\n }\n },\n \"required\": [\n \"name\",\n \"description\",\n \"tags\",\n \"id\",\n \"createdAt\",\n \"updatedAt\",\n \"rating\",\n \"status\",\n \"ratingCount\",\n \"address\",\n \"image\",\n \"licenses\"\n ],\n \"additionalProperties\": false\n },\n \"appliedAt\": {\n \"anyOf\": [\n {\n \"type\": \"string\",\n \"format\": \"date-time\",\n \"pattern\": \"^(?:(?:\\\\d\\\\d[2468][048]|\\\\d\\\\d[13579][26]|\\\\d\\\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\\\d|30)|(?:02)-(?:0[1-9]|1\\\\d|2[0-8])))T(?:(?:[01]\\\\d|2[0-3]):[0-5]\\\\d(?::[0-5]\\\\d(?:\\\\.\\\\d+)?)?(?:Z))$\"\n },\n {\n \"type\": \"null\"\n }\n ]\n },\n \"closedAt\": {\n \"anyOf\": [\n {\n \"type\": \"string\",\n \"format\": \"date-time\",\n \"pattern\": \"^(?:(?:\\\\d\\\\d[2468][048]|\\\\d\\\\d[13579][26]|\\\\d\\\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\\\d|30)|(?:02)-(?:0[1-9]|1\\\\d|2[0-8])))T(?:(?:[01]\\\\d|2[0-3]):[0-5]\\\\d(?::[0-5]\\\\d(?:\\\\.\\\\d+)?)?(?:Z))$\"\n },\n {\n \"type\": \"null\"\n }\n ]\n },\n \"closeReason\": {\n \"anyOf\": [\n {\n \"type\": \"string\"\n },\n {\n \"type\": \"null\"\n }\n ]\n },\n \"distanceKm\": {\n \"type\": \"number\"\n },\n \"roleMatch\": {\n \"type\": \"boolean\"\n },\n \"hourlyRateMatch\": {\n \"type\": \"boolean\"\n },\n \"hasApplied\": {\n \"default\": false,\n \"type\": \"boolean\"\n }\n },\n \"required\": [\n \"role\",\n \"type\",\n \"overview\",\n \"qualifications\",\n \"hourlyRate\",\n \"dateNeeded\",\n \"shiftHours\",\n \"id\",\n \"createdAt\",\n \"updatedAt\",\n \"status\",\n \"business\",\n \"distanceKm\",\n \"roleMatch\",\n \"hourlyRateMatch\",\n \"hasApplied\"\n ],\n \"additionalProperties\": false\n }\n },\n \"pagination\": {\n \"type\": \"object\",\n \"properties\": {\n \"total\": {\n \"type\": \"number\"\n },\n \"cursor\": {\n \"type\": \"string\"\n },\n \"hasMore\": {\n \"type\": \"boolean\"\n }\n },\n \"required\": [\"total\", \"hasMore\"],\n \"additionalProperties\": false\n }\n },\n \"required\": [\"items\", \"pagination\"],\n \"additionalProperties\": false\n }\n }\n }\n }\n },\n \"parameters\": [\n {\n \"name\": \"filter\",\n \"in\": \"query\",\n \"required\": false,\n \"schema\": {\n \"type\": \"object\",\n \"properties\": {\n \"radius\": {\n \"type\": \"integer\",\n \"minimum\": 0,\n \"maximum\": 9007199254740991\n },\n \"types\": {\n \"type\": \"array\",\n \"items\": {\n \"type\": \"string\",\n \"enum\": [\n \"Server\",\n \"Waiter\",\n \"Host\",\n \"Bartender\",\n \"KitchenPorter\",\n \"Steward\",\n \"BusPerson\",\n \"Dishwasher\"\n ]\n }\n },\n \"hourlyRate\": {\n \"type\": \"object\",\n \"properties\": {\n \"max\": {\n \"type\": \"number\"\n },\n \"min\": {\n \"type\": \"number\"\n }\n },\n \"additionalProperties\": false\n },\n \"dateNeeded\": {\n \"type\": \"object\",\n \"properties\": {\n \"from\": {\n \"type\": \"string\"\n },\n \"to\": {\n \"type\": \"string\"\n }\n },\n \"additionalProperties\": false\n },\n \"shiftHours\": {\n \"type\": \"object\",\n \"properties\": {\n \"from\": {\n \"type\": \"string\"\n },\n \"to\": {\n \"type\": \"string\"\n }\n },\n \"additionalProperties\": false\n },\n \"box\": {\n \"type\": \"object\",\n \"properties\": {\n \"topLeft\": {\n \"type\": \"object\",\n \"properties\": {\n \"lat\": {\n \"type\": \"number\"\n },\n \"lng\": {\n \"type\": \"number\"\n }\n },\n \"required\": [\"lat\", \"lng\"],\n \"additionalProperties\": false\n },\n \"bottomRight\": {\n \"type\": \"object\",\n \"properties\": {\n \"lat\": {\n \"type\": \"number\"\n },\n \"lng\": {\n \"type\": \"number\"\n }\n },\n \"required\": [\"lat\", \"lng\"],\n \"additionalProperties\": false\n }\n },\n \"required\": [\"topLeft\", \"bottomRight\"],\n \"additionalProperties\": false\n },\n \"name\": {\n \"type\": \"string\",\n \"minLength\": 1\n },\n \"city\": {\n \"type\": \"string\",\n \"minLength\": 1\n }\n },\n \"additionalProperties\": false\n }\n },\n {\n \"name\": \"pagination\",\n \"in\": \"query\",\n \"required\": false,\n \"schema\": {\n \"type\": \"object\",\n \"properties\": {\n \"cursor\": {\n \"type\": \"string\"\n },\n \"limit\": {\n \"default\": 20,\n \"type\": \"integer\",\n \"exclusiveMinimum\": 0,\n \"maximum\": 100\n }\n },\n \"required\": [\"limit\"],\n \"additionalProperties\": false\n }\n }\n ]\n }\n }\n }\n}\n"],"mappings":";cACa;WACH;CACN,SAAS;CACT,WAAW;CACX,eAAe;AAChB;YACQ,EACP,iBAAiB,EACf,OAAO;CACL,eAAe;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AAQ,SACT;WACD,UAAU;YACR,QAAQ;YACR,QAAQ;aACN;aACA;aACA;aACA;YACD;WACF;UACF;UACD,YAAY;WACV;WACA;WACA;WACA;WACA;WACA;WACA;WACA;UACD;UACD,wBAAwB;SACzB;SACD,YAAY;UACV,QAAQ;UACR,SAAS;WACP,QAAQ;WACR,cAAc;YACZ,MAAM;aACJ,QAAQ;aACR,UAAU;aACV,WAAW;YACZ;YACD,aAAa;aACX,QAAQ;aACR,UAAU;aACV,WAAW;YACZ;YACD,aAAa;aACX,QAAQ;aACR,UAAU;aACV,WAAW;YACZ;YACD,YAAY;aACV,QAAQ;aACR,QAAQ;cACN;cACA;cACA;cACA;aACD;YACF;YACD,QAAQ,EACN,QAAQ,SACT;YACD,OAAO;aACL,QAAQ;aACR,UAAU;YACX;YACD,iBAAiB,EACf,QAAQ,SACT;YACD,UAAU;aACR,QAAQ;aACR,QAAQ;cACN;cACA;cACA;cACA;aACD;YACF;WACF;WACD,YAAY;YACV;YACA;YACA;YACA;YACA;YACA;YACA;YACA;WACD;WACD,wBAAwB;UACzB;SACF;QACF;QACD,YAAY;SACV;SACA;SACA;SACA;SACA;SACA;SACA;SACA;SACA;SACA;SACA;SACA;QACD;QACD,wBAAwB;OACzB;OACD,aAAa,EACX,SAAS,CACP;QACE,QAAQ;QACR,UAAU;QACV,WAAW;OACZ,GACD,EACE,QAAQ,OACT,CACF,EACF;OACD,YAAY,EACV,SAAS,CACP;QACE,QAAQ;QACR,UAAU;QACV,WAAW;OACZ,GACD,EACE,QAAQ,OACT,CACF,EACF;OACD,eAAe,EACb,SAAS,CACP,EACE,QAAQ,SACT,GACD,EACE,QAAQ,OACT,CACF,EACF;OACD,cAAc,EACZ,QAAQ,SACT;OACD,aAAa,EACX,QAAQ,UACT;OACD,mBAAmB,EACjB,QAAQ,UACT;OACD,cAAc;QACZ,WAAW;QACX,QAAQ;OACT;MACF;MACD,YAAY;OACV;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OAC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KACD,YAAY,CAAC,WAAW,aAAc;KACtC,wBAAwB;IACzB;IACD,QAAQ;KACN,QAAQ;KACR,aAAa;IACd;IACD,QAAQ;KACN,QAAQ;KACR,aAAa;IACd;GACF;GACD,wBAAwB;EACzB;CACF,GACD;EACE,QAAQ;EACR,MAAM;EACN,YAAY;EACZ,UAAU;GACR,QAAQ;GACR,cAAc;IACZ,UAAU,EACR,QAAQ,SACT;IACD,SAAS;KACP,WAAW;KACX,QAAQ;KACR,oBAAoB;KACpB,WAAW;IACZ;GACF;GACD,YAAY,CAAC,OAAQ;GACrB,wBAAwB;EACzB;CACF,CACF;AACF,EACF,EACF;sBAjlBH;;;;AAklBC"}
|
|
1
|
+
{"version":3,"file":"openapi.mjs","names":[],"sources":["../src/openapi.json"],"sourcesContent":["{\n\t\"openapi\": \"3.0.0\",\n\t\"info\": {\n\t\t\"title\": \"API Documentation\",\n\t\t\"version\": \"1.0.0\",\n\t\t\"description\": \"Auto-generated API documentation from endpoints\"\n\t},\n\t\"paths\": {\n\t\t\"/explore/jobs\": {\n\t\t\t\"get\": {\n\t\t\t\t\"operationId\": \"exploreJobs\",\n\t\t\t\t\"responses\": {\n\t\t\t\t\t\"200\": {\n\t\t\t\t\t\t\"description\": \"Successful response\",\n\t\t\t\t\t\t\"content\": {\n\t\t\t\t\t\t\t\"application/json\": {\n\t\t\t\t\t\t\t\t\"schema\": {\n\t\t\t\t\t\t\t\t\t\"$schema\": \"https://json-schema.org/draft/2020-12/schema\",\n\t\t\t\t\t\t\t\t\t\"type\": \"object\",\n\t\t\t\t\t\t\t\t\t\"properties\": {\n\t\t\t\t\t\t\t\t\t\t\"items\": {\n\t\t\t\t\t\t\t\t\t\t\t\"type\": \"array\",\n\t\t\t\t\t\t\t\t\t\t\t\"items\": {\n\t\t\t\t\t\t\t\t\t\t\t\t\"type\": \"object\",\n\t\t\t\t\t\t\t\t\t\t\t\t\"properties\": {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\"role\": {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\"type\": \"string\",\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\"minLength\": 1,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\"maxLength\": 255\n\t\t\t\t\t\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\t\t\t\t\t\t\"type\": {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\"type\": \"string\",\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\"enum\": [\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\"Server\",\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\"Waiter\",\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\"Host\",\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\"Bartender\",\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\"KitchenPorter\",\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\"Steward\",\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\"BusPerson\",\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\"Dishwasher\"\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t]\n\t\t\t\t\t\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\t\t\t\t\t\t\"overview\": {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\"type\": \"string\",\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\"minLength\": 1\n\t\t\t\t\t\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\t\t\t\t\t\t\"qualifications\": {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\"type\": \"string\",\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\"minLength\": 1\n\t\t\t\t\t\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\t\t\t\t\t\t\"hourlyRate\": {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\"type\": \"object\",\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\"properties\": {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\"max\": {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\"type\": \"number\"\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\"min\": {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\"type\": \"number\"\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\"required\": [\"max\", \"min\"],\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\"additionalProperties\": false\n\t\t\t\t\t\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\t\t\t\t\t\t\"dateNeeded\": {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\"type\": \"object\",\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\"properties\": {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\"from\": {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\"type\": \"string\"\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\"to\": {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\"type\": \"string\"\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\"required\": [\"from\", \"to\"],\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\"additionalProperties\": false\n\t\t\t\t\t\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\t\t\t\t\t\t\"shiftHours\": {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\"type\": \"object\",\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\"properties\": {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\"from\": {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\"type\": \"string\"\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\"to\": {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\"type\": \"string\"\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\"required\": [\"from\", \"to\"],\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\"additionalProperties\": false\n\t\t\t\t\t\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\t\t\t\t\t\t\"id\": {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\"type\": \"string\",\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\"format\": \"uuid\",\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\"pattern\": \"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000)$\"\n\t\t\t\t\t\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\t\t\t\t\t\t\"createdAt\": {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\"type\": \"string\",\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\"format\": \"date-time\",\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\"pattern\": \"^(?:(?:\\\\d\\\\d[2468][048]|\\\\d\\\\d[13579][26]|\\\\d\\\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\\\d|30)|(?:02)-(?:0[1-9]|1\\\\d|2[0-8])))T(?:(?:[01]\\\\d|2[0-3]):[0-5]\\\\d(?::[0-5]\\\\d(?:\\\\.\\\\d+)?)?(?:Z))$\"\n\t\t\t\t\t\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\t\t\t\t\t\t\"updatedAt\": {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\"type\": \"string\",\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\"format\": \"date-time\",\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\"pattern\": \"^(?:(?:\\\\d\\\\d[2468][048]|\\\\d\\\\d[13579][26]|\\\\d\\\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\\\d|30)|(?:02)-(?:0[1-9]|1\\\\d|2[0-8])))T(?:(?:[01]\\\\d|2[0-3]):[0-5]\\\\d(?::[0-5]\\\\d(?:\\\\.\\\\d+)?)?(?:Z))$\"\n\t\t\t\t\t\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\t\t\t\t\t\t\"status\": {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\"type\": \"string\",\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\"enum\": [\"Draft\", \"Active\", \"Closed\", \"Filled\"]\n\t\t\t\t\t\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\t\t\t\t\t\t\"business\": {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\"type\": \"object\",\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\"properties\": {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\"name\": {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\"type\": \"string\",\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\"minLength\": 1\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\"description\": {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\"type\": \"string\"\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\"tags\": {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\"type\": \"array\",\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\"items\": {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\"type\": \"string\"\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\"id\": {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\"type\": \"string\",\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\"format\": \"uuid\",\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\"pattern\": \"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000)$\"\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\"createdAt\": {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\"type\": \"string\",\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\"format\": \"date-time\",\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\"pattern\": \"^(?:(?:\\\\d\\\\d[2468][048]|\\\\d\\\\d[13579][26]|\\\\d\\\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\\\d|30)|(?:02)-(?:0[1-9]|1\\\\d|2[0-8])))T(?:(?:[01]\\\\d|2[0-3]):[0-5]\\\\d(?::[0-5]\\\\d(?:\\\\.\\\\d+)?)?(?:Z))$\"\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\"updatedAt\": {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\"type\": \"string\",\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\"format\": \"date-time\",\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\"pattern\": \"^(?:(?:\\\\d\\\\d[2468][048]|\\\\d\\\\d[13579][26]|\\\\d\\\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\\\d|30)|(?:02)-(?:0[1-9]|1\\\\d|2[0-8])))T(?:(?:[01]\\\\d|2[0-3]):[0-5]\\\\d(?::[0-5]\\\\d(?:\\\\.\\\\d+)?)?(?:Z))$\"\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\"rating\": {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\"type\": \"number\",\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\"minimum\": 0,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\"maximum\": 5\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\"status\": {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\"type\": \"string\",\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\"enum\": [\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\"Active\",\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\"Inactive\",\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\"PendingVerification\",\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\"Suspended\"\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t]\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\"ratingCount\": {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\"type\": \"integer\",\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\"minimum\": 0,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\"maximum\": 9007199254740991\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\"address\": {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\"type\": \"object\",\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\"properties\": {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\"id\": {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\"type\": \"string\",\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\"format\": \"uuid\",\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\"pattern\": \"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000)$\"\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\"createdAt\": {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\"type\": \"string\",\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\"format\": \"date-time\",\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\"pattern\": \"^(?:(?:\\\\d\\\\d[2468][048]|\\\\d\\\\d[13579][26]|\\\\d\\\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\\\d|30)|(?:02)-(?:0[1-9]|1\\\\d|2[0-8])))T(?:(?:[01]\\\\d|2[0-3]):[0-5]\\\\d(?::[0-5]\\\\d(?:\\\\.\\\\d+)?)?(?:Z))$\"\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\"updatedAt\": {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\"type\": \"string\",\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\"format\": \"date-time\",\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\"pattern\": \"^(?:(?:\\\\d\\\\d[2468][048]|\\\\d\\\\d[13579][26]|\\\\d\\\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\\\d|30)|(?:02)-(?:0[1-9]|1\\\\d|2[0-8])))T(?:(?:[01]\\\\d|2[0-3]):[0-5]\\\\d(?::[0-5]\\\\d(?:\\\\.\\\\d+)?)?(?:Z))$\"\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\"placeId\": {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\"anyOf\": [\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\"type\": \"string\"\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\"type\": \"null\"\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t]\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\"text\": {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\"type\": \"string\",\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\"minLength\": 1\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\"city\": {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\"type\": \"string\",\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\"minLength\": 1\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\"state\": {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\"type\": \"string\",\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\"minLength\": 1\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\"postalCode\": {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\"type\": \"string\",\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\"minLength\": 1\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\"country\": {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\"type\": \"string\",\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\"minLength\": 1\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\"lat\": {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\"type\": \"number\"\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\"lng\": {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\"type\": \"number\"\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\"required\": [\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\"id\",\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\"createdAt\",\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\"updatedAt\",\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\"text\",\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\"city\",\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\"state\",\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\"postalCode\",\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\"country\",\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\"lat\",\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\"lng\"\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t],\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\"additionalProperties\": false\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\"image\": {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\"type\": \"object\",\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\"properties\": {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\"id\": {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\"type\": \"string\",\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\"format\": \"uuid\",\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\"pattern\": \"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000)$\"\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\"createdAt\": {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\"type\": \"string\",\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\"format\": \"date-time\",\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\"pattern\": \"^(?:(?:\\\\d\\\\d[2468][048]|\\\\d\\\\d[13579][26]|\\\\d\\\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\\\d|30)|(?:02)-(?:0[1-9]|1\\\\d|2[0-8])))T(?:(?:[01]\\\\d|2[0-3]):[0-5]\\\\d(?::[0-5]\\\\d(?:\\\\.\\\\d+)?)?(?:Z))$\"\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\"updatedAt\": {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\"type\": \"string\",\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\"format\": \"date-time\",\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\"pattern\": \"^(?:(?:\\\\d\\\\d[2468][048]|\\\\d\\\\d[13579][26]|\\\\d\\\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\\\d|30)|(?:02)-(?:0[1-9]|1\\\\d|2[0-8])))T(?:(?:[01]\\\\d|2[0-3]):[0-5]\\\\d(?::[0-5]\\\\d(?:\\\\.\\\\d+)?)?(?:Z))$\"\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\"mimeType\": {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\"type\": \"string\",\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\"enum\": [\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\"image/jpeg\",\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\"image/png\",\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\"application/pdf\",\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\"application/vnd.openxmlformats-officedocument.wordprocessingml.document\"\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t]\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\"name\": {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\"type\": \"string\"\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\"url\": {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\"type\": \"string\",\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\"format\": \"uri\"\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\"contentLength\": {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\"type\": \"number\"\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\"status\": {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\"type\": \"string\",\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\"enum\": [\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\"Pending\",\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\"Uploaded\",\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\"Failed\",\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\"Deleted\"\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t]\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\"required\": [\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\"id\",\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\"createdAt\",\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\"updatedAt\",\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\"mimeType\",\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\"name\",\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\"url\",\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\"contentLength\",\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\"status\"\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t],\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\"additionalProperties\": false\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\"licenses\": {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\"type\": \"array\",\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\"items\": {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\"type\": \"object\",\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\"properties\": {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\"id\": {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\"type\": \"string\",\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\"format\": \"uuid\",\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\"pattern\": \"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000)$\"\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\"createdAt\": {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\"type\": \"string\",\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\"format\": \"date-time\",\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\"pattern\": \"^(?:(?:\\\\d\\\\d[2468][048]|\\\\d\\\\d[13579][26]|\\\\d\\\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\\\d|30)|(?:02)-(?:0[1-9]|1\\\\d|2[0-8])))T(?:(?:[01]\\\\d|2[0-3]):[0-5]\\\\d(?::[0-5]\\\\d(?:\\\\.\\\\d+)?)?(?:Z))$\"\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\"updatedAt\": {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\"type\": \"string\",\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\"format\": \"date-time\",\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\"pattern\": \"^(?:(?:\\\\d\\\\d[2468][048]|\\\\d\\\\d[13579][26]|\\\\d\\\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\\\d|30)|(?:02)-(?:0[1-9]|1\\\\d|2[0-8])))T(?:(?:[01]\\\\d|2[0-3]):[0-5]\\\\d(?::[0-5]\\\\d(?:\\\\.\\\\d+)?)?(?:Z))$\"\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\"mimeType\": {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\"type\": \"string\",\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\"enum\": [\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\"image/jpeg\",\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\"image/png\",\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\"application/pdf\",\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\"application/vnd.openxmlformats-officedocument.wordprocessingml.document\"\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t]\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\"name\": {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\"type\": \"string\"\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\"url\": {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\"type\": \"string\",\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\"format\": \"uri\"\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\"contentLength\": {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\"type\": \"number\"\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\"status\": {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\"type\": \"string\",\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\"enum\": [\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\"Pending\",\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\"Uploaded\",\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\"Failed\",\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\"Deleted\"\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t]\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\"required\": [\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\"id\",\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\"createdAt\",\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\"updatedAt\",\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\"mimeType\",\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\"name\",\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\"url\",\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\"contentLength\",\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\"status\"\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t],\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\"additionalProperties\": false\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\"required\": [\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\"name\",\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\"description\",\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\"tags\",\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\"id\",\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\"createdAt\",\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\"updatedAt\",\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\"rating\",\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\"status\",\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\"ratingCount\",\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\"address\",\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\"image\",\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\"licenses\"\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t],\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\"additionalProperties\": false\n\t\t\t\t\t\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\t\t\t\t\t\t\"appliedAt\": {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\"anyOf\": [\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\"type\": \"string\",\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\"format\": \"date-time\",\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\"pattern\": \"^(?:(?:\\\\d\\\\d[2468][048]|\\\\d\\\\d[13579][26]|\\\\d\\\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\\\d|30)|(?:02)-(?:0[1-9]|1\\\\d|2[0-8])))T(?:(?:[01]\\\\d|2[0-3]):[0-5]\\\\d(?::[0-5]\\\\d(?:\\\\.\\\\d+)?)?(?:Z))$\"\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\"type\": \"null\"\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t]\n\t\t\t\t\t\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\t\t\t\t\t\t\"closedAt\": {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\"anyOf\": [\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\"type\": \"string\",\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\"format\": \"date-time\",\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\"pattern\": \"^(?:(?:\\\\d\\\\d[2468][048]|\\\\d\\\\d[13579][26]|\\\\d\\\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\\\d|3[01])|(?:0[469]|11)-(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\t\t\t\t\t\t\t\t\"hasApplied\": {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\"default\": false,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\"type\": \"boolean\"\n\t\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\t\t\t\t\t\"required\": [\n\t\t\t\t\t\t\t\t\t\t\t\t\t\"role\",\n\t\t\t\t\t\t\t\t\t\t\t\t\t\"type\",\n\t\t\t\t\t\t\t\t\t\t\t\t\t\"overview\",\n\t\t\t\t\t\t\t\t\t\t\t\t\t\"qualifications\",\n\t\t\t\t\t\t\t\t\t\t\t\t\t\"hourlyRate\",\n\t\t\t\t\t\t\t\t\t\t\t\t\t\"dateNeeded\",\n\t\t\t\t\t\t\t\t\t\t\t\t\t\"shiftHours\",\n\t\t\t\t\t\t\t\t\t\t\t\t\t\"id\",\n\t\t\t\t\t\t\t\t\t\t\t\t\t\"createdAt\",\n\t\t\t\t\t\t\t\t\t\t\t\t\t\"updatedAt\",\n\t\t\t\t\t\t\t\t\t\t\t\t\t\"status\",\n\t\t\t\t\t\t\t\t\t\t\t\t\t\"business\",\n\t\t\t\t\t\t\t\t\t\t\t\t\t\"distanceKm\",\n\t\t\t\t\t\t\t\t\t\t\t\t\t\"roleMatch\",\n\t\t\t\t\t\t\t\t\t\t\t\t\t\"hourlyRateMatch\",\n\t\t\t\t\t\t\t\t\t\t\t\t\t\"hasApplied\"\n\t\t\t\t\t\t\t\t\t\t\t\t],\n\t\t\t\t\t\t\t\t\t\t\t\t\"additionalProperties\": false\n\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\t\t\t\"pagination\": {\n\t\t\t\t\t\t\t\t\t\t\t\"type\": \"object\",\n\t\t\t\t\t\t\t\t\t\t\t\"properties\": {\n\t\t\t\t\t\t\t\t\t\t\t\t\"total\": {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\"type\": \"number\"\n\t\t\t\t\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\t\t\t\t\t\"cursor\": {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\"type\": \"string\"\n\t\t\t\t\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\t\t\t\t\t\"hasMore\": {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\"type\": \"boolean\"\n\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\t\t\t\t\"required\": [\"total\", \"hasMore\"],\n\t\t\t\t\t\t\t\t\t\t\t\"additionalProperties\": false\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\t\t\"required\": [\"items\", \"pagination\"],\n\t\t\t\t\t\t\t\t\t\"additionalProperties\": false\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t},\n\t\t\t\t\"parameters\": [\n\t\t\t\t\t{\n\t\t\t\t\t\t\"name\": \"filter\",\n\t\t\t\t\t\t\"in\": \"query\",\n\t\t\t\t\t\t\"required\": false,\n\t\t\t\t\t\t\"schema\": {\n\t\t\t\t\t\t\t\"type\": \"object\",\n\t\t\t\t\t\t\t\"properties\": {\n\t\t\t\t\t\t\t\t\"radius\": {\n\t\t\t\t\t\t\t\t\t\"type\": \"integer\",\n\t\t\t\t\t\t\t\t\t\"minimum\": 0,\n\t\t\t\t\t\t\t\t\t\"maximum\": 9007199254740991\n\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\t\"types\": {\n\t\t\t\t\t\t\t\t\t\"type\": \"array\",\n\t\t\t\t\t\t\t\t\t\"items\": {\n\t\t\t\t\t\t\t\t\t\t\"type\": \"string\",\n\t\t\t\t\t\t\t\t\t\t\"enum\": [\n\t\t\t\t\t\t\t\t\t\t\t\"Server\",\n\t\t\t\t\t\t\t\t\t\t\t\"Waiter\",\n\t\t\t\t\t\t\t\t\t\t\t\"Host\",\n\t\t\t\t\t\t\t\t\t\t\t\"Bartender\",\n\t\t\t\t\t\t\t\t\t\t\t\"KitchenPorter\",\n\t\t\t\t\t\t\t\t\t\t\t\"Steward\",\n\t\t\t\t\t\t\t\t\t\t\t\"BusPerson\",\n\t\t\t\t\t\t\t\t\t\t\t\"Dishwasher\"\n\t\t\t\t\t\t\t\t\t\t]\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\t\"hourlyRate\": {\n\t\t\t\t\t\t\t\t\t\"type\": \"object\",\n\t\t\t\t\t\t\t\t\t\"properties\": {\n\t\t\t\t\t\t\t\t\t\t\"max\": {\n\t\t\t\t\t\t\t\t\t\t\t\"type\": \"number\"\n\t\t\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\t\t\t\"min\": {\n\t\t\t\t\t\t\t\t\t\t\t\"type\": \"number\"\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\t\t\"additionalProperties\": false\n\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\t\"dateNeeded\": {\n\t\t\t\t\t\t\t\t\t\"type\": \"object\",\n\t\t\t\t\t\t\t\t\t\"properties\": {\n\t\t\t\t\t\t\t\t\t\t\"from\": {\n\t\t\t\t\t\t\t\t\t\t\t\"type\": \"string\"\n\t\t\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\t\t\t\"to\": {\n\t\t\t\t\t\t\t\t\t\t\t\"type\": \"string\"\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\t\t\"additionalProperties\": false\n\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\t\"shiftHours\": {\n\t\t\t\t\t\t\t\t\t\"type\": \"object\",\n\t\t\t\t\t\t\t\t\t\"properties\": {\n\t\t\t\t\t\t\t\t\t\t\"from\": {\n\t\t\t\t\t\t\t\t\t\t\t\"type\": \"string\"\n\t\t\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\t\t\t\"to\": {\n\t\t\t\t\t\t\t\t\t\t\t\"type\": \"string\"\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\t\t\"additionalProperties\": false\n\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\t\"box\": {\n\t\t\t\t\t\t\t\t\t\"type\": \"object\",\n\t\t\t\t\t\t\t\t\t\"properties\": {\n\t\t\t\t\t\t\t\t\t\t\"topLeft\": {\n\t\t\t\t\t\t\t\t\t\t\t\"type\": \"object\",\n\t\t\t\t\t\t\t\t\t\t\t\"properties\": {\n\t\t\t\t\t\t\t\t\t\t\t\t\"lat\": {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\"type\": \"number\"\n\t\t\t\t\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\t\t\t\t\t\"lng\": {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\"type\": \"number\"\n\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\t\t\t\t\"required\": [\"lat\", \"lng\"],\n\t\t\t\t\t\t\t\t\t\t\t\"additionalProperties\": false\n\t\t\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\t\t\t\"bottomRight\": {\n\t\t\t\t\t\t\t\t\t\t\t\"type\": \"object\",\n\t\t\t\t\t\t\t\t\t\t\t\"properties\": {\n\t\t\t\t\t\t\t\t\t\t\t\t\"lat\": {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\"type\": \"number\"\n\t\t\t\t\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\t\t\t\t\t\"lng\": {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\"type\": \"number\"\n\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\t\t\t\t\"required\": [\"lat\", \"lng\"],\n\t\t\t\t\t\t\t\t\t\t\t\"additionalProperties\": false\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\t\t\"required\": [\"topLeft\", \"bottomRight\"],\n\t\t\t\t\t\t\t\t\t\"additionalProperties\": false\n\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\t\"name\": {\n\t\t\t\t\t\t\t\t\t\"type\": \"string\",\n\t\t\t\t\t\t\t\t\t\"minLength\": 1\n\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\t\"city\": {\n\t\t\t\t\t\t\t\t\t\"type\": \"string\",\n\t\t\t\t\t\t\t\t\t\"minLength\": 1\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\"additionalProperties\": false\n\t\t\t\t\t\t}\n\t\t\t\t\t},\n\t\t\t\t\t{\n\t\t\t\t\t\t\"name\": \"pagination\",\n\t\t\t\t\t\t\"in\": \"query\",\n\t\t\t\t\t\t\"required\": false,\n\t\t\t\t\t\t\"schema\": {\n\t\t\t\t\t\t\t\"type\": \"object\",\n\t\t\t\t\t\t\t\"properties\": {\n\t\t\t\t\t\t\t\t\"cursor\": {\n\t\t\t\t\t\t\t\t\t\"type\": \"string\"\n\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\t\"limit\": {\n\t\t\t\t\t\t\t\t\t\"default\": 20,\n\t\t\t\t\t\t\t\t\t\"type\": \"integer\",\n\t\t\t\t\t\t\t\t\t\"exclusiveMinimum\": 0,\n\t\t\t\t\t\t\t\t\t\"maximum\": 100\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\"required\": [\"limit\"],\n\t\t\t\t\t\t\t\"additionalProperties\": false\n\t\t\t\t\t\t}\n\t\t\t\t\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Q;aACP;aACA;aACA;aACA;YACA;WACD;WACD,QAAQ,EACP,QAAQ,SACR;WACD,OAAO;YACN,QAAQ;YACR,UAAU;WACV;WACD,iBAAiB,EAChB,QAAQ,SACR;WACD,UAAU;YACT,QAAQ;YACR,QAAQ;aACP;aACA;aACA;aACA;YACA;WACD;UACD;UACD,YAAY;WACX;WACA;WACA;WACA;WACA;WACA;WACA;WACA;UACA;UACD,wBAAwB;SACxB;SACD,YAAY;UACX,QAAQ;UACR,SAAS;WACR,QAAQ;WACR,cAAc;YACb,MAAM;aACL,QAAQ;aACR,UAAU;aACV,WAAW;YACX;YACD,aAAa;aACZ,QAAQ;aACR,UAAU;aACV,WAAW;YACX;YACD,aAAa;aACZ,QAAQ;aACR,UAAU;aACV,WAAW;YACX;YACD,YAAY;aACX,QAAQ;aACR,QAAQ;cACP;cACA;cACA;cACA;aACA;YACD;YACD,QAAQ,EACP,QAAQ,SACR;YACD,OAAO;aACN,QAAQ;aACR,UAAU;YACV;YACD,iBAAiB,EAChB,QAAQ,SACR;YACD,UAAU;aACT,QAAQ;aACR,QAAQ;cACP;cACA;cACA;cACA;aACA;YACD;WACD;WACD,YAAY;YACX;YACA;YACA;YACA;YACA;YACA;YACA;YACA;WACA;WACD,wBAAwB;UACxB;SACD;QACD;QACD,YAAY;SACX;SACA;SACA;SACA;SACA;SACA;SACA;SACA;SACA;SACA;SACA;SACA;QACA;QACD,wBAAwB;OACxB;OACD,aAAa,EACZ,SAAS,CACR;QACC,QAAQ;QACR,UAAU;QACV,WAAW;OACX,GACD,EACC,QAAQ,OACR,CACD,EACD;OACD,YAAY,EACX,SAAS,CACR;QACC,QAAQ;QACR,UAAU;QACV,WAAW;OACX,GACD,EACC,QAAQ,OACR,CACD,EACD;OACD,eAAe,EACd,SAAS,CACR,EACC,QAAQ,SACR,GACD,EACC,QAAQ,OACR,CACD,EACD;OACD,cAAc,EACb,QAAQ,SACR;OACD,aAAa,EACZ,QAAQ,UACR;OACD,mBAAmB,EAClB,QAAQ,UACR;OACD,cAAc;QACb,WAAW;QACX,QAAQ;OACR;MACD;MACD,YAAY;OACX;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;OACA;MACA;MACD,wBAAwB;KACxB;IACD;IACD,cAAc;KACb,QAAQ;KACR,cAAc;MACb,SAAS,EACR,QAAQ,SACR;MACD,UAAU,EACT,QAAQ,SACR;MACD,WAAW,EACV,QAAQ,UACR;KACD;KACD,YAAY,CAAC,SAAS,SAAU;KAChC,wBAAwB;IACxB;GACD;GACD,YAAY,CAAC,SAAS,YAAa;GACnC,wBAAwB;EACxB,EACD,EACD;CACD,EACD;CACD,cAAc,CACb;EACC,QAAQ;EACR,MAAM;EACN,YAAY;EACZ,UAAU;GACT,QAAQ;GACR,cAAc;IACb,UAAU;KACT,QAAQ;KACR,WAAW;KACX,WAAW;IACX;IACD,SAAS;KACR,QAAQ;KACR,SAAS;MACR,QAAQ;MACR,QAAQ;OACP;OACA;OACA;OACA;OACA;OACA;OACA;OACA;MACA;KACD;IACD;IACD,cAAc;KACb,QAAQ;KACR,cAAc;MACb,OAAO,EACN,QAAQ,SACR;MACD,OAAO,EACN,QAAQ,SACR;KACD;KACD,wBAAwB;IACxB;IACD,cAAc;KACb,QAAQ;KACR,cAAc;MACb,QAAQ,EACP,QAAQ,SACR;MACD,MAAM,EACL,QAAQ,SACR;KACD;KACD,wBAAwB;IACxB;IACD,cAAc;KACb,QAAQ;KACR,cAAc;MACb,QAAQ,EACP,QAAQ,SACR;MACD,MAAM,EACL,QAAQ,SACR;KACD;KACD,wBAAwB;IACxB;IACD,OAAO;KACN,QAAQ;KACR,cAAc;MACb,WAAW;OACV,QAAQ;OACR,cAAc;QACb,OAAO,EACN,QAAQ,SACR;QACD,OAAO,EACN,QAAQ,SACR;OACD;OACD,YAAY,CAAC,OAAO,KAAM;OAC1B,wBAAwB;MACxB;MACD,eAAe;OACd,QAAQ;OACR,cAAc;QACb,OAAO,EACN,QAAQ,SACR;QACD,OAAO,EACN,QAAQ,SACR;OACD;OACD,YAAY,CAAC,OAAO,KAAM;OAC1B,wBAAwB;MACxB;KACD;KACD,YAAY,CAAC,WAAW,aAAc;KACtC,wBAAwB;IACxB;IACD,QAAQ;KACP,QAAQ;KACR,aAAa;IACb;IACD,QAAQ;KACP,QAAQ;KACR,aAAa;IACb;GACD;GACD,wBAAwB;EACxB;CACD,GACD;EACC,QAAQ;EACR,MAAM;EACN,YAAY;EACZ,UAAU;GACT,QAAQ;GACR,cAAc;IACb,UAAU,EACT,QAAQ,SACR;IACD,SAAS;KACR,WAAW;KACX,QAAQ;KACR,oBAAoB;KACpB,WAAW;IACX;GACD;GACD,YAAY,CAAC,OAAQ;GACrB,wBAAwB;EACxB;CACD,CACD;AACD,EACD,EACD;sBAjlBF;;;;AAklBC"}
|
package/dist/react-query.cjs
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
const require_chunk = require('./chunk-CUT6urMc.cjs');
|
|
2
|
-
const require_fetcher = require('./fetcher-
|
|
2
|
+
const require_fetcher = require('./fetcher-CgLEaIAC.cjs');
|
|
3
3
|
const __tanstack_react_query = require_chunk.__toESM(require("@tanstack/react-query"));
|
|
4
4
|
const react = require_chunk.__toESM(require("react"));
|
|
5
5
|
|
package/dist/react-query.cjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"react-query.cjs","names":["options: TypedQueryClientOptions","endpoint: T","config?: FilteredRequestConfig<Paths, T>","options?: Omit<\n UseQueryOptions<ExtractEndpointResponse<Paths, T>, Response>,\n 'queryKey' | 'queryFn'\n >","options?: Omit<\n UseMutationOptions<\n ExtractEndpointResponse<Paths, T>,\n Response,\n FilteredRequestConfig<Paths, T>\n >,\n 'mutationFn'\n >","config: FilteredRequestConfig<Paths, T>","options: Omit<\n UseInfiniteQueryOptions<\n TPageData,\n Response,\n { pages: TPageData[]; pageParams: TPageParam[] },\n unknown[],\n TPageParam\n >,\n 'queryKey' | 'queryFn' | 'getNextPageParam' | 'initialPageParam'\n > & {\n getNextPageParam: (\n lastPage: TPageData,\n allPages: TPageData[],\n lastPageParam: TPageParam,\n allPageParams: TPageParam[],\n ) => TPageParam | undefined;\n initialPageParam: TPageParam;\n }","key: unknown[]","queryClient: QueryClient","options?: TypedQueryClientOptions","client: TypedQueryClient<Paths>","options?: Omit<\n UseQueryOptions<ExtractEndpointResponse<Paths, T>, Response>,\n 'queryKey' | 'queryFn'\n >","options?: Omit<\n UseMutationOptions<\n ExtractEndpointResponse<Paths, T>,\n Response,\n FilteredRequestConfig<Paths, T>\n >,\n 'mutationFn'\n >","options: Omit<\n UseInfiniteQueryOptions<\n TPageData,\n Response,\n { pages: TPageData[]; pageParams: TPageParam[] },\n unknown[],\n TPageParam\n >,\n 'queryKey' | 'queryFn' | 'getNextPageParam' | 'initialPageParam'\n > & {\n getNextPageParam: (\n lastPage: TPageData,\n allPages: TPageData[],\n lastPageParam: TPageParam,\n allPageParams: TPageParam[],\n ) => TPageParam | undefined;\n initialPageParam: TPageParam;\n }"],"sources":["../src/react-query.ts"],"sourcesContent":["import type {\n QueryClient,\n QueryFunctionContext,\n UseInfiniteQueryOptions,\n UseMutationOptions,\n UseQueryOptions,\n} from '@tanstack/react-query';\nimport {\n useInfiniteQuery,\n useMutation,\n useQuery,\n useQueryClient,\n} from '@tanstack/react-query';\nimport { useMemo } from 'react';\nimport { createTypedFetcher } from './fetcher';\nimport type {\n ExtractEndpointResponse,\n FetcherOptions,\n FilteredRequestConfig,\n MutationEndpoint,\n QueryEndpoint,\n TypedEndpoint,\n} from './types';\n\nexport interface TypedQueryClientOptions extends FetcherOptions {\n queryClient?: QueryClient;\n}\n\nexport class TypedQueryClient<Paths> {\n private fetcher: ReturnType<typeof createTypedFetcher<Paths>>;\n private queryClient?: QueryClient;\n\n constructor(options: TypedQueryClientOptions = {}) {\n this.fetcher = createTypedFetcher<Paths>(options);\n this.queryClient = options.queryClient;\n }\n\n useQuery<T extends QueryEndpoint<Paths>>(\n endpoint: T,\n config?: FilteredRequestConfig<Paths, T>,\n options?: Omit<\n UseQueryOptions<ExtractEndpointResponse<Paths, T>, Response>,\n 'queryKey' | 'queryFn'\n >,\n ) {\n const queryKey = this.buildQueryKey(endpoint, config);\n\n // Memoize the combined options to prevent unnecessary re-renders\n const memoizedOptions = useMemo(\n () => ({\n queryKey,\n queryFn: () => this.fetcher(endpoint, config),\n ...options,\n }),\n // Dependencies: queryKey, endpoint, config, and options\n // Note: We stringify config and options to ensure stable references\n // eslint-disable-next-line react-hooks/exhaustive-deps\n [\n queryKey.join(','),\n endpoint,\n JSON.stringify(config),\n JSON.stringify(options),\n ],\n );\n\n return useQuery<ExtractEndpointResponse<Paths, T>, Response>(\n memoizedOptions,\n );\n }\n\n useMutation<T extends MutationEndpoint<Paths>>(\n endpoint: T,\n options?: Omit<\n UseMutationOptions<\n ExtractEndpointResponse<Paths, T>,\n Response,\n FilteredRequestConfig<Paths, T>\n >,\n 'mutationFn'\n >,\n ) {\n // Memoize the combined options to prevent unnecessary re-renders\n const memoizedOptions = useMemo(\n () => ({\n mutationFn: (config: FilteredRequestConfig<Paths, T>) =>\n this.fetcher(endpoint, config),\n ...options,\n }),\n // Dependencies: endpoint and options\n // Note: We stringify options to ensure stable reference\n // eslint-disable-next-line react-hooks/exhaustive-deps\n [endpoint, JSON.stringify(options)],\n );\n\n return useMutation<\n ExtractEndpointResponse<Paths, T>,\n Response,\n FilteredRequestConfig<Paths, T>\n >(memoizedOptions);\n }\n\n useInfiniteQuery<\n T extends QueryEndpoint<Paths>,\n TPageData = ExtractEndpointResponse<Paths, T>,\n TPageParam = unknown,\n >(\n endpoint: T,\n options: Omit<\n UseInfiniteQueryOptions<\n TPageData,\n Response,\n { pages: TPageData[]; pageParams: TPageParam[] },\n unknown[],\n TPageParam\n >,\n 'queryKey' | 'queryFn' | 'getNextPageParam' | 'initialPageParam'\n > & {\n getNextPageParam: (\n lastPage: TPageData,\n allPages: TPageData[],\n lastPageParam: TPageParam,\n allPageParams: TPageParam[],\n ) => TPageParam | undefined;\n initialPageParam: TPageParam;\n },\n config?: FilteredRequestConfig<Paths, T>,\n ) {\n const queryKey = this.buildQueryKey(endpoint, config);\n\n // Memoize the combined options to prevent unnecessary re-renders\n const memoizedOptions = useMemo(\n () => ({\n queryKey,\n queryFn: ({\n pageParam,\n }: QueryFunctionContext<unknown[], TPageParam>) => {\n let mergedConfig = config;\n if (pageParam !== undefined && config) {\n // If pageParam is an object, spread it into query\n const pageQuery =\n typeof pageParam === 'object' ? pageParam : { page: pageParam };\n mergedConfig = {\n ...config,\n query: { ...(config as any).query, ...pageQuery },\n } as any;\n } else if (pageParam !== undefined && !config) {\n // If pageParam is an object, use it directly, otherwise wrap in page property\n const pageQuery =\n typeof pageParam === 'object' ? pageParam : { page: pageParam };\n mergedConfig = { query: pageQuery } as any;\n }\n return this.fetcher(endpoint, mergedConfig) as Promise<TPageData>;\n },\n ...options,\n }),\n // Dependencies: queryKey, endpoint, config, and options\n // Note: We stringify config and options to ensure stable references\n // eslint-disable-next-line react-hooks/exhaustive-deps\n [\n queryKey.join(','),\n endpoint,\n JSON.stringify(config),\n JSON.stringify(options),\n ],\n );\n\n return useInfiniteQuery<\n TPageData,\n Response,\n { pages: TPageData[]; pageParams: TPageParam[] },\n unknown[],\n TPageParam\n >(memoizedOptions);\n }\n\n buildQueryKey<T extends TypedEndpoint<Paths>>(\n endpoint: T,\n config?: FilteredRequestConfig<Paths, T>,\n ): unknown[] {\n const key: unknown[] = [endpoint];\n\n if (config && 'params' in config && config.params) {\n key.push({ params: config.params });\n }\n\n if (config && 'query' in config && config.query) {\n key.push({ query: config.query });\n }\n\n return key;\n }\n\n /**\n * Invalidate queries for a specific endpoint with optional config\n * @param endpoint - The endpoint to invalidate (e.g., 'GET /users')\n * @param config - Optional params/query to match specific queries\n * @returns Promise that resolves when invalidation is complete\n */\n invalidateQueries<T extends QueryEndpoint<Paths>>(\n endpoint: T,\n config?: FilteredRequestConfig<Paths, T>,\n ): Promise<void> {\n const queryClient = this.getQueryClient();\n const queryKey = this.buildQueryKey(endpoint, config);\n\n return queryClient.invalidateQueries({\n queryKey,\n exact: !!config, // Use exact matching if config is provided\n });\n }\n\n /**\n * Invalidate all queries in the cache\n * @returns Promise that resolves when invalidation is complete\n */\n invalidateAllQueries(): Promise<void> {\n const queryClient = this.getQueryClient();\n return queryClient.invalidateQueries();\n }\n\n /**\n * Get the underlying QueryClient instance\n * @returns The QueryClient instance\n */\n getQueryClient(): QueryClient {\n if (this.queryClient) {\n return this.queryClient;\n }\n\n // If no query client was provided, try to get it from context\n // This will throw if used outside of QueryClientProvider\n throw new Error(\n 'No QueryClient set, please provide a QueryClient via the queryClient option or ensure you are within a QueryClientProvider',\n );\n }\n\n /**\n * Set the QueryClient instance\n * @param queryClient - The QueryClient instance to use\n */\n setQueryClient(queryClient: QueryClient): void {\n this.queryClient = queryClient;\n }\n}\n\nexport function createTypedQueryClient<Paths>(\n options?: TypedQueryClientOptions,\n) {\n return new TypedQueryClient<Paths>(options);\n}\n\n// Hook exports for convenience\nexport function useTypedQuery<Paths, T extends QueryEndpoint<Paths>>(\n client: TypedQueryClient<Paths>,\n endpoint: T,\n config?: FilteredRequestConfig<Paths, T>,\n options?: Omit<\n UseQueryOptions<ExtractEndpointResponse<Paths, T>, Response>,\n 'queryKey' | 'queryFn'\n >,\n) {\n return client.useQuery(endpoint, config, options);\n}\n\nexport function useTypedMutation<Paths, T extends MutationEndpoint<Paths>>(\n client: TypedQueryClient<Paths>,\n endpoint: T,\n options?: Omit<\n UseMutationOptions<\n ExtractEndpointResponse<Paths, T>,\n Response,\n FilteredRequestConfig<Paths, T>\n >,\n 'mutationFn'\n >,\n) {\n return client.useMutation(endpoint, options);\n}\n\nexport function useTypedInfiniteQuery<\n Paths,\n T extends QueryEndpoint<Paths>,\n TPageData = ExtractEndpointResponse<Paths, T>,\n TPageParam = unknown,\n>(\n client: TypedQueryClient<Paths>,\n endpoint: T,\n options: Omit<\n UseInfiniteQueryOptions<\n TPageData,\n Response,\n { pages: TPageData[]; pageParams: TPageParam[] },\n unknown[],\n TPageParam\n >,\n 'queryKey' | 'queryFn' | 'getNextPageParam' | 'initialPageParam'\n > & {\n getNextPageParam: (\n lastPage: TPageData,\n allPages: TPageData[],\n lastPageParam: TPageParam,\n allPageParams: TPageParam[],\n ) => TPageParam | undefined;\n initialPageParam: TPageParam;\n },\n config?: FilteredRequestConfig<Paths, T>,\n) {\n return client.useInfiniteQuery(endpoint, options, config);\n}\n\n/**\n * Hook to invalidate queries using the current QueryClient from context\n */\nexport function useTypedInvalidateQueries<Paths>(\n client: TypedQueryClient<Paths>,\n) {\n const queryClient = useQueryClient();\n\n return {\n /**\n * Invalidate queries for a specific endpoint\n */\n invalidateQueries: <T extends QueryEndpoint<Paths>>(\n endpoint: T,\n config?: FilteredRequestConfig<Paths, T>,\n ) => {\n const queryKey = client.buildQueryKey(endpoint, config);\n return queryClient.invalidateQueries({\n queryKey,\n exact: !!config,\n });\n },\n\n /**\n * Invalidate all queries\n */\n invalidateAllQueries: () => {\n return queryClient.invalidateQueries();\n },\n };\n}\n"],"mappings":";;;;;;AA4BA,IAAa,mBAAb,MAAqC;CACnC,AAAQ;CACR,AAAQ;CAER,YAAYA,UAAmC,CAAE,GAAE;AACjD,OAAK,UAAU,mCAA0B,QAAQ;AACjD,OAAK,cAAc,QAAQ;CAC5B;CAED,SACEC,UACAC,QACAC,SAIA;EACA,MAAM,WAAW,KAAK,cAAc,UAAU,OAAO;EAGrD,MAAM,kBAAkB,mBACtB,OAAO;GACL;GACA,SAAS,MAAM,KAAK,QAAQ,UAAU,OAAO;GAC7C,GAAG;EACJ,IAID;GACE,SAAS,KAAK,IAAI;GAClB;GACA,KAAK,UAAU,OAAO;GACtB,KAAK,UAAU,QAAQ;EACxB,EACF;AAED,SAAO,qCACL,gBACD;CACF;CAED,YACEF,UACAG,SAQA;EAEA,MAAM,kBAAkB,mBACtB,OAAO;GACL,YAAY,CAACC,WACX,KAAK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B;CACvC;;;;;CAMD,iBAA8B;AAC5B,MAAI,KAAK,YACP,QAAO,KAAK;AAKd,QAAM,IAAI,MACR;CAEH;;;;;CAMD,eAAeM,aAAgC;AAC7C,OAAK,cAAc;CACpB;AACF;AAED,SAAgB,uBACdC,SACA;AACA,QAAO,IAAI,iBAAwB;AACpC;AAGD,SAAgB,cACdC,QACAT,UACAC,QACAS,SAIA;AACA,QAAO,OAAO,SAAS,UAAU,QAAQ,QAAQ;AAClD;AAED,SAAgB,iBACdD,QACAT,UACAW,SAQA;AACA,QAAO,OAAO,YAAY,UAAU,QAAQ;AAC7C;AAED,SAAgB,sBAMdF,QACAT,UACAY,SAkBAX,QACA;AACA,QAAO,OAAO,iBAAiB,UAAU,SAAS,OAAO;AAC1D;;;;AAKD,SAAgB,0BACdQ,QACA;CACA,MAAM,cAAc,4CAAgB;AAEpC,QAAO;EAIL,mBAAmB,CACjBT,UACAC,WACG;GACH,MAAM,WAAW,OAAO,cAAc,UAAU,OAAO;AACvD,UAAO,YAAY,kBAAkB;IACnC;IACA,SAAS;GACV,EAAC;EACH;EAKD,sBAAsB,MAAM;AAC1B,UAAO,YAAY,mBAAmB;EACvC;CACF;AACF"}
|
|
1
|
+
{"version":3,"file":"react-query.cjs","names":["options: TypedQueryClientOptions","endpoint: T","config?: FilteredRequestConfig<Paths, T>","options?: Omit<\n\t\t\tUseQueryOptions<ExtractEndpointResponse<Paths, T>, Response>,\n\t\t\t'queryKey' | 'queryFn'\n\t\t>","options?: Omit<\n\t\t\tUseMutationOptions<\n\t\t\t\tExtractEndpointResponse<Paths, T>,\n\t\t\t\tResponse,\n\t\t\t\tFilteredRequestConfig<Paths, T>\n\t\t\t>,\n\t\t\t'mutationFn'\n\t\t>","config: FilteredRequestConfig<Paths, T>","options: Omit<\n\t\t\tUseInfiniteQueryOptions<\n\t\t\t\tTPageData,\n\t\t\t\tResponse,\n\t\t\t\t{ pages: TPageData[]; pageParams: TPageParam[] },\n\t\t\t\tunknown[],\n\t\t\t\tTPageParam\n\t\t\t>,\n\t\t\t'queryKey' | 'queryFn' | 'getNextPageParam' | 'initialPageParam'\n\t\t> & {\n\t\t\tgetNextPageParam: (\n\t\t\t\tlastPage: TPageData,\n\t\t\t\tallPages: TPageData[],\n\t\t\t\tlastPageParam: TPageParam,\n\t\t\t\tallPageParams: TPageParam[],\n\t\t\t) => TPageParam | undefined;\n\t\t\tinitialPageParam: TPageParam;\n\t\t}","key: unknown[]","queryClient: QueryClient","options?: TypedQueryClientOptions","client: TypedQueryClient<Paths>","options?: Omit<\n\t\tUseQueryOptions<ExtractEndpointResponse<Paths, T>, Response>,\n\t\t'queryKey' | 'queryFn'\n\t>","options?: Omit<\n\t\tUseMutationOptions<\n\t\t\tExtractEndpointResponse<Paths, T>,\n\t\t\tResponse,\n\t\t\tFilteredRequestConfig<Paths, T>\n\t\t>,\n\t\t'mutationFn'\n\t>","options: Omit<\n\t\tUseInfiniteQueryOptions<\n\t\t\tTPageData,\n\t\t\tResponse,\n\t\t\t{ pages: TPageData[]; pageParams: TPageParam[] },\n\t\t\tunknown[],\n\t\t\tTPageParam\n\t\t>,\n\t\t'queryKey' | 'queryFn' | 'getNextPageParam' | 'initialPageParam'\n\t> & {\n\t\tgetNextPageParam: (\n\t\t\tlastPage: TPageData,\n\t\t\tallPages: TPageData[],\n\t\t\tlastPageParam: TPageParam,\n\t\t\tallPageParams: TPageParam[],\n\t\t) => TPageParam | undefined;\n\t\tinitialPageParam: TPageParam;\n\t}"],"sources":["../src/react-query.ts"],"sourcesContent":["import type {\n\tQueryClient,\n\tQueryFunctionContext,\n\tUseInfiniteQueryOptions,\n\tUseMutationOptions,\n\tUseQueryOptions,\n} from '@tanstack/react-query';\nimport {\n\tuseInfiniteQuery,\n\tuseMutation,\n\tuseQuery,\n\tuseQueryClient,\n} from '@tanstack/react-query';\nimport { useMemo } from 'react';\nimport { createTypedFetcher } from './fetcher';\nimport type {\n\tExtractEndpointResponse,\n\tFetcherOptions,\n\tFilteredRequestConfig,\n\tMutationEndpoint,\n\tQueryEndpoint,\n\tTypedEndpoint,\n} from './types';\n\nexport interface TypedQueryClientOptions extends FetcherOptions {\n\tqueryClient?: QueryClient;\n}\n\nexport class TypedQueryClient<Paths> {\n\tprivate fetcher: ReturnType<typeof createTypedFetcher<Paths>>;\n\tprivate queryClient?: QueryClient;\n\n\tconstructor(options: TypedQueryClientOptions = {}) {\n\t\tthis.fetcher = createTypedFetcher<Paths>(options);\n\t\tthis.queryClient = options.queryClient;\n\t}\n\n\tuseQuery<T extends QueryEndpoint<Paths>>(\n\t\tendpoint: T,\n\t\tconfig?: FilteredRequestConfig<Paths, T>,\n\t\toptions?: Omit<\n\t\t\tUseQueryOptions<ExtractEndpointResponse<Paths, T>, Response>,\n\t\t\t'queryKey' | 'queryFn'\n\t\t>,\n\t) {\n\t\tconst queryKey = this.buildQueryKey(endpoint, config);\n\n\t\t// Memoize the combined options to prevent unnecessary re-renders\n\t\tconst memoizedOptions = useMemo(\n\t\t\t() => ({\n\t\t\t\tqueryKey,\n\t\t\t\tqueryFn: () => this.fetcher(endpoint, config),\n\t\t\t\t...options,\n\t\t\t}),\n\t\t\t// Dependencies: queryKey, endpoint, config, and options\n\t\t\t// Note: We stringify config and options to ensure stable references\n\t\t\t// eslint-disable-next-line react-hooks/exhaustive-deps\n\t\t\t[\n\t\t\t\tqueryKey.join(','),\n\t\t\t\tendpoint,\n\t\t\t\tJSON.stringify(config),\n\t\t\t\tJSON.stringify(options),\n\t\t\t],\n\t\t);\n\n\t\treturn useQuery<ExtractEndpointResponse<Paths, T>, Response>(\n\t\t\tmemoizedOptions,\n\t\t);\n\t}\n\n\tuseMutation<T extends MutationEndpoint<Paths>>(\n\t\tendpoint: T,\n\t\toptions?: Omit<\n\t\t\tUseMutationOptions<\n\t\t\t\tExtractEndpointResponse<Paths, T>,\n\t\t\t\tResponse,\n\t\t\t\tFilteredRequestConfig<Paths, T>\n\t\t\t>,\n\t\t\t'mutationFn'\n\t\t>,\n\t) {\n\t\t// Memoize the combined options to prevent unnecessary re-renders\n\t\tconst memoizedOptions = useMemo(\n\t\t\t() => ({\n\t\t\t\tmutationFn: (config: FilteredRequestConfig<Paths, T>) =>\n\t\t\t\t\tthis.fetcher(endpoint, config),\n\t\t\t\t...options,\n\t\t\t}),\n\t\t\t// Dependencies: endpoint and options\n\t\t\t// Note: We stringify options to ensure stable reference\n\t\t\t// eslint-disable-next-line react-hooks/exhaustive-deps\n\t\t\t[endpoint, JSON.stringify(options)],\n\t\t);\n\n\t\treturn useMutation<\n\t\t\tExtractEndpointResponse<Paths, T>,\n\t\t\tResponse,\n\t\t\tFilteredRequestConfig<Paths, T>\n\t\t>(memoizedOptions);\n\t}\n\n\tuseInfiniteQuery<\n\t\tT extends QueryEndpoint<Paths>,\n\t\tTPageData = ExtractEndpointResponse<Paths, T>,\n\t\tTPageParam = unknown,\n\t>(\n\t\tendpoint: T,\n\t\toptions: Omit<\n\t\t\tUseInfiniteQueryOptions<\n\t\t\t\tTPageData,\n\t\t\t\tResponse,\n\t\t\t\t{ pages: TPageData[]; pageParams: TPageParam[] },\n\t\t\t\tunknown[],\n\t\t\t\tTPageParam\n\t\t\t>,\n\t\t\t'queryKey' | 'queryFn' | 'getNextPageParam' | 'initialPageParam'\n\t\t> & {\n\t\t\tgetNextPageParam: (\n\t\t\t\tlastPage: TPageData,\n\t\t\t\tallPages: TPageData[],\n\t\t\t\tlastPageParam: TPageParam,\n\t\t\t\tallPageParams: TPageParam[],\n\t\t\t) => TPageParam | undefined;\n\t\t\tinitialPageParam: TPageParam;\n\t\t},\n\t\tconfig?: FilteredRequestConfig<Paths, T>,\n\t) {\n\t\tconst queryKey = this.buildQueryKey(endpoint, config);\n\n\t\t// Memoize the combined options to prevent unnecessary re-renders\n\t\tconst memoizedOptions = useMemo(\n\t\t\t() => ({\n\t\t\t\tqueryKey,\n\t\t\t\tqueryFn: ({\n\t\t\t\t\tpageParam,\n\t\t\t\t}: QueryFunctionContext<unknown[], TPageParam>) => {\n\t\t\t\t\tlet mergedConfig = config;\n\t\t\t\t\tif (pageParam !== undefined && config) {\n\t\t\t\t\t\t// If pageParam is an object, spread it into query\n\t\t\t\t\t\tconst pageQuery =\n\t\t\t\t\t\t\ttypeof pageParam === 'object' ? pageParam : { page: pageParam };\n\t\t\t\t\t\tmergedConfig = {\n\t\t\t\t\t\t\t...config,\n\t\t\t\t\t\t\tquery: { ...(config as any).query, ...pageQuery },\n\t\t\t\t\t\t} as any;\n\t\t\t\t\t} else if (pageParam !== undefined && !config) {\n\t\t\t\t\t\t// If pageParam is an object, use it directly, otherwise wrap in page property\n\t\t\t\t\t\tconst pageQuery =\n\t\t\t\t\t\t\ttypeof pageParam === 'object' ? pageParam : { page: pageParam };\n\t\t\t\t\t\tmergedConfig = { query: pageQuery } as any;\n\t\t\t\t\t}\n\t\t\t\t\treturn this.fetcher(endpoint, mergedConfig) as Promise<TPageData>;\n\t\t\t\t},\n\t\t\t\t...options,\n\t\t\t}),\n\t\t\t// Dependencies: queryKey, endpoint, config, and options\n\t\t\t// Note: We stringify config and options to ensure stable references\n\t\t\t// eslint-disable-next-line react-hooks/exhaustive-deps\n\t\t\t[\n\t\t\t\tqueryKey.join(','),\n\t\t\t\tendpoint,\n\t\t\t\tJSON.stringify(config),\n\t\t\t\tJSON.stringify(options),\n\t\t\t],\n\t\t);\n\n\t\treturn useInfiniteQuery<\n\t\t\tTPageData,\n\t\t\tResponse,\n\t\t\t{ pages: TPageData[]; pageParams: TPageParam[] },\n\t\t\tunknown[],\n\t\t\tTPageParam\n\t\t>(memoizedOptions);\n\t}\n\n\tbuildQueryKey<T extends TypedEndpoint<Paths>>(\n\t\tendpoint: T,\n\t\tconfig?: FilteredRequestConfig<Paths, T>,\n\t): unknown[] {\n\t\tconst key: unknown[] = [endpoint];\n\n\t\tif (config && 'params' in config && config.params) {\n\t\t\tkey.push({ params: config.params });\n\t\t}\n\n\t\tif (config && 'query' in config && config.query) {\n\t\t\tkey.push({ query: config.query });\n\t\t}\n\n\t\treturn key;\n\t}\n\n\t/**\n\t * Invalidate queries for a specific endpoint with optional config\n\t * @param endpoint - The endpoint to invalidate (e.g., 'GET /users')\n\t * @param config - Optional params/query to match specific queries\n\t * @returns Promise that resolves when invalidation is complete\n\t */\n\tinvalidateQueries<T extends QueryEndpoint<Paths>>(\n\t\tendpoint: T,\n\t\tconfig?: FilteredRequestConfig<Paths, T>,\n\t): Promise<void> {\n\t\tconst queryClient = this.getQueryClient();\n\t\tconst queryKey = this.buildQueryKey(endpoint, config);\n\n\t\treturn queryClient.invalidateQueries({\n\t\t\tqueryKey,\n\t\t\texact: !!config, // Use exact matching if config is provided\n\t\t});\n\t}\n\n\t/**\n\t * Invalidate all queries in the cache\n\t * @returns Promise that resolves when invalidation is complete\n\t */\n\tinvalidateAllQueries(): Promise<void> {\n\t\tconst queryClient = this.getQueryClient();\n\t\treturn queryClient.invalidateQueries();\n\t}\n\n\t/**\n\t * Get the underlying QueryClient instance\n\t * @returns The QueryClient instance\n\t */\n\tgetQueryClient(): QueryClient {\n\t\tif (this.queryClient) {\n\t\t\treturn this.queryClient;\n\t\t}\n\n\t\t// If no query client was provided, try to get it from context\n\t\t// This will throw if used outside of QueryClientProvider\n\t\tthrow new Error(\n\t\t\t'No QueryClient set, please provide a QueryClient via the queryClient option or ensure you are within a QueryClientProvider',\n\t\t);\n\t}\n\n\t/**\n\t * Set the QueryClient instance\n\t * @param queryClient - The QueryClient instance to use\n\t */\n\tsetQueryClient(queryClient: QueryClient): void {\n\t\tthis.queryClient = queryClient;\n\t}\n}\n\nexport function createTypedQueryClient<Paths>(\n\toptions?: TypedQueryClientOptions,\n) {\n\treturn new TypedQueryClient<Paths>(options);\n}\n\n// Hook exports for convenience\nexport function useTypedQuery<Paths, T extends QueryEndpoint<Paths>>(\n\tclient: TypedQueryClient<Paths>,\n\tendpoint: T,\n\tconfig?: FilteredRequestConfig<Paths, T>,\n\toptions?: Omit<\n\t\tUseQueryOptions<ExtractEndpointResponse<Paths, T>, Response>,\n\t\t'queryKey' | 'queryFn'\n\t>,\n) {\n\treturn client.useQuery(endpoint, config, options);\n}\n\nexport function useTypedMutation<Paths, T extends MutationEndpoint<Paths>>(\n\tclient: TypedQueryClient<Paths>,\n\tendpoint: T,\n\toptions?: Omit<\n\t\tUseMutationOptions<\n\t\t\tExtractEndpointResponse<Paths, T>,\n\t\t\tResponse,\n\t\t\tFilteredRequestConfig<Paths, T>\n\t\t>,\n\t\t'mutationFn'\n\t>,\n) {\n\treturn client.useMutation(endpoint, options);\n}\n\nexport function useTypedInfiniteQuery<\n\tPaths,\n\tT extends QueryEndpoint<Paths>,\n\tTPageData = ExtractEndpointResponse<Paths, T>,\n\tTPageParam = unknown,\n>(\n\tclient: TypedQueryClient<Paths>,\n\tendpoint: T,\n\toptions: Omit<\n\t\tUseInfiniteQueryOptions<\n\t\t\tTPageData,\n\t\t\tResponse,\n\t\t\t{ pages: TPageData[]; pageParams: TPageParam[] },\n\t\t\tunknown[],\n\t\t\tTPageParam\n\t\t>,\n\t\t'queryKey' | 'queryFn' | 'getNextPageParam' | 'initialPageParam'\n\t> & {\n\t\tgetNextPageParam: (\n\t\t\tlastPage: TPageData,\n\t\t\tallPages: TPageData[],\n\t\t\tlastPageParam: TPageParam,\n\t\t\tallPageParams: TPageParam[],\n\t\t) => TPageParam | undefined;\n\t\tinitialPageParam: TPageParam;\n\t},\n\tconfig?: FilteredRequestConfig<Paths, T>,\n) {\n\treturn client.useInfiniteQuery(endpoint, options, config);\n}\n\n/**\n * Hook to invalidate queries using the current QueryClient from context\n */\nexport function useTypedInvalidateQueries<Paths>(\n\tclient: TypedQueryClient<Paths>,\n) {\n\tconst queryClient = useQueryClient();\n\n\treturn {\n\t\t/**\n\t\t * Invalidate queries for a specific endpoint\n\t\t */\n\t\tinvalidateQueries: <T extends QueryEndpoint<Paths>>(\n\t\t\tendpoint: T,\n\t\t\tconfig?: FilteredRequestConfig<Paths, T>,\n\t\t) => {\n\t\t\tconst queryKey = client.buildQueryKey(endpoint, config);\n\t\t\treturn queryClient.invalidateQueries({\n\t\t\t\tqueryKey,\n\t\t\t\texact: !!config,\n\t\t\t});\n\t\t},\n\n\t\t/**\n\t\t * Invalidate all queries\n\t\t */\n\t\tinvalidateAllQueries: () => {\n\t\t\treturn queryClient.invalidateQueries();\n\t\t},\n\t};\n}\n"],"mappings":";;;;;;AA4BA,IAAa,mBAAb,MAAqC;CACpC,AAAQ;CACR,AAAQ;CAER,YAAYA,UAAmC,CAAE,GAAE;AAClD,OAAK,UAAU,mCAA0B,QAAQ;AACjD,OAAK,cAAc,QAAQ;CAC3B;CAED,SACCC,UACAC,QACAC,SAIC;EACD,MAAM,WAAW,KAAK,cAAc,UAAU,OAAO;EAGrD,MAAM,kBAAkB,mBACvB,OAAO;GACN;GACA,SAAS,MAAM,KAAK,QAAQ,UAAU,OAAO;GAC7C,GAAG;EACH,IAID;GACC,SAAS,KAAK,IAAI;GAClB;GACA,KAAK,UAAU,OAAO;GACtB,KAAK,UAAU,QAAQ;EACvB,EACD;AAED,SAAO,qCACN,gBACA;CACD;CAED,YACCF,UACAG,SAQC;EAED,MAAM,kBAAkB,mBACvB,OAAO;GACN,YAAY,CAACC,WACZ,KAAK,QAAQ,UAAU,OAAO;GAC/B,GAAG;EACH,IAID,CAAC,UAAU,KAAK,UAAU,QAAQ,AAAC,EACnC;AAED,SAAO,wCAIL,gBAAgB;CAClB;CAED,iBAKCJ,UACAK,SAkBAJ,QACC;EACD,MAAM,WAAW,KAAK,cAAc,UAAU,OAAO;EAGrD,MAAM,kBAAkB,mBACvB,OAAO;GACN;GACA,SAAS,CAAC,EACT,WAC6C,KAAK;IAClD,IAAI,eAAe;AACnB,QAAI,wBAA2B,QAAQ;KAEtC,MAAM,mBACE,cAAc,WAAW,YAAY,EAAE,MAAM,UAAW;AAChE,oBAAe;MACd,GAAG;MACH,OAAO;OAAE,GAAI,OAAe;OAAO,GAAG;MAAW;KACjD;IACD,WAAU,yBAA4B,QAAQ;KAE9C,MAAM,mBACE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,0BACfQ,QACC;CACD,MAAM,cAAc,4CAAgB;AAEpC,QAAO;EAIN,mBAAmB,CAClBT,UACAC,WACI;GACJ,MAAM,WAAW,OAAO,cAAc,UAAU,OAAO;AACvD,UAAO,YAAY,kBAAkB;IACpC;IACA,SAAS;GACT,EAAC;EACF;EAKD,sBAAsB,MAAM;AAC3B,UAAO,YAAY,mBAAmB;EACtC;CACD;AACD"}
|
package/dist/react-query.d.cts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { ExtractEndpointResponse, FetcherOptions, FilteredRequestConfig, MutationEndpoint, QueryEndpoint, TypedEndpoint } from "./types-
|
|
1
|
+
import { ExtractEndpointResponse, FetcherOptions, FilteredRequestConfig, MutationEndpoint, QueryEndpoint, TypedEndpoint } from "./types-4K4N-Fl1.cjs";
|
|
2
2
|
import * as _tanstack_react_query3 from "@tanstack/react-query";
|
|
3
3
|
import { QueryClient, UseInfiniteQueryOptions, UseMutationOptions, UseQueryOptions } from "@tanstack/react-query";
|
|
4
4
|
|
|
@@ -72,6 +72,8 @@ declare function useTypedInvalidateQueries<Paths>(client: TypedQueryClient<Paths
|
|
|
72
72
|
*/
|
|
73
73
|
invalidateAllQueries: () => Promise<void>;
|
|
74
74
|
};
|
|
75
|
+
//# sourceMappingURL=react-query.d.ts.map
|
|
76
|
+
|
|
75
77
|
//#endregion
|
|
76
78
|
export { TypedQueryClient, TypedQueryClientOptions, createTypedQueryClient, useTypedInfiniteQuery, useTypedInvalidateQueries, useTypedMutation, useTypedQuery };
|
|
77
79
|
//# sourceMappingURL=react-query.d.cts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"react-query.d.cts","names":[],"sources":["../src/react-query.ts"],"sourcesContent":[],"mappings":";;;;;UAwBiB,uBAAA,SAAgC;gBAClC;;AADE,cAIJ,gBAJ4B,CAAA,KAAA,CAAA,CAAA;EAAA,QAAA,OAAA;EAAA,QAC1B,WAAA;EAAW,WADuB,CAAA,OAAA,CAA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tractEndpointResponse, FetcherOptions, FilteredRequestConfig, MutationEndpoint, QueryEndpoint, TypedEndpoint } from "./types-
|
|
2
|
-
import * as
|
|
1
|
+
import { ExtractEndpointResponse, FetcherOptions, FilteredRequestConfig, MutationEndpoint, QueryEndpoint, TypedEndpoint } from "./types-hhkZWjQn.mjs";
|
|
2
|
+
import * as _tanstack_react_query0 from "@tanstack/react-query";
|
|
3
3
|
import { QueryClient, UseInfiniteQueryOptions, UseMutationOptions, UseQueryOptions } from "@tanstack/react-query";
|
|
4
4
|
|
|
5
5
|
//#region src/react-query.d.ts
|
|
@@ -10,15 +10,15 @@ declare class TypedQueryClient<Paths> {
|
|
|
10
10
|
private fetcher;
|
|
11
11
|
private queryClient?;
|
|
12
12
|
constructor(options?: TypedQueryClientOptions);
|
|
13
|
-
useQuery<T extends QueryEndpoint<Paths>>(endpoint: T, config?: FilteredRequestConfig<Paths, T>, options?: Omit<UseQueryOptions<ExtractEndpointResponse<Paths, T>, Response>, 'queryKey' | 'queryFn'>):
|
|
14
|
-
useMutation<T extends MutationEndpoint<Paths>>(endpoint: T, options?: Omit<UseMutationOptions<ExtractEndpointResponse<Paths, T>, Response, FilteredRequestConfig<Paths, T>>, 'mutationFn'>):
|
|
13
|
+
useQuery<T extends QueryEndpoint<Paths>>(endpoint: T, config?: FilteredRequestConfig<Paths, T>, options?: Omit<UseQueryOptions<ExtractEndpointResponse<Paths, T>, Response>, 'queryKey' | 'queryFn'>): _tanstack_react_query0.UseQueryResult<_tanstack_react_query0.NoInfer<ExtractEndpointResponse<Paths, T>>, Response>;
|
|
14
|
+
useMutation<T extends MutationEndpoint<Paths>>(endpoint: T, options?: Omit<UseMutationOptions<ExtractEndpointResponse<Paths, T>, Response, FilteredRequestConfig<Paths, T>>, 'mutationFn'>): _tanstack_react_query0.UseMutationResult<ExtractEndpointResponse<Paths, T>, Response, FilteredRequestConfig<Paths, T>, unknown>;
|
|
15
15
|
useInfiniteQuery<T extends QueryEndpoint<Paths>, TPageData = ExtractEndpointResponse<Paths, T>, TPageParam = unknown>(endpoint: T, options: Omit<UseInfiniteQueryOptions<TPageData, Response, {
|
|
16
16
|
pages: TPageData[];
|
|
17
17
|
pageParams: TPageParam[];
|
|
18
18
|
}, unknown[], TPageParam>, 'queryKey' | 'queryFn' | 'getNextPageParam' | 'initialPageParam'> & {
|
|
19
19
|
getNextPageParam: (lastPage: TPageData, allPages: TPageData[], lastPageParam: TPageParam, allPageParams: TPageParam[]) => TPageParam | undefined;
|
|
20
20
|
initialPageParam: TPageParam;
|
|
21
|
-
}, config?: FilteredRequestConfig<Paths, T>):
|
|
21
|
+
}, config?: FilteredRequestConfig<Paths, T>): _tanstack_react_query0.UseInfiniteQueryResult<{
|
|
22
22
|
pages: TPageData[];
|
|
23
23
|
pageParams: TPageParam[];
|
|
24
24
|
}, Response>;
|
|
@@ -47,15 +47,15 @@ declare class TypedQueryClient<Paths> {
|
|
|
47
47
|
setQueryClient(queryClient: QueryClient): void;
|
|
48
48
|
}
|
|
49
49
|
declare function createTypedQueryClient<Paths>(options?: TypedQueryClientOptions): TypedQueryClient<Paths>;
|
|
50
|
-
declare function useTypedQuery<Paths, T extends QueryEndpoint<Paths>>(client: TypedQueryClient<Paths>, endpoint: T, config?: FilteredRequestConfig<Paths, T>, options?: Omit<UseQueryOptions<ExtractEndpointResponse<Paths, T>, Response>, 'queryKey' | 'queryFn'>):
|
|
51
|
-
declare function useTypedMutation<Paths, T extends MutationEndpoint<Paths>>(client: TypedQueryClient<Paths>, endpoint: T, options?: Omit<UseMutationOptions<ExtractEndpointResponse<Paths, T>, Response, FilteredRequestConfig<Paths, T>>, 'mutationFn'>):
|
|
50
|
+
declare function useTypedQuery<Paths, T extends QueryEndpoint<Paths>>(client: TypedQueryClient<Paths>, endpoint: T, config?: FilteredRequestConfig<Paths, T>, options?: Omit<UseQueryOptions<ExtractEndpointResponse<Paths, T>, Response>, 'queryKey' | 'queryFn'>): _tanstack_react_query0.UseQueryResult<_tanstack_react_query0.NoInfer<ExtractEndpointResponse<Paths, T>>, Response>;
|
|
51
|
+
declare function useTypedMutation<Paths, T extends MutationEndpoint<Paths>>(client: TypedQueryClient<Paths>, endpoint: T, options?: Omit<UseMutationOptions<ExtractEndpointResponse<Paths, T>, Response, FilteredRequestConfig<Paths, T>>, 'mutationFn'>): _tanstack_react_query0.UseMutationResult<ExtractEndpointResponse<Paths, T>, Response, FilteredRequestConfig<Paths, T>, unknown>;
|
|
52
52
|
declare function useTypedInfiniteQuery<Paths, T extends QueryEndpoint<Paths>, TPageData = ExtractEndpointResponse<Paths, T>, TPageParam = unknown>(client: TypedQueryClient<Paths>, endpoint: T, options: Omit<UseInfiniteQueryOptions<TPageData, Response, {
|
|
53
53
|
pages: TPageData[];
|
|
54
54
|
pageParams: TPageParam[];
|
|
55
55
|
}, unknown[], TPageParam>, 'queryKey' | 'queryFn' | 'getNextPageParam' | 'initialPageParam'> & {
|
|
56
56
|
getNextPageParam: (lastPage: TPageData, allPages: TPageData[], lastPageParam: TPageParam, allPageParams: TPageParam[]) => TPageParam | undefined;
|
|
57
57
|
initialPageParam: TPageParam;
|
|
58
|
-
}, config?: FilteredRequestConfig<Paths, T>):
|
|
58
|
+
}, config?: FilteredRequestConfig<Paths, T>): _tanstack_react_query0.UseInfiniteQueryResult<{
|
|
59
59
|
pages: TPageData[];
|
|
60
60
|
pageParams: TPageParam[];
|
|
61
61
|
}, Response>;
|
|
@@ -72,6 +72,8 @@ declare function useTypedInvalidateQueries<Paths>(client: TypedQueryClient<Paths
|
|
|
72
72
|
*/
|
|
73
73
|
invalidateAllQueries: () => Promise<void>;
|
|
74
74
|
};
|
|
75
|
+
//# sourceMappingURL=react-query.d.ts.map
|
|
76
|
+
|
|
75
77
|
//#endregion
|
|
76
78
|
export { TypedQueryClient, TypedQueryClientOptions, createTypedQueryClient, useTypedInfiniteQuery, useTypedInvalidateQueries, useTypedMutation, useTypedQuery };
|
|
77
79
|
//# sourceMappingURL=react-query.d.mts.map
|
|
@@ -0,0 +1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qBA7ME,CA6MoB,KA7MpB,EA6M2B,CA7M3B,CAAA,EAAA,GA6M6B,OA7M7B,CAAA,IAAA,CAAA;EAAS;;;EAGL,oBACG,EAAA,GAAA,GAyMsB,OAzMtB,CAAA,IAAA,CAAA;CAAU"}
|
package/dist/react-query.mjs
CHANGED
package/dist/react-query.mjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"react-query.mjs","names":["options: TypedQueryClientOptions","endpoint: T","config?: FilteredRequestConfig<Paths, T>","options?: Omit<\n UseQueryOptions<ExtractEndpointResponse<Paths, T>, Response>,\n 'queryKey' | 'queryFn'\n >","options?: Omit<\n UseMutationOptions<\n ExtractEndpointResponse<Paths, T>,\n Response,\n FilteredRequestConfig<Paths, T>\n >,\n 'mutationFn'\n >","config: FilteredRequestConfig<Paths, T>","options: Omit<\n UseInfiniteQueryOptions<\n TPageData,\n Response,\n { pages: TPageData[]; pageParams: TPageParam[] },\n unknown[],\n TPageParam\n >,\n 'queryKey' | 'queryFn' | 'getNextPageParam' | 'initialPageParam'\n > & {\n getNextPageParam: (\n lastPage: TPageData,\n allPages: TPageData[],\n lastPageParam: TPageParam,\n allPageParams: TPageParam[],\n ) => TPageParam | undefined;\n initialPageParam: TPageParam;\n }","key: unknown[]","queryClient: QueryClient","options?: TypedQueryClientOptions","client: TypedQueryClient<Paths>","options?: Omit<\n UseQueryOptions<ExtractEndpointResponse<Paths, T>, Response>,\n 'queryKey' | 'queryFn'\n >","options?: Omit<\n UseMutationOptions<\n ExtractEndpointResponse<Paths, T>,\n Response,\n FilteredRequestConfig<Paths, T>\n >,\n 'mutationFn'\n >","options: Omit<\n UseInfiniteQueryOptions<\n TPageData,\n Response,\n { pages: TPageData[]; pageParams: TPageParam[] },\n unknown[],\n TPageParam\n >,\n 'queryKey' | 'queryFn' | 'getNextPageParam' | 'initialPageParam'\n > & {\n getNextPageParam: (\n lastPage: TPageData,\n allPages: TPageData[],\n lastPageParam: TPageParam,\n allPageParams: TPageParam[],\n ) => TPageParam | undefined;\n initialPageParam: TPageParam;\n }"],"sources":["../src/react-query.ts"],"sourcesContent":["import type {\n QueryClient,\n QueryFunctionContext,\n UseInfiniteQueryOptions,\n UseMutationOptions,\n UseQueryOptions,\n} from '@tanstack/react-query';\nimport {\n useInfiniteQuery,\n useMutation,\n useQuery,\n useQueryClient,\n} from '@tanstack/react-query';\nimport { useMemo } from 'react';\nimport { createTypedFetcher } from './fetcher';\nimport type {\n ExtractEndpointResponse,\n FetcherOptions,\n FilteredRequestConfig,\n MutationEndpoint,\n QueryEndpoint,\n TypedEndpoint,\n} from './types';\n\nexport interface TypedQueryClientOptions extends FetcherOptions {\n queryClient?: QueryClient;\n}\n\nexport class TypedQueryClient<Paths> {\n private fetcher: ReturnType<typeof createTypedFetcher<Paths>>;\n private queryClient?: QueryClient;\n\n constructor(options: TypedQueryClientOptions = {}) {\n this.fetcher = createTypedFetcher<Paths>(options);\n this.queryClient = options.queryClient;\n }\n\n useQuery<T extends QueryEndpoint<Paths>>(\n endpoint: T,\n config?: FilteredRequestConfig<Paths, T>,\n options?: Omit<\n UseQueryOptions<ExtractEndpointResponse<Paths, T>, Response>,\n 'queryKey' | 'queryFn'\n >,\n ) {\n const queryKey = this.buildQueryKey(endpoint, config);\n\n // Memoize the combined options to prevent unnecessary re-renders\n const memoizedOptions = useMemo(\n () => ({\n queryKey,\n queryFn: () => this.fetcher(endpoint, config),\n ...options,\n }),\n // Dependencies: queryKey, endpoint, config, and options\n // Note: We stringify config and options to ensure stable references\n // eslint-disable-next-line react-hooks/exhaustive-deps\n [\n queryKey.join(','),\n endpoint,\n JSON.stringify(config),\n JSON.stringify(options),\n ],\n );\n\n return useQuery<ExtractEndpointResponse<Paths, T>, Response>(\n memoizedOptions,\n );\n }\n\n useMutation<T extends MutationEndpoint<Paths>>(\n endpoint: T,\n options?: Omit<\n UseMutationOptions<\n ExtractEndpointResponse<Paths, T>,\n Response,\n FilteredRequestConfig<Paths, T>\n >,\n 'mutationFn'\n >,\n ) {\n // Memoize the combined options to prevent unnecessary re-renders\n const memoizedOptions = useMemo(\n () => ({\n mutationFn: (config: FilteredRequestConfig<Paths, T>) =>\n this.fetcher(endpoint, config),\n ...options,\n }),\n // Dependencies: endpoint and options\n // Note: We stringify options to ensure stable reference\n // eslint-disable-next-line react-hooks/exhaustive-deps\n [endpoint, JSON.stringify(options)],\n );\n\n return useMutation<\n ExtractEndpointResponse<Paths, T>,\n Response,\n FilteredRequestConfig<Paths, T>\n >(memoizedOptions);\n }\n\n useInfiniteQuery<\n T extends QueryEndpoint<Paths>,\n TPageData = ExtractEndpointResponse<Paths, T>,\n TPageParam = unknown,\n >(\n endpoint: T,\n options: Omit<\n UseInfiniteQueryOptions<\n TPageData,\n Response,\n { pages: TPageData[]; pageParams: TPageParam[] },\n unknown[],\n TPageParam\n >,\n 'queryKey' | 'queryFn' | 'getNextPageParam' | 'initialPageParam'\n > & {\n getNextPageParam: (\n lastPage: TPageData,\n allPages: TPageData[],\n lastPageParam: TPageParam,\n allPageParams: TPageParam[],\n ) => TPageParam | undefined;\n initialPageParam: TPageParam;\n },\n config?: FilteredRequestConfig<Paths, T>,\n ) {\n const queryKey = this.buildQueryKey(endpoint, config);\n\n // Memoize the combined options to prevent unnecessary re-renders\n const memoizedOptions = useMemo(\n () => ({\n queryKey,\n queryFn: ({\n pageParam,\n }: QueryFunctionContext<unknown[], TPageParam>) => {\n let mergedConfig = config;\n if (pageParam !== undefined && config) {\n // If pageParam is an object, spread it into query\n const pageQuery =\n typeof pageParam === 'object' ? pageParam : { page: pageParam };\n mergedConfig = {\n ...config,\n query: { ...(config as any).query, ...pageQuery },\n } as any;\n } else if (pageParam !== undefined && !config) {\n // If pageParam is an object, use it directly, otherwise wrap in page property\n const pageQuery =\n typeof pageParam === 'object' ? pageParam : { page: pageParam };\n mergedConfig = { query: pageQuery } as any;\n }\n return this.fetcher(endpoint, mergedConfig) as Promise<TPageData>;\n },\n ...options,\n }),\n // Dependencies: queryKey, endpoint, config, and options\n // Note: We stringify config and options to ensure stable references\n // eslint-disable-next-line react-hooks/exhaustive-deps\n [\n queryKey.join(','),\n endpoint,\n JSON.stringify(config),\n JSON.stringify(options),\n ],\n );\n\n return useInfiniteQuery<\n TPageData,\n Response,\n { pages: TPageData[]; pageParams: TPageParam[] },\n unknown[],\n TPageParam\n >(memoizedOptions);\n }\n\n buildQueryKey<T extends TypedEndpoint<Paths>>(\n endpoint: T,\n config?: FilteredRequestConfig<Paths, T>,\n ): unknown[] {\n const key: unknown[] = [endpoint];\n\n if (config && 'params' in config && config.params) {\n key.push({ params: config.params });\n }\n\n if (config && 'query' in config && config.query) {\n key.push({ query: config.query });\n }\n\n return key;\n }\n\n /**\n * Invalidate queries for a specific endpoint with optional config\n * @param endpoint - The endpoint to invalidate (e.g., 'GET /users')\n * @param config - Optional params/query to match specific queries\n * @returns Promise that resolves when invalidation is complete\n */\n invalidateQueries<T extends QueryEndpoint<Paths>>(\n endpoint: T,\n config?: FilteredRequestConfig<Paths, T>,\n ): Promise<void> {\n const queryClient = this.getQueryClient();\n const queryKey = this.buildQueryKey(endpoint, config);\n\n return queryClient.invalidateQueries({\n queryKey,\n exact: !!config, // Use exact matching if config is provided\n });\n }\n\n /**\n * Invalidate all queries in the cache\n * @returns Promise that resolves when invalidation is complete\n */\n invalidateAllQueries(): Promise<void> {\n const queryClient = this.getQueryClient();\n return queryClient.invalidateQueries();\n }\n\n /**\n * Get the underlying QueryClient instance\n * @returns The QueryClient instance\n */\n getQueryClient(): QueryClient {\n if (this.queryClient) {\n return this.queryClient;\n }\n\n // If no query client was provided, try to get it from context\n // This will throw if used outside of QueryClientProvider\n throw new Error(\n 'No QueryClient set, please provide a QueryClient via the queryClient option or ensure you are within a QueryClientProvider',\n );\n }\n\n /**\n * Set the QueryClient instance\n * @param queryClient - The QueryClient instance to use\n */\n setQueryClient(queryClient: QueryClient): void {\n this.queryClient = queryClient;\n }\n}\n\nexport function createTypedQueryClient<Paths>(\n options?: TypedQueryClientOptions,\n) {\n return new TypedQueryClient<Paths>(options);\n}\n\n// Hook exports for convenience\nexport function useTypedQuery<Paths, T extends QueryEndpoint<Paths>>(\n client: TypedQueryClient<Paths>,\n endpoint: T,\n config?: FilteredRequestConfig<Paths, T>,\n options?: Omit<\n UseQueryOptions<ExtractEndpointResponse<Paths, T>, Response>,\n 'queryKey' | 'queryFn'\n >,\n) {\n return client.useQuery(endpoint, config, options);\n}\n\nexport function useTypedMutation<Paths, T extends MutationEndpoint<Paths>>(\n client: TypedQueryClient<Paths>,\n endpoint: T,\n options?: Omit<\n UseMutationOptions<\n ExtractEndpointResponse<Paths, T>,\n Response,\n FilteredRequestConfig<Paths, T>\n >,\n 'mutationFn'\n >,\n) {\n return client.useMutation(endpoint, options);\n}\n\nexport function useTypedInfiniteQuery<\n Paths,\n T extends QueryEndpoint<Paths>,\n TPageData = ExtractEndpointResponse<Paths, T>,\n TPageParam = unknown,\n>(\n client: TypedQueryClient<Paths>,\n endpoint: T,\n options: Omit<\n UseInfiniteQueryOptions<\n TPageData,\n Response,\n { pages: TPageData[]; pageParams: TPageParam[] },\n unknown[],\n TPageParam\n >,\n 'queryKey' | 'queryFn' | 'getNextPageParam' | 'initialPageParam'\n > & {\n getNextPageParam: (\n lastPage: TPageData,\n allPages: TPageData[],\n lastPageParam: TPageParam,\n allPageParams: TPageParam[],\n ) => TPageParam | undefined;\n initialPageParam: TPageParam;\n },\n config?: FilteredRequestConfig<Paths, T>,\n) {\n return client.useInfiniteQuery(endpoint, options, config);\n}\n\n/**\n * Hook to invalidate queries using the current QueryClient from context\n */\nexport function useTypedInvalidateQueries<Paths>(\n client: TypedQueryClient<Paths>,\n) {\n const queryClient = useQueryClient();\n\n return {\n /**\n * Invalidate queries for a specific endpoint\n */\n invalidateQueries: <T extends QueryEndpoint<Paths>>(\n endpoint: T,\n config?: FilteredRequestConfig<Paths, T>,\n ) => {\n const queryKey = client.buildQueryKey(endpoint, config);\n return queryClient.invalidateQueries({\n queryKey,\n exact: !!config,\n });\n },\n\n /**\n * Invalidate all queries\n */\n invalidateAllQueries: () => {\n return queryClient.invalidateQueries();\n },\n };\n}\n"],"mappings":";;;;;AA4BA,IAAa,mBAAb,MAAqC;CACnC,AAAQ;CACR,AAAQ;CAER,YAAYA,UAAmC,CAAE,GAAE;AACjD,OAAK,UAAU,mBAA0B,QAAQ;AACjD,OAAK,cAAc,QAAQ;CAC5B;CAED,SACEC,UACAC,QACAC,SAIA;EACA,MAAM,WAAW,KAAK,cAAc,UAAU,OAAO;EAGrD,MAAM,kBAAkB,QACtB,OAAO;GACL;GACA,SAAS,MAAM,KAAK,QAAQ,UAAU,OAAO;GAC7C,GAAG;EACJ,IAID;GACE,SAAS,KAAK,IAAI;GAClB;GACA,KAAK,UAAU,OAAO;GACtB,KAAK,UAAU,QAAQ;EACxB,EACF;AAED,SAAO,SACL,gBACD;CACF;CAED,YACEF,UACAG,SAQA;EAEA,MAAM,kBAAkB,QACtB,OAAO;GACL,YAAY,CAACC,WACX,KAAK,QAAQ,UAAU,OAAO;GAChC,GAAG;EACJ,IAID,CAAC,UAAU,KAAK,UAAU,QAAQ,AAAC,EACpC;AAED,SAAO,YAIL,gBAAgB;CACnB;CAED,iBAKEJ,UACAK,SAkBAJ,QACA;EACA,MAAM,WAAW,KAAK,cAAc,UAAU,OAAO;EAGrD,MAAM,kBAAkB,QACtB,OAAO;GACL;GACA,SAAS,CAAC,EACR,WAC4C,KAAK;IACjD,IAAI,eAAe;AACnB,QAAI,wBAA2B,QAAQ;KAErC,MAAM,mBACG,cAAc,WAAW,YAAY,EAAE,MAAM,UAAW;AACjE,oBAAe;MACb,GAAG;MACH,OAAO;OAAE,GAAI,OAAe;OAAO,GAAG;MAAW;KAClD;IACF,WAAU,yBAA4B,QAAQ;KAE7C,MAAM,mBACG,cAAc,WAAW,YAAY,EAAE,MAAM,UAAW;AACjE,oBAAe,EAAE,OAAO,UAAW;IACpC;AACD,WAAO,KAAK,QAAQ,UAAU,aAAa;GAC5C;GACD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O;AACvD,UAAO,YAAY,kBAAkB;IACnC;IACA,SAAS;GACV,EAAC;EACH;EAKD,sBAAsB,MAAM;AAC1B,UAAO,YAAY,mBAAmB;EACvC;CACF;AACF"}
|
|
1
|
+
{"version":3,"file":"react-query.mjs","names":["options: TypedQueryClientOptions","endpoint: T","config?: FilteredRequestConfig<Paths, T>","options?: Omit<\n\t\t\tUseQueryOptions<ExtractEndpointResponse<Paths, T>, Response>,\n\t\t\t'queryKey' | 'queryFn'\n\t\t>","options?: Omit<\n\t\t\tUseMutationOptions<\n\t\t\t\tExtractEndpointResponse<Paths, T>,\n\t\t\t\tResponse,\n\t\t\t\tFilteredRequestConfig<Paths, T>\n\t\t\t>,\n\t\t\t'mutationFn'\n\t\t>","config: FilteredRequestConfig<Paths, T>","options: Omit<\n\t\t\tUseInfiniteQueryOptions<\n\t\t\t\tTPageData,\n\t\t\t\tResponse,\n\t\t\t\t{ pages: TPageData[]; pageParams: TPageParam[] },\n\t\t\t\tunknown[],\n\t\t\t\tTPageParam\n\t\t\t>,\n\t\t\t'queryKey' | 'queryFn' | 'getNextPageParam' | 'initialPageParam'\n\t\t> & {\n\t\t\tgetNextPageParam: (\n\t\t\t\tlastPage: TPageData,\n\t\t\t\tallPages: TPageData[],\n\t\t\t\tlastPageParam: TPageParam,\n\t\t\t\tallPageParams: TPageParam[],\n\t\t\t) => TPageParam | undefined;\n\t\t\tinitialPageParam: TPageParam;\n\t\t}","key: unknown[]","queryClient: QueryClient","options?: TypedQueryClientOptions","client: TypedQueryClient<Paths>","options?: Omit<\n\t\tUseQueryOptions<ExtractEndpointResponse<Paths, T>, Response>,\n\t\t'queryKey' | 'queryFn'\n\t>","options?: Omit<\n\t\tUseMutationOptions<\n\t\t\tExtractEndpointResponse<Paths, T>,\n\t\t\tResponse,\n\t\t\tFilteredRequestConfig<Paths, T>\n\t\t>,\n\t\t'mutationFn'\n\t>","options: Omit<\n\t\tUseInfiniteQueryOptions<\n\t\t\tTPageData,\n\t\t\tResponse,\n\t\t\t{ pages: TPageData[]; pageParams: TPageParam[] },\n\t\t\tunknown[],\n\t\t\tTPageParam\n\t\t>,\n\t\t'queryKey' | 'queryFn' | 'getNextPageParam' | 'initialPageParam'\n\t> & {\n\t\tgetNextPageParam: (\n\t\t\tlastPage: TPageData,\n\t\t\tallPages: TPageData[],\n\t\t\tlastPageParam: TPageParam,\n\t\t\tallPageParams: TPageParam[],\n\t\t) => TPageParam | undefined;\n\t\tinitialPageParam: TPageParam;\n\t}"],"sources":["../src/react-query.ts"],"sourcesContent":["import type {\n\tQueryClient,\n\tQueryFunctionContext,\n\tUseInfiniteQueryOptions,\n\tUseMutationOptions,\n\tUseQueryOptions,\n} from '@tanstack/react-query';\nimport {\n\tuseInfiniteQuery,\n\tuseMutation,\n\tuseQuery,\n\tuseQueryClient,\n} from '@tanstack/react-query';\nimport { useMemo } from 'react';\nimport { createTypedFetcher } from './fetcher';\nimport type {\n\tExtractEndpointResponse,\n\tFetcherOptions,\n\tFilteredRequestConfig,\n\tMutationEndpoint,\n\tQueryEndpoint,\n\tTypedEndpoint,\n} from './types';\n\nexport interface TypedQueryClientOptions extends FetcherOptions {\n\tqueryClient?: QueryClient;\n}\n\nexport class TypedQueryClient<Paths> {\n\tprivate fetcher: ReturnType<typeof createTypedFetcher<Paths>>;\n\tprivate queryClient?: QueryClient;\n\n\tconstructor(options: TypedQueryClientOptions = {}) {\n\t\tthis.fetcher = createTypedFetcher<Paths>(options);\n\t\tthis.queryClient = options.queryClient;\n\t}\n\n\tuseQuery<T extends QueryEndpoint<Paths>>(\n\t\tendpoint: T,\n\t\tconfig?: FilteredRequestConfig<Paths, T>,\n\t\toptions?: Omit<\n\t\t\tUseQueryOptions<ExtractEndpointResponse<Paths, T>, Response>,\n\t\t\t'queryKey' | 'queryFn'\n\t\t>,\n\t) {\n\t\tconst queryKey = this.buildQueryKey(endpoint, config);\n\n\t\t// Memoize the combined options to prevent unnecessary re-renders\n\t\tconst memoizedOptions = useMemo(\n\t\t\t() => ({\n\t\t\t\tqueryKey,\n\t\t\t\tqueryFn: () => this.fetcher(endpoint, config),\n\t\t\t\t...options,\n\t\t\t}),\n\t\t\t// Dependencies: queryKey, endpoint, config, and options\n\t\t\t// Note: We stringify config and options to ensure stable references\n\t\t\t// eslint-disable-next-line react-hooks/exhaustive-deps\n\t\t\t[\n\t\t\t\tqueryKey.join(','),\n\t\t\t\tendpoint,\n\t\t\t\tJSON.stringify(config),\n\t\t\t\tJSON.stringify(options),\n\t\t\t],\n\t\t);\n\n\t\treturn useQuery<ExtractEndpointResponse<Paths, T>, Response>(\n\t\t\tmemoizedOptions,\n\t\t);\n\t}\n\n\tuseMutation<T extends MutationEndpoint<Paths>>(\n\t\tendpoint: T,\n\t\toptions?: Omit<\n\t\t\tUseMutationOptions<\n\t\t\t\tExtractEndpointResponse<Paths, T>,\n\t\t\t\tResponse,\n\t\t\t\tFilteredRequestConfig<Paths, T>\n\t\t\t>,\n\t\t\t'mutationFn'\n\t\t>,\n\t) {\n\t\t// Memoize the combined options to prevent unnecessary re-renders\n\t\tconst memoizedOptions = useMemo(\n\t\t\t() => ({\n\t\t\t\tmutationFn: (config: FilteredRequestConfig<Paths, T>) =>\n\t\t\t\t\tthis.fetcher(endpoint, config),\n\t\t\t\t...options,\n\t\t\t}),\n\t\t\t// Dependencies: endpoint and options\n\t\t\t// Note: We stringify options to ensure stable reference\n\t\t\t// eslint-disable-next-line react-hooks/exhaustive-deps\n\t\t\t[endpoint, JSON.stringify(options)],\n\t\t);\n\n\t\treturn useMutation<\n\t\t\tExtractEndpointResponse<Paths, T>,\n\t\t\tResponse,\n\t\t\tFilteredRequestConfig<Paths, T>\n\t\t>(memoizedOptions);\n\t}\n\n\tuseInfiniteQuery<\n\t\tT extends QueryEndpoint<Paths>,\n\t\tTPageData = ExtractEndpointResponse<Paths, T>,\n\t\tTPageParam = unknown,\n\t>(\n\t\tendpoint: T,\n\t\toptions: Omit<\n\t\t\tUseInfiniteQueryOptions<\n\t\t\t\tTPageData,\n\t\t\t\tResponse,\n\t\t\t\t{ pages: TPageData[]; pageParams: TPageParam[] },\n\t\t\t\tunknown[],\n\t\t\t\tTPageParam\n\t\t\t>,\n\t\t\t'queryKey' | 'queryFn' | 'getNextPageParam' | 'initialPageParam'\n\t\t> & {\n\t\t\tgetNextPageParam: (\n\t\t\t\tlastPage: TPageData,\n\t\t\t\tallPages: TPageData[],\n\t\t\t\tlastPageParam: TPageParam,\n\t\t\t\tallPageParams: TPageParam[],\n\t\t\t) => TPageParam | undefined;\n\t\t\tinitialPageParam: TPageParam;\n\t\t},\n\t\tconfig?: FilteredRequestConfig<Paths, T>,\n\t) {\n\t\tconst queryKey = this.buildQueryKey(endpoint, config);\n\n\t\t// Memoize the combined options to prevent unnecessary re-renders\n\t\tconst memoizedOptions = useMemo(\n\t\t\t() => ({\n\t\t\t\tqueryKey,\n\t\t\t\tqueryFn: ({\n\t\t\t\t\tpageParam,\n\t\t\t\t}: QueryFunctionContext<unknown[], TPageParam>) => {\n\t\t\t\t\tlet mergedConfig = config;\n\t\t\t\t\tif (pageParam !== undefined && config) {\n\t\t\t\t\t\t// If pageParam is an object, spread it into query\n\t\t\t\t\t\tconst pageQuery =\n\t\t\t\t\t\t\ttypeof pageParam === 'object' ? pageParam : { page: pageParam };\n\t\t\t\t\t\tmergedConfig = {\n\t\t\t\t\t\t\t...config,\n\t\t\t\t\t\t\tquery: { ...(config as any).query, ...pageQuery },\n\t\t\t\t\t\t} as any;\n\t\t\t\t\t} else if (pageParam !== undefined && !config) {\n\t\t\t\t\t\t// If pageParam is an object, use it directly, otherwise wrap in page property\n\t\t\t\t\t\tconst pageQuery =\n\t\t\t\t\t\t\ttypeof pageParam === 'object' ? pageParam : { page: pageParam };\n\t\t\t\t\t\tmergedConfig = { query: pageQuery } as any;\n\t\t\t\t\t}\n\t\t\t\t\treturn this.fetcher(endpoint, mergedConfig) as Promise<TPageData>;\n\t\t\t\t},\n\t\t\t\t...options,\n\t\t\t}),\n\t\t\t// Dependencies: queryKey, endpoint, config, and options\n\t\t\t// Note: We stringify config and options to ensure stable references\n\t\t\t// eslint-disable-next-line react-hooks/exhaustive-deps\n\t\t\t[\n\t\t\t\tqueryKey.join(','),\n\t\t\t\tendpoint,\n\t\t\t\tJSON.stringify(config),\n\t\t\t\tJSON.stringify(options),\n\t\t\t],\n\t\t);\n\n\t\treturn useInfiniteQuery<\n\t\t\tTPageData,\n\t\t\tResponse,\n\t\t\t{ pages: TPageData[]; pageParams: TPageParam[] },\n\t\t\tunknown[],\n\t\t\tTPageParam\n\t\t>(memoizedOptions);\n\t}\n\n\tbuildQueryKey<T extends TypedEndpoint<Paths>>(\n\t\tendpoint: T,\n\t\tconfig?: FilteredRequestConfig<Paths, T>,\n\t): unknown[] {\n\t\tconst key: unknown[] = [endpoint];\n\n\t\tif (config && 'params' in config && config.params) {\n\t\t\tkey.push({ params: config.params });\n\t\t}\n\n\t\tif (config && 'query' in config && config.query) {\n\t\t\tkey.push({ query: config.query });\n\t\t}\n\n\t\treturn key;\n\t}\n\n\t/**\n\t * Invalidate queries for a specific endpoint with optional config\n\t * @param endpoint - The endpoint to invalidate (e.g., 'GET /users')\n\t * @param config - Optional params/query to match specific queries\n\t * @returns Promise that resolves when invalidation is complete\n\t */\n\tinvalidateQueries<T extends QueryEndpoint<Paths>>(\n\t\tendpoint: T,\n\t\tconfig?: FilteredRequestConfig<Paths, T>,\n\t): Promise<void> {\n\t\tconst queryClient = this.getQueryClient();\n\t\tconst queryKey = this.buildQueryKey(endpoint, config);\n\n\t\treturn queryClient.invalidateQueries({\n\t\t\tqueryKey,\n\t\t\texact: !!config, // Use exact matching if config is provided\n\t\t});\n\t}\n\n\t/**\n\t * Invalidate all queries in the cache\n\t * @returns Promise that resolves when invalidation is complete\n\t */\n\tinvalidateAllQueries(): Promise<void> {\n\t\tconst queryClient = this.getQueryClient();\n\t\treturn queryClient.invalidateQueries();\n\t}\n\n\t/**\n\t * Get the underlying QueryClient instance\n\t * @returns The QueryClient instance\n\t */\n\tgetQueryClient(): QueryClient {\n\t\tif (this.queryClient) {\n\t\t\treturn this.queryClient;\n\t\t}\n\n\t\t// If no query client was provided, try to get it from context\n\t\t// This will throw if used outside of QueryClientProvider\n\t\tthrow new Error(\n\t\t\t'No QueryClient set, please provide a QueryClient via the queryClient option or ensure you are within a QueryClientProvider',\n\t\t);\n\t}\n\n\t/**\n\t * Set the QueryClient instance\n\t * @param queryClient - The QueryClient instance to use\n\t */\n\tsetQueryClient(queryClient: QueryClient): void {\n\t\tthis.queryClient = queryClient;\n\t}\n}\n\nexport function createTypedQueryClient<Paths>(\n\toptions?: TypedQueryClientOptions,\n) {\n\treturn new TypedQueryClient<Paths>(options);\n}\n\n// Hook exports for convenience\nexport function useTypedQuery<Paths, T extends QueryEndpoint<Paths>>(\n\tclient: TypedQueryClient<Paths>,\n\tendpoint: T,\n\tconfig?: FilteredRequestConfig<Paths, T>,\n\toptions?: Omit<\n\t\tUseQueryOptions<ExtractEndpointResponse<Paths, T>, Response>,\n\t\t'queryKey' | 'queryFn'\n\t>,\n) {\n\treturn client.useQuery(endpoint, config, options);\n}\n\nexport function useTypedMutation<Paths, T extends MutationEndpoint<Paths>>(\n\tclient: TypedQueryClient<Paths>,\n\tendpoint: T,\n\toptions?: Omit<\n\t\tUseMutationOptions<\n\t\t\tExtractEndpointResponse<Paths, T>,\n\t\t\tResponse,\n\t\t\tFilteredRequestConfig<Paths, T>\n\t\t>,\n\t\t'mutationFn'\n\t>,\n) {\n\treturn client.useMutation(endpoint, options);\n}\n\nexport function useTypedInfiniteQuery<\n\tPaths,\n\tT extends QueryEndpoint<Paths>,\n\tTPageData = ExtractEndpointResponse<Paths, T>,\n\tTPageParam = unknown,\n>(\n\tclient: TypedQueryClient<Paths>,\n\tendpoint: T,\n\toptions: Omit<\n\t\tUseInfiniteQueryOptions<\n\t\t\tTPageData,\n\t\t\tResponse,\n\t\t\t{ pages: TPageData[]; pageParams: TPageParam[] },\n\t\t\tunknown[],\n\t\t\tTPageParam\n\t\t>,\n\t\t'queryKey' | 'queryFn' | 'getNextPageParam' | 'initialPageParam'\n\t> & {\n\t\tgetNextPageParam: (\n\t\t\tlastPage: TPageData,\n\t\t\tallPages: TPageData[],\n\t\t\tlastPageParam: TPageParam,\n\t\t\tallPageParams: TPageParam[],\n\t\t) => TPageParam | undefined;\n\t\tinitialPageParam: TPageParam;\n\t},\n\tconfig?: FilteredRequestConfig<Paths, T>,\n) {\n\treturn client.useInfiniteQuery(endpoint, options, config);\n}\n\n/**\n * Hook to invalidate queries using the current QueryClient from context\n */\nexport function useTypedInvalidateQueries<Paths>(\n\tclient: TypedQueryClient<Paths>,\n) {\n\tconst queryClient = useQueryClient();\n\n\treturn {\n\t\t/**\n\t\t * Invalidate queries for a specific endpoint\n\t\t */\n\t\tinvalidateQueries: <T extends QueryEndpoint<Paths>>(\n\t\t\tendpoint: T,\n\t\t\tconfig?: FilteredRequestConfig<Paths, T>,\n\t\t) => {\n\t\t\tconst queryKey = client.buildQueryKey(endpoint, config);\n\t\t\treturn queryClient.invalidateQueries({\n\t\t\t\tqueryKey,\n\t\t\t\texact: !!config,\n\t\t\t});\n\t\t},\n\n\t\t/**\n\t\t * Invalidate all queries\n\t\t */\n\t\tinvalidateAllQueries: () => {\n\t\t\treturn queryClient.invalidateQueries();\n\t\t},\n\t};\n}\n"],"mappings":";;;;;AA4BA,IAAa,mBAAb,MAAqC;CACpC,AAAQ;CACR,AAAQ;CAER,YAAYA,UAAmC,CAAE,GAAE;AAClD,OAAK,UAAU,mBAA0B,QAAQ;AACjD,OAAK,cAAc,QAAQ;CAC3B;CAED,SACCC,UACAC,QACAC,SAIC;EACD,MAAM,WAAW,KAAK,cAAc,UAAU,OAAO;EAGrD,MAAM,kBAAkB,QACvB,OAAO;GACN;GACA,SAAS,MAAM,KAAK,QAAQ,UAAU,OAAO;GAC7C,GAAG;EACH,IAID;GACC,SAAS,KAAK,IAAI;GAClB;GACA,KAAK,UAAU,OAAO;GACtB,KAAK,UAAU,QAA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AO,YAAY,kBAAkB;GACpC;GACA,SAAS;EACT,EAAC;CACF;;;;;CAMD,uBAAsC;EACrC,MAAM,cAAc,KAAK,gBAAgB;AACzC,SAAO,YAAY,mBAAmB;CACtC;;;;;CAMD,iBAA8B;AAC7B,MAAI,KAAK,YACR,QAAO,KAAK;AAKb,QAAM,IAAI,MACT;CAED;;;;;CAMD,eAAeM,aAAgC;AAC9C,OAAK,cAAc;CACnB;AACD;AAED,SAAgB,uBACfC,SACC;AACD,QAAO,IAAI,iBAAwB;AACnC;AAGD,SAAgB,cACfC,QACAT,UACAC,QACAS,SAIC;AACD,QAAO,OAAO,SAAS,UAAU,QAAQ,QAAQ;AACjD;AAED,SAAgB,iBACfD,QACAT,UACAW,SAQC;AACD,QAAO,OAAO,YAAY,UAAU,QAAQ;AAC5C;AAED,SAAgB,sBAMfF,QACAT,UACAY,SAkBAX,QACC;AACD,QAAO,OAAO,iBAAiB,UAAU,SAAS,OAAO;AACzD;;;;AAKD,SAAgB,0BACfQ,QACC;CACD,MAAM,cAAc,gBAAgB;AAEpC,QAAO;EAIN,mBAAmB,CAClBT,UACAC,WACI;GACJ,MAAM,WAAW,OAAO,cAAc,UAAU,OAAO;AACvD,UAAO,YAAY,kBAAkB;IACpC;IACA,SAAS;GACT,EAAC;EACF;EAKD,sBAAsB,MAAM;AAC3B,UAAO,YAAY,mBAAmB;EACtC;CACD;AACD"}
|
|
@@ -44,7 +44,7 @@ type RequestConfig<Paths, Route extends OpenAPIRoutes<Paths>, Method extends Ext
|
|
|
44
44
|
};
|
|
45
45
|
type EndpointString = `${Uppercase<string>} ${string}`;
|
|
46
46
|
type ValidEndpoint<Paths> = { [Route in keyof Paths]: { [Method in Extract<keyof Paths[Route], HttpMethod>]: `${Uppercase<string & Method>} ${string & Route}` }[Extract<keyof Paths[Route], HttpMethod>] }[keyof Paths];
|
|
47
|
-
type TypedEndpoint<Paths> = ValidEndpoint<Paths> extends infer E ? E extends string ? E : never : never;
|
|
47
|
+
type TypedEndpoint<Paths> = ValidEndpoint<Paths> extends infer E ? (E extends string ? E : never) : never;
|
|
48
48
|
type FilterEndpointByMethod<Paths, Method extends string> = ValidEndpoint<Paths> extends infer E ? E extends `${Method} ${string}` ? E : never : never;
|
|
49
49
|
type QueryEndpoint<Paths> = FilterEndpointByMethod<Paths, 'GET'>;
|
|
50
50
|
type MutationEndpoint<Paths> = FilterEndpointByMethod<Paths, 'POST'> | FilterEndpointByMethod<Paths, 'PATCH'> | FilterEndpointByMethod<Paths, 'PUT'> | FilterEndpointByMethod<Paths, 'DELETE'>;
|
|
@@ -62,13 +62,15 @@ type ExtractEndpointConfig<Paths, T extends EndpointString> = T extends `${infer
|
|
|
62
62
|
*/
|
|
63
63
|
type FilteredRequestConfig<Paths, T extends EndpointString> = T extends `${infer Method} ${infer Route}` ? Route extends OpenAPIRoutes<Paths> ? Lowercase<Method> extends ExtractMethod<Paths, Route> ? BuildRequestConfig<ExtractPathParams<Paths, Route>, ExtractQueryParams<Paths, Route, Lowercase<Method>>, ExtractRequestBody<Paths, Route, Lowercase<Method>>> : never : never : never;
|
|
64
64
|
/**
|
|
65
|
-
* Helper to build request config with correct required/optional fields
|
|
65
|
+
* Helper to build request config with correct required/optional fields.
|
|
66
|
+
* Uses [T] extends [never] pattern to prevent distribution over union types,
|
|
67
|
+
* which would cause the entire type to become `never`.
|
|
66
68
|
*/
|
|
67
|
-
type BuildRequestConfig<TParams, TQuery, TBody> = SimplifyIntersection<(TParams extends never ? {} : {
|
|
69
|
+
type BuildRequestConfig<TParams, TQuery, TBody> = SimplifyIntersection<([TParams] extends [never] ? {} : {
|
|
68
70
|
params: TParams;
|
|
69
|
-
}) & (TBody extends never ? {} : {
|
|
71
|
+
}) & ([TBody] extends [never] ? {} : {
|
|
70
72
|
body: TBody;
|
|
71
|
-
}) & (TQuery extends never ? {} : {
|
|
73
|
+
}) & ([TQuery] extends [never] ? {} : {
|
|
72
74
|
query?: TQuery;
|
|
73
75
|
}) & {
|
|
74
76
|
headers?: Record<string, string>;
|
|
@@ -96,4 +98,4 @@ interface FetcherOptions {
|
|
|
96
98
|
}
|
|
97
99
|
//#endregion
|
|
98
100
|
export { EndpointString, ExtractEndpointConfig, ExtractEndpointResponse, ExtractMethod, ExtractPathParams, ExtractQueryParams, ExtractRequestBody, ExtractResponse, FetcherOptions, FilterEndpointByMethod, FilteredRequestConfig, IsConfigRequired, MutationEndpoint, OpenAPIRoutes, ParseEndpoint, QueryEndpoint, RequestConfig, TypedApiFunction, TypedEndpoint, ValidEndpoint };
|
|
99
|
-
//# sourceMappingURL=types-
|
|
101
|
+
//# sourceMappingURL=types-4K4N-Fl1.d.cts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types-4K4N-Fl1.d.cts","names":[],"sources":["../src/types.ts"],"sourcesContent":[],"mappings":";KAAY,6BAA6B;AAAzC,KAEK,UAAA,GAFO,KAAa,GAAA,MAAgB,GAAA,KAAK,GAAA,OAAA,GAAA,QAAA,GAAA,MAAA,GAAA,SAAA;AAEzC,KASO,aATG,CAAA,KAAA,EAAA,cASgC,aAThC,CAS8C,KAT9C,CAAA,CAAA,GASwD,OATxD,CAAA,MAUR,KAVQ,CAUF,KAVE,CAAA,EAWd,UAXc,CAAA;AASH,KAKA,iBALa,CAAA,KAAA,EAAA,cAOV,aAPU,CAOI,KAPJ,CAAA,CAAA,GAQrB,KARqB,CAQf,KARe,CAAA,SAAA;EAAA,UAAA,CAAA,EAAA;IAAoC,IAAA,CAAA,EAAA,KAAA,EAAA;EAAK,CAAA;CAAN,GAWzD,CAXyD,GACrD,KAAA;AAAM,KAaD,kBAbC,CAAA,KAAA,EAAA,cAeE,aAfF,CAegB,KAfhB,CAAA,EAAA,eAgBG,aAhBH,CAgBiB,KAhBjB,EAgBwB,KAhBxB,CAAA,CAAA,GAiBT,KAjBS,CAiBH,KAjBG,CAAA,CAiBI,MAjBJ,CAAA,SAAA;EAAK,UACjB,CAAA,EAAA;IAFsE,KAAA,CAAA,EAAA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QA7HvB,GA6HkC,OA7HlC,CA6H0C,QA7H1C,CAAA;EAAK,OAAnB,CAAA,EAAA,CAAA,KAAA,EA8HkB,KA9HlB,EAAA,GAAA,IAAA,GA8HmC,OA9HnC,CAAA,IAAA,CAAA;EAAa,KAA2B,CAAA,EAAA,OA+HzB,KA/HyB"}
|
|
@@ -44,7 +44,7 @@ type RequestConfig<Paths, Route extends OpenAPIRoutes<Paths>, Method extends Ext
|
|
|
44
44
|
};
|
|
45
45
|
type EndpointString = `${Uppercase<string>} ${string}`;
|
|
46
46
|
type ValidEndpoint<Paths> = { [Route in keyof Paths]: { [Method in Extract<keyof Paths[Route], HttpMethod>]: `${Uppercase<string & Method>} ${string & Route}` }[Extract<keyof Paths[Route], HttpMethod>] }[keyof Paths];
|
|
47
|
-
type TypedEndpoint<Paths> = ValidEndpoint<Paths> extends infer E ? E extends string ? E : never : never;
|
|
47
|
+
type TypedEndpoint<Paths> = ValidEndpoint<Paths> extends infer E ? (E extends string ? E : never) : never;
|
|
48
48
|
type FilterEndpointByMethod<Paths, Method extends string> = ValidEndpoint<Paths> extends infer E ? E extends `${Method} ${string}` ? E : never : never;
|
|
49
49
|
type QueryEndpoint<Paths> = FilterEndpointByMethod<Paths, 'GET'>;
|
|
50
50
|
type MutationEndpoint<Paths> = FilterEndpointByMethod<Paths, 'POST'> | FilterEndpointByMethod<Paths, 'PATCH'> | FilterEndpointByMethod<Paths, 'PUT'> | FilterEndpointByMethod<Paths, 'DELETE'>;
|
|
@@ -62,13 +62,15 @@ type ExtractEndpointConfig<Paths, T extends EndpointString> = T extends `${infer
|
|
|
62
62
|
*/
|
|
63
63
|
type FilteredRequestConfig<Paths, T extends EndpointString> = T extends `${infer Method} ${infer Route}` ? Route extends OpenAPIRoutes<Paths> ? Lowercase<Method> extends ExtractMethod<Paths, Route> ? BuildRequestConfig<ExtractPathParams<Paths, Route>, ExtractQueryParams<Paths, Route, Lowercase<Method>>, ExtractRequestBody<Paths, Route, Lowercase<Method>>> : never : never : never;
|
|
64
64
|
/**
|
|
65
|
-
* Helper to build request config with correct required/optional fields
|
|
65
|
+
* Helper to build request config with correct required/optional fields.
|
|
66
|
+
* Uses [T] extends [never] pattern to prevent distribution over union types,
|
|
67
|
+
* which would cause the entire type to become `never`.
|
|
66
68
|
*/
|
|
67
|
-
type BuildRequestConfig<TParams, TQuery, TBody> = SimplifyIntersection<(TParams extends never ? {} : {
|
|
69
|
+
type BuildRequestConfig<TParams, TQuery, TBody> = SimplifyIntersection<([TParams] extends [never] ? {} : {
|
|
68
70
|
params: TParams;
|
|
69
|
-
}) & (TBody extends never ? {} : {
|
|
71
|
+
}) & ([TBody] extends [never] ? {} : {
|
|
70
72
|
body: TBody;
|
|
71
|
-
}) & (TQuery extends never ? {} : {
|
|
73
|
+
}) & ([TQuery] extends [never] ? {} : {
|
|
72
74
|
query?: TQuery;
|
|
73
75
|
}) & {
|
|
74
76
|
headers?: Record<string, string>;
|
|
@@ -96,4 +98,4 @@ interface FetcherOptions {
|
|
|
96
98
|
}
|
|
97
99
|
//#endregion
|
|
98
100
|
export { EndpointString, ExtractEndpointConfig, ExtractEndpointResponse, ExtractMethod, ExtractPathParams, ExtractQueryParams, ExtractRequestBody, ExtractResponse, FetcherOptions, FilterEndpointByMethod, FilteredRequestConfig, IsConfigRequired, MutationEndpoint, OpenAPIRoutes, ParseEndpoint, QueryEndpoint, RequestConfig, TypedApiFunction, TypedEndpoint, ValidEndpoint };
|
|
99
|
-
//# sourceMappingURL=types-
|
|
101
|
+
//# sourceMappingURL=types-hhkZWjQn.d.mts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types-hhkZWjQn.d.mts","names":[],"sources":["../src/types.ts"],"sourcesContent":[],"mappings":";KAAY,6BAA6B;AAAzC,KAEK,UAAA,GAFO,KAAa,GAAA,MAAgB,GAAA,KAAK,GAAA,OAAA,GAAA,QAAA,GAAA,MAAA,GAAA,SAAA;AAEzC,KASO,aATG,CAAA,KAAA,EAAA,c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,CAzH/B,CAAA,SAAA,IAAA,GAAA,CAAA,MAAA,EA0HU,qBA1HV,CA0HgC,KA1HhC,EA0HuC,CA1HvC,CAAA,CAAA,GAAA,CAAA,MAAA,GA2HW,qBA3HX,CA2HiC,KA3HjC,EA2HwC,CA3HxC,CAAA,CAAA,EAAA,GA4HE,OA5HF,CA4HU,uBA5HV,CA4HkC,KA5HlC,EA4HyC,CA5HzC,CAAA,CAAA;AACK,UA6HS,cAAA,CA7HT;EAAK,OAAA,CAAA,EAAA,MAAA;EAGD,OAAA,CAAA,EA4HD,MA5Hc,CAAA,MAAA,EAAA,MAAA,CAAA;EAAA,SAAA,CAAA,EAAA,CAAA,MAAA,EA6HH,WA7HG,EAAA,GA6Ha,WA7Hb,GA6H2B,OA7H3B,CA6HmC,WA7HnC,CAAA;EAAA,UACV,CAAA,EAAA,CAAA,QAAA,EA6HU,QA7HV,EAAA,GA6HuB,QA7HvB,GA6HkC,OA7HlC,CA6H0C,QA7H1C,CAAA;EAAK,OAAnB,CAAA,EAAA,CAAA,KAAA,EA8HkB,KA9HlB,EAAA,GAAA,IAAA,GA8HmC,OA9HnC,CAAA,IAAA,CAAA;EAAa,KAA2B,CAAA,EAAA,OA+HzB,KA/HyB"}
|
package/dist/types.d.cts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { EndpointString, ExtractEndpointConfig, ExtractEndpointResponse, ExtractMethod, ExtractPathParams, ExtractQueryParams, ExtractRequestBody, ExtractResponse, FetcherOptions, FilterEndpointByMethod, FilteredRequestConfig, IsConfigRequired, MutationEndpoint, OpenAPIRoutes, ParseEndpoint, QueryEndpoint, RequestConfig, TypedApiFunction, TypedEndpoint, ValidEndpoint } from "./types-
|
|
1
|
+
import { EndpointString, ExtractEndpointConfig, ExtractEndpointResponse, ExtractMethod, ExtractPathParams, ExtractQueryParams, ExtractRequestBody, ExtractResponse, FetcherOptions, FilterEndpointByMethod, FilteredRequestConfig, IsConfigRequired, MutationEndpoint, OpenAPIRoutes, ParseEndpoint, QueryEndpoint, RequestConfig, TypedApiFunction, TypedEndpoint, ValidEndpoint } from "./types-4K4N-Fl1.cjs";
|
|
2
2
|
export { EndpointString, ExtractEndpointConfig, ExtractEndpointResponse, ExtractMethod, ExtractPathParams, ExtractQueryParams, ExtractRequestBody, ExtractResponse, FetcherOptions, FilterEndpointByMethod, FilteredRequestConfig, IsConfigRequired, MutationEndpoint, OpenAPIRoutes, ParseEndpoint, QueryEndpoint, RequestConfig, TypedApiFunction, TypedEndpoint, ValidEndpoint };
|
package/dist/types.d.mts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { EndpointString, ExtractEndpointConfig, ExtractEndpointResponse, ExtractMethod, ExtractPathParams, ExtractQueryParams, ExtractRequestBody, ExtractResponse, FetcherOptions, FilterEndpointByMethod, FilteredRequestConfig, IsConfigRequired, MutationEndpoint, OpenAPIRoutes, ParseEndpoint, QueryEndpoint, RequestConfig, TypedApiFunction, TypedEndpoint, ValidEndpoint } from "./types-
|
|
1
|
+
import { EndpointString, ExtractEndpointConfig, ExtractEndpointResponse, ExtractMethod, ExtractPathParams, ExtractQueryParams, ExtractRequestBody, ExtractResponse, FetcherOptions, FilterEndpointByMethod, FilteredRequestConfig, IsConfigRequired, MutationEndpoint, OpenAPIRoutes, ParseEndpoint, QueryEndpoint, RequestConfig, TypedApiFunction, TypedEndpoint, ValidEndpoint } from "./types-hhkZWjQn.mjs";
|
|
2
2
|
export { EndpointString, ExtractEndpointConfig, ExtractEndpointResponse, ExtractMethod, ExtractPathParams, ExtractQueryParams, ExtractRequestBody, ExtractResponse, FetcherOptions, FilterEndpointByMethod, FilteredRequestConfig, IsConfigRequired, MutationEndpoint, OpenAPIRoutes, ParseEndpoint, QueryEndpoint, RequestConfig, TypedApiFunction, TypedEndpoint, ValidEndpoint };
|