@teemill/platform 0.10.0 → 0.11.1

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/api.ts CHANGED
@@ -4,7 +4,7 @@
4
4
  * Platform API
5
5
  * Manage Your podOS platform
6
6
  *
7
- * The version of the OpenAPI document: 0.10.0
7
+ * The version of the OpenAPI document: 0.11.1
8
8
  *
9
9
  *
10
10
  * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
@@ -172,6 +172,56 @@ export interface ContactInformation {
172
172
  */
173
173
  'phone'?: string | null;
174
174
  }
175
+ /**
176
+ * The customer that has placed an order on your platform
177
+ * @export
178
+ * @interface Customer
179
+ */
180
+ export interface Customer {
181
+ /**
182
+ * Unique object identifier
183
+ * @type {string}
184
+ * @memberof Customer
185
+ */
186
+ 'id': string;
187
+ /**
188
+ *
189
+ * @type {string}
190
+ * @memberof Customer
191
+ */
192
+ 'email': string;
193
+ /**
194
+ *
195
+ * @type {string}
196
+ * @memberof Customer
197
+ */
198
+ 'firstName'?: string;
199
+ /**
200
+ *
201
+ * @type {string}
202
+ * @memberof Customer
203
+ */
204
+ 'lastName'?: string;
205
+ }
206
+ /**
207
+ *
208
+ * @export
209
+ * @interface CustomersResponse
210
+ */
211
+ export interface CustomersResponse {
212
+ /**
213
+ *
214
+ * @type {Array<Customer>}
215
+ * @memberof CustomersResponse
216
+ */
217
+ 'customers': Array<Customer>;
218
+ /**
219
+ *
220
+ * @type {number}
221
+ * @memberof CustomersResponse
222
+ */
223
+ 'nextPageToken'?: number | null;
224
+ }
175
225
  /**
176
226
  *
177
227
  * @export
@@ -1614,30 +1664,25 @@ export interface VariantPackedDimensions {
1614
1664
  }
1615
1665
 
1616
1666
  /**
1617
- * OrdersApi - axios parameter creator
1667
+ * CustomersApi - axios parameter creator
1618
1668
  * @export
1619
1669
  */
1620
- export const OrdersApiAxiosParamCreator = function (configuration?: Configuration) {
1670
+ export const CustomersApiAxiosParamCreator = function (configuration?: Configuration) {
1621
1671
  return {
1622
1672
  /**
1623
- * Export orders as a CSV file
1624
- * @summary Export orders
1673
+ * Export customers as a CSV file
1674
+ * @summary Export customers
1625
1675
  * @param {string} project Project unique identifier
1626
1676
  * @param {string} platformId The platform identifier
1627
- * @param {string} start Start of date range to filter by when orders were placed
1628
- * @param {string} [end] End of date range to filter by when orders were placed
1629
- * @param {string} [search] Search term to filter based on order reference, customer name and email
1630
1677
  * @param {*} [options] Override http request option.
1631
1678
  * @throws {RequiredError}
1632
1679
  */
1633
- exportOrders: async (project: string, platformId: string, start: string, end?: string, search?: string, options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
1680
+ exportCustomers: async (project: string, platformId: string, options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
1634
1681
  // verify required parameter 'project' is not null or undefined
1635
- assertParamExists('exportOrders', 'project', project)
1682
+ assertParamExists('exportCustomers', 'project', project)
1636
1683
  // verify required parameter 'platformId' is not null or undefined
1637
- assertParamExists('exportOrders', 'platformId', platformId)
1638
- // verify required parameter 'start' is not null or undefined
1639
- assertParamExists('exportOrders', 'start', start)
1640
- const localVarPath = `/v1/platform/{platformId}/orders/export`
1684
+ assertParamExists('exportCustomers', 'platformId', platformId)
1685
+ const localVarPath = `/v1/platform/{platformId}/customers/export`
1641
1686
  .replace(`{${"platformId"}}`, encodeURIComponent(String(platformId)));
1642
1687
  // use dummy base URL string because the URL constructor only accepts absolute URLs.
1643
1688
  const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
@@ -1661,126 +1706,6 @@ export const OrdersApiAxiosParamCreator = function (configuration?: Configuratio
1661
1706
  localVarQueryParameter['project'] = project;
1662
1707
  }
1663
1708
 
1664
- if (start !== undefined) {
1665
- localVarQueryParameter['start'] = (start as any instanceof Date) ?
1666
- (start as any).toISOString() :
1667
- start;
1668
- }
1669
-
1670
- if (end !== undefined) {
1671
- localVarQueryParameter['end'] = (end as any instanceof Date) ?
1672
- (end as any).toISOString() :
1673
- end;
1674
- }
1675
-
1676
- if (search !== undefined) {
1677
- localVarQueryParameter['search'] = search;
1678
- }
1679
-
1680
-
1681
-
1682
- setSearchParams(localVarUrlObj, localVarQueryParameter);
1683
- let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
1684
- localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
1685
-
1686
- return {
1687
- url: toPathString(localVarUrlObj),
1688
- options: localVarRequestOptions,
1689
- };
1690
- },
1691
- /**
1692
- * Get a fulfillment for a platform by a given fulfillment ID.
1693
- * @summary Get fulfillment
1694
- * @param {string} project Project unique identifier
1695
- * @param {string} platformId The platform identifier
1696
- * @param {string} fulfillmentId The fulfillment identifier
1697
- * @param {*} [options] Override http request option.
1698
- * @throws {RequiredError}
1699
- */
1700
- getFulfillment: async (project: string, platformId: string, fulfillmentId: string, options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
1701
- // verify required parameter 'project' is not null or undefined
1702
- assertParamExists('getFulfillment', 'project', project)
1703
- // verify required parameter 'platformId' is not null or undefined
1704
- assertParamExists('getFulfillment', 'platformId', platformId)
1705
- // verify required parameter 'fulfillmentId' is not null or undefined
1706
- assertParamExists('getFulfillment', 'fulfillmentId', fulfillmentId)
1707
- const localVarPath = `/v1/platform/{platformId}/fulfillments/{fulfillmentId}`
1708
- .replace(`{${"platformId"}}`, encodeURIComponent(String(platformId)))
1709
- .replace(`{${"fulfillmentId"}}`, encodeURIComponent(String(fulfillmentId)));
1710
- // use dummy base URL string because the URL constructor only accepts absolute URLs.
1711
- const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
1712
- let baseOptions;
1713
- if (configuration) {
1714
- baseOptions = configuration.baseOptions;
1715
- }
1716
-
1717
- const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options};
1718
- const localVarHeaderParameter = {} as any;
1719
- const localVarQueryParameter = {} as any;
1720
-
1721
- // authentication session-oauth required
1722
- // oauth required
1723
- await setOAuthToObject(localVarHeaderParameter, "session-oauth", [], configuration)
1724
-
1725
- // authentication api-key required
1726
- await setApiKeyToObject(localVarHeaderParameter, "Authorization", configuration)
1727
-
1728
- if (project !== undefined) {
1729
- localVarQueryParameter['project'] = project;
1730
- }
1731
-
1732
-
1733
-
1734
- setSearchParams(localVarUrlObj, localVarQueryParameter);
1735
- let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
1736
- localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
1737
-
1738
- return {
1739
- url: toPathString(localVarUrlObj),
1740
- options: localVarRequestOptions,
1741
- };
1742
- },
1743
- /**
1744
- * Get an order for a platform by a given order ID.
1745
- * @summary Get order
1746
- * @param {string} project Project unique identifier
1747
- * @param {string} platformId The platform identifier
1748
- * @param {string} orderId The order identifier
1749
- * @param {*} [options] Override http request option.
1750
- * @throws {RequiredError}
1751
- */
1752
- getOrder: async (project: string, platformId: string, orderId: string, options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
1753
- // verify required parameter 'project' is not null or undefined
1754
- assertParamExists('getOrder', 'project', project)
1755
- // verify required parameter 'platformId' is not null or undefined
1756
- assertParamExists('getOrder', 'platformId', platformId)
1757
- // verify required parameter 'orderId' is not null or undefined
1758
- assertParamExists('getOrder', 'orderId', orderId)
1759
- const localVarPath = `/v1/platform/{platformId}/orders/{orderId}`
1760
- .replace(`{${"platformId"}}`, encodeURIComponent(String(platformId)))
1761
- .replace(`{${"orderId"}}`, encodeURIComponent(String(orderId)));
1762
- // use dummy base URL string because the URL constructor only accepts absolute URLs.
1763
- const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
1764
- let baseOptions;
1765
- if (configuration) {
1766
- baseOptions = configuration.baseOptions;
1767
- }
1768
-
1769
- const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options};
1770
- const localVarHeaderParameter = {} as any;
1771
- const localVarQueryParameter = {} as any;
1772
-
1773
- // authentication session-oauth required
1774
- // oauth required
1775
- await setOAuthToObject(localVarHeaderParameter, "session-oauth", [], configuration)
1776
-
1777
- // authentication api-key required
1778
- await setApiKeyToObject(localVarHeaderParameter, "Authorization", configuration)
1779
-
1780
- if (project !== undefined) {
1781
- localVarQueryParameter['project'] = project;
1782
- }
1783
-
1784
1709
 
1785
1710
 
1786
1711
  setSearchParams(localVarUrlObj, localVarQueryParameter);
@@ -1793,24 +1718,24 @@ export const OrdersApiAxiosParamCreator = function (configuration?: Configuratio
1793
1718
  };
1794
1719
  },
1795
1720
  /**
1796
- * List available fulfillers for a given fulfillment
1797
- * @summary List available fulfillers
1721
+ * Get a customer for a platform by a given customer ID.
1722
+ * @summary Get customer
1798
1723
  * @param {string} project Project unique identifier
1799
1724
  * @param {string} platformId The platform identifier
1800
- * @param {string} fulfillmentId The fulfillment identifier
1725
+ * @param {string} customerId The customer identifier
1801
1726
  * @param {*} [options] Override http request option.
1802
1727
  * @throws {RequiredError}
1803
1728
  */
1804
- listAvailableFulfillers: async (project: string, platformId: string, fulfillmentId: string, options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
1729
+ getCustomer: async (project: string, platformId: string, customerId: string, options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
1805
1730
  // verify required parameter 'project' is not null or undefined
1806
- assertParamExists('listAvailableFulfillers', 'project', project)
1731
+ assertParamExists('getCustomer', 'project', project)
1807
1732
  // verify required parameter 'platformId' is not null or undefined
1808
- assertParamExists('listAvailableFulfillers', 'platformId', platformId)
1809
- // verify required parameter 'fulfillmentId' is not null or undefined
1810
- assertParamExists('listAvailableFulfillers', 'fulfillmentId', fulfillmentId)
1811
- const localVarPath = `/v1/platform/{platformId}/fulfillments/{fulfillmentId}/available-fulfillers`
1733
+ assertParamExists('getCustomer', 'platformId', platformId)
1734
+ // verify required parameter 'customerId' is not null or undefined
1735
+ assertParamExists('getCustomer', 'customerId', customerId)
1736
+ const localVarPath = `/v1/platform/{platformId}/customers/{customerId}`
1812
1737
  .replace(`{${"platformId"}}`, encodeURIComponent(String(platformId)))
1813
- .replace(`{${"fulfillmentId"}}`, encodeURIComponent(String(fulfillmentId)));
1738
+ .replace(`{${"customerId"}}`, encodeURIComponent(String(customerId)));
1814
1739
  // use dummy base URL string because the URL constructor only accepts absolute URLs.
1815
1740
  const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
1816
1741
  let baseOptions;
@@ -1845,24 +1770,22 @@ export const OrdersApiAxiosParamCreator = function (configuration?: Configuratio
1845
1770
  };
1846
1771
  },
1847
1772
  /**
1848
- * Lists all orders placed on projects belonging to this platform, paginated into configurable chunks.
1849
- * @summary List orders
1773
+ * List customers for a platform
1774
+ * @summary List customers
1850
1775
  * @param {string} project Project unique identifier
1851
1776
  * @param {string} platformId The platform identifier
1852
1777
  * @param {number} [pageToken] Page reference token
1853
1778
  * @param {number} [pageSize] Max page size. This is the maximum page size that will be returned, but it might be smaller.
1854
1779
  * @param {string} [search] Search term to filter based on order reference, customer name and email
1855
- * @param {string} [start] Start of date range to filter by when orders were placed
1856
- * @param {string} [end] End of date range to filter by when orders were placed
1857
1780
  * @param {*} [options] Override http request option.
1858
1781
  * @throws {RequiredError}
1859
1782
  */
1860
- listOrders: async (project: string, platformId: string, pageToken?: number, pageSize?: number, search?: string, start?: string, end?: string, options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
1783
+ listCustomers: async (project: string, platformId: string, pageToken?: number, pageSize?: number, search?: string, options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
1861
1784
  // verify required parameter 'project' is not null or undefined
1862
- assertParamExists('listOrders', 'project', project)
1785
+ assertParamExists('listCustomers', 'project', project)
1863
1786
  // verify required parameter 'platformId' is not null or undefined
1864
- assertParamExists('listOrders', 'platformId', platformId)
1865
- const localVarPath = `/v1/platform/{platformId}/orders`
1787
+ assertParamExists('listCustomers', 'platformId', platformId)
1788
+ const localVarPath = `/v1/platform/{platformId}/customers`
1866
1789
  .replace(`{${"platformId"}}`, encodeURIComponent(String(platformId)));
1867
1790
  // use dummy base URL string because the URL constructor only accepts absolute URLs.
1868
1791
  const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
@@ -1898,18 +1821,6 @@ export const OrdersApiAxiosParamCreator = function (configuration?: Configuratio
1898
1821
  localVarQueryParameter['search'] = search;
1899
1822
  }
1900
1823
 
1901
- if (start !== undefined) {
1902
- localVarQueryParameter['start'] = (start as any instanceof Date) ?
1903
- (start as any).toISOString() :
1904
- start;
1905
- }
1906
-
1907
- if (end !== undefined) {
1908
- localVarQueryParameter['end'] = (end as any instanceof Date) ?
1909
- (end as any).toISOString() :
1910
- end;
1911
- }
1912
-
1913
1824
 
1914
1825
 
1915
1826
  setSearchParams(localVarUrlObj, localVarQueryParameter);
@@ -1921,38 +1832,582 @@ export const OrdersApiAxiosParamCreator = function (configuration?: Configuratio
1921
1832
  options: localVarRequestOptions,
1922
1833
  };
1923
1834
  },
1835
+ }
1836
+ };
1837
+
1838
+ /**
1839
+ * CustomersApi - functional programming interface
1840
+ * @export
1841
+ */
1842
+ export const CustomersApiFp = function(configuration?: Configuration) {
1843
+ const localVarAxiosParamCreator = CustomersApiAxiosParamCreator(configuration)
1844
+ return {
1924
1845
  /**
1925
- * Update a fulfillment that belongs to an order placed through the platform
1926
- * @summary Update fulfillment
1846
+ * Export customers as a CSV file
1847
+ * @summary Export customers
1927
1848
  * @param {string} project Project unique identifier
1928
1849
  * @param {string} platformId The platform identifier
1929
- * @param {string} fulfillmentId The fulfillment identifier
1930
- * @param {UpdateFulfillmentRequest} updateFulfillmentRequest
1931
1850
  * @param {*} [options] Override http request option.
1932
1851
  * @throws {RequiredError}
1933
1852
  */
1934
- updateFulfillment: async (project: string, platformId: string, fulfillmentId: string, updateFulfillmentRequest: UpdateFulfillmentRequest, options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
1935
- // verify required parameter 'project' is not null or undefined
1936
- assertParamExists('updateFulfillment', 'project', project)
1937
- // verify required parameter 'platformId' is not null or undefined
1938
- assertParamExists('updateFulfillment', 'platformId', platformId)
1939
- // verify required parameter 'fulfillmentId' is not null or undefined
1940
- assertParamExists('updateFulfillment', 'fulfillmentId', fulfillmentId)
1941
- // verify required parameter 'updateFulfillmentRequest' is not null or undefined
1942
- assertParamExists('updateFulfillment', 'updateFulfillmentRequest', updateFulfillmentRequest)
1943
- const localVarPath = `/v1/platform/{platformId}/fulfillments/{fulfillmentId}`
1944
- .replace(`{${"platformId"}}`, encodeURIComponent(String(platformId)))
1945
- .replace(`{${"fulfillmentId"}}`, encodeURIComponent(String(fulfillmentId)));
1946
- // use dummy base URL string because the URL constructor only accepts absolute URLs.
1947
- const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
1948
- let baseOptions;
1949
- if (configuration) {
1950
- baseOptions = configuration.baseOptions;
1951
- }
1952
-
1953
- const localVarRequestOptions = { method: 'PATCH', ...baseOptions, ...options};
1954
- const localVarHeaderParameter = {} as any;
1955
- const localVarQueryParameter = {} as any;
1853
+ async exportCustomers(project: string, platformId: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<File>> {
1854
+ const localVarAxiosArgs = await localVarAxiosParamCreator.exportCustomers(project, platformId, options);
1855
+ const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
1856
+ const localVarOperationServerBasePath = operationServerMap['CustomersApi.exportCustomers']?.[localVarOperationServerIndex]?.url;
1857
+ return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
1858
+ },
1859
+ /**
1860
+ * Get a customer for a platform by a given customer ID.
1861
+ * @summary Get customer
1862
+ * @param {string} project Project unique identifier
1863
+ * @param {string} platformId The platform identifier
1864
+ * @param {string} customerId The customer identifier
1865
+ * @param {*} [options] Override http request option.
1866
+ * @throws {RequiredError}
1867
+ */
1868
+ async getCustomer(project: string, platformId: string, customerId: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<Customer>> {
1869
+ const localVarAxiosArgs = await localVarAxiosParamCreator.getCustomer(project, platformId, customerId, options);
1870
+ const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
1871
+ const localVarOperationServerBasePath = operationServerMap['CustomersApi.getCustomer']?.[localVarOperationServerIndex]?.url;
1872
+ return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
1873
+ },
1874
+ /**
1875
+ * List customers for a platform
1876
+ * @summary List customers
1877
+ * @param {string} project Project unique identifier
1878
+ * @param {string} platformId The platform identifier
1879
+ * @param {number} [pageToken] Page reference token
1880
+ * @param {number} [pageSize] Max page size. This is the maximum page size that will be returned, but it might be smaller.
1881
+ * @param {string} [search] Search term to filter based on order reference, customer name and email
1882
+ * @param {*} [options] Override http request option.
1883
+ * @throws {RequiredError}
1884
+ */
1885
+ async listCustomers(project: string, platformId: string, pageToken?: number, pageSize?: number, search?: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<CustomersResponse>> {
1886
+ const localVarAxiosArgs = await localVarAxiosParamCreator.listCustomers(project, platformId, pageToken, pageSize, search, options);
1887
+ const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
1888
+ const localVarOperationServerBasePath = operationServerMap['CustomersApi.listCustomers']?.[localVarOperationServerIndex]?.url;
1889
+ return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
1890
+ },
1891
+ }
1892
+ };
1893
+
1894
+ /**
1895
+ * CustomersApi - factory interface
1896
+ * @export
1897
+ */
1898
+ export const CustomersApiFactory = function (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) {
1899
+ const localVarFp = CustomersApiFp(configuration)
1900
+ return {
1901
+ /**
1902
+ * Export customers as a CSV file
1903
+ * @summary Export customers
1904
+ * @param {CustomersApiExportCustomersRequest} requestParameters Request parameters.
1905
+ * @param {*} [options] Override http request option.
1906
+ * @throws {RequiredError}
1907
+ */
1908
+ exportCustomers(requestParameters: CustomersApiExportCustomersRequest, options?: RawAxiosRequestConfig): AxiosPromise<File> {
1909
+ return localVarFp.exportCustomers(requestParameters.project, requestParameters.platformId, options).then((request) => request(axios, basePath));
1910
+ },
1911
+ /**
1912
+ * Get a customer for a platform by a given customer ID.
1913
+ * @summary Get customer
1914
+ * @param {CustomersApiGetCustomerRequest} requestParameters Request parameters.
1915
+ * @param {*} [options] Override http request option.
1916
+ * @throws {RequiredError}
1917
+ */
1918
+ getCustomer(requestParameters: CustomersApiGetCustomerRequest, options?: RawAxiosRequestConfig): AxiosPromise<Customer> {
1919
+ return localVarFp.getCustomer(requestParameters.project, requestParameters.platformId, requestParameters.customerId, options).then((request) => request(axios, basePath));
1920
+ },
1921
+ /**
1922
+ * List customers for a platform
1923
+ * @summary List customers
1924
+ * @param {CustomersApiListCustomersRequest} requestParameters Request parameters.
1925
+ * @param {*} [options] Override http request option.
1926
+ * @throws {RequiredError}
1927
+ */
1928
+ listCustomers(requestParameters: CustomersApiListCustomersRequest, options?: RawAxiosRequestConfig): AxiosPromise<CustomersResponse> {
1929
+ return localVarFp.listCustomers(requestParameters.project, requestParameters.platformId, requestParameters.pageToken, requestParameters.pageSize, requestParameters.search, options).then((request) => request(axios, basePath));
1930
+ },
1931
+ };
1932
+ };
1933
+
1934
+ /**
1935
+ * Request parameters for exportCustomers operation in CustomersApi.
1936
+ * @export
1937
+ * @interface CustomersApiExportCustomersRequest
1938
+ */
1939
+ export interface CustomersApiExportCustomersRequest {
1940
+ /**
1941
+ * Project unique identifier
1942
+ * @type {string}
1943
+ * @memberof CustomersApiExportCustomers
1944
+ */
1945
+ readonly project: string
1946
+
1947
+ /**
1948
+ * The platform identifier
1949
+ * @type {string}
1950
+ * @memberof CustomersApiExportCustomers
1951
+ */
1952
+ readonly platformId: string
1953
+ }
1954
+
1955
+ /**
1956
+ * Request parameters for getCustomer operation in CustomersApi.
1957
+ * @export
1958
+ * @interface CustomersApiGetCustomerRequest
1959
+ */
1960
+ export interface CustomersApiGetCustomerRequest {
1961
+ /**
1962
+ * Project unique identifier
1963
+ * @type {string}
1964
+ * @memberof CustomersApiGetCustomer
1965
+ */
1966
+ readonly project: string
1967
+
1968
+ /**
1969
+ * The platform identifier
1970
+ * @type {string}
1971
+ * @memberof CustomersApiGetCustomer
1972
+ */
1973
+ readonly platformId: string
1974
+
1975
+ /**
1976
+ * The customer identifier
1977
+ * @type {string}
1978
+ * @memberof CustomersApiGetCustomer
1979
+ */
1980
+ readonly customerId: string
1981
+ }
1982
+
1983
+ /**
1984
+ * Request parameters for listCustomers operation in CustomersApi.
1985
+ * @export
1986
+ * @interface CustomersApiListCustomersRequest
1987
+ */
1988
+ export interface CustomersApiListCustomersRequest {
1989
+ /**
1990
+ * Project unique identifier
1991
+ * @type {string}
1992
+ * @memberof CustomersApiListCustomers
1993
+ */
1994
+ readonly project: string
1995
+
1996
+ /**
1997
+ * The platform identifier
1998
+ * @type {string}
1999
+ * @memberof CustomersApiListCustomers
2000
+ */
2001
+ readonly platformId: string
2002
+
2003
+ /**
2004
+ * Page reference token
2005
+ * @type {number}
2006
+ * @memberof CustomersApiListCustomers
2007
+ */
2008
+ readonly pageToken?: number
2009
+
2010
+ /**
2011
+ * Max page size. This is the maximum page size that will be returned, but it might be smaller.
2012
+ * @type {number}
2013
+ * @memberof CustomersApiListCustomers
2014
+ */
2015
+ readonly pageSize?: number
2016
+
2017
+ /**
2018
+ * Search term to filter based on order reference, customer name and email
2019
+ * @type {string}
2020
+ * @memberof CustomersApiListCustomers
2021
+ */
2022
+ readonly search?: string
2023
+ }
2024
+
2025
+ /**
2026
+ * CustomersApi - object-oriented interface
2027
+ * @export
2028
+ * @class CustomersApi
2029
+ * @extends {BaseAPI}
2030
+ */
2031
+ export class CustomersApi extends BaseAPI {
2032
+ /**
2033
+ * Export customers as a CSV file
2034
+ * @summary Export customers
2035
+ * @param {CustomersApiExportCustomersRequest} requestParameters Request parameters.
2036
+ * @param {*} [options] Override http request option.
2037
+ * @throws {RequiredError}
2038
+ * @memberof CustomersApi
2039
+ */
2040
+ public exportCustomers(requestParameters: CustomersApiExportCustomersRequest, options?: RawAxiosRequestConfig) {
2041
+ return CustomersApiFp(this.configuration).exportCustomers(requestParameters.project, requestParameters.platformId, options).then((request) => request(this.axios, this.basePath));
2042
+ }
2043
+
2044
+ /**
2045
+ * Get a customer for a platform by a given customer ID.
2046
+ * @summary Get customer
2047
+ * @param {CustomersApiGetCustomerRequest} requestParameters Request parameters.
2048
+ * @param {*} [options] Override http request option.
2049
+ * @throws {RequiredError}
2050
+ * @memberof CustomersApi
2051
+ */
2052
+ public getCustomer(requestParameters: CustomersApiGetCustomerRequest, options?: RawAxiosRequestConfig) {
2053
+ return CustomersApiFp(this.configuration).getCustomer(requestParameters.project, requestParameters.platformId, requestParameters.customerId, options).then((request) => request(this.axios, this.basePath));
2054
+ }
2055
+
2056
+ /**
2057
+ * List customers for a platform
2058
+ * @summary List customers
2059
+ * @param {CustomersApiListCustomersRequest} requestParameters Request parameters.
2060
+ * @param {*} [options] Override http request option.
2061
+ * @throws {RequiredError}
2062
+ * @memberof CustomersApi
2063
+ */
2064
+ public listCustomers(requestParameters: CustomersApiListCustomersRequest, options?: RawAxiosRequestConfig) {
2065
+ return CustomersApiFp(this.configuration).listCustomers(requestParameters.project, requestParameters.platformId, requestParameters.pageToken, requestParameters.pageSize, requestParameters.search, options).then((request) => request(this.axios, this.basePath));
2066
+ }
2067
+ }
2068
+
2069
+
2070
+
2071
+ /**
2072
+ * OrdersApi - axios parameter creator
2073
+ * @export
2074
+ */
2075
+ export const OrdersApiAxiosParamCreator = function (configuration?: Configuration) {
2076
+ return {
2077
+ /**
2078
+ * Export orders as a CSV file
2079
+ * @summary Export orders
2080
+ * @param {string} project Project unique identifier
2081
+ * @param {string} platformId The platform identifier
2082
+ * @param {string} start Start of date range to filter by when orders were placed
2083
+ * @param {string} [end] End of date range to filter by when orders were placed
2084
+ * @param {string} [search] Search term to filter based on order reference, customer name and email
2085
+ * @param {*} [options] Override http request option.
2086
+ * @throws {RequiredError}
2087
+ */
2088
+ exportOrders: async (project: string, platformId: string, start: string, end?: string, search?: string, options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
2089
+ // verify required parameter 'project' is not null or undefined
2090
+ assertParamExists('exportOrders', 'project', project)
2091
+ // verify required parameter 'platformId' is not null or undefined
2092
+ assertParamExists('exportOrders', 'platformId', platformId)
2093
+ // verify required parameter 'start' is not null or undefined
2094
+ assertParamExists('exportOrders', 'start', start)
2095
+ const localVarPath = `/v1/platform/{platformId}/orders/export`
2096
+ .replace(`{${"platformId"}}`, encodeURIComponent(String(platformId)));
2097
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
2098
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
2099
+ let baseOptions;
2100
+ if (configuration) {
2101
+ baseOptions = configuration.baseOptions;
2102
+ }
2103
+
2104
+ const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options};
2105
+ const localVarHeaderParameter = {} as any;
2106
+ const localVarQueryParameter = {} as any;
2107
+
2108
+ // authentication session-oauth required
2109
+ // oauth required
2110
+ await setOAuthToObject(localVarHeaderParameter, "session-oauth", [], configuration)
2111
+
2112
+ // authentication api-key required
2113
+ await setApiKeyToObject(localVarHeaderParameter, "Authorization", configuration)
2114
+
2115
+ if (project !== undefined) {
2116
+ localVarQueryParameter['project'] = project;
2117
+ }
2118
+
2119
+ if (start !== undefined) {
2120
+ localVarQueryParameter['start'] = (start as any instanceof Date) ?
2121
+ (start as any).toISOString() :
2122
+ start;
2123
+ }
2124
+
2125
+ if (end !== undefined) {
2126
+ localVarQueryParameter['end'] = (end as any instanceof Date) ?
2127
+ (end as any).toISOString() :
2128
+ end;
2129
+ }
2130
+
2131
+ if (search !== undefined) {
2132
+ localVarQueryParameter['search'] = search;
2133
+ }
2134
+
2135
+
2136
+
2137
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
2138
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
2139
+ localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
2140
+
2141
+ return {
2142
+ url: toPathString(localVarUrlObj),
2143
+ options: localVarRequestOptions,
2144
+ };
2145
+ },
2146
+ /**
2147
+ * Get a fulfillment for a platform by a given fulfillment ID.
2148
+ * @summary Get fulfillment
2149
+ * @param {string} project Project unique identifier
2150
+ * @param {string} platformId The platform identifier
2151
+ * @param {string} fulfillmentId The fulfillment identifier
2152
+ * @param {*} [options] Override http request option.
2153
+ * @throws {RequiredError}
2154
+ */
2155
+ getFulfillment: async (project: string, platformId: string, fulfillmentId: string, options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
2156
+ // verify required parameter 'project' is not null or undefined
2157
+ assertParamExists('getFulfillment', 'project', project)
2158
+ // verify required parameter 'platformId' is not null or undefined
2159
+ assertParamExists('getFulfillment', 'platformId', platformId)
2160
+ // verify required parameter 'fulfillmentId' is not null or undefined
2161
+ assertParamExists('getFulfillment', 'fulfillmentId', fulfillmentId)
2162
+ const localVarPath = `/v1/platform/{platformId}/fulfillments/{fulfillmentId}`
2163
+ .replace(`{${"platformId"}}`, encodeURIComponent(String(platformId)))
2164
+ .replace(`{${"fulfillmentId"}}`, encodeURIComponent(String(fulfillmentId)));
2165
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
2166
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
2167
+ let baseOptions;
2168
+ if (configuration) {
2169
+ baseOptions = configuration.baseOptions;
2170
+ }
2171
+
2172
+ const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options};
2173
+ const localVarHeaderParameter = {} as any;
2174
+ const localVarQueryParameter = {} as any;
2175
+
2176
+ // authentication session-oauth required
2177
+ // oauth required
2178
+ await setOAuthToObject(localVarHeaderParameter, "session-oauth", [], configuration)
2179
+
2180
+ // authentication api-key required
2181
+ await setApiKeyToObject(localVarHeaderParameter, "Authorization", configuration)
2182
+
2183
+ if (project !== undefined) {
2184
+ localVarQueryParameter['project'] = project;
2185
+ }
2186
+
2187
+
2188
+
2189
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
2190
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
2191
+ localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
2192
+
2193
+ return {
2194
+ url: toPathString(localVarUrlObj),
2195
+ options: localVarRequestOptions,
2196
+ };
2197
+ },
2198
+ /**
2199
+ * Get an order for a platform by a given order ID.
2200
+ * @summary Get order
2201
+ * @param {string} project Project unique identifier
2202
+ * @param {string} platformId The platform identifier
2203
+ * @param {string} orderId The order identifier
2204
+ * @param {*} [options] Override http request option.
2205
+ * @throws {RequiredError}
2206
+ */
2207
+ getOrder: async (project: string, platformId: string, orderId: string, options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
2208
+ // verify required parameter 'project' is not null or undefined
2209
+ assertParamExists('getOrder', 'project', project)
2210
+ // verify required parameter 'platformId' is not null or undefined
2211
+ assertParamExists('getOrder', 'platformId', platformId)
2212
+ // verify required parameter 'orderId' is not null or undefined
2213
+ assertParamExists('getOrder', 'orderId', orderId)
2214
+ const localVarPath = `/v1/platform/{platformId}/orders/{orderId}`
2215
+ .replace(`{${"platformId"}}`, encodeURIComponent(String(platformId)))
2216
+ .replace(`{${"orderId"}}`, encodeURIComponent(String(orderId)));
2217
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
2218
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
2219
+ let baseOptions;
2220
+ if (configuration) {
2221
+ baseOptions = configuration.baseOptions;
2222
+ }
2223
+
2224
+ const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options};
2225
+ const localVarHeaderParameter = {} as any;
2226
+ const localVarQueryParameter = {} as any;
2227
+
2228
+ // authentication session-oauth required
2229
+ // oauth required
2230
+ await setOAuthToObject(localVarHeaderParameter, "session-oauth", [], configuration)
2231
+
2232
+ // authentication api-key required
2233
+ await setApiKeyToObject(localVarHeaderParameter, "Authorization", configuration)
2234
+
2235
+ if (project !== undefined) {
2236
+ localVarQueryParameter['project'] = project;
2237
+ }
2238
+
2239
+
2240
+
2241
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
2242
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
2243
+ localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
2244
+
2245
+ return {
2246
+ url: toPathString(localVarUrlObj),
2247
+ options: localVarRequestOptions,
2248
+ };
2249
+ },
2250
+ /**
2251
+ * List available fulfillers for a given fulfillment
2252
+ * @summary List available fulfillers
2253
+ * @param {string} project Project unique identifier
2254
+ * @param {string} platformId The platform identifier
2255
+ * @param {string} fulfillmentId The fulfillment identifier
2256
+ * @param {*} [options] Override http request option.
2257
+ * @throws {RequiredError}
2258
+ */
2259
+ listAvailableFulfillers: async (project: string, platformId: string, fulfillmentId: string, options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
2260
+ // verify required parameter 'project' is not null or undefined
2261
+ assertParamExists('listAvailableFulfillers', 'project', project)
2262
+ // verify required parameter 'platformId' is not null or undefined
2263
+ assertParamExists('listAvailableFulfillers', 'platformId', platformId)
2264
+ // verify required parameter 'fulfillmentId' is not null or undefined
2265
+ assertParamExists('listAvailableFulfillers', 'fulfillmentId', fulfillmentId)
2266
+ const localVarPath = `/v1/platform/{platformId}/fulfillments/{fulfillmentId}/available-fulfillers`
2267
+ .replace(`{${"platformId"}}`, encodeURIComponent(String(platformId)))
2268
+ .replace(`{${"fulfillmentId"}}`, encodeURIComponent(String(fulfillmentId)));
2269
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
2270
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
2271
+ let baseOptions;
2272
+ if (configuration) {
2273
+ baseOptions = configuration.baseOptions;
2274
+ }
2275
+
2276
+ const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options};
2277
+ const localVarHeaderParameter = {} as any;
2278
+ const localVarQueryParameter = {} as any;
2279
+
2280
+ // authentication session-oauth required
2281
+ // oauth required
2282
+ await setOAuthToObject(localVarHeaderParameter, "session-oauth", [], configuration)
2283
+
2284
+ // authentication api-key required
2285
+ await setApiKeyToObject(localVarHeaderParameter, "Authorization", configuration)
2286
+
2287
+ if (project !== undefined) {
2288
+ localVarQueryParameter['project'] = project;
2289
+ }
2290
+
2291
+
2292
+
2293
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
2294
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
2295
+ localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
2296
+
2297
+ return {
2298
+ url: toPathString(localVarUrlObj),
2299
+ options: localVarRequestOptions,
2300
+ };
2301
+ },
2302
+ /**
2303
+ * Lists all orders placed on projects belonging to this platform, paginated into configurable chunks.
2304
+ * @summary List orders
2305
+ * @param {string} project Project unique identifier
2306
+ * @param {string} platformId The platform identifier
2307
+ * @param {number} [pageToken] Page reference token
2308
+ * @param {number} [pageSize] Max page size. This is the maximum page size that will be returned, but it might be smaller.
2309
+ * @param {string} [search] Search term to filter based on order reference, customer name and email
2310
+ * @param {string} [start] Start of date range to filter by when orders were placed
2311
+ * @param {string} [end] End of date range to filter by when orders were placed
2312
+ * @param {*} [options] Override http request option.
2313
+ * @throws {RequiredError}
2314
+ */
2315
+ listOrders: async (project: string, platformId: string, pageToken?: number, pageSize?: number, search?: string, start?: string, end?: string, options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
2316
+ // verify required parameter 'project' is not null or undefined
2317
+ assertParamExists('listOrders', 'project', project)
2318
+ // verify required parameter 'platformId' is not null or undefined
2319
+ assertParamExists('listOrders', 'platformId', platformId)
2320
+ const localVarPath = `/v1/platform/{platformId}/orders`
2321
+ .replace(`{${"platformId"}}`, encodeURIComponent(String(platformId)));
2322
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
2323
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
2324
+ let baseOptions;
2325
+ if (configuration) {
2326
+ baseOptions = configuration.baseOptions;
2327
+ }
2328
+
2329
+ const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options};
2330
+ const localVarHeaderParameter = {} as any;
2331
+ const localVarQueryParameter = {} as any;
2332
+
2333
+ // authentication session-oauth required
2334
+ // oauth required
2335
+ await setOAuthToObject(localVarHeaderParameter, "session-oauth", [], configuration)
2336
+
2337
+ // authentication api-key required
2338
+ await setApiKeyToObject(localVarHeaderParameter, "Authorization", configuration)
2339
+
2340
+ if (project !== undefined) {
2341
+ localVarQueryParameter['project'] = project;
2342
+ }
2343
+
2344
+ if (pageToken !== undefined) {
2345
+ localVarQueryParameter['pageToken'] = pageToken;
2346
+ }
2347
+
2348
+ if (pageSize !== undefined) {
2349
+ localVarQueryParameter['pageSize'] = pageSize;
2350
+ }
2351
+
2352
+ if (search !== undefined) {
2353
+ localVarQueryParameter['search'] = search;
2354
+ }
2355
+
2356
+ if (start !== undefined) {
2357
+ localVarQueryParameter['start'] = (start as any instanceof Date) ?
2358
+ (start as any).toISOString() :
2359
+ start;
2360
+ }
2361
+
2362
+ if (end !== undefined) {
2363
+ localVarQueryParameter['end'] = (end as any instanceof Date) ?
2364
+ (end as any).toISOString() :
2365
+ end;
2366
+ }
2367
+
2368
+
2369
+
2370
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
2371
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
2372
+ localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
2373
+
2374
+ return {
2375
+ url: toPathString(localVarUrlObj),
2376
+ options: localVarRequestOptions,
2377
+ };
2378
+ },
2379
+ /**
2380
+ * Update a fulfillment that belongs to an order placed through the platform
2381
+ * @summary Update fulfillment
2382
+ * @param {string} project Project unique identifier
2383
+ * @param {string} platformId The platform identifier
2384
+ * @param {string} fulfillmentId The fulfillment identifier
2385
+ * @param {UpdateFulfillmentRequest} updateFulfillmentRequest
2386
+ * @param {*} [options] Override http request option.
2387
+ * @throws {RequiredError}
2388
+ */
2389
+ updateFulfillment: async (project: string, platformId: string, fulfillmentId: string, updateFulfillmentRequest: UpdateFulfillmentRequest, options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
2390
+ // verify required parameter 'project' is not null or undefined
2391
+ assertParamExists('updateFulfillment', 'project', project)
2392
+ // verify required parameter 'platformId' is not null or undefined
2393
+ assertParamExists('updateFulfillment', 'platformId', platformId)
2394
+ // verify required parameter 'fulfillmentId' is not null or undefined
2395
+ assertParamExists('updateFulfillment', 'fulfillmentId', fulfillmentId)
2396
+ // verify required parameter 'updateFulfillmentRequest' is not null or undefined
2397
+ assertParamExists('updateFulfillment', 'updateFulfillmentRequest', updateFulfillmentRequest)
2398
+ const localVarPath = `/v1/platform/{platformId}/fulfillments/{fulfillmentId}`
2399
+ .replace(`{${"platformId"}}`, encodeURIComponent(String(platformId)))
2400
+ .replace(`{${"fulfillmentId"}}`, encodeURIComponent(String(fulfillmentId)));
2401
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
2402
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
2403
+ let baseOptions;
2404
+ if (configuration) {
2405
+ baseOptions = configuration.baseOptions;
2406
+ }
2407
+
2408
+ const localVarRequestOptions = { method: 'PATCH', ...baseOptions, ...options};
2409
+ const localVarHeaderParameter = {} as any;
2410
+ const localVarQueryParameter = {} as any;
1956
2411
 
1957
2412
  // authentication session-oauth required
1958
2413
  // oauth required
@@ -2458,12 +2913,60 @@ export class OrdersApi extends BaseAPI {
2458
2913
 
2459
2914
 
2460
2915
 
2461
- /**
2462
- * PlatformApi - axios parameter creator
2463
- * @export
2464
- */
2465
- export const PlatformApiAxiosParamCreator = function (configuration?: Configuration) {
2466
- return {
2916
+ /**
2917
+ * PlatformApi - axios parameter creator
2918
+ * @export
2919
+ */
2920
+ export const PlatformApiAxiosParamCreator = function (configuration?: Configuration) {
2921
+ return {
2922
+ /**
2923
+ * Export customers as a CSV file
2924
+ * @summary Export customers
2925
+ * @param {string} project Project unique identifier
2926
+ * @param {string} platformId The platform identifier
2927
+ * @param {*} [options] Override http request option.
2928
+ * @throws {RequiredError}
2929
+ */
2930
+ exportCustomers: async (project: string, platformId: string, options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
2931
+ // verify required parameter 'project' is not null or undefined
2932
+ assertParamExists('exportCustomers', 'project', project)
2933
+ // verify required parameter 'platformId' is not null or undefined
2934
+ assertParamExists('exportCustomers', 'platformId', platformId)
2935
+ const localVarPath = `/v1/platform/{platformId}/customers/export`
2936
+ .replace(`{${"platformId"}}`, encodeURIComponent(String(platformId)));
2937
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
2938
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
2939
+ let baseOptions;
2940
+ if (configuration) {
2941
+ baseOptions = configuration.baseOptions;
2942
+ }
2943
+
2944
+ const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options};
2945
+ const localVarHeaderParameter = {} as any;
2946
+ const localVarQueryParameter = {} as any;
2947
+
2948
+ // authentication session-oauth required
2949
+ // oauth required
2950
+ await setOAuthToObject(localVarHeaderParameter, "session-oauth", [], configuration)
2951
+
2952
+ // authentication api-key required
2953
+ await setApiKeyToObject(localVarHeaderParameter, "Authorization", configuration)
2954
+
2955
+ if (project !== undefined) {
2956
+ localVarQueryParameter['project'] = project;
2957
+ }
2958
+
2959
+
2960
+
2961
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
2962
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
2963
+ localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
2964
+
2965
+ return {
2966
+ url: toPathString(localVarUrlObj),
2967
+ options: localVarRequestOptions,
2968
+ };
2969
+ },
2467
2970
  /**
2468
2971
  * Export orders as a CSV file
2469
2972
  * @summary Export orders
@@ -2524,6 +3027,58 @@ export const PlatformApiAxiosParamCreator = function (configuration?: Configurat
2524
3027
 
2525
3028
 
2526
3029
 
3030
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
3031
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
3032
+ localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
3033
+
3034
+ return {
3035
+ url: toPathString(localVarUrlObj),
3036
+ options: localVarRequestOptions,
3037
+ };
3038
+ },
3039
+ /**
3040
+ * Get a customer for a platform by a given customer ID.
3041
+ * @summary Get customer
3042
+ * @param {string} project Project unique identifier
3043
+ * @param {string} platformId The platform identifier
3044
+ * @param {string} customerId The customer identifier
3045
+ * @param {*} [options] Override http request option.
3046
+ * @throws {RequiredError}
3047
+ */
3048
+ getCustomer: async (project: string, platformId: string, customerId: string, options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
3049
+ // verify required parameter 'project' is not null or undefined
3050
+ assertParamExists('getCustomer', 'project', project)
3051
+ // verify required parameter 'platformId' is not null or undefined
3052
+ assertParamExists('getCustomer', 'platformId', platformId)
3053
+ // verify required parameter 'customerId' is not null or undefined
3054
+ assertParamExists('getCustomer', 'customerId', customerId)
3055
+ const localVarPath = `/v1/platform/{platformId}/customers/{customerId}`
3056
+ .replace(`{${"platformId"}}`, encodeURIComponent(String(platformId)))
3057
+ .replace(`{${"customerId"}}`, encodeURIComponent(String(customerId)));
3058
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
3059
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
3060
+ let baseOptions;
3061
+ if (configuration) {
3062
+ baseOptions = configuration.baseOptions;
3063
+ }
3064
+
3065
+ const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options};
3066
+ const localVarHeaderParameter = {} as any;
3067
+ const localVarQueryParameter = {} as any;
3068
+
3069
+ // authentication session-oauth required
3070
+ // oauth required
3071
+ await setOAuthToObject(localVarHeaderParameter, "session-oauth", [], configuration)
3072
+
3073
+ // authentication api-key required
3074
+ await setApiKeyToObject(localVarHeaderParameter, "Authorization", configuration)
3075
+
3076
+ if (project !== undefined) {
3077
+ localVarQueryParameter['project'] = project;
3078
+ }
3079
+
3080
+
3081
+
2527
3082
  setSearchParams(localVarUrlObj, localVarQueryParameter);
2528
3083
  let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
2529
3084
  localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
@@ -2724,6 +3279,69 @@ export const PlatformApiAxiosParamCreator = function (configuration?: Configurat
2724
3279
 
2725
3280
 
2726
3281
 
3282
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
3283
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
3284
+ localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
3285
+
3286
+ return {
3287
+ url: toPathString(localVarUrlObj),
3288
+ options: localVarRequestOptions,
3289
+ };
3290
+ },
3291
+ /**
3292
+ * List customers for a platform
3293
+ * @summary List customers
3294
+ * @param {string} project Project unique identifier
3295
+ * @param {string} platformId The platform identifier
3296
+ * @param {number} [pageToken] Page reference token
3297
+ * @param {number} [pageSize] Max page size. This is the maximum page size that will be returned, but it might be smaller.
3298
+ * @param {string} [search] Search term to filter based on order reference, customer name and email
3299
+ * @param {*} [options] Override http request option.
3300
+ * @throws {RequiredError}
3301
+ */
3302
+ listCustomers: async (project: string, platformId: string, pageToken?: number, pageSize?: number, search?: string, options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
3303
+ // verify required parameter 'project' is not null or undefined
3304
+ assertParamExists('listCustomers', 'project', project)
3305
+ // verify required parameter 'platformId' is not null or undefined
3306
+ assertParamExists('listCustomers', 'platformId', platformId)
3307
+ const localVarPath = `/v1/platform/{platformId}/customers`
3308
+ .replace(`{${"platformId"}}`, encodeURIComponent(String(platformId)));
3309
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
3310
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
3311
+ let baseOptions;
3312
+ if (configuration) {
3313
+ baseOptions = configuration.baseOptions;
3314
+ }
3315
+
3316
+ const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options};
3317
+ const localVarHeaderParameter = {} as any;
3318
+ const localVarQueryParameter = {} as any;
3319
+
3320
+ // authentication session-oauth required
3321
+ // oauth required
3322
+ await setOAuthToObject(localVarHeaderParameter, "session-oauth", [], configuration)
3323
+
3324
+ // authentication api-key required
3325
+ await setApiKeyToObject(localVarHeaderParameter, "Authorization", configuration)
3326
+
3327
+ if (project !== undefined) {
3328
+ localVarQueryParameter['project'] = project;
3329
+ }
3330
+
3331
+ if (pageToken !== undefined) {
3332
+ localVarQueryParameter['pageToken'] = pageToken;
3333
+ }
3334
+
3335
+ if (pageSize !== undefined) {
3336
+ localVarQueryParameter['pageSize'] = pageSize;
3337
+ }
3338
+
3339
+ if (search !== undefined) {
3340
+ localVarQueryParameter['search'] = search;
3341
+ }
3342
+
3343
+
3344
+
2727
3345
  setSearchParams(localVarUrlObj, localVarQueryParameter);
2728
3346
  let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
2729
3347
  localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
@@ -3044,6 +3662,20 @@ export const PlatformApiAxiosParamCreator = function (configuration?: Configurat
3044
3662
  export const PlatformApiFp = function(configuration?: Configuration) {
3045
3663
  const localVarAxiosParamCreator = PlatformApiAxiosParamCreator(configuration)
3046
3664
  return {
3665
+ /**
3666
+ * Export customers as a CSV file
3667
+ * @summary Export customers
3668
+ * @param {string} project Project unique identifier
3669
+ * @param {string} platformId The platform identifier
3670
+ * @param {*} [options] Override http request option.
3671
+ * @throws {RequiredError}
3672
+ */
3673
+ async exportCustomers(project: string, platformId: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<File>> {
3674
+ const localVarAxiosArgs = await localVarAxiosParamCreator.exportCustomers(project, platformId, options);
3675
+ const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
3676
+ const localVarOperationServerBasePath = operationServerMap['PlatformApi.exportCustomers']?.[localVarOperationServerIndex]?.url;
3677
+ return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
3678
+ },
3047
3679
  /**
3048
3680
  * Export orders as a CSV file
3049
3681
  * @summary Export orders
@@ -3061,6 +3693,21 @@ export const PlatformApiFp = function(configuration?: Configuration) {
3061
3693
  const localVarOperationServerBasePath = operationServerMap['PlatformApi.exportOrders']?.[localVarOperationServerIndex]?.url;
3062
3694
  return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
3063
3695
  },
3696
+ /**
3697
+ * Get a customer for a platform by a given customer ID.
3698
+ * @summary Get customer
3699
+ * @param {string} project Project unique identifier
3700
+ * @param {string} platformId The platform identifier
3701
+ * @param {string} customerId The customer identifier
3702
+ * @param {*} [options] Override http request option.
3703
+ * @throws {RequiredError}
3704
+ */
3705
+ async getCustomer(project: string, platformId: string, customerId: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<Customer>> {
3706
+ const localVarAxiosArgs = await localVarAxiosParamCreator.getCustomer(project, platformId, customerId, options);
3707
+ const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
3708
+ const localVarOperationServerBasePath = operationServerMap['PlatformApi.getCustomer']?.[localVarOperationServerIndex]?.url;
3709
+ return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
3710
+ },
3064
3711
  /**
3065
3712
  * Get a fulfillment for a platform by a given fulfillment ID.
3066
3713
  * @summary Get fulfillment
@@ -3119,6 +3766,23 @@ export const PlatformApiFp = function(configuration?: Configuration) {
3119
3766
  const localVarOperationServerBasePath = operationServerMap['PlatformApi.listAvailableFulfillers']?.[localVarOperationServerIndex]?.url;
3120
3767
  return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
3121
3768
  },
3769
+ /**
3770
+ * List customers for a platform
3771
+ * @summary List customers
3772
+ * @param {string} project Project unique identifier
3773
+ * @param {string} platformId The platform identifier
3774
+ * @param {number} [pageToken] Page reference token
3775
+ * @param {number} [pageSize] Max page size. This is the maximum page size that will be returned, but it might be smaller.
3776
+ * @param {string} [search] Search term to filter based on order reference, customer name and email
3777
+ * @param {*} [options] Override http request option.
3778
+ * @throws {RequiredError}
3779
+ */
3780
+ async listCustomers(project: string, platformId: string, pageToken?: number, pageSize?: number, search?: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<CustomersResponse>> {
3781
+ const localVarAxiosArgs = await localVarAxiosParamCreator.listCustomers(project, platformId, pageToken, pageSize, search, options);
3782
+ const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
3783
+ const localVarOperationServerBasePath = operationServerMap['PlatformApi.listCustomers']?.[localVarOperationServerIndex]?.url;
3784
+ return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
3785
+ },
3122
3786
  /**
3123
3787
  * Lists all orders placed on projects belonging to this platform, paginated into configurable chunks.
3124
3788
  * @summary List orders
@@ -3210,6 +3874,16 @@ export const PlatformApiFp = function(configuration?: Configuration) {
3210
3874
  export const PlatformApiFactory = function (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) {
3211
3875
  const localVarFp = PlatformApiFp(configuration)
3212
3876
  return {
3877
+ /**
3878
+ * Export customers as a CSV file
3879
+ * @summary Export customers
3880
+ * @param {PlatformApiExportCustomersRequest} requestParameters Request parameters.
3881
+ * @param {*} [options] Override http request option.
3882
+ * @throws {RequiredError}
3883
+ */
3884
+ exportCustomers(requestParameters: PlatformApiExportCustomersRequest, options?: RawAxiosRequestConfig): AxiosPromise<File> {
3885
+ return localVarFp.exportCustomers(requestParameters.project, requestParameters.platformId, options).then((request) => request(axios, basePath));
3886
+ },
3213
3887
  /**
3214
3888
  * Export orders as a CSV file
3215
3889
  * @summary Export orders
@@ -3220,6 +3894,16 @@ export const PlatformApiFactory = function (configuration?: Configuration, baseP
3220
3894
  exportOrders(requestParameters: PlatformApiExportOrdersRequest, options?: RawAxiosRequestConfig): AxiosPromise<File> {
3221
3895
  return localVarFp.exportOrders(requestParameters.project, requestParameters.platformId, requestParameters.start, requestParameters.end, requestParameters.search, options).then((request) => request(axios, basePath));
3222
3896
  },
3897
+ /**
3898
+ * Get a customer for a platform by a given customer ID.
3899
+ * @summary Get customer
3900
+ * @param {PlatformApiGetCustomerRequest} requestParameters Request parameters.
3901
+ * @param {*} [options] Override http request option.
3902
+ * @throws {RequiredError}
3903
+ */
3904
+ getCustomer(requestParameters: PlatformApiGetCustomerRequest, options?: RawAxiosRequestConfig): AxiosPromise<Customer> {
3905
+ return localVarFp.getCustomer(requestParameters.project, requestParameters.platformId, requestParameters.customerId, options).then((request) => request(axios, basePath));
3906
+ },
3223
3907
  /**
3224
3908
  * Get a fulfillment for a platform by a given fulfillment ID.
3225
3909
  * @summary Get fulfillment
@@ -3260,6 +3944,16 @@ export const PlatformApiFactory = function (configuration?: Configuration, baseP
3260
3944
  listAvailableFulfillers(requestParameters: PlatformApiListAvailableFulfillersRequest, options?: RawAxiosRequestConfig): AxiosPromise<FulfillersResponse> {
3261
3945
  return localVarFp.listAvailableFulfillers(requestParameters.project, requestParameters.platformId, requestParameters.fulfillmentId, options).then((request) => request(axios, basePath));
3262
3946
  },
3947
+ /**
3948
+ * List customers for a platform
3949
+ * @summary List customers
3950
+ * @param {PlatformApiListCustomersRequest} requestParameters Request parameters.
3951
+ * @param {*} [options] Override http request option.
3952
+ * @throws {RequiredError}
3953
+ */
3954
+ listCustomers(requestParameters: PlatformApiListCustomersRequest, options?: RawAxiosRequestConfig): AxiosPromise<CustomersResponse> {
3955
+ return localVarFp.listCustomers(requestParameters.project, requestParameters.platformId, requestParameters.pageToken, requestParameters.pageSize, requestParameters.search, options).then((request) => request(axios, basePath));
3956
+ },
3263
3957
  /**
3264
3958
  * Lists all orders placed on projects belonging to this platform, paginated into configurable chunks.
3265
3959
  * @summary List orders
@@ -3313,6 +4007,27 @@ export const PlatformApiFactory = function (configuration?: Configuration, baseP
3313
4007
  };
3314
4008
  };
3315
4009
 
4010
+ /**
4011
+ * Request parameters for exportCustomers operation in PlatformApi.
4012
+ * @export
4013
+ * @interface PlatformApiExportCustomersRequest
4014
+ */
4015
+ export interface PlatformApiExportCustomersRequest {
4016
+ /**
4017
+ * Project unique identifier
4018
+ * @type {string}
4019
+ * @memberof PlatformApiExportCustomers
4020
+ */
4021
+ readonly project: string
4022
+
4023
+ /**
4024
+ * The platform identifier
4025
+ * @type {string}
4026
+ * @memberof PlatformApiExportCustomers
4027
+ */
4028
+ readonly platformId: string
4029
+ }
4030
+
3316
4031
  /**
3317
4032
  * Request parameters for exportOrders operation in PlatformApi.
3318
4033
  * @export
@@ -3355,6 +4070,34 @@ export interface PlatformApiExportOrdersRequest {
3355
4070
  readonly search?: string
3356
4071
  }
3357
4072
 
4073
+ /**
4074
+ * Request parameters for getCustomer operation in PlatformApi.
4075
+ * @export
4076
+ * @interface PlatformApiGetCustomerRequest
4077
+ */
4078
+ export interface PlatformApiGetCustomerRequest {
4079
+ /**
4080
+ * Project unique identifier
4081
+ * @type {string}
4082
+ * @memberof PlatformApiGetCustomer
4083
+ */
4084
+ readonly project: string
4085
+
4086
+ /**
4087
+ * The platform identifier
4088
+ * @type {string}
4089
+ * @memberof PlatformApiGetCustomer
4090
+ */
4091
+ readonly platformId: string
4092
+
4093
+ /**
4094
+ * The customer identifier
4095
+ * @type {string}
4096
+ * @memberof PlatformApiGetCustomer
4097
+ */
4098
+ readonly customerId: string
4099
+ }
4100
+
3358
4101
  /**
3359
4102
  * Request parameters for getFulfillment operation in PlatformApi.
3360
4103
  * @export
@@ -3453,6 +4196,48 @@ export interface PlatformApiListAvailableFulfillersRequest {
3453
4196
  readonly fulfillmentId: string
3454
4197
  }
3455
4198
 
4199
+ /**
4200
+ * Request parameters for listCustomers operation in PlatformApi.
4201
+ * @export
4202
+ * @interface PlatformApiListCustomersRequest
4203
+ */
4204
+ export interface PlatformApiListCustomersRequest {
4205
+ /**
4206
+ * Project unique identifier
4207
+ * @type {string}
4208
+ * @memberof PlatformApiListCustomers
4209
+ */
4210
+ readonly project: string
4211
+
4212
+ /**
4213
+ * The platform identifier
4214
+ * @type {string}
4215
+ * @memberof PlatformApiListCustomers
4216
+ */
4217
+ readonly platformId: string
4218
+
4219
+ /**
4220
+ * Page reference token
4221
+ * @type {number}
4222
+ * @memberof PlatformApiListCustomers
4223
+ */
4224
+ readonly pageToken?: number
4225
+
4226
+ /**
4227
+ * Max page size. This is the maximum page size that will be returned, but it might be smaller.
4228
+ * @type {number}
4229
+ * @memberof PlatformApiListCustomers
4230
+ */
4231
+ readonly pageSize?: number
4232
+
4233
+ /**
4234
+ * Search term to filter based on order reference, customer name and email
4235
+ * @type {string}
4236
+ * @memberof PlatformApiListCustomers
4237
+ */
4238
+ readonly search?: string
4239
+ }
4240
+
3456
4241
  /**
3457
4242
  * Request parameters for listOrders operation in PlatformApi.
3458
4243
  * @export
@@ -3642,6 +4427,18 @@ export interface PlatformApiUpdateVariantRequest {
3642
4427
  * @extends {BaseAPI}
3643
4428
  */
3644
4429
  export class PlatformApi extends BaseAPI {
4430
+ /**
4431
+ * Export customers as a CSV file
4432
+ * @summary Export customers
4433
+ * @param {PlatformApiExportCustomersRequest} requestParameters Request parameters.
4434
+ * @param {*} [options] Override http request option.
4435
+ * @throws {RequiredError}
4436
+ * @memberof PlatformApi
4437
+ */
4438
+ public exportCustomers(requestParameters: PlatformApiExportCustomersRequest, options?: RawAxiosRequestConfig) {
4439
+ return PlatformApiFp(this.configuration).exportCustomers(requestParameters.project, requestParameters.platformId, options).then((request) => request(this.axios, this.basePath));
4440
+ }
4441
+
3645
4442
  /**
3646
4443
  * Export orders as a CSV file
3647
4444
  * @summary Export orders
@@ -3654,6 +4451,18 @@ export class PlatformApi extends BaseAPI {
3654
4451
  return PlatformApiFp(this.configuration).exportOrders(requestParameters.project, requestParameters.platformId, requestParameters.start, requestParameters.end, requestParameters.search, options).then((request) => request(this.axios, this.basePath));
3655
4452
  }
3656
4453
 
4454
+ /**
4455
+ * Get a customer for a platform by a given customer ID.
4456
+ * @summary Get customer
4457
+ * @param {PlatformApiGetCustomerRequest} requestParameters Request parameters.
4458
+ * @param {*} [options] Override http request option.
4459
+ * @throws {RequiredError}
4460
+ * @memberof PlatformApi
4461
+ */
4462
+ public getCustomer(requestParameters: PlatformApiGetCustomerRequest, options?: RawAxiosRequestConfig) {
4463
+ return PlatformApiFp(this.configuration).getCustomer(requestParameters.project, requestParameters.platformId, requestParameters.customerId, options).then((request) => request(this.axios, this.basePath));
4464
+ }
4465
+
3657
4466
  /**
3658
4467
  * Get a fulfillment for a platform by a given fulfillment ID.
3659
4468
  * @summary Get fulfillment
@@ -3702,6 +4511,18 @@ export class PlatformApi extends BaseAPI {
3702
4511
  return PlatformApiFp(this.configuration).listAvailableFulfillers(requestParameters.project, requestParameters.platformId, requestParameters.fulfillmentId, options).then((request) => request(this.axios, this.basePath));
3703
4512
  }
3704
4513
 
4514
+ /**
4515
+ * List customers for a platform
4516
+ * @summary List customers
4517
+ * @param {PlatformApiListCustomersRequest} requestParameters Request parameters.
4518
+ * @param {*} [options] Override http request option.
4519
+ * @throws {RequiredError}
4520
+ * @memberof PlatformApi
4521
+ */
4522
+ public listCustomers(requestParameters: PlatformApiListCustomersRequest, options?: RawAxiosRequestConfig) {
4523
+ return PlatformApiFp(this.configuration).listCustomers(requestParameters.project, requestParameters.platformId, requestParameters.pageToken, requestParameters.pageSize, requestParameters.search, options).then((request) => request(this.axios, this.basePath));
4524
+ }
4525
+
3705
4526
  /**
3706
4527
  * Lists all orders placed on projects belonging to this platform, paginated into configurable chunks.
3707
4528
  * @summary List orders