@teemill/website 0.12.0 → 0.14.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/api.ts CHANGED
@@ -4,7 +4,7 @@
4
4
  * Website API
5
5
  * Manage your PodOS Website
6
6
  *
7
- * The version of the OpenAPI document: 0.12.0
7
+ * The version of the OpenAPI document: 0.14.0
8
8
  *
9
9
  *
10
10
  * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
@@ -331,6 +331,25 @@ export interface CollectionsResponse {
331
331
  */
332
332
  'nextPageToken'?: number | null;
333
333
  }
334
+ /**
335
+ *
336
+ * @export
337
+ * @interface CreateSearchRedirectRequest
338
+ */
339
+ export interface CreateSearchRedirectRequest {
340
+ /**
341
+ *
342
+ * @type {string}
343
+ * @memberof CreateSearchRedirectRequest
344
+ */
345
+ 'searchTerm': string;
346
+ /**
347
+ *
348
+ * @type {string}
349
+ * @memberof CreateSearchRedirectRequest
350
+ */
351
+ 'destinationUrl': string;
352
+ }
334
353
  /**
335
354
  * Image description
336
355
  * @export
@@ -840,6 +859,56 @@ export interface Route {
840
859
  */
841
860
  'published': boolean;
842
861
  }
862
+ /**
863
+ *
864
+ * @export
865
+ * @interface SearchRedirect
866
+ */
867
+ export interface SearchRedirect {
868
+ /**
869
+ * Unique object identifier
870
+ * @type {string}
871
+ * @memberof SearchRedirect
872
+ */
873
+ 'id': string;
874
+ /**
875
+ *
876
+ * @type {string}
877
+ * @memberof SearchRedirect
878
+ */
879
+ 'searchTerm': string;
880
+ /**
881
+ *
882
+ * @type {string}
883
+ * @memberof SearchRedirect
884
+ */
885
+ 'destinationUrl': string;
886
+ /**
887
+ *
888
+ * @type {string}
889
+ * @memberof SearchRedirect
890
+ */
891
+ 'createdAt': string;
892
+ }
893
+ /**
894
+ *
895
+ * @export
896
+ * @interface SearchRedirectsResponse
897
+ */
898
+ export interface SearchRedirectsResponse {
899
+ /**
900
+ *
901
+ * @type {Array<SearchRedirect>}
902
+ * @memberof SearchRedirectsResponse
903
+ */
904
+ 'redirects': Array<SearchRedirect>;
905
+ /**
906
+ * The token referencing the next page number
907
+ * @type {number}
908
+ * @memberof SearchRedirectsResponse
909
+ */
910
+ 'nextPageToken': number | null;
911
+ }
843
912
  /**
844
913
  * SEO metadata for the product
845
914
  * @export
@@ -862,26 +931,39 @@ export interface SeoMetadata {
862
931
  /**
863
932
  *
864
933
  * @export
865
- * @interface SeoOptimiseCollections202Response
934
+ * @interface SeoOptimiseCollectionsRequest
935
+ */
936
+ export interface SeoOptimiseCollectionsRequest {
937
+ /**
938
+ * A set of collection IDs to AI SEO optimise.
939
+ * @type {Array<string>}
940
+ * @memberof SeoOptimiseCollectionsRequest
941
+ */
942
+ 'ids'?: Array<string>;
943
+ }
944
+ /**
945
+ *
946
+ * @export
947
+ * @interface SeoOptimisePages202Response
866
948
  */
867
- export interface SeoOptimiseCollections202Response {
949
+ export interface SeoOptimisePages202Response {
868
950
  /**
869
951
  * A message describing the optimisation status
870
952
  * @type {string}
871
- * @memberof SeoOptimiseCollections202Response
953
+ * @memberof SeoOptimisePages202Response
872
954
  */
873
955
  'message'?: string;
874
956
  }
875
957
  /**
876
958
  *
877
959
  * @export
878
- * @interface SeoOptimiseCollectionsRequest
960
+ * @interface SeoOptimisePagesRequest
879
961
  */
880
- export interface SeoOptimiseCollectionsRequest {
962
+ export interface SeoOptimisePagesRequest {
881
963
  /**
882
- * A set of collection IDs to AI SEO optimise.
964
+ * A set of page IDs to AI SEO optimise.
883
965
  * @type {Array<string>}
884
- * @memberof SeoOptimiseCollectionsRequest
966
+ * @memberof SeoOptimisePagesRequest
885
967
  */
886
968
  'ids'?: Array<string>;
887
969
  }
@@ -1818,6 +1900,25 @@ export interface UpdatePagesRequestPagesInner {
1818
1900
  */
1819
1901
  'targetSearchPhraseSynonyms'?: Array<string>;
1820
1902
  }
1903
+ /**
1904
+ *
1905
+ * @export
1906
+ * @interface UpdateSearchRedirectRequest
1907
+ */
1908
+ export interface UpdateSearchRedirectRequest {
1909
+ /**
1910
+ *
1911
+ * @type {string}
1912
+ * @memberof UpdateSearchRedirectRequest
1913
+ */
1914
+ 'searchTerm'?: string;
1915
+ /**
1916
+ *
1917
+ * @type {string}
1918
+ * @memberof UpdateSearchRedirectRequest
1919
+ */
1920
+ 'destinationUrl'?: string;
1921
+ }
1821
1922
  /**
1822
1923
  *
1823
1924
  * @export
@@ -2684,7 +2785,7 @@ export const CollectionsApiFp = function(configuration?: Configuration) {
2684
2785
  * @param {*} [options] Override http request option.
2685
2786
  * @throws {RequiredError}
2686
2787
  */
2687
- async seoOptimiseCollections(project: string, seoOptimiseCollectionsRequest?: SeoOptimiseCollectionsRequest, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<SeoOptimiseCollections202Response>> {
2788
+ async seoOptimiseCollections(project: string, seoOptimiseCollectionsRequest?: SeoOptimiseCollectionsRequest, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<SeoOptimisePages202Response>> {
2688
2789
  const localVarAxiosArgs = await localVarAxiosParamCreator.seoOptimiseCollections(project, seoOptimiseCollectionsRequest, options);
2689
2790
  const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
2690
2791
  const localVarOperationServerBasePath = operationServerMap['CollectionsApi.seoOptimiseCollections']?.[localVarOperationServerIndex]?.url;
@@ -2749,7 +2850,7 @@ export const CollectionsApiFactory = function (configuration?: Configuration, ba
2749
2850
  * @param {*} [options] Override http request option.
2750
2851
  * @throws {RequiredError}
2751
2852
  */
2752
- seoOptimiseCollections(requestParameters: CollectionsApiSeoOptimiseCollectionsRequest, options?: RawAxiosRequestConfig): AxiosPromise<SeoOptimiseCollections202Response> {
2853
+ seoOptimiseCollections(requestParameters: CollectionsApiSeoOptimiseCollectionsRequest, options?: RawAxiosRequestConfig): AxiosPromise<SeoOptimisePages202Response> {
2753
2854
  return localVarFp.seoOptimiseCollections(requestParameters.project, requestParameters.seoOptimiseCollectionsRequest, options).then((request) => request(axios, basePath));
2754
2855
  },
2755
2856
  /**
@@ -3522,6 +3623,54 @@ export const PagesApiAxiosParamCreator = function (configuration?: Configuration
3522
3623
  options: localVarRequestOptions,
3523
3624
  };
3524
3625
  },
3626
+ /**
3627
+ * AI SEO optimises pages by a set of given IDs.
3628
+ * @summary AI SEO optimise pages.
3629
+ * @param {string} project What project it is
3630
+ * @param {SeoOptimisePagesRequest} [seoOptimisePagesRequest] A set of page IDs to AI SEO optimise.
3631
+ * @param {*} [options] Override http request option.
3632
+ * @throws {RequiredError}
3633
+ */
3634
+ seoOptimisePages: async (project: string, seoOptimisePagesRequest?: SeoOptimisePagesRequest, options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
3635
+ // verify required parameter 'project' is not null or undefined
3636
+ assertParamExists('seoOptimisePages', 'project', project)
3637
+ const localVarPath = `/v1/website/pages/ai-seo-optimise`;
3638
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
3639
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
3640
+ let baseOptions;
3641
+ if (configuration) {
3642
+ baseOptions = configuration.baseOptions;
3643
+ }
3644
+
3645
+ const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options};
3646
+ const localVarHeaderParameter = {} as any;
3647
+ const localVarQueryParameter = {} as any;
3648
+
3649
+ // authentication session-oauth required
3650
+ // oauth required
3651
+ await setOAuthToObject(localVarHeaderParameter, "session-oauth", [], configuration)
3652
+
3653
+ // authentication api-key required
3654
+ await setApiKeyToObject(localVarHeaderParameter, "Authorization", configuration)
3655
+
3656
+ if (project !== undefined) {
3657
+ localVarQueryParameter['project'] = project;
3658
+ }
3659
+
3660
+
3661
+
3662
+ localVarHeaderParameter['Content-Type'] = 'application/json';
3663
+
3664
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
3665
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
3666
+ localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
3667
+ localVarRequestOptions.data = serializeDataIfNeeded(seoOptimisePagesRequest, localVarRequestOptions, configuration)
3668
+
3669
+ return {
3670
+ url: toPathString(localVarUrlObj),
3671
+ options: localVarRequestOptions,
3672
+ };
3673
+ },
3525
3674
  /**
3526
3675
  *
3527
3676
  * @summary Update website page
@@ -3663,6 +3812,20 @@ export const PagesApiFp = function(configuration?: Configuration) {
3663
3812
  const localVarOperationServerBasePath = operationServerMap['PagesApi.listPages']?.[localVarOperationServerIndex]?.url;
3664
3813
  return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
3665
3814
  },
3815
+ /**
3816
+ * AI SEO optimises pages by a set of given IDs.
3817
+ * @summary AI SEO optimise pages.
3818
+ * @param {string} project What project it is
3819
+ * @param {SeoOptimisePagesRequest} [seoOptimisePagesRequest] A set of page IDs to AI SEO optimise.
3820
+ * @param {*} [options] Override http request option.
3821
+ * @throws {RequiredError}
3822
+ */
3823
+ async seoOptimisePages(project: string, seoOptimisePagesRequest?: SeoOptimisePagesRequest, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<SeoOptimisePages202Response>> {
3824
+ const localVarAxiosArgs = await localVarAxiosParamCreator.seoOptimisePages(project, seoOptimisePagesRequest, options);
3825
+ const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
3826
+ const localVarOperationServerBasePath = operationServerMap['PagesApi.seoOptimisePages']?.[localVarOperationServerIndex]?.url;
3827
+ return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
3828
+ },
3666
3829
  /**
3667
3830
  *
3668
3831
  * @summary Update website page
@@ -3715,6 +3878,16 @@ export const PagesApiFactory = function (configuration?: Configuration, basePath
3715
3878
  listPages(requestParameters: PagesApiListPagesRequest, options?: RawAxiosRequestConfig): AxiosPromise<PagesResponse> {
3716
3879
  return localVarFp.listPages(requestParameters.project, requestParameters.pageToken, requestParameters.pageSize, requestParameters.search, options).then((request) => request(axios, basePath));
3717
3880
  },
3881
+ /**
3882
+ * AI SEO optimises pages by a set of given IDs.
3883
+ * @summary AI SEO optimise pages.
3884
+ * @param {PagesApiSeoOptimisePagesRequest} requestParameters Request parameters.
3885
+ * @param {*} [options] Override http request option.
3886
+ * @throws {RequiredError}
3887
+ */
3888
+ seoOptimisePages(requestParameters: PagesApiSeoOptimisePagesRequest, options?: RawAxiosRequestConfig): AxiosPromise<SeoOptimisePages202Response> {
3889
+ return localVarFp.seoOptimisePages(requestParameters.project, requestParameters.seoOptimisePagesRequest, options).then((request) => request(axios, basePath));
3890
+ },
3718
3891
  /**
3719
3892
  *
3720
3893
  * @summary Update website page
@@ -3773,6 +3946,27 @@ export interface PagesApiListPagesRequest {
3773
3946
  readonly search?: string
3774
3947
  }
3775
3948
 
3949
+ /**
3950
+ * Request parameters for seoOptimisePages operation in PagesApi.
3951
+ * @export
3952
+ * @interface PagesApiSeoOptimisePagesRequest
3953
+ */
3954
+ export interface PagesApiSeoOptimisePagesRequest {
3955
+ /**
3956
+ * What project it is
3957
+ * @type {string}
3958
+ * @memberof PagesApiSeoOptimisePages
3959
+ */
3960
+ readonly project: string
3961
+
3962
+ /**
3963
+ * A set of page IDs to AI SEO optimise.
3964
+ * @type {SeoOptimisePagesRequest}
3965
+ * @memberof PagesApiSeoOptimisePages
3966
+ */
3967
+ readonly seoOptimisePagesRequest?: SeoOptimisePagesRequest
3968
+ }
3969
+
3776
3970
  /**
3777
3971
  * Request parameters for updatePage operation in PagesApi.
3778
3972
  * @export
@@ -3862,6 +4056,18 @@ export class PagesApi extends BaseAPI {
3862
4056
  return PagesApiFp(this.configuration).listPages(requestParameters.project, requestParameters.pageToken, requestParameters.pageSize, requestParameters.search, options).then((request) => request(this.axios, this.basePath));
3863
4057
  }
3864
4058
 
4059
+ /**
4060
+ * AI SEO optimises pages by a set of given IDs.
4061
+ * @summary AI SEO optimise pages.
4062
+ * @param {PagesApiSeoOptimisePagesRequest} requestParameters Request parameters.
4063
+ * @param {*} [options] Override http request option.
4064
+ * @throws {RequiredError}
4065
+ * @memberof PagesApi
4066
+ */
4067
+ public seoOptimisePages(requestParameters: PagesApiSeoOptimisePagesRequest, options?: RawAxiosRequestConfig) {
4068
+ return PagesApiFp(this.configuration).seoOptimisePages(requestParameters.project, requestParameters.seoOptimisePagesRequest, options).then((request) => request(this.axios, this.basePath));
4069
+ }
4070
+
3865
4071
  /**
3866
4072
  *
3867
4073
  * @summary Update website page
@@ -4378,3 +4584,645 @@ export class RoutesApi extends BaseAPI {
4378
4584
 
4379
4585
 
4380
4586
 
4587
+ /**
4588
+ * SearchApi - axios parameter creator
4589
+ * @export
4590
+ */
4591
+ export const SearchApiAxiosParamCreator = function (configuration?: Configuration) {
4592
+ return {
4593
+ /**
4594
+ *
4595
+ * @summary Create search redirect
4596
+ * @param {string} project What project it is
4597
+ * @param {number} [pageToken] Page reference token
4598
+ * @param {number} [pageSize] Max page size. This is the maximum page size that will be returned, but it might be smaller.
4599
+ * @param {string} [search] Search term to filter results
4600
+ * @param {CreateSearchRedirectRequest} [createSearchRedirectRequest] Create search redirect
4601
+ * @param {*} [options] Override http request option.
4602
+ * @throws {RequiredError}
4603
+ */
4604
+ createSearchRedirect: async (project: string, pageToken?: number, pageSize?: number, search?: string, createSearchRedirectRequest?: CreateSearchRedirectRequest, options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
4605
+ // verify required parameter 'project' is not null or undefined
4606
+ assertParamExists('createSearchRedirect', 'project', project)
4607
+ const localVarPath = `/v1/website/search/redirects`;
4608
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
4609
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
4610
+ let baseOptions;
4611
+ if (configuration) {
4612
+ baseOptions = configuration.baseOptions;
4613
+ }
4614
+
4615
+ const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options};
4616
+ const localVarHeaderParameter = {} as any;
4617
+ const localVarQueryParameter = {} as any;
4618
+
4619
+ // authentication session-oauth required
4620
+ // oauth required
4621
+ await setOAuthToObject(localVarHeaderParameter, "session-oauth", [], configuration)
4622
+
4623
+ // authentication api-key required
4624
+ await setApiKeyToObject(localVarHeaderParameter, "Authorization", configuration)
4625
+
4626
+ if (project !== undefined) {
4627
+ localVarQueryParameter['project'] = project;
4628
+ }
4629
+
4630
+ if (pageToken !== undefined) {
4631
+ localVarQueryParameter['pageToken'] = pageToken;
4632
+ }
4633
+
4634
+ if (pageSize !== undefined) {
4635
+ localVarQueryParameter['pageSize'] = pageSize;
4636
+ }
4637
+
4638
+ if (search !== undefined) {
4639
+ localVarQueryParameter['search'] = search;
4640
+ }
4641
+
4642
+
4643
+
4644
+ localVarHeaderParameter['Content-Type'] = 'application/json';
4645
+
4646
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
4647
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
4648
+ localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
4649
+ localVarRequestOptions.data = serializeDataIfNeeded(createSearchRedirectRequest, localVarRequestOptions, configuration)
4650
+
4651
+ return {
4652
+ url: toPathString(localVarUrlObj),
4653
+ options: localVarRequestOptions,
4654
+ };
4655
+ },
4656
+ /**
4657
+ *
4658
+ * @summary Delete search redirect
4659
+ * @param {string} project What project it is
4660
+ * @param {string} redirectId Redirect\&#39;s unique identifier
4661
+ * @param {*} [options] Override http request option.
4662
+ * @throws {RequiredError}
4663
+ */
4664
+ deleteSearchRedirect: async (project: string, redirectId: string, options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
4665
+ // verify required parameter 'project' is not null or undefined
4666
+ assertParamExists('deleteSearchRedirect', 'project', project)
4667
+ // verify required parameter 'redirectId' is not null or undefined
4668
+ assertParamExists('deleteSearchRedirect', 'redirectId', redirectId)
4669
+ const localVarPath = `/v1/website/search/redirects/{redirectId}`
4670
+ .replace(`{${"redirectId"}}`, encodeURIComponent(String(redirectId)));
4671
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
4672
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
4673
+ let baseOptions;
4674
+ if (configuration) {
4675
+ baseOptions = configuration.baseOptions;
4676
+ }
4677
+
4678
+ const localVarRequestOptions = { method: 'DELETE', ...baseOptions, ...options};
4679
+ const localVarHeaderParameter = {} as any;
4680
+ const localVarQueryParameter = {} as any;
4681
+
4682
+ // authentication session-oauth required
4683
+ // oauth required
4684
+ await setOAuthToObject(localVarHeaderParameter, "session-oauth", [], configuration)
4685
+
4686
+ // authentication api-key required
4687
+ await setApiKeyToObject(localVarHeaderParameter, "Authorization", configuration)
4688
+
4689
+ if (project !== undefined) {
4690
+ localVarQueryParameter['project'] = project;
4691
+ }
4692
+
4693
+
4694
+
4695
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
4696
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
4697
+ localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
4698
+
4699
+ return {
4700
+ url: toPathString(localVarUrlObj),
4701
+ options: localVarRequestOptions,
4702
+ };
4703
+ },
4704
+ /**
4705
+ *
4706
+ * @summary Get search redirect
4707
+ * @param {string} project What project it is
4708
+ * @param {string} redirectId Redirect\&#39;s unique identifier
4709
+ * @param {*} [options] Override http request option.
4710
+ * @throws {RequiredError}
4711
+ */
4712
+ getSearchRedirect: async (project: string, redirectId: string, options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
4713
+ // verify required parameter 'project' is not null or undefined
4714
+ assertParamExists('getSearchRedirect', 'project', project)
4715
+ // verify required parameter 'redirectId' is not null or undefined
4716
+ assertParamExists('getSearchRedirect', 'redirectId', redirectId)
4717
+ const localVarPath = `/v1/website/search/redirects/{redirectId}`
4718
+ .replace(`{${"redirectId"}}`, encodeURIComponent(String(redirectId)));
4719
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
4720
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
4721
+ let baseOptions;
4722
+ if (configuration) {
4723
+ baseOptions = configuration.baseOptions;
4724
+ }
4725
+
4726
+ const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options};
4727
+ const localVarHeaderParameter = {} as any;
4728
+ const localVarQueryParameter = {} as any;
4729
+
4730
+ // authentication session-oauth required
4731
+ // oauth required
4732
+ await setOAuthToObject(localVarHeaderParameter, "session-oauth", [], configuration)
4733
+
4734
+ // authentication api-key required
4735
+ await setApiKeyToObject(localVarHeaderParameter, "Authorization", configuration)
4736
+
4737
+ if (project !== undefined) {
4738
+ localVarQueryParameter['project'] = project;
4739
+ }
4740
+
4741
+
4742
+
4743
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
4744
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
4745
+ localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
4746
+
4747
+ return {
4748
+ url: toPathString(localVarUrlObj),
4749
+ options: localVarRequestOptions,
4750
+ };
4751
+ },
4752
+ /**
4753
+ *
4754
+ * @summary List search redirects
4755
+ * @param {string} project What project it is
4756
+ * @param {number} [pageToken] Page reference token
4757
+ * @param {number} [pageSize] Max page size. This is the maximum page size that will be returned, but it might be smaller.
4758
+ * @param {string} [search] Search term to filter results
4759
+ * @param {*} [options] Override http request option.
4760
+ * @throws {RequiredError}
4761
+ */
4762
+ listSearchRedirects: async (project: string, pageToken?: number, pageSize?: number, search?: string, options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
4763
+ // verify required parameter 'project' is not null or undefined
4764
+ assertParamExists('listSearchRedirects', 'project', project)
4765
+ const localVarPath = `/v1/website/search/redirects`;
4766
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
4767
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
4768
+ let baseOptions;
4769
+ if (configuration) {
4770
+ baseOptions = configuration.baseOptions;
4771
+ }
4772
+
4773
+ const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options};
4774
+ const localVarHeaderParameter = {} as any;
4775
+ const localVarQueryParameter = {} as any;
4776
+
4777
+ // authentication session-oauth required
4778
+ // oauth required
4779
+ await setOAuthToObject(localVarHeaderParameter, "session-oauth", [], configuration)
4780
+
4781
+ // authentication api-key required
4782
+ await setApiKeyToObject(localVarHeaderParameter, "Authorization", configuration)
4783
+
4784
+ if (project !== undefined) {
4785
+ localVarQueryParameter['project'] = project;
4786
+ }
4787
+
4788
+ if (pageToken !== undefined) {
4789
+ localVarQueryParameter['pageToken'] = pageToken;
4790
+ }
4791
+
4792
+ if (pageSize !== undefined) {
4793
+ localVarQueryParameter['pageSize'] = pageSize;
4794
+ }
4795
+
4796
+ if (search !== undefined) {
4797
+ localVarQueryParameter['search'] = search;
4798
+ }
4799
+
4800
+
4801
+
4802
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
4803
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
4804
+ localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
4805
+
4806
+ return {
4807
+ url: toPathString(localVarUrlObj),
4808
+ options: localVarRequestOptions,
4809
+ };
4810
+ },
4811
+ /**
4812
+ *
4813
+ * @summary Update search redirect
4814
+ * @param {string} project What project it is
4815
+ * @param {string} redirectId Redirect\&#39;s unique identifier
4816
+ * @param {UpdateSearchRedirectRequest} [updateSearchRedirectRequest] Update search redirect
4817
+ * @param {*} [options] Override http request option.
4818
+ * @throws {RequiredError}
4819
+ */
4820
+ updateSearchRedirect: async (project: string, redirectId: string, updateSearchRedirectRequest?: UpdateSearchRedirectRequest, options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
4821
+ // verify required parameter 'project' is not null or undefined
4822
+ assertParamExists('updateSearchRedirect', 'project', project)
4823
+ // verify required parameter 'redirectId' is not null or undefined
4824
+ assertParamExists('updateSearchRedirect', 'redirectId', redirectId)
4825
+ const localVarPath = `/v1/website/search/redirects/{redirectId}`
4826
+ .replace(`{${"redirectId"}}`, encodeURIComponent(String(redirectId)));
4827
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
4828
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
4829
+ let baseOptions;
4830
+ if (configuration) {
4831
+ baseOptions = configuration.baseOptions;
4832
+ }
4833
+
4834
+ const localVarRequestOptions = { method: 'PATCH', ...baseOptions, ...options};
4835
+ const localVarHeaderParameter = {} as any;
4836
+ const localVarQueryParameter = {} as any;
4837
+
4838
+ // authentication session-oauth required
4839
+ // oauth required
4840
+ await setOAuthToObject(localVarHeaderParameter, "session-oauth", [], configuration)
4841
+
4842
+ // authentication api-key required
4843
+ await setApiKeyToObject(localVarHeaderParameter, "Authorization", configuration)
4844
+
4845
+ if (project !== undefined) {
4846
+ localVarQueryParameter['project'] = project;
4847
+ }
4848
+
4849
+
4850
+
4851
+ localVarHeaderParameter['Content-Type'] = 'application/json';
4852
+
4853
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
4854
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
4855
+ localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
4856
+ localVarRequestOptions.data = serializeDataIfNeeded(updateSearchRedirectRequest, localVarRequestOptions, configuration)
4857
+
4858
+ return {
4859
+ url: toPathString(localVarUrlObj),
4860
+ options: localVarRequestOptions,
4861
+ };
4862
+ },
4863
+ }
4864
+ };
4865
+
4866
+ /**
4867
+ * SearchApi - functional programming interface
4868
+ * @export
4869
+ */
4870
+ export const SearchApiFp = function(configuration?: Configuration) {
4871
+ const localVarAxiosParamCreator = SearchApiAxiosParamCreator(configuration)
4872
+ return {
4873
+ /**
4874
+ *
4875
+ * @summary Create search redirect
4876
+ * @param {string} project What project it is
4877
+ * @param {number} [pageToken] Page reference token
4878
+ * @param {number} [pageSize] Max page size. This is the maximum page size that will be returned, but it might be smaller.
4879
+ * @param {string} [search] Search term to filter results
4880
+ * @param {CreateSearchRedirectRequest} [createSearchRedirectRequest] Create search redirect
4881
+ * @param {*} [options] Override http request option.
4882
+ * @throws {RequiredError}
4883
+ */
4884
+ async createSearchRedirect(project: string, pageToken?: number, pageSize?: number, search?: string, createSearchRedirectRequest?: CreateSearchRedirectRequest, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<SearchRedirect>> {
4885
+ const localVarAxiosArgs = await localVarAxiosParamCreator.createSearchRedirect(project, pageToken, pageSize, search, createSearchRedirectRequest, options);
4886
+ const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
4887
+ const localVarOperationServerBasePath = operationServerMap['SearchApi.createSearchRedirect']?.[localVarOperationServerIndex]?.url;
4888
+ return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
4889
+ },
4890
+ /**
4891
+ *
4892
+ * @summary Delete search redirect
4893
+ * @param {string} project What project it is
4894
+ * @param {string} redirectId Redirect\&#39;s unique identifier
4895
+ * @param {*} [options] Override http request option.
4896
+ * @throws {RequiredError}
4897
+ */
4898
+ async deleteSearchRedirect(project: string, redirectId: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<void>> {
4899
+ const localVarAxiosArgs = await localVarAxiosParamCreator.deleteSearchRedirect(project, redirectId, options);
4900
+ const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
4901
+ const localVarOperationServerBasePath = operationServerMap['SearchApi.deleteSearchRedirect']?.[localVarOperationServerIndex]?.url;
4902
+ return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
4903
+ },
4904
+ /**
4905
+ *
4906
+ * @summary Get search redirect
4907
+ * @param {string} project What project it is
4908
+ * @param {string} redirectId Redirect\&#39;s unique identifier
4909
+ * @param {*} [options] Override http request option.
4910
+ * @throws {RequiredError}
4911
+ */
4912
+ async getSearchRedirect(project: string, redirectId: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<SearchRedirect>> {
4913
+ const localVarAxiosArgs = await localVarAxiosParamCreator.getSearchRedirect(project, redirectId, options);
4914
+ const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
4915
+ const localVarOperationServerBasePath = operationServerMap['SearchApi.getSearchRedirect']?.[localVarOperationServerIndex]?.url;
4916
+ return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
4917
+ },
4918
+ /**
4919
+ *
4920
+ * @summary List search redirects
4921
+ * @param {string} project What project it is
4922
+ * @param {number} [pageToken] Page reference token
4923
+ * @param {number} [pageSize] Max page size. This is the maximum page size that will be returned, but it might be smaller.
4924
+ * @param {string} [search] Search term to filter results
4925
+ * @param {*} [options] Override http request option.
4926
+ * @throws {RequiredError}
4927
+ */
4928
+ async listSearchRedirects(project: string, pageToken?: number, pageSize?: number, search?: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<SearchRedirectsResponse>> {
4929
+ const localVarAxiosArgs = await localVarAxiosParamCreator.listSearchRedirects(project, pageToken, pageSize, search, options);
4930
+ const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
4931
+ const localVarOperationServerBasePath = operationServerMap['SearchApi.listSearchRedirects']?.[localVarOperationServerIndex]?.url;
4932
+ return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
4933
+ },
4934
+ /**
4935
+ *
4936
+ * @summary Update search redirect
4937
+ * @param {string} project What project it is
4938
+ * @param {string} redirectId Redirect\&#39;s unique identifier
4939
+ * @param {UpdateSearchRedirectRequest} [updateSearchRedirectRequest] Update search redirect
4940
+ * @param {*} [options] Override http request option.
4941
+ * @throws {RequiredError}
4942
+ */
4943
+ async updateSearchRedirect(project: string, redirectId: string, updateSearchRedirectRequest?: UpdateSearchRedirectRequest, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<SearchRedirect>> {
4944
+ const localVarAxiosArgs = await localVarAxiosParamCreator.updateSearchRedirect(project, redirectId, updateSearchRedirectRequest, options);
4945
+ const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
4946
+ const localVarOperationServerBasePath = operationServerMap['SearchApi.updateSearchRedirect']?.[localVarOperationServerIndex]?.url;
4947
+ return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
4948
+ },
4949
+ }
4950
+ };
4951
+
4952
+ /**
4953
+ * SearchApi - factory interface
4954
+ * @export
4955
+ */
4956
+ export const SearchApiFactory = function (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) {
4957
+ const localVarFp = SearchApiFp(configuration)
4958
+ return {
4959
+ /**
4960
+ *
4961
+ * @summary Create search redirect
4962
+ * @param {SearchApiCreateSearchRedirectRequest} requestParameters Request parameters.
4963
+ * @param {*} [options] Override http request option.
4964
+ * @throws {RequiredError}
4965
+ */
4966
+ createSearchRedirect(requestParameters: SearchApiCreateSearchRedirectRequest, options?: RawAxiosRequestConfig): AxiosPromise<SearchRedirect> {
4967
+ return localVarFp.createSearchRedirect(requestParameters.project, requestParameters.pageToken, requestParameters.pageSize, requestParameters.search, requestParameters.createSearchRedirectRequest, options).then((request) => request(axios, basePath));
4968
+ },
4969
+ /**
4970
+ *
4971
+ * @summary Delete search redirect
4972
+ * @param {SearchApiDeleteSearchRedirectRequest} requestParameters Request parameters.
4973
+ * @param {*} [options] Override http request option.
4974
+ * @throws {RequiredError}
4975
+ */
4976
+ deleteSearchRedirect(requestParameters: SearchApiDeleteSearchRedirectRequest, options?: RawAxiosRequestConfig): AxiosPromise<void> {
4977
+ return localVarFp.deleteSearchRedirect(requestParameters.project, requestParameters.redirectId, options).then((request) => request(axios, basePath));
4978
+ },
4979
+ /**
4980
+ *
4981
+ * @summary Get search redirect
4982
+ * @param {SearchApiGetSearchRedirectRequest} requestParameters Request parameters.
4983
+ * @param {*} [options] Override http request option.
4984
+ * @throws {RequiredError}
4985
+ */
4986
+ getSearchRedirect(requestParameters: SearchApiGetSearchRedirectRequest, options?: RawAxiosRequestConfig): AxiosPromise<SearchRedirect> {
4987
+ return localVarFp.getSearchRedirect(requestParameters.project, requestParameters.redirectId, options).then((request) => request(axios, basePath));
4988
+ },
4989
+ /**
4990
+ *
4991
+ * @summary List search redirects
4992
+ * @param {SearchApiListSearchRedirectsRequest} requestParameters Request parameters.
4993
+ * @param {*} [options] Override http request option.
4994
+ * @throws {RequiredError}
4995
+ */
4996
+ listSearchRedirects(requestParameters: SearchApiListSearchRedirectsRequest, options?: RawAxiosRequestConfig): AxiosPromise<SearchRedirectsResponse> {
4997
+ return localVarFp.listSearchRedirects(requestParameters.project, requestParameters.pageToken, requestParameters.pageSize, requestParameters.search, options).then((request) => request(axios, basePath));
4998
+ },
4999
+ /**
5000
+ *
5001
+ * @summary Update search redirect
5002
+ * @param {SearchApiUpdateSearchRedirectRequest} requestParameters Request parameters.
5003
+ * @param {*} [options] Override http request option.
5004
+ * @throws {RequiredError}
5005
+ */
5006
+ updateSearchRedirect(requestParameters: SearchApiUpdateSearchRedirectRequest, options?: RawAxiosRequestConfig): AxiosPromise<SearchRedirect> {
5007
+ return localVarFp.updateSearchRedirect(requestParameters.project, requestParameters.redirectId, requestParameters.updateSearchRedirectRequest, options).then((request) => request(axios, basePath));
5008
+ },
5009
+ };
5010
+ };
5011
+
5012
+ /**
5013
+ * Request parameters for createSearchRedirect operation in SearchApi.
5014
+ * @export
5015
+ * @interface SearchApiCreateSearchRedirectRequest
5016
+ */
5017
+ export interface SearchApiCreateSearchRedirectRequest {
5018
+ /**
5019
+ * What project it is
5020
+ * @type {string}
5021
+ * @memberof SearchApiCreateSearchRedirect
5022
+ */
5023
+ readonly project: string
5024
+
5025
+ /**
5026
+ * Page reference token
5027
+ * @type {number}
5028
+ * @memberof SearchApiCreateSearchRedirect
5029
+ */
5030
+ readonly pageToken?: number
5031
+
5032
+ /**
5033
+ * Max page size. This is the maximum page size that will be returned, but it might be smaller.
5034
+ * @type {number}
5035
+ * @memberof SearchApiCreateSearchRedirect
5036
+ */
5037
+ readonly pageSize?: number
5038
+
5039
+ /**
5040
+ * Search term to filter results
5041
+ * @type {string}
5042
+ * @memberof SearchApiCreateSearchRedirect
5043
+ */
5044
+ readonly search?: string
5045
+
5046
+ /**
5047
+ * Create search redirect
5048
+ * @type {CreateSearchRedirectRequest}
5049
+ * @memberof SearchApiCreateSearchRedirect
5050
+ */
5051
+ readonly createSearchRedirectRequest?: CreateSearchRedirectRequest
5052
+ }
5053
+
5054
+ /**
5055
+ * Request parameters for deleteSearchRedirect operation in SearchApi.
5056
+ * @export
5057
+ * @interface SearchApiDeleteSearchRedirectRequest
5058
+ */
5059
+ export interface SearchApiDeleteSearchRedirectRequest {
5060
+ /**
5061
+ * What project it is
5062
+ * @type {string}
5063
+ * @memberof SearchApiDeleteSearchRedirect
5064
+ */
5065
+ readonly project: string
5066
+
5067
+ /**
5068
+ * Redirect\&#39;s unique identifier
5069
+ * @type {string}
5070
+ * @memberof SearchApiDeleteSearchRedirect
5071
+ */
5072
+ readonly redirectId: string
5073
+ }
5074
+
5075
+ /**
5076
+ * Request parameters for getSearchRedirect operation in SearchApi.
5077
+ * @export
5078
+ * @interface SearchApiGetSearchRedirectRequest
5079
+ */
5080
+ export interface SearchApiGetSearchRedirectRequest {
5081
+ /**
5082
+ * What project it is
5083
+ * @type {string}
5084
+ * @memberof SearchApiGetSearchRedirect
5085
+ */
5086
+ readonly project: string
5087
+
5088
+ /**
5089
+ * Redirect\&#39;s unique identifier
5090
+ * @type {string}
5091
+ * @memberof SearchApiGetSearchRedirect
5092
+ */
5093
+ readonly redirectId: string
5094
+ }
5095
+
5096
+ /**
5097
+ * Request parameters for listSearchRedirects operation in SearchApi.
5098
+ * @export
5099
+ * @interface SearchApiListSearchRedirectsRequest
5100
+ */
5101
+ export interface SearchApiListSearchRedirectsRequest {
5102
+ /**
5103
+ * What project it is
5104
+ * @type {string}
5105
+ * @memberof SearchApiListSearchRedirects
5106
+ */
5107
+ readonly project: string
5108
+
5109
+ /**
5110
+ * Page reference token
5111
+ * @type {number}
5112
+ * @memberof SearchApiListSearchRedirects
5113
+ */
5114
+ readonly pageToken?: number
5115
+
5116
+ /**
5117
+ * Max page size. This is the maximum page size that will be returned, but it might be smaller.
5118
+ * @type {number}
5119
+ * @memberof SearchApiListSearchRedirects
5120
+ */
5121
+ readonly pageSize?: number
5122
+
5123
+ /**
5124
+ * Search term to filter results
5125
+ * @type {string}
5126
+ * @memberof SearchApiListSearchRedirects
5127
+ */
5128
+ readonly search?: string
5129
+ }
5130
+
5131
+ /**
5132
+ * Request parameters for updateSearchRedirect operation in SearchApi.
5133
+ * @export
5134
+ * @interface SearchApiUpdateSearchRedirectRequest
5135
+ */
5136
+ export interface SearchApiUpdateSearchRedirectRequest {
5137
+ /**
5138
+ * What project it is
5139
+ * @type {string}
5140
+ * @memberof SearchApiUpdateSearchRedirect
5141
+ */
5142
+ readonly project: string
5143
+
5144
+ /**
5145
+ * Redirect\&#39;s unique identifier
5146
+ * @type {string}
5147
+ * @memberof SearchApiUpdateSearchRedirect
5148
+ */
5149
+ readonly redirectId: string
5150
+
5151
+ /**
5152
+ * Update search redirect
5153
+ * @type {UpdateSearchRedirectRequest}
5154
+ * @memberof SearchApiUpdateSearchRedirect
5155
+ */
5156
+ readonly updateSearchRedirectRequest?: UpdateSearchRedirectRequest
5157
+ }
5158
+
5159
+ /**
5160
+ * SearchApi - object-oriented interface
5161
+ * @export
5162
+ * @class SearchApi
5163
+ * @extends {BaseAPI}
5164
+ */
5165
+ export class SearchApi extends BaseAPI {
5166
+ /**
5167
+ *
5168
+ * @summary Create search redirect
5169
+ * @param {SearchApiCreateSearchRedirectRequest} requestParameters Request parameters.
5170
+ * @param {*} [options] Override http request option.
5171
+ * @throws {RequiredError}
5172
+ * @memberof SearchApi
5173
+ */
5174
+ public createSearchRedirect(requestParameters: SearchApiCreateSearchRedirectRequest, options?: RawAxiosRequestConfig) {
5175
+ return SearchApiFp(this.configuration).createSearchRedirect(requestParameters.project, requestParameters.pageToken, requestParameters.pageSize, requestParameters.search, requestParameters.createSearchRedirectRequest, options).then((request) => request(this.axios, this.basePath));
5176
+ }
5177
+
5178
+ /**
5179
+ *
5180
+ * @summary Delete search redirect
5181
+ * @param {SearchApiDeleteSearchRedirectRequest} requestParameters Request parameters.
5182
+ * @param {*} [options] Override http request option.
5183
+ * @throws {RequiredError}
5184
+ * @memberof SearchApi
5185
+ */
5186
+ public deleteSearchRedirect(requestParameters: SearchApiDeleteSearchRedirectRequest, options?: RawAxiosRequestConfig) {
5187
+ return SearchApiFp(this.configuration).deleteSearchRedirect(requestParameters.project, requestParameters.redirectId, options).then((request) => request(this.axios, this.basePath));
5188
+ }
5189
+
5190
+ /**
5191
+ *
5192
+ * @summary Get search redirect
5193
+ * @param {SearchApiGetSearchRedirectRequest} requestParameters Request parameters.
5194
+ * @param {*} [options] Override http request option.
5195
+ * @throws {RequiredError}
5196
+ * @memberof SearchApi
5197
+ */
5198
+ public getSearchRedirect(requestParameters: SearchApiGetSearchRedirectRequest, options?: RawAxiosRequestConfig) {
5199
+ return SearchApiFp(this.configuration).getSearchRedirect(requestParameters.project, requestParameters.redirectId, options).then((request) => request(this.axios, this.basePath));
5200
+ }
5201
+
5202
+ /**
5203
+ *
5204
+ * @summary List search redirects
5205
+ * @param {SearchApiListSearchRedirectsRequest} requestParameters Request parameters.
5206
+ * @param {*} [options] Override http request option.
5207
+ * @throws {RequiredError}
5208
+ * @memberof SearchApi
5209
+ */
5210
+ public listSearchRedirects(requestParameters: SearchApiListSearchRedirectsRequest, options?: RawAxiosRequestConfig) {
5211
+ return SearchApiFp(this.configuration).listSearchRedirects(requestParameters.project, requestParameters.pageToken, requestParameters.pageSize, requestParameters.search, options).then((request) => request(this.axios, this.basePath));
5212
+ }
5213
+
5214
+ /**
5215
+ *
5216
+ * @summary Update search redirect
5217
+ * @param {SearchApiUpdateSearchRedirectRequest} requestParameters Request parameters.
5218
+ * @param {*} [options] Override http request option.
5219
+ * @throws {RequiredError}
5220
+ * @memberof SearchApi
5221
+ */
5222
+ public updateSearchRedirect(requestParameters: SearchApiUpdateSearchRedirectRequest, options?: RawAxiosRequestConfig) {
5223
+ return SearchApiFp(this.configuration).updateSearchRedirect(requestParameters.project, requestParameters.redirectId, requestParameters.updateSearchRedirectRequest, options).then((request) => request(this.axios, this.basePath));
5224
+ }
5225
+ }
5226
+
5227
+
5228
+