@saritasa/renewaire-frontend-sdk 0.35.0 → 0.36.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/README.md CHANGED
@@ -1,5 +1,5 @@
1
- # @@saritasa/renewaire-frontend-sdk@0.35.0
1
+ # @@saritasa/renewaire-frontend-sdk@0.36.0
2
2
 
3
3
  ```bash
4
- npm install @saritasa/renewaire-frontend-sdk@0.35.0 --save
4
+ npm install @saritasa/renewaire-frontend-sdk@0.36.0 --save
5
5
  ```
@@ -2015,7 +2015,61 @@ class RepTerritoriesApiService extends BaseService {
2015
2015
  this.httpClient = httpClient;
2016
2016
  }
2017
2017
  repTerritoriesCreateRepTerritory(requestParameters, observe = "body", reportProgress = false, options) {
2018
- const saveRepTerritoryDto = requestParameters?.saveRepTerritoryDto;
2018
+ const name = requestParameters?.name;
2019
+ if (name === null || name === undefined) {
2020
+ throw new Error("Required parameter name was null or undefined when calling repTerritoriesCreateRepTerritory.");
2021
+ }
2022
+ const externalDisplayName = requestParameters?.externalDisplayName;
2023
+ if (externalDisplayName === null || externalDisplayName === undefined) {
2024
+ throw new Error("Required parameter externalDisplayName was null or undefined when calling repTerritoriesCreateRepTerritory.");
2025
+ }
2026
+ const code = requestParameters?.code;
2027
+ if (code === null || code === undefined) {
2028
+ throw new Error("Required parameter code was null or undefined when calling repTerritoriesCreateRepTerritory.");
2029
+ }
2030
+ const phone = requestParameters?.phone;
2031
+ if (phone === null || phone === undefined) {
2032
+ throw new Error("Required parameter phone was null or undefined when calling repTerritoriesCreateRepTerritory.");
2033
+ }
2034
+ const email = requestParameters?.email;
2035
+ if (email === null || email === undefined) {
2036
+ throw new Error("Required parameter email was null or undefined when calling repTerritoriesCreateRepTerritory.");
2037
+ }
2038
+ const website = requestParameters?.website;
2039
+ if (website === null || website === undefined) {
2040
+ throw new Error("Required parameter website was null or undefined when calling repTerritoriesCreateRepTerritory.");
2041
+ }
2042
+ const addressCountry = requestParameters?.addressCountry;
2043
+ if (addressCountry === null || addressCountry === undefined) {
2044
+ throw new Error("Required parameter addressCountry was null or undefined when calling repTerritoriesCreateRepTerritory.");
2045
+ }
2046
+ const addressAddress1 = requestParameters?.addressAddress1;
2047
+ if (addressAddress1 === null || addressAddress1 === undefined) {
2048
+ throw new Error("Required parameter addressAddress1 was null or undefined when calling repTerritoriesCreateRepTerritory.");
2049
+ }
2050
+ const addressState = requestParameters?.addressState;
2051
+ if (addressState === null || addressState === undefined) {
2052
+ throw new Error("Required parameter addressState was null or undefined when calling repTerritoriesCreateRepTerritory.");
2053
+ }
2054
+ const addressPostalCode = requestParameters?.addressPostalCode;
2055
+ if (addressPostalCode === null || addressPostalCode === undefined) {
2056
+ throw new Error("Required parameter addressPostalCode was null or undefined when calling repTerritoriesCreateRepTerritory.");
2057
+ }
2058
+ const rsdRegionId = requestParameters?.rsdRegionId;
2059
+ if (rsdRegionId === null || rsdRegionId === undefined) {
2060
+ throw new Error("Required parameter rsdRegionId was null or undefined when calling repTerritoriesCreateRepTerritory.");
2061
+ }
2062
+ const isRsdDirect = requestParameters?.isRsdDirect;
2063
+ if (isRsdDirect === null || isRsdDirect === undefined) {
2064
+ throw new Error("Required parameter isRsdDirect was null or undefined when calling repTerritoriesCreateRepTerritory.");
2065
+ }
2066
+ const picture = requestParameters?.picture;
2067
+ const addressAddress2 = requestParameters?.addressAddress2;
2068
+ const addressCity = requestParameters?.addressCity;
2069
+ const addressCounty = requestParameters?.addressCounty;
2070
+ const addressApartmentNumber = requestParameters?.addressApartmentNumber;
2071
+ const managerGroupId = requestParameters?.managerGroupId;
2072
+ const salesContactIds = requestParameters?.salesContactIds;
2019
2073
  let localVarHeaders = this.defaultHeaders;
2020
2074
  // authentication (Bearer) required
2021
2075
  localVarHeaders = this.configuration.addCredentialToHeaders("Bearer", "Authorization", localVarHeaders, "Bearer ");
@@ -2031,14 +2085,107 @@ class RepTerritoriesApiService extends BaseService {
2031
2085
  const localVarHttpContext = options?.context ?? new HttpContext();
2032
2086
  const localVarTransferCache = options?.transferCache ?? true;
2033
2087
  // to determine the Content-Type header
2034
- const consumes = [
2035
- "application/json",
2036
- "text/json",
2037
- "application/*+json",
2038
- ];
2039
- const httpContentTypeSelected = this.configuration.selectHeaderContentType(consumes);
2040
- if (httpContentTypeSelected !== undefined) {
2041
- localVarHeaders = localVarHeaders.set("Content-Type", httpContentTypeSelected);
2088
+ const consumes = ["multipart/form-data"];
2089
+ const canConsumeForm = this.canConsumeForm(consumes);
2090
+ let localVarFormParams;
2091
+ let localVarUseForm = false;
2092
+ let localVarConvertFormParamsToString = false;
2093
+ // use FormData to transmit files using content-type "multipart/form-data"
2094
+ // see https://stackoverflow.com/questions/4007969/application-x-www-form-urlencoded-or-multipart-form-data
2095
+ localVarUseForm = canConsumeForm;
2096
+ if (localVarUseForm) {
2097
+ localVarFormParams = new FormData();
2098
+ }
2099
+ else {
2100
+ localVarFormParams = new HttpParams({ encoder: this.encoder });
2101
+ }
2102
+ if (name !== undefined) {
2103
+ localVarFormParams =
2104
+ localVarFormParams.append("Name", name) ||
2105
+ localVarFormParams;
2106
+ }
2107
+ if (externalDisplayName !== undefined) {
2108
+ localVarFormParams =
2109
+ localVarFormParams.append("ExternalDisplayName", externalDisplayName) || localVarFormParams;
2110
+ }
2111
+ if (picture !== undefined) {
2112
+ localVarFormParams =
2113
+ localVarFormParams.append("Picture", picture) ||
2114
+ localVarFormParams;
2115
+ }
2116
+ if (code !== undefined) {
2117
+ localVarFormParams =
2118
+ localVarFormParams.append("Code", code) ||
2119
+ localVarFormParams;
2120
+ }
2121
+ if (phone !== undefined) {
2122
+ localVarFormParams =
2123
+ localVarFormParams.append("Phone", phone) ||
2124
+ localVarFormParams;
2125
+ }
2126
+ if (email !== undefined) {
2127
+ localVarFormParams =
2128
+ localVarFormParams.append("Email", email) ||
2129
+ localVarFormParams;
2130
+ }
2131
+ if (website !== undefined) {
2132
+ localVarFormParams =
2133
+ localVarFormParams.append("Website", website) ||
2134
+ localVarFormParams;
2135
+ }
2136
+ if (addressCountry !== undefined) {
2137
+ localVarFormParams =
2138
+ localVarFormParams.append("Address.Country", addressCountry) || localVarFormParams;
2139
+ }
2140
+ if (addressAddress1 !== undefined) {
2141
+ localVarFormParams =
2142
+ localVarFormParams.append("Address.Address1", addressAddress1) || localVarFormParams;
2143
+ }
2144
+ if (addressAddress2 !== undefined) {
2145
+ localVarFormParams =
2146
+ localVarFormParams.append("Address.Address2", addressAddress2) || localVarFormParams;
2147
+ }
2148
+ if (addressCity !== undefined) {
2149
+ localVarFormParams =
2150
+ localVarFormParams.append("Address.City", addressCity) ||
2151
+ localVarFormParams;
2152
+ }
2153
+ if (addressCounty !== undefined) {
2154
+ localVarFormParams =
2155
+ localVarFormParams.append("Address.County", addressCounty) || localVarFormParams;
2156
+ }
2157
+ if (addressState !== undefined) {
2158
+ localVarFormParams =
2159
+ localVarFormParams.append("Address.State", addressState) || localVarFormParams;
2160
+ }
2161
+ if (addressPostalCode !== undefined) {
2162
+ localVarFormParams =
2163
+ localVarFormParams.append("Address.PostalCode", addressPostalCode) || localVarFormParams;
2164
+ }
2165
+ if (addressApartmentNumber !== undefined) {
2166
+ localVarFormParams =
2167
+ localVarFormParams.append("Address.ApartmentNumber", addressApartmentNumber) || localVarFormParams;
2168
+ }
2169
+ if (rsdRegionId !== undefined) {
2170
+ localVarFormParams =
2171
+ localVarFormParams.append("RsdRegionId", rsdRegionId) ||
2172
+ localVarFormParams;
2173
+ }
2174
+ if (isRsdDirect !== undefined) {
2175
+ localVarFormParams =
2176
+ localVarFormParams.append("IsRsdDirect", isRsdDirect) ||
2177
+ localVarFormParams;
2178
+ }
2179
+ if (managerGroupId !== undefined) {
2180
+ localVarFormParams =
2181
+ localVarFormParams.append("ManagerGroupId", managerGroupId) || localVarFormParams;
2182
+ }
2183
+ if (salesContactIds) {
2184
+ salesContactIds.forEach((element) => {
2185
+ localVarFormParams =
2186
+ localVarFormParams.append("SalesContactIds", element) ||
2187
+ localVarFormParams;
2188
+ });
2042
2189
  }
2043
2190
  let responseType_ = "json";
2044
2191
  if (localVarHttpHeaderAcceptSelected) {
@@ -2056,7 +2203,9 @@ class RepTerritoriesApiService extends BaseService {
2056
2203
  const { basePath, withCredentials } = this.configuration;
2057
2204
  return this.httpClient.request("post", `${basePath}${localVarPath}`, {
2058
2205
  context: localVarHttpContext,
2059
- body: saveRepTerritoryDto,
2206
+ body: localVarConvertFormParamsToString
2207
+ ? localVarFormParams.toString()
2208
+ : localVarFormParams,
2060
2209
  responseType: responseType_,
2061
2210
  ...(withCredentials ? { withCredentials } : {}),
2062
2211
  headers: localVarHeaders,
@@ -2262,10 +2411,21 @@ class RepTerritoriesApiService extends BaseService {
2262
2411
  throw new Error("Required parameter fields was null or undefined when calling repTerritoriesSearchRepTerritories.");
2263
2412
  }
2264
2413
  const pageIndexById = requestParameters?.pageIndexById;
2414
+ const id = requestParameters?.id;
2265
2415
  const repName = requestParameters?.repName;
2416
+ const externalDisplayName = requestParameters?.externalDisplayName;
2266
2417
  const repCode = requestParameters?.repCode;
2267
- const rsdRegionName = requestParameters?.rsdRegionName;
2268
2418
  const isActive = requestParameters?.isActive;
2419
+ const rsdRegionName = requestParameters?.rsdRegionName;
2420
+ const managerGroupName = requestParameters?.managerGroupName;
2421
+ const locationName = requestParameters?.locationName;
2422
+ const groupName = requestParameters?.groupName;
2423
+ const contactName = requestParameters?.contactName;
2424
+ const salesContactName = requestParameters?.salesContactName;
2425
+ const createdAt = requestParameters?.createdAt;
2426
+ const phone = requestParameters?.phone;
2427
+ const email = requestParameters?.email;
2428
+ const website = requestParameters?.website;
2269
2429
  const orderBy = requestParameters?.orderBy;
2270
2430
  const page = requestParameters?.page;
2271
2431
  const pageSize = requestParameters?.pageSize;
@@ -2276,10 +2436,21 @@ class RepTerritoriesApiService extends BaseService {
2276
2436
  });
2277
2437
  }
2278
2438
  localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, pageIndexById, "PageIndexById");
2439
+ localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, id, "Id");
2279
2440
  localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, repName, "RepName");
2441
+ localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, externalDisplayName, "ExternalDisplayName");
2280
2442
  localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, repCode, "RepCode");
2281
- localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, rsdRegionName, "RsdRegionName");
2282
2443
  localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, isActive, "IsActive");
2444
+ localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, rsdRegionName, "RsdRegionName");
2445
+ localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, managerGroupName, "ManagerGroupName");
2446
+ localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, locationName, "LocationName");
2447
+ localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, groupName, "GroupName");
2448
+ localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, contactName, "ContactName");
2449
+ localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, salesContactName, "SalesContactName");
2450
+ localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, createdAt, "CreatedAt");
2451
+ localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, phone, "Phone");
2452
+ localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, email, "Email");
2453
+ localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, website, "Website");
2283
2454
  localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, orderBy, "OrderBy");
2284
2455
  localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, page, "Page");
2285
2456
  localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, pageSize, "PageSize");
@@ -2327,8 +2498,62 @@ class RepTerritoriesApiService extends BaseService {
2327
2498
  if (repTerritoryId === null || repTerritoryId === undefined) {
2328
2499
  throw new Error("Required parameter repTerritoryId was null or undefined when calling repTerritoriesUpdateRepTerritory.");
2329
2500
  }
2501
+ const name = requestParameters?.name;
2502
+ if (name === null || name === undefined) {
2503
+ throw new Error("Required parameter name was null or undefined when calling repTerritoriesUpdateRepTerritory.");
2504
+ }
2505
+ const externalDisplayName = requestParameters?.externalDisplayName;
2506
+ if (externalDisplayName === null || externalDisplayName === undefined) {
2507
+ throw new Error("Required parameter externalDisplayName was null or undefined when calling repTerritoriesUpdateRepTerritory.");
2508
+ }
2509
+ const code = requestParameters?.code;
2510
+ if (code === null || code === undefined) {
2511
+ throw new Error("Required parameter code was null or undefined when calling repTerritoriesUpdateRepTerritory.");
2512
+ }
2513
+ const phone = requestParameters?.phone;
2514
+ if (phone === null || phone === undefined) {
2515
+ throw new Error("Required parameter phone was null or undefined when calling repTerritoriesUpdateRepTerritory.");
2516
+ }
2517
+ const email = requestParameters?.email;
2518
+ if (email === null || email === undefined) {
2519
+ throw new Error("Required parameter email was null or undefined when calling repTerritoriesUpdateRepTerritory.");
2520
+ }
2521
+ const website = requestParameters?.website;
2522
+ if (website === null || website === undefined) {
2523
+ throw new Error("Required parameter website was null or undefined when calling repTerritoriesUpdateRepTerritory.");
2524
+ }
2525
+ const addressCountry = requestParameters?.addressCountry;
2526
+ if (addressCountry === null || addressCountry === undefined) {
2527
+ throw new Error("Required parameter addressCountry was null or undefined when calling repTerritoriesUpdateRepTerritory.");
2528
+ }
2529
+ const addressAddress1 = requestParameters?.addressAddress1;
2530
+ if (addressAddress1 === null || addressAddress1 === undefined) {
2531
+ throw new Error("Required parameter addressAddress1 was null or undefined when calling repTerritoriesUpdateRepTerritory.");
2532
+ }
2533
+ const addressState = requestParameters?.addressState;
2534
+ if (addressState === null || addressState === undefined) {
2535
+ throw new Error("Required parameter addressState was null or undefined when calling repTerritoriesUpdateRepTerritory.");
2536
+ }
2537
+ const addressPostalCode = requestParameters?.addressPostalCode;
2538
+ if (addressPostalCode === null || addressPostalCode === undefined) {
2539
+ throw new Error("Required parameter addressPostalCode was null or undefined when calling repTerritoriesUpdateRepTerritory.");
2540
+ }
2541
+ const rsdRegionId = requestParameters?.rsdRegionId;
2542
+ if (rsdRegionId === null || rsdRegionId === undefined) {
2543
+ throw new Error("Required parameter rsdRegionId was null or undefined when calling repTerritoriesUpdateRepTerritory.");
2544
+ }
2545
+ const isRsdDirect = requestParameters?.isRsdDirect;
2546
+ if (isRsdDirect === null || isRsdDirect === undefined) {
2547
+ throw new Error("Required parameter isRsdDirect was null or undefined when calling repTerritoriesUpdateRepTerritory.");
2548
+ }
2330
2549
  const isActive = requestParameters?.isActive;
2331
- const saveRepTerritoryDto = requestParameters?.saveRepTerritoryDto;
2550
+ const picture = requestParameters?.picture;
2551
+ const addressAddress2 = requestParameters?.addressAddress2;
2552
+ const addressCity = requestParameters?.addressCity;
2553
+ const addressCounty = requestParameters?.addressCounty;
2554
+ const addressApartmentNumber = requestParameters?.addressApartmentNumber;
2555
+ const managerGroupId = requestParameters?.managerGroupId;
2556
+ const salesContactIds = requestParameters?.salesContactIds;
2332
2557
  let localVarQueryParameters = new HttpParams({ encoder: this.encoder });
2333
2558
  localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, isActive, "isActive");
2334
2559
  let localVarHeaders = this.defaultHeaders;
@@ -2341,14 +2566,107 @@ class RepTerritoriesApiService extends BaseService {
2341
2566
  const localVarHttpContext = options?.context ?? new HttpContext();
2342
2567
  const localVarTransferCache = options?.transferCache ?? true;
2343
2568
  // to determine the Content-Type header
2344
- const consumes = [
2345
- "application/json",
2346
- "text/json",
2347
- "application/*+json",
2348
- ];
2349
- const httpContentTypeSelected = this.configuration.selectHeaderContentType(consumes);
2350
- if (httpContentTypeSelected !== undefined) {
2351
- localVarHeaders = localVarHeaders.set("Content-Type", httpContentTypeSelected);
2569
+ const consumes = ["multipart/form-data"];
2570
+ const canConsumeForm = this.canConsumeForm(consumes);
2571
+ let localVarFormParams;
2572
+ let localVarUseForm = false;
2573
+ let localVarConvertFormParamsToString = false;
2574
+ // use FormData to transmit files using content-type "multipart/form-data"
2575
+ // see https://stackoverflow.com/questions/4007969/application-x-www-form-urlencoded-or-multipart-form-data
2576
+ localVarUseForm = canConsumeForm;
2577
+ if (localVarUseForm) {
2578
+ localVarFormParams = new FormData();
2579
+ }
2580
+ else {
2581
+ localVarFormParams = new HttpParams({ encoder: this.encoder });
2582
+ }
2583
+ if (name !== undefined) {
2584
+ localVarFormParams =
2585
+ localVarFormParams.append("Name", name) ||
2586
+ localVarFormParams;
2587
+ }
2588
+ if (externalDisplayName !== undefined) {
2589
+ localVarFormParams =
2590
+ localVarFormParams.append("ExternalDisplayName", externalDisplayName) || localVarFormParams;
2591
+ }
2592
+ if (picture !== undefined) {
2593
+ localVarFormParams =
2594
+ localVarFormParams.append("Picture", picture) ||
2595
+ localVarFormParams;
2596
+ }
2597
+ if (code !== undefined) {
2598
+ localVarFormParams =
2599
+ localVarFormParams.append("Code", code) ||
2600
+ localVarFormParams;
2601
+ }
2602
+ if (phone !== undefined) {
2603
+ localVarFormParams =
2604
+ localVarFormParams.append("Phone", phone) ||
2605
+ localVarFormParams;
2606
+ }
2607
+ if (email !== undefined) {
2608
+ localVarFormParams =
2609
+ localVarFormParams.append("Email", email) ||
2610
+ localVarFormParams;
2611
+ }
2612
+ if (website !== undefined) {
2613
+ localVarFormParams =
2614
+ localVarFormParams.append("Website", website) ||
2615
+ localVarFormParams;
2616
+ }
2617
+ if (addressCountry !== undefined) {
2618
+ localVarFormParams =
2619
+ localVarFormParams.append("Address.Country", addressCountry) || localVarFormParams;
2620
+ }
2621
+ if (addressAddress1 !== undefined) {
2622
+ localVarFormParams =
2623
+ localVarFormParams.append("Address.Address1", addressAddress1) || localVarFormParams;
2624
+ }
2625
+ if (addressAddress2 !== undefined) {
2626
+ localVarFormParams =
2627
+ localVarFormParams.append("Address.Address2", addressAddress2) || localVarFormParams;
2628
+ }
2629
+ if (addressCity !== undefined) {
2630
+ localVarFormParams =
2631
+ localVarFormParams.append("Address.City", addressCity) ||
2632
+ localVarFormParams;
2633
+ }
2634
+ if (addressCounty !== undefined) {
2635
+ localVarFormParams =
2636
+ localVarFormParams.append("Address.County", addressCounty) || localVarFormParams;
2637
+ }
2638
+ if (addressState !== undefined) {
2639
+ localVarFormParams =
2640
+ localVarFormParams.append("Address.State", addressState) || localVarFormParams;
2641
+ }
2642
+ if (addressPostalCode !== undefined) {
2643
+ localVarFormParams =
2644
+ localVarFormParams.append("Address.PostalCode", addressPostalCode) || localVarFormParams;
2645
+ }
2646
+ if (addressApartmentNumber !== undefined) {
2647
+ localVarFormParams =
2648
+ localVarFormParams.append("Address.ApartmentNumber", addressApartmentNumber) || localVarFormParams;
2649
+ }
2650
+ if (rsdRegionId !== undefined) {
2651
+ localVarFormParams =
2652
+ localVarFormParams.append("RsdRegionId", rsdRegionId) ||
2653
+ localVarFormParams;
2654
+ }
2655
+ if (isRsdDirect !== undefined) {
2656
+ localVarFormParams =
2657
+ localVarFormParams.append("IsRsdDirect", isRsdDirect) ||
2658
+ localVarFormParams;
2659
+ }
2660
+ if (managerGroupId !== undefined) {
2661
+ localVarFormParams =
2662
+ localVarFormParams.append("ManagerGroupId", managerGroupId) || localVarFormParams;
2663
+ }
2664
+ if (salesContactIds) {
2665
+ salesContactIds.forEach((element) => {
2666
+ localVarFormParams =
2667
+ localVarFormParams.append("SalesContactIds", element) ||
2668
+ localVarFormParams;
2669
+ });
2352
2670
  }
2353
2671
  let responseType_ = "json";
2354
2672
  if (localVarHttpHeaderAcceptSelected) {
@@ -2366,7 +2684,9 @@ class RepTerritoriesApiService extends BaseService {
2366
2684
  const { basePath, withCredentials } = this.configuration;
2367
2685
  return this.httpClient.request("put", `${basePath}${localVarPath}`, {
2368
2686
  context: localVarHttpContext,
2369
- body: saveRepTerritoryDto,
2687
+ body: localVarConvertFormParamsToString
2688
+ ? localVarFormParams.toString()
2689
+ : localVarFormParams,
2370
2690
  params: localVarQueryParameters,
2371
2691
  responseType: responseType_,
2372
2692
  ...(withCredentials ? { withCredentials } : {}),