diff --git a/package.json b/package.json index 3364766a..691b2446 100644 --- a/package.json +++ b/package.json @@ -37,7 +37,7 @@ "swagger" ], "dependencies": { - "aspida": "^0.16.0", + "aspida": "^0.18.0", "swagger-parser": "^9.0.1", "swagger2openapi": "^6.0.3" }, diff --git a/samples/externals/$api.ts b/samples/externals/$api.ts index 4ac2a64d..7151f4bb 100644 --- a/samples/externals/$api.ts +++ b/samples/externals/$api.ts @@ -21,62 +21,62 @@ const api = (client: AspidaClient) => { get: (option?: { config?: T }) => client.fetch(prefix, `/users/${val0}/orders/${val1}`, 'GET', option).json(), $get: async (option?: { config?: T }) => - (await client.fetch(prefix, `/users/${val0}/orders/${val1}`, 'GET', option).json()).data + (await client.fetch(prefix, `/users/${val0}/orders/${val1}`, 'GET', option).json()).body }), purchase: { invoice: { - post: (option: { data: Methods2['post']['reqBody'], config?: T }) => + post: (option: { body: Methods2['post']['reqBody'], config?: T }) => client.fetch(prefix, `/users/${val0}/orders/purchase/invoice`, 'POST', option).json(), - $post: async (option: { data: Methods2['post']['reqBody'], config?: T }) => - (await client.fetch(prefix, `/users/${val0}/orders/purchase/invoice`, 'POST', option).json()).data + $post: async (option: { body: Methods2['post']['reqBody'], config?: T }) => + (await client.fetch(prefix, `/users/${val0}/orders/purchase/invoice`, 'POST', option).json()).body }, wallet: { - post: (option: { data: Methods3['post']['reqBody'], config?: T }) => + post: (option: { body: Methods3['post']['reqBody'], config?: T }) => client.fetch(prefix, `/users/${val0}/orders/purchase/wallet`, 'POST', option).json(), - $post: async (option: { data: Methods3['post']['reqBody'], config?: T }) => - (await client.fetch(prefix, `/users/${val0}/orders/purchase/wallet`, 'POST', option).json()).data + $post: async (option: { body: Methods3['post']['reqBody'], config?: T }) => + (await client.fetch(prefix, `/users/${val0}/orders/purchase/wallet`, 'POST', option).json()).body } }, unsubscribe: { - post: (option: { data: Methods4['post']['reqBody'], config?: T }) => + post: (option: { body: Methods4['post']['reqBody'], config?: T }) => client.fetch(prefix, `/users/${val0}/orders/unsubscribe`, 'POST', option).json(), - $post: async (option: { data: Methods4['post']['reqBody'], config?: T }) => - (await client.fetch(prefix, `/users/${val0}/orders/unsubscribe`, 'POST', option).json()).data + $post: async (option: { body: Methods4['post']['reqBody'], config?: T }) => + (await client.fetch(prefix, `/users/${val0}/orders/unsubscribe`, 'POST', option).json()).body }, update: { renew: { - post: (option: { data: Methods5['post']['reqBody'], config?: T }) => + post: (option: { body: Methods5['post']['reqBody'], config?: T }) => client.fetch(prefix, `/users/${val0}/orders/update/renew`, 'POST', option).json(), - $post: async (option: { data: Methods5['post']['reqBody'], config?: T }) => - (await client.fetch(prefix, `/users/${val0}/orders/update/renew`, 'POST', option).json()).data + $post: async (option: { body: Methods5['post']['reqBody'], config?: T }) => + (await client.fetch(prefix, `/users/${val0}/orders/update/renew`, 'POST', option).json()).body } }, get: (option?: { query?: Methods0['get']['query'], config?: T }) => client.fetch(prefix, `/users/${val0}/orders`, 'GET', option).json(), $get: async (option?: { query?: Methods0['get']['query'], config?: T }) => - (await client.fetch(prefix, `/users/${val0}/orders`, 'GET', option).json()).data + (await client.fetch(prefix, `/users/${val0}/orders`, 'GET', option).json()).body }, phone_numbers: { _phone_number: (val2: string) => ({ orders: { purchase: { invoice: { - post: (option: { data: Methods7['post']['reqBody'], config?: T }) => + post: (option: { body: Methods7['post']['reqBody'], config?: T }) => client.fetch(prefix, `/users/${val0}/phone-numbers/${val2}/orders/purchase/invoice`, 'POST', option).json(), - $post: async (option: { data: Methods7['post']['reqBody'], config?: T }) => - (await client.fetch(prefix, `/users/${val0}/phone-numbers/${val2}/orders/purchase/invoice`, 'POST', option).json()).data + $post: async (option: { body: Methods7['post']['reqBody'], config?: T }) => + (await client.fetch(prefix, `/users/${val0}/phone-numbers/${val2}/orders/purchase/invoice`, 'POST', option).json()).body }, wallet: { - post: (option: { data: Methods8['post']['reqBody'], config?: T }) => + post: (option: { body: Methods8['post']['reqBody'], config?: T }) => client.fetch(prefix, `/users/${val0}/phone-numbers/${val2}/orders/purchase/wallet`, 'POST', option).json(), - $post: async (option: { data: Methods8['post']['reqBody'], config?: T }) => - (await client.fetch(prefix, `/users/${val0}/phone-numbers/${val2}/orders/purchase/wallet`, 'POST', option).json()).data + $post: async (option: { body: Methods8['post']['reqBody'], config?: T }) => + (await client.fetch(prefix, `/users/${val0}/phone-numbers/${val2}/orders/purchase/wallet`, 'POST', option).json()).body } }, get: (option?: { config?: T }) => client.fetch(prefix, `/users/${val0}/phone-numbers/${val2}/orders`, 'GET', option).json(), $get: async (option?: { config?: T }) => - (await client.fetch(prefix, `/users/${val0}/phone-numbers/${val2}/orders`, 'GET', option).json()).data + (await client.fetch(prefix, `/users/${val0}/phone-numbers/${val2}/orders`, 'GET', option).json()).body } }) } diff --git a/samples/freee/$api.ts b/samples/freee/$api.ts index 8a356982..acf8837d 100644 --- a/samples/freee/$api.ts +++ b/samples/freee/$api.ts @@ -70,163 +70,163 @@ const api = (client: AspidaClient) => { get: (option: { query: Methods1['get']['query'], config?: T }) => client.fetch(prefix, `/api/1/account_items/${val0}`, 'GET', option).json(), $get: async (option: { query: Methods1['get']['query'], config?: T }) => - (await client.fetch(prefix, `/api/1/account_items/${val0}`, 'GET', option).json()).data, - put: (option: { data: Methods1['put']['reqBody'], config?: T }) => + (await client.fetch(prefix, `/api/1/account_items/${val0}`, 'GET', option).json()).body, + put: (option: { body: Methods1['put']['reqBody'], config?: T }) => client.fetch(prefix, `/api/1/account_items/${val0}`, 'PUT', option, 'URLSearchParams').json(), - $put: async (option: { data: Methods1['put']['reqBody'], config?: T }) => - (await client.fetch(prefix, `/api/1/account_items/${val0}`, 'PUT', option, 'URLSearchParams').json()).data, + $put: async (option: { body: Methods1['put']['reqBody'], config?: T }) => + (await client.fetch(prefix, `/api/1/account_items/${val0}`, 'PUT', option, 'URLSearchParams').json()).body, delete: (option: { query: Methods1['delete']['query'], config?: T }) => client.fetch(prefix, `/api/1/account_items/${val0}`, 'DELETE', option).send(), $delete: async (option: { query: Methods1['delete']['query'], config?: T }) => - (await client.fetch(prefix, `/api/1/account_items/${val0}`, 'DELETE', option).send()).data + (await client.fetch(prefix, `/api/1/account_items/${val0}`, 'DELETE', option).send()).body }), get: (option: { query: Methods0['get']['query'], config?: T }) => client.fetch(prefix, '/api/1/account_items', 'GET', option).json(), $get: async (option: { query: Methods0['get']['query'], config?: T }) => - (await client.fetch(prefix, '/api/1/account_items', 'GET', option).json()).data, - post: (option: { data: Methods0['post']['reqBody'], config?: T }) => + (await client.fetch(prefix, '/api/1/account_items', 'GET', option).json()).body, + post: (option: { body: Methods0['post']['reqBody'], config?: T }) => client.fetch(prefix, '/api/1/account_items', 'POST', option, 'URLSearchParams').json(), - $post: async (option: { data: Methods0['post']['reqBody'], config?: T }) => - (await client.fetch(prefix, '/api/1/account_items', 'POST', option, 'URLSearchParams').json()).data + $post: async (option: { body: Methods0['post']['reqBody'], config?: T }) => + (await client.fetch(prefix, '/api/1/account_items', 'POST', option, 'URLSearchParams').json()).body }, banks: { _id: (val1: number) => ({ get: (option?: { config?: T }) => client.fetch(prefix, `/api/1/banks/${val1}`, 'GET', option).json(), $get: async (option?: { config?: T }) => - (await client.fetch(prefix, `/api/1/banks/${val1}`, 'GET', option).json()).data + (await client.fetch(prefix, `/api/1/banks/${val1}`, 'GET', option).json()).body }), get: (option?: { query?: Methods2['get']['query'], config?: T }) => client.fetch(prefix, '/api/1/banks', 'GET', option).json(), $get: async (option?: { query?: Methods2['get']['query'], config?: T }) => - (await client.fetch(prefix, '/api/1/banks', 'GET', option).json()).data + (await client.fetch(prefix, '/api/1/banks', 'GET', option).json()).body }, companies: { _id: (val2: number) => ({ get: (option?: { query?: Methods5['get']['query'], config?: T }) => client.fetch(prefix, `/api/1/companies/${val2}`, 'GET', option).json(), $get: async (option?: { query?: Methods5['get']['query'], config?: T }) => - (await client.fetch(prefix, `/api/1/companies/${val2}`, 'GET', option).json()).data, - put: (option?: { data?: Methods5['put']['reqBody'], config?: T }) => + (await client.fetch(prefix, `/api/1/companies/${val2}`, 'GET', option).json()).body, + put: (option?: { body?: Methods5['put']['reqBody'], config?: T }) => client.fetch(prefix, `/api/1/companies/${val2}`, 'PUT', option, 'URLSearchParams').json(), - $put: async (option?: { data?: Methods5['put']['reqBody'], config?: T }) => - (await client.fetch(prefix, `/api/1/companies/${val2}`, 'PUT', option, 'URLSearchParams').json()).data + $put: async (option?: { body?: Methods5['put']['reqBody'], config?: T }) => + (await client.fetch(prefix, `/api/1/companies/${val2}`, 'PUT', option, 'URLSearchParams').json()).body }), get: (option?: { config?: T }) => client.fetch(prefix, '/api/1/companies', 'GET', option).json(), $get: async (option?: { config?: T }) => - (await client.fetch(prefix, '/api/1/companies', 'GET', option).json()).data + (await client.fetch(prefix, '/api/1/companies', 'GET', option).json()).body }, deals: { _id: (val3: number) => ({ payments: { _payment_id: (val4: number) => ({ - put: (option: { data: Methods9['put']['reqBody'], config?: T }) => + put: (option: { body: Methods9['put']['reqBody'], config?: T }) => client.fetch(prefix, `/api/1/deals/${val3}/payments/${val4}`, 'PUT', option, 'URLSearchParams').json(), - $put: async (option: { data: Methods9['put']['reqBody'], config?: T }) => - (await client.fetch(prefix, `/api/1/deals/${val3}/payments/${val4}`, 'PUT', option, 'URLSearchParams').json()).data, + $put: async (option: { body: Methods9['put']['reqBody'], config?: T }) => + (await client.fetch(prefix, `/api/1/deals/${val3}/payments/${val4}`, 'PUT', option, 'URLSearchParams').json()).body, delete: (option: { query: Methods9['delete']['query'], config?: T }) => client.fetch(prefix, `/api/1/deals/${val3}/payments/${val4}`, 'DELETE', option).send(), $delete: async (option: { query: Methods9['delete']['query'], config?: T }) => - (await client.fetch(prefix, `/api/1/deals/${val3}/payments/${val4}`, 'DELETE', option).send()).data + (await client.fetch(prefix, `/api/1/deals/${val3}/payments/${val4}`, 'DELETE', option).send()).body }), - post: (option: { data: Methods8['post']['reqBody'], config?: T }) => + post: (option: { body: Methods8['post']['reqBody'], config?: T }) => client.fetch(prefix, `/api/1/deals/${val3}/payments`, 'POST', option, 'URLSearchParams').json(), - $post: async (option: { data: Methods8['post']['reqBody'], config?: T }) => - (await client.fetch(prefix, `/api/1/deals/${val3}/payments`, 'POST', option, 'URLSearchParams').json()).data + $post: async (option: { body: Methods8['post']['reqBody'], config?: T }) => + (await client.fetch(prefix, `/api/1/deals/${val3}/payments`, 'POST', option, 'URLSearchParams').json()).body }, renews: { _renew_id: (val5: number) => ({ - put: (option: { data: Methods11['put']['reqBody'], config?: T }) => + put: (option: { body: Methods11['put']['reqBody'], config?: T }) => client.fetch(prefix, `/api/1/deals/${val3}/renews/${val5}`, 'PUT', option, 'URLSearchParams').json(), - $put: async (option: { data: Methods11['put']['reqBody'], config?: T }) => - (await client.fetch(prefix, `/api/1/deals/${val3}/renews/${val5}`, 'PUT', option, 'URLSearchParams').json()).data, + $put: async (option: { body: Methods11['put']['reqBody'], config?: T }) => + (await client.fetch(prefix, `/api/1/deals/${val3}/renews/${val5}`, 'PUT', option, 'URLSearchParams').json()).body, delete: (option: { query: Methods11['delete']['query'], config?: T }) => client.fetch(prefix, `/api/1/deals/${val3}/renews/${val5}`, 'DELETE', option).json(), $delete: async (option: { query: Methods11['delete']['query'], config?: T }) => - (await client.fetch(prefix, `/api/1/deals/${val3}/renews/${val5}`, 'DELETE', option).json()).data + (await client.fetch(prefix, `/api/1/deals/${val3}/renews/${val5}`, 'DELETE', option).json()).body }), - post: (option: { data: Methods10['post']['reqBody'], config?: T }) => + post: (option: { body: Methods10['post']['reqBody'], config?: T }) => client.fetch(prefix, `/api/1/deals/${val3}/renews`, 'POST', option, 'URLSearchParams').json(), - $post: async (option: { data: Methods10['post']['reqBody'], config?: T }) => - (await client.fetch(prefix, `/api/1/deals/${val3}/renews`, 'POST', option, 'URLSearchParams').json()).data + $post: async (option: { body: Methods10['post']['reqBody'], config?: T }) => + (await client.fetch(prefix, `/api/1/deals/${val3}/renews`, 'POST', option, 'URLSearchParams').json()).body }, get: (option: { query: Methods7['get']['query'], config?: T }) => client.fetch(prefix, `/api/1/deals/${val3}`, 'GET', option).json(), $get: async (option: { query: Methods7['get']['query'], config?: T }) => - (await client.fetch(prefix, `/api/1/deals/${val3}`, 'GET', option).json()).data, - put: (option?: { data?: Methods7['put']['reqBody'], config?: T }) => + (await client.fetch(prefix, `/api/1/deals/${val3}`, 'GET', option).json()).body, + put: (option?: { body?: Methods7['put']['reqBody'], config?: T }) => client.fetch(prefix, `/api/1/deals/${val3}`, 'PUT', option, 'URLSearchParams').json(), - $put: async (option?: { data?: Methods7['put']['reqBody'], config?: T }) => - (await client.fetch(prefix, `/api/1/deals/${val3}`, 'PUT', option, 'URLSearchParams').json()).data, + $put: async (option?: { body?: Methods7['put']['reqBody'], config?: T }) => + (await client.fetch(prefix, `/api/1/deals/${val3}`, 'PUT', option, 'URLSearchParams').json()).body, delete: (option: { query: Methods7['delete']['query'], config?: T }) => client.fetch(prefix, `/api/1/deals/${val3}`, 'DELETE', option).send(), $delete: async (option: { query: Methods7['delete']['query'], config?: T }) => - (await client.fetch(prefix, `/api/1/deals/${val3}`, 'DELETE', option).send()).data + (await client.fetch(prefix, `/api/1/deals/${val3}`, 'DELETE', option).send()).body }), get: (option: { query: Methods6['get']['query'], config?: T }) => client.fetch(prefix, '/api/1/deals', 'GET', option).json(), $get: async (option: { query: Methods6['get']['query'], config?: T }) => - (await client.fetch(prefix, '/api/1/deals', 'GET', option).json()).data, - post: (option?: { data?: Methods6['post']['reqBody'], config?: T }) => + (await client.fetch(prefix, '/api/1/deals', 'GET', option).json()).body, + post: (option?: { body?: Methods6['post']['reqBody'], config?: T }) => client.fetch(prefix, '/api/1/deals', 'POST', option, 'URLSearchParams').json(), - $post: async (option?: { data?: Methods6['post']['reqBody'], config?: T }) => - (await client.fetch(prefix, '/api/1/deals', 'POST', option, 'URLSearchParams').json()).data + $post: async (option?: { body?: Methods6['post']['reqBody'], config?: T }) => + (await client.fetch(prefix, '/api/1/deals', 'POST', option, 'URLSearchParams').json()).body }, expense_application_line_templates: { _id: (val6: number) => ({ get: (option: { query: Methods13['get']['query'], config?: T }) => client.fetch(prefix, `/api/1/expense_application_line_templates/${val6}`, 'GET', option).json(), $get: async (option: { query: Methods13['get']['query'], config?: T }) => - (await client.fetch(prefix, `/api/1/expense_application_line_templates/${val6}`, 'GET', option).json()).data, - put: (option: { data: Methods13['put']['reqBody'], config?: T }) => + (await client.fetch(prefix, `/api/1/expense_application_line_templates/${val6}`, 'GET', option).json()).body, + put: (option: { body: Methods13['put']['reqBody'], config?: T }) => client.fetch(prefix, `/api/1/expense_application_line_templates/${val6}`, 'PUT', option, 'URLSearchParams').json(), - $put: async (option: { data: Methods13['put']['reqBody'], config?: T }) => - (await client.fetch(prefix, `/api/1/expense_application_line_templates/${val6}`, 'PUT', option, 'URLSearchParams').json()).data, + $put: async (option: { body: Methods13['put']['reqBody'], config?: T }) => + (await client.fetch(prefix, `/api/1/expense_application_line_templates/${val6}`, 'PUT', option, 'URLSearchParams').json()).body, delete: (option: { query: Methods13['delete']['query'], config?: T }) => client.fetch(prefix, `/api/1/expense_application_line_templates/${val6}`, 'DELETE', option).send(), $delete: async (option: { query: Methods13['delete']['query'], config?: T }) => - (await client.fetch(prefix, `/api/1/expense_application_line_templates/${val6}`, 'DELETE', option).send()).data + (await client.fetch(prefix, `/api/1/expense_application_line_templates/${val6}`, 'DELETE', option).send()).body }), get: (option: { query: Methods12['get']['query'], config?: T }) => client.fetch(prefix, '/api/1/expense_application_line_templates', 'GET', option).json(), $get: async (option: { query: Methods12['get']['query'], config?: T }) => - (await client.fetch(prefix, '/api/1/expense_application_line_templates', 'GET', option).json()).data, - post: (option: { data: Methods12['post']['reqBody'], config?: T }) => + (await client.fetch(prefix, '/api/1/expense_application_line_templates', 'GET', option).json()).body, + post: (option: { body: Methods12['post']['reqBody'], config?: T }) => client.fetch(prefix, '/api/1/expense_application_line_templates', 'POST', option, 'URLSearchParams').json(), - $post: async (option: { data: Methods12['post']['reqBody'], config?: T }) => - (await client.fetch(prefix, '/api/1/expense_application_line_templates', 'POST', option, 'URLSearchParams').json()).data + $post: async (option: { body: Methods12['post']['reqBody'], config?: T }) => + (await client.fetch(prefix, '/api/1/expense_application_line_templates', 'POST', option, 'URLSearchParams').json()).body }, expense_applications: { _id: (val7: number) => ({ get: (option: { query: Methods15['get']['query'], config?: T }) => client.fetch(prefix, `/api/1/expense_applications/${val7}`, 'GET', option).json(), $get: async (option: { query: Methods15['get']['query'], config?: T }) => - (await client.fetch(prefix, `/api/1/expense_applications/${val7}`, 'GET', option).json()).data, - put: (option?: { data?: Methods15['put']['reqBody'], config?: T }) => + (await client.fetch(prefix, `/api/1/expense_applications/${val7}`, 'GET', option).json()).body, + put: (option?: { body?: Methods15['put']['reqBody'], config?: T }) => client.fetch(prefix, `/api/1/expense_applications/${val7}`, 'PUT', option, 'URLSearchParams').json(), - $put: async (option?: { data?: Methods15['put']['reqBody'], config?: T }) => - (await client.fetch(prefix, `/api/1/expense_applications/${val7}`, 'PUT', option, 'URLSearchParams').json()).data, + $put: async (option?: { body?: Methods15['put']['reqBody'], config?: T }) => + (await client.fetch(prefix, `/api/1/expense_applications/${val7}`, 'PUT', option, 'URLSearchParams').json()).body, delete: (option: { query: Methods15['delete']['query'], config?: T }) => client.fetch(prefix, `/api/1/expense_applications/${val7}`, 'DELETE', option).send(), $delete: async (option: { query: Methods15['delete']['query'], config?: T }) => - (await client.fetch(prefix, `/api/1/expense_applications/${val7}`, 'DELETE', option).send()).data + (await client.fetch(prefix, `/api/1/expense_applications/${val7}`, 'DELETE', option).send()).body }), get: (option: { query: Methods14['get']['query'], config?: T }) => client.fetch(prefix, '/api/1/expense_applications', 'GET', option).json(), $get: async (option: { query: Methods14['get']['query'], config?: T }) => - (await client.fetch(prefix, '/api/1/expense_applications', 'GET', option).json()).data, - post: (option?: { data?: Methods14['post']['reqBody'], config?: T }) => + (await client.fetch(prefix, '/api/1/expense_applications', 'GET', option).json()).body, + post: (option?: { body?: Methods14['post']['reqBody'], config?: T }) => client.fetch(prefix, '/api/1/expense_applications', 'POST', option, 'URLSearchParams').json(), - $post: async (option?: { data?: Methods14['post']['reqBody'], config?: T }) => - (await client.fetch(prefix, '/api/1/expense_applications', 'POST', option, 'URLSearchParams').json()).data + $post: async (option?: { body?: Methods14['post']['reqBody'], config?: T }) => + (await client.fetch(prefix, '/api/1/expense_applications', 'POST', option, 'URLSearchParams').json()).body }, forms: { selectables: { get: (option: { query: Methods16['get']['query'], config?: T }) => client.fetch(prefix, '/api/1/forms/selectables', 'GET', option).json(), $get: async (option: { query: Methods16['get']['query'], config?: T }) => - (await client.fetch(prefix, '/api/1/forms/selectables', 'GET', option).json()).data + (await client.fetch(prefix, '/api/1/forms/selectables', 'GET', option).json()).body } }, invoices: { @@ -234,48 +234,48 @@ const api = (client: AspidaClient) => { get: (option: { query: Methods18['get']['query'], config?: T }) => client.fetch(prefix, `/api/1/invoices/${val8}`, 'GET', option).json(), $get: async (option: { query: Methods18['get']['query'], config?: T }) => - (await client.fetch(prefix, `/api/1/invoices/${val8}`, 'GET', option).json()).data, - put: (option?: { data?: Methods18['put']['reqBody'], config?: T }) => + (await client.fetch(prefix, `/api/1/invoices/${val8}`, 'GET', option).json()).body, + put: (option?: { body?: Methods18['put']['reqBody'], config?: T }) => client.fetch(prefix, `/api/1/invoices/${val8}`, 'PUT', option, 'URLSearchParams').json(), - $put: async (option?: { data?: Methods18['put']['reqBody'], config?: T }) => - (await client.fetch(prefix, `/api/1/invoices/${val8}`, 'PUT', option, 'URLSearchParams').json()).data, + $put: async (option?: { body?: Methods18['put']['reqBody'], config?: T }) => + (await client.fetch(prefix, `/api/1/invoices/${val8}`, 'PUT', option, 'URLSearchParams').json()).body, delete: (option: { query: Methods18['delete']['query'], config?: T }) => client.fetch(prefix, `/api/1/invoices/${val8}`, 'DELETE', option).send(), $delete: async (option: { query: Methods18['delete']['query'], config?: T }) => - (await client.fetch(prefix, `/api/1/invoices/${val8}`, 'DELETE', option).send()).data + (await client.fetch(prefix, `/api/1/invoices/${val8}`, 'DELETE', option).send()).body }), get: (option: { query: Methods17['get']['query'], config?: T }) => client.fetch(prefix, '/api/1/invoices', 'GET', option).json(), $get: async (option: { query: Methods17['get']['query'], config?: T }) => - (await client.fetch(prefix, '/api/1/invoices', 'GET', option).json()).data, - post: (option?: { data?: Methods17['post']['reqBody'], config?: T }) => + (await client.fetch(prefix, '/api/1/invoices', 'GET', option).json()).body, + post: (option?: { body?: Methods17['post']['reqBody'], config?: T }) => client.fetch(prefix, '/api/1/invoices', 'POST', option, 'URLSearchParams').json(), - $post: async (option?: { data?: Methods17['post']['reqBody'], config?: T }) => - (await client.fetch(prefix, '/api/1/invoices', 'POST', option, 'URLSearchParams').json()).data + $post: async (option?: { body?: Methods17['post']['reqBody'], config?: T }) => + (await client.fetch(prefix, '/api/1/invoices', 'POST', option, 'URLSearchParams').json()).body }, items: { _id: (val9: number) => ({ get: (option: { query: Methods20['get']['query'], config?: T }) => client.fetch(prefix, `/api/1/items/${val9}`, 'GET', option).json(), $get: async (option: { query: Methods20['get']['query'], config?: T }) => - (await client.fetch(prefix, `/api/1/items/${val9}`, 'GET', option).json()).data, - put: (option?: { data?: Methods20['put']['reqBody'], config?: T }) => + (await client.fetch(prefix, `/api/1/items/${val9}`, 'GET', option).json()).body, + put: (option?: { body?: Methods20['put']['reqBody'], config?: T }) => client.fetch(prefix, `/api/1/items/${val9}`, 'PUT', option, 'URLSearchParams').json(), - $put: async (option?: { data?: Methods20['put']['reqBody'], config?: T }) => - (await client.fetch(prefix, `/api/1/items/${val9}`, 'PUT', option, 'URLSearchParams').json()).data, + $put: async (option?: { body?: Methods20['put']['reqBody'], config?: T }) => + (await client.fetch(prefix, `/api/1/items/${val9}`, 'PUT', option, 'URLSearchParams').json()).body, delete: (option: { query: Methods20['delete']['query'], config?: T }) => client.fetch(prefix, `/api/1/items/${val9}`, 'DELETE', option).send(), $delete: async (option: { query: Methods20['delete']['query'], config?: T }) => - (await client.fetch(prefix, `/api/1/items/${val9}`, 'DELETE', option).send()).data + (await client.fetch(prefix, `/api/1/items/${val9}`, 'DELETE', option).send()).body }), get: (option: { query: Methods19['get']['query'], config?: T }) => client.fetch(prefix, '/api/1/items', 'GET', option).json(), $get: async (option: { query: Methods19['get']['query'], config?: T }) => - (await client.fetch(prefix, '/api/1/items', 'GET', option).json()).data, - post: (option?: { data?: Methods19['post']['reqBody'], config?: T }) => + (await client.fetch(prefix, '/api/1/items', 'GET', option).json()).body, + post: (option?: { body?: Methods19['post']['reqBody'], config?: T }) => client.fetch(prefix, '/api/1/items', 'POST', option, 'URLSearchParams').json(), - $post: async (option?: { data?: Methods19['post']['reqBody'], config?: T }) => - (await client.fetch(prefix, '/api/1/items', 'POST', option, 'URLSearchParams').json()).data + $post: async (option?: { body?: Methods19['post']['reqBody'], config?: T }) => + (await client.fetch(prefix, '/api/1/items', 'POST', option, 'URLSearchParams').json()).body }, journals: { reports: { @@ -284,167 +284,167 @@ const api = (client: AspidaClient) => { get: (option: { query: Methods22['get']['query'], config?: T }) => client.fetch(prefix, `/api/1/journals/reports/${val10}/download`, 'GET', option).send(), $get: async (option: { query: Methods22['get']['query'], config?: T }) => - (await client.fetch(prefix, `/api/1/journals/reports/${val10}/download`, 'GET', option).send()).data + (await client.fetch(prefix, `/api/1/journals/reports/${val10}/download`, 'GET', option).send()).body }, status: { get: (option: { query: Methods23['get']['query'], config?: T }) => client.fetch(prefix, `/api/1/journals/reports/${val10}/status`, 'GET', option).json(), $get: async (option: { query: Methods23['get']['query'], config?: T }) => - (await client.fetch(prefix, `/api/1/journals/reports/${val10}/status`, 'GET', option).json()).data + (await client.fetch(prefix, `/api/1/journals/reports/${val10}/status`, 'GET', option).json()).body } }) }, get: (option: { query: Methods21['get']['query'], config?: T }) => client.fetch(prefix, '/api/1/journals', 'GET', option).json(), $get: async (option: { query: Methods21['get']['query'], config?: T }) => - (await client.fetch(prefix, '/api/1/journals', 'GET', option).json()).data + (await client.fetch(prefix, '/api/1/journals', 'GET', option).json()).body }, manual_journals: { _id: (val11: number) => ({ get: (option: { query: Methods25['get']['query'], config?: T }) => client.fetch(prefix, `/api/1/manual_journals/${val11}`, 'GET', option).json(), $get: async (option: { query: Methods25['get']['query'], config?: T }) => - (await client.fetch(prefix, `/api/1/manual_journals/${val11}`, 'GET', option).json()).data, - put: (option?: { data?: Methods25['put']['reqBody'], config?: T }) => + (await client.fetch(prefix, `/api/1/manual_journals/${val11}`, 'GET', option).json()).body, + put: (option?: { body?: Methods25['put']['reqBody'], config?: T }) => client.fetch(prefix, `/api/1/manual_journals/${val11}`, 'PUT', option, 'URLSearchParams').json(), - $put: async (option?: { data?: Methods25['put']['reqBody'], config?: T }) => - (await client.fetch(prefix, `/api/1/manual_journals/${val11}`, 'PUT', option, 'URLSearchParams').json()).data, + $put: async (option?: { body?: Methods25['put']['reqBody'], config?: T }) => + (await client.fetch(prefix, `/api/1/manual_journals/${val11}`, 'PUT', option, 'URLSearchParams').json()).body, delete: (option: { query: Methods25['delete']['query'], config?: T }) => client.fetch(prefix, `/api/1/manual_journals/${val11}`, 'DELETE', option).send(), $delete: async (option: { query: Methods25['delete']['query'], config?: T }) => - (await client.fetch(prefix, `/api/1/manual_journals/${val11}`, 'DELETE', option).send()).data + (await client.fetch(prefix, `/api/1/manual_journals/${val11}`, 'DELETE', option).send()).body }), get: (option: { query: Methods24['get']['query'], config?: T }) => client.fetch(prefix, '/api/1/manual_journals', 'GET', option).json(), $get: async (option: { query: Methods24['get']['query'], config?: T }) => - (await client.fetch(prefix, '/api/1/manual_journals', 'GET', option).json()).data, - post: (option?: { data?: Methods24['post']['reqBody'], config?: T }) => + (await client.fetch(prefix, '/api/1/manual_journals', 'GET', option).json()).body, + post: (option?: { body?: Methods24['post']['reqBody'], config?: T }) => client.fetch(prefix, '/api/1/manual_journals', 'POST', option, 'URLSearchParams').json(), - $post: async (option?: { data?: Methods24['post']['reqBody'], config?: T }) => - (await client.fetch(prefix, '/api/1/manual_journals', 'POST', option, 'URLSearchParams').json()).data + $post: async (option?: { body?: Methods24['post']['reqBody'], config?: T }) => + (await client.fetch(prefix, '/api/1/manual_journals', 'POST', option, 'URLSearchParams').json()).body }, partners: { _id: (val12: number) => ({ get: (option: { query: Methods27['get']['query'], config?: T }) => client.fetch(prefix, `/api/1/partners/${val12}`, 'GET', option).json(), $get: async (option: { query: Methods27['get']['query'], config?: T }) => - (await client.fetch(prefix, `/api/1/partners/${val12}`, 'GET', option).json()).data, - put: (option: { data: Methods27['put']['reqBody'], config?: T }) => + (await client.fetch(prefix, `/api/1/partners/${val12}`, 'GET', option).json()).body, + put: (option: { body: Methods27['put']['reqBody'], config?: T }) => client.fetch(prefix, `/api/1/partners/${val12}`, 'PUT', option, 'URLSearchParams').json(), - $put: async (option: { data: Methods27['put']['reqBody'], config?: T }) => - (await client.fetch(prefix, `/api/1/partners/${val12}`, 'PUT', option, 'URLSearchParams').json()).data, + $put: async (option: { body: Methods27['put']['reqBody'], config?: T }) => + (await client.fetch(prefix, `/api/1/partners/${val12}`, 'PUT', option, 'URLSearchParams').json()).body, delete: (option: { query: Methods27['delete']['query'], config?: T }) => client.fetch(prefix, `/api/1/partners/${val12}`, 'DELETE', option).send(), $delete: async (option: { query: Methods27['delete']['query'], config?: T }) => - (await client.fetch(prefix, `/api/1/partners/${val12}`, 'DELETE', option).send()).data + (await client.fetch(prefix, `/api/1/partners/${val12}`, 'DELETE', option).send()).body }), code: { _code: (val13: string) => ({ - put: (option: { data: Methods28['put']['reqBody'], config?: T }) => + put: (option: { body: Methods28['put']['reqBody'], config?: T }) => client.fetch(prefix, `/api/1/partners/code/${val13}`, 'PUT', option, 'URLSearchParams').json(), - $put: async (option: { data: Methods28['put']['reqBody'], config?: T }) => - (await client.fetch(prefix, `/api/1/partners/code/${val13}`, 'PUT', option, 'URLSearchParams').json()).data + $put: async (option: { body: Methods28['put']['reqBody'], config?: T }) => + (await client.fetch(prefix, `/api/1/partners/code/${val13}`, 'PUT', option, 'URLSearchParams').json()).body }) }, get: (option: { query: Methods26['get']['query'], config?: T }) => client.fetch(prefix, '/api/1/partners', 'GET', option).json(), $get: async (option: { query: Methods26['get']['query'], config?: T }) => - (await client.fetch(prefix, '/api/1/partners', 'GET', option).json()).data, - post: (option: { data: Methods26['post']['reqBody'], config?: T }) => + (await client.fetch(prefix, '/api/1/partners', 'GET', option).json()).body, + post: (option: { body: Methods26['post']['reqBody'], config?: T }) => client.fetch(prefix, '/api/1/partners', 'POST', option, 'URLSearchParams').json(), - $post: async (option: { data: Methods26['post']['reqBody'], config?: T }) => - (await client.fetch(prefix, '/api/1/partners', 'POST', option, 'URLSearchParams').json()).data + $post: async (option: { body: Methods26['post']['reqBody'], config?: T }) => + (await client.fetch(prefix, '/api/1/partners', 'POST', option, 'URLSearchParams').json()).body }, quotations: { _id: (val14: number) => ({ get: (option: { query: Methods30['get']['query'], config?: T }) => client.fetch(prefix, `/api/1/quotations/${val14}`, 'GET', option).json(), $get: async (option: { query: Methods30['get']['query'], config?: T }) => - (await client.fetch(prefix, `/api/1/quotations/${val14}`, 'GET', option).json()).data, - put: (option?: { data?: Methods30['put']['reqBody'], config?: T }) => + (await client.fetch(prefix, `/api/1/quotations/${val14}`, 'GET', option).json()).body, + put: (option?: { body?: Methods30['put']['reqBody'], config?: T }) => client.fetch(prefix, `/api/1/quotations/${val14}`, 'PUT', option, 'URLSearchParams').json(), - $put: async (option?: { data?: Methods30['put']['reqBody'], config?: T }) => - (await client.fetch(prefix, `/api/1/quotations/${val14}`, 'PUT', option, 'URLSearchParams').json()).data, + $put: async (option?: { body?: Methods30['put']['reqBody'], config?: T }) => + (await client.fetch(prefix, `/api/1/quotations/${val14}`, 'PUT', option, 'URLSearchParams').json()).body, delete: (option: { query: Methods30['delete']['query'], config?: T }) => client.fetch(prefix, `/api/1/quotations/${val14}`, 'DELETE', option).send(), $delete: async (option: { query: Methods30['delete']['query'], config?: T }) => - (await client.fetch(prefix, `/api/1/quotations/${val14}`, 'DELETE', option).send()).data + (await client.fetch(prefix, `/api/1/quotations/${val14}`, 'DELETE', option).send()).body }), get: (option: { query: Methods29['get']['query'], config?: T }) => client.fetch(prefix, '/api/1/quotations', 'GET', option).json(), $get: async (option: { query: Methods29['get']['query'], config?: T }) => - (await client.fetch(prefix, '/api/1/quotations', 'GET', option).json()).data, - post: (option?: { data?: Methods29['post']['reqBody'], config?: T }) => + (await client.fetch(prefix, '/api/1/quotations', 'GET', option).json()).body, + post: (option?: { body?: Methods29['post']['reqBody'], config?: T }) => client.fetch(prefix, '/api/1/quotations', 'POST', option, 'URLSearchParams').json(), - $post: async (option?: { data?: Methods29['post']['reqBody'], config?: T }) => - (await client.fetch(prefix, '/api/1/quotations', 'POST', option, 'URLSearchParams').json()).data + $post: async (option?: { body?: Methods29['post']['reqBody'], config?: T }) => + (await client.fetch(prefix, '/api/1/quotations', 'POST', option, 'URLSearchParams').json()).body }, receipts: { _id: (val15: number) => ({ get: (option: { query: Methods32['get']['query'], config?: T }) => client.fetch(prefix, `/api/1/receipts/${val15}`, 'GET', option).json(), $get: async (option: { query: Methods32['get']['query'], config?: T }) => - (await client.fetch(prefix, `/api/1/receipts/${val15}`, 'GET', option).json()).data, - put: (option: { data: Methods32['put']['reqBody'], config?: T }) => + (await client.fetch(prefix, `/api/1/receipts/${val15}`, 'GET', option).json()).body, + put: (option: { body: Methods32['put']['reqBody'], config?: T }) => client.fetch(prefix, `/api/1/receipts/${val15}`, 'PUT', option, 'URLSearchParams').json(), - $put: async (option: { data: Methods32['put']['reqBody'], config?: T }) => - (await client.fetch(prefix, `/api/1/receipts/${val15}`, 'PUT', option, 'URLSearchParams').json()).data, + $put: async (option: { body: Methods32['put']['reqBody'], config?: T }) => + (await client.fetch(prefix, `/api/1/receipts/${val15}`, 'PUT', option, 'URLSearchParams').json()).body, delete: (option: { query: Methods32['delete']['query'], config?: T }) => client.fetch(prefix, `/api/1/receipts/${val15}`, 'DELETE', option).send(), $delete: async (option: { query: Methods32['delete']['query'], config?: T }) => - (await client.fetch(prefix, `/api/1/receipts/${val15}`, 'DELETE', option).send()).data + (await client.fetch(prefix, `/api/1/receipts/${val15}`, 'DELETE', option).send()).body }), get: (option: { query: Methods31['get']['query'], config?: T }) => client.fetch(prefix, '/api/1/receipts', 'GET', option).json(), $get: async (option: { query: Methods31['get']['query'], config?: T }) => - (await client.fetch(prefix, '/api/1/receipts', 'GET', option).json()).data, - post: (option: { data: Methods31['post']['reqBody'], config?: T }) => + (await client.fetch(prefix, '/api/1/receipts', 'GET', option).json()).body, + post: (option: { body: Methods31['post']['reqBody'], config?: T }) => client.fetch(prefix, '/api/1/receipts', 'POST', option, 'FormData').json(), - $post: async (option: { data: Methods31['post']['reqBody'], config?: T }) => - (await client.fetch(prefix, '/api/1/receipts', 'POST', option, 'FormData').json()).data + $post: async (option: { body: Methods31['post']['reqBody'], config?: T }) => + (await client.fetch(prefix, '/api/1/receipts', 'POST', option, 'FormData').json()).body }, reports: { trial_bs: { get: (option: { query: Methods33['get']['query'], config?: T }) => client.fetch(prefix, '/api/1/reports/trial_bs', 'GET', option).json(), $get: async (option: { query: Methods33['get']['query'], config?: T }) => - (await client.fetch(prefix, '/api/1/reports/trial_bs', 'GET', option).json()).data + (await client.fetch(prefix, '/api/1/reports/trial_bs', 'GET', option).json()).body }, trial_bs_three_years: { get: (option: { query: Methods34['get']['query'], config?: T }) => client.fetch(prefix, '/api/1/reports/trial_bs_three_years', 'GET', option).json(), $get: async (option: { query: Methods34['get']['query'], config?: T }) => - (await client.fetch(prefix, '/api/1/reports/trial_bs_three_years', 'GET', option).json()).data + (await client.fetch(prefix, '/api/1/reports/trial_bs_three_years', 'GET', option).json()).body }, trial_bs_two_years: { get: (option: { query: Methods35['get']['query'], config?: T }) => client.fetch(prefix, '/api/1/reports/trial_bs_two_years', 'GET', option).json(), $get: async (option: { query: Methods35['get']['query'], config?: T }) => - (await client.fetch(prefix, '/api/1/reports/trial_bs_two_years', 'GET', option).json()).data + (await client.fetch(prefix, '/api/1/reports/trial_bs_two_years', 'GET', option).json()).body }, trial_pl: { get: (option: { query: Methods36['get']['query'], config?: T }) => client.fetch(prefix, '/api/1/reports/trial_pl', 'GET', option).json(), $get: async (option: { query: Methods36['get']['query'], config?: T }) => - (await client.fetch(prefix, '/api/1/reports/trial_pl', 'GET', option).json()).data + (await client.fetch(prefix, '/api/1/reports/trial_pl', 'GET', option).json()).body }, trial_pl_sections: { get: (option: { query: Methods37['get']['query'], config?: T }) => client.fetch(prefix, '/api/1/reports/trial_pl_sections', 'GET', option).json(), $get: async (option: { query: Methods37['get']['query'], config?: T }) => - (await client.fetch(prefix, '/api/1/reports/trial_pl_sections', 'GET', option).json()).data + (await client.fetch(prefix, '/api/1/reports/trial_pl_sections', 'GET', option).json()).body }, trial_pl_three_years: { get: (option: { query: Methods38['get']['query'], config?: T }) => client.fetch(prefix, '/api/1/reports/trial_pl_three_years', 'GET', option).json(), $get: async (option: { query: Methods38['get']['query'], config?: T }) => - (await client.fetch(prefix, '/api/1/reports/trial_pl_three_years', 'GET', option).json()).data + (await client.fetch(prefix, '/api/1/reports/trial_pl_three_years', 'GET', option).json()).body }, trial_pl_two_years: { get: (option: { query: Methods39['get']['query'], config?: T }) => client.fetch(prefix, '/api/1/reports/trial_pl_two_years', 'GET', option).json(), $get: async (option: { query: Methods39['get']['query'], config?: T }) => - (await client.fetch(prefix, '/api/1/reports/trial_pl_two_years', 'GET', option).json()).data + (await client.fetch(prefix, '/api/1/reports/trial_pl_two_years', 'GET', option).json()).body } }, sections: { @@ -452,46 +452,46 @@ const api = (client: AspidaClient) => { get: (option: { query: Methods41['get']['query'], config?: T }) => client.fetch(prefix, `/api/1/sections/${val16}`, 'GET', option).json(), $get: async (option: { query: Methods41['get']['query'], config?: T }) => - (await client.fetch(prefix, `/api/1/sections/${val16}`, 'GET', option).json()).data, - put: (option?: { data?: Methods41['put']['reqBody'], config?: T }) => + (await client.fetch(prefix, `/api/1/sections/${val16}`, 'GET', option).json()).body, + put: (option?: { body?: Methods41['put']['reqBody'], config?: T }) => client.fetch(prefix, `/api/1/sections/${val16}`, 'PUT', option, 'URLSearchParams').json(), - $put: async (option?: { data?: Methods41['put']['reqBody'], config?: T }) => - (await client.fetch(prefix, `/api/1/sections/${val16}`, 'PUT', option, 'URLSearchParams').json()).data, + $put: async (option?: { body?: Methods41['put']['reqBody'], config?: T }) => + (await client.fetch(prefix, `/api/1/sections/${val16}`, 'PUT', option, 'URLSearchParams').json()).body, delete: (option: { query: Methods41['delete']['query'], config?: T }) => client.fetch(prefix, `/api/1/sections/${val16}`, 'DELETE', option).send(), $delete: async (option: { query: Methods41['delete']['query'], config?: T }) => - (await client.fetch(prefix, `/api/1/sections/${val16}`, 'DELETE', option).send()).data + (await client.fetch(prefix, `/api/1/sections/${val16}`, 'DELETE', option).send()).body }), get: (option: { query: Methods40['get']['query'], config?: T }) => client.fetch(prefix, '/api/1/sections', 'GET', option).json(), $get: async (option: { query: Methods40['get']['query'], config?: T }) => - (await client.fetch(prefix, '/api/1/sections', 'GET', option).json()).data, - post: (option?: { data?: Methods40['post']['reqBody'], config?: T }) => + (await client.fetch(prefix, '/api/1/sections', 'GET', option).json()).body, + post: (option?: { body?: Methods40['post']['reqBody'], config?: T }) => client.fetch(prefix, '/api/1/sections', 'POST', option, 'URLSearchParams').json(), - $post: async (option?: { data?: Methods40['post']['reqBody'], config?: T }) => - (await client.fetch(prefix, '/api/1/sections', 'POST', option, 'URLSearchParams').json()).data + $post: async (option?: { body?: Methods40['post']['reqBody'], config?: T }) => + (await client.fetch(prefix, '/api/1/sections', 'POST', option, 'URLSearchParams').json()).body }, segments: { _segment_id: (val17: number) => ({ tags: { _id: (val18: number) => ({ - put: (option: { data: Methods43['put']['reqBody'], config?: T }) => + put: (option: { body: Methods43['put']['reqBody'], config?: T }) => client.fetch(prefix, `/api/1/segments/${val17}/tags/${val18}`, 'PUT', option, 'URLSearchParams').json(), - $put: async (option: { data: Methods43['put']['reqBody'], config?: T }) => - (await client.fetch(prefix, `/api/1/segments/${val17}/tags/${val18}`, 'PUT', option, 'URLSearchParams').json()).data, + $put: async (option: { body: Methods43['put']['reqBody'], config?: T }) => + (await client.fetch(prefix, `/api/1/segments/${val17}/tags/${val18}`, 'PUT', option, 'URLSearchParams').json()).body, delete: (option: { query: Methods43['delete']['query'], config?: T }) => client.fetch(prefix, `/api/1/segments/${val17}/tags/${val18}`, 'DELETE', option).send(), $delete: async (option: { query: Methods43['delete']['query'], config?: T }) => - (await client.fetch(prefix, `/api/1/segments/${val17}/tags/${val18}`, 'DELETE', option).send()).data + (await client.fetch(prefix, `/api/1/segments/${val17}/tags/${val18}`, 'DELETE', option).send()).body }), get: (option: { query: Methods42['get']['query'], config?: T }) => client.fetch(prefix, `/api/1/segments/${val17}/tags`, 'GET', option).json(), $get: async (option: { query: Methods42['get']['query'], config?: T }) => - (await client.fetch(prefix, `/api/1/segments/${val17}/tags`, 'GET', option).json()).data, - post: (option: { data: Methods42['post']['reqBody'], config?: T }) => + (await client.fetch(prefix, `/api/1/segments/${val17}/tags`, 'GET', option).json()).body, + post: (option: { body: Methods42['post']['reqBody'], config?: T }) => client.fetch(prefix, `/api/1/segments/${val17}/tags`, 'POST', option, 'URLSearchParams').json(), - $post: async (option: { data: Methods42['post']['reqBody'], config?: T }) => - (await client.fetch(prefix, `/api/1/segments/${val17}/tags`, 'POST', option, 'URLSearchParams').json()).data + $post: async (option: { body: Methods42['post']['reqBody'], config?: T }) => + (await client.fetch(prefix, `/api/1/segments/${val17}/tags`, 'POST', option, 'URLSearchParams').json()).body } }) }, @@ -500,24 +500,24 @@ const api = (client: AspidaClient) => { get: (option: { query: Methods45['get']['query'], config?: T }) => client.fetch(prefix, `/api/1/tags/${val19}`, 'GET', option).json(), $get: async (option: { query: Methods45['get']['query'], config?: T }) => - (await client.fetch(prefix, `/api/1/tags/${val19}`, 'GET', option).json()).data, - put: (option?: { data?: Methods45['put']['reqBody'], config?: T }) => + (await client.fetch(prefix, `/api/1/tags/${val19}`, 'GET', option).json()).body, + put: (option?: { body?: Methods45['put']['reqBody'], config?: T }) => client.fetch(prefix, `/api/1/tags/${val19}`, 'PUT', option, 'URLSearchParams').json(), - $put: async (option?: { data?: Methods45['put']['reqBody'], config?: T }) => - (await client.fetch(prefix, `/api/1/tags/${val19}`, 'PUT', option, 'URLSearchParams').json()).data, + $put: async (option?: { body?: Methods45['put']['reqBody'], config?: T }) => + (await client.fetch(prefix, `/api/1/tags/${val19}`, 'PUT', option, 'URLSearchParams').json()).body, delete: (option: { query: Methods45['delete']['query'], config?: T }) => client.fetch(prefix, `/api/1/tags/${val19}`, 'DELETE', option).send(), $delete: async (option: { query: Methods45['delete']['query'], config?: T }) => - (await client.fetch(prefix, `/api/1/tags/${val19}`, 'DELETE', option).send()).data + (await client.fetch(prefix, `/api/1/tags/${val19}`, 'DELETE', option).send()).body }), get: (option: { query: Methods44['get']['query'], config?: T }) => client.fetch(prefix, '/api/1/tags', 'GET', option).json(), $get: async (option: { query: Methods44['get']['query'], config?: T }) => - (await client.fetch(prefix, '/api/1/tags', 'GET', option).json()).data, - post: (option: { data: Methods44['post']['reqBody'], config?: T }) => + (await client.fetch(prefix, '/api/1/tags', 'GET', option).json()).body, + post: (option: { body: Methods44['post']['reqBody'], config?: T }) => client.fetch(prefix, '/api/1/tags', 'POST', option, 'URLSearchParams').json(), - $post: async (option: { data: Methods44['post']['reqBody'], config?: T }) => - (await client.fetch(prefix, '/api/1/tags', 'POST', option, 'URLSearchParams').json()).data + $post: async (option: { body: Methods44['post']['reqBody'], config?: T }) => + (await client.fetch(prefix, '/api/1/tags', 'POST', option, 'URLSearchParams').json()).body }, taxes: { codes: { @@ -525,19 +525,19 @@ const api = (client: AspidaClient) => { get: (option?: { config?: T }) => client.fetch(prefix, `/api/1/taxes/codes/${val20}`, 'GET', option).json(), $get: async (option?: { config?: T }) => - (await client.fetch(prefix, `/api/1/taxes/codes/${val20}`, 'GET', option).json()).data + (await client.fetch(prefix, `/api/1/taxes/codes/${val20}`, 'GET', option).json()).body }), get: (option?: { config?: T }) => client.fetch(prefix, '/api/1/taxes/codes', 'GET', option).json(), $get: async (option?: { config?: T }) => - (await client.fetch(prefix, '/api/1/taxes/codes', 'GET', option).json()).data + (await client.fetch(prefix, '/api/1/taxes/codes', 'GET', option).json()).body }, companies: { _company_id: (val21: number) => ({ get: (option?: { config?: T }) => client.fetch(prefix, `/api/1/taxes/companies/${val21}`, 'GET', option).json(), $get: async (option?: { config?: T }) => - (await client.fetch(prefix, `/api/1/taxes/companies/${val21}`, 'GET', option).json()).data + (await client.fetch(prefix, `/api/1/taxes/companies/${val21}`, 'GET', option).json()).body }) } }, @@ -546,66 +546,66 @@ const api = (client: AspidaClient) => { get: (option: { query: Methods50['get']['query'], config?: T }) => client.fetch(prefix, `/api/1/transfers/${val22}`, 'GET', option).json(), $get: async (option: { query: Methods50['get']['query'], config?: T }) => - (await client.fetch(prefix, `/api/1/transfers/${val22}`, 'GET', option).json()).data, - put: (option: { data: Methods50['put']['reqBody'], config?: T }) => + (await client.fetch(prefix, `/api/1/transfers/${val22}`, 'GET', option).json()).body, + put: (option: { body: Methods50['put']['reqBody'], config?: T }) => client.fetch(prefix, `/api/1/transfers/${val22}`, 'PUT', option, 'URLSearchParams').json(), - $put: async (option: { data: Methods50['put']['reqBody'], config?: T }) => - (await client.fetch(prefix, `/api/1/transfers/${val22}`, 'PUT', option, 'URLSearchParams').json()).data, + $put: async (option: { body: Methods50['put']['reqBody'], config?: T }) => + (await client.fetch(prefix, `/api/1/transfers/${val22}`, 'PUT', option, 'URLSearchParams').json()).body, delete: (option: { query: Methods50['delete']['query'], config?: T }) => client.fetch(prefix, `/api/1/transfers/${val22}`, 'DELETE', option).send(), $delete: async (option: { query: Methods50['delete']['query'], config?: T }) => - (await client.fetch(prefix, `/api/1/transfers/${val22}`, 'DELETE', option).send()).data + (await client.fetch(prefix, `/api/1/transfers/${val22}`, 'DELETE', option).send()).body }), get: (option: { query: Methods49['get']['query'], config?: T }) => client.fetch(prefix, '/api/1/transfers', 'GET', option).json(), $get: async (option: { query: Methods49['get']['query'], config?: T }) => - (await client.fetch(prefix, '/api/1/transfers', 'GET', option).json()).data, - post: (option?: { data?: Methods49['post']['reqBody'], config?: T }) => + (await client.fetch(prefix, '/api/1/transfers', 'GET', option).json()).body, + post: (option?: { body?: Methods49['post']['reqBody'], config?: T }) => client.fetch(prefix, '/api/1/transfers', 'POST', option, 'URLSearchParams').json(), - $post: async (option?: { data?: Methods49['post']['reqBody'], config?: T }) => - (await client.fetch(prefix, '/api/1/transfers', 'POST', option, 'URLSearchParams').json()).data + $post: async (option?: { body?: Methods49['post']['reqBody'], config?: T }) => + (await client.fetch(prefix, '/api/1/transfers', 'POST', option, 'URLSearchParams').json()).body }, users: { capabilities: { get: (option: { query: Methods52['get']['query'], config?: T }) => client.fetch(prefix, '/api/1/users/capabilities', 'GET', option).json(), $get: async (option: { query: Methods52['get']['query'], config?: T }) => - (await client.fetch(prefix, '/api/1/users/capabilities', 'GET', option).json()).data + (await client.fetch(prefix, '/api/1/users/capabilities', 'GET', option).json()).body }, me: { get: (option?: { query?: Methods53['get']['query'], config?: T }) => client.fetch(prefix, '/api/1/users/me', 'GET', option).json(), $get: async (option?: { query?: Methods53['get']['query'], config?: T }) => - (await client.fetch(prefix, '/api/1/users/me', 'GET', option).json()).data, - put: (option?: { data?: Methods53['put']['reqBody'], config?: T }) => + (await client.fetch(prefix, '/api/1/users/me', 'GET', option).json()).body, + put: (option?: { body?: Methods53['put']['reqBody'], config?: T }) => client.fetch(prefix, '/api/1/users/me', 'PUT', option, 'URLSearchParams').json(), - $put: async (option?: { data?: Methods53['put']['reqBody'], config?: T }) => - (await client.fetch(prefix, '/api/1/users/me', 'PUT', option, 'URLSearchParams').json()).data + $put: async (option?: { body?: Methods53['put']['reqBody'], config?: T }) => + (await client.fetch(prefix, '/api/1/users/me', 'PUT', option, 'URLSearchParams').json()).body }, get: (option: { query: Methods51['get']['query'], config?: T }) => client.fetch(prefix, '/api/1/users', 'GET', option).json(), $get: async (option: { query: Methods51['get']['query'], config?: T }) => - (await client.fetch(prefix, '/api/1/users', 'GET', option).json()).data + (await client.fetch(prefix, '/api/1/users', 'GET', option).json()).body }, wallet_txns: { _id: (val23: number) => ({ get: (option: { query: Methods55['get']['query'], config?: T }) => client.fetch(prefix, `/api/1/wallet_txns/${val23}`, 'GET', option).json(), $get: async (option: { query: Methods55['get']['query'], config?: T }) => - (await client.fetch(prefix, `/api/1/wallet_txns/${val23}`, 'GET', option).json()).data, + (await client.fetch(prefix, `/api/1/wallet_txns/${val23}`, 'GET', option).json()).body, delete: (option: { query: Methods55['delete']['query'], config?: T }) => client.fetch(prefix, `/api/1/wallet_txns/${val23}`, 'DELETE', option).send(), $delete: async (option: { query: Methods55['delete']['query'], config?: T }) => - (await client.fetch(prefix, `/api/1/wallet_txns/${val23}`, 'DELETE', option).send()).data + (await client.fetch(prefix, `/api/1/wallet_txns/${val23}`, 'DELETE', option).send()).body }), get: (option: { query: Methods54['get']['query'], config?: T }) => client.fetch(prefix, '/api/1/wallet_txns', 'GET', option).json(), $get: async (option: { query: Methods54['get']['query'], config?: T }) => - (await client.fetch(prefix, '/api/1/wallet_txns', 'GET', option).json()).data, - post: (option?: { data?: Methods54['post']['reqBody'], config?: T }) => + (await client.fetch(prefix, '/api/1/wallet_txns', 'GET', option).json()).body, + post: (option?: { body?: Methods54['post']['reqBody'], config?: T }) => client.fetch(prefix, '/api/1/wallet_txns', 'POST', option, 'URLSearchParams').json(), - $post: async (option?: { data?: Methods54['post']['reqBody'], config?: T }) => - (await client.fetch(prefix, '/api/1/wallet_txns', 'POST', option, 'URLSearchParams').json()).data + $post: async (option?: { body?: Methods54['post']['reqBody'], config?: T }) => + (await client.fetch(prefix, '/api/1/wallet_txns', 'POST', option, 'URLSearchParams').json()).body }, walletables: { _type: (val24: number | string) => ({ @@ -613,25 +613,25 @@ const api = (client: AspidaClient) => { get: (option: { query: Methods57['get']['query'], config?: T }) => client.fetch(prefix, `/api/1/walletables/${val24}/${val25}`, 'GET', option).json(), $get: async (option: { query: Methods57['get']['query'], config?: T }) => - (await client.fetch(prefix, `/api/1/walletables/${val24}/${val25}`, 'GET', option).json()).data, - put: (option: { data?: Methods57['put']['reqBody'], query: Methods57['put']['query'], config?: T }) => + (await client.fetch(prefix, `/api/1/walletables/${val24}/${val25}`, 'GET', option).json()).body, + put: (option: { body?: Methods57['put']['reqBody'], query: Methods57['put']['query'], config?: T }) => client.fetch(prefix, `/api/1/walletables/${val24}/${val25}`, 'PUT', option, 'URLSearchParams').json(), - $put: async (option: { data?: Methods57['put']['reqBody'], query: Methods57['put']['query'], config?: T }) => - (await client.fetch(prefix, `/api/1/walletables/${val24}/${val25}`, 'PUT', option, 'URLSearchParams').json()).data, + $put: async (option: { body?: Methods57['put']['reqBody'], query: Methods57['put']['query'], config?: T }) => + (await client.fetch(prefix, `/api/1/walletables/${val24}/${val25}`, 'PUT', option, 'URLSearchParams').json()).body, delete: (option: { query: Methods57['delete']['query'], config?: T }) => client.fetch(prefix, `/api/1/walletables/${val24}/${val25}`, 'DELETE', option).send(), $delete: async (option: { query: Methods57['delete']['query'], config?: T }) => - (await client.fetch(prefix, `/api/1/walletables/${val24}/${val25}`, 'DELETE', option).send()).data + (await client.fetch(prefix, `/api/1/walletables/${val24}/${val25}`, 'DELETE', option).send()).body }) }), get: (option: { query: Methods56['get']['query'], config?: T }) => client.fetch(prefix, '/api/1/walletables', 'GET', option).json(), $get: async (option: { query: Methods56['get']['query'], config?: T }) => - (await client.fetch(prefix, '/api/1/walletables', 'GET', option).json()).data, - post: (option?: { data?: Methods56['post']['reqBody'], config?: T }) => + (await client.fetch(prefix, '/api/1/walletables', 'GET', option).json()).body, + post: (option?: { body?: Methods56['post']['reqBody'], config?: T }) => client.fetch(prefix, '/api/1/walletables', 'POST', option, 'URLSearchParams').json(), - $post: async (option?: { data?: Methods56['post']['reqBody'], config?: T }) => - (await client.fetch(prefix, '/api/1/walletables', 'POST', option, 'URLSearchParams').json()).data + $post: async (option?: { body?: Methods56['post']['reqBody'], config?: T }) => + (await client.fetch(prefix, '/api/1/walletables', 'POST', option, 'URLSearchParams').json()).body } } } diff --git a/samples/openapi/$api.ts b/samples/openapi/$api.ts index fba91599..de2c7bc8 100644 --- a/samples/openapi/$api.ts +++ b/samples/openapi/$api.ts @@ -65,12 +65,12 @@ const api = (client: AspidaClient) => { get: (option: { query: Methods1['get']['query'], config?: T }) => client.fetch(prefix, `/api/stream/v1/stories/${val0}`, 'GET', option).json(), $get: async (option: { query: Methods1['get']['query'], config?: T }) => - (await client.fetch(prefix, `/api/stream/v1/stories/${val0}`, 'GET', option).json()).data + (await client.fetch(prefix, `/api/stream/v1/stories/${val0}`, 'GET', option).json()).body }), get: (option: { query: Methods0['get']['query'], config?: T }) => client.fetch(prefix, '/api/stream/v1/stories', 'GET', option).json(), $get: async (option: { query: Methods0['get']['query'], config?: T }) => - (await client.fetch(prefix, '/api/stream/v1/stories', 'GET', option).json()).data + (await client.fetch(prefix, '/api/stream/v1/stories', 'GET', option).json()).body } } }, @@ -79,63 +79,63 @@ const api = (client: AspidaClient) => { get: (option?: { config?: T }) => client.fetch(prefix, '/api/v1/me', 'GET', option).json(), $get: async (option?: { config?: T }) => - (await client.fetch(prefix, '/api/v1/me', 'GET', option).json()).data + (await client.fetch(prefix, '/api/v1/me', 'GET', option).json()).body }, mixes: { _id: (val1: string) => ({ - put: (option?: { data?: Methods4['put']['reqBody'], config?: T }) => + put: (option?: { body?: Methods4['put']['reqBody'], config?: T }) => client.fetch(prefix, `/api/v1/mixes/${val1}`, 'PUT', option).send(), - $put: async (option?: { data?: Methods4['put']['reqBody'], config?: T }) => - (await client.fetch(prefix, `/api/v1/mixes/${val1}`, 'PUT', option).send()).data + $put: async (option?: { body?: Methods4['put']['reqBody'], config?: T }) => + (await client.fetch(prefix, `/api/v1/mixes/${val1}`, 'PUT', option).send()).body }), _mixId: (val2: string) => ({ cards: { - post: (option?: { data?: Methods5['post']['reqBody'], config?: T }) => + post: (option?: { body?: Methods5['post']['reqBody'], config?: T }) => client.fetch(prefix, `/api/v1/mixes/${val2}/cards`, 'POST', option).send(), - $post: async (option?: { data?: Methods5['post']['reqBody'], config?: T }) => - (await client.fetch(prefix, `/api/v1/mixes/${val2}/cards`, 'POST', option).send()).data + $post: async (option?: { body?: Methods5['post']['reqBody'], config?: T }) => + (await client.fetch(prefix, `/api/v1/mixes/${val2}/cards`, 'POST', option).send()).body }, url: { - post: (option?: { data?: Methods6['post']['reqBody'], config?: T }) => + post: (option?: { body?: Methods6['post']['reqBody'], config?: T }) => client.fetch(prefix, `/api/v1/mixes/${val2}/url`, 'POST', option).send(), - $post: async (option?: { data?: Methods6['post']['reqBody'], config?: T }) => - (await client.fetch(prefix, `/api/v1/mixes/${val2}/url`, 'POST', option).send()).data + $post: async (option?: { body?: Methods6['post']['reqBody'], config?: T }) => + (await client.fetch(prefix, `/api/v1/mixes/${val2}/url`, 'POST', option).send()).body } }), get: (option?: { config?: T }) => client.fetch(prefix, '/api/v1/mixes', 'GET', option).json(), $get: async (option?: { config?: T }) => - (await client.fetch(prefix, '/api/v1/mixes', 'GET', option).json()).data, - post: (option?: { data?: Methods3['post']['reqBody'], config?: T }) => + (await client.fetch(prefix, '/api/v1/mixes', 'GET', option).json()).body, + post: (option?: { body?: Methods3['post']['reqBody'], config?: T }) => client.fetch(prefix, '/api/v1/mixes', 'POST', option).json(), - $post: async (option?: { data?: Methods3['post']['reqBody'], config?: T }) => - (await client.fetch(prefix, '/api/v1/mixes', 'POST', option).json()).data + $post: async (option?: { body?: Methods3['post']['reqBody'], config?: T }) => + (await client.fetch(prefix, '/api/v1/mixes', 'POST', option).json()).body }, parse: { image: { - post: (option?: { data?: Methods8['post']['reqBody'], config?: T }) => + post: (option?: { body?: Methods8['post']['reqBody'], config?: T }) => client.fetch(prefix, '/api/v1/parse/image', 'POST', option, 'FormData').json(), - $post: async (option?: { data?: Methods8['post']['reqBody'], config?: T }) => - (await client.fetch(prefix, '/api/v1/parse/image', 'POST', option, 'FormData').json()).data + $post: async (option?: { body?: Methods8['post']['reqBody'], config?: T }) => + (await client.fetch(prefix, '/api/v1/parse/image', 'POST', option, 'FormData').json()).body }, - post: (option?: { data?: Methods7['post']['reqBody'], config?: T }) => + post: (option?: { body?: Methods7['post']['reqBody'], config?: T }) => client.fetch(prefix, '/api/v1/parse', 'POST', option).json(), - $post: async (option?: { data?: Methods7['post']['reqBody'], config?: T }) => - (await client.fetch(prefix, '/api/v1/parse', 'POST', option).json()).data + $post: async (option?: { body?: Methods7['post']['reqBody'], config?: T }) => + (await client.fetch(prefix, '/api/v1/parse', 'POST', option).json()).body }, token: { - post: (option?: { data?: Methods9['post']['reqBody'], config?: T }) => + post: (option?: { body?: Methods9['post']['reqBody'], config?: T }) => client.fetch(prefix, '/api/v1/token', 'POST', option).json(), - $post: async (option?: { data?: Methods9['post']['reqBody'], config?: T }) => - (await client.fetch(prefix, '/api/v1/token', 'POST', option).json()).data + $post: async (option?: { body?: Methods9['post']['reqBody'], config?: T }) => + (await client.fetch(prefix, '/api/v1/token', 'POST', option).json()).body } }, v3: { $2fa: { - post: (option: { data: Methods10['post']['reqBody'], headers?: Methods10['post']['reqHeaders'], config?: T }) => + post: (option: { body: Methods10['post']['reqBody'], headers?: Methods10['post']['reqHeaders'], config?: T }) => client.fetch(prefix, '/api/v3/2fa', 'POST', option).json(), - $post: async (option: { data: Methods10['post']['reqBody'], headers?: Methods10['post']['reqHeaders'], config?: T }) => - (await client.fetch(prefix, '/api/v3/2fa', 'POST', option).json()).data + $post: async (option: { body: Methods10['post']['reqBody'], headers?: Methods10['post']['reqHeaders'], config?: T }) => + (await client.fetch(prefix, '/api/v3/2fa', 'POST', option).json()).body }, channels: { _channelId_0: (val3: number) => ({ @@ -143,10 +143,10 @@ const api = (client: AspidaClient) => { _chatId: (val4: number) => ({ items: { _itemId: (val5: number) => ({ - post: (option?: { data?: Methods12['post']['reqBody'], headers?: Methods12['post']['reqHeaders'], config?: T }) => + post: (option?: { body?: Methods12['post']['reqBody'], headers?: Methods12['post']['reqHeaders'], config?: T }) => client.fetch(prefix, `/api/v3/channels/${val3}/chats/${val4}/items/${val5}`, 'POST', option).json(), - $post: async (option?: { data?: Methods12['post']['reqBody'], headers?: Methods12['post']['reqHeaders'], config?: T }) => - (await client.fetch(prefix, `/api/v3/channels/${val3}/chats/${val4}/items/${val5}`, 'POST', option).json()).data + $post: async (option?: { body?: Methods12['post']['reqBody'], headers?: Methods12['post']['reqHeaders'], config?: T }) => + (await client.fetch(prefix, `/api/v3/channels/${val3}/chats/${val4}/items/${val5}`, 'POST', option).json()).body }) } }) @@ -155,7 +155,7 @@ const api = (client: AspidaClient) => { get: (option?: { query?: Methods13['get']['query'], headers?: Methods13['get']['reqHeaders'], config?: T }) => client.fetch(prefix, `/api/v3/channels/${val3}/news-feed`, 'GET', option).json(), $get: async (option?: { query?: Methods13['get']['query'], headers?: Methods13['get']['reqHeaders'], config?: T }) => - (await client.fetch(prefix, `/api/v3/channels/${val3}/news-feed`, 'GET', option).json()).data + (await client.fetch(prefix, `/api/v3/channels/${val3}/news-feed`, 'GET', option).json()).body } }), _channelId_1: (val6: string) => ({ @@ -163,261 +163,261 @@ const api = (client: AspidaClient) => { _chatId: (val7: string) => ({ items: { audio: { - post: (option?: { data?: Methods18['post']['reqBody'], headers?: Methods18['post']['reqHeaders'], config?: T }) => + post: (option?: { body?: Methods18['post']['reqBody'], headers?: Methods18['post']['reqHeaders'], config?: T }) => client.fetch(prefix, `/api/v3/channels/${val6}/chats/${val7}/items/audio`, 'POST', option, 'FormData').json(), - $post: async (option?: { data?: Methods18['post']['reqBody'], headers?: Methods18['post']['reqHeaders'], config?: T }) => - (await client.fetch(prefix, `/api/v3/channels/${val6}/chats/${val7}/items/audio`, 'POST', option, 'FormData').json()).data + $post: async (option?: { body?: Methods18['post']['reqBody'], headers?: Methods18['post']['reqHeaders'], config?: T }) => + (await client.fetch(prefix, `/api/v3/channels/${val6}/chats/${val7}/items/audio`, 'POST', option, 'FormData').json()).body }, image: { - post: (option?: { data?: Methods19['post']['reqBody'], headers?: Methods19['post']['reqHeaders'], config?: T }) => + post: (option?: { body?: Methods19['post']['reqBody'], headers?: Methods19['post']['reqHeaders'], config?: T }) => client.fetch(prefix, `/api/v3/channels/${val6}/chats/${val7}/items/image`, 'POST', option, 'FormData').json(), - $post: async (option?: { data?: Methods19['post']['reqBody'], headers?: Methods19['post']['reqHeaders'], config?: T }) => - (await client.fetch(prefix, `/api/v3/channels/${val6}/chats/${val7}/items/image`, 'POST', option, 'FormData').json()).data + $post: async (option?: { body?: Methods19['post']['reqBody'], headers?: Methods19['post']['reqHeaders'], config?: T }) => + (await client.fetch(prefix, `/api/v3/channels/${val6}/chats/${val7}/items/image`, 'POST', option, 'FormData').json()).body }, video: { - post: (option?: { data?: Methods20['post']['reqBody'], headers?: Methods20['post']['reqHeaders'], config?: T }) => + post: (option?: { body?: Methods20['post']['reqBody'], headers?: Methods20['post']['reqHeaders'], config?: T }) => client.fetch(prefix, `/api/v3/channels/${val6}/chats/${val7}/items/video`, 'POST', option, 'FormData').json(), - $post: async (option?: { data?: Methods20['post']['reqBody'], headers?: Methods20['post']['reqHeaders'], config?: T }) => - (await client.fetch(prefix, `/api/v3/channels/${val6}/chats/${val7}/items/video`, 'POST', option, 'FormData').json()).data + $post: async (option?: { body?: Methods20['post']['reqBody'], headers?: Methods20['post']['reqHeaders'], config?: T }) => + (await client.fetch(prefix, `/api/v3/channels/${val6}/chats/${val7}/items/video`, 'POST', option, 'FormData').json()).body }, get: (option?: { query?: Methods17['get']['query'], headers?: Methods17['get']['reqHeaders'], config?: T }) => client.fetch(prefix, `/api/v3/channels/${val6}/chats/${val7}/items`, 'GET', option).json(), $get: async (option?: { query?: Methods17['get']['query'], headers?: Methods17['get']['reqHeaders'], config?: T }) => - (await client.fetch(prefix, `/api/v3/channels/${val6}/chats/${val7}/items`, 'GET', option).json()).data, - post: (option: { data: Methods17['post']['reqBody'], headers?: Methods17['post']['reqHeaders'], config?: T }) => + (await client.fetch(prefix, `/api/v3/channels/${val6}/chats/${val7}/items`, 'GET', option).json()).body, + post: (option: { body: Methods17['post']['reqBody'], headers?: Methods17['post']['reqHeaders'], config?: T }) => client.fetch(prefix, `/api/v3/channels/${val6}/chats/${val7}/items`, 'POST', option).json(), - $post: async (option: { data: Methods17['post']['reqBody'], headers?: Methods17['post']['reqHeaders'], config?: T }) => - (await client.fetch(prefix, `/api/v3/channels/${val6}/chats/${val7}/items`, 'POST', option).json()).data + $post: async (option: { body: Methods17['post']['reqBody'], headers?: Methods17['post']['reqHeaders'], config?: T }) => + (await client.fetch(prefix, `/api/v3/channels/${val6}/chats/${val7}/items`, 'POST', option).json()).body }, itemslist: { get: (option: { query: Methods21['get']['query'], headers?: Methods21['get']['reqHeaders'], config?: T }) => client.fetch(prefix, `/api/v3/channels/${val6}/chats/${val7}/itemslist`, 'GET', option).json(), $get: async (option: { query: Methods21['get']['query'], headers?: Methods21['get']['reqHeaders'], config?: T }) => - (await client.fetch(prefix, `/api/v3/channels/${val6}/chats/${val7}/itemslist`, 'GET', option).json()).data + (await client.fetch(prefix, `/api/v3/channels/${val6}/chats/${val7}/itemslist`, 'GET', option).json()).body }, users: { remove: { - post: (option: { data: Methods23['post']['reqBody'], headers?: Methods23['post']['reqHeaders'], config?: T }) => + post: (option: { body: Methods23['post']['reqBody'], headers?: Methods23['post']['reqHeaders'], config?: T }) => client.fetch(prefix, `/api/v3/channels/${val6}/chats/${val7}/users/remove`, 'POST', option).send(), - $post: async (option: { data: Methods23['post']['reqBody'], headers?: Methods23['post']['reqHeaders'], config?: T }) => - (await client.fetch(prefix, `/api/v3/channels/${val6}/chats/${val7}/users/remove`, 'POST', option).send()).data + $post: async (option: { body: Methods23['post']['reqBody'], headers?: Methods23['post']['reqHeaders'], config?: T }) => + (await client.fetch(prefix, `/api/v3/channels/${val6}/chats/${val7}/users/remove`, 'POST', option).send()).body }, get: (option?: { headers?: Methods22['get']['reqHeaders'], config?: T }) => client.fetch(prefix, `/api/v3/channels/${val6}/chats/${val7}/users`, 'GET', option).json(), $get: async (option?: { headers?: Methods22['get']['reqHeaders'], config?: T }) => - (await client.fetch(prefix, `/api/v3/channels/${val6}/chats/${val7}/users`, 'GET', option).json()).data, - post: (option: { data: Methods22['post']['reqBody'], headers?: Methods22['post']['reqHeaders'], config?: T }) => + (await client.fetch(prefix, `/api/v3/channels/${val6}/chats/${val7}/users`, 'GET', option).json()).body, + post: (option: { body: Methods22['post']['reqBody'], headers?: Methods22['post']['reqHeaders'], config?: T }) => client.fetch(prefix, `/api/v3/channels/${val6}/chats/${val7}/users`, 'POST', option).send(), - $post: async (option: { data: Methods22['post']['reqBody'], headers?: Methods22['post']['reqHeaders'], config?: T }) => - (await client.fetch(prefix, `/api/v3/channels/${val6}/chats/${val7}/users`, 'POST', option).send()).data, - put: (option: { data: Methods22['put']['reqBody'], headers?: Methods22['put']['reqHeaders'], config?: T }) => + $post: async (option: { body: Methods22['post']['reqBody'], headers?: Methods22['post']['reqHeaders'], config?: T }) => + (await client.fetch(prefix, `/api/v3/channels/${val6}/chats/${val7}/users`, 'POST', option).send()).body, + put: (option: { body: Methods22['put']['reqBody'], headers?: Methods22['put']['reqHeaders'], config?: T }) => client.fetch(prefix, `/api/v3/channels/${val6}/chats/${val7}/users`, 'PUT', option).send(), - $put: async (option: { data: Methods22['put']['reqBody'], headers?: Methods22['put']['reqHeaders'], config?: T }) => - (await client.fetch(prefix, `/api/v3/channels/${val6}/chats/${val7}/users`, 'PUT', option).send()).data + $put: async (option: { body: Methods22['put']['reqBody'], headers?: Methods22['put']['reqHeaders'], config?: T }) => + (await client.fetch(prefix, `/api/v3/channels/${val6}/chats/${val7}/users`, 'PUT', option).send()).body }, get: (option?: { headers?: Methods16['get']['reqHeaders'], config?: T }) => client.fetch(prefix, `/api/v3/channels/${val6}/chats/${val7}`, 'GET', option).json(), $get: async (option?: { headers?: Methods16['get']['reqHeaders'], config?: T }) => - (await client.fetch(prefix, `/api/v3/channels/${val6}/chats/${val7}`, 'GET', option).json()).data, - put: (option: { data: Methods16['put']['reqBody'], headers?: Methods16['put']['reqHeaders'], config?: T }) => + (await client.fetch(prefix, `/api/v3/channels/${val6}/chats/${val7}`, 'GET', option).json()).body, + put: (option: { body: Methods16['put']['reqBody'], headers?: Methods16['put']['reqHeaders'], config?: T }) => client.fetch(prefix, `/api/v3/channels/${val6}/chats/${val7}`, 'PUT', option).send(), - $put: async (option: { data: Methods16['put']['reqBody'], headers?: Methods16['put']['reqHeaders'], config?: T }) => - (await client.fetch(prefix, `/api/v3/channels/${val6}/chats/${val7}`, 'PUT', option).send()).data, + $put: async (option: { body: Methods16['put']['reqBody'], headers?: Methods16['put']['reqHeaders'], config?: T }) => + (await client.fetch(prefix, `/api/v3/channels/${val6}/chats/${val7}`, 'PUT', option).send()).body, delete: (option?: { headers?: Methods16['delete']['reqHeaders'], config?: T }) => client.fetch(prefix, `/api/v3/channels/${val6}/chats/${val7}`, 'DELETE', option).send(), $delete: async (option?: { headers?: Methods16['delete']['reqHeaders'], config?: T }) => - (await client.fetch(prefix, `/api/v3/channels/${val6}/chats/${val7}`, 'DELETE', option).send()).data + (await client.fetch(prefix, `/api/v3/channels/${val6}/chats/${val7}`, 'DELETE', option).send()).body }), get: (option?: { headers?: Methods15['get']['reqHeaders'], config?: T }) => client.fetch(prefix, `/api/v3/channels/${val6}/chats`, 'GET', option).json(), $get: async (option?: { headers?: Methods15['get']['reqHeaders'], config?: T }) => - (await client.fetch(prefix, `/api/v3/channels/${val6}/chats`, 'GET', option).json()).data, - post: (option: { data: Methods15['post']['reqBody'], headers?: Methods15['post']['reqHeaders'], config?: T }) => + (await client.fetch(prefix, `/api/v3/channels/${val6}/chats`, 'GET', option).json()).body, + post: (option: { body: Methods15['post']['reqBody'], headers?: Methods15['post']['reqHeaders'], config?: T }) => client.fetch(prefix, `/api/v3/channels/${val6}/chats`, 'POST', option).json(), - $post: async (option: { data: Methods15['post']['reqBody'], headers?: Methods15['post']['reqHeaders'], config?: T }) => - (await client.fetch(prefix, `/api/v3/channels/${val6}/chats`, 'POST', option).json()).data + $post: async (option: { body: Methods15['post']['reqBody'], headers?: Methods15['post']['reqHeaders'], config?: T }) => + (await client.fetch(prefix, `/api/v3/channels/${val6}/chats`, 'POST', option).json()).body }, notifications: { get: (option?: { query?: Methods24['get']['query'], headers?: Methods24['get']['reqHeaders'], config?: T }) => client.fetch(prefix, `/api/v3/channels/${val6}/notifications`, 'GET', option).json(), $get: async (option?: { query?: Methods24['get']['query'], headers?: Methods24['get']['reqHeaders'], config?: T }) => - (await client.fetch(prefix, `/api/v3/channels/${val6}/notifications`, 'GET', option).json()).data + (await client.fetch(prefix, `/api/v3/channels/${val6}/notifications`, 'GET', option).json()).body }, get: (option?: { query?: Methods14['get']['query'], headers?: Methods14['get']['reqHeaders'], config?: T }) => client.fetch(prefix, `/api/v3/channels/${val6}`, 'GET', option).send(), $get: async (option?: { query?: Methods14['get']['query'], headers?: Methods14['get']['reqHeaders'], config?: T }) => - (await client.fetch(prefix, `/api/v3/channels/${val6}`, 'GET', option).send()).data + (await client.fetch(prefix, `/api/v3/channels/${val6}`, 'GET', option).send()).body }), get: (option?: { query?: Methods11['get']['query'], headers?: Methods11['get']['reqHeaders'], config?: T }) => client.fetch(prefix, '/api/v3/channels', 'GET', option).json(), $get: async (option?: { query?: Methods11['get']['query'], headers?: Methods11['get']['reqHeaders'], config?: T }) => - (await client.fetch(prefix, '/api/v3/channels', 'GET', option).json()).data + (await client.fetch(prefix, '/api/v3/channels', 'GET', option).json()).body }, chats: { _chatId_0: (val8: number) => ({ items: { _itemId: (val9: number) => ({ - post: (option?: { data?: Methods25['post']['reqBody'], headers?: Methods25['post']['reqHeaders'], config?: T }) => + post: (option?: { body?: Methods25['post']['reqBody'], headers?: Methods25['post']['reqHeaders'], config?: T }) => client.fetch(prefix, `/api/v3/chats/${val8}/items/${val9}`, 'POST', option).json(), - $post: async (option?: { data?: Methods25['post']['reqBody'], headers?: Methods25['post']['reqHeaders'], config?: T }) => - (await client.fetch(prefix, `/api/v3/chats/${val8}/items/${val9}`, 'POST', option).json()).data, + $post: async (option?: { body?: Methods25['post']['reqBody'], headers?: Methods25['post']['reqHeaders'], config?: T }) => + (await client.fetch(prefix, `/api/v3/chats/${val8}/items/${val9}`, 'POST', option).json()).body, get: (option?: { headers?: Methods25['get']['reqHeaders'], config?: T }) => client.fetch(prefix, `/api/v3/chats/${val8}/items/${val9}`, 'GET', option).json(), $get: async (option?: { headers?: Methods25['get']['reqHeaders'], config?: T }) => - (await client.fetch(prefix, `/api/v3/chats/${val8}/items/${val9}`, 'GET', option).json()).data + (await client.fetch(prefix, `/api/v3/chats/${val8}/items/${val9}`, 'GET', option).json()).body }) } }), _chatId_1: (val10: string) => ({ items: { audio: { - post: (option?: { data?: Methods27['post']['reqBody'], headers?: Methods27['post']['reqHeaders'], config?: T }) => + post: (option?: { body?: Methods27['post']['reqBody'], headers?: Methods27['post']['reqHeaders'], config?: T }) => client.fetch(prefix, `/api/v3/chats/${val10}/items/audio`, 'POST', option, 'FormData').json(), - $post: async (option?: { data?: Methods27['post']['reqBody'], headers?: Methods27['post']['reqHeaders'], config?: T }) => - (await client.fetch(prefix, `/api/v3/chats/${val10}/items/audio`, 'POST', option, 'FormData').json()).data + $post: async (option?: { body?: Methods27['post']['reqBody'], headers?: Methods27['post']['reqHeaders'], config?: T }) => + (await client.fetch(prefix, `/api/v3/chats/${val10}/items/audio`, 'POST', option, 'FormData').json()).body }, image: { - post: (option?: { data?: Methods28['post']['reqBody'], headers?: Methods28['post']['reqHeaders'], config?: T }) => + post: (option?: { body?: Methods28['post']['reqBody'], headers?: Methods28['post']['reqHeaders'], config?: T }) => client.fetch(prefix, `/api/v3/chats/${val10}/items/image`, 'POST', option, 'FormData').json(), - $post: async (option?: { data?: Methods28['post']['reqBody'], headers?: Methods28['post']['reqHeaders'], config?: T }) => - (await client.fetch(prefix, `/api/v3/chats/${val10}/items/image`, 'POST', option, 'FormData').json()).data + $post: async (option?: { body?: Methods28['post']['reqBody'], headers?: Methods28['post']['reqHeaders'], config?: T }) => + (await client.fetch(prefix, `/api/v3/chats/${val10}/items/image`, 'POST', option, 'FormData').json()).body }, video: { - post: (option?: { data?: Methods29['post']['reqBody'], headers?: Methods29['post']['reqHeaders'], config?: T }) => + post: (option?: { body?: Methods29['post']['reqBody'], headers?: Methods29['post']['reqHeaders'], config?: T }) => client.fetch(prefix, `/api/v3/chats/${val10}/items/video`, 'POST', option, 'FormData').json(), - $post: async (option?: { data?: Methods29['post']['reqBody'], headers?: Methods29['post']['reqHeaders'], config?: T }) => - (await client.fetch(prefix, `/api/v3/chats/${val10}/items/video`, 'POST', option, 'FormData').json()).data + $post: async (option?: { body?: Methods29['post']['reqBody'], headers?: Methods29['post']['reqHeaders'], config?: T }) => + (await client.fetch(prefix, `/api/v3/chats/${val10}/items/video`, 'POST', option, 'FormData').json()).body }, get: (option?: { query?: Methods26['get']['query'], headers?: Methods26['get']['reqHeaders'], config?: T }) => client.fetch(prefix, `/api/v3/chats/${val10}/items`, 'GET', option).json(), $get: async (option?: { query?: Methods26['get']['query'], headers?: Methods26['get']['reqHeaders'], config?: T }) => - (await client.fetch(prefix, `/api/v3/chats/${val10}/items`, 'GET', option).json()).data, - post: (option: { data: Methods26['post']['reqBody'], headers?: Methods26['post']['reqHeaders'], config?: T }) => + (await client.fetch(prefix, `/api/v3/chats/${val10}/items`, 'GET', option).json()).body, + post: (option: { body: Methods26['post']['reqBody'], headers?: Methods26['post']['reqHeaders'], config?: T }) => client.fetch(prefix, `/api/v3/chats/${val10}/items`, 'POST', option).json(), - $post: async (option: { data: Methods26['post']['reqBody'], headers?: Methods26['post']['reqHeaders'], config?: T }) => - (await client.fetch(prefix, `/api/v3/chats/${val10}/items`, 'POST', option).json()).data + $post: async (option: { body: Methods26['post']['reqBody'], headers?: Methods26['post']['reqHeaders'], config?: T }) => + (await client.fetch(prefix, `/api/v3/chats/${val10}/items`, 'POST', option).json()).body } }), keys: { get: (option?: { headers?: Methods30['get']['reqHeaders'], config?: T }) => client.fetch(prefix, '/api/v3/chats/keys', 'GET', option).json(), $get: async (option?: { headers?: Methods30['get']['reqHeaders'], config?: T }) => - (await client.fetch(prefix, '/api/v3/chats/keys', 'GET', option).json()).data + (await client.fetch(prefix, '/api/v3/chats/keys', 'GET', option).json()).body } }, extension: { audio: { - post: (option?: { data?: Methods31['post']['reqBody'], headers?: Methods31['post']['reqHeaders'], config?: T }) => + post: (option?: { body?: Methods31['post']['reqBody'], headers?: Methods31['post']['reqHeaders'], config?: T }) => client.fetch(prefix, '/api/v3/extension/audio', 'POST', option, 'FormData').json(), - $post: async (option?: { data?: Methods31['post']['reqBody'], headers?: Methods31['post']['reqHeaders'], config?: T }) => - (await client.fetch(prefix, '/api/v3/extension/audio', 'POST', option, 'FormData').json()).data + $post: async (option?: { body?: Methods31['post']['reqBody'], headers?: Methods31['post']['reqHeaders'], config?: T }) => + (await client.fetch(prefix, '/api/v3/extension/audio', 'POST', option, 'FormData').json()).body }, image: { - post: (option?: { data?: Methods32['post']['reqBody'], headers?: Methods32['post']['reqHeaders'], config?: T }) => + post: (option?: { body?: Methods32['post']['reqBody'], headers?: Methods32['post']['reqHeaders'], config?: T }) => client.fetch(prefix, '/api/v3/extension/image', 'POST', option, 'FormData').json(), - $post: async (option?: { data?: Methods32['post']['reqBody'], headers?: Methods32['post']['reqHeaders'], config?: T }) => - (await client.fetch(prefix, '/api/v3/extension/image', 'POST', option, 'FormData').json()).data + $post: async (option?: { body?: Methods32['post']['reqBody'], headers?: Methods32['post']['reqHeaders'], config?: T }) => + (await client.fetch(prefix, '/api/v3/extension/image', 'POST', option, 'FormData').json()).body }, parse: { - post: (option: { data: Methods33['post']['reqBody'], headers?: Methods33['post']['reqHeaders'], config?: T }) => + post: (option: { body: Methods33['post']['reqBody'], headers?: Methods33['post']['reqHeaders'], config?: T }) => client.fetch(prefix, '/api/v3/extension/parse', 'POST', option).json(), - $post: async (option: { data: Methods33['post']['reqBody'], headers?: Methods33['post']['reqHeaders'], config?: T }) => - (await client.fetch(prefix, '/api/v3/extension/parse', 'POST', option).json()).data + $post: async (option: { body: Methods33['post']['reqBody'], headers?: Methods33['post']['reqHeaders'], config?: T }) => + (await client.fetch(prefix, '/api/v3/extension/parse', 'POST', option).json()).body }, story: { _storyId: (val11: string) => ({ audio: { - post: (option?: { data?: Methods35['post']['reqBody'], headers?: Methods35['post']['reqHeaders'], config?: T }) => + post: (option?: { body?: Methods35['post']['reqBody'], headers?: Methods35['post']['reqHeaders'], config?: T }) => client.fetch(prefix, `/api/v3/extension/story/${val11}/audio`, 'POST', option, 'FormData').json(), - $post: async (option?: { data?: Methods35['post']['reqBody'], headers?: Methods35['post']['reqHeaders'], config?: T }) => - (await client.fetch(prefix, `/api/v3/extension/story/${val11}/audio`, 'POST', option, 'FormData').json()).data + $post: async (option?: { body?: Methods35['post']['reqBody'], headers?: Methods35['post']['reqHeaders'], config?: T }) => + (await client.fetch(prefix, `/api/v3/extension/story/${val11}/audio`, 'POST', option, 'FormData').json()).body }, image: { - post: (option?: { data?: Methods36['post']['reqBody'], headers?: Methods36['post']['reqHeaders'], config?: T }) => + post: (option?: { body?: Methods36['post']['reqBody'], headers?: Methods36['post']['reqHeaders'], config?: T }) => client.fetch(prefix, `/api/v3/extension/story/${val11}/image`, 'POST', option, 'FormData').json(), - $post: async (option?: { data?: Methods36['post']['reqBody'], headers?: Methods36['post']['reqHeaders'], config?: T }) => - (await client.fetch(prefix, `/api/v3/extension/story/${val11}/image`, 'POST', option, 'FormData').json()).data + $post: async (option?: { body?: Methods36['post']['reqBody'], headers?: Methods36['post']['reqHeaders'], config?: T }) => + (await client.fetch(prefix, `/api/v3/extension/story/${val11}/image`, 'POST', option, 'FormData').json()).body }, video: { - post: (option?: { data?: Methods37['post']['reqBody'], headers?: Methods37['post']['reqHeaders'], config?: T }) => + post: (option?: { body?: Methods37['post']['reqBody'], headers?: Methods37['post']['reqHeaders'], config?: T }) => client.fetch(prefix, `/api/v3/extension/story/${val11}/video`, 'POST', option, 'FormData').json(), - $post: async (option?: { data?: Methods37['post']['reqBody'], headers?: Methods37['post']['reqHeaders'], config?: T }) => - (await client.fetch(prefix, `/api/v3/extension/story/${val11}/video`, 'POST', option, 'FormData').json()).data + $post: async (option?: { body?: Methods37['post']['reqBody'], headers?: Methods37['post']['reqHeaders'], config?: T }) => + (await client.fetch(prefix, `/api/v3/extension/story/${val11}/video`, 'POST', option, 'FormData').json()).body }, - post: (option: { data: Methods34['post']['reqBody'], headers?: Methods34['post']['reqHeaders'], config?: T }) => + post: (option: { body: Methods34['post']['reqBody'], headers?: Methods34['post']['reqHeaders'], config?: T }) => client.fetch(prefix, `/api/v3/extension/story/${val11}`, 'POST', option, 'FormData').json(), - $post: async (option: { data: Methods34['post']['reqBody'], headers?: Methods34['post']['reqHeaders'], config?: T }) => - (await client.fetch(prefix, `/api/v3/extension/story/${val11}`, 'POST', option, 'FormData').json()).data + $post: async (option: { body: Methods34['post']['reqBody'], headers?: Methods34['post']['reqHeaders'], config?: T }) => + (await client.fetch(prefix, `/api/v3/extension/story/${val11}`, 'POST', option, 'FormData').json()).body }) }, video: { - post: (option?: { data?: Methods38['post']['reqBody'], headers?: Methods38['post']['reqHeaders'], config?: T }) => + post: (option?: { body?: Methods38['post']['reqBody'], headers?: Methods38['post']['reqHeaders'], config?: T }) => client.fetch(prefix, '/api/v3/extension/video', 'POST', option, 'FormData').json(), - $post: async (option?: { data?: Methods38['post']['reqBody'], headers?: Methods38['post']['reqHeaders'], config?: T }) => - (await client.fetch(prefix, '/api/v3/extension/video', 'POST', option, 'FormData').json()).data + $post: async (option?: { body?: Methods38['post']['reqBody'], headers?: Methods38['post']['reqHeaders'], config?: T }) => + (await client.fetch(prefix, '/api/v3/extension/video', 'POST', option, 'FormData').json()).body } }, fcm_token: { - post: (option: { data: Methods39['post']['reqBody'], headers?: Methods39['post']['reqHeaders'], config?: T }) => + post: (option: { body: Methods39['post']['reqBody'], headers?: Methods39['post']['reqHeaders'], config?: T }) => client.fetch(prefix, '/api/v3/fcm_token', 'POST', option).send(), - $post: async (option: { data: Methods39['post']['reqBody'], headers?: Methods39['post']['reqHeaders'], config?: T }) => - (await client.fetch(prefix, '/api/v3/fcm_token', 'POST', option).send()).data + $post: async (option: { body: Methods39['post']['reqBody'], headers?: Methods39['post']['reqHeaders'], config?: T }) => + (await client.fetch(prefix, '/api/v3/fcm_token', 'POST', option).send()).body }, info: { get: (option?: { headers?: Methods40['get']['reqHeaders'], config?: T }) => client.fetch(prefix, '/api/v3/info', 'GET', option).json(), $get: async (option?: { headers?: Methods40['get']['reqHeaders'], config?: T }) => - (await client.fetch(prefix, '/api/v3/info', 'GET', option).json()).data + (await client.fetch(prefix, '/api/v3/info', 'GET', option).json()).body }, login: { - post: (option: { data: Methods41['post']['reqBody'], headers?: Methods41['post']['reqHeaders'], config?: T }) => + post: (option: { body: Methods41['post']['reqBody'], headers?: Methods41['post']['reqHeaders'], config?: T }) => client.fetch(prefix, '/api/v3/login', 'POST', option).json(), - $post: async (option: { data: Methods41['post']['reqBody'], headers?: Methods41['post']['reqHeaders'], config?: T }) => - (await client.fetch(prefix, '/api/v3/login', 'POST', option).json()).data + $post: async (option: { body: Methods41['post']['reqBody'], headers?: Methods41['post']['reqHeaders'], config?: T }) => + (await client.fetch(prefix, '/api/v3/login', 'POST', option).json()).body }, logout: { - post: (option: { data: Methods42['post']['reqBody'], headers?: Methods42['post']['reqHeaders'], config?: T }) => + post: (option: { body: Methods42['post']['reqBody'], headers?: Methods42['post']['reqHeaders'], config?: T }) => client.fetch(prefix, '/api/v3/logout', 'POST', option).send(), - $post: async (option: { data: Methods42['post']['reqBody'], headers?: Methods42['post']['reqHeaders'], config?: T }) => - (await client.fetch(prefix, '/api/v3/logout', 'POST', option).send()).data + $post: async (option: { body: Methods42['post']['reqBody'], headers?: Methods42['post']['reqHeaders'], config?: T }) => + (await client.fetch(prefix, '/api/v3/logout', 'POST', option).send()).body }, me: { get: (option?: { headers?: Methods43['get']['reqHeaders'], config?: T }) => client.fetch(prefix, '/api/v3/me', 'GET', option).json(), $get: async (option?: { headers?: Methods43['get']['reqHeaders'], config?: T }) => - (await client.fetch(prefix, '/api/v3/me', 'GET', option).json()).data + (await client.fetch(prefix, '/api/v3/me', 'GET', option).json()).body }, organisation: { users: { get: (option: { query: Methods45['get']['query'], headers?: Methods45['get']['reqHeaders'], config?: T }) => client.fetch(prefix, '/api/v3/organisation/users', 'GET', option).json(), $get: async (option: { query: Methods45['get']['query'], headers?: Methods45['get']['reqHeaders'], config?: T }) => - (await client.fetch(prefix, '/api/v3/organisation/users', 'GET', option).json()).data + (await client.fetch(prefix, '/api/v3/organisation/users', 'GET', option).json()).body }, get: (option?: { headers?: Methods44['get']['reqHeaders'], config?: T }) => client.fetch(prefix, '/api/v3/organisation', 'GET', option).json(), $get: async (option?: { headers?: Methods44['get']['reqHeaders'], config?: T }) => - (await client.fetch(prefix, '/api/v3/organisation', 'GET', option).json()).data + (await client.fetch(prefix, '/api/v3/organisation', 'GET', option).json()).body }, stories: { _storyId: (val12: number) => ({ items: { _itemId: (val13: number) => ({ reaction: { - post: (option: { data: Methods48['post']['reqBody'], headers?: Methods48['post']['reqHeaders'], config?: T }) => + post: (option: { body: Methods48['post']['reqBody'], headers?: Methods48['post']['reqHeaders'], config?: T }) => client.fetch(prefix, `/api/v3/stories/${val12}/items/${val13}/reaction`, 'POST', option).json(), - $post: async (option: { data: Methods48['post']['reqBody'], headers?: Methods48['post']['reqHeaders'], config?: T }) => - (await client.fetch(prefix, `/api/v3/stories/${val12}/items/${val13}/reaction`, 'POST', option).json()).data + $post: async (option: { body: Methods48['post']['reqBody'], headers?: Methods48['post']['reqHeaders'], config?: T }) => + (await client.fetch(prefix, `/api/v3/stories/${val12}/items/${val13}/reaction`, 'POST', option).json()).body }, get: (option?: { headers?: Methods47['get']['reqHeaders'], config?: T }) => client.fetch(prefix, `/api/v3/stories/${val12}/items/${val13}`, 'GET', option).json(), $get: async (option?: { headers?: Methods47['get']['reqHeaders'], config?: T }) => - (await client.fetch(prefix, `/api/v3/stories/${val12}/items/${val13}`, 'GET', option).json()).data + (await client.fetch(prefix, `/api/v3/stories/${val12}/items/${val13}`, 'GET', option).json()).body }), get: (option?: { query?: Methods46['get']['query'], headers?: Methods46['get']['reqHeaders'], config?: T }) => client.fetch(prefix, `/api/v3/stories/${val12}/items`, 'GET', option).json(), $get: async (option?: { query?: Methods46['get']['query'], headers?: Methods46['get']['reqHeaders'], config?: T }) => - (await client.fetch(prefix, `/api/v3/stories/${val12}/items`, 'GET', option).json()).data + (await client.fetch(prefix, `/api/v3/stories/${val12}/items`, 'GET', option).json()).body } }) }, @@ -426,18 +426,18 @@ const api = (client: AspidaClient) => { get: (option?: { headers?: Methods50['get']['reqHeaders'], config?: T }) => client.fetch(prefix, `/api/v3/user/${val14}`, 'GET', option).json(), $get: async (option?: { headers?: Methods50['get']['reqHeaders'], config?: T }) => - (await client.fetch(prefix, `/api/v3/user/${val14}`, 'GET', option).json()).data + (await client.fetch(prefix, `/api/v3/user/${val14}`, 'GET', option).json()).body }), profile: { - put: (option?: { data?: Methods51['put']['reqBody'], headers?: Methods51['put']['reqHeaders'], config?: T }) => + put: (option?: { body?: Methods51['put']['reqBody'], headers?: Methods51['put']['reqHeaders'], config?: T }) => client.fetch(prefix, '/api/v3/user/profile', 'PUT', option, 'FormData').send(), - $put: async (option?: { data?: Methods51['put']['reqBody'], headers?: Methods51['put']['reqHeaders'], config?: T }) => - (await client.fetch(prefix, '/api/v3/user/profile', 'PUT', option, 'FormData').send()).data + $put: async (option?: { body?: Methods51['put']['reqBody'], headers?: Methods51['put']['reqHeaders'], config?: T }) => + (await client.fetch(prefix, '/api/v3/user/profile', 'PUT', option, 'FormData').send()).body }, get: (option?: { headers?: Methods49['get']['reqHeaders'], config?: T }) => client.fetch(prefix, '/api/v3/user', 'GET', option).json(), $get: async (option?: { headers?: Methods49['get']['reqHeaders'], config?: T }) => - (await client.fetch(prefix, '/api/v3/user', 'GET', option).json()).data + (await client.fetch(prefix, '/api/v3/user', 'GET', option).json()).body } } } diff --git a/samples/simple/$api.ts b/samples/simple/$api.ts index 440f329b..574da8ed 100644 --- a/samples/simple/$api.ts +++ b/samples/simple/$api.ts @@ -18,29 +18,29 @@ const api = (client: AspidaClient) => { put: (option?: { config?: T }) => client.fetch(prefix, `/dummy/${val0}/content`, 'PUT', option).text(), $put: async (option?: { config?: T }) => - (await client.fetch(prefix, `/dummy/${val0}/content`, 'PUT', option).text()).data + (await client.fetch(prefix, `/dummy/${val0}/content`, 'PUT', option).text()).body }, query: { put: (option?: { query?: Methods1['put']['query'], config?: T }) => client.fetch(prefix, `/dummy/${val0}/query`, 'PUT', option).send(), $put: async (option?: { query?: Methods1['put']['query'], config?: T }) => - (await client.fetch(prefix, `/dummy/${val0}/query`, 'PUT', option).send()).data + (await client.fetch(prefix, `/dummy/${val0}/query`, 'PUT', option).send()).body }, simple: { put: (option?: { config?: T }) => client.fetch(prefix, `/dummy/${val0}/simple`, 'PUT', option).send(), $put: async (option?: { config?: T }) => - (await client.fetch(prefix, `/dummy/${val0}/simple`, 'PUT', option).send()).data + (await client.fetch(prefix, `/dummy/${val0}/simple`, 'PUT', option).send()).body } }) }, file: { _id: (val1: number) => ({ upload: { - post: (option?: { data?: Methods3['post']['reqBody'], query?: Methods3['post']['query'], config?: T }) => + post: (option?: { body?: Methods3['post']['reqBody'], query?: Methods3['post']['query'], config?: T }) => client.fetch(prefix, `/file/${val1}/upload`, 'POST', option, 'Blob').send(), - $post: async (option?: { data?: Methods3['post']['reqBody'], query?: Methods3['post']['query'], config?: T }) => - (await client.fetch(prefix, `/file/${val1}/upload`, 'POST', option, 'Blob').send()).data + $post: async (option?: { body?: Methods3['post']['reqBody'], query?: Methods3['post']['query'], config?: T }) => + (await client.fetch(prefix, `/file/${val1}/upload`, 'POST', option, 'Blob').send()).body } }) }, @@ -50,30 +50,30 @@ const api = (client: AspidaClient) => { get: (option?: { query?: Methods5['get']['query'], config?: T }) => client.fetch(prefix, `/user/${val2}/abc`, 'GET', option).send(), $get: async (option?: { query?: Methods5['get']['query'], config?: T }) => - (await client.fetch(prefix, `/user/${val2}/abc`, 'GET', option).send()).data + (await client.fetch(prefix, `/user/${val2}/abc`, 'GET', option).send()).body }, xyz: { get: (option?: { config?: T }) => client.fetch(prefix, `/user/${val2}/xyz`, 'GET', option).send(), $get: async (option?: { config?: T }) => - (await client.fetch(prefix, `/user/${val2}/xyz`, 'GET', option).send()).data, + (await client.fetch(prefix, `/user/${val2}/xyz`, 'GET', option).send()).body, put: (option?: { config?: T }) => client.fetch(prefix, `/user/${val2}/xyz`, 'PUT', option).send(), $put: async (option?: { config?: T }) => - (await client.fetch(prefix, `/user/${val2}/xyz`, 'PUT', option).send()).data + (await client.fetch(prefix, `/user/${val2}/xyz`, 'PUT', option).send()).body }, get: (option?: { config?: T }) => client.fetch(prefix, `/user/${val2}`, 'GET', option).send(), $get: async (option?: { config?: T }) => - (await client.fetch(prefix, `/user/${val2}`, 'GET', option).send()).data, + (await client.fetch(prefix, `/user/${val2}`, 'GET', option).send()).body, patch: (option?: { config?: T }) => client.fetch(prefix, `/user/${val2}`, 'PATCH', option).send(), $patch: async (option?: { config?: T }) => - (await client.fetch(prefix, `/user/${val2}`, 'PATCH', option).send()).data, + (await client.fetch(prefix, `/user/${val2}`, 'PATCH', option).send()).body, delete: (option?: { config?: T }) => client.fetch(prefix, `/user/${val2}`, 'DELETE', option).send(), $delete: async (option?: { config?: T }) => - (await client.fetch(prefix, `/user/${val2}`, 'DELETE', option).send()).data + (await client.fetch(prefix, `/user/${val2}`, 'DELETE', option).send()).body }) } } diff --git a/samples/strapi/$api.ts b/samples/strapi/$api.ts index 6902ca78..f12773c2 100644 --- a/samples/strapi/$api.ts +++ b/samples/strapi/$api.ts @@ -33,44 +33,44 @@ const api = (client: AspidaClient) => { get: (option?: { config?: T }) => client.fetch(prefix, `/auth/${val0}/callback`, 'GET', option).json(), $get: async (option?: { config?: T }) => - (await client.fetch(prefix, `/auth/${val0}/callback`, 'GET', option).json()).data + (await client.fetch(prefix, `/auth/${val0}/callback`, 'GET', option).json()).body } }), email_confirmation: { get: (option?: { config?: T }) => client.fetch(prefix, '/auth/email-confirmation', 'GET', option).json(), $get: async (option?: { config?: T }) => - (await client.fetch(prefix, '/auth/email-confirmation', 'GET', option).json()).data + (await client.fetch(prefix, '/auth/email-confirmation', 'GET', option).json()).body }, forgot_password: { - post: (option: { data: Methods2['post']['reqBody'], config?: T }) => + post: (option: { body: Methods2['post']['reqBody'], config?: T }) => client.fetch(prefix, '/auth/forgot-password', 'POST', option).json(), - $post: async (option: { data: Methods2['post']['reqBody'], config?: T }) => - (await client.fetch(prefix, '/auth/forgot-password', 'POST', option).json()).data + $post: async (option: { body: Methods2['post']['reqBody'], config?: T }) => + (await client.fetch(prefix, '/auth/forgot-password', 'POST', option).json()).body }, local: { register: { - post: (option: { data: Methods4['post']['reqBody'], config?: T }) => + post: (option: { body: Methods4['post']['reqBody'], config?: T }) => client.fetch(prefix, '/auth/local/register', 'POST', option).json(), - $post: async (option: { data: Methods4['post']['reqBody'], config?: T }) => - (await client.fetch(prefix, '/auth/local/register', 'POST', option).json()).data + $post: async (option: { body: Methods4['post']['reqBody'], config?: T }) => + (await client.fetch(prefix, '/auth/local/register', 'POST', option).json()).body }, - post: (option: { data: Methods3['post']['reqBody'], config?: T }) => + post: (option: { body: Methods3['post']['reqBody'], config?: T }) => client.fetch(prefix, '/auth/local', 'POST', option).json(), - $post: async (option: { data: Methods3['post']['reqBody'], config?: T }) => - (await client.fetch(prefix, '/auth/local', 'POST', option).json()).data + $post: async (option: { body: Methods3['post']['reqBody'], config?: T }) => + (await client.fetch(prefix, '/auth/local', 'POST', option).json()).body }, reset_password: { - post: (option: { data: Methods5['post']['reqBody'], config?: T }) => + post: (option: { body: Methods5['post']['reqBody'], config?: T }) => client.fetch(prefix, '/auth/reset-password', 'POST', option).json(), - $post: async (option: { data: Methods5['post']['reqBody'], config?: T }) => - (await client.fetch(prefix, '/auth/reset-password', 'POST', option).json()).data + $post: async (option: { body: Methods5['post']['reqBody'], config?: T }) => + (await client.fetch(prefix, '/auth/reset-password', 'POST', option).json()).body }, send_email_confirmation: { - post: (option: { data: Methods6['post']['reqBody'], config?: T }) => + post: (option: { body: Methods6['post']['reqBody'], config?: T }) => client.fetch(prefix, '/auth/send-email-confirmation', 'POST', option).json(), - $post: async (option: { data: Methods6['post']['reqBody'], config?: T }) => - (await client.fetch(prefix, '/auth/send-email-confirmation', 'POST', option).json()).data + $post: async (option: { body: Methods6['post']['reqBody'], config?: T }) => + (await client.fetch(prefix, '/auth/send-email-confirmation', 'POST', option).json()).body } }, connect: { @@ -78,14 +78,14 @@ const api = (client: AspidaClient) => { get: (option?: { config?: T }) => client.fetch(prefix, `/connect/${val1}`, 'GET', option).json(), $get: async (option?: { config?: T }) => - (await client.fetch(prefix, `/connect/${val1}`, 'GET', option).json()).data + (await client.fetch(prefix, `/connect/${val1}`, 'GET', option).json()).body }) }, email: { - post: (option: { data: Methods8['post']['reqBody'], config?: T }) => + post: (option: { body: Methods8['post']['reqBody'], config?: T }) => client.fetch(prefix, '/email', 'POST', option).json(), - $post: async (option: { data: Methods8['post']['reqBody'], config?: T }) => - (await client.fetch(prefix, '/email', 'POST', option).json()).data + $post: async (option: { body: Methods8['post']['reqBody'], config?: T }) => + (await client.fetch(prefix, '/email', 'POST', option).json()).body }, upload: { files: { @@ -93,101 +93,101 @@ const api = (client: AspidaClient) => { get: (option?: { config?: T }) => client.fetch(prefix, `/upload/files/${val2}`, 'GET', option).json(), $get: async (option?: { config?: T }) => - (await client.fetch(prefix, `/upload/files/${val2}`, 'GET', option).json()).data, + (await client.fetch(prefix, `/upload/files/${val2}`, 'GET', option).json()).body, delete: (option?: { config?: T }) => client.fetch(prefix, `/upload/files/${val2}`, 'DELETE', option).json(), $delete: async (option?: { config?: T }) => - (await client.fetch(prefix, `/upload/files/${val2}`, 'DELETE', option).json()).data + (await client.fetch(prefix, `/upload/files/${val2}`, 'DELETE', option).json()).body }), count: { get: (option?: { config?: T }) => client.fetch(prefix, '/upload/files/count', 'GET', option).json(), $get: async (option?: { config?: T }) => - (await client.fetch(prefix, '/upload/files/count', 'GET', option).json()).data + (await client.fetch(prefix, '/upload/files/count', 'GET', option).json()).body }, get: (option?: { config?: T }) => client.fetch(prefix, '/upload/files', 'GET', option).json(), $get: async (option?: { config?: T }) => - (await client.fetch(prefix, '/upload/files', 'GET', option).json()).data + (await client.fetch(prefix, '/upload/files', 'GET', option).json()).body }, search: { _id: (val3: string) => ({ get: (option?: { config?: T }) => client.fetch(prefix, `/upload/search/${val3}`, 'GET', option).json(), $get: async (option?: { config?: T }) => - (await client.fetch(prefix, `/upload/search/${val3}`, 'GET', option).json()).data + (await client.fetch(prefix, `/upload/search/${val3}`, 'GET', option).json()).body }) }, - post: (option: { data: Methods9['post']['reqBody'], config?: T }) => + post: (option: { body: Methods9['post']['reqBody'], config?: T }) => client.fetch(prefix, '/upload', 'POST', option).json(), - $post: async (option: { data: Methods9['post']['reqBody'], config?: T }) => - (await client.fetch(prefix, '/upload', 'POST', option).json()).data + $post: async (option: { body: Methods9['post']['reqBody'], config?: T }) => + (await client.fetch(prefix, '/upload', 'POST', option).json()).body }, users: { _id: (val4: string) => ({ get: (option?: { config?: T }) => client.fetch(prefix, `/users/${val4}`, 'GET', option).json(), $get: async (option?: { config?: T }) => - (await client.fetch(prefix, `/users/${val4}`, 'GET', option).json()).data, - put: (option: { data: Methods15['put']['reqBody'], config?: T }) => + (await client.fetch(prefix, `/users/${val4}`, 'GET', option).json()).body, + put: (option: { body: Methods15['put']['reqBody'], config?: T }) => client.fetch(prefix, `/users/${val4}`, 'PUT', option).json(), - $put: async (option: { data: Methods15['put']['reqBody'], config?: T }) => - (await client.fetch(prefix, `/users/${val4}`, 'PUT', option).json()).data, + $put: async (option: { body: Methods15['put']['reqBody'], config?: T }) => + (await client.fetch(prefix, `/users/${val4}`, 'PUT', option).json()).body, delete: (option?: { config?: T }) => client.fetch(prefix, `/users/${val4}`, 'DELETE', option).json(), $delete: async (option?: { config?: T }) => - (await client.fetch(prefix, `/users/${val4}`, 'DELETE', option).json()).data + (await client.fetch(prefix, `/users/${val4}`, 'DELETE', option).json()).body }), me: { get: (option?: { config?: T }) => client.fetch(prefix, '/users/me', 'GET', option).json(), $get: async (option?: { config?: T }) => - (await client.fetch(prefix, '/users/me', 'GET', option).json()).data + (await client.fetch(prefix, '/users/me', 'GET', option).json()).body }, get: (option?: { query?: Methods14['get']['query'], config?: T }) => client.fetch(prefix, '/users', 'GET', option).json(), $get: async (option?: { query?: Methods14['get']['query'], config?: T }) => - (await client.fetch(prefix, '/users', 'GET', option).json()).data + (await client.fetch(prefix, '/users', 'GET', option).json()).body }, users_permissions: { init: { get: (option?: { config?: T }) => client.fetch(prefix, '/users-permissions/init', 'GET', option).json(), $get: async (option?: { config?: T }) => - (await client.fetch(prefix, '/users-permissions/init', 'GET', option).json()).data + (await client.fetch(prefix, '/users-permissions/init', 'GET', option).json()).body }, roles: { _id: (val5: string) => ({ get: (option?: { config?: T }) => client.fetch(prefix, `/users-permissions/roles/${val5}`, 'GET', option).json(), $get: async (option?: { config?: T }) => - (await client.fetch(prefix, `/users-permissions/roles/${val5}`, 'GET', option).json()).data + (await client.fetch(prefix, `/users-permissions/roles/${val5}`, 'GET', option).json()).body }), _role: (val6: string) => ({ - put: (option: { data: Methods20['put']['reqBody'], config?: T }) => + put: (option: { body: Methods20['put']['reqBody'], config?: T }) => client.fetch(prefix, `/users-permissions/roles/${val6}`, 'PUT', option).json(), - $put: async (option: { data: Methods20['put']['reqBody'], config?: T }) => - (await client.fetch(prefix, `/users-permissions/roles/${val6}`, 'PUT', option).json()).data, + $put: async (option: { body: Methods20['put']['reqBody'], config?: T }) => + (await client.fetch(prefix, `/users-permissions/roles/${val6}`, 'PUT', option).json()).body, delete: (option?: { config?: T }) => client.fetch(prefix, `/users-permissions/roles/${val6}`, 'DELETE', option).json(), $delete: async (option?: { config?: T }) => - (await client.fetch(prefix, `/users-permissions/roles/${val6}`, 'DELETE', option).json()).data + (await client.fetch(prefix, `/users-permissions/roles/${val6}`, 'DELETE', option).json()).body }), get: (option?: { query?: Methods18['get']['query'], config?: T }) => client.fetch(prefix, '/users-permissions/roles', 'GET', option).json(), $get: async (option?: { query?: Methods18['get']['query'], config?: T }) => - (await client.fetch(prefix, '/users-permissions/roles', 'GET', option).json()).data, - post: (option: { data: Methods18['post']['reqBody'], config?: T }) => + (await client.fetch(prefix, '/users-permissions/roles', 'GET', option).json()).body, + post: (option: { body: Methods18['post']['reqBody'], config?: T }) => client.fetch(prefix, '/users-permissions/roles', 'POST', option).json(), - $post: async (option: { data: Methods18['post']['reqBody'], config?: T }) => - (await client.fetch(prefix, '/users-permissions/roles', 'POST', option).json()).data + $post: async (option: { body: Methods18['post']['reqBody'], config?: T }) => + (await client.fetch(prefix, '/users-permissions/roles', 'POST', option).json()).body }, search: { _id: (val7: string) => ({ get: (option?: { query?: Methods21['get']['query'], config?: T }) => client.fetch(prefix, `/users-permissions/search/${val7}`, 'GET', option).json(), $get: async (option?: { query?: Methods21['get']['query'], config?: T }) => - (await client.fetch(prefix, `/users-permissions/search/${val7}`, 'GET', option).json()).data + (await client.fetch(prefix, `/users-permissions/search/${val7}`, 'GET', option).json()).body }) } } diff --git a/samples/swagger/$api.ts b/samples/swagger/$api.ts index 1081db8d..fd5403d1 100644 --- a/samples/swagger/$api.ts +++ b/samples/swagger/$api.ts @@ -20,61 +20,61 @@ const api = (client: AspidaClient) => { pet: { _petId: (val0: number) => ({ uploadImage: { - post: (option?: { data?: Methods2['post']['reqBody'], config?: T }) => + post: (option?: { body?: Methods2['post']['reqBody'], config?: T }) => client.fetch(prefix, `/pet/${val0}/uploadImage`, 'POST', option, 'FormData').json(), - $post: async (option?: { data?: Methods2['post']['reqBody'], config?: T }) => - (await client.fetch(prefix, `/pet/${val0}/uploadImage`, 'POST', option, 'FormData').json()).data + $post: async (option?: { body?: Methods2['post']['reqBody'], config?: T }) => + (await client.fetch(prefix, `/pet/${val0}/uploadImage`, 'POST', option, 'FormData').json()).body }, get: (option?: { config?: T }) => client.fetch(prefix, `/pet/${val0}`, 'GET', option).json(), $get: async (option?: { config?: T }) => - (await client.fetch(prefix, `/pet/${val0}`, 'GET', option).json()).data, - post: (option?: { data?: Methods1['post']['reqBody'], config?: T }) => + (await client.fetch(prefix, `/pet/${val0}`, 'GET', option).json()).body, + post: (option?: { body?: Methods1['post']['reqBody'], config?: T }) => client.fetch(prefix, `/pet/${val0}`, 'POST', option, 'URLSearchParams').send(), - $post: async (option?: { data?: Methods1['post']['reqBody'], config?: T }) => - (await client.fetch(prefix, `/pet/${val0}`, 'POST', option, 'URLSearchParams').send()).data, + $post: async (option?: { body?: Methods1['post']['reqBody'], config?: T }) => + (await client.fetch(prefix, `/pet/${val0}`, 'POST', option, 'URLSearchParams').send()).body, delete: (option?: { headers?: Methods1['delete']['reqHeaders'], config?: T }) => client.fetch(prefix, `/pet/${val0}`, 'DELETE', option).send(), $delete: async (option?: { headers?: Methods1['delete']['reqHeaders'], config?: T }) => - (await client.fetch(prefix, `/pet/${val0}`, 'DELETE', option).send()).data + (await client.fetch(prefix, `/pet/${val0}`, 'DELETE', option).send()).body }), findByStatus: { get: (option: { query: Methods3['get']['query'], config?: T }) => client.fetch(prefix, '/pet/findByStatus', 'GET', option).json(), $get: async (option: { query: Methods3['get']['query'], config?: T }) => - (await client.fetch(prefix, '/pet/findByStatus', 'GET', option).json()).data + (await client.fetch(prefix, '/pet/findByStatus', 'GET', option).json()).body }, - post: (option: { data: Methods0['post']['reqBody'], config?: T }) => + post: (option: { body: Methods0['post']['reqBody'], config?: T }) => client.fetch(prefix, '/pet', 'POST', option).send(), - $post: async (option: { data: Methods0['post']['reqBody'], config?: T }) => - (await client.fetch(prefix, '/pet', 'POST', option).send()).data, - put: (option: { data: Methods0['put']['reqBody'], config?: T }) => + $post: async (option: { body: Methods0['post']['reqBody'], config?: T }) => + (await client.fetch(prefix, '/pet', 'POST', option).send()).body, + put: (option: { body: Methods0['put']['reqBody'], config?: T }) => client.fetch(prefix, '/pet', 'PUT', option).send(), - $put: async (option: { data: Methods0['put']['reqBody'], config?: T }) => - (await client.fetch(prefix, '/pet', 'PUT', option).send()).data + $put: async (option: { body: Methods0['put']['reqBody'], config?: T }) => + (await client.fetch(prefix, '/pet', 'PUT', option).send()).body }, store: { inventory: { get: (option?: { config?: T }) => client.fetch(prefix, '/store/inventory', 'GET', option).json(), $get: async (option?: { config?: T }) => - (await client.fetch(prefix, '/store/inventory', 'GET', option).json()).data + (await client.fetch(prefix, '/store/inventory', 'GET', option).json()).body }, order: { _orderId: (val1: number) => ({ get: (option?: { config?: T }) => client.fetch(prefix, `/store/order/${val1}`, 'GET', option).json(), $get: async (option?: { config?: T }) => - (await client.fetch(prefix, `/store/order/${val1}`, 'GET', option).json()).data, + (await client.fetch(prefix, `/store/order/${val1}`, 'GET', option).json()).body, delete: (option?: { config?: T }) => client.fetch(prefix, `/store/order/${val1}`, 'DELETE', option).send(), $delete: async (option?: { config?: T }) => - (await client.fetch(prefix, `/store/order/${val1}`, 'DELETE', option).send()).data + (await client.fetch(prefix, `/store/order/${val1}`, 'DELETE', option).send()).body }), - post: (option: { data: Methods5['post']['reqBody'], config?: T }) => + post: (option: { body: Methods5['post']['reqBody'], config?: T }) => client.fetch(prefix, '/store/order', 'POST', option).json(), - $post: async (option: { data: Methods5['post']['reqBody'], config?: T }) => - (await client.fetch(prefix, '/store/order', 'POST', option).json()).data + $post: async (option: { body: Methods5['post']['reqBody'], config?: T }) => + (await client.fetch(prefix, '/store/order', 'POST', option).json()).body } }, user: { @@ -82,44 +82,44 @@ const api = (client: AspidaClient) => { get: (option?: { config?: T }) => client.fetch(prefix, `/user/${val2}`, 'GET', option).json(), $get: async (option?: { config?: T }) => - (await client.fetch(prefix, `/user/${val2}`, 'GET', option).json()).data, - put: (option: { data: Methods8['put']['reqBody'], config?: T }) => + (await client.fetch(prefix, `/user/${val2}`, 'GET', option).json()).body, + put: (option: { body: Methods8['put']['reqBody'], config?: T }) => client.fetch(prefix, `/user/${val2}`, 'PUT', option).send(), - $put: async (option: { data: Methods8['put']['reqBody'], config?: T }) => - (await client.fetch(prefix, `/user/${val2}`, 'PUT', option).send()).data, + $put: async (option: { body: Methods8['put']['reqBody'], config?: T }) => + (await client.fetch(prefix, `/user/${val2}`, 'PUT', option).send()).body, delete: (option?: { config?: T }) => client.fetch(prefix, `/user/${val2}`, 'DELETE', option).send(), $delete: async (option?: { config?: T }) => - (await client.fetch(prefix, `/user/${val2}`, 'DELETE', option).send()).data + (await client.fetch(prefix, `/user/${val2}`, 'DELETE', option).send()).body }), createWithArray: { - post: (option: { data: Methods9['post']['reqBody'], config?: T }) => + post: (option: { body: Methods9['post']['reqBody'], config?: T }) => client.fetch(prefix, '/user/createWithArray', 'POST', option).send(), - $post: async (option: { data: Methods9['post']['reqBody'], config?: T }) => - (await client.fetch(prefix, '/user/createWithArray', 'POST', option).send()).data + $post: async (option: { body: Methods9['post']['reqBody'], config?: T }) => + (await client.fetch(prefix, '/user/createWithArray', 'POST', option).send()).body }, createWithList: { - post: (option: { data: Methods10['post']['reqBody'], config?: T }) => + post: (option: { body: Methods10['post']['reqBody'], config?: T }) => client.fetch(prefix, '/user/createWithList', 'POST', option).send(), - $post: async (option: { data: Methods10['post']['reqBody'], config?: T }) => - (await client.fetch(prefix, '/user/createWithList', 'POST', option).send()).data + $post: async (option: { body: Methods10['post']['reqBody'], config?: T }) => + (await client.fetch(prefix, '/user/createWithList', 'POST', option).send()).body }, login: { get: (option: { query: Methods11['get']['query'], config?: T }) => client.fetch(prefix, '/user/login', 'GET', option).text(), $get: async (option: { query: Methods11['get']['query'], config?: T }) => - (await client.fetch(prefix, '/user/login', 'GET', option).text()).data + (await client.fetch(prefix, '/user/login', 'GET', option).text()).body }, logout: { get: (option?: { config?: T }) => client.fetch(prefix, '/user/logout', 'GET', option).send(), $get: async (option?: { config?: T }) => - (await client.fetch(prefix, '/user/logout', 'GET', option).send()).data + (await client.fetch(prefix, '/user/logout', 'GET', option).send()).body }, - post: (option: { data: Methods7['post']['reqBody'], config?: T }) => + post: (option: { body: Methods7['post']['reqBody'], config?: T }) => client.fetch(prefix, '/user', 'POST', option).send(), - $post: async (option: { data: Methods7['post']['reqBody'], config?: T }) => - (await client.fetch(prefix, '/user', 'POST', option).send()).data + $post: async (option: { body: Methods7['post']['reqBody'], config?: T }) => + (await client.fetch(prefix, '/user', 'POST', option).send()).body } } } diff --git a/src/resolveExternalRefs.ts b/src/resolveExternalRefs.ts index b49f0c56..511db6f0 100644 --- a/src/resolveExternalRefs.ts +++ b/src/resolveExternalRefs.ts @@ -41,9 +41,7 @@ const fetchExternalDocs = async (docs: DocType, inputDir: string) => { if (fetchingUrls.includes(url)) return fetchingUrls.push(url) - const filePath = url.startsWith('http') - ? url - : path.posix.join(input.split('/').slice(0, -1).join('/'), url) + const filePath = url.startsWith('http') ? url : path.posix.join(path.dirname(input), url) const text = await (filePath.startsWith('http') ? getText(filePath) : fs.promises.readFile(filePath, 'utf8')) diff --git a/yarn.lock b/yarn.lock index b824eaf2..a53621b3 100644 --- a/yarn.lock +++ b/yarn.lock @@ -1027,10 +1027,10 @@ asn1@~0.2.3: dependencies: safer-buffer "~2.1.0" -aspida@^0.16.0: - version "0.16.0" - resolved "https://registry.yarnpkg.com/aspida/-/aspida-0.16.0.tgz#da57ac244dc3294110fa9b21d55b34512751c911" - integrity sha512-YAXULxSbqiS5jP4iKX6+xIShyvE4csIWfAtHdaF7fIpoAebU07U9ic6oLpYoXrQKsjRWoj183/El+Wa+X6iU3Q== +aspida@^0.18.0: + version "0.18.0" + resolved "https://registry.yarnpkg.com/aspida/-/aspida-0.18.0.tgz#7b8dcad290b6e24d9efe57e0a4a07f1ebd689d7d" + integrity sha512-xHdMjYHncV4oRi4BuM4ytx8FgehaPsCgeI9T5/PqHWX0TzuSl7y3QqEkN3Q7PTmtWD6uVLXUHdocg0ipwBNSag== dependencies: chokidar "^3.4.0" minimist "^1.2.5"