@ignos/api-client 20260520.131.1 → 20260521.133.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.
@@ -30,6 +30,7 @@ export declare class CountriesClient extends AuthorizedApiBase implements ICount
30
30
  }
31
31
  export interface ICustomersClient {
32
32
  getCurrentCustomer(): Promise<CurrentCustomerDto>;
33
+ listAvailableTenants(): Promise<AvailableTenantDto[]>;
33
34
  /**
34
35
  * Upsert a customer.
35
36
  * @param id Customer id
@@ -76,6 +77,8 @@ export declare class CustomersClient extends AuthorizedApiBase implements ICusto
76
77
  });
77
78
  getCurrentCustomer(): Promise<CurrentCustomerDto>;
78
79
  protected processGetCurrentCustomer(response: Response): Promise<CurrentCustomerDto>;
80
+ listAvailableTenants(): Promise<AvailableTenantDto[]>;
81
+ protected processListAvailableTenants(response: Response): Promise<AvailableTenantDto[]>;
79
82
  /**
80
83
  * Upsert a customer.
81
84
  * @param id Customer id
@@ -616,15 +619,14 @@ export declare class KpiAdminResourceClient extends AuthorizedApiBase implements
616
619
  protected processUpdateCalendarSettings(response: Response): Promise<CalendarSettingsDto>;
617
620
  }
618
621
  export interface IKpiCalendarClient {
619
- listCalendarDefinitions(): Promise<CalendarDefinitionDto[]>;
622
+ listCalendarDefinitions(): Promise<CalendarDefinitionsDto>;
620
623
  createCalendarDefinition(request: CreateCalendarDefinition): Promise<CalendarDefinitionDto>;
621
624
  updateCalendarDefinition(id: string, request: UpdateCalendarDefinitionRequest): Promise<CalendarDefinitionDto>;
622
- deleteCalendarDefinition(id: string): Promise<FileResponse>;
625
+ deleteCalendarDefinition(id: string): Promise<void>;
623
626
  listResourceCalendarPeriods(): Promise<ResourceCalendarPeriodSchedulesDto>;
624
- addResourceCalendarPeriod(request: AddResourceCalendarPeriod): Promise<ResourceCalendarPeriodDto>;
627
+ addResourceCalendarPeriods(request: AddResourceCalendarPeriod): Promise<ResourceCalendarPeriodDto[]>;
625
628
  deleteResourceCalendarPeriods(request: DeleteResourceCalendarPeriod): Promise<FileResponse>;
626
629
  updateResourceCalendarPeriod(resourceExternalId: string, effectiveFrom: string, request: UpdateResourceCalendarPeriodRequest): Promise<ResourceCalendarPeriodDto>;
627
- bulkAddResourceCalendarPeriods(request: BulkAddResourceCalendarPeriods): Promise<ResourceCalendarPeriodDto[]>;
628
630
  copyResourceCalendarPeriod(sourceResourceExternalId: string, sourceEffectiveFrom: string, request: CopyResourceCalendarPeriodRequest): Promise<ResourceCalendarPeriodDto>;
629
631
  migrateCapacityToSchedules(): Promise<MigrationResultDto>;
630
632
  }
@@ -634,24 +636,22 @@ export declare class KpiCalendarClient extends AuthorizedApiBase implements IKpi
634
636
  constructor(configuration: IAccessTokenProvider, baseUrl?: string, http?: {
635
637
  fetch(url: RequestInfo, init?: RequestInit): Promise<Response>;
636
638
  });
637
- listCalendarDefinitions(): Promise<CalendarDefinitionDto[]>;
638
- protected processListCalendarDefinitions(response: Response): Promise<CalendarDefinitionDto[]>;
639
+ listCalendarDefinitions(): Promise<CalendarDefinitionsDto>;
640
+ protected processListCalendarDefinitions(response: Response): Promise<CalendarDefinitionsDto>;
639
641
  createCalendarDefinition(request: CreateCalendarDefinition): Promise<CalendarDefinitionDto>;
640
642
  protected processCreateCalendarDefinition(response: Response): Promise<CalendarDefinitionDto>;
641
643
  updateCalendarDefinition(id: string, request: UpdateCalendarDefinitionRequest): Promise<CalendarDefinitionDto>;
642
644
  protected processUpdateCalendarDefinition(response: Response): Promise<CalendarDefinitionDto>;
643
- deleteCalendarDefinition(id: string): Promise<FileResponse>;
644
- protected processDeleteCalendarDefinition(response: Response): Promise<FileResponse>;
645
+ deleteCalendarDefinition(id: string): Promise<void>;
646
+ protected processDeleteCalendarDefinition(response: Response): Promise<void>;
645
647
  listResourceCalendarPeriods(): Promise<ResourceCalendarPeriodSchedulesDto>;
646
648
  protected processListResourceCalendarPeriods(response: Response): Promise<ResourceCalendarPeriodSchedulesDto>;
647
- addResourceCalendarPeriod(request: AddResourceCalendarPeriod): Promise<ResourceCalendarPeriodDto>;
648
- protected processAddResourceCalendarPeriod(response: Response): Promise<ResourceCalendarPeriodDto>;
649
+ addResourceCalendarPeriods(request: AddResourceCalendarPeriod): Promise<ResourceCalendarPeriodDto[]>;
650
+ protected processAddResourceCalendarPeriods(response: Response): Promise<ResourceCalendarPeriodDto[]>;
649
651
  deleteResourceCalendarPeriods(request: DeleteResourceCalendarPeriod): Promise<FileResponse>;
650
652
  protected processDeleteResourceCalendarPeriods(response: Response): Promise<FileResponse>;
651
653
  updateResourceCalendarPeriod(resourceExternalId: string, effectiveFrom: string, request: UpdateResourceCalendarPeriodRequest): Promise<ResourceCalendarPeriodDto>;
652
654
  protected processUpdateResourceCalendarPeriod(response: Response): Promise<ResourceCalendarPeriodDto>;
653
- bulkAddResourceCalendarPeriods(request: BulkAddResourceCalendarPeriods): Promise<ResourceCalendarPeriodDto[]>;
654
- protected processBulkAddResourceCalendarPeriods(response: Response): Promise<ResourceCalendarPeriodDto[]>;
655
655
  copyResourceCalendarPeriod(sourceResourceExternalId: string, sourceEffectiveFrom: string, request: CopyResourceCalendarPeriodRequest): Promise<ResourceCalendarPeriodDto>;
656
656
  protected processCopyResourceCalendarPeriod(response: Response): Promise<ResourceCalendarPeriodDto>;
657
657
  migrateCapacityToSchedules(): Promise<MigrationResultDto>;
@@ -3448,6 +3448,13 @@ export interface CurrentCustomerDto {
3448
3448
  name?: string | null;
3449
3449
  logoUrl?: string | null;
3450
3450
  }
3451
+ export interface AvailableTenantDto {
3452
+ tenantId?: string;
3453
+ name?: string | null;
3454
+ environment?: TenantEnvironmentDto;
3455
+ isRecommended?: boolean;
3456
+ }
3457
+ export type TenantEnvironmentDto = "Prod" | "QA" | "Test" | "Dev";
3451
3458
  export interface GuestLoginInfoDto {
3452
3459
  tenantId?: string;
3453
3460
  customerName?: string;
@@ -4155,6 +4162,10 @@ export interface UpdateCalendarSettingsCommand {
4155
4162
  holidayHours?: number;
4156
4163
  defaultPerformancePercent?: number | null;
4157
4164
  }
4165
+ export interface CalendarDefinitionsDto {
4166
+ active: CalendarDefinitionDto[];
4167
+ archived: CalendarDefinitionDto[];
4168
+ }
4158
4169
  export interface CalendarDefinitionDto {
4159
4170
  id: string;
4160
4171
  name: string;
@@ -4163,6 +4174,7 @@ export interface CalendarDefinitionDto {
4163
4174
  };
4164
4175
  created?: Date | null;
4165
4176
  updatedBy?: string | null;
4177
+ isArchived?: boolean;
4166
4178
  }
4167
4179
  export interface CreateCalendarDefinition {
4168
4180
  name: string;
@@ -4175,6 +4187,7 @@ export interface UpdateCalendarDefinitionRequest {
4175
4187
  hoursPerWeekday?: {
4176
4188
  [key in DayOfWeek]?: number;
4177
4189
  } | null;
4190
+ unarchive?: boolean | null;
4178
4191
  }
4179
4192
  export interface ResourceCalendarPeriodSchedulesDto {
4180
4193
  groups: ResourceCalendarPeriodGroupDto[];
@@ -4199,7 +4212,7 @@ export interface ResourceCalendarPeriodDto {
4199
4212
  comment?: string | null;
4200
4213
  }
4201
4214
  export interface AddResourceCalendarPeriod {
4202
- resourceExternalId: string;
4215
+ resourceExternalIds: string[];
4203
4216
  calendarDefinitionId: string;
4204
4217
  effectiveFrom: string;
4205
4218
  targetPercent: number;
@@ -4218,13 +4231,6 @@ export interface PeriodKey {
4218
4231
  resourceExternalId: string;
4219
4232
  effectiveFrom: string;
4220
4233
  }
4221
- export interface BulkAddResourceCalendarPeriods {
4222
- resourceExternalIds: string[];
4223
- calendarDefinitionId: string;
4224
- effectiveFrom: string;
4225
- targetPercent: number;
4226
- comment?: string | null;
4227
- }
4228
4234
  export interface CopyResourceCalendarPeriodRequest {
4229
4235
  targetResourceExternalId: string;
4230
4236
  effectiveFrom: string;
@@ -154,6 +154,42 @@ export class CustomersClient extends AuthorizedApiBase {
154
154
  }
155
155
  return Promise.resolve(null);
156
156
  }
157
+ listAvailableTenants() {
158
+ let url_ = this.baseUrl + "/customers/available-tenants";
159
+ url_ = url_.replace(/[?&]$/, "");
160
+ let options_ = {
161
+ method: "GET",
162
+ headers: {
163
+ "Accept": "application/json"
164
+ }
165
+ };
166
+ return this.transformOptions(options_).then(transformedOptions_ => {
167
+ return this.http.fetch(url_, transformedOptions_);
168
+ }).then((_response) => {
169
+ return this.processListAvailableTenants(_response);
170
+ });
171
+ }
172
+ processListAvailableTenants(response) {
173
+ const status = response.status;
174
+ let _headers = {};
175
+ if (response.headers && response.headers.forEach) {
176
+ response.headers.forEach((v, k) => _headers[k] = v);
177
+ }
178
+ ;
179
+ if (status === 200) {
180
+ return response.text().then((_responseText) => {
181
+ let result200 = null;
182
+ result200 = _responseText === "" ? null : JSON.parse(_responseText, this.jsonParseReviver);
183
+ return result200;
184
+ });
185
+ }
186
+ else if (status !== 200 && status !== 204) {
187
+ return response.text().then((_responseText) => {
188
+ return throwException("An unexpected server error occurred.", status, _responseText, _headers);
189
+ });
190
+ }
191
+ return Promise.resolve(null);
192
+ }
157
193
  /**
158
194
  * Upsert a customer.
159
195
  * @param id Customer id
@@ -4611,9 +4647,7 @@ export class KpiCalendarClient extends AuthorizedApiBase {
4611
4647
  url_ = url_.replace(/[?&]$/, "");
4612
4648
  let options_ = {
4613
4649
  method: "DELETE",
4614
- headers: {
4615
- "Accept": "application/octet-stream"
4616
- }
4650
+ headers: {}
4617
4651
  };
4618
4652
  return this.transformOptions(options_).then(transformedOptions_ => {
4619
4653
  return this.http.fetch(url_, transformedOptions_);
@@ -4628,18 +4662,10 @@ export class KpiCalendarClient extends AuthorizedApiBase {
4628
4662
  response.headers.forEach((v, k) => _headers[k] = v);
4629
4663
  }
4630
4664
  ;
4631
- if (status === 200 || status === 206) {
4632
- const contentDisposition = response.headers ? response.headers.get("content-disposition") : undefined;
4633
- let fileNameMatch = contentDisposition ? /filename\*=(?:(\\?['"])(.*?)\1|(?:[^\s]+'.*?')?([^;\n]*))/g.exec(contentDisposition) : undefined;
4634
- let fileName = fileNameMatch && fileNameMatch.length > 1 ? fileNameMatch[3] || fileNameMatch[2] : undefined;
4635
- if (fileName) {
4636
- fileName = decodeURIComponent(fileName);
4637
- }
4638
- else {
4639
- fileNameMatch = contentDisposition ? /filename="?([^"]*?)"?(;|$)/g.exec(contentDisposition) : undefined;
4640
- fileName = fileNameMatch && fileNameMatch.length > 1 ? fileNameMatch[1] : undefined;
4641
- }
4642
- return response.blob().then(blob => { return { fileName: fileName, data: blob, status: status, headers: _headers }; });
4665
+ if (status === 204) {
4666
+ return response.text().then((_responseText) => {
4667
+ return;
4668
+ });
4643
4669
  }
4644
4670
  else if (status !== 200 && status !== 204) {
4645
4671
  return response.text().then((_responseText) => {
@@ -4684,7 +4710,7 @@ export class KpiCalendarClient extends AuthorizedApiBase {
4684
4710
  }
4685
4711
  return Promise.resolve(null);
4686
4712
  }
4687
- addResourceCalendarPeriod(request) {
4713
+ addResourceCalendarPeriods(request) {
4688
4714
  let url_ = this.baseUrl + "/resources/kpi/calendar-periods";
4689
4715
  url_ = url_.replace(/[?&]$/, "");
4690
4716
  const content_ = JSON.stringify(request);
@@ -4699,10 +4725,10 @@ export class KpiCalendarClient extends AuthorizedApiBase {
4699
4725
  return this.transformOptions(options_).then(transformedOptions_ => {
4700
4726
  return this.http.fetch(url_, transformedOptions_);
4701
4727
  }).then((_response) => {
4702
- return this.processAddResourceCalendarPeriod(_response);
4728
+ return this.processAddResourceCalendarPeriods(_response);
4703
4729
  });
4704
4730
  }
4705
- processAddResourceCalendarPeriod(response) {
4731
+ processAddResourceCalendarPeriods(response) {
4706
4732
  const status = response.status;
4707
4733
  let _headers = {};
4708
4734
  if (response.headers && response.headers.forEach) {
@@ -4813,45 +4839,6 @@ export class KpiCalendarClient extends AuthorizedApiBase {
4813
4839
  }
4814
4840
  return Promise.resolve(null);
4815
4841
  }
4816
- bulkAddResourceCalendarPeriods(request) {
4817
- let url_ = this.baseUrl + "/resources/kpi/calendar-periods/bulk";
4818
- url_ = url_.replace(/[?&]$/, "");
4819
- const content_ = JSON.stringify(request);
4820
- let options_ = {
4821
- body: content_,
4822
- method: "POST",
4823
- headers: {
4824
- "Content-Type": "application/json",
4825
- "Accept": "application/json"
4826
- }
4827
- };
4828
- return this.transformOptions(options_).then(transformedOptions_ => {
4829
- return this.http.fetch(url_, transformedOptions_);
4830
- }).then((_response) => {
4831
- return this.processBulkAddResourceCalendarPeriods(_response);
4832
- });
4833
- }
4834
- processBulkAddResourceCalendarPeriods(response) {
4835
- const status = response.status;
4836
- let _headers = {};
4837
- if (response.headers && response.headers.forEach) {
4838
- response.headers.forEach((v, k) => _headers[k] = v);
4839
- }
4840
- ;
4841
- if (status === 200) {
4842
- return response.text().then((_responseText) => {
4843
- let result200 = null;
4844
- result200 = _responseText === "" ? null : JSON.parse(_responseText, this.jsonParseReviver);
4845
- return result200;
4846
- });
4847
- }
4848
- else if (status !== 200 && status !== 204) {
4849
- return response.text().then((_responseText) => {
4850
- return throwException("An unexpected server error occurred.", status, _responseText, _headers);
4851
- });
4852
- }
4853
- return Promise.resolve(null);
4854
- }
4855
4842
  copyResourceCalendarPeriod(sourceResourceExternalId, sourceEffectiveFrom, request) {
4856
4843
  let url_ = this.baseUrl + "/resources/kpi/calendar-periods/{sourceResourceExternalId}/{sourceEffectiveFrom}/copy";
4857
4844
  if (sourceResourceExternalId === undefined || sourceResourceExternalId === null)
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ignos/api-client",
3
- "version": "20260520.131.1",
3
+ "version": "20260521.133.1",
4
4
  "description": "IGNOS API Client",
5
5
  "type": "module",
6
6
  "main": "lib/index.js",
@@ -141,6 +141,8 @@ export interface ICustomersClient {
141
141
 
142
142
  getCurrentCustomer(): Promise<CurrentCustomerDto>;
143
143
 
144
+ listAvailableTenants(): Promise<AvailableTenantDto[]>;
145
+
144
146
  /**
145
147
  * Upsert a customer.
146
148
  * @param id Customer id
@@ -232,6 +234,41 @@ export class CustomersClient extends AuthorizedApiBase implements ICustomersClie
232
234
  return Promise.resolve<CurrentCustomerDto>(null as any);
233
235
  }
234
236
 
237
+ listAvailableTenants(): Promise<AvailableTenantDto[]> {
238
+ let url_ = this.baseUrl + "/customers/available-tenants";
239
+ url_ = url_.replace(/[?&]$/, "");
240
+
241
+ let options_: RequestInit = {
242
+ method: "GET",
243
+ headers: {
244
+ "Accept": "application/json"
245
+ }
246
+ };
247
+
248
+ return this.transformOptions(options_).then(transformedOptions_ => {
249
+ return this.http.fetch(url_, transformedOptions_);
250
+ }).then((_response: Response) => {
251
+ return this.processListAvailableTenants(_response);
252
+ });
253
+ }
254
+
255
+ protected processListAvailableTenants(response: Response): Promise<AvailableTenantDto[]> {
256
+ const status = response.status;
257
+ let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };
258
+ if (status === 200) {
259
+ return response.text().then((_responseText) => {
260
+ let result200: any = null;
261
+ result200 = _responseText === "" ? null : JSON.parse(_responseText, this.jsonParseReviver) as AvailableTenantDto[];
262
+ return result200;
263
+ });
264
+ } else if (status !== 200 && status !== 204) {
265
+ return response.text().then((_responseText) => {
266
+ return throwException("An unexpected server error occurred.", status, _responseText, _headers);
267
+ });
268
+ }
269
+ return Promise.resolve<AvailableTenantDto[]>(null as any);
270
+ }
271
+
235
272
  /**
236
273
  * Upsert a customer.
237
274
  * @param id Customer id
@@ -4841,24 +4878,22 @@ export class KpiAdminResourceClient extends AuthorizedApiBase implements IKpiAdm
4841
4878
 
4842
4879
  export interface IKpiCalendarClient {
4843
4880
 
4844
- listCalendarDefinitions(): Promise<CalendarDefinitionDto[]>;
4881
+ listCalendarDefinitions(): Promise<CalendarDefinitionsDto>;
4845
4882
 
4846
4883
  createCalendarDefinition(request: CreateCalendarDefinition): Promise<CalendarDefinitionDto>;
4847
4884
 
4848
4885
  updateCalendarDefinition(id: string, request: UpdateCalendarDefinitionRequest): Promise<CalendarDefinitionDto>;
4849
4886
 
4850
- deleteCalendarDefinition(id: string): Promise<FileResponse>;
4887
+ deleteCalendarDefinition(id: string): Promise<void>;
4851
4888
 
4852
4889
  listResourceCalendarPeriods(): Promise<ResourceCalendarPeriodSchedulesDto>;
4853
4890
 
4854
- addResourceCalendarPeriod(request: AddResourceCalendarPeriod): Promise<ResourceCalendarPeriodDto>;
4891
+ addResourceCalendarPeriods(request: AddResourceCalendarPeriod): Promise<ResourceCalendarPeriodDto[]>;
4855
4892
 
4856
4893
  deleteResourceCalendarPeriods(request: DeleteResourceCalendarPeriod): Promise<FileResponse>;
4857
4894
 
4858
4895
  updateResourceCalendarPeriod(resourceExternalId: string, effectiveFrom: string, request: UpdateResourceCalendarPeriodRequest): Promise<ResourceCalendarPeriodDto>;
4859
4896
 
4860
- bulkAddResourceCalendarPeriods(request: BulkAddResourceCalendarPeriods): Promise<ResourceCalendarPeriodDto[]>;
4861
-
4862
4897
  copyResourceCalendarPeriod(sourceResourceExternalId: string, sourceEffectiveFrom: string, request: CopyResourceCalendarPeriodRequest): Promise<ResourceCalendarPeriodDto>;
4863
4898
 
4864
4899
  migrateCapacityToSchedules(): Promise<MigrationResultDto>;
@@ -4874,7 +4909,7 @@ export class KpiCalendarClient extends AuthorizedApiBase implements IKpiCalendar
4874
4909
  this.baseUrl = baseUrl ?? "";
4875
4910
  }
4876
4911
 
4877
- listCalendarDefinitions(): Promise<CalendarDefinitionDto[]> {
4912
+ listCalendarDefinitions(): Promise<CalendarDefinitionsDto> {
4878
4913
  let url_ = this.baseUrl + "/resources/kpi/calendar-definitions";
4879
4914
  url_ = url_.replace(/[?&]$/, "");
4880
4915
 
@@ -4892,13 +4927,13 @@ export class KpiCalendarClient extends AuthorizedApiBase implements IKpiCalendar
4892
4927
  });
4893
4928
  }
4894
4929
 
4895
- protected processListCalendarDefinitions(response: Response): Promise<CalendarDefinitionDto[]> {
4930
+ protected processListCalendarDefinitions(response: Response): Promise<CalendarDefinitionsDto> {
4896
4931
  const status = response.status;
4897
4932
  let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };
4898
4933
  if (status === 200) {
4899
4934
  return response.text().then((_responseText) => {
4900
4935
  let result200: any = null;
4901
- result200 = _responseText === "" ? null : JSON.parse(_responseText, this.jsonParseReviver) as CalendarDefinitionDto[];
4936
+ result200 = _responseText === "" ? null : JSON.parse(_responseText, this.jsonParseReviver) as CalendarDefinitionsDto;
4902
4937
  return result200;
4903
4938
  });
4904
4939
  } else if (status !== 200 && status !== 204) {
@@ -4906,7 +4941,7 @@ export class KpiCalendarClient extends AuthorizedApiBase implements IKpiCalendar
4906
4941
  return throwException("An unexpected server error occurred.", status, _responseText, _headers);
4907
4942
  });
4908
4943
  }
4909
- return Promise.resolve<CalendarDefinitionDto[]>(null as any);
4944
+ return Promise.resolve<CalendarDefinitionsDto>(null as any);
4910
4945
  }
4911
4946
 
4912
4947
  createCalendarDefinition(request: CreateCalendarDefinition): Promise<CalendarDefinitionDto> {
@@ -4990,7 +5025,7 @@ export class KpiCalendarClient extends AuthorizedApiBase implements IKpiCalendar
4990
5025
  return Promise.resolve<CalendarDefinitionDto>(null as any);
4991
5026
  }
4992
5027
 
4993
- deleteCalendarDefinition(id: string): Promise<FileResponse> {
5028
+ deleteCalendarDefinition(id: string): Promise<void> {
4994
5029
  let url_ = this.baseUrl + "/resources/kpi/calendar-definitions/{id}";
4995
5030
  if (id === undefined || id === null)
4996
5031
  throw new globalThis.Error("The parameter 'id' must be defined.");
@@ -5000,7 +5035,6 @@ export class KpiCalendarClient extends AuthorizedApiBase implements IKpiCalendar
5000
5035
  let options_: RequestInit = {
5001
5036
  method: "DELETE",
5002
5037
  headers: {
5003
- "Accept": "application/octet-stream"
5004
5038
  }
5005
5039
  };
5006
5040
 
@@ -5011,26 +5045,19 @@ export class KpiCalendarClient extends AuthorizedApiBase implements IKpiCalendar
5011
5045
  });
5012
5046
  }
5013
5047
 
5014
- protected processDeleteCalendarDefinition(response: Response): Promise<FileResponse> {
5048
+ protected processDeleteCalendarDefinition(response: Response): Promise<void> {
5015
5049
  const status = response.status;
5016
5050
  let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };
5017
- if (status === 200 || status === 206) {
5018
- const contentDisposition = response.headers ? response.headers.get("content-disposition") : undefined;
5019
- let fileNameMatch = contentDisposition ? /filename\*=(?:(\\?['"])(.*?)\1|(?:[^\s]+'.*?')?([^;\n]*))/g.exec(contentDisposition) : undefined;
5020
- let fileName = fileNameMatch && fileNameMatch.length > 1 ? fileNameMatch[3] || fileNameMatch[2] : undefined;
5021
- if (fileName) {
5022
- fileName = decodeURIComponent(fileName);
5023
- } else {
5024
- fileNameMatch = contentDisposition ? /filename="?([^"]*?)"?(;|$)/g.exec(contentDisposition) : undefined;
5025
- fileName = fileNameMatch && fileNameMatch.length > 1 ? fileNameMatch[1] : undefined;
5026
- }
5027
- return response.blob().then(blob => { return { fileName: fileName, data: blob, status: status, headers: _headers }; });
5051
+ if (status === 204) {
5052
+ return response.text().then((_responseText) => {
5053
+ return;
5054
+ });
5028
5055
  } else if (status !== 200 && status !== 204) {
5029
5056
  return response.text().then((_responseText) => {
5030
5057
  return throwException("An unexpected server error occurred.", status, _responseText, _headers);
5031
5058
  });
5032
5059
  }
5033
- return Promise.resolve<FileResponse>(null as any);
5060
+ return Promise.resolve<void>(null as any);
5034
5061
  }
5035
5062
 
5036
5063
  listResourceCalendarPeriods(): Promise<ResourceCalendarPeriodSchedulesDto> {
@@ -5068,7 +5095,7 @@ export class KpiCalendarClient extends AuthorizedApiBase implements IKpiCalendar
5068
5095
  return Promise.resolve<ResourceCalendarPeriodSchedulesDto>(null as any);
5069
5096
  }
5070
5097
 
5071
- addResourceCalendarPeriod(request: AddResourceCalendarPeriod): Promise<ResourceCalendarPeriodDto> {
5098
+ addResourceCalendarPeriods(request: AddResourceCalendarPeriod): Promise<ResourceCalendarPeriodDto[]> {
5072
5099
  let url_ = this.baseUrl + "/resources/kpi/calendar-periods";
5073
5100
  url_ = url_.replace(/[?&]$/, "");
5074
5101
 
@@ -5086,17 +5113,17 @@ export class KpiCalendarClient extends AuthorizedApiBase implements IKpiCalendar
5086
5113
  return this.transformOptions(options_).then(transformedOptions_ => {
5087
5114
  return this.http.fetch(url_, transformedOptions_);
5088
5115
  }).then((_response: Response) => {
5089
- return this.processAddResourceCalendarPeriod(_response);
5116
+ return this.processAddResourceCalendarPeriods(_response);
5090
5117
  });
5091
5118
  }
5092
5119
 
5093
- protected processAddResourceCalendarPeriod(response: Response): Promise<ResourceCalendarPeriodDto> {
5120
+ protected processAddResourceCalendarPeriods(response: Response): Promise<ResourceCalendarPeriodDto[]> {
5094
5121
  const status = response.status;
5095
5122
  let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };
5096
5123
  if (status === 200) {
5097
5124
  return response.text().then((_responseText) => {
5098
5125
  let result200: any = null;
5099
- result200 = _responseText === "" ? null : JSON.parse(_responseText, this.jsonParseReviver) as ResourceCalendarPeriodDto;
5126
+ result200 = _responseText === "" ? null : JSON.parse(_responseText, this.jsonParseReviver) as ResourceCalendarPeriodDto[];
5100
5127
  return result200;
5101
5128
  });
5102
5129
  } else if (status !== 200 && status !== 204) {
@@ -5104,7 +5131,7 @@ export class KpiCalendarClient extends AuthorizedApiBase implements IKpiCalendar
5104
5131
  return throwException("An unexpected server error occurred.", status, _responseText, _headers);
5105
5132
  });
5106
5133
  }
5107
- return Promise.resolve<ResourceCalendarPeriodDto>(null as any);
5134
+ return Promise.resolve<ResourceCalendarPeriodDto[]>(null as any);
5108
5135
  }
5109
5136
 
5110
5137
  deleteResourceCalendarPeriods(request: DeleteResourceCalendarPeriod): Promise<FileResponse> {
@@ -5196,45 +5223,6 @@ export class KpiCalendarClient extends AuthorizedApiBase implements IKpiCalendar
5196
5223
  return Promise.resolve<ResourceCalendarPeriodDto>(null as any);
5197
5224
  }
5198
5225
 
5199
- bulkAddResourceCalendarPeriods(request: BulkAddResourceCalendarPeriods): Promise<ResourceCalendarPeriodDto[]> {
5200
- let url_ = this.baseUrl + "/resources/kpi/calendar-periods/bulk";
5201
- url_ = url_.replace(/[?&]$/, "");
5202
-
5203
- const content_ = JSON.stringify(request);
5204
-
5205
- let options_: RequestInit = {
5206
- body: content_,
5207
- method: "POST",
5208
- headers: {
5209
- "Content-Type": "application/json",
5210
- "Accept": "application/json"
5211
- }
5212
- };
5213
-
5214
- return this.transformOptions(options_).then(transformedOptions_ => {
5215
- return this.http.fetch(url_, transformedOptions_);
5216
- }).then((_response: Response) => {
5217
- return this.processBulkAddResourceCalendarPeriods(_response);
5218
- });
5219
- }
5220
-
5221
- protected processBulkAddResourceCalendarPeriods(response: Response): Promise<ResourceCalendarPeriodDto[]> {
5222
- const status = response.status;
5223
- let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };
5224
- if (status === 200) {
5225
- return response.text().then((_responseText) => {
5226
- let result200: any = null;
5227
- result200 = _responseText === "" ? null : JSON.parse(_responseText, this.jsonParseReviver) as ResourceCalendarPeriodDto[];
5228
- return result200;
5229
- });
5230
- } else if (status !== 200 && status !== 204) {
5231
- return response.text().then((_responseText) => {
5232
- return throwException("An unexpected server error occurred.", status, _responseText, _headers);
5233
- });
5234
- }
5235
- return Promise.resolve<ResourceCalendarPeriodDto[]>(null as any);
5236
- }
5237
-
5238
5226
  copyResourceCalendarPeriod(sourceResourceExternalId: string, sourceEffectiveFrom: string, request: CopyResourceCalendarPeriodRequest): Promise<ResourceCalendarPeriodDto> {
5239
5227
  let url_ = this.baseUrl + "/resources/kpi/calendar-periods/{sourceResourceExternalId}/{sourceEffectiveFrom}/copy";
5240
5228
  if (sourceResourceExternalId === undefined || sourceResourceExternalId === null)
@@ -30166,6 +30154,15 @@ export interface CurrentCustomerDto {
30166
30154
  logoUrl?: string | null;
30167
30155
  }
30168
30156
 
30157
+ export interface AvailableTenantDto {
30158
+ tenantId?: string;
30159
+ name?: string | null;
30160
+ environment?: TenantEnvironmentDto;
30161
+ isRecommended?: boolean;
30162
+ }
30163
+
30164
+ export type TenantEnvironmentDto = "Prod" | "QA" | "Test" | "Dev";
30165
+
30169
30166
  export interface GuestLoginInfoDto {
30170
30167
  tenantId?: string;
30171
30168
  customerName?: string;
@@ -30989,12 +30986,18 @@ export interface UpdateCalendarSettingsCommand {
30989
30986
  defaultPerformancePercent?: number | null;
30990
30987
  }
30991
30988
 
30989
+ export interface CalendarDefinitionsDto {
30990
+ active: CalendarDefinitionDto[];
30991
+ archived: CalendarDefinitionDto[];
30992
+ }
30993
+
30992
30994
  export interface CalendarDefinitionDto {
30993
30995
  id: string;
30994
30996
  name: string;
30995
30997
  hoursPerWeekday: { [key in DayOfWeek]?: number; };
30996
30998
  created?: Date | null;
30997
30999
  updatedBy?: string | null;
31000
+ isArchived?: boolean;
30998
31001
  }
30999
31002
 
31000
31003
  export interface CreateCalendarDefinition {
@@ -31005,6 +31008,7 @@ export interface CreateCalendarDefinition {
31005
31008
  export interface UpdateCalendarDefinitionRequest {
31006
31009
  name?: string | null;
31007
31010
  hoursPerWeekday?: { [key in DayOfWeek]?: number; } | null;
31011
+ unarchive?: boolean | null;
31008
31012
  }
31009
31013
 
31010
31014
  export interface ResourceCalendarPeriodSchedulesDto {
@@ -31034,7 +31038,7 @@ export interface ResourceCalendarPeriodDto {
31034
31038
  }
31035
31039
 
31036
31040
  export interface AddResourceCalendarPeriod {
31037
- resourceExternalId: string;
31041
+ resourceExternalIds: string[];
31038
31042
  calendarDefinitionId: string;
31039
31043
  effectiveFrom: string;
31040
31044
  targetPercent: number;
@@ -31057,14 +31061,6 @@ export interface PeriodKey {
31057
31061
  effectiveFrom: string;
31058
31062
  }
31059
31063
 
31060
- export interface BulkAddResourceCalendarPeriods {
31061
- resourceExternalIds: string[];
31062
- calendarDefinitionId: string;
31063
- effectiveFrom: string;
31064
- targetPercent: number;
31065
- comment?: string | null;
31066
- }
31067
-
31068
31064
  export interface CopyResourceCalendarPeriodRequest {
31069
31065
  targetResourceExternalId: string;
31070
31066
  effectiveFrom: string;