@shophost/client 2.0.36 → 2.0.38
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/index.js +4 -4
- package/package.json +1 -1
- package/src/__generated__/sdk/sdk.gen.d.ts +19 -1
- package/src/__generated__/sdk/types.gen.d.ts +302 -0
- package/src/index.d.ts +2 -0
package/package.json
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { Client, Options as Options2, TDataShape } from './client';
|
|
2
|
-
import type { AcceptInvitationData, AcceptInvitationErrors, AcceptInvitationResponses, AccessEligibilityData, AccessEligibilityResponses, CreateInvitationData, CreateInvitationErrors, CreateInvitationResponses, CreateManufacturerData, CreateManufacturerErrors, CreateManufacturerResponses, CreateOrderData, CreateOrderErrors, CreateOrderResponses, CreateOrganizationData, CreateOrganizationErrors, CreateOrganizationResponses, CreateProductCategoryData, CreateProductCategoryErrors, CreateProductCategoryResponses, CreateProductData, CreateProductErrors, CreateProductResponses, CreateReservationData, CreateReservationErrors, CreateReservationResponses, CreateShippingAddressData, CreateShippingAddressErrors, CreateShippingAddressResponses, CreateShippingMethodData, CreateShippingMethodErrors, CreateShippingMethodResponses, CreateTemporaryFileData, CreateTemporaryFileResponses, DeleteInvitationData, DeleteInvitationErrors, DeleteInvitationResponses, DeleteManufacturerData, DeleteManufacturerErrors, DeleteManufacturerResponses, DeleteMemberData, DeleteMemberErrors, DeleteMemberResponses, DeleteOrderData, DeleteOrderErrors, DeleteOrderResponses, DeleteOrganizationData, DeleteOrganizationErrors, DeleteOrganizationResponses, DeleteProductCategoryData, DeleteProductCategoryErrors, DeleteProductCategoryResponses, DeleteProductData, DeleteProductErrors, DeleteProductResponses, DeleteReservationData, DeleteReservationErrors, DeleteReservationResponses, DeleteShippingMethodData, DeleteShippingMethodErrors, DeleteShippingMethodResponses, GetAvailablePaymentMethodsData, GetAvailablePaymentMethodsErrors, GetAvailablePaymentMethodsResponses, GetCartDataData, GetCartDataErrors, GetCartDataResponses, GetInvitationsData, GetInvitationsErrors, GetInvitationsResponses, GetManufacturerData, GetManufacturerErrors, GetManufacturerResponses, GetManufacturersData, GetManufacturersErrors, GetManufacturersResponses, GetMemberData, GetMemberErrors, GetMemberResponses, GetMembersData, GetMembersErrors, GetMembersResponses, GetOrderData, GetOrderErrors, GetOrderResponses, GetOrdersData, GetOrdersErrors, GetOrdersResponses, GetOrganizationData, GetOrganizationErrors, GetOrganizationResponses, GetOrganizationsData, GetOrganizationsResponses, GetPlaceDetailsData, GetPlaceDetailsErrors, GetPlaceDetailsResponses, GetPredictionsData, GetPredictionsErrors, GetPredictionsResponses, GetProductCategoriesData, GetProductCategoriesErrors, GetProductCategoriesResponses, GetProductCategoryData, GetProductCategoryErrors, GetProductCategoryResponses, GetProductData, GetProductErrors, GetProductResponses, GetProductsByCategoryData, GetProductsByCategoryErrors, GetProductsByCategoryResponses, GetProductsData, GetProductsErrors, GetProductsResponses, GetReservationData, GetReservationErrors, GetReservationResponses, GetReservationsData, GetReservationsErrors, GetReservationsResponses, GetShippingAddressData, GetShippingAddressErrors, GetShippingAddressResponses, GetShippingMethodData, GetShippingMethodErrors, GetShippingMethodResponses, GetShippingMethodsData, GetShippingMethodsErrors, GetShippingMethodsResponses, GetUserInvitationsData, GetUserInvitationsErrors, GetUserInvitationsResponses, GetUserReservationsData, GetUserReservationsErrors, GetUserReservationsResponses, GetVercelTokenData, GetVercelTokenResponses, LeaveOrganizationData, LeaveOrganizationErrors, LeaveOrganizationResponses, PingData, PingErrors, PingResponses, UpdateManufacturerData, UpdateManufacturerErrors, UpdateManufacturerResponses, UpdateMemberRoleData, UpdateMemberRoleErrors, UpdateMemberRoleResponses, UpdateOrderStatusData, UpdateOrderStatusErrors, UpdateOrderStatusResponses, UpdateOrganizationData, UpdateOrganizationErrors, UpdateOrganizationResponses, UpdateProductCategoryData, UpdateProductCategoryErrors, UpdateProductCategoryResponses, UpdateProductCategoryStatusData, UpdateProductCategoryStatusErrors, UpdateProductCategoryStatusResponses, UpdateProductData, UpdateProductErrors, UpdateProductResponses, UpdateProductStatusData, UpdateProductStatusErrors, UpdateProductStatusResponses, UpdateReservationStatusData, UpdateReservationStatusErrors, UpdateReservationStatusResponses, UpdateShippingAddressData, UpdateShippingAddressErrors, UpdateShippingAddressResponses, UpdateShippingMethodData, UpdateShippingMethodErrors, UpdateShippingMethodResponses, WebhookData, WebhookErrors, WebhookResponses } from './types.gen';
|
|
2
|
+
import type { AcceptInvitationData, AcceptInvitationErrors, AcceptInvitationResponses, AccessEligibilityData, AccessEligibilityResponses, CreateInvitationData, CreateInvitationErrors, CreateInvitationResponses, CreateManufacturerData, CreateManufacturerErrors, CreateManufacturerResponses, CreateOrderData, CreateOrderErrors, CreateOrderResponses, CreateOrganizationData, CreateOrganizationErrors, CreateOrganizationResponses, CreateProductCategoryData, CreateProductCategoryErrors, CreateProductCategoryResponses, CreateProductData, CreateProductErrors, CreateProductResponses, CreateReservationData, CreateReservationErrors, CreateReservationResponses, CreateShippingAddressData, CreateShippingAddressErrors, CreateShippingAddressResponses, CreateShippingMethodData, CreateShippingMethodErrors, CreateShippingMethodResponses, CreateTemporaryFileData, CreateTemporaryFileResponses, DeleteInvitationData, DeleteInvitationErrors, DeleteInvitationResponses, DeleteManufacturerData, DeleteManufacturerErrors, DeleteManufacturerResponses, DeleteMemberData, DeleteMemberErrors, DeleteMemberResponses, DeleteOrderData, DeleteOrderErrors, DeleteOrderResponses, DeleteOrganizationData, DeleteOrganizationErrors, DeleteOrganizationResponses, DeleteProductCategoryData, DeleteProductCategoryErrors, DeleteProductCategoryResponses, DeleteProductData, DeleteProductErrors, DeleteProductResponses, DeleteReservationData, DeleteReservationErrors, DeleteReservationResponses, DeleteShippingMethodData, DeleteShippingMethodErrors, DeleteShippingMethodResponses, GetAnalyticsOverviewData, GetAnalyticsOverviewErrors, GetAnalyticsOverviewResponses, GetAvailablePaymentMethodsData, GetAvailablePaymentMethodsErrors, GetAvailablePaymentMethodsResponses, GetCartDataData, GetCartDataErrors, GetCartDataResponses, GetInvitationsData, GetInvitationsErrors, GetInvitationsResponses, GetManufacturerData, GetManufacturerErrors, GetManufacturerResponses, GetManufacturersData, GetManufacturersErrors, GetManufacturersResponses, GetMemberData, GetMemberErrors, GetMemberResponses, GetMembersData, GetMembersErrors, GetMembersResponses, GetMyOrdersData, GetMyOrdersErrors, GetMyOrdersResponses, GetMyReservationsData, GetMyReservationsErrors, GetMyReservationsResponses, GetOrderData, GetOrderErrors, GetOrderResponses, GetOrdersData, GetOrdersErrors, GetOrdersResponses, GetOrganizationData, GetOrganizationErrors, GetOrganizationResponses, GetOrganizationsData, GetOrganizationsResponses, GetPlaceDetailsData, GetPlaceDetailsErrors, GetPlaceDetailsResponses, GetPredictionsData, GetPredictionsErrors, GetPredictionsResponses, GetProductCategoriesData, GetProductCategoriesErrors, GetProductCategoriesResponses, GetProductCategoryData, GetProductCategoryErrors, GetProductCategoryResponses, GetProductData, GetProductErrors, GetProductResponses, GetProductsByCategoryData, GetProductsByCategoryErrors, GetProductsByCategoryResponses, GetProductsData, GetProductsErrors, GetProductsResponses, GetReservationData, GetReservationErrors, GetReservationResponses, GetReservationsData, GetReservationsErrors, GetReservationsResponses, GetShippingAddressData, GetShippingAddressErrors, GetShippingAddressResponses, GetShippingMethodData, GetShippingMethodErrors, GetShippingMethodResponses, GetShippingMethodsData, GetShippingMethodsErrors, GetShippingMethodsResponses, GetUserInvitationsData, GetUserInvitationsErrors, GetUserInvitationsResponses, GetUserReservationsData, GetUserReservationsErrors, GetUserReservationsResponses, GetVercelTokenData, GetVercelTokenResponses, LeaveOrganizationData, LeaveOrganizationErrors, LeaveOrganizationResponses, PingData, PingErrors, PingResponses, UpdateManufacturerData, UpdateManufacturerErrors, UpdateManufacturerResponses, UpdateMemberRoleData, UpdateMemberRoleErrors, UpdateMemberRoleResponses, UpdateOrderStatusData, UpdateOrderStatusErrors, UpdateOrderStatusResponses, UpdateOrganizationData, UpdateOrganizationErrors, UpdateOrganizationResponses, UpdateProductCategoryData, UpdateProductCategoryErrors, UpdateProductCategoryResponses, UpdateProductCategoryStatusData, UpdateProductCategoryStatusErrors, UpdateProductCategoryStatusResponses, UpdateProductData, UpdateProductErrors, UpdateProductResponses, UpdateProductStatusData, UpdateProductStatusErrors, UpdateProductStatusResponses, UpdateReservationStatusData, UpdateReservationStatusErrors, UpdateReservationStatusResponses, UpdateShippingAddressData, UpdateShippingAddressErrors, UpdateShippingAddressResponses, UpdateShippingMethodData, UpdateShippingMethodErrors, UpdateShippingMethodResponses, WebhookData, WebhookErrors, WebhookResponses } from './types.gen';
|
|
3
3
|
export type Options<TData extends TDataShape = TDataShape, ThrowOnError extends boolean = boolean> = Options2<TData, ThrowOnError> & {
|
|
4
4
|
/**
|
|
5
5
|
* You can provide a client instance returned by `createClient()` instead of
|
|
@@ -19,6 +19,12 @@ export type Options<TData extends TDataShape = TDataShape, ThrowOnError extends
|
|
|
19
19
|
* Pings the relevancy score service to check its availability
|
|
20
20
|
*/
|
|
21
21
|
export declare const ping: <ThrowOnError extends boolean = false>(options?: Options<PingData, ThrowOnError>) => import("./client").RequestResult<PingResponses, PingErrors, ThrowOnError, "fields">;
|
|
22
|
+
/**
|
|
23
|
+
* Get Analytics Overview
|
|
24
|
+
*
|
|
25
|
+
* Returns dashboard analytics for an organization within a date range.
|
|
26
|
+
*/
|
|
27
|
+
export declare const getAnalyticsOverview: <ThrowOnError extends boolean = false>(options: Options<GetAnalyticsOverviewData, ThrowOnError>) => import("./client").RequestResult<GetAnalyticsOverviewResponses, GetAnalyticsOverviewErrors, ThrowOnError, "fields">;
|
|
22
28
|
/**
|
|
23
29
|
* Get Manufacturers
|
|
24
30
|
*
|
|
@@ -271,6 +277,12 @@ export declare const getOrders: <ThrowOnError extends boolean = false>(options:
|
|
|
271
277
|
* Creates a new order
|
|
272
278
|
*/
|
|
273
279
|
export declare const createOrder: <ThrowOnError extends boolean = false>(options: Options<CreateOrderData, ThrowOnError>) => import("./client").RequestResult<CreateOrderResponses, CreateOrderErrors, ThrowOnError, "fields">;
|
|
280
|
+
/**
|
|
281
|
+
* Get My Orders
|
|
282
|
+
*
|
|
283
|
+
* Fetches paginated list of orders for the authenticated user
|
|
284
|
+
*/
|
|
285
|
+
export declare const getMyOrders: <ThrowOnError extends boolean = false>(options: Options<GetMyOrdersData, ThrowOnError>) => import("./client").RequestResult<GetMyOrdersResponses, GetMyOrdersErrors, ThrowOnError, "fields">;
|
|
274
286
|
/**
|
|
275
287
|
* Delete Order
|
|
276
288
|
*
|
|
@@ -347,6 +359,12 @@ export declare const getReservations: <ThrowOnError extends boolean = false>(opt
|
|
|
347
359
|
* Create a new reservation
|
|
348
360
|
*/
|
|
349
361
|
export declare const createReservation: <ThrowOnError extends boolean = false>(options: Options<CreateReservationData, ThrowOnError>) => import("./client").RequestResult<CreateReservationResponses, CreateReservationErrors, ThrowOnError, "fields">;
|
|
362
|
+
/**
|
|
363
|
+
* Get My Reservations
|
|
364
|
+
*
|
|
365
|
+
* Get paginated reservations for the authenticated user
|
|
366
|
+
*/
|
|
367
|
+
export declare const getMyReservations: <ThrowOnError extends boolean = false>(options: Options<GetMyReservationsData, ThrowOnError>) => import("./client").RequestResult<GetMyReservationsResponses, GetMyReservationsErrors, ThrowOnError, "fields">;
|
|
350
368
|
/**
|
|
351
369
|
* Delete Reservation
|
|
352
370
|
*
|
|
@@ -1,6 +1,54 @@
|
|
|
1
1
|
export type ClientOptions = {
|
|
2
2
|
baseUrl: 'http://localhost:3001/api' | 'https://api.shophost.io/api' | (string & {});
|
|
3
3
|
};
|
|
4
|
+
export type AnalyticsOverview = {
|
|
5
|
+
range: AnalyticsRange;
|
|
6
|
+
summary: AnalyticsSummary;
|
|
7
|
+
salesByDay: Array<SalesByDayPoint>;
|
|
8
|
+
reservationsByDay: Array<ReservationsByDayPoint>;
|
|
9
|
+
paymentMethods: Array<PaymentMethodBreakdownItem>;
|
|
10
|
+
fulfilmentMethods: Array<FulfilmentBreakdownItem>;
|
|
11
|
+
};
|
|
12
|
+
export type AnalyticsRange = {
|
|
13
|
+
from: string;
|
|
14
|
+
to: string;
|
|
15
|
+
};
|
|
16
|
+
export type AnalyticsSummary = {
|
|
17
|
+
/**
|
|
18
|
+
* The currency code for the transaction.
|
|
19
|
+
*/
|
|
20
|
+
currency: 'USD' | 'EUR' | 'GBP' | 'JPY' | 'AUD' | 'CAD' | 'CHF' | 'CNY' | 'SEK' | 'NZD' | 'MXN' | 'SGD' | 'HKD' | 'NOK' | 'KRW' | 'TRY' | 'RUB' | 'INR' | 'BRL' | 'ZAR' | 'DKK' | 'PLN' | 'THB' | 'IDR' | 'HUF' | 'CZK' | 'ILS' | 'PHP' | 'AED' | 'COP' | 'SAR' | 'MYR' | 'RON';
|
|
21
|
+
totalSales: number;
|
|
22
|
+
paidOrders: number;
|
|
23
|
+
averageOrderValue: number;
|
|
24
|
+
reservations: number;
|
|
25
|
+
guests: number;
|
|
26
|
+
};
|
|
27
|
+
export type SalesByDayPoint = {
|
|
28
|
+
date: string;
|
|
29
|
+
label: string;
|
|
30
|
+
totalSales: number;
|
|
31
|
+
paidOrders: number;
|
|
32
|
+
};
|
|
33
|
+
export type ReservationsByDayPoint = {
|
|
34
|
+
date: string;
|
|
35
|
+
label: string;
|
|
36
|
+
reservations: number;
|
|
37
|
+
guests: number;
|
|
38
|
+
};
|
|
39
|
+
export type PaymentMethodBreakdownItem = {
|
|
40
|
+
/**
|
|
41
|
+
* The payment method used for the order
|
|
42
|
+
*/
|
|
43
|
+
method: 'card' | 'blik' | 'paypal' | 'bank_transfer' | 'cash_on_delivery';
|
|
44
|
+
count: number;
|
|
45
|
+
totalSales: number;
|
|
46
|
+
};
|
|
47
|
+
export type FulfilmentBreakdownItem = {
|
|
48
|
+
method: 'delivery' | 'pickup';
|
|
49
|
+
count: number;
|
|
50
|
+
totalSales: number;
|
|
51
|
+
};
|
|
4
52
|
export type Manufacturer = {
|
|
5
53
|
/**
|
|
6
54
|
* ID of the manufacturer
|
|
@@ -1748,6 +1796,85 @@ export type PingResponses = {
|
|
|
1748
1796
|
};
|
|
1749
1797
|
};
|
|
1750
1798
|
export type PingResponse = PingResponses[keyof PingResponses];
|
|
1799
|
+
export type GetAnalyticsOverviewData = {
|
|
1800
|
+
body?: never;
|
|
1801
|
+
headers?: {
|
|
1802
|
+
/**
|
|
1803
|
+
* Accept-Language header
|
|
1804
|
+
*/
|
|
1805
|
+
'accept-language'?: string;
|
|
1806
|
+
/**
|
|
1807
|
+
* Cookie header
|
|
1808
|
+
*/
|
|
1809
|
+
cookie?: string;
|
|
1810
|
+
};
|
|
1811
|
+
path: {
|
|
1812
|
+
/**
|
|
1813
|
+
* The organization ID
|
|
1814
|
+
*/
|
|
1815
|
+
organizationId: string;
|
|
1816
|
+
};
|
|
1817
|
+
query?: {
|
|
1818
|
+
/**
|
|
1819
|
+
* Start of the reporting range
|
|
1820
|
+
*/
|
|
1821
|
+
from?: string | null;
|
|
1822
|
+
/**
|
|
1823
|
+
* End of the reporting range
|
|
1824
|
+
*/
|
|
1825
|
+
to?: string | null;
|
|
1826
|
+
};
|
|
1827
|
+
url: '/{organizationId}/analytics/overview';
|
|
1828
|
+
};
|
|
1829
|
+
export type GetAnalyticsOverviewErrors = {
|
|
1830
|
+
/**
|
|
1831
|
+
* Bad Request
|
|
1832
|
+
*/
|
|
1833
|
+
400: {
|
|
1834
|
+
/**
|
|
1835
|
+
* The HTTP status code
|
|
1836
|
+
*/
|
|
1837
|
+
status: number;
|
|
1838
|
+
/**
|
|
1839
|
+
* The error message
|
|
1840
|
+
*/
|
|
1841
|
+
message: string;
|
|
1842
|
+
};
|
|
1843
|
+
/**
|
|
1844
|
+
* Unauthorized
|
|
1845
|
+
*/
|
|
1846
|
+
401: {
|
|
1847
|
+
/**
|
|
1848
|
+
* The HTTP status code
|
|
1849
|
+
*/
|
|
1850
|
+
status: number;
|
|
1851
|
+
/**
|
|
1852
|
+
* The error message
|
|
1853
|
+
*/
|
|
1854
|
+
message: string;
|
|
1855
|
+
};
|
|
1856
|
+
/**
|
|
1857
|
+
* Not Found
|
|
1858
|
+
*/
|
|
1859
|
+
404: {
|
|
1860
|
+
/**
|
|
1861
|
+
* The HTTP status code
|
|
1862
|
+
*/
|
|
1863
|
+
status: number;
|
|
1864
|
+
/**
|
|
1865
|
+
* The error message
|
|
1866
|
+
*/
|
|
1867
|
+
message: string;
|
|
1868
|
+
};
|
|
1869
|
+
};
|
|
1870
|
+
export type GetAnalyticsOverviewError = GetAnalyticsOverviewErrors[keyof GetAnalyticsOverviewErrors];
|
|
1871
|
+
export type GetAnalyticsOverviewResponses = {
|
|
1872
|
+
/**
|
|
1873
|
+
* OK
|
|
1874
|
+
*/
|
|
1875
|
+
200: AnalyticsOverview;
|
|
1876
|
+
};
|
|
1877
|
+
export type GetAnalyticsOverviewResponse = GetAnalyticsOverviewResponses[keyof GetAnalyticsOverviewResponses];
|
|
1751
1878
|
export type GetManufacturersData = {
|
|
1752
1879
|
body?: never;
|
|
1753
1880
|
headers?: {
|
|
@@ -4575,6 +4702,87 @@ export type CreateOrderResponses = {
|
|
|
4575
4702
|
};
|
|
4576
4703
|
};
|
|
4577
4704
|
export type CreateOrderResponse = CreateOrderResponses[keyof CreateOrderResponses];
|
|
4705
|
+
export type GetMyOrdersData = {
|
|
4706
|
+
body?: never;
|
|
4707
|
+
headers?: {
|
|
4708
|
+
/**
|
|
4709
|
+
* Accept-Language header
|
|
4710
|
+
*/
|
|
4711
|
+
'accept-language'?: string;
|
|
4712
|
+
/**
|
|
4713
|
+
* Cookie header
|
|
4714
|
+
*/
|
|
4715
|
+
cookie?: string;
|
|
4716
|
+
};
|
|
4717
|
+
path: {
|
|
4718
|
+
/**
|
|
4719
|
+
* The organization ID
|
|
4720
|
+
*/
|
|
4721
|
+
organizationId: string;
|
|
4722
|
+
};
|
|
4723
|
+
query?: {
|
|
4724
|
+
/**
|
|
4725
|
+
* Page number
|
|
4726
|
+
*/
|
|
4727
|
+
page?: number | null;
|
|
4728
|
+
/**
|
|
4729
|
+
* Number of items per page
|
|
4730
|
+
*/
|
|
4731
|
+
limit?: number | null;
|
|
4732
|
+
/**
|
|
4733
|
+
* Search query
|
|
4734
|
+
*/
|
|
4735
|
+
search?: string;
|
|
4736
|
+
/**
|
|
4737
|
+
* Whether to filter by published items
|
|
4738
|
+
*/
|
|
4739
|
+
published?: boolean | null;
|
|
4740
|
+
/**
|
|
4741
|
+
* Enum for locale values
|
|
4742
|
+
*/
|
|
4743
|
+
locale?: 'af' | 'sq' | 'ar_dz' | 'ar_bh' | 'ar_eg' | 'ar_iq' | 'ar_jo' | 'ar_kw' | 'ar_lb' | 'ar_ly' | 'ar_ma' | 'ar_om' | 'ar_qa' | 'ar_sa' | 'ar_sy' | 'ar_tn' | 'ar_ae' | 'ar_ye' | 'eu' | 'be' | 'bg' | 'ca' | 'zh_hk' | 'zh_cn' | 'zh_sg' | 'zh_tw' | 'hr' | 'cs' | 'da' | 'nl_be' | 'nl' | 'en' | 'en_au' | 'en_bz' | 'en_ca' | 'en_ie' | 'en_jm' | 'en_nz' | 'en_za' | 'en_tt' | 'en_gb' | 'en_us' | 'et' | 'fo' | 'fa' | 'fi' | 'fr_be' | 'fr_ca' | 'fr_lu' | 'fr' | 'fr_ch' | 'gd' | 'de_at' | 'de_li' | 'de_lu' | 'de' | 'de_ch' | 'el' | 'he' | 'hi' | 'hu' | 'is' | 'id' | 'ga' | 'it' | 'it_ch' | 'ja' | 'ko' | 'ku' | 'lv' | 'lt' | 'mk' | 'ml' | 'ms' | 'mt' | 'no' | 'nb' | 'nn' | 'pl' | 'pt_br' | 'pt' | 'pa' | 'rm' | 'ro' | 'ro_md' | 'ru' | 'ru_md' | 'sr' | 'sk' | 'sl' | 'sb' | 'es_ar' | 'es_bo' | 'es_cl' | 'es_co' | 'es_cr' | 'es_do' | 'es_ec' | 'es_sv' | 'es_gt' | 'es_hn' | 'es_mx' | 'es' | 'sv' | 'sv_fi' | 'th' | 'tr' | 'uk' | 'ur' | 'vi' | 'cy' | 'ji' | 'zu';
|
|
4744
|
+
};
|
|
4745
|
+
url: '/{organizationId}/orders/me';
|
|
4746
|
+
};
|
|
4747
|
+
export type GetMyOrdersErrors = {
|
|
4748
|
+
/**
|
|
4749
|
+
* Bad Request
|
|
4750
|
+
*/
|
|
4751
|
+
400: {
|
|
4752
|
+
/**
|
|
4753
|
+
* The HTTP status code
|
|
4754
|
+
*/
|
|
4755
|
+
status: number;
|
|
4756
|
+
/**
|
|
4757
|
+
* The error message
|
|
4758
|
+
*/
|
|
4759
|
+
message: string;
|
|
4760
|
+
};
|
|
4761
|
+
/**
|
|
4762
|
+
* Unauthorized
|
|
4763
|
+
*/
|
|
4764
|
+
401: {
|
|
4765
|
+
/**
|
|
4766
|
+
* The HTTP status code
|
|
4767
|
+
*/
|
|
4768
|
+
status: number;
|
|
4769
|
+
/**
|
|
4770
|
+
* The error message
|
|
4771
|
+
*/
|
|
4772
|
+
message: string;
|
|
4773
|
+
};
|
|
4774
|
+
};
|
|
4775
|
+
export type GetMyOrdersError = GetMyOrdersErrors[keyof GetMyOrdersErrors];
|
|
4776
|
+
export type GetMyOrdersResponses = {
|
|
4777
|
+
/**
|
|
4778
|
+
* OK
|
|
4779
|
+
*/
|
|
4780
|
+
200: {
|
|
4781
|
+
list: Array<Order>;
|
|
4782
|
+
meta: PaginationMeta;
|
|
4783
|
+
};
|
|
4784
|
+
};
|
|
4785
|
+
export type GetMyOrdersResponse = GetMyOrdersResponses[keyof GetMyOrdersResponses];
|
|
4578
4786
|
export type DeleteOrderData = {
|
|
4579
4787
|
body?: never;
|
|
4580
4788
|
headers?: {
|
|
@@ -5500,6 +5708,100 @@ export type CreateReservationResponses = {
|
|
|
5500
5708
|
201: Reservation;
|
|
5501
5709
|
};
|
|
5502
5710
|
export type CreateReservationResponse = CreateReservationResponses[keyof CreateReservationResponses];
|
|
5711
|
+
export type GetMyReservationsData = {
|
|
5712
|
+
body?: never;
|
|
5713
|
+
headers?: {
|
|
5714
|
+
/**
|
|
5715
|
+
* Accept-Language header
|
|
5716
|
+
*/
|
|
5717
|
+
'accept-language'?: string;
|
|
5718
|
+
/**
|
|
5719
|
+
* Cookie header
|
|
5720
|
+
*/
|
|
5721
|
+
cookie?: string;
|
|
5722
|
+
};
|
|
5723
|
+
path: {
|
|
5724
|
+
/**
|
|
5725
|
+
* The organization ID
|
|
5726
|
+
*/
|
|
5727
|
+
organizationId: string;
|
|
5728
|
+
};
|
|
5729
|
+
query?: {
|
|
5730
|
+
/**
|
|
5731
|
+
* Page number
|
|
5732
|
+
*/
|
|
5733
|
+
page?: number | null;
|
|
5734
|
+
/**
|
|
5735
|
+
* Number of items per page
|
|
5736
|
+
*/
|
|
5737
|
+
limit?: number | null;
|
|
5738
|
+
/**
|
|
5739
|
+
* Search query
|
|
5740
|
+
*/
|
|
5741
|
+
search?: string;
|
|
5742
|
+
/**
|
|
5743
|
+
* Whether to filter by published items
|
|
5744
|
+
*/
|
|
5745
|
+
published?: boolean | null;
|
|
5746
|
+
/**
|
|
5747
|
+
* Enum for locale values
|
|
5748
|
+
*/
|
|
5749
|
+
locale?: 'af' | 'sq' | 'ar_dz' | 'ar_bh' | 'ar_eg' | 'ar_iq' | 'ar_jo' | 'ar_kw' | 'ar_lb' | 'ar_ly' | 'ar_ma' | 'ar_om' | 'ar_qa' | 'ar_sa' | 'ar_sy' | 'ar_tn' | 'ar_ae' | 'ar_ye' | 'eu' | 'be' | 'bg' | 'ca' | 'zh_hk' | 'zh_cn' | 'zh_sg' | 'zh_tw' | 'hr' | 'cs' | 'da' | 'nl_be' | 'nl' | 'en' | 'en_au' | 'en_bz' | 'en_ca' | 'en_ie' | 'en_jm' | 'en_nz' | 'en_za' | 'en_tt' | 'en_gb' | 'en_us' | 'et' | 'fo' | 'fa' | 'fi' | 'fr_be' | 'fr_ca' | 'fr_lu' | 'fr' | 'fr_ch' | 'gd' | 'de_at' | 'de_li' | 'de_lu' | 'de' | 'de_ch' | 'el' | 'he' | 'hi' | 'hu' | 'is' | 'id' | 'ga' | 'it' | 'it_ch' | 'ja' | 'ko' | 'ku' | 'lv' | 'lt' | 'mk' | 'ml' | 'ms' | 'mt' | 'no' | 'nb' | 'nn' | 'pl' | 'pt_br' | 'pt' | 'pa' | 'rm' | 'ro' | 'ro_md' | 'ru' | 'ru_md' | 'sr' | 'sk' | 'sl' | 'sb' | 'es_ar' | 'es_bo' | 'es_cl' | 'es_co' | 'es_cr' | 'es_do' | 'es_ec' | 'es_sv' | 'es_gt' | 'es_hn' | 'es_mx' | 'es' | 'sv' | 'sv_fi' | 'th' | 'tr' | 'uk' | 'ur' | 'vi' | 'cy' | 'ji' | 'zu';
|
|
5750
|
+
};
|
|
5751
|
+
url: '/{organizationId}/reservations/me';
|
|
5752
|
+
};
|
|
5753
|
+
export type GetMyReservationsErrors = {
|
|
5754
|
+
/**
|
|
5755
|
+
* Bad Request
|
|
5756
|
+
*/
|
|
5757
|
+
400: {
|
|
5758
|
+
/**
|
|
5759
|
+
* The HTTP status code
|
|
5760
|
+
*/
|
|
5761
|
+
status: number;
|
|
5762
|
+
/**
|
|
5763
|
+
* The error message
|
|
5764
|
+
*/
|
|
5765
|
+
message: string;
|
|
5766
|
+
};
|
|
5767
|
+
/**
|
|
5768
|
+
* Unauthorized
|
|
5769
|
+
*/
|
|
5770
|
+
401: {
|
|
5771
|
+
/**
|
|
5772
|
+
* The HTTP status code
|
|
5773
|
+
*/
|
|
5774
|
+
status: number;
|
|
5775
|
+
/**
|
|
5776
|
+
* The error message
|
|
5777
|
+
*/
|
|
5778
|
+
message: string;
|
|
5779
|
+
};
|
|
5780
|
+
/**
|
|
5781
|
+
* Internal Server Error
|
|
5782
|
+
*/
|
|
5783
|
+
500: {
|
|
5784
|
+
/**
|
|
5785
|
+
* The HTTP status code
|
|
5786
|
+
*/
|
|
5787
|
+
status: number;
|
|
5788
|
+
/**
|
|
5789
|
+
* The error message
|
|
5790
|
+
*/
|
|
5791
|
+
message: string;
|
|
5792
|
+
};
|
|
5793
|
+
};
|
|
5794
|
+
export type GetMyReservationsError = GetMyReservationsErrors[keyof GetMyReservationsErrors];
|
|
5795
|
+
export type GetMyReservationsResponses = {
|
|
5796
|
+
/**
|
|
5797
|
+
* OK
|
|
5798
|
+
*/
|
|
5799
|
+
200: {
|
|
5800
|
+
list: Array<Reservation>;
|
|
5801
|
+
meta: PaginationMeta;
|
|
5802
|
+
};
|
|
5803
|
+
};
|
|
5804
|
+
export type GetMyReservationsResponse = GetMyReservationsResponses[keyof GetMyReservationsResponses];
|
|
5503
5805
|
export type DeleteReservationData = {
|
|
5504
5806
|
body?: {
|
|
5505
5807
|
[key: string]: unknown;
|
package/src/index.d.ts
CHANGED
|
@@ -121,6 +121,7 @@ export declare const initClient: ({ baseHeaders, baseUrl, credentials, fetch, th
|
|
|
121
121
|
createOrder: (input?: RequestInput) => Promise<ClientResponse<any>>;
|
|
122
122
|
deleteOrder: (input?: RequestInput) => Promise<ClientResponse<any>>;
|
|
123
123
|
getOrder: (input?: RequestInput) => Promise<ClientResponse<any>>;
|
|
124
|
+
getMyOrders: (input?: RequestInput) => Promise<ClientResponse<any>>;
|
|
124
125
|
getOrders: (input?: RequestInput) => Promise<ClientResponse<any>>;
|
|
125
126
|
updateStatus: (input?: RequestInput) => Promise<ClientResponse<any>>;
|
|
126
127
|
};
|
|
@@ -155,6 +156,7 @@ export declare const initClient: ({ baseHeaders, baseUrl, credentials, fetch, th
|
|
|
155
156
|
createReservation: (input?: RequestInput) => Promise<ClientResponse<any>>;
|
|
156
157
|
deleteReservation: (input?: RequestInput) => Promise<ClientResponse<any>>;
|
|
157
158
|
getReservation: (input?: RequestInput) => Promise<ClientResponse<any>>;
|
|
159
|
+
getMyReservations: (input?: RequestInput) => Promise<ClientResponse<any>>;
|
|
158
160
|
getReservations: (input?: RequestInput) => Promise<ClientResponse<any>>;
|
|
159
161
|
getUserReservations: (input?: RequestInput) => Promise<ClientResponse<any>>;
|
|
160
162
|
updateReservationStatus: (input?: RequestInput) => Promise<ClientResponse<any>>;
|