@shophost/client 2.0.57 → 2.0.59
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 +341 -31
- package/src/index.d.ts +5 -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, DeleteIntegrationData, DeleteIntegrationErrors, DeleteIntegrationResponses, 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, GetIntegrationsData, GetIntegrationsErrors, GetIntegrationsResponses, 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, UpsertIntegrationData, UpsertIntegrationErrors, UpsertIntegrationResponses, WebhookByOrganizationData, WebhookByOrganizationErrors, WebhookByOrganizationResponses, 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, DeleteIntegrationData, DeleteIntegrationErrors, DeleteIntegrationResponses, 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, GetCustomerData, GetCustomerErrors, GetCustomerResponses, GetCustomersData, GetCustomersErrors, GetCustomersResponses, GetIntegrationsData, GetIntegrationsErrors, GetIntegrationsResponses, 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, UpdateReservationData, UpdateReservationErrors, UpdateReservationResponses, UpdateReservationStatusData, UpdateReservationStatusErrors, UpdateReservationStatusResponses, UpdateShippingAddressData, UpdateShippingAddressErrors, UpdateShippingAddressResponses, UpdateShippingMethodData, UpdateShippingMethodErrors, UpdateShippingMethodResponses, UpsertIntegrationData, UpsertIntegrationErrors, UpsertIntegrationResponses, WebhookByOrganizationData, WebhookByOrganizationErrors, WebhookByOrganizationResponses, 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
|
|
@@ -323,6 +323,18 @@ export declare const updateOrderStatus: <ThrowOnError extends boolean = false>(o
|
|
|
323
323
|
* Fetches formatted cart data
|
|
324
324
|
*/
|
|
325
325
|
export declare const getCartData: <ThrowOnError extends boolean = false>(options: Options<GetCartDataData, ThrowOnError>) => import("./client").RequestResult<GetCartDataResponses, GetCartDataErrors, ThrowOnError, "fields">;
|
|
326
|
+
/**
|
|
327
|
+
* Get Customers
|
|
328
|
+
*
|
|
329
|
+
* Fetches paginated users who have placed at least one order or reservation in the organization
|
|
330
|
+
*/
|
|
331
|
+
export declare const getCustomers: <ThrowOnError extends boolean = false>(options: Options<GetCustomersData, ThrowOnError>) => import("./client").RequestResult<GetCustomersResponses, GetCustomersErrors, ThrowOnError, "fields">;
|
|
332
|
+
/**
|
|
333
|
+
* Get Customer
|
|
334
|
+
*
|
|
335
|
+
* Fetches a customer profile with all orders and reservations for the organization
|
|
336
|
+
*/
|
|
337
|
+
export declare const getCustomer: <ThrowOnError extends boolean = false>(options: Options<GetCustomerData, ThrowOnError>) => import("./client").RequestResult<GetCustomerResponses, GetCustomerErrors, ThrowOnError, "fields">;
|
|
326
338
|
/**
|
|
327
339
|
* Get Shipping Address
|
|
328
340
|
*
|
|
@@ -401,6 +413,12 @@ export declare const deleteReservation: <ThrowOnError extends boolean = false>(o
|
|
|
401
413
|
* Get a specific reservation by ID
|
|
402
414
|
*/
|
|
403
415
|
export declare const getReservation: <ThrowOnError extends boolean = false>(options: Options<GetReservationData, ThrowOnError>) => import("./client").RequestResult<GetReservationResponses, GetReservationErrors, ThrowOnError, "fields">;
|
|
416
|
+
/**
|
|
417
|
+
* Update Reservation
|
|
418
|
+
*
|
|
419
|
+
* Update an existing reservation
|
|
420
|
+
*/
|
|
421
|
+
export declare const updateReservation: <ThrowOnError extends boolean = false>(options: Options<UpdateReservationData, ThrowOnError>) => import("./client").RequestResult<UpdateReservationResponses, UpdateReservationErrors, ThrowOnError, "fields">;
|
|
404
422
|
/**
|
|
405
423
|
* Get User Reservations
|
|
406
424
|
*
|
|
@@ -1746,6 +1746,90 @@ export type CreateOrder = {
|
|
|
1746
1746
|
};
|
|
1747
1747
|
checkoutBaseUrl: string;
|
|
1748
1748
|
};
|
|
1749
|
+
export type AdminCustomer = User & {
|
|
1750
|
+
/**
|
|
1751
|
+
* Date when the customer account was created
|
|
1752
|
+
*/
|
|
1753
|
+
createdAt: string;
|
|
1754
|
+
/**
|
|
1755
|
+
* Number of orders placed by the customer in this organization
|
|
1756
|
+
*/
|
|
1757
|
+
orderCount: number;
|
|
1758
|
+
/**
|
|
1759
|
+
* Number of reservations created by the customer in this organization
|
|
1760
|
+
*/
|
|
1761
|
+
reservationCount: number;
|
|
1762
|
+
};
|
|
1763
|
+
export type User = {
|
|
1764
|
+
/**
|
|
1765
|
+
* User's ID
|
|
1766
|
+
*/
|
|
1767
|
+
id: string;
|
|
1768
|
+
/**
|
|
1769
|
+
* User's email address
|
|
1770
|
+
*/
|
|
1771
|
+
email: string;
|
|
1772
|
+
/**
|
|
1773
|
+
* User's first name
|
|
1774
|
+
*/
|
|
1775
|
+
firstname: string;
|
|
1776
|
+
/**
|
|
1777
|
+
* User's last name
|
|
1778
|
+
*/
|
|
1779
|
+
lastname: string;
|
|
1780
|
+
/**
|
|
1781
|
+
* User's profile image
|
|
1782
|
+
*/
|
|
1783
|
+
image?: string | null;
|
|
1784
|
+
/**
|
|
1785
|
+
* User's full name (optional)
|
|
1786
|
+
*/
|
|
1787
|
+
name?: string | null;
|
|
1788
|
+
};
|
|
1789
|
+
export type AdminCustomerDetail = {
|
|
1790
|
+
customer: AdminCustomer;
|
|
1791
|
+
orders: Array<Order>;
|
|
1792
|
+
reservations: Array<Reservation>;
|
|
1793
|
+
};
|
|
1794
|
+
export type Reservation = {
|
|
1795
|
+
/**
|
|
1796
|
+
* Unique identifier for the order
|
|
1797
|
+
*/
|
|
1798
|
+
id: string;
|
|
1799
|
+
/**
|
|
1800
|
+
* Customer's first name
|
|
1801
|
+
*/
|
|
1802
|
+
firstname: string;
|
|
1803
|
+
/**
|
|
1804
|
+
* Customer's last name
|
|
1805
|
+
*/
|
|
1806
|
+
lastname: string;
|
|
1807
|
+
guests: number;
|
|
1808
|
+
/**
|
|
1809
|
+
* Customer's phone number
|
|
1810
|
+
*/
|
|
1811
|
+
phone: string;
|
|
1812
|
+
/**
|
|
1813
|
+
* Reservation date and time
|
|
1814
|
+
*/
|
|
1815
|
+
date: string | null;
|
|
1816
|
+
/**
|
|
1817
|
+
* External reference ID for the order
|
|
1818
|
+
*/
|
|
1819
|
+
referenceId: string;
|
|
1820
|
+
/**
|
|
1821
|
+
* Date when the order was accepted
|
|
1822
|
+
*/
|
|
1823
|
+
acceptedAt?: string | null;
|
|
1824
|
+
/**
|
|
1825
|
+
* Date when the order was cancelled
|
|
1826
|
+
*/
|
|
1827
|
+
cancelledAt?: string | null;
|
|
1828
|
+
/**
|
|
1829
|
+
* Date when the order was created
|
|
1830
|
+
*/
|
|
1831
|
+
createdAt?: string | null;
|
|
1832
|
+
};
|
|
1749
1833
|
export type UpdateShippingAddress = {
|
|
1750
1834
|
/**
|
|
1751
1835
|
* The first name of the recipient
|
|
@@ -1836,46 +1920,29 @@ export type PlaceDetails = {
|
|
|
1836
1920
|
*/
|
|
1837
1921
|
country: string;
|
|
1838
1922
|
};
|
|
1839
|
-
export type
|
|
1840
|
-
/**
|
|
1841
|
-
* Unique identifier for the order
|
|
1842
|
-
*/
|
|
1843
|
-
id: string;
|
|
1923
|
+
export type CreateReservation = {
|
|
1844
1924
|
/**
|
|
1845
1925
|
* Customer's first name
|
|
1846
1926
|
*/
|
|
1847
|
-
firstname:
|
|
1927
|
+
firstname: unknown;
|
|
1848
1928
|
/**
|
|
1849
1929
|
* Customer's last name
|
|
1850
1930
|
*/
|
|
1851
|
-
lastname:
|
|
1852
|
-
guests: number;
|
|
1853
|
-
/**
|
|
1854
|
-
* Customer's phone number
|
|
1855
|
-
*/
|
|
1856
|
-
phone: string;
|
|
1857
|
-
/**
|
|
1858
|
-
* Reservation date and time
|
|
1859
|
-
*/
|
|
1860
|
-
date: string | null;
|
|
1861
|
-
/**
|
|
1862
|
-
* External reference ID for the order
|
|
1863
|
-
*/
|
|
1864
|
-
referenceId: string;
|
|
1931
|
+
lastname: unknown;
|
|
1865
1932
|
/**
|
|
1866
|
-
*
|
|
1933
|
+
* Number of guests included in the reservation
|
|
1867
1934
|
*/
|
|
1868
|
-
|
|
1935
|
+
guests: unknown;
|
|
1869
1936
|
/**
|
|
1870
|
-
*
|
|
1937
|
+
* Customer's phone number
|
|
1871
1938
|
*/
|
|
1872
|
-
|
|
1939
|
+
phone: unknown;
|
|
1873
1940
|
/**
|
|
1874
|
-
*
|
|
1941
|
+
* Reservation date and time
|
|
1875
1942
|
*/
|
|
1876
|
-
|
|
1943
|
+
date: unknown;
|
|
1877
1944
|
};
|
|
1878
|
-
export type
|
|
1945
|
+
export type UpdateReservation = {
|
|
1879
1946
|
/**
|
|
1880
1947
|
* Customer's first name
|
|
1881
1948
|
*/
|
|
@@ -1888,10 +1955,6 @@ export type CreateReservation = {
|
|
|
1888
1955
|
* Number of guests included in the reservation
|
|
1889
1956
|
*/
|
|
1890
1957
|
guests: unknown;
|
|
1891
|
-
/**
|
|
1892
|
-
* Customer's phone number
|
|
1893
|
-
*/
|
|
1894
|
-
phone: unknown;
|
|
1895
1958
|
/**
|
|
1896
1959
|
* Reservation date and time
|
|
1897
1960
|
*/
|
|
@@ -5450,6 +5513,166 @@ export type GetCartDataResponses = {
|
|
|
5450
5513
|
};
|
|
5451
5514
|
};
|
|
5452
5515
|
export type GetCartDataResponse = GetCartDataResponses[keyof GetCartDataResponses];
|
|
5516
|
+
export type GetCustomersData = {
|
|
5517
|
+
body?: never;
|
|
5518
|
+
headers?: {
|
|
5519
|
+
/**
|
|
5520
|
+
* Accept-Language header
|
|
5521
|
+
*/
|
|
5522
|
+
'accept-language'?: string;
|
|
5523
|
+
/**
|
|
5524
|
+
* Cookie header
|
|
5525
|
+
*/
|
|
5526
|
+
cookie?: string;
|
|
5527
|
+
};
|
|
5528
|
+
path: {
|
|
5529
|
+
/**
|
|
5530
|
+
* The organization ID
|
|
5531
|
+
*/
|
|
5532
|
+
organizationId: string;
|
|
5533
|
+
};
|
|
5534
|
+
query?: {
|
|
5535
|
+
/**
|
|
5536
|
+
* Page number
|
|
5537
|
+
*/
|
|
5538
|
+
page?: number | null;
|
|
5539
|
+
/**
|
|
5540
|
+
* Number of items per page
|
|
5541
|
+
*/
|
|
5542
|
+
limit?: number | null;
|
|
5543
|
+
/**
|
|
5544
|
+
* Search query
|
|
5545
|
+
*/
|
|
5546
|
+
search?: string;
|
|
5547
|
+
};
|
|
5548
|
+
url: '/{organizationId}/customers';
|
|
5549
|
+
};
|
|
5550
|
+
export type GetCustomersErrors = {
|
|
5551
|
+
/**
|
|
5552
|
+
* Bad Request
|
|
5553
|
+
*/
|
|
5554
|
+
400: {
|
|
5555
|
+
/**
|
|
5556
|
+
* The HTTP status code
|
|
5557
|
+
*/
|
|
5558
|
+
status: number;
|
|
5559
|
+
/**
|
|
5560
|
+
* The error message
|
|
5561
|
+
*/
|
|
5562
|
+
message: string;
|
|
5563
|
+
};
|
|
5564
|
+
/**
|
|
5565
|
+
* Unauthorized
|
|
5566
|
+
*/
|
|
5567
|
+
401: {
|
|
5568
|
+
/**
|
|
5569
|
+
* The HTTP status code
|
|
5570
|
+
*/
|
|
5571
|
+
status: number;
|
|
5572
|
+
/**
|
|
5573
|
+
* The error message
|
|
5574
|
+
*/
|
|
5575
|
+
message: string;
|
|
5576
|
+
};
|
|
5577
|
+
/**
|
|
5578
|
+
* Not Found
|
|
5579
|
+
*/
|
|
5580
|
+
404: {
|
|
5581
|
+
/**
|
|
5582
|
+
* The HTTP status code
|
|
5583
|
+
*/
|
|
5584
|
+
status: number;
|
|
5585
|
+
/**
|
|
5586
|
+
* The error message
|
|
5587
|
+
*/
|
|
5588
|
+
message: string;
|
|
5589
|
+
};
|
|
5590
|
+
};
|
|
5591
|
+
export type GetCustomersError = GetCustomersErrors[keyof GetCustomersErrors];
|
|
5592
|
+
export type GetCustomersResponses = {
|
|
5593
|
+
/**
|
|
5594
|
+
* OK
|
|
5595
|
+
*/
|
|
5596
|
+
200: {
|
|
5597
|
+
list: Array<AdminCustomer>;
|
|
5598
|
+
meta: PaginationMeta;
|
|
5599
|
+
};
|
|
5600
|
+
};
|
|
5601
|
+
export type GetCustomersResponse = GetCustomersResponses[keyof GetCustomersResponses];
|
|
5602
|
+
export type GetCustomerData = {
|
|
5603
|
+
body?: never;
|
|
5604
|
+
headers?: {
|
|
5605
|
+
/**
|
|
5606
|
+
* Accept-Language header
|
|
5607
|
+
*/
|
|
5608
|
+
'accept-language'?: string;
|
|
5609
|
+
/**
|
|
5610
|
+
* Cookie header
|
|
5611
|
+
*/
|
|
5612
|
+
cookie?: string;
|
|
5613
|
+
};
|
|
5614
|
+
path: {
|
|
5615
|
+
/**
|
|
5616
|
+
* The organization ID
|
|
5617
|
+
*/
|
|
5618
|
+
organizationId: string;
|
|
5619
|
+
/**
|
|
5620
|
+
* The user ID
|
|
5621
|
+
*/
|
|
5622
|
+
id: string;
|
|
5623
|
+
};
|
|
5624
|
+
query?: never;
|
|
5625
|
+
url: '/{organizationId}/customers/{id}';
|
|
5626
|
+
};
|
|
5627
|
+
export type GetCustomerErrors = {
|
|
5628
|
+
/**
|
|
5629
|
+
* Bad Request
|
|
5630
|
+
*/
|
|
5631
|
+
400: {
|
|
5632
|
+
/**
|
|
5633
|
+
* The HTTP status code
|
|
5634
|
+
*/
|
|
5635
|
+
status: number;
|
|
5636
|
+
/**
|
|
5637
|
+
* The error message
|
|
5638
|
+
*/
|
|
5639
|
+
message: string;
|
|
5640
|
+
};
|
|
5641
|
+
/**
|
|
5642
|
+
* Unauthorized
|
|
5643
|
+
*/
|
|
5644
|
+
401: {
|
|
5645
|
+
/**
|
|
5646
|
+
* The HTTP status code
|
|
5647
|
+
*/
|
|
5648
|
+
status: number;
|
|
5649
|
+
/**
|
|
5650
|
+
* The error message
|
|
5651
|
+
*/
|
|
5652
|
+
message: string;
|
|
5653
|
+
};
|
|
5654
|
+
/**
|
|
5655
|
+
* Not Found
|
|
5656
|
+
*/
|
|
5657
|
+
404: {
|
|
5658
|
+
/**
|
|
5659
|
+
* The HTTP status code
|
|
5660
|
+
*/
|
|
5661
|
+
status: number;
|
|
5662
|
+
/**
|
|
5663
|
+
* The error message
|
|
5664
|
+
*/
|
|
5665
|
+
message: string;
|
|
5666
|
+
};
|
|
5667
|
+
};
|
|
5668
|
+
export type GetCustomerError = GetCustomerErrors[keyof GetCustomerErrors];
|
|
5669
|
+
export type GetCustomerResponses = {
|
|
5670
|
+
/**
|
|
5671
|
+
* OK
|
|
5672
|
+
*/
|
|
5673
|
+
200: AdminCustomerDetail;
|
|
5674
|
+
};
|
|
5675
|
+
export type GetCustomerResponse = GetCustomerResponses[keyof GetCustomerResponses];
|
|
5453
5676
|
export type GetShippingAddressData = {
|
|
5454
5677
|
body?: never;
|
|
5455
5678
|
headers?: {
|
|
@@ -6433,6 +6656,93 @@ export type GetReservationResponses = {
|
|
|
6433
6656
|
200: Reservation;
|
|
6434
6657
|
};
|
|
6435
6658
|
export type GetReservationResponse = GetReservationResponses[keyof GetReservationResponses];
|
|
6659
|
+
export type UpdateReservationData = {
|
|
6660
|
+
body: UpdateReservation;
|
|
6661
|
+
headers?: {
|
|
6662
|
+
/**
|
|
6663
|
+
* Accept-Language header
|
|
6664
|
+
*/
|
|
6665
|
+
'accept-language'?: string;
|
|
6666
|
+
/**
|
|
6667
|
+
* Cookie header
|
|
6668
|
+
*/
|
|
6669
|
+
cookie?: string;
|
|
6670
|
+
};
|
|
6671
|
+
path: {
|
|
6672
|
+
/**
|
|
6673
|
+
* Organization ID
|
|
6674
|
+
*/
|
|
6675
|
+
organizationId: string;
|
|
6676
|
+
/**
|
|
6677
|
+
* Reservation ID
|
|
6678
|
+
*/
|
|
6679
|
+
reservationId: string;
|
|
6680
|
+
};
|
|
6681
|
+
query?: never;
|
|
6682
|
+
url: '/{organizationId}/reservations/{reservationId}';
|
|
6683
|
+
};
|
|
6684
|
+
export type UpdateReservationErrors = {
|
|
6685
|
+
/**
|
|
6686
|
+
* Bad Request
|
|
6687
|
+
*/
|
|
6688
|
+
400: {
|
|
6689
|
+
/**
|
|
6690
|
+
* The HTTP status code
|
|
6691
|
+
*/
|
|
6692
|
+
status: number;
|
|
6693
|
+
/**
|
|
6694
|
+
* The error message
|
|
6695
|
+
*/
|
|
6696
|
+
message: string;
|
|
6697
|
+
};
|
|
6698
|
+
/**
|
|
6699
|
+
* Unauthorized
|
|
6700
|
+
*/
|
|
6701
|
+
401: {
|
|
6702
|
+
/**
|
|
6703
|
+
* The HTTP status code
|
|
6704
|
+
*/
|
|
6705
|
+
status: number;
|
|
6706
|
+
/**
|
|
6707
|
+
* The error message
|
|
6708
|
+
*/
|
|
6709
|
+
message: string;
|
|
6710
|
+
};
|
|
6711
|
+
/**
|
|
6712
|
+
* Not Found
|
|
6713
|
+
*/
|
|
6714
|
+
404: {
|
|
6715
|
+
/**
|
|
6716
|
+
* The HTTP status code
|
|
6717
|
+
*/
|
|
6718
|
+
status: number;
|
|
6719
|
+
/**
|
|
6720
|
+
* The error message
|
|
6721
|
+
*/
|
|
6722
|
+
message: string;
|
|
6723
|
+
};
|
|
6724
|
+
/**
|
|
6725
|
+
* Internal Server Error
|
|
6726
|
+
*/
|
|
6727
|
+
500: {
|
|
6728
|
+
/**
|
|
6729
|
+
* The HTTP status code
|
|
6730
|
+
*/
|
|
6731
|
+
status: number;
|
|
6732
|
+
/**
|
|
6733
|
+
* The error message
|
|
6734
|
+
*/
|
|
6735
|
+
message: string;
|
|
6736
|
+
};
|
|
6737
|
+
};
|
|
6738
|
+
export type UpdateReservationError = UpdateReservationErrors[keyof UpdateReservationErrors];
|
|
6739
|
+
export type UpdateReservationResponses = {
|
|
6740
|
+
/**
|
|
6741
|
+
* OK
|
|
6742
|
+
*/
|
|
6743
|
+
200: Reservation;
|
|
6744
|
+
};
|
|
6745
|
+
export type UpdateReservationResponse = UpdateReservationResponses[keyof UpdateReservationResponses];
|
|
6436
6746
|
export type GetUserReservationsData = {
|
|
6437
6747
|
body?: never;
|
|
6438
6748
|
headers?: {
|
package/src/index.d.ts
CHANGED
|
@@ -129,6 +129,10 @@ export declare const initClient: ({ baseHeaders, baseUrl, credentials, fetch, th
|
|
|
129
129
|
cart: {
|
|
130
130
|
getCartData: (input?: RequestInput) => Promise<ClientResponse<any>>;
|
|
131
131
|
};
|
|
132
|
+
customer: {
|
|
133
|
+
getCustomer: (input?: RequestInput) => Promise<ClientResponse<any>>;
|
|
134
|
+
getCustomers: (input?: RequestInput) => Promise<ClientResponse<any>>;
|
|
135
|
+
};
|
|
132
136
|
file: {
|
|
133
137
|
createTemporaryFile: (input?: RequestInput) => Promise<ClientResponse<any>>;
|
|
134
138
|
getVercelToken: (input?: RequestInput) => Promise<ClientResponse<any>>;
|
|
@@ -189,6 +193,7 @@ export declare const initClient: ({ baseHeaders, baseUrl, credentials, fetch, th
|
|
|
189
193
|
getMyReservations: (input?: RequestInput) => Promise<ClientResponse<any>>;
|
|
190
194
|
getReservations: (input?: RequestInput) => Promise<ClientResponse<any>>;
|
|
191
195
|
getUserReservations: (input?: RequestInput) => Promise<ClientResponse<any>>;
|
|
196
|
+
updateReservation: (input?: RequestInput) => Promise<ClientResponse<any>>;
|
|
192
197
|
updateReservationStatus: (input?: RequestInput) => Promise<ClientResponse<any>>;
|
|
193
198
|
};
|
|
194
199
|
shipping: {
|