@ignos/api-client 20260615.152.1-alpha → 20260615.154.1-alpha
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/lib/ignosportal-api.d.ts +8 -0
- package/lib/ignosportal-api.js +44 -0
- package/package.json +1 -1
- package/src/ignosportal-api.ts +51 -0
package/lib/ignosportal-api.d.ts
CHANGED
|
@@ -3433,6 +3433,7 @@ export interface ISuppliersClient {
|
|
|
3433
3433
|
* Delete all supplier mappings between old supplier ids and new supplier ids.
|
|
3434
3434
|
*/
|
|
3435
3435
|
deleteSupplierMappings(): Promise<void>;
|
|
3436
|
+
lookupOrganization(threeLetterIsoCountry: string | undefined, organizationNumber: string | undefined): Promise<OrganizationDto>;
|
|
3436
3437
|
}
|
|
3437
3438
|
export declare class SuppliersClient extends AuthorizedApiBase implements ISuppliersClient {
|
|
3438
3439
|
private http;
|
|
@@ -3460,6 +3461,8 @@ export declare class SuppliersClient extends AuthorizedApiBase implements ISuppl
|
|
|
3460
3461
|
*/
|
|
3461
3462
|
deleteSupplierMappings(): Promise<void>;
|
|
3462
3463
|
protected processDeleteSupplierMappings(response: Response): Promise<void>;
|
|
3464
|
+
lookupOrganization(threeLetterIsoCountry: string | undefined, organizationNumber: string | undefined): Promise<OrganizationDto>;
|
|
3465
|
+
protected processLookupOrganization(response: Response): Promise<OrganizationDto>;
|
|
3463
3466
|
}
|
|
3464
3467
|
export interface AzureRegionDto {
|
|
3465
3468
|
displayName: string;
|
|
@@ -9672,6 +9675,11 @@ export interface CreateSupplierMapping {
|
|
|
9672
9675
|
existingSupplierId: string;
|
|
9673
9676
|
newSupplierId: string;
|
|
9674
9677
|
}
|
|
9678
|
+
export interface OrganizationDto {
|
|
9679
|
+
name?: string;
|
|
9680
|
+
postalAddress?: string | null;
|
|
9681
|
+
registeredAddress?: string | null;
|
|
9682
|
+
}
|
|
9675
9683
|
export type FeatureCollectionType = "FeatureCollection";
|
|
9676
9684
|
export interface Features {
|
|
9677
9685
|
type: FeaturesType;
|
package/lib/ignosportal-api.js
CHANGED
|
@@ -28494,6 +28494,50 @@ export class SuppliersClient extends AuthorizedApiBase {
|
|
|
28494
28494
|
}
|
|
28495
28495
|
return Promise.resolve(null);
|
|
28496
28496
|
}
|
|
28497
|
+
lookupOrganization(threeLetterIsoCountry, organizationNumber) {
|
|
28498
|
+
let url_ = this.baseUrl + "/suppliers/organization?";
|
|
28499
|
+
if (threeLetterIsoCountry === null)
|
|
28500
|
+
throw new globalThis.Error("The parameter 'threeLetterIsoCountry' cannot be null.");
|
|
28501
|
+
else if (threeLetterIsoCountry !== undefined)
|
|
28502
|
+
url_ += "threeLetterIsoCountry=" + encodeURIComponent("" + threeLetterIsoCountry) + "&";
|
|
28503
|
+
if (organizationNumber === null)
|
|
28504
|
+
throw new globalThis.Error("The parameter 'organizationNumber' cannot be null.");
|
|
28505
|
+
else if (organizationNumber !== undefined)
|
|
28506
|
+
url_ += "organizationNumber=" + encodeURIComponent("" + organizationNumber) + "&";
|
|
28507
|
+
url_ = url_.replace(/[?&]$/, "");
|
|
28508
|
+
let options_ = {
|
|
28509
|
+
method: "GET",
|
|
28510
|
+
headers: {
|
|
28511
|
+
"Accept": "application/json"
|
|
28512
|
+
}
|
|
28513
|
+
};
|
|
28514
|
+
return this.transformOptions(options_).then(transformedOptions_ => {
|
|
28515
|
+
return this.http.fetch(url_, transformedOptions_);
|
|
28516
|
+
}).then((_response) => {
|
|
28517
|
+
return this.processLookupOrganization(_response);
|
|
28518
|
+
});
|
|
28519
|
+
}
|
|
28520
|
+
processLookupOrganization(response) {
|
|
28521
|
+
const status = response.status;
|
|
28522
|
+
let _headers = {};
|
|
28523
|
+
if (response.headers && response.headers.forEach) {
|
|
28524
|
+
response.headers.forEach((v, k) => _headers[k] = v);
|
|
28525
|
+
}
|
|
28526
|
+
;
|
|
28527
|
+
if (status === 200) {
|
|
28528
|
+
return response.text().then((_responseText) => {
|
|
28529
|
+
let result200 = null;
|
|
28530
|
+
result200 = _responseText === "" ? null : JSON.parse(_responseText, this.jsonParseReviver);
|
|
28531
|
+
return result200;
|
|
28532
|
+
});
|
|
28533
|
+
}
|
|
28534
|
+
else if (status !== 200 && status !== 204) {
|
|
28535
|
+
return response.text().then((_responseText) => {
|
|
28536
|
+
return throwException("An unexpected server error occurred.", status, _responseText, _headers);
|
|
28537
|
+
});
|
|
28538
|
+
}
|
|
28539
|
+
return Promise.resolve(null);
|
|
28540
|
+
}
|
|
28497
28541
|
}
|
|
28498
28542
|
export class ApiException extends Error {
|
|
28499
28543
|
constructor(message, status, response, headers, result) {
|
package/package.json
CHANGED
package/src/ignosportal-api.ts
CHANGED
|
@@ -30204,6 +30204,8 @@ export interface ISuppliersClient {
|
|
|
30204
30204
|
* Delete all supplier mappings between old supplier ids and new supplier ids.
|
|
30205
30205
|
*/
|
|
30206
30206
|
deleteSupplierMappings(): Promise<void>;
|
|
30207
|
+
|
|
30208
|
+
lookupOrganization(threeLetterIsoCountry: string | undefined, organizationNumber: string | undefined): Promise<OrganizationDto>;
|
|
30207
30209
|
}
|
|
30208
30210
|
|
|
30209
30211
|
export class SuppliersClient extends AuthorizedApiBase implements ISuppliersClient {
|
|
@@ -30468,6 +30470,49 @@ export class SuppliersClient extends AuthorizedApiBase implements ISuppliersClie
|
|
|
30468
30470
|
}
|
|
30469
30471
|
return Promise.resolve<void>(null as any);
|
|
30470
30472
|
}
|
|
30473
|
+
|
|
30474
|
+
lookupOrganization(threeLetterIsoCountry: string | undefined, organizationNumber: string | undefined): Promise<OrganizationDto> {
|
|
30475
|
+
let url_ = this.baseUrl + "/suppliers/organization?";
|
|
30476
|
+
if (threeLetterIsoCountry === null)
|
|
30477
|
+
throw new globalThis.Error("The parameter 'threeLetterIsoCountry' cannot be null.");
|
|
30478
|
+
else if (threeLetterIsoCountry !== undefined)
|
|
30479
|
+
url_ += "threeLetterIsoCountry=" + encodeURIComponent("" + threeLetterIsoCountry) + "&";
|
|
30480
|
+
if (organizationNumber === null)
|
|
30481
|
+
throw new globalThis.Error("The parameter 'organizationNumber' cannot be null.");
|
|
30482
|
+
else if (organizationNumber !== undefined)
|
|
30483
|
+
url_ += "organizationNumber=" + encodeURIComponent("" + organizationNumber) + "&";
|
|
30484
|
+
url_ = url_.replace(/[?&]$/, "");
|
|
30485
|
+
|
|
30486
|
+
let options_: RequestInit = {
|
|
30487
|
+
method: "GET",
|
|
30488
|
+
headers: {
|
|
30489
|
+
"Accept": "application/json"
|
|
30490
|
+
}
|
|
30491
|
+
};
|
|
30492
|
+
|
|
30493
|
+
return this.transformOptions(options_).then(transformedOptions_ => {
|
|
30494
|
+
return this.http.fetch(url_, transformedOptions_);
|
|
30495
|
+
}).then((_response: Response) => {
|
|
30496
|
+
return this.processLookupOrganization(_response);
|
|
30497
|
+
});
|
|
30498
|
+
}
|
|
30499
|
+
|
|
30500
|
+
protected processLookupOrganization(response: Response): Promise<OrganizationDto> {
|
|
30501
|
+
const status = response.status;
|
|
30502
|
+
let _headers: any = {}; if (response.headers && response.headers.forEach) { response.headers.forEach((v: any, k: any) => _headers[k] = v); };
|
|
30503
|
+
if (status === 200) {
|
|
30504
|
+
return response.text().then((_responseText) => {
|
|
30505
|
+
let result200: any = null;
|
|
30506
|
+
result200 = _responseText === "" ? null : JSON.parse(_responseText, this.jsonParseReviver) as OrganizationDto;
|
|
30507
|
+
return result200;
|
|
30508
|
+
});
|
|
30509
|
+
} else if (status !== 200 && status !== 204) {
|
|
30510
|
+
return response.text().then((_responseText) => {
|
|
30511
|
+
return throwException("An unexpected server error occurred.", status, _responseText, _headers);
|
|
30512
|
+
});
|
|
30513
|
+
}
|
|
30514
|
+
return Promise.resolve<OrganizationDto>(null as any);
|
|
30515
|
+
}
|
|
30471
30516
|
}
|
|
30472
30517
|
|
|
30473
30518
|
export interface AzureRegionDto {
|
|
@@ -37537,6 +37582,12 @@ export interface CreateSupplierMapping {
|
|
|
37537
37582
|
newSupplierId: string;
|
|
37538
37583
|
}
|
|
37539
37584
|
|
|
37585
|
+
export interface OrganizationDto {
|
|
37586
|
+
name?: string;
|
|
37587
|
+
postalAddress?: string | null;
|
|
37588
|
+
registeredAddress?: string | null;
|
|
37589
|
+
}
|
|
37590
|
+
|
|
37540
37591
|
export type FeatureCollectionType = "FeatureCollection";
|
|
37541
37592
|
|
|
37542
37593
|
export interface Features {
|