From 7110881e0fcf888d63f989ec37148844edf8204b Mon Sep 17 00:00:00 2001 From: lpapadopoulos Date: Fri, 17 May 2024 14:10:41 +0300 Subject: [PATCH 01/18] party registration workflow --- .../components/redirect/redirect.component.ts | 28 +++++++++++++++++-- src/app/shared/services/app.service.ts | 7 +++-- 2 files changed, 31 insertions(+), 4 deletions(-) diff --git a/src/app/shared/components/redirect/redirect.component.ts b/src/app/shared/components/redirect/redirect.component.ts index 9dd049f..9936f6c 100644 --- a/src/app/shared/components/redirect/redirect.component.ts +++ b/src/app/shared/components/redirect/redirect.component.ts @@ -1,6 +1,7 @@ import { Component, OnInit } from '@angular/core'; import { Router } from '@angular/router'; import { AppService } from '../../services/app.service'; +import { AuthService } from 'src/app/shared/services/auth.service'; @Component({ selector: 'app-redirect', @@ -11,24 +12,47 @@ export class RedirectComponent implements OnInit { constructor( private appService: AppService, - private router: Router + private router: Router, + private authService: AuthService ) { } ngOnInit() { + let isTestbedProvider = false; + for(var val of this.authService.portalUserJWT.realm_access.roles){ + if (val ==='TESTBED_PROVIDER') { + isTestbedProvider=true + } + } + //TODO insert redirection logic const activePortal = localStorage.getItem('active_portal') if (activePortal === 'services') { + if (isTestbedProvider){ + this.router.navigate(['services', 'individual_update']) + } + else { this.router.navigate(['services', 'services_marketplace']) + } } else if (activePortal === 'resources') { this.router.navigate(['resources', 'resource_catalogs']) } else if (activePortal === 'testing') { + + if (isTestbedProvider){ + this.router.navigate(['testing', 'individual_update']) + } else { this.router.navigate(['testing', 'service_test_specs']) + } } else if (activePortal === 'products') { - this.router.navigate(['products', 'marketplace']) + + if (isTestbedProvider){ + this.router.navigate(['products', 'individual_update']) + } else { + this.router.navigate(['products', 'marketplace']) + } } else { diff --git a/src/app/shared/services/app.service.ts b/src/app/shared/services/app.service.ts index 2b6aa78..029e931 100644 --- a/src/app/shared/services/app.service.ts +++ b/src/app/shared/services/app.service.ts @@ -14,6 +14,7 @@ import { ApiConfiguration as ResourceCatalogAPIconfig} from 'src/app/openApis/re import { ApiConfiguration as ResourceInventoryAPIconfig} from 'src/app/openApis/resourceInventoryManagement/api-configuration' import { ApiConfiguration as resourcePoolManagementAPIconfig} from 'src/app/openApis/resourcePoolManagement/api-configuration' import { ApiConfiguration as ProductCatalogAPIconfig} from 'src/app/openApis/productCatalogManagement/api-configuration' +import { ApiConfiguration as GeographicSiteManagementAPIconfig} from 'src/app/openApis/geographicSiteManagement/api-configuration' import { NavigationEnd, NavigationStart, Router } from '@angular/router'; import { filter, first } from 'rxjs/operators'; @@ -40,8 +41,9 @@ export class AppService { private tmfResourceCatalogConfig: ResourceCatalogAPIconfig, private tmfResourceInventoryConfig: ResourceInventoryAPIconfig, private resourcePoolManagementAPIconfig: resourcePoolManagementAPIconfig, - private tmfProductCatalogConfig: ProductCatalogAPIconfig - ) { + private tmfProductCatalogConfig: ProductCatalogAPIconfig, + private tmfGeographicSiteConfig: GeographicSiteManagementAPIconfig + ) { this.setAPIurls() this.recognizePortalDomain() } @@ -64,6 +66,7 @@ export class AppService { this.serviceTestManagementAPIconfig.rootUrl = this.config.APITMFURL this.resourcePoolManagementAPIconfig.rootUrl = this.config.APITMFURL this.tmfProductCatalogConfig.rootUrl = this.config.APITMFURL + this.tmfGeographicSiteConfig.rootUrl = this.config.APITMFURL } //recognition of which portal is used (services/testing/product) -- GitLab From 1b961aaa6fa290abedc89e785168bc778effe726 Mon Sep 17 00:00:00 2001 From: lpapadopoulos Date: Fri, 17 May 2024 15:42:55 +0300 Subject: [PATCH 02/18] tmf API 674 - Geographic Site Management --- .../api-configuration.ts | 171 ++ .../geographicSiteManagement/api.module.ts | 30 + .../geographicSiteManagement/encoder.ts | 20 + .../geographicSiteManagement/index.ts | 6 + .../model/addressable.ts | 27 + .../model/baseEvent.ts | 54 + .../model/calendarPeriod.ts | 50 + .../geographicSiteManagement/model/entity.ts | 36 + .../model/entityRef.ts | 23 + .../model/eventSubscription.ts | 31 + .../model/eventSubscriptionInput.ts | 27 + .../model/extensible.ts | 31 + .../model/externalIdentifier.ts | 40 + .../model/geographicAddressValue.ts | 79 + .../model/geographicSite.ts | 43 + ...geographicSiteAttributeValueChangeEvent.ts | 19 + .../model/geographicSiteCreate.ts | 46 + .../model/geographicSiteCreateEvent.ts | 19 + .../model/geographicSiteDeleteEvent.ts | 19 + .../model/geographicSiteEventPayload.ts | 21 + .../model/geographicSiteRelationship.ts | 46 + .../model/geographicSiteStateChangeEvent.ts | 19 + .../model/geographicSiteUpdate.ts | 54 + .../model/geographicSubAddressUnit.ts | 36 + .../model/geographicSubAddressValue.ts | 61 + .../model/hourPeriod.ts | 36 + .../model/jsonPatch.ts | 47 + .../model/modelError.ts | 51 + .../geographicSiteManagement/model/models.ts | 31 + .../model/patchGeographicSite200Response.ts | 25 + .../model/placeRef.ts | 45 + .../model/placeRefOrValue.ts | 28 + .../model/reference.ts | 31 + .../model/relatedParty.ts | 48 + .../model/schemaContext.ts | 31 + .../model/timePeriod.ts | 27 + .../geographicSiteManagement/param.ts | 69 + .../geographicSiteManagement/services/api.ts | 7 + .../services/eventsSubscription.service.ts | 237 ++ .../services/geographicSite.service.ts | 471 ++++ .../services/notificationListener.service.ts | 400 ++++ .../strict-http-response.ts | 9 + .../geographicSiteManagement/variables.ts | 9 + .../TMF674 - Geographic Site Management.json | 2054 +++++++++++++++++ 44 files changed, 4664 insertions(+) create mode 100644 src/app/openApis/geographicSiteManagement/api-configuration.ts create mode 100644 src/app/openApis/geographicSiteManagement/api.module.ts create mode 100644 src/app/openApis/geographicSiteManagement/encoder.ts create mode 100644 src/app/openApis/geographicSiteManagement/index.ts create mode 100644 src/app/openApis/geographicSiteManagement/model/addressable.ts create mode 100644 src/app/openApis/geographicSiteManagement/model/baseEvent.ts create mode 100644 src/app/openApis/geographicSiteManagement/model/calendarPeriod.ts create mode 100644 src/app/openApis/geographicSiteManagement/model/entity.ts create mode 100644 src/app/openApis/geographicSiteManagement/model/entityRef.ts create mode 100644 src/app/openApis/geographicSiteManagement/model/eventSubscription.ts create mode 100644 src/app/openApis/geographicSiteManagement/model/eventSubscriptionInput.ts create mode 100644 src/app/openApis/geographicSiteManagement/model/extensible.ts create mode 100644 src/app/openApis/geographicSiteManagement/model/externalIdentifier.ts create mode 100644 src/app/openApis/geographicSiteManagement/model/geographicAddressValue.ts create mode 100644 src/app/openApis/geographicSiteManagement/model/geographicSite.ts create mode 100644 src/app/openApis/geographicSiteManagement/model/geographicSiteAttributeValueChangeEvent.ts create mode 100644 src/app/openApis/geographicSiteManagement/model/geographicSiteCreate.ts create mode 100644 src/app/openApis/geographicSiteManagement/model/geographicSiteCreateEvent.ts create mode 100644 src/app/openApis/geographicSiteManagement/model/geographicSiteDeleteEvent.ts create mode 100644 src/app/openApis/geographicSiteManagement/model/geographicSiteEventPayload.ts create mode 100644 src/app/openApis/geographicSiteManagement/model/geographicSiteRelationship.ts create mode 100644 src/app/openApis/geographicSiteManagement/model/geographicSiteStateChangeEvent.ts create mode 100644 src/app/openApis/geographicSiteManagement/model/geographicSiteUpdate.ts create mode 100644 src/app/openApis/geographicSiteManagement/model/geographicSubAddressUnit.ts create mode 100644 src/app/openApis/geographicSiteManagement/model/geographicSubAddressValue.ts create mode 100644 src/app/openApis/geographicSiteManagement/model/hourPeriod.ts create mode 100644 src/app/openApis/geographicSiteManagement/model/jsonPatch.ts create mode 100644 src/app/openApis/geographicSiteManagement/model/modelError.ts create mode 100644 src/app/openApis/geographicSiteManagement/model/models.ts create mode 100644 src/app/openApis/geographicSiteManagement/model/patchGeographicSite200Response.ts create mode 100644 src/app/openApis/geographicSiteManagement/model/placeRef.ts create mode 100644 src/app/openApis/geographicSiteManagement/model/placeRefOrValue.ts create mode 100644 src/app/openApis/geographicSiteManagement/model/reference.ts create mode 100644 src/app/openApis/geographicSiteManagement/model/relatedParty.ts create mode 100644 src/app/openApis/geographicSiteManagement/model/schemaContext.ts create mode 100644 src/app/openApis/geographicSiteManagement/model/timePeriod.ts create mode 100644 src/app/openApis/geographicSiteManagement/param.ts create mode 100644 src/app/openApis/geographicSiteManagement/services/api.ts create mode 100644 src/app/openApis/geographicSiteManagement/services/eventsSubscription.service.ts create mode 100644 src/app/openApis/geographicSiteManagement/services/geographicSite.service.ts create mode 100644 src/app/openApis/geographicSiteManagement/services/notificationListener.service.ts create mode 100644 src/app/openApis/geographicSiteManagement/strict-http-response.ts create mode 100644 src/app/openApis/geographicSiteManagement/variables.ts create mode 100644 src/assets/swagger_collections/TMF674 - Geographic Site Management.json diff --git a/src/app/openApis/geographicSiteManagement/api-configuration.ts b/src/app/openApis/geographicSiteManagement/api-configuration.ts new file mode 100644 index 0000000..c04761c --- /dev/null +++ b/src/app/openApis/geographicSiteManagement/api-configuration.ts @@ -0,0 +1,171 @@ +import { HttpParameterCodec } from '@angular/common/http'; +import { Param } from './param'; + +export interface ConfigurationParameters { + /** + * @deprecated Since 5.0. Use credentials instead + */ + apiKeys?: {[ key: string ]: string}; + username?: string; + password?: string; + /** + * @deprecated Since 5.0. Use credentials instead + */ + accessToken?: string | (() => string); + basePath?: string; + withCredentials?: boolean; + /** + * Takes care of encoding query- and form-parameters. + */ + encoder?: HttpParameterCodec; + /** + * Override the default method for encoding path parameters in various + * styles. + *

+ * See {@link README.md} for more details + *

+ */ + encodeParam?: (param: Param) => string; + /** + * The keys are the names in the securitySchemes section of the OpenAPI + * document. They should map to the value used for authentication + * minus any standard prefixes such as 'Basic' or 'Bearer'. + */ + credentials?: {[ key: string ]: string | (() => string | undefined)}; +} + +export class Configuration { + /** + * @deprecated Since 5.0. Use credentials instead + */ + apiKeys?: {[ key: string ]: string}; + username?: string; + password?: string; + /** + * @deprecated Since 5.0. Use credentials instead + */ + accessToken?: string | (() => string); + basePath?: string; + withCredentials?: boolean; + /** + * Takes care of encoding query- and form-parameters. + */ + encoder?: HttpParameterCodec; + /** + * Encoding of various path parameter + * styles. + *

+ * See {@link README.md} for more details + *

+ */ + encodeParam: (param: Param) => string; + /** + * The keys are the names in the securitySchemes section of the OpenAPI + * document. They should map to the value used for authentication + * minus any standard prefixes such as 'Basic' or 'Bearer'. + */ + credentials: {[ key: string ]: string | (() => string | undefined)}; + + constructor(configurationParameters: ConfigurationParameters = {}) { + this.apiKeys = configurationParameters.apiKeys; + this.username = configurationParameters.username; + this.password = configurationParameters.password; + this.accessToken = configurationParameters.accessToken; + this.basePath = configurationParameters.basePath; + this.withCredentials = configurationParameters.withCredentials; + this.encoder = configurationParameters.encoder; + if (configurationParameters.encodeParam) { + this.encodeParam = configurationParameters.encodeParam; + } + else { + this.encodeParam = param => this.defaultEncodeParam(param); + } + if (configurationParameters.credentials) { + this.credentials = configurationParameters.credentials; + } + else { + this.credentials = {}; + } + } + + /** + * Select the correct content-type to use for a request. + * Uses {@link Configuration#isJsonMime} to determine the correct content-type. + * If no content type is found return the first found type if the contentTypes is not empty + * @param contentTypes - the array of content types that are available for selection + * @returns the selected content-type or undefined if no selection could be made. + */ + public selectHeaderContentType (contentTypes: string[]): string | undefined { + if (contentTypes.length === 0) { + return undefined; + } + + const type = contentTypes.find((x: string) => this.isJsonMime(x)); + if (type === undefined) { + return contentTypes[0]; + } + return type; + } + + /** + * Select the correct accept content-type to use for a request. + * Uses {@link Configuration#isJsonMime} to determine the correct accept content-type. + * If no content type is found return the first found type if the contentTypes is not empty + * @param accepts - the array of content types that are available for selection. + * @returns the selected content-type or undefined if no selection could be made. + */ + public selectHeaderAccept(accepts: string[]): string | undefined { + if (accepts.length === 0) { + return undefined; + } + + const type = accepts.find((x: string) => this.isJsonMime(x)); + if (type === undefined) { + return accepts[0]; + } + return type; + } + + /** + * Check if the given MIME is a JSON MIME. + * JSON MIME examples: + * application/json + * application/json; charset=UTF8 + * APPLICATION/JSON + * application/vnd.company+json + * @param mime - MIME (Multipurpose Internet Mail Extensions) + * @return True if the given MIME is JSON, false otherwise. + */ + public isJsonMime(mime: string): boolean { + const jsonMime: RegExp = new RegExp('^(application\/json|[^;/ \t]+\/[^;/ \t]+[+]json)[ \t]*(;.*)?$', 'i'); + return mime !== null && (jsonMime.test(mime) || mime.toLowerCase() === 'application/json-patch+json'); + } + + public lookupCredential(key: string): string | undefined { + const value = this.credentials[key]; + return typeof value === 'function' + ? value() + : value; + } + + private defaultEncodeParam(param: Param): string { + // This implementation exists as fallback for missing configuration + // and for backwards compatibility to older typescript-angular generator versions. + // It only works for the 'simple' parameter style. + // Date-handling only works for the 'date-time' format. + // All other styles and Date-formats are probably handled incorrectly. + // + // But: if that's all you need (i.e.: the most common use-case): no need for customization! + + const value = param.dataFormat === 'date-time' && param.value instanceof Date + ? (param.value as Date).toISOString() + : param.value; + + return encodeURIComponent(String(value)); + } + + + export class ApiConfiguration { + rootUrl: string = '//portal.openslice.io/osapi'; + } +} diff --git a/src/app/openApis/geographicSiteManagement/api.module.ts b/src/app/openApis/geographicSiteManagement/api.module.ts new file mode 100644 index 0000000..58d341f --- /dev/null +++ b/src/app/openApis/geographicSiteManagement/api.module.ts @@ -0,0 +1,30 @@ +import { NgModule, ModuleWithProviders, SkipSelf, Optional } from '@angular/core'; +import { Configuration } from './configuration'; +import { HttpClient } from '@angular/common/http'; + + +@NgModule({ + imports: [], + declarations: [], + exports: [], + providers: [] +}) +export class ApiModule { + public static forRoot(configurationFactory: () => Configuration): ModuleWithProviders { + return { + ngModule: ApiModule, + providers: [ { provide: Configuration, useFactory: configurationFactory } ] + }; + } + + constructor( @Optional() @SkipSelf() parentModule: ApiModule, + @Optional() http: HttpClient) { + if (parentModule) { + throw new Error('ApiModule is already loaded. Import in your base AppModule only.'); + } + if (!http) { + throw new Error('You need to import the HttpClientModule in your AppModule! \n' + + 'See also https://github.com/angular/angular/issues/20575'); + } + } +} diff --git a/src/app/openApis/geographicSiteManagement/encoder.ts b/src/app/openApis/geographicSiteManagement/encoder.ts new file mode 100644 index 0000000..138c4d5 --- /dev/null +++ b/src/app/openApis/geographicSiteManagement/encoder.ts @@ -0,0 +1,20 @@ +import { HttpParameterCodec } from '@angular/common/http'; + +/** + * Custom HttpParameterCodec + * Workaround for https://github.com/angular/angular/issues/18261 + */ +export class CustomHttpParameterCodec implements HttpParameterCodec { + encodeKey(k: string): string { + return encodeURIComponent(k); + } + encodeValue(v: string): string { + return encodeURIComponent(v); + } + decodeKey(k: string): string { + return decodeURIComponent(k); + } + decodeValue(v: string): string { + return decodeURIComponent(v); + } +} diff --git a/src/app/openApis/geographicSiteManagement/index.ts b/src/app/openApis/geographicSiteManagement/index.ts new file mode 100644 index 0000000..104dd3d --- /dev/null +++ b/src/app/openApis/geographicSiteManagement/index.ts @@ -0,0 +1,6 @@ +export * from './api/api'; +export * from './model/models'; +export * from './variables'; +export * from './configuration'; +export * from './api.module'; +export * from './param'; diff --git a/src/app/openApis/geographicSiteManagement/model/addressable.ts b/src/app/openApis/geographicSiteManagement/model/addressable.ts new file mode 100644 index 0000000..8ccef62 --- /dev/null +++ b/src/app/openApis/geographicSiteManagement/model/addressable.ts @@ -0,0 +1,27 @@ +/** + * Geographic Site Management + * ** TMF API Reference : TMF 674 - Place - Geographic Site Management ### August 2021 This API covers the operations to manage (create, read, delete) sites that can be associated to a customer, an account, a service delivery or other entities. It defines a Site as a convenience class that allows to easily refer to places important to other entities, where a geographic place is the entity that can answer the question “where?”, allowing to determine where things are in relation to the earth\'s surface, and can be represented either in a textual structured way (geographic address) or as a geometry referred to a spatial reference system (geographic location). ### Resources - GeographicSite - Hub ### Operations Geographic Site API performs the following operations : - Retrieve a geographic site or a collection of geographic sites - Create a new site - Update a geographic site - Delete a geographic site - Notify events on geographic site Copyright © TM Forum 2021. All Rights Reserved + * + * The version of the OpenAPI document: 5.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +/** + * Base schema for adressable entities + */ +export interface Addressable { + /** + * Hyperlink reference + */ + href: string; + /** + * unique identifier + */ + id: string; +} + diff --git a/src/app/openApis/geographicSiteManagement/model/baseEvent.ts b/src/app/openApis/geographicSiteManagement/model/baseEvent.ts new file mode 100644 index 0000000..804ebf6 --- /dev/null +++ b/src/app/openApis/geographicSiteManagement/model/baseEvent.ts @@ -0,0 +1,54 @@ +/** + * Geographic Site Management + * ** TMF API Reference : TMF 674 - Place - Geographic Site Management ### August 2021 This API covers the operations to manage (create, read, delete) sites that can be associated to a customer, an account, a service delivery or other entities. It defines a Site as a convenience class that allows to easily refer to places important to other entities, where a geographic place is the entity that can answer the question “where?”, allowing to determine where things are in relation to the earth\'s surface, and can be represented either in a textual structured way (geographic address) or as a geometry referred to a spatial reference system (geographic location). ### Resources - GeographicSite - Hub ### Operations Geographic Site API performs the following operations : - Retrieve a geographic site or a collection of geographic sites - Create a new site - Update a geographic site - Delete a geographic site - Notify events on geographic site Copyright © TM Forum 2021. All Rights Reserved + * + * The version of the OpenAPI document: 5.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +import { Entity } from './entity'; + + +export interface BaseEvent extends Entity { + event?: object; + /** + * The identifier of the notification. + */ + eventId?: string; + /** + * Time of the event occurrence. + */ + eventTime?: string; + /** + * The type of the notification. + */ + eventType?: string; + /** + * The correlation id for this event. + */ + correlationId?: string; + /** + * The domain of the event. + */ + domain?: string; + /** + * The title of the event. + */ + title?: string; + /** + * An explanatory of the event. + */ + description?: string; + /** + * A priority. + */ + priority?: string; + /** + * The time the event occured. + */ + timeOcurred?: string; +} + diff --git a/src/app/openApis/geographicSiteManagement/model/calendarPeriod.ts b/src/app/openApis/geographicSiteManagement/model/calendarPeriod.ts new file mode 100644 index 0000000..4ace0f0 --- /dev/null +++ b/src/app/openApis/geographicSiteManagement/model/calendarPeriod.ts @@ -0,0 +1,50 @@ +/** + * Geographic Site Management + * ** TMF API Reference : TMF 674 - Place - Geographic Site Management ### August 2021 This API covers the operations to manage (create, read, delete) sites that can be associated to a customer, an account, a service delivery or other entities. It defines a Site as a convenience class that allows to easily refer to places important to other entities, where a geographic place is the entity that can answer the question “where?”, allowing to determine where things are in relation to the earth\'s surface, and can be represented either in a textual structured way (geographic address) or as a geometry referred to a spatial reference system (geographic location). ### Resources - GeographicSite - Hub ### Operations Geographic Site API performs the following operations : - Retrieve a geographic site or a collection of geographic sites - Create a new site - Update a geographic site - Delete a geographic site - Notify events on geographic site Copyright © TM Forum 2021. All Rights Reserved + * + * The version of the OpenAPI document: 5.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +import { HourPeriod } from './hourPeriod'; + + +export interface CalendarPeriod { + /** + * A URI to a JSON-Schema file that defines additional attributes and relationships + */ + schemaLocation?: string; + /** + * When sub-classing, this defines the super-class + */ + baseType?: string; + /** + * When sub-classing, this defines the sub-class Extensible name + */ + type?: string; + /** + * Hyperlink reference to the calendar period + */ + href?: string; + /** + * unique identifier of the calendar period + */ + id?: string; + /** + * Day where the calendar status applies (e.g.: monday, mon-to-fri, weekdays, weekend, all week, ...) + */ + day?: string; + /** + * Indication of the timezone applicable to the calendar information (e.g.: Paris, GMT+1) + */ + timeZone?: string; + hourPeriod?: Array; + /** + * Indication of the availability of the caledar period (e.g.: available, booked, etc.) + */ + status: string; +} + diff --git a/src/app/openApis/geographicSiteManagement/model/entity.ts b/src/app/openApis/geographicSiteManagement/model/entity.ts new file mode 100644 index 0000000..c88a2e8 --- /dev/null +++ b/src/app/openApis/geographicSiteManagement/model/entity.ts @@ -0,0 +1,36 @@ +/** + * Geographic Site Management + * ** TMF API Reference : TMF 674 - Place - Geographic Site Management ### August 2021 This API covers the operations to manage (create, read, delete) sites that can be associated to a customer, an account, a service delivery or other entities. It defines a Site as a convenience class that allows to easily refer to places important to other entities, where a geographic place is the entity that can answer the question “where?”, allowing to determine where things are in relation to the earth\'s surface, and can be represented either in a textual structured way (geographic address) or as a geometry referred to a spatial reference system (geographic location). ### Resources - GeographicSite - Hub ### Operations Geographic Site API performs the following operations : - Retrieve a geographic site or a collection of geographic sites - Create a new site - Update a geographic site - Delete a geographic site - Notify events on geographic site Copyright © TM Forum 2021. All Rights Reserved + * + * The version of the OpenAPI document: 5.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +export interface Entity { + /** + * Hyperlink reference + */ + href: string; + /** + * unique identifier + */ + id: string; + /** + * When sub-classing, this defines the sub-class Extensible name + */ + type: string; + /** + * When sub-classing, this defines the super-class + */ + baseType?: string; + /** + * A URI to a JSON-Schema file that defines additional attributes and relationships + */ + schemaLocation?: string; +} + diff --git a/src/app/openApis/geographicSiteManagement/model/entityRef.ts b/src/app/openApis/geographicSiteManagement/model/entityRef.ts new file mode 100644 index 0000000..a6cae93 --- /dev/null +++ b/src/app/openApis/geographicSiteManagement/model/entityRef.ts @@ -0,0 +1,23 @@ +/** + * Geographic Site Management + * ** TMF API Reference : TMF 674 - Place - Geographic Site Management ### August 2021 This API covers the operations to manage (create, read, delete) sites that can be associated to a customer, an account, a service delivery or other entities. It defines a Site as a convenience class that allows to easily refer to places important to other entities, where a geographic place is the entity that can answer the question “where?”, allowing to determine where things are in relation to the earth\'s surface, and can be represented either in a textual structured way (geographic address) or as a geometry referred to a spatial reference system (geographic location). ### Resources - GeographicSite - Hub ### Operations Geographic Site API performs the following operations : - Retrieve a geographic site or a collection of geographic sites - Create a new site - Update a geographic site - Delete a geographic site - Notify events on geographic site Copyright © TM Forum 2021. All Rights Reserved + * + * The version of the OpenAPI document: 5.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +/** + * Entity reference schema to be use for all entityRef class. + */ +export interface EntityRef { + /** + * Hyperlink reference + */ + href?: string; +} + diff --git a/src/app/openApis/geographicSiteManagement/model/eventSubscription.ts b/src/app/openApis/geographicSiteManagement/model/eventSubscription.ts new file mode 100644 index 0000000..a48d8ef --- /dev/null +++ b/src/app/openApis/geographicSiteManagement/model/eventSubscription.ts @@ -0,0 +1,31 @@ +/** + * Geographic Site Management + * ** TMF API Reference : TMF 674 - Place - Geographic Site Management ### August 2021 This API covers the operations to manage (create, read, delete) sites that can be associated to a customer, an account, a service delivery or other entities. It defines a Site as a convenience class that allows to easily refer to places important to other entities, where a geographic place is the entity that can answer the question “where?”, allowing to determine where things are in relation to the earth\'s surface, and can be represented either in a textual structured way (geographic address) or as a geometry referred to a spatial reference system (geographic location). ### Resources - GeographicSite - Hub ### Operations Geographic Site API performs the following operations : - Retrieve a geographic site or a collection of geographic sites - Create a new site - Update a geographic site - Delete a geographic site - Notify events on geographic site Copyright © TM Forum 2021. All Rights Reserved + * + * The version of the OpenAPI document: 5.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +/** + * Sets the communication endpoint address the service instance must use to deliver notification information + */ +export interface EventSubscription { + /** + * Id of the listener + */ + id: string; + /** + * The callback being registered. + */ + callback: string; + /** + * additional data to be passed + */ + query?: string; +} + diff --git a/src/app/openApis/geographicSiteManagement/model/eventSubscriptionInput.ts b/src/app/openApis/geographicSiteManagement/model/eventSubscriptionInput.ts new file mode 100644 index 0000000..cbd0443 --- /dev/null +++ b/src/app/openApis/geographicSiteManagement/model/eventSubscriptionInput.ts @@ -0,0 +1,27 @@ +/** + * Geographic Site Management + * ** TMF API Reference : TMF 674 - Place - Geographic Site Management ### August 2021 This API covers the operations to manage (create, read, delete) sites that can be associated to a customer, an account, a service delivery or other entities. It defines a Site as a convenience class that allows to easily refer to places important to other entities, where a geographic place is the entity that can answer the question “where?”, allowing to determine where things are in relation to the earth\'s surface, and can be represented either in a textual structured way (geographic address) or as a geometry referred to a spatial reference system (geographic location). ### Resources - GeographicSite - Hub ### Operations Geographic Site API performs the following operations : - Retrieve a geographic site or a collection of geographic sites - Create a new site - Update a geographic site - Delete a geographic site - Notify events on geographic site Copyright © TM Forum 2021. All Rights Reserved + * + * The version of the OpenAPI document: 5.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +/** + * Sets the communication endpoint address the service instance must use to deliver notification information + */ +export interface EventSubscriptionInput { + /** + * The callback being registered. + */ + callback: string; + /** + * additional data to be passed + */ + query?: string; +} + diff --git a/src/app/openApis/geographicSiteManagement/model/extensible.ts b/src/app/openApis/geographicSiteManagement/model/extensible.ts new file mode 100644 index 0000000..d8edcc3 --- /dev/null +++ b/src/app/openApis/geographicSiteManagement/model/extensible.ts @@ -0,0 +1,31 @@ +/** + * Geographic Site Management + * ** TMF API Reference : TMF 674 - Place - Geographic Site Management ### August 2021 This API covers the operations to manage (create, read, delete) sites that can be associated to a customer, an account, a service delivery or other entities. It defines a Site as a convenience class that allows to easily refer to places important to other entities, where a geographic place is the entity that can answer the question “where?”, allowing to determine where things are in relation to the earth\'s surface, and can be represented either in a textual structured way (geographic address) or as a geometry referred to a spatial reference system (geographic location). ### Resources - GeographicSite - Hub ### Operations Geographic Site API performs the following operations : - Retrieve a geographic site or a collection of geographic sites - Create a new site - Update a geographic site - Delete a geographic site - Notify events on geographic site Copyright © TM Forum 2021. All Rights Reserved + * + * The version of the OpenAPI document: 5.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +/** + * Base Extensible schema for use in TMForum Open-APIs - When used for in a schema it means that the Entity described by the schema MUST be extended with the @type + */ +export interface Extensible { + /** + * When sub-classing, this defines the sub-class Extensible name + */ + type: string; + /** + * When sub-classing, this defines the super-class + */ + baseType?: string; + /** + * A URI to a JSON-Schema file that defines additional attributes and relationships + */ + schemaLocation?: string; +} + diff --git a/src/app/openApis/geographicSiteManagement/model/externalIdentifier.ts b/src/app/openApis/geographicSiteManagement/model/externalIdentifier.ts new file mode 100644 index 0000000..bcb5ee5 --- /dev/null +++ b/src/app/openApis/geographicSiteManagement/model/externalIdentifier.ts @@ -0,0 +1,40 @@ +/** + * Geographic Site Management + * ** TMF API Reference : TMF 674 - Place - Geographic Site Management ### August 2021 This API covers the operations to manage (create, read, delete) sites that can be associated to a customer, an account, a service delivery or other entities. It defines a Site as a convenience class that allows to easily refer to places important to other entities, where a geographic place is the entity that can answer the question “where?”, allowing to determine where things are in relation to the earth\'s surface, and can be represented either in a textual structured way (geographic address) or as a geometry referred to a spatial reference system (geographic location). ### Resources - GeographicSite - Hub ### Operations Geographic Site API performs the following operations : - Retrieve a geographic site or a collection of geographic sites - Create a new site - Update a geographic site - Delete a geographic site - Notify events on geographic site Copyright © TM Forum 2021. All Rights Reserved + * + * The version of the OpenAPI document: 5.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +export interface ExternalIdentifier { + /** + * A URI to a JSON-Schema file that defines additional attributes and relationships + */ + schemaLocation?: string; + /** + * When sub-classing, this defines the super-class + */ + baseType?: string; + /** + * When sub-classing, this defines the sub-class Extensible name + */ + type?: string; + /** + * Name of the external system that owns the entity. + */ + owner?: string; + /** + * Type of the identification, typically would be the type of the entity within the external system + */ + externalIdentifierType?: string; + /** + * identification of the entity within the external system. + */ + id: string; +} + diff --git a/src/app/openApis/geographicSiteManagement/model/geographicAddressValue.ts b/src/app/openApis/geographicSiteManagement/model/geographicAddressValue.ts new file mode 100644 index 0000000..707ed19 --- /dev/null +++ b/src/app/openApis/geographicSiteManagement/model/geographicAddressValue.ts @@ -0,0 +1,79 @@ +/** + * Geographic Site Management + * ** TMF API Reference : TMF 674 - Place - Geographic Site Management ### August 2021 This API covers the operations to manage (create, read, delete) sites that can be associated to a customer, an account, a service delivery or other entities. It defines a Site as a convenience class that allows to easily refer to places important to other entities, where a geographic place is the entity that can answer the question “where?”, allowing to determine where things are in relation to the earth\'s surface, and can be represented either in a textual structured way (geographic address) or as a geometry referred to a spatial reference system (geographic location). ### Resources - GeographicSite - Hub ### Operations Geographic Site API performs the following operations : - Retrieve a geographic site or a collection of geographic sites - Create a new site - Update a geographic site - Delete a geographic site - Notify events on geographic site Copyright © TM Forum 2021. All Rights Reserved + * + * The version of the OpenAPI document: 5.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +import { PlaceRefOrValue } from './placeRefOrValue'; +import { GeographicSubAddressValue } from './geographicSubAddressValue'; + + +export interface GeographicAddressValue extends PlaceRefOrValue { + /** + * When sub-classing, this defines the sub-class Extensible name + */ + type: string; + /** + * When sub-classing, this defines the super-class + */ + baseType?: string; + /** + * A URI to a JSON-Schema file that defines additional attributes and relationships + */ + schemaLocation?: string; + /** + * An area of defined or undefined boundaries within a local authority or other legislatively defined area, usually rural or semi rural in nature. [ANZLIC-STREET], or a suburb, a bounded locality within a city, town or shire principally of urban character [ANZLICSTREET] + */ + locality?: string; + /** + * descriptor for a postal delivery area, used to speed and simplify the delivery of mail (also know as zipcode) + */ + postcode?: string; + /** + * the State or Province that the address is in + */ + stateOrProvince?: string; + /** + * Number identifying a specific property on a public street. It may be combined with streetNrLast for ranged addresses + */ + streetNr?: string; + /** + * Last number in a range of street numbers allocated to a property + */ + streetNrLast?: string; + /** + * Last street number suffix for a ranged address + */ + streetNrLastSuffix?: string; + /** + * the first street number suffix + */ + streetNrSuffix?: string; + /** + * A modifier denoting a relative direction + */ + streetSuffix?: string; + /** + * alley, avenue, boulevard, brae, crescent, drive, highway, lane, terrace, parade, place, tarn, way, wharf + */ + streetType?: string; + geographicSubAddress?: GeographicSubAddressValue; + /** + * City that the address is in + */ + city?: string; + /** + * Country that the address is in + */ + country?: string; + /** + * Name of the street or other street type + */ + streetName?: string; +} + diff --git a/src/app/openApis/geographicSiteManagement/model/geographicSite.ts b/src/app/openApis/geographicSiteManagement/model/geographicSite.ts new file mode 100644 index 0000000..839243a --- /dev/null +++ b/src/app/openApis/geographicSiteManagement/model/geographicSite.ts @@ -0,0 +1,43 @@ +/** + * Geographic Site Management + * ** TMF API Reference : TMF 674 - Place - Geographic Site Management ### August 2021 This API covers the operations to manage (create, read, delete) sites that can be associated to a customer, an account, a service delivery or other entities. It defines a Site as a convenience class that allows to easily refer to places important to other entities, where a geographic place is the entity that can answer the question “where?”, allowing to determine where things are in relation to the earth\'s surface, and can be represented either in a textual structured way (geographic address) or as a geometry referred to a spatial reference system (geographic location). ### Resources - GeographicSite - Hub ### Operations Geographic Site API performs the following operations : - Retrieve a geographic site or a collection of geographic sites - Create a new site - Update a geographic site - Delete a geographic site - Notify events on geographic site Copyright © TM Forum 2021. All Rights Reserved + * + * The version of the OpenAPI document: 5.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +import { Entity } from './entity'; +import { PlaceRefOrValue } from './placeRefOrValue'; +import { ExternalIdentifier } from './externalIdentifier'; +import { CalendarPeriod } from './calendarPeriod'; +import { GeographicSiteRelationship } from './geographicSiteRelationship'; +import { RelatedParty } from './relatedParty'; + + +export interface GeographicSite extends Entity { + /** + * A code that may be used for some addressing schemes eg: [ANSI T1.253-1999] + */ + code?: string; + /** + * Date and time when the GeographicSite was created + */ + creationDate?: string; + /** + * Text describing additional information regarding the site + */ + description?: string; + /** + * The condition of the GeographicSite, such as planned, underConstruction, cancelled, active, inactive, former + */ + status?: string; + relatedParty?: Array; + externalIdentifier?: Array; + calendar?: Array; + place?: Array; + siteRelationship?: Array; +} + diff --git a/src/app/openApis/geographicSiteManagement/model/geographicSiteAttributeValueChangeEvent.ts b/src/app/openApis/geographicSiteManagement/model/geographicSiteAttributeValueChangeEvent.ts new file mode 100644 index 0000000..c7a620a --- /dev/null +++ b/src/app/openApis/geographicSiteManagement/model/geographicSiteAttributeValueChangeEvent.ts @@ -0,0 +1,19 @@ +/** + * Geographic Site Management + * ** TMF API Reference : TMF 674 - Place - Geographic Site Management ### August 2021 This API covers the operations to manage (create, read, delete) sites that can be associated to a customer, an account, a service delivery or other entities. It defines a Site as a convenience class that allows to easily refer to places important to other entities, where a geographic place is the entity that can answer the question “where?”, allowing to determine where things are in relation to the earth\'s surface, and can be represented either in a textual structured way (geographic address) or as a geometry referred to a spatial reference system (geographic location). ### Resources - GeographicSite - Hub ### Operations Geographic Site API performs the following operations : - Retrieve a geographic site or a collection of geographic sites - Create a new site - Update a geographic site - Delete a geographic site - Notify events on geographic site Copyright © TM Forum 2021. All Rights Reserved + * + * The version of the OpenAPI document: 5.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +import { BaseEvent } from './baseEvent'; +import { GeographicSiteEventPayload } from './geographicSiteEventPayload'; + + +export interface GeographicSiteAttributeValueChangeEvent extends BaseEvent { + event?: GeographicSiteEventPayload; +} + diff --git a/src/app/openApis/geographicSiteManagement/model/geographicSiteCreate.ts b/src/app/openApis/geographicSiteManagement/model/geographicSiteCreate.ts new file mode 100644 index 0000000..bdc0f2a --- /dev/null +++ b/src/app/openApis/geographicSiteManagement/model/geographicSiteCreate.ts @@ -0,0 +1,46 @@ +/** + * Geographic Site Management + * ** TMF API Reference : TMF 674 - Place - Geographic Site Management ### August 2021 This API covers the operations to manage (create, read, delete) sites that can be associated to a customer, an account, a service delivery or other entities. It defines a Site as a convenience class that allows to easily refer to places important to other entities, where a geographic place is the entity that can answer the question “where?”, allowing to determine where things are in relation to the earth\'s surface, and can be represented either in a textual structured way (geographic address) or as a geometry referred to a spatial reference system (geographic location). ### Resources - GeographicSite - Hub ### Operations Geographic Site API performs the following operations : - Retrieve a geographic site or a collection of geographic sites - Create a new site - Update a geographic site - Delete a geographic site - Notify events on geographic site Copyright © TM Forum 2021. All Rights Reserved + * + * The version of the OpenAPI document: 5.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +import { PlaceRefOrValue } from './placeRefOrValue'; +import { ExternalIdentifier } from './externalIdentifier'; +import { CalendarPeriod } from './calendarPeriod'; +import { GeographicSiteRelationship } from './geographicSiteRelationship'; +import { RelatedParty } from './relatedParty'; + + +export interface GeographicSiteCreate { + /** + * When sub-classing, this defines the sub-class Extensible name + */ + type: string; + /** + * When sub-classing, this defines the super-class + */ + baseType?: string; + /** + * A URI to a JSON-Schema file that defines additional attributes and relationships + */ + schemaLocation?: string; + /** + * A code that may be used for some addressing schemes eg: [ANSI T1.253-1999] + */ + code?: string; + /** + * Text describing additional information regarding the site + */ + description?: string; + relatedParty?: Array; + externalIdentifier?: Array; + calendar?: Array; + place?: Array; + siteRelationship?: Array; +} + diff --git a/src/app/openApis/geographicSiteManagement/model/geographicSiteCreateEvent.ts b/src/app/openApis/geographicSiteManagement/model/geographicSiteCreateEvent.ts new file mode 100644 index 0000000..5039758 --- /dev/null +++ b/src/app/openApis/geographicSiteManagement/model/geographicSiteCreateEvent.ts @@ -0,0 +1,19 @@ +/** + * Geographic Site Management + * ** TMF API Reference : TMF 674 - Place - Geographic Site Management ### August 2021 This API covers the operations to manage (create, read, delete) sites that can be associated to a customer, an account, a service delivery or other entities. It defines a Site as a convenience class that allows to easily refer to places important to other entities, where a geographic place is the entity that can answer the question “where?”, allowing to determine where things are in relation to the earth\'s surface, and can be represented either in a textual structured way (geographic address) or as a geometry referred to a spatial reference system (geographic location). ### Resources - GeographicSite - Hub ### Operations Geographic Site API performs the following operations : - Retrieve a geographic site or a collection of geographic sites - Create a new site - Update a geographic site - Delete a geographic site - Notify events on geographic site Copyright © TM Forum 2021. All Rights Reserved + * + * The version of the OpenAPI document: 5.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +import { BaseEvent } from './baseEvent'; +import { GeographicSiteEventPayload } from './geographicSiteEventPayload'; + + +export interface GeographicSiteCreateEvent extends BaseEvent { + event?: GeographicSiteEventPayload; +} + diff --git a/src/app/openApis/geographicSiteManagement/model/geographicSiteDeleteEvent.ts b/src/app/openApis/geographicSiteManagement/model/geographicSiteDeleteEvent.ts new file mode 100644 index 0000000..6dfbd17 --- /dev/null +++ b/src/app/openApis/geographicSiteManagement/model/geographicSiteDeleteEvent.ts @@ -0,0 +1,19 @@ +/** + * Geographic Site Management + * ** TMF API Reference : TMF 674 - Place - Geographic Site Management ### August 2021 This API covers the operations to manage (create, read, delete) sites that can be associated to a customer, an account, a service delivery or other entities. It defines a Site as a convenience class that allows to easily refer to places important to other entities, where a geographic place is the entity that can answer the question “where?”, allowing to determine where things are in relation to the earth\'s surface, and can be represented either in a textual structured way (geographic address) or as a geometry referred to a spatial reference system (geographic location). ### Resources - GeographicSite - Hub ### Operations Geographic Site API performs the following operations : - Retrieve a geographic site or a collection of geographic sites - Create a new site - Update a geographic site - Delete a geographic site - Notify events on geographic site Copyright © TM Forum 2021. All Rights Reserved + * + * The version of the OpenAPI document: 5.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +import { BaseEvent } from './baseEvent'; +import { GeographicSiteEventPayload } from './geographicSiteEventPayload'; + + +export interface GeographicSiteDeleteEvent extends BaseEvent { + event?: GeographicSiteEventPayload; +} + diff --git a/src/app/openApis/geographicSiteManagement/model/geographicSiteEventPayload.ts b/src/app/openApis/geographicSiteManagement/model/geographicSiteEventPayload.ts new file mode 100644 index 0000000..cbb1329 --- /dev/null +++ b/src/app/openApis/geographicSiteManagement/model/geographicSiteEventPayload.ts @@ -0,0 +1,21 @@ +/** + * Geographic Site Management + * ** TMF API Reference : TMF 674 - Place - Geographic Site Management ### August 2021 This API covers the operations to manage (create, read, delete) sites that can be associated to a customer, an account, a service delivery or other entities. It defines a Site as a convenience class that allows to easily refer to places important to other entities, where a geographic place is the entity that can answer the question “where?”, allowing to determine where things are in relation to the earth\'s surface, and can be represented either in a textual structured way (geographic address) or as a geometry referred to a spatial reference system (geographic location). ### Resources - GeographicSite - Hub ### Operations Geographic Site API performs the following operations : - Retrieve a geographic site or a collection of geographic sites - Create a new site - Update a geographic site - Delete a geographic site - Notify events on geographic site Copyright © TM Forum 2021. All Rights Reserved + * + * The version of the OpenAPI document: 5.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +import { GeographicSite } from './geographicSite'; + + +/** + * TBD + */ +export interface GeographicSiteEventPayload { + geographicSite?: GeographicSite; +} + diff --git a/src/app/openApis/geographicSiteManagement/model/geographicSiteRelationship.ts b/src/app/openApis/geographicSiteManagement/model/geographicSiteRelationship.ts new file mode 100644 index 0000000..51d60c7 --- /dev/null +++ b/src/app/openApis/geographicSiteManagement/model/geographicSiteRelationship.ts @@ -0,0 +1,46 @@ +/** + * Geographic Site Management + * ** TMF API Reference : TMF 674 - Place - Geographic Site Management ### August 2021 This API covers the operations to manage (create, read, delete) sites that can be associated to a customer, an account, a service delivery or other entities. It defines a Site as a convenience class that allows to easily refer to places important to other entities, where a geographic place is the entity that can answer the question “where?”, allowing to determine where things are in relation to the earth\'s surface, and can be represented either in a textual structured way (geographic address) or as a geometry referred to a spatial reference system (geographic location). ### Resources - GeographicSite - Hub ### Operations Geographic Site API performs the following operations : - Retrieve a geographic site or a collection of geographic sites - Create a new site - Update a geographic site - Delete a geographic site - Notify events on geographic site Copyright © TM Forum 2021. All Rights Reserved + * + * The version of the OpenAPI document: 5.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +import { TimePeriod } from './timePeriod'; + + +export interface GeographicSiteRelationship { + /** + * A URI to a JSON-Schema file that defines additional attributes and relationships + */ + schemaLocation?: string; + /** + * When sub-classing, this defines the super-class + */ + baseType?: string; + /** + * When sub-classing, this defines the sub-class Extensible name + */ + type?: string; + /** + * Reference of the related geographic site + */ + href?: string; + /** + * Role of the related site in the relationship + */ + role?: string; + validFor?: TimePeriod; + /** + * Unique identifier of the related site entity within the server + */ + id: string; + /** + * Type of relationship + */ + relationshipType: string; +} + diff --git a/src/app/openApis/geographicSiteManagement/model/geographicSiteStateChangeEvent.ts b/src/app/openApis/geographicSiteManagement/model/geographicSiteStateChangeEvent.ts new file mode 100644 index 0000000..81f052e --- /dev/null +++ b/src/app/openApis/geographicSiteManagement/model/geographicSiteStateChangeEvent.ts @@ -0,0 +1,19 @@ +/** + * Geographic Site Management + * ** TMF API Reference : TMF 674 - Place - Geographic Site Management ### August 2021 This API covers the operations to manage (create, read, delete) sites that can be associated to a customer, an account, a service delivery or other entities. It defines a Site as a convenience class that allows to easily refer to places important to other entities, where a geographic place is the entity that can answer the question “where?”, allowing to determine where things are in relation to the earth\'s surface, and can be represented either in a textual structured way (geographic address) or as a geometry referred to a spatial reference system (geographic location). ### Resources - GeographicSite - Hub ### Operations Geographic Site API performs the following operations : - Retrieve a geographic site or a collection of geographic sites - Create a new site - Update a geographic site - Delete a geographic site - Notify events on geographic site Copyright © TM Forum 2021. All Rights Reserved + * + * The version of the OpenAPI document: 5.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +import { BaseEvent } from './baseEvent'; +import { GeographicSiteEventPayload } from './geographicSiteEventPayload'; + + +export interface GeographicSiteStateChangeEvent extends BaseEvent { + event?: GeographicSiteEventPayload; +} + diff --git a/src/app/openApis/geographicSiteManagement/model/geographicSiteUpdate.ts b/src/app/openApis/geographicSiteManagement/model/geographicSiteUpdate.ts new file mode 100644 index 0000000..ee939bd --- /dev/null +++ b/src/app/openApis/geographicSiteManagement/model/geographicSiteUpdate.ts @@ -0,0 +1,54 @@ +/** + * Geographic Site Management + * ** TMF API Reference : TMF 674 - Place - Geographic Site Management ### August 2021 This API covers the operations to manage (create, read, delete) sites that can be associated to a customer, an account, a service delivery or other entities. It defines a Site as a convenience class that allows to easily refer to places important to other entities, where a geographic place is the entity that can answer the question “where?”, allowing to determine where things are in relation to the earth\'s surface, and can be represented either in a textual structured way (geographic address) or as a geometry referred to a spatial reference system (geographic location). ### Resources - GeographicSite - Hub ### Operations Geographic Site API performs the following operations : - Retrieve a geographic site or a collection of geographic sites - Create a new site - Update a geographic site - Delete a geographic site - Notify events on geographic site Copyright © TM Forum 2021. All Rights Reserved + * + * The version of the OpenAPI document: 5.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +import { PlaceRefOrValue } from './placeRefOrValue'; +import { ExternalIdentifier } from './externalIdentifier'; +import { CalendarPeriod } from './calendarPeriod'; +import { GeographicSiteRelationship } from './geographicSiteRelationship'; +import { RelatedParty } from './relatedParty'; + + +export interface GeographicSiteUpdate { + /** + * When sub-classing, this defines the sub-class Extensible name + */ + type: string; + /** + * When sub-classing, this defines the super-class + */ + baseType?: string; + /** + * A URI to a JSON-Schema file that defines additional attributes and relationships + */ + schemaLocation?: string; + /** + * A code that may be used for some addressing schemes eg: [ANSI T1.253-1999] + */ + code?: string; + /** + * Date and time when the GeographicSite was created + */ + creationDate?: string; + /** + * Text describing additional information regarding the site + */ + description?: string; + /** + * The condition of the GeographicSite, such as planned, underConstruction, cancelled, active, inactive, former + */ + status?: string; + relatedParty?: Array; + externalIdentifier?: Array; + calendar?: Array; + place?: Array; + siteRelationship?: Array; +} + diff --git a/src/app/openApis/geographicSiteManagement/model/geographicSubAddressUnit.ts b/src/app/openApis/geographicSiteManagement/model/geographicSubAddressUnit.ts new file mode 100644 index 0000000..928ea26 --- /dev/null +++ b/src/app/openApis/geographicSiteManagement/model/geographicSubAddressUnit.ts @@ -0,0 +1,36 @@ +/** + * Geographic Site Management + * ** TMF API Reference : TMF 674 - Place - Geographic Site Management ### August 2021 This API covers the operations to manage (create, read, delete) sites that can be associated to a customer, an account, a service delivery or other entities. It defines a Site as a convenience class that allows to easily refer to places important to other entities, where a geographic place is the entity that can answer the question “where?”, allowing to determine where things are in relation to the earth\'s surface, and can be represented either in a textual structured way (geographic address) or as a geometry referred to a spatial reference system (geographic location). ### Resources - GeographicSite - Hub ### Operations Geographic Site API performs the following operations : - Retrieve a geographic site or a collection of geographic sites - Create a new site - Update a geographic site - Delete a geographic site - Notify events on geographic site Copyright © TM Forum 2021. All Rights Reserved + * + * The version of the OpenAPI document: 5.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +export interface GeographicSubAddressUnit { + /** + * A URI to a JSON-Schema file that defines additional attributes and relationships + */ + schemaLocation?: string; + /** + * When sub-classing, this defines the super-class + */ + baseType?: string; + /** + * When sub-classing, this defines the sub-class Extensible name + */ + type?: string; + /** + * The discriminator used for the subunit, often just a simple number but may also be a range. + */ + subUnitNumber: string; + /** + * The type of subunit e.g.BERTH, FLAT, PIER, SUITE, SHOP, TOWER, UNIT, WHARF, RACK + */ + subUnitType: string; +} + diff --git a/src/app/openApis/geographicSiteManagement/model/geographicSubAddressValue.ts b/src/app/openApis/geographicSiteManagement/model/geographicSubAddressValue.ts new file mode 100644 index 0000000..f6ff941 --- /dev/null +++ b/src/app/openApis/geographicSiteManagement/model/geographicSubAddressValue.ts @@ -0,0 +1,61 @@ +/** + * Geographic Site Management + * ** TMF API Reference : TMF 674 - Place - Geographic Site Management ### August 2021 This API covers the operations to manage (create, read, delete) sites that can be associated to a customer, an account, a service delivery or other entities. It defines a Site as a convenience class that allows to easily refer to places important to other entities, where a geographic place is the entity that can answer the question “where?”, allowing to determine where things are in relation to the earth\'s surface, and can be represented either in a textual structured way (geographic address) or as a geometry referred to a spatial reference system (geographic location). ### Resources - GeographicSite - Hub ### Operations Geographic Site API performs the following operations : - Retrieve a geographic site or a collection of geographic sites - Create a new site - Update a geographic site - Delete a geographic site - Notify events on geographic site Copyright © TM Forum 2021. All Rights Reserved + * + * The version of the OpenAPI document: 5.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +import { GeographicSubAddressUnit } from './geographicSubAddressUnit'; + + +export interface GeographicSubAddressValue { + /** + * When sub-classing, this defines the sub-class Extensible name + */ + type: string; + /** + * When sub-classing, this defines the super-class + */ + baseType?: string; + /** + * A URI to a JSON-Schema file that defines additional attributes and relationships + */ + schemaLocation?: string; + /** + * allows for buildings that have well-known names + */ + buildingName?: string; + /** + * used where a level type may be repeated e.g. BASEMENT 1, BASEMENT 2 + */ + levelNumber?: string; + /** + * describes level types within a building + */ + levelType?: string; + /** + * Name of the subAddress to identify it with a meaningful identification + */ + name?: string; + /** + * private streets internal to a property (e.g. a university) may have internal names that are not recorded by the land title office. + */ + privateStreetName?: string; + /** + * private streets numbers internal to a private street + */ + privateStreetNumber?: string; + /** + * Representation of a SubUnit. It is used for describing subunit within a subAddress e.g. BERTH, FLAT, PIER, SUITE, SHOP, TOWER, UNIT, WHARF. + */ + subUnit?: Array; + /** + * Type of subAddress : it can be a subunit or a private street + */ + subAddressType?: string; +} + diff --git a/src/app/openApis/geographicSiteManagement/model/hourPeriod.ts b/src/app/openApis/geographicSiteManagement/model/hourPeriod.ts new file mode 100644 index 0000000..c04b95c --- /dev/null +++ b/src/app/openApis/geographicSiteManagement/model/hourPeriod.ts @@ -0,0 +1,36 @@ +/** + * Geographic Site Management + * ** TMF API Reference : TMF 674 - Place - Geographic Site Management ### August 2021 This API covers the operations to manage (create, read, delete) sites that can be associated to a customer, an account, a service delivery or other entities. It defines a Site as a convenience class that allows to easily refer to places important to other entities, where a geographic place is the entity that can answer the question “where?”, allowing to determine where things are in relation to the earth\'s surface, and can be represented either in a textual structured way (geographic address) or as a geometry referred to a spatial reference system (geographic location). ### Resources - GeographicSite - Hub ### Operations Geographic Site API performs the following operations : - Retrieve a geographic site or a collection of geographic sites - Create a new site - Update a geographic site - Delete a geographic site - Notify events on geographic site Copyright © TM Forum 2021. All Rights Reserved + * + * The version of the OpenAPI document: 5.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +export interface HourPeriod { + /** + * A URI to a JSON-Schema file that defines additional attributes and relationships + */ + schemaLocation?: string; + /** + * When sub-classing, this defines the super-class + */ + baseType?: string; + /** + * When sub-classing, this defines the sub-class Extensible name + */ + type?: string; + /** + * The time when the status ends applying + */ + endHour?: string; + /** + * The time when the status starts applying + */ + startHour?: string; +} + diff --git a/src/app/openApis/geographicSiteManagement/model/jsonPatch.ts b/src/app/openApis/geographicSiteManagement/model/jsonPatch.ts new file mode 100644 index 0000000..8da852c --- /dev/null +++ b/src/app/openApis/geographicSiteManagement/model/jsonPatch.ts @@ -0,0 +1,47 @@ +/** + * Geographic Site Management + * ** TMF API Reference : TMF 674 - Place - Geographic Site Management ### August 2021 This API covers the operations to manage (create, read, delete) sites that can be associated to a customer, an account, a service delivery or other entities. It defines a Site as a convenience class that allows to easily refer to places important to other entities, where a geographic place is the entity that can answer the question “where?”, allowing to determine where things are in relation to the earth\'s surface, and can be represented either in a textual structured way (geographic address) or as a geometry referred to a spatial reference system (geographic location). ### Resources - GeographicSite - Hub ### Operations Geographic Site API performs the following operations : - Retrieve a geographic site or a collection of geographic sites - Create a new site - Update a geographic site - Delete a geographic site - Notify events on geographic site Copyright © TM Forum 2021. All Rights Reserved + * + * The version of the OpenAPI document: 5.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +/** + * A JSONPatch document as defined by RFC 6902 + */ +export interface JsonPatch { + /** + * The operation to be performed + */ + op: JsonPatch.OpEnum; + /** + * A JSON-Pointer + */ + path: string; + /** + * The value to be used within the operations. + */ + value?: object; + /** + * A string containing a JSON Pointer value. + */ + from?: string; +} +export namespace JsonPatch { + export type OpEnum = 'add' | 'remove' | 'replace' | 'move' | 'copy' | 'test'; + export const OpEnum = { + Add: 'add' as OpEnum, + Remove: 'remove' as OpEnum, + Replace: 'replace' as OpEnum, + Move: 'move' as OpEnum, + Copy: 'copy' as OpEnum, + Test: 'test' as OpEnum + }; +} + + diff --git a/src/app/openApis/geographicSiteManagement/model/modelError.ts b/src/app/openApis/geographicSiteManagement/model/modelError.ts new file mode 100644 index 0000000..348ff2e --- /dev/null +++ b/src/app/openApis/geographicSiteManagement/model/modelError.ts @@ -0,0 +1,51 @@ +/** + * Geographic Site Management + * ** TMF API Reference : TMF 674 - Place - Geographic Site Management ### August 2021 This API covers the operations to manage (create, read, delete) sites that can be associated to a customer, an account, a service delivery or other entities. It defines a Site as a convenience class that allows to easily refer to places important to other entities, where a geographic place is the entity that can answer the question “where?”, allowing to determine where things are in relation to the earth\'s surface, and can be represented either in a textual structured way (geographic address) or as a geometry referred to a spatial reference system (geographic location). ### Resources - GeographicSite - Hub ### Operations Geographic Site API performs the following operations : - Retrieve a geographic site or a collection of geographic sites - Create a new site - Update a geographic site - Delete a geographic site - Notify events on geographic site Copyright © TM Forum 2021. All Rights Reserved + * + * The version of the OpenAPI document: 5.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +/** + * Used when an API throws an Error, typically with a HTTP error response-code (3xx, 4xx, 5xx) + */ +export interface ModelError { + /** + * When sub-classing, this defines the sub-class Extensible name + */ + type: string; + /** + * When sub-classing, this defines the super-class + */ + baseType?: string; + /** + * A URI to a JSON-Schema file that defines additional attributes and relationships + */ + schemaLocation?: string; + /** + * Application relevant detail, defined in the API or a common list. + */ + code: string; + /** + * Explanation of the reason for the error which can be shown to a client user. + */ + reason: string; + /** + * More details and corrective actions related to the error which can be shown to a client user. + */ + message?: string; + /** + * HTTP Error code extension + */ + status?: string; + /** + * URI of documentation describing the error. + */ + referenceError?: string; +} + diff --git a/src/app/openApis/geographicSiteManagement/model/models.ts b/src/app/openApis/geographicSiteManagement/model/models.ts new file mode 100644 index 0000000..2690ac7 --- /dev/null +++ b/src/app/openApis/geographicSiteManagement/model/models.ts @@ -0,0 +1,31 @@ +export * from './addressable'; +export * from './baseEvent'; +export * from './calendarPeriod'; +export * from './entity'; +export * from './entityRef'; +export * from './eventSubscription'; +export * from './eventSubscriptionInput'; +export * from './extensible'; +export * from './externalIdentifier'; +export * from './geographicAddressValue'; +export * from './geographicSite'; +export * from './geographicSiteAttributeValueChangeEvent'; +export * from './geographicSiteCreate'; +export * from './geographicSiteCreateEvent'; +export * from './geographicSiteDeleteEvent'; +export * from './geographicSiteEventPayload'; +export * from './geographicSiteRelationship'; +export * from './geographicSiteStateChangeEvent'; +export * from './geographicSiteUpdate'; +export * from './geographicSubAddressUnit'; +export * from './geographicSubAddressValue'; +export * from './hourPeriod'; +export * from './jsonPatch'; +export * from './modelError'; +export * from './patchGeographicSite200Response'; +export * from './placeRef'; +export * from './placeRefOrValue'; +export * from './reference'; +export * from './relatedParty'; +export * from './schemaContext'; +export * from './timePeriod'; diff --git a/src/app/openApis/geographicSiteManagement/model/patchGeographicSite200Response.ts b/src/app/openApis/geographicSiteManagement/model/patchGeographicSite200Response.ts new file mode 100644 index 0000000..befcaa6 --- /dev/null +++ b/src/app/openApis/geographicSiteManagement/model/patchGeographicSite200Response.ts @@ -0,0 +1,25 @@ +/** + * Geographic Site Management + * ** TMF API Reference : TMF 674 - Place - Geographic Site Management ### August 2021 This API covers the operations to manage (create, read, delete) sites that can be associated to a customer, an account, a service delivery or other entities. It defines a Site as a convenience class that allows to easily refer to places important to other entities, where a geographic place is the entity that can answer the question “where?”, allowing to determine where things are in relation to the earth\'s surface, and can be represented either in a textual structured way (geographic address) or as a geometry referred to a spatial reference system (geographic location). ### Resources - GeographicSite - Hub ### Operations Geographic Site API performs the following operations : - Retrieve a geographic site or a collection of geographic sites - Create a new site - Update a geographic site - Delete a geographic site - Notify events on geographic site Copyright © TM Forum 2021. All Rights Reserved + * + * The version of the OpenAPI document: 5.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +import { PlaceRefOrValue } from './placeRefOrValue'; +import { ExternalIdentifier } from './externalIdentifier'; +import { CalendarPeriod } from './calendarPeriod'; +import { GeographicSiteRelationship } from './geographicSiteRelationship'; +import { RelatedParty } from './relatedParty'; +import { GeographicSite } from './geographicSite'; + + +/** + * @type PatchGeographicSite200Response + * @export + */ +export type PatchGeographicSite200Response = Array | GeographicSite | string; + diff --git a/src/app/openApis/geographicSiteManagement/model/placeRef.ts b/src/app/openApis/geographicSiteManagement/model/placeRef.ts new file mode 100644 index 0000000..cb57173 --- /dev/null +++ b/src/app/openApis/geographicSiteManagement/model/placeRef.ts @@ -0,0 +1,45 @@ +/** + * Geographic Site Management + * ** TMF API Reference : TMF 674 - Place - Geographic Site Management ### August 2021 This API covers the operations to manage (create, read, delete) sites that can be associated to a customer, an account, a service delivery or other entities. It defines a Site as a convenience class that allows to easily refer to places important to other entities, where a geographic place is the entity that can answer the question “where?”, allowing to determine where things are in relation to the earth\'s surface, and can be represented either in a textual structured way (geographic address) or as a geometry referred to a spatial reference system (geographic location). ### Resources - GeographicSite - Hub ### Operations Geographic Site API performs the following operations : - Retrieve a geographic site or a collection of geographic sites - Create a new site - Update a geographic site - Delete a geographic site - Notify events on geographic site Copyright © TM Forum 2021. All Rights Reserved + * + * The version of the OpenAPI document: 5.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +import { PlaceRefOrValue } from './placeRefOrValue'; + + +export interface PlaceRef extends PlaceRefOrValue { + /** + * Identifier of the referred entity. + */ + id: string; + /** + * Name of the referred entity. + */ + name?: string; + /** + * The actual type of the target instance when needed for disambiguation. + */ + referredType?: string; + /** + * Hyperlink reference + */ + href?: string; + /** + * A URI to a JSON-Schema file that defines additional attributes and relationships + */ + schemaLocation?: string; + /** + * When sub-classing, this defines the super-class + */ + baseType?: string; + /** + * When sub-classing, this defines the sub-class Extensible name + */ + type?: string; +} + diff --git a/src/app/openApis/geographicSiteManagement/model/placeRefOrValue.ts b/src/app/openApis/geographicSiteManagement/model/placeRefOrValue.ts new file mode 100644 index 0000000..d860763 --- /dev/null +++ b/src/app/openApis/geographicSiteManagement/model/placeRefOrValue.ts @@ -0,0 +1,28 @@ +/** + * Geographic Site Management + * ** TMF API Reference : TMF 674 - Place - Geographic Site Management ### August 2021 This API covers the operations to manage (create, read, delete) sites that can be associated to a customer, an account, a service delivery or other entities. It defines a Site as a convenience class that allows to easily refer to places important to other entities, where a geographic place is the entity that can answer the question “where?”, allowing to determine where things are in relation to the earth\'s surface, and can be represented either in a textual structured way (geographic address) or as a geometry referred to a spatial reference system (geographic location). ### Resources - GeographicSite - Hub ### Operations Geographic Site API performs the following operations : - Retrieve a geographic site or a collection of geographic sites - Create a new site - Update a geographic site - Delete a geographic site - Notify events on geographic site Copyright © TM Forum 2021. All Rights Reserved + * + * The version of the OpenAPI document: 5.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +export interface PlaceRefOrValue { + /** + * When sub-classing, this defines the sub-class Extensible name + */ + type: string; + /** + * When sub-classing, this defines the super-class + */ + baseType?: string; + /** + * A URI to a JSON-Schema file that defines additional attributes and relationships + */ + schemaLocation?: string; +} + diff --git a/src/app/openApis/geographicSiteManagement/model/reference.ts b/src/app/openApis/geographicSiteManagement/model/reference.ts new file mode 100644 index 0000000..85b52bd --- /dev/null +++ b/src/app/openApis/geographicSiteManagement/model/reference.ts @@ -0,0 +1,31 @@ +/** + * Geographic Site Management + * ** TMF API Reference : TMF 674 - Place - Geographic Site Management ### August 2021 This API covers the operations to manage (create, read, delete) sites that can be associated to a customer, an account, a service delivery or other entities. It defines a Site as a convenience class that allows to easily refer to places important to other entities, where a geographic place is the entity that can answer the question “where?”, allowing to determine where things are in relation to the earth\'s surface, and can be represented either in a textual structured way (geographic address) or as a geometry referred to a spatial reference system (geographic location). ### Resources - GeographicSite - Hub ### Operations Geographic Site API performs the following operations : - Retrieve a geographic site or a collection of geographic sites - Create a new site - Update a geographic site - Delete a geographic site - Notify events on geographic site Copyright © TM Forum 2021. All Rights Reserved + * + * The version of the OpenAPI document: 5.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +/** + * Reference schema . + */ +export interface Reference { + /** + * Identifier of the referred entity. + */ + id: string; + /** + * Name of the referred entity. + */ + name?: string; + /** + * The actual type of the target instance when needed for disambiguation. + */ + referredType?: string; +} + diff --git a/src/app/openApis/geographicSiteManagement/model/relatedParty.ts b/src/app/openApis/geographicSiteManagement/model/relatedParty.ts new file mode 100644 index 0000000..4a86c96 --- /dev/null +++ b/src/app/openApis/geographicSiteManagement/model/relatedParty.ts @@ -0,0 +1,48 @@ +/** + * Geographic Site Management + * ** TMF API Reference : TMF 674 - Place - Geographic Site Management ### August 2021 This API covers the operations to manage (create, read, delete) sites that can be associated to a customer, an account, a service delivery or other entities. It defines a Site as a convenience class that allows to easily refer to places important to other entities, where a geographic place is the entity that can answer the question “where?”, allowing to determine where things are in relation to the earth\'s surface, and can be represented either in a textual structured way (geographic address) or as a geometry referred to a spatial reference system (geographic location). ### Resources - GeographicSite - Hub ### Operations Geographic Site API performs the following operations : - Retrieve a geographic site or a collection of geographic sites - Create a new site - Update a geographic site - Delete a geographic site - Notify events on geographic site Copyright © TM Forum 2021. All Rights Reserved + * + * The version of the OpenAPI document: 5.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +export interface RelatedParty { + /** + * Identifier of the referred entity. + */ + id: string; + /** + * Name of the referred entity. + */ + name?: string; + /** + * The actual type of the target instance when needed for disambiguation. + */ + referredType: string; + /** + * Hyperlink reference + */ + href?: string; + /** + * A URI to a JSON-Schema file that defines additional attributes and relationships + */ + schemaLocation?: string; + /** + * When sub-classing, this defines the super-class + */ + baseType?: string; + /** + * When sub-classing, this defines the sub-class Extensible name + */ + type?: string; + /** + * Role played by the related party + */ + role?: string; +} + diff --git a/src/app/openApis/geographicSiteManagement/model/schemaContext.ts b/src/app/openApis/geographicSiteManagement/model/schemaContext.ts new file mode 100644 index 0000000..d0051ed --- /dev/null +++ b/src/app/openApis/geographicSiteManagement/model/schemaContext.ts @@ -0,0 +1,31 @@ +/** + * Geographic Site Management + * ** TMF API Reference : TMF 674 - Place - Geographic Site Management ### August 2021 This API covers the operations to manage (create, read, delete) sites that can be associated to a customer, an account, a service delivery or other entities. It defines a Site as a convenience class that allows to easily refer to places important to other entities, where a geographic place is the entity that can answer the question “where?”, allowing to determine where things are in relation to the earth\'s surface, and can be represented either in a textual structured way (geographic address) or as a geometry referred to a spatial reference system (geographic location). ### Resources - GeographicSite - Hub ### Operations Geographic Site API performs the following operations : - Retrieve a geographic site or a collection of geographic sites - Create a new site - Update a geographic site - Delete a geographic site - Notify events on geographic site Copyright © TM Forum 2021. All Rights Reserved + * + * The version of the OpenAPI document: 5.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +/** + * SchemaContext schema for use in TMForum Open-APIs + */ +export interface SchemaContext { + /** + * A URI to a JSON-Schema file that defines additional attributes and relationships + */ + schemaLocation?: string; + /** + * When sub-classing, this defines the super-class + */ + baseType?: string; + /** + * When sub-classing, this defines the sub-class Extensible name + */ + type?: string; +} + diff --git a/src/app/openApis/geographicSiteManagement/model/timePeriod.ts b/src/app/openApis/geographicSiteManagement/model/timePeriod.ts new file mode 100644 index 0000000..fd39639 --- /dev/null +++ b/src/app/openApis/geographicSiteManagement/model/timePeriod.ts @@ -0,0 +1,27 @@ +/** + * Geographic Site Management + * ** TMF API Reference : TMF 674 - Place - Geographic Site Management ### August 2021 This API covers the operations to manage (create, read, delete) sites that can be associated to a customer, an account, a service delivery or other entities. It defines a Site as a convenience class that allows to easily refer to places important to other entities, where a geographic place is the entity that can answer the question “where?”, allowing to determine where things are in relation to the earth\'s surface, and can be represented either in a textual structured way (geographic address) or as a geometry referred to a spatial reference system (geographic location). ### Resources - GeographicSite - Hub ### Operations Geographic Site API performs the following operations : - Retrieve a geographic site or a collection of geographic sites - Create a new site - Update a geographic site - Delete a geographic site - Notify events on geographic site Copyright © TM Forum 2021. All Rights Reserved + * + * The version of the OpenAPI document: 5.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ + + +/** + * A period of time, either as a deadline (endDateTime only) a startDateTime only, or both + */ +export interface TimePeriod { + /** + * Start of the time period, using IETC-RFC-3339 format + */ + startDateTime?: string; + /** + * End of the time period, using IETC-RFC-3339 format + */ + endDateTime?: string; +} + diff --git a/src/app/openApis/geographicSiteManagement/param.ts b/src/app/openApis/geographicSiteManagement/param.ts new file mode 100644 index 0000000..78a2d20 --- /dev/null +++ b/src/app/openApis/geographicSiteManagement/param.ts @@ -0,0 +1,69 @@ +/** + * Standard parameter styles defined by OpenAPI spec + */ +export type StandardParamStyle = + | 'matrix' + | 'label' + | 'form' + | 'simple' + | 'spaceDelimited' + | 'pipeDelimited' + | 'deepObject' + ; + +/** + * The OpenAPI standard {@link StandardParamStyle}s may be extended by custom styles by the user. + */ +export type ParamStyle = StandardParamStyle | string; + +/** + * Standard parameter locations defined by OpenAPI spec + */ +export type ParamLocation = 'query' | 'header' | 'path' | 'cookie'; + +/** + * Standard types as defined in OpenAPI Specification: Data Types + */ +export type StandardDataType = + | "integer" + | "number" + | "boolean" + | "string" + | "object" + | "array" + ; + +/** + * Standard {@link DataType}s plus your own types/classes. + */ +export type DataType = StandardDataType | string; + +/** + * Standard formats as defined in OpenAPI Specification: Data Types + */ +export type StandardDataFormat = + | "int32" + | "int64" + | "float" + | "double" + | "byte" + | "binary" + | "date" + | "date-time" + | "password" + ; + +export type DataFormat = StandardDataFormat | string; + +/** + * The parameter to encode. + */ +export interface Param { + name: string; + value: unknown; + in: ParamLocation; + style: ParamStyle, + explode: boolean; + dataType: DataType; + dataFormat: DataFormat | undefined; +} diff --git a/src/app/openApis/geographicSiteManagement/services/api.ts b/src/app/openApis/geographicSiteManagement/services/api.ts new file mode 100644 index 0000000..595adf4 --- /dev/null +++ b/src/app/openApis/geographicSiteManagement/services/api.ts @@ -0,0 +1,7 @@ +export * from './eventsSubscription.service'; +import { EventsSubscriptionService } from './eventsSubscription.service'; +export * from './geographicSite.service'; +import { GeographicSiteService } from './geographicSite.service'; +export * from './notificationListener.service'; +import { NotificationListenerService } from './notificationListener.service'; +export const APIS = [EventsSubscriptionService, GeographicSiteService, NotificationListenerService]; diff --git a/src/app/openApis/geographicSiteManagement/services/eventsSubscription.service.ts b/src/app/openApis/geographicSiteManagement/services/eventsSubscription.service.ts new file mode 100644 index 0000000..2bf05ce --- /dev/null +++ b/src/app/openApis/geographicSiteManagement/services/eventsSubscription.service.ts @@ -0,0 +1,237 @@ +/** + * Geographic Site Management + * ** TMF API Reference : TMF 674 - Place - Geographic Site Management ### August 2021 This API covers the operations to manage (create, read, delete) sites that can be associated to a customer, an account, a service delivery or other entities. It defines a Site as a convenience class that allows to easily refer to places important to other entities, where a geographic place is the entity that can answer the question “where?”, allowing to determine where things are in relation to the earth\'s surface, and can be represented either in a textual structured way (geographic address) or as a geometry referred to a spatial reference system (geographic location). ### Resources - GeographicSite - Hub ### Operations Geographic Site API performs the following operations : - Retrieve a geographic site or a collection of geographic sites - Create a new site - Update a geographic site - Delete a geographic site - Notify events on geographic site Copyright © TM Forum 2021. All Rights Reserved + * + * The version of the OpenAPI document: 5.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +/* tslint:disable:no-unused-variable member-ordering */ + +import { Inject, Injectable, Optional } from '@angular/core'; +import { HttpClient, HttpHeaders, HttpParams, + HttpResponse, HttpEvent, HttpParameterCodec, HttpContext + } from '@angular/common/http'; +import { CustomHttpParameterCodec } from '../encoder'; +import { Observable } from 'rxjs'; + +// @ts-ignore +import { EventSubscription } from '../model/eventSubscription'; +// @ts-ignore +import { EventSubscriptionInput } from '../model/eventSubscriptionInput'; + +// @ts-ignore +import { BASE_PATH, COLLECTION_FORMATS } from '../variables'; +import { Configuration } from '../configuration'; + + + +@Injectable({ + providedIn: 'root' +}) +export class EventsSubscriptionService { + + protected basePath = 'https://serverRoot'; + public defaultHeaders = new HttpHeaders(); + public configuration = new Configuration(); + public encoder: HttpParameterCodec; + + constructor(protected httpClient: HttpClient, @Optional()@Inject(BASE_PATH) basePath: string|string[], @Optional() configuration: Configuration) { + if (configuration) { + this.configuration = configuration; + } + if (typeof this.configuration.basePath !== 'string') { + if (Array.isArray(basePath) && basePath.length > 0) { + basePath = basePath[0]; + } + + if (typeof basePath !== 'string') { + basePath = this.basePath; + } + this.configuration.basePath = basePath; + } + this.encoder = this.configuration.encoder || new CustomHttpParameterCodec(); + } + + + // @ts-ignore + private addToHttpParams(httpParams: HttpParams, value: any, key?: string): HttpParams { + if (typeof value === "object" && value instanceof Date === false) { + httpParams = this.addToHttpParamsRecursive(httpParams, value); + } else { + httpParams = this.addToHttpParamsRecursive(httpParams, value, key); + } + return httpParams; + } + + private addToHttpParamsRecursive(httpParams: HttpParams, value?: any, key?: string): HttpParams { + if (value == null) { + return httpParams; + } + + if (typeof value === "object") { + if (Array.isArray(value)) { + (value as any[]).forEach( elem => httpParams = this.addToHttpParamsRecursive(httpParams, elem, key)); + } else if (value instanceof Date) { + if (key != null) { + httpParams = httpParams.append(key, (value as Date).toISOString().substring(0, 10)); + } else { + throw Error("key may not be null if value is Date"); + } + } else { + Object.keys(value).forEach( k => httpParams = this.addToHttpParamsRecursive( + httpParams, value[k], key != null ? `${key}.${k}` : k)); + } + } else if (key != null) { + httpParams = httpParams.append(key, value); + } else { + throw Error("key may not be null if value is not object or array"); + } + return httpParams; + } + + /** + * Register a listener + * Sets the communication endpoint address the service instance must use to deliver information about its health state, execution state, failures and metrics. + * @param eventSubscriptionInput Data containing the callback endpoint to deliver the information + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public registerListener(eventSubscriptionInput: EventSubscriptionInput, observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json;charset=utf-8' | 'application/json', context?: HttpContext, transferCache?: boolean}): Observable; + public registerListener(eventSubscriptionInput: EventSubscriptionInput, observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json;charset=utf-8' | 'application/json', context?: HttpContext, transferCache?: boolean}): Observable>; + public registerListener(eventSubscriptionInput: EventSubscriptionInput, observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json;charset=utf-8' | 'application/json', context?: HttpContext, transferCache?: boolean}): Observable>; + public registerListener(eventSubscriptionInput: EventSubscriptionInput, observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: 'application/json;charset=utf-8' | 'application/json', context?: HttpContext, transferCache?: boolean}): Observable { + if (eventSubscriptionInput === null || eventSubscriptionInput === undefined) { + throw new Error('Required parameter eventSubscriptionInput was null or undefined when calling registerListener.'); + } + + let localVarHeaders = this.defaultHeaders; + + let localVarHttpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept; + if (localVarHttpHeaderAcceptSelected === undefined) { + // to determine the Accept header + const httpHeaderAccepts: string[] = [ + 'application/json;charset=utf-8', + 'application/json' + ]; + localVarHttpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts); + } + if (localVarHttpHeaderAcceptSelected !== undefined) { + localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected); + } + + let localVarHttpContext: HttpContext | undefined = options && options.context; + if (localVarHttpContext === undefined) { + localVarHttpContext = new HttpContext(); + } + + let localVarTransferCache: boolean | undefined = options && options.transferCache; + if (localVarTransferCache === undefined) { + localVarTransferCache = true; + } + + + // to determine the Content-Type header + const consumes: string[] = [ + 'application/json' + ]; + const httpContentTypeSelected: string | undefined = this.configuration.selectHeaderContentType(consumes); + if (httpContentTypeSelected !== undefined) { + localVarHeaders = localVarHeaders.set('Content-Type', httpContentTypeSelected); + } + + let responseType_: 'text' | 'json' | 'blob' = 'json'; + if (localVarHttpHeaderAcceptSelected) { + if (localVarHttpHeaderAcceptSelected.startsWith('text')) { + responseType_ = 'text'; + } else if (this.configuration.isJsonMime(localVarHttpHeaderAcceptSelected)) { + responseType_ = 'json'; + } else { + responseType_ = 'blob'; + } + } + + let localVarPath = `/hub`; + return this.httpClient.request('post', `${this.configuration.basePath}${localVarPath}`, + { + context: localVarHttpContext, + body: eventSubscriptionInput, + responseType: responseType_, + withCredentials: this.configuration.withCredentials, + headers: localVarHeaders, + observe: observe, + transferCache: localVarTransferCache, + reportProgress: reportProgress + } + ); + } + + /** + * Unregister a listener + * Resets the communication endpoint address the service instance must use to deliver information about its health state, execution state, failures and metrics. + * @param id Identifier of the Service + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public unregisterListener(id: string, observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable; + public unregisterListener(id: string, observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable>; + public unregisterListener(id: string, observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable>; + public unregisterListener(id: string, observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable { + if (id === null || id === undefined) { + throw new Error('Required parameter id was null or undefined when calling unregisterListener.'); + } + + let localVarHeaders = this.defaultHeaders; + + let localVarHttpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept; + if (localVarHttpHeaderAcceptSelected === undefined) { + // to determine the Accept header + const httpHeaderAccepts: string[] = [ + 'application/json' + ]; + localVarHttpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts); + } + if (localVarHttpHeaderAcceptSelected !== undefined) { + localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected); + } + + let localVarHttpContext: HttpContext | undefined = options && options.context; + if (localVarHttpContext === undefined) { + localVarHttpContext = new HttpContext(); + } + + let localVarTransferCache: boolean | undefined = options && options.transferCache; + if (localVarTransferCache === undefined) { + localVarTransferCache = true; + } + + + let responseType_: 'text' | 'json' | 'blob' = 'json'; + if (localVarHttpHeaderAcceptSelected) { + if (localVarHttpHeaderAcceptSelected.startsWith('text')) { + responseType_ = 'text'; + } else if (this.configuration.isJsonMime(localVarHttpHeaderAcceptSelected)) { + responseType_ = 'json'; + } else { + responseType_ = 'blob'; + } + } + + let localVarPath = `/hub/${this.configuration.encodeParam({name: "id", value: id, in: "path", style: "simple", explode: false, dataType: "string", dataFormat: undefined})}`; + return this.httpClient.request('delete', `${this.configuration.basePath}${localVarPath}`, + { + context: localVarHttpContext, + responseType: responseType_, + withCredentials: this.configuration.withCredentials, + headers: localVarHeaders, + observe: observe, + transferCache: localVarTransferCache, + reportProgress: reportProgress + } + ); + } + +} diff --git a/src/app/openApis/geographicSiteManagement/services/geographicSite.service.ts b/src/app/openApis/geographicSiteManagement/services/geographicSite.service.ts new file mode 100644 index 0000000..996182e --- /dev/null +++ b/src/app/openApis/geographicSiteManagement/services/geographicSite.service.ts @@ -0,0 +1,471 @@ +/** + * Geographic Site Management + * ** TMF API Reference : TMF 674 - Place - Geographic Site Management ### August 2021 This API covers the operations to manage (create, read, delete) sites that can be associated to a customer, an account, a service delivery or other entities. It defines a Site as a convenience class that allows to easily refer to places important to other entities, where a geographic place is the entity that can answer the question “where?”, allowing to determine where things are in relation to the earth\'s surface, and can be represented either in a textual structured way (geographic address) or as a geometry referred to a spatial reference system (geographic location). ### Resources - GeographicSite - Hub ### Operations Geographic Site API performs the following operations : - Retrieve a geographic site or a collection of geographic sites - Create a new site - Update a geographic site - Delete a geographic site - Notify events on geographic site Copyright © TM Forum 2021. All Rights Reserved + * + * The version of the OpenAPI document: 5.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +/* tslint:disable:no-unused-variable member-ordering */ + +import { Inject, Injectable, Optional } from '@angular/core'; +import { HttpClient, HttpHeaders, HttpParams, + HttpResponse, HttpEvent, HttpParameterCodec, HttpContext + } from '@angular/common/http'; +import { CustomHttpParameterCodec } from '../encoder'; +import { Observable } from 'rxjs'; + +// @ts-ignore +import { GeographicSite } from '../model/geographicSite'; +// @ts-ignore +import { GeographicSiteCreate } from '../model/geographicSiteCreate'; +// @ts-ignore +import { GeographicSiteUpdate } from '../model/geographicSiteUpdate'; +// @ts-ignore +import { JsonPatch } from '../model/jsonPatch'; +// @ts-ignore +import { PatchGeographicSite200Response } from '../model/patchGeographicSite200Response'; + +// @ts-ignore +import { BASE_PATH, COLLECTION_FORMATS } from '../variables'; +import { Configuration } from '../configuration'; + + + +@Injectable({ + providedIn: 'root' +}) +export class GeographicSiteService { + + protected basePath = 'https://serverRoot'; + public defaultHeaders = new HttpHeaders(); + public configuration = new Configuration(); + public encoder: HttpParameterCodec; + + constructor(protected httpClient: HttpClient, @Optional()@Inject(BASE_PATH) basePath: string|string[], @Optional() configuration: Configuration) { + if (configuration) { + this.configuration = configuration; + } + if (typeof this.configuration.basePath !== 'string') { + if (Array.isArray(basePath) && basePath.length > 0) { + basePath = basePath[0]; + } + + if (typeof basePath !== 'string') { + basePath = this.basePath; + } + this.configuration.basePath = basePath; + } + this.encoder = this.configuration.encoder || new CustomHttpParameterCodec(); + } + + + // @ts-ignore + private addToHttpParams(httpParams: HttpParams, value: any, key?: string): HttpParams { + if (typeof value === "object" && value instanceof Date === false) { + httpParams = this.addToHttpParamsRecursive(httpParams, value); + } else { + httpParams = this.addToHttpParamsRecursive(httpParams, value, key); + } + return httpParams; + } + + private addToHttpParamsRecursive(httpParams: HttpParams, value?: any, key?: string): HttpParams { + if (value == null) { + return httpParams; + } + + if (typeof value === "object") { + if (Array.isArray(value)) { + (value as any[]).forEach( elem => httpParams = this.addToHttpParamsRecursive(httpParams, elem, key)); + } else if (value instanceof Date) { + if (key != null) { + httpParams = httpParams.append(key, (value as Date).toISOString().substring(0, 10)); + } else { + throw Error("key may not be null if value is Date"); + } + } else { + Object.keys(value).forEach( k => httpParams = this.addToHttpParamsRecursive( + httpParams, value[k], key != null ? `${key}.${k}` : k)); + } + } else if (key != null) { + httpParams = httpParams.append(key, value); + } else { + throw Error("key may not be null if value is not object or array"); + } + return httpParams; + } + + /** + * Creates a GeographicSite + * This operation creates a GeographicSite entity. + * @param geographicSiteCreate The GeographicSite to be created + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public createGeographicSite(geographicSiteCreate: GeographicSiteCreate, observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable; + public createGeographicSite(geographicSiteCreate: GeographicSiteCreate, observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable>; + public createGeographicSite(geographicSiteCreate: GeographicSiteCreate, observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable>; + public createGeographicSite(geographicSiteCreate: GeographicSiteCreate, observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable { + if (geographicSiteCreate === null || geographicSiteCreate === undefined) { + throw new Error('Required parameter geographicSiteCreate was null or undefined when calling createGeographicSite.'); + } + + let localVarHeaders = this.defaultHeaders; + + let localVarHttpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept; + if (localVarHttpHeaderAcceptSelected === undefined) { + // to determine the Accept header + const httpHeaderAccepts: string[] = [ + 'application/json' + ]; + localVarHttpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts); + } + if (localVarHttpHeaderAcceptSelected !== undefined) { + localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected); + } + + let localVarHttpContext: HttpContext | undefined = options && options.context; + if (localVarHttpContext === undefined) { + localVarHttpContext = new HttpContext(); + } + + let localVarTransferCache: boolean | undefined = options && options.transferCache; + if (localVarTransferCache === undefined) { + localVarTransferCache = true; + } + + + // to determine the Content-Type header + const consumes: string[] = [ + 'application/json' + ]; + const httpContentTypeSelected: string | undefined = this.configuration.selectHeaderContentType(consumes); + if (httpContentTypeSelected !== undefined) { + localVarHeaders = localVarHeaders.set('Content-Type', httpContentTypeSelected); + } + + let responseType_: 'text' | 'json' | 'blob' = 'json'; + if (localVarHttpHeaderAcceptSelected) { + if (localVarHttpHeaderAcceptSelected.startsWith('text')) { + responseType_ = 'text'; + } else if (this.configuration.isJsonMime(localVarHttpHeaderAcceptSelected)) { + responseType_ = 'json'; + } else { + responseType_ = 'blob'; + } + } + + let localVarPath = `/geographicSite`; + return this.httpClient.request('post', `${this.configuration.basePath}${localVarPath}`, + { + context: localVarHttpContext, + body: geographicSiteCreate, + responseType: responseType_, + withCredentials: this.configuration.withCredentials, + headers: localVarHeaders, + observe: observe, + transferCache: localVarTransferCache, + reportProgress: reportProgress + } + ); + } + + /** + * Deletes a GeographicSite + * This operation deletes a GeographicSite entity. + * @param id Identifier of the Service + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public deleteGeographicSite(id: string, observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable; + public deleteGeographicSite(id: string, observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable>; + public deleteGeographicSite(id: string, observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable>; + public deleteGeographicSite(id: string, observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable { + if (id === null || id === undefined) { + throw new Error('Required parameter id was null or undefined when calling deleteGeographicSite.'); + } + + let localVarHeaders = this.defaultHeaders; + + let localVarHttpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept; + if (localVarHttpHeaderAcceptSelected === undefined) { + // to determine the Accept header + const httpHeaderAccepts: string[] = [ + 'application/json' + ]; + localVarHttpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts); + } + if (localVarHttpHeaderAcceptSelected !== undefined) { + localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected); + } + + let localVarHttpContext: HttpContext | undefined = options && options.context; + if (localVarHttpContext === undefined) { + localVarHttpContext = new HttpContext(); + } + + let localVarTransferCache: boolean | undefined = options && options.transferCache; + if (localVarTransferCache === undefined) { + localVarTransferCache = true; + } + + + let responseType_: 'text' | 'json' | 'blob' = 'json'; + if (localVarHttpHeaderAcceptSelected) { + if (localVarHttpHeaderAcceptSelected.startsWith('text')) { + responseType_ = 'text'; + } else if (this.configuration.isJsonMime(localVarHttpHeaderAcceptSelected)) { + responseType_ = 'json'; + } else { + responseType_ = 'blob'; + } + } + + let localVarPath = `/geographicSite/${this.configuration.encodeParam({name: "id", value: id, in: "path", style: "simple", explode: false, dataType: "string", dataFormat: undefined})}`; + return this.httpClient.request('delete', `${this.configuration.basePath}${localVarPath}`, + { + context: localVarHttpContext, + responseType: responseType_, + withCredentials: this.configuration.withCredentials, + headers: localVarHeaders, + observe: observe, + transferCache: localVarTransferCache, + reportProgress: reportProgress + } + ); + } + + /** + * List or find GeographicSite objects + * This operation retrieves a GeographicSite entity. Attribute selection enabled for all first level attributes. + * @param fields Comma-separated properties to be provided in response + * @param offset Requested index for start of resources to be provided in response + * @param limit Requested number of resources to be provided in response + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public listGeographicSite(fields?: string, offset?: number, limit?: number, observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable>; + public listGeographicSite(fields?: string, offset?: number, limit?: number, observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable>>; + public listGeographicSite(fields?: string, offset?: number, limit?: number, observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable>>; + public listGeographicSite(fields?: string, offset?: number, limit?: number, observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable { + + let localVarQueryParameters = new HttpParams({encoder: this.encoder}); + if (fields !== undefined && fields !== null) { + localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, + fields, 'fields'); + } + if (offset !== undefined && offset !== null) { + localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, + offset, 'offset'); + } + if (limit !== undefined && limit !== null) { + localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, + limit, 'limit'); + } + + let localVarHeaders = this.defaultHeaders; + + let localVarHttpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept; + if (localVarHttpHeaderAcceptSelected === undefined) { + // to determine the Accept header + const httpHeaderAccepts: string[] = [ + 'application/json' + ]; + localVarHttpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts); + } + if (localVarHttpHeaderAcceptSelected !== undefined) { + localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected); + } + + let localVarHttpContext: HttpContext | undefined = options && options.context; + if (localVarHttpContext === undefined) { + localVarHttpContext = new HttpContext(); + } + + let localVarTransferCache: boolean | undefined = options && options.transferCache; + if (localVarTransferCache === undefined) { + localVarTransferCache = true; + } + + + let responseType_: 'text' | 'json' | 'blob' = 'json'; + if (localVarHttpHeaderAcceptSelected) { + if (localVarHttpHeaderAcceptSelected.startsWith('text')) { + responseType_ = 'text'; + } else if (this.configuration.isJsonMime(localVarHttpHeaderAcceptSelected)) { + responseType_ = 'json'; + } else { + responseType_ = 'blob'; + } + } + + let localVarPath = `/geographicSite`; + return this.httpClient.request>('get', `${this.configuration.basePath}${localVarPath}`, + { + context: localVarHttpContext, + params: localVarQueryParameters, + responseType: responseType_, + withCredentials: this.configuration.withCredentials, + headers: localVarHeaders, + observe: observe, + transferCache: localVarTransferCache, + reportProgress: reportProgress + } + ); + } + + /** + * Updates partially a GeographicSite + * This operation updates partially a GeographicSite entity. + * @param id Identifier of the Service + * @param geographicSiteUpdate The GeographicSite to be patched + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public patchGeographicSite(id: string, geographicSiteUpdate: GeographicSiteUpdate, observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json' | 'application/merge-patch+json' | 'application/json-patch+json' | 'application/json-patch-query+json', context?: HttpContext, transferCache?: boolean}): Observable; + public patchGeographicSite(id: string, geographicSiteUpdate: GeographicSiteUpdate, observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json' | 'application/merge-patch+json' | 'application/json-patch+json' | 'application/json-patch-query+json', context?: HttpContext, transferCache?: boolean}): Observable>; + public patchGeographicSite(id: string, geographicSiteUpdate: GeographicSiteUpdate, observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json' | 'application/merge-patch+json' | 'application/json-patch+json' | 'application/json-patch-query+json', context?: HttpContext, transferCache?: boolean}): Observable>; + public patchGeographicSite(id: string, geographicSiteUpdate: GeographicSiteUpdate, observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: 'application/json' | 'application/merge-patch+json' | 'application/json-patch+json' | 'application/json-patch-query+json', context?: HttpContext, transferCache?: boolean}): Observable { + if (id === null || id === undefined) { + throw new Error('Required parameter id was null or undefined when calling patchGeographicSite.'); + } + if (geographicSiteUpdate === null || geographicSiteUpdate === undefined) { + throw new Error('Required parameter geographicSiteUpdate was null or undefined when calling patchGeographicSite.'); + } + + let localVarHeaders = this.defaultHeaders; + + let localVarHttpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept; + if (localVarHttpHeaderAcceptSelected === undefined) { + // to determine the Accept header + const httpHeaderAccepts: string[] = [ + 'application/json', + 'application/merge-patch+json', + 'application/json-patch+json', + 'application/json-patch-query+json' + ]; + localVarHttpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts); + } + if (localVarHttpHeaderAcceptSelected !== undefined) { + localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected); + } + + let localVarHttpContext: HttpContext | undefined = options && options.context; + if (localVarHttpContext === undefined) { + localVarHttpContext = new HttpContext(); + } + + let localVarTransferCache: boolean | undefined = options && options.transferCache; + if (localVarTransferCache === undefined) { + localVarTransferCache = true; + } + + + // to determine the Content-Type header + const consumes: string[] = [ + 'application/json', + 'application/merge-patch+json', + 'application/json-patch+json', + 'application/json-patch-query+json' + ]; + const httpContentTypeSelected: string | undefined = this.configuration.selectHeaderContentType(consumes); + if (httpContentTypeSelected !== undefined) { + localVarHeaders = localVarHeaders.set('Content-Type', httpContentTypeSelected); + } + + let responseType_: 'text' | 'json' | 'blob' = 'json'; + if (localVarHttpHeaderAcceptSelected) { + if (localVarHttpHeaderAcceptSelected.startsWith('text')) { + responseType_ = 'text'; + } else if (this.configuration.isJsonMime(localVarHttpHeaderAcceptSelected)) { + responseType_ = 'json'; + } else { + responseType_ = 'blob'; + } + } + + let localVarPath = `/geographicSite/${this.configuration.encodeParam({name: "id", value: id, in: "path", style: "simple", explode: false, dataType: "string", dataFormat: undefined})}`; + return this.httpClient.request('patch', `${this.configuration.basePath}${localVarPath}`, + { + context: localVarHttpContext, + body: geographicSiteUpdate, + responseType: responseType_, + withCredentials: this.configuration.withCredentials, + headers: localVarHeaders, + observe: observe, + transferCache: localVarTransferCache, + reportProgress: reportProgress + } + ); + } + + /** + * Retrieves a GeographicSite by ID + * List or find GeographicSite objects + * @param id Identifier of the Service + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public retrieveGeographicSite(id: string, observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable; + public retrieveGeographicSite(id: string, observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable>; + public retrieveGeographicSite(id: string, observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable>; + public retrieveGeographicSite(id: string, observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable { + if (id === null || id === undefined) { + throw new Error('Required parameter id was null or undefined when calling retrieveGeographicSite.'); + } + + let localVarHeaders = this.defaultHeaders; + + let localVarHttpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept; + if (localVarHttpHeaderAcceptSelected === undefined) { + // to determine the Accept header + const httpHeaderAccepts: string[] = [ + 'application/json' + ]; + localVarHttpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts); + } + if (localVarHttpHeaderAcceptSelected !== undefined) { + localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected); + } + + let localVarHttpContext: HttpContext | undefined = options && options.context; + if (localVarHttpContext === undefined) { + localVarHttpContext = new HttpContext(); + } + + let localVarTransferCache: boolean | undefined = options && options.transferCache; + if (localVarTransferCache === undefined) { + localVarTransferCache = true; + } + + + let responseType_: 'text' | 'json' | 'blob' = 'json'; + if (localVarHttpHeaderAcceptSelected) { + if (localVarHttpHeaderAcceptSelected.startsWith('text')) { + responseType_ = 'text'; + } else if (this.configuration.isJsonMime(localVarHttpHeaderAcceptSelected)) { + responseType_ = 'json'; + } else { + responseType_ = 'blob'; + } + } + + let localVarPath = `/geographicSite/${this.configuration.encodeParam({name: "id", value: id, in: "path", style: "simple", explode: false, dataType: "string", dataFormat: undefined})}`; + return this.httpClient.request('get', `${this.configuration.basePath}${localVarPath}`, + { + context: localVarHttpContext, + responseType: responseType_, + withCredentials: this.configuration.withCredentials, + headers: localVarHeaders, + observe: observe, + transferCache: localVarTransferCache, + reportProgress: reportProgress + } + ); + } + +} diff --git a/src/app/openApis/geographicSiteManagement/services/notificationListener.service.ts b/src/app/openApis/geographicSiteManagement/services/notificationListener.service.ts new file mode 100644 index 0000000..1078f91 --- /dev/null +++ b/src/app/openApis/geographicSiteManagement/services/notificationListener.service.ts @@ -0,0 +1,400 @@ +/** + * Geographic Site Management + * ** TMF API Reference : TMF 674 - Place - Geographic Site Management ### August 2021 This API covers the operations to manage (create, read, delete) sites that can be associated to a customer, an account, a service delivery or other entities. It defines a Site as a convenience class that allows to easily refer to places important to other entities, where a geographic place is the entity that can answer the question “where?”, allowing to determine where things are in relation to the earth\'s surface, and can be represented either in a textual structured way (geographic address) or as a geometry referred to a spatial reference system (geographic location). ### Resources - GeographicSite - Hub ### Operations Geographic Site API performs the following operations : - Retrieve a geographic site or a collection of geographic sites - Create a new site - Update a geographic site - Delete a geographic site - Notify events on geographic site Copyright © TM Forum 2021. All Rights Reserved + * + * The version of the OpenAPI document: 5.0.0 + * + * + * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). + * https://openapi-generator.tech + * Do not edit the class manually. + */ +/* tslint:disable:no-unused-variable member-ordering */ + +import { Inject, Injectable, Optional } from '@angular/core'; +import { HttpClient, HttpHeaders, HttpParams, + HttpResponse, HttpEvent, HttpParameterCodec, HttpContext + } from '@angular/common/http'; +import { CustomHttpParameterCodec } from '../encoder'; +import { Observable } from 'rxjs'; + +// @ts-ignore +import { GeographicSiteAttributeValueChangeEvent } from '../model/geographicSiteAttributeValueChangeEvent'; +// @ts-ignore +import { GeographicSiteCreateEvent } from '../model/geographicSiteCreateEvent'; +// @ts-ignore +import { GeographicSiteDeleteEvent } from '../model/geographicSiteDeleteEvent'; +// @ts-ignore +import { GeographicSiteStateChangeEvent } from '../model/geographicSiteStateChangeEvent'; + +// @ts-ignore +import { BASE_PATH, COLLECTION_FORMATS } from '../variables'; +import { Configuration } from '../configuration'; + + + +@Injectable({ + providedIn: 'root' +}) +export class NotificationListenerService { + + protected basePath = 'https://serverRoot'; + public defaultHeaders = new HttpHeaders(); + public configuration = new Configuration(); + public encoder: HttpParameterCodec; + + constructor(protected httpClient: HttpClient, @Optional()@Inject(BASE_PATH) basePath: string|string[], @Optional() configuration: Configuration) { + if (configuration) { + this.configuration = configuration; + } + if (typeof this.configuration.basePath !== 'string') { + if (Array.isArray(basePath) && basePath.length > 0) { + basePath = basePath[0]; + } + + if (typeof basePath !== 'string') { + basePath = this.basePath; + } + this.configuration.basePath = basePath; + } + this.encoder = this.configuration.encoder || new CustomHttpParameterCodec(); + } + + + // @ts-ignore + private addToHttpParams(httpParams: HttpParams, value: any, key?: string): HttpParams { + if (typeof value === "object" && value instanceof Date === false) { + httpParams = this.addToHttpParamsRecursive(httpParams, value); + } else { + httpParams = this.addToHttpParamsRecursive(httpParams, value, key); + } + return httpParams; + } + + private addToHttpParamsRecursive(httpParams: HttpParams, value?: any, key?: string): HttpParams { + if (value == null) { + return httpParams; + } + + if (typeof value === "object") { + if (Array.isArray(value)) { + (value as any[]).forEach( elem => httpParams = this.addToHttpParamsRecursive(httpParams, elem, key)); + } else if (value instanceof Date) { + if (key != null) { + httpParams = httpParams.append(key, (value as Date).toISOString().substring(0, 10)); + } else { + throw Error("key may not be null if value is Date"); + } + } else { + Object.keys(value).forEach( k => httpParams = this.addToHttpParamsRecursive( + httpParams, value[k], key != null ? `${key}.${k}` : k)); + } + } else if (key != null) { + httpParams = httpParams.append(key, value); + } else { + throw Error("key may not be null if value is not object or array"); + } + return httpParams; + } + + /** + * Client listener for entity GeographicSiteCreateEvent + * Example of a client listener for receiving the notification GeographicSiteAttributeValueChangeEvent + * @param geographicSiteAttributeValueChangeEvent The event data + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public geographicSiteAttributeValueChangeEvent(geographicSiteAttributeValueChangeEvent: GeographicSiteAttributeValueChangeEvent, observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable; + public geographicSiteAttributeValueChangeEvent(geographicSiteAttributeValueChangeEvent: GeographicSiteAttributeValueChangeEvent, observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable>; + public geographicSiteAttributeValueChangeEvent(geographicSiteAttributeValueChangeEvent: GeographicSiteAttributeValueChangeEvent, observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable>; + public geographicSiteAttributeValueChangeEvent(geographicSiteAttributeValueChangeEvent: GeographicSiteAttributeValueChangeEvent, observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable { + if (geographicSiteAttributeValueChangeEvent === null || geographicSiteAttributeValueChangeEvent === undefined) { + throw new Error('Required parameter geographicSiteAttributeValueChangeEvent was null or undefined when calling geographicSiteAttributeValueChangeEvent.'); + } + + let localVarHeaders = this.defaultHeaders; + + let localVarHttpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept; + if (localVarHttpHeaderAcceptSelected === undefined) { + // to determine the Accept header + const httpHeaderAccepts: string[] = [ + 'application/json' + ]; + localVarHttpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts); + } + if (localVarHttpHeaderAcceptSelected !== undefined) { + localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected); + } + + let localVarHttpContext: HttpContext | undefined = options && options.context; + if (localVarHttpContext === undefined) { + localVarHttpContext = new HttpContext(); + } + + let localVarTransferCache: boolean | undefined = options && options.transferCache; + if (localVarTransferCache === undefined) { + localVarTransferCache = true; + } + + + // to determine the Content-Type header + const consumes: string[] = [ + 'application/json' + ]; + const httpContentTypeSelected: string | undefined = this.configuration.selectHeaderContentType(consumes); + if (httpContentTypeSelected !== undefined) { + localVarHeaders = localVarHeaders.set('Content-Type', httpContentTypeSelected); + } + + let responseType_: 'text' | 'json' | 'blob' = 'json'; + if (localVarHttpHeaderAcceptSelected) { + if (localVarHttpHeaderAcceptSelected.startsWith('text')) { + responseType_ = 'text'; + } else if (this.configuration.isJsonMime(localVarHttpHeaderAcceptSelected)) { + responseType_ = 'json'; + } else { + responseType_ = 'blob'; + } + } + + let localVarPath = `/listener/geographicSiteAttributeValueChangeEvent`; + return this.httpClient.request('post', `${this.configuration.basePath}${localVarPath}`, + { + context: localVarHttpContext, + body: geographicSiteAttributeValueChangeEvent, + responseType: responseType_, + withCredentials: this.configuration.withCredentials, + headers: localVarHeaders, + observe: observe, + transferCache: localVarTransferCache, + reportProgress: reportProgress + } + ); + } + + /** + * Client listener for entity GeographicSiteCreateEvent + * Example of a client listener for receiving the notification GeographicSiteCreateEvent + * @param geographicSiteCreateEvent The event data + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public geographicSiteCreateEvent(geographicSiteCreateEvent: GeographicSiteCreateEvent, observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable; + public geographicSiteCreateEvent(geographicSiteCreateEvent: GeographicSiteCreateEvent, observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable>; + public geographicSiteCreateEvent(geographicSiteCreateEvent: GeographicSiteCreateEvent, observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable>; + public geographicSiteCreateEvent(geographicSiteCreateEvent: GeographicSiteCreateEvent, observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable { + if (geographicSiteCreateEvent === null || geographicSiteCreateEvent === undefined) { + throw new Error('Required parameter geographicSiteCreateEvent was null or undefined when calling geographicSiteCreateEvent.'); + } + + let localVarHeaders = this.defaultHeaders; + + let localVarHttpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept; + if (localVarHttpHeaderAcceptSelected === undefined) { + // to determine the Accept header + const httpHeaderAccepts: string[] = [ + 'application/json' + ]; + localVarHttpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts); + } + if (localVarHttpHeaderAcceptSelected !== undefined) { + localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected); + } + + let localVarHttpContext: HttpContext | undefined = options && options.context; + if (localVarHttpContext === undefined) { + localVarHttpContext = new HttpContext(); + } + + let localVarTransferCache: boolean | undefined = options && options.transferCache; + if (localVarTransferCache === undefined) { + localVarTransferCache = true; + } + + + // to determine the Content-Type header + const consumes: string[] = [ + 'application/json' + ]; + const httpContentTypeSelected: string | undefined = this.configuration.selectHeaderContentType(consumes); + if (httpContentTypeSelected !== undefined) { + localVarHeaders = localVarHeaders.set('Content-Type', httpContentTypeSelected); + } + + let responseType_: 'text' | 'json' | 'blob' = 'json'; + if (localVarHttpHeaderAcceptSelected) { + if (localVarHttpHeaderAcceptSelected.startsWith('text')) { + responseType_ = 'text'; + } else if (this.configuration.isJsonMime(localVarHttpHeaderAcceptSelected)) { + responseType_ = 'json'; + } else { + responseType_ = 'blob'; + } + } + + let localVarPath = `/listener/geographicSiteCreateEvent`; + return this.httpClient.request('post', `${this.configuration.basePath}${localVarPath}`, + { + context: localVarHttpContext, + body: geographicSiteCreateEvent, + responseType: responseType_, + withCredentials: this.configuration.withCredentials, + headers: localVarHeaders, + observe: observe, + transferCache: localVarTransferCache, + reportProgress: reportProgress + } + ); + } + + /** + * Client listener for entity GeographicSiteCreateEvent + * Example of a client listener for receiving the notification GeographicSiteDeleteEvent + * @param geographicSiteDeleteEvent The event data + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public geographicSiteDeleteEvent(geographicSiteDeleteEvent: GeographicSiteDeleteEvent, observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable; + public geographicSiteDeleteEvent(geographicSiteDeleteEvent: GeographicSiteDeleteEvent, observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable>; + public geographicSiteDeleteEvent(geographicSiteDeleteEvent: GeographicSiteDeleteEvent, observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable>; + public geographicSiteDeleteEvent(geographicSiteDeleteEvent: GeographicSiteDeleteEvent, observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable { + if (geographicSiteDeleteEvent === null || geographicSiteDeleteEvent === undefined) { + throw new Error('Required parameter geographicSiteDeleteEvent was null or undefined when calling geographicSiteDeleteEvent.'); + } + + let localVarHeaders = this.defaultHeaders; + + let localVarHttpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept; + if (localVarHttpHeaderAcceptSelected === undefined) { + // to determine the Accept header + const httpHeaderAccepts: string[] = [ + 'application/json' + ]; + localVarHttpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts); + } + if (localVarHttpHeaderAcceptSelected !== undefined) { + localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected); + } + + let localVarHttpContext: HttpContext | undefined = options && options.context; + if (localVarHttpContext === undefined) { + localVarHttpContext = new HttpContext(); + } + + let localVarTransferCache: boolean | undefined = options && options.transferCache; + if (localVarTransferCache === undefined) { + localVarTransferCache = true; + } + + + // to determine the Content-Type header + const consumes: string[] = [ + 'application/json' + ]; + const httpContentTypeSelected: string | undefined = this.configuration.selectHeaderContentType(consumes); + if (httpContentTypeSelected !== undefined) { + localVarHeaders = localVarHeaders.set('Content-Type', httpContentTypeSelected); + } + + let responseType_: 'text' | 'json' | 'blob' = 'json'; + if (localVarHttpHeaderAcceptSelected) { + if (localVarHttpHeaderAcceptSelected.startsWith('text')) { + responseType_ = 'text'; + } else if (this.configuration.isJsonMime(localVarHttpHeaderAcceptSelected)) { + responseType_ = 'json'; + } else { + responseType_ = 'blob'; + } + } + + let localVarPath = `/listener/geographicSiteDeleteEvent`; + return this.httpClient.request('post', `${this.configuration.basePath}${localVarPath}`, + { + context: localVarHttpContext, + body: geographicSiteDeleteEvent, + responseType: responseType_, + withCredentials: this.configuration.withCredentials, + headers: localVarHeaders, + observe: observe, + transferCache: localVarTransferCache, + reportProgress: reportProgress + } + ); + } + + /** + * Client listener for entity GeographicSiteCreateEvent + * Example of a client listener for receiving the notification GeographicSiteStateChangeEvent + * @param geographicSiteStateChangeEvent The event data + * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. + * @param reportProgress flag to report request and response progress. + */ + public geographicSiteStateChangeEvent(geographicSiteStateChangeEvent: GeographicSiteStateChangeEvent, observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable; + public geographicSiteStateChangeEvent(geographicSiteStateChangeEvent: GeographicSiteStateChangeEvent, observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable>; + public geographicSiteStateChangeEvent(geographicSiteStateChangeEvent: GeographicSiteStateChangeEvent, observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable>; + public geographicSiteStateChangeEvent(geographicSiteStateChangeEvent: GeographicSiteStateChangeEvent, observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable { + if (geographicSiteStateChangeEvent === null || geographicSiteStateChangeEvent === undefined) { + throw new Error('Required parameter geographicSiteStateChangeEvent was null or undefined when calling geographicSiteStateChangeEvent.'); + } + + let localVarHeaders = this.defaultHeaders; + + let localVarHttpHeaderAcceptSelected: string | undefined = options && options.httpHeaderAccept; + if (localVarHttpHeaderAcceptSelected === undefined) { + // to determine the Accept header + const httpHeaderAccepts: string[] = [ + 'application/json' + ]; + localVarHttpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts); + } + if (localVarHttpHeaderAcceptSelected !== undefined) { + localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected); + } + + let localVarHttpContext: HttpContext | undefined = options && options.context; + if (localVarHttpContext === undefined) { + localVarHttpContext = new HttpContext(); + } + + let localVarTransferCache: boolean | undefined = options && options.transferCache; + if (localVarTransferCache === undefined) { + localVarTransferCache = true; + } + + + // to determine the Content-Type header + const consumes: string[] = [ + 'application/json' + ]; + const httpContentTypeSelected: string | undefined = this.configuration.selectHeaderContentType(consumes); + if (httpContentTypeSelected !== undefined) { + localVarHeaders = localVarHeaders.set('Content-Type', httpContentTypeSelected); + } + + let responseType_: 'text' | 'json' | 'blob' = 'json'; + if (localVarHttpHeaderAcceptSelected) { + if (localVarHttpHeaderAcceptSelected.startsWith('text')) { + responseType_ = 'text'; + } else if (this.configuration.isJsonMime(localVarHttpHeaderAcceptSelected)) { + responseType_ = 'json'; + } else { + responseType_ = 'blob'; + } + } + + let localVarPath = `/listener/geographicSiteStateChangeEvent`; + return this.httpClient.request('post', `${this.configuration.basePath}${localVarPath}`, + { + context: localVarHttpContext, + body: geographicSiteStateChangeEvent, + responseType: responseType_, + withCredentials: this.configuration.withCredentials, + headers: localVarHeaders, + observe: observe, + transferCache: localVarTransferCache, + reportProgress: reportProgress + } + ); + } + +} diff --git a/src/app/openApis/geographicSiteManagement/strict-http-response.ts b/src/app/openApis/geographicSiteManagement/strict-http-response.ts new file mode 100644 index 0000000..ebdeada --- /dev/null +++ b/src/app/openApis/geographicSiteManagement/strict-http-response.ts @@ -0,0 +1,9 @@ +/* tslint:disable */ +import { HttpResponse } from '@angular/common/http'; + +/** + * Constrains the http to not expand the response type with `| null` + */ +export type StrictHttpResponse = HttpResponse & { + readonly body: T; +} diff --git a/src/app/openApis/geographicSiteManagement/variables.ts b/src/app/openApis/geographicSiteManagement/variables.ts new file mode 100644 index 0000000..6fe5854 --- /dev/null +++ b/src/app/openApis/geographicSiteManagement/variables.ts @@ -0,0 +1,9 @@ +import { InjectionToken } from '@angular/core'; + +export const BASE_PATH = new InjectionToken('basePath'); +export const COLLECTION_FORMATS = { + 'csv': ',', + 'tsv': ' ', + 'ssv': ' ', + 'pipes': '|' +} diff --git a/src/assets/swagger_collections/TMF674 - Geographic Site Management.json b/src/assets/swagger_collections/TMF674 - Geographic Site Management.json new file mode 100644 index 0000000..0ec1bf4 --- /dev/null +++ b/src/assets/swagger_collections/TMF674 - Geographic Site Management.json @@ -0,0 +1,2054 @@ +{ + "swagger": "2.0", + "info": { + "title": "Geographic Site Management", + "description": "** TMF API Reference : TMF 674 - Place - Geographic Site Management\n\n### August 2021\n\nThis API covers the operations to manage (create, read, delete) sites that can be associated to a customer, an account, a service delivery or other entities. It defines a Site as a convenience class that allows to easily refer to places important to other entities, where a geographic place is the entity that can answer the question “where?”, allowing to determine where things are in relation to the earth's surface, and can be represented either in a textual structured way (geographic address) or as a geometry referred to a spatial reference system (geographic location).\n\n### Resources\n- GeographicSite\n- Hub\n\n### Operations\nGeographic Site API performs the following operations :\n- Retrieve a geographic site or a collection of geographic sites\n- Create a new site\n- Update a geographic site\n- Delete a geographic site\n- Notify events on geographic site\n\nCopyright © TM Forum 2021. All Rights Reserved\n\n", + "version": "5.0.0" + }, + "servers": [ + { + "url": "https://serverRoot" + } + ], + "tags": [ + { + "name": "geographicSite", + "description": "Operations for GeographicSite Resource" + }, + { + "name": "notification listener", + "description": "Notifications for Resource Lifecycle and event notifications" + }, + { + "name": "events subscription", + "description": "Endpoints to register and terminate an Event Listener" + } + ], + "paths": { + "/geographicSite": { + "get": { + "tags": [ + "geographicSite" + ], + "summary": "List or find GeographicSite objects", + "description": "This operation retrieves a GeographicSite entity. Attribute selection enabled for all first level attributes.", + "operationId": "listGeographicSite", + "parameters": [ + { + "$ref": "#/components/parameters/Fields" + }, + { + "$ref": "#/components/parameters/Offset" + }, + { + "$ref": "#/components/parameters/Limit" + } + ], + "responses": { + "200": { + "$ref": "#/components/responses/200GeographicSiteArray" + }, + "default": { + "$ref": "#/components/responses/Error" + } + } + }, + "post": { + "tags": [ + "geographicSite" + ], + "summary": "Creates a GeographicSite", + "description": "This operation creates a GeographicSite entity.", + "operationId": "createGeographicSite", + "requestBody": { + "$ref": "#/components/requestBodies/GeographicSite_Create" + }, + "responses": { + "201": { + "$ref": "#/components/responses/201GeographicSite" + }, + "default": { + "$ref": "#/components/responses/Error" + } + } + } + }, + "/geographicSite/{id}": { + "get": { + "tags": [ + "geographicSite" + ], + "summary": "Retrieves a GeographicSite by ID", + "description": "List or find GeographicSite objects", + "operationId": "retrieveGeographicSite", + "parameters": [ + { + "$ref": "#/components/parameters/Id" + } + ], + "responses": { + "200": { + "$ref": "#/components/responses/200GeographicSite_Get" + }, + "default": { + "$ref": "#/components/responses/Error" + } + } + }, + "delete": { + "tags": [ + "geographicSite" + ], + "summary": "Deletes a GeographicSite", + "description": "This operation deletes a GeographicSite entity.", + "operationId": "deleteGeographicSite", + "parameters": [ + { + "$ref": "#/components/parameters/Id" + } + ], + "responses": { + "204": { + "$ref": "#/components/responses/204" + }, + "default": { + "$ref": "#/components/responses/Error" + } + } + }, + "patch": { + "tags": [ + "geographicSite" + ], + "summary": "Updates partially a GeographicSite", + "description": "This operation updates partially a GeographicSite entity.", + "operationId": "patchGeographicSite", + "parameters": [ + { + "$ref": "#/components/parameters/Id" + } + ], + "requestBody": { + "$ref": "#/components/requestBodies/GeographicSite_Update" + }, + "responses": { + "200": { + "$ref": "#/components/responses/200GeographicSite_Patch" + }, + "default": { + "$ref": "#/components/responses/Error" + } + } + } + }, + "/listener/geographicSiteCreateEvent": { + "post": { + "tags": [ + "notification listener" + ], + "summary": "Client listener for entity GeographicSiteCreateEvent", + "description": "Example of a client listener for receiving the notification GeographicSiteCreateEvent", + "operationId": "geographicSiteCreateEvent", + "requestBody": { + "description": "The event data", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/GeographicSiteCreateEvent" + } + } + }, + "required": true + }, + "responses": { + "204": { + "description": "Notified" + }, + "default": { + "$ref": "#/components/responses/Error" + } + } + } + }, + "/listener/geographicSiteAttributeValueChangeEvent": { + "post": { + "tags": [ + "notification listener" + ], + "summary": "Client listener for entity GeographicSiteCreateEvent", + "description": "Example of a client listener for receiving the notification GeographicSiteAttributeValueChangeEvent", + "operationId": "geographicSiteAttributeValueChangeEvent", + "requestBody": { + "description": "The event data", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/GeographicSiteAttributeValueChangeEvent" + } + } + }, + "required": true + }, + "responses": { + "204": { + "description": "Notified" + }, + "default": { + "$ref": "#/components/responses/Error" + } + } + } + }, + "/listener/geographicSiteStateChangeEvent": { + "post": { + "tags": [ + "notification listener" + ], + "summary": "Client listener for entity GeographicSiteCreateEvent", + "description": "Example of a client listener for receiving the notification GeographicSiteStateChangeEvent", + "operationId": "geographicSiteStateChangeEvent", + "requestBody": { + "description": "The event data", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/GeographicSiteStateChangeEvent" + } + } + }, + "required": true + }, + "responses": { + "204": { + "description": "Notified" + }, + "default": { + "$ref": "#/components/responses/Error" + } + } + } + }, + "/listener/geographicSiteDeleteEvent": { + "post": { + "tags": [ + "notification listener" + ], + "summary": "Client listener for entity GeographicSiteCreateEvent", + "description": "Example of a client listener for receiving the notification GeographicSiteDeleteEvent", + "operationId": "geographicSiteDeleteEvent", + "requestBody": { + "description": "The event data", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/GeographicSiteDeleteEvent" + } + } + }, + "required": true + }, + "responses": { + "204": { + "description": "Notified" + }, + "default": { + "$ref": "#/components/responses/Error" + } + } + } + }, + "/hub": { + "post": { + "operationId": "registerListener", + "summary": "Register a listener", + "description": "Sets the communication endpoint address the service instance must use to deliver information about its health state, execution state, failures and metrics.", + "tags": [ + "events subscription" + ], + "requestBody": { + "$ref": "#/components/requestBodies/EventSubscriptionInput" + }, + "responses": { + "201": { + "$ref": "#/components/responses/EventSubscription" + }, + "default": { + "$ref": "#/components/responses/Error" + } + } + } + }, + "/hub/{id}": { + "delete": { + "operationId": "unregisterListener", + "summary": "Unregister a listener", + "description": "Resets the communication endpoint address the service instance must use to deliver information about its health state, execution state, failures and metrics.", + "tags": [ + "events subscription" + ], + "parameters": [ + { + "$ref": "#/components/parameters/Id" + } + ], + "responses": { + "204": { + "description": "Deleted" + }, + "default": { + "$ref": "#/components/responses/Error" + } + } + } + } + }, + "components": { + "schemas": { + "BaseEvent": { + "allOf": [ + { + "$ref": "#/components/schemas/Entity" + }, + { + "description": "Base event with common attributes.", + "type": "object", + "properties": { + "event": { + "type": "object" + }, + "eventId": { + "type": "string", + "description": "The identifier of the notification." + }, + "eventTime": { + "type": "string", + "format": "date-time", + "description": "Time of the event occurrence." + }, + "eventType": { + "type": "string", + "description": "The type of the notification." + }, + "correlationId": { + "type": "string", + "description": "The correlation id for this event." + }, + "domain": { + "type": "string", + "description": "The domain of the event." + }, + "title": { + "type": "string", + "description": "The title of the event." + }, + "description": { + "type": "string", + "description": "An explanatory of the event." + }, + "priority": { + "type": "string", + "description": "A priority." + }, + "timeOcurred": { + "type": "string", + "format": "date-time", + "description": "The time the event occured." + } + } + } + ], + "discriminator": { + "propertyName": "@type", + "mapping": { + "BaseEvent": "#/components/schemas/BaseEvent", + "GeographicSiteDeleteEvent": "#/components/schemas/GeographicSiteDeleteEvent", + "GeographicSiteStateChangeEvent": "#/components/schemas/GeographicSiteStateChangeEvent", + "GeographicSiteAttributeValueChangeEvent": "#/components/schemas/GeographicSiteAttributeValueChangeEvent", + "GeographicSiteCreateEvent": "#/components/schemas/GeographicSiteCreateEvent" + } + } + }, + "Entity": { + "allOf": [ + { + "$ref": "#/components/schemas/Addressable" + }, + { + "$ref": "#/components/schemas/Extensible" + } + ], + "discriminator": { + "propertyName": "@type", + "mapping": { + "Entity": "#/components/schemas/Entity" + } + } + }, + "Addressable": { + "type": "object", + "required": [ + "id", + "href" + ], + "description": "Base schema for adressable entities", + "properties": { + "href": { + "type": "string", + "description": "Hyperlink reference" + }, + "id": { + "type": "string", + "description": "unique identifier" + } + } + }, + "Extensible": { + "type": "object", + "description": "Base Extensible schema for use in TMForum Open-APIs - When used for in a schema it means that the Entity described by the schema MUST be extended with the @type", + "required": [ + "@type" + ], + "properties": { + "@type": { + "type": "string", + "description": "When sub-classing, this defines the sub-class Extensible name" + }, + "@baseType": { + "type": "string", + "description": "When sub-classing, this defines the super-class" + }, + "@schemaLocation": { + "type": "string", + "description": "A URI to a JSON-Schema file that defines additional attributes and relationships" + } + } + }, + "GeographicSite": { + "allOf": [ + { + "$ref": "#/components/schemas/Entity" + }, + { + "type": "object", + "properties": { + "code": { + "type": "string", + "description": "A code that may be used for some addressing schemes eg: [ANSI T1.253-1999]" + }, + "creationDate": { + "type": "string", + "format": "date-time", + "description": "Date and time when the GeographicSite was created" + }, + "description": { + "type": "string", + "description": "Text describing additional information regarding the site" + }, + "status": { + "type": "string", + "description": "The condition of the GeographicSite, such as planned, underConstruction, cancelled, active, inactive, former" + }, + "relatedParty": { + "type": "array", + "items": { + "$ref": "#/components/schemas/RelatedParty" + } + }, + "externalIdentifier": { + "type": "array", + "items": { + "$ref": "#/components/schemas/ExternalIdentifier" + } + }, + "calendar": { + "type": "array", + "items": { + "$ref": "#/components/schemas/CalendarPeriod" + } + }, + "place": { + "type": "array", + "items": { + "$ref": "#/components/schemas/PlaceRefOrValue" + } + }, + "siteRelationship": { + "type": "array", + "items": { + "$ref": "#/components/schemas/GeographicSiteRelationship" + } + } + }, + "description": "" + } + ], + "discriminator": { + "propertyName": "@type", + "mapping": { + "GeographicSite": "#/components/schemas/GeographicSite" + } + } + }, + "RelatedParty": { + "allOf": [ + { + "$ref": "#/components/schemas/Reference" + }, + { + "$ref": "#/components/schemas/EntityRef" + }, + { + "$ref": "#/components/schemas/SchemaContext" + }, + { + "description": "Related Entity reference. A related party defines party or party role linked to a specific entity.", + "type": "object", + "properties": { + "role": { + "type": "string", + "description": "Role played by the related party" + }, + "@referredType": { + "type": "string", + "description": "The actual type of the target instance when needed for disambiguation." + } + }, + "required": [ + "@referredType" + ] + } + ] + }, + "ExternalIdentifier": { + "allOf": [ + { + "$ref": "#/components/schemas/SchemaContext" + }, + { + "description": "An identification of an entity that is owned by or originates in a software system different from the current system, for example a ProductOrder handed off from a commerce platform into an order handling system. The structure identifies the system itself, the nature of the entity within the system (e.g. class name) and the unique ID of the entity within the system. It is anticipated that multiple external IDs can be held for a single entity, e.g. if the entity passed through multiple systems on the way to the current system. In this case the consumer is expected to sequence the IDs in the array in reverse order of provenance, i.e. most recent system first in the list.", + "type": "object", + "properties": { + "owner": { + "type": "string", + "description": "Name of the external system that owns the entity.", + "example": "MagentoCommerce" + }, + "externalIdentifierType": { + "type": "string", + "description": "Type of the identification, typically would be the type of the entity within the external system", + "example": "ProductOrder" + }, + "id": { + "type": "string", + "description": "identification of the entity within the external system." + } + }, + "required": [ + "id" + ] + } + ] + }, + "CalendarPeriod": { + "allOf": [ + { + "$ref": "#/components/schemas/SchemaContext" + }, + { + "type": "object", + "properties": { + "href": { + "type": "string", + "format": "uri", + "description": "Hyperlink reference to the calendar period" + }, + "id": { + "type": "string", + "description": "unique identifier of the calendar period" + }, + "day": { + "type": "string", + "description": "Day where the calendar status applies (e.g.: monday, mon-to-fri, weekdays, weekend, all week, ...)" + }, + "timeZone": { + "type": "string", + "description": "Indication of the timezone applicable to the calendar information (e.g.: Paris, GMT+1)" + }, + "hourPeriod": { + "type": "array", + "items": { + "$ref": "#/components/schemas/HourPeriod" + } + }, + "status": { + "type": "string", + "description": "Indication of the availability of the caledar period (e.g.: available, booked, etc.)" + } + }, + "description": "Used to describe a calendar period.", + "required": [ + "status" + ] + } + ] + }, + "PlaceRefOrValue": { + "allOf": [ + { + "$ref": "#/components/schemas/Extensible" + } + ], + "discriminator": { + "propertyName": "@type", + "mapping": { + "PlaceRefOrValue": "#/components/schemas/PlaceRefOrValue", + "PlaceRef": "#/components/schemas/PlaceRef", + "GeographicAddressValue": "#/components/schemas/GeographicAddressValue" + } + } + }, + "GeographicSiteRelationship": { + "allOf": [ + { + "$ref": "#/components/schemas/SchemaContext" + }, + { + "type": "object", + "properties": { + "href": { + "type": "string", + "description": "Reference of the related geographic site" + }, + "role": { + "type": "string", + "description": "Role of the related site in the relationship" + }, + "validFor": { + "$ref": "#/components/schemas/TimePeriod" + }, + "id": { + "type": "string", + "description": "Unique identifier of the related site entity within the server" + }, + "relationshipType": { + "type": "string", + "description": "Type of relationship" + } + }, + "description": "Used to describe relationship between geographic site.", + "required": [ + "id", + "relationshipType" + ] + } + ] + }, + "EntityRef": { + "description": "Entity reference schema to be use for all entityRef class.", + "type": "object", + "properties": { + "href": { + "type": "string", + "description": "Hyperlink reference" + } + } + }, + "SchemaContext": { + "type": "object", + "description": "SchemaContext schema for use in TMForum Open-APIs", + "properties": { + "@schemaLocation": { + "type": "string", + "description": "A URI to a JSON-Schema file that defines additional attributes and relationships" + }, + "@baseType": { + "type": "string", + "description": "When sub-classing, this defines the super-class" + }, + "@type": { + "type": "string", + "description": "When sub-classing, this defines the sub-class Extensible name" + } + } + }, + "PlaceRef": { + "allOf": [ + { + "$ref": "#/components/schemas/PlaceRefOrValue" + }, + { + "$ref": "#/components/schemas/Reference" + }, + { + "$ref": "#/components/schemas/EntityRef" + }, + { + "$ref": "#/components/schemas/SchemaContext" + } + ] + }, + "GeographicAddressValue": { + "allOf": [ + { + "$ref": "#/components/schemas/PlaceRefOrValue" + }, + { + "$ref": "#/components/schemas/Extensible" + }, + { + "$ref": "#/components/schemas/SchemaContext" + }, + { + "description": "Structured textual way of describing how to find a Property in an urban area (country properties are often defined differently).\nNote : Address corresponds to SID UrbanPropertyAddress", + "type": "object", + "properties": { + "locality": { + "type": "string", + "description": "An area of defined or undefined boundaries within a local authority or other legislatively defined area, usually rural or semi rural in nature. [ANZLIC-STREET], or a suburb, a bounded locality within a city, town or shire principally of urban character [ANZLICSTREET]" + }, + "postcode": { + "type": "string", + "description": "descriptor for a postal delivery area, used to speed and simplify the delivery of mail (also know as zipcode)" + }, + "stateOrProvince": { + "type": "string", + "description": "the State or Province that the address is in" + }, + "streetNr": { + "type": "string", + "description": "Number identifying a specific property on a public street. It may be combined with streetNrLast for ranged addresses" + }, + "streetNrLast": { + "type": "string", + "description": "Last number in a range of street numbers allocated to a property" + }, + "streetNrLastSuffix": { + "type": "string", + "description": "Last street number suffix for a ranged address" + }, + "streetNrSuffix": { + "type": "string", + "description": "the first street number suffix" + }, + "streetSuffix": { + "type": "string", + "description": "A modifier denoting a relative direction" + }, + "streetType": { + "type": "string", + "description": "alley, avenue, boulevard, brae, crescent, drive, highway, lane, terrace, parade, place, tarn, way, wharf " + }, + "geographicSubAddress": { + "$ref": "#/components/schemas/GeographicSubAddressValue" + }, + "city": { + "type": "string", + "description": "City that the address is in" + }, + "country": { + "type": "string", + "description": "Country that the address is in" + }, + "streetName": { + "type": "string", + "description": "Name of the street or other street type" + } + } + } + ], + "discriminator": { + "propertyName": "@type", + "mapping": { + "GeographicAddressValue": "#/components/schemas/GeographicAddressValue" + } + } + }, + "HourPeriod": { + "allOf": [ + { + "$ref": "#/components/schemas/SchemaContext" + }, + { + "type": "object", + "properties": { + "endHour": { + "type": "string", + "description": "The time when the status ends applying" + }, + "startHour": { + "type": "string", + "description": "The time when the status starts applying" + } + }, + "description": "Used to describe a Hour period." + } + ] + }, + "TimePeriod": { + "description": "A period of time, either as a deadline (endDateTime only) a startDateTime only, or both", + "type": "object", + "properties": { + "startDateTime": { + "description": "Start of the time period, using IETC-RFC-3339 format", + "type": "string", + "format": "date-time", + "example": "1985-04-12T23:20:50.52Z" + }, + "endDateTime": { + "description": "End of the time period, using IETC-RFC-3339 format", + "type": "string", + "format": "date-time", + "example": "1985-04-12T23:20:50.52Z" + } + } + }, + "Reference": { + "description": "Reference schema .", + "type": "object", + "required": [ + "id" + ], + "properties": { + "id": { + "type": "string", + "description": "Identifier of the referred entity." + }, + "name": { + "type": "string", + "description": "Name of the referred entity." + }, + "@referredType": { + "type": "string", + "description": "The actual type of the target instance when needed for disambiguation." + } + } + }, + "GeographicSubAddressValue": { + "allOf": [ + { + "$ref": "#/components/schemas/Extensible" + }, + { + "$ref": "#/components/schemas/SchemaContext" + }, + { + "description": "Representation of a GeographicSubAddress \nIt is used for addressing within a property in an urban area (country properties are often defined differently). It may refer to a building, a building cluster, or a floor of a multistory building.", + "type": "object", + "properties": { + "buildingName": { + "type": "string", + "description": "allows for buildings that have well-known names" + }, + "levelNumber": { + "type": "string", + "description": "used where a level type may be repeated e.g. BASEMENT 1, BASEMENT 2" + }, + "levelType": { + "type": "string", + "description": "describes level types within a building" + }, + "name": { + "type": "string", + "description": "Name of the subAddress to identify it with a meaningful identification" + }, + "privateStreetName": { + "type": "string", + "description": "private streets internal to a property (e.g. a university) may have internal names that are not recorded by the land title office." + }, + "privateStreetNumber": { + "type": "string", + "description": "private streets numbers internal to a private street" + }, + "subUnit": { + "type": "array", + "description": "Representation of a SubUnit. It is used for describing subunit within a subAddress e.g. BERTH, FLAT, PIER, SUITE, SHOP, TOWER, UNIT, WHARF.", + "items": { + "$ref": "#/components/schemas/GeographicSubAddressUnit" + } + }, + "subAddressType": { + "type": "string", + "description": "Type of subAddress : it can be a subunit or a private street" + } + } + } + ], + "discriminator": { + "propertyName": "@type", + "mapping": { + "GeographicSubAddressValue": "#/components/schemas/GeographicSubAddressValue" + } + } + }, + "GeographicSubAddressUnit": { + "allOf": [ + { + "$ref": "#/components/schemas/SchemaContext" + }, + { + "description": "Representation of a SubUnit. It is used for describing subunit within a subAddress e.g. BERTH, FLAT, PIER, SUITE, SHOP, TOWER, UNIT, WHARF.", + "type": "object", + "properties": { + "subUnitNumber": { + "type": "string", + "description": "The discriminator used for the subunit, often just a simple number but may also be a range." + }, + "subUnitType": { + "type": "string", + "description": "The type of subunit e.g.BERTH, FLAT, PIER, SUITE, SHOP, TOWER, UNIT, WHARF, RACK" + } + }, + "required": [ + "subUnitNumber", + "subUnitType" + ] + } + ] + }, + "GeographicSite_Create": { + "allOf": [ + { + "$ref": "#/components/schemas/Extensible" + }, + { + "type": "object", + "properties": { + "code": { + "type": "string", + "description": "A code that may be used for some addressing schemes eg: [ANSI T1.253-1999]" + }, + "description": { + "type": "string", + "description": "Text describing additional information regarding the site" + }, + "relatedParty": { + "type": "array", + "items": { + "$ref": "#/components/schemas/RelatedParty" + } + }, + "externalIdentifier": { + "type": "array", + "items": { + "$ref": "#/components/schemas/ExternalIdentifier" + } + }, + "calendar": { + "type": "array", + "items": { + "$ref": "#/components/schemas/CalendarPeriod" + } + }, + "place": { + "type": "array", + "items": { + "$ref": "#/components/schemas/PlaceRefOrValue" + } + }, + "siteRelationship": { + "type": "array", + "items": { + "$ref": "#/components/schemas/GeographicSiteRelationship" + } + } + }, + "description": "" + } + ], + "discriminator": { + "propertyName": "@type", + "mapping": { + "GeographicSite": "#/components/schemas/GeographicSite_Create" + } + } + }, + "GeographicSite_Update": { + "allOf": [ + { + "$ref": "#/components/schemas/Extensible" + }, + { + "type": "object", + "properties": { + "code": { + "type": "string", + "description": "A code that may be used for some addressing schemes eg: [ANSI T1.253-1999]" + }, + "creationDate": { + "type": "string", + "format": "date-time", + "description": "Date and time when the GeographicSite was created" + }, + "description": { + "type": "string", + "description": "Text describing additional information regarding the site" + }, + "status": { + "type": "string", + "description": "The condition of the GeographicSite, such as planned, underConstruction, cancelled, active, inactive, former" + }, + "relatedParty": { + "type": "array", + "items": { + "$ref": "#/components/schemas/RelatedParty" + } + }, + "externalIdentifier": { + "type": "array", + "items": { + "$ref": "#/components/schemas/ExternalIdentifier" + } + }, + "calendar": { + "type": "array", + "items": { + "$ref": "#/components/schemas/CalendarPeriod" + } + }, + "place": { + "type": "array", + "items": { + "$ref": "#/components/schemas/PlaceRefOrValue" + } + }, + "siteRelationship": { + "type": "array", + "items": { + "$ref": "#/components/schemas/GeographicSiteRelationship" + } + } + }, + "description": "" + } + ], + "discriminator": { + "propertyName": "@type", + "mapping": { + "GeographicSite": "#/components/schemas/GeographicSite_Update" + } + } + }, + "GeographicSiteCreateEvent": { + "allOf": [ + { + "$ref": "#/components/schemas/BaseEvent" + }, + { + "description": "Example of a client listener for receiving the notification GeographicSite create Event", + "type": "object", + "properties": { + "event": { + "$ref": "#/components/schemas/GeographicSiteEventPayload" + } + } + } + ] + }, + "GeographicSiteAttributeValueChangeEvent": { + "allOf": [ + { + "$ref": "#/components/schemas/BaseEvent" + }, + { + "description": "Example of a client listener for receiving the notification GeographicSite attributeValueChange Event", + "type": "object", + "properties": { + "event": { + "$ref": "#/components/schemas/GeographicSiteEventPayload" + } + } + } + ] + }, + "GeographicSiteStateChangeEvent": { + "allOf": [ + { + "$ref": "#/components/schemas/BaseEvent" + }, + { + "description": "Example of a client listener for receiving the notification GeographicSite stateChange Event", + "type": "object", + "properties": { + "event": { + "$ref": "#/components/schemas/GeographicSiteEventPayload" + } + } + } + ] + }, + "GeographicSiteDeleteEvent": { + "allOf": [ + { + "$ref": "#/components/schemas/BaseEvent" + }, + { + "description": "Example of a client listener for receiving the notification GeographicSite delete Event", + "type": "object", + "properties": { + "event": { + "$ref": "#/components/schemas/GeographicSiteEventPayload" + } + } + } + ] + }, + "GeographicSiteEventPayload": { + "description": "TBD", + "type": "object", + "properties": { + "geographicSite": { + "$ref": "#/components/schemas/GeographicSite" + } + } + }, + "Error": { + "discriminator": { + "propertyName": "@type", + "mapping": { + "Error": "#/components/schemas/Error" + } + }, + "allOf": [ + { + "$ref": "#/components/schemas/Extensible" + }, + { + "type": "object", + "required": [ + "code", + "reason" + ], + "properties": { + "code": { + "type": "string", + "description": "Application relevant detail, defined in the API or a common list." + }, + "reason": { + "type": "string", + "description": "Explanation of the reason for the error which can be shown to a client user." + }, + "message": { + "type": "string", + "description": "More details and corrective actions related to the error which can be shown to a client user." + }, + "status": { + "type": "string", + "description": "HTTP Error code extension" + }, + "referenceError": { + "type": "string", + "description": "URI of documentation describing the error." + } + } + } + ], + "description": "Used when an API throws an Error, typically with a HTTP error response-code (3xx, 4xx, 5xx)" + }, + "EventSubscriptionInput": { + "type": "object", + "description": "Sets the communication endpoint address the service instance must use to deliver notification information", + "required": [ + "callback" + ], + "properties": { + "callback": { + "type": "string", + "description": "The callback being registered." + }, + "query": { + "type": "string", + "description": "additional data to be passed" + } + } + }, + "EventSubscription": { + "type": "object", + "description": "Sets the communication endpoint address the service instance must use to deliver notification information", + "required": [ + "id", + "callback" + ], + "properties": { + "id": { + "type": "string", + "description": "Id of the listener" + }, + "callback": { + "type": "string", + "description": "The callback being registered." + }, + "query": { + "type": "string", + "description": "additional data to be passed" + } + } + }, + "JsonPatch": { + "description": "A JSONPatch document as defined by RFC 6902", + "required": [ + "op", + "path" + ], + "properties": { + "op": { + "type": "string", + "description": "The operation to be performed", + "enum": [ + "add", + "remove", + "replace", + "move", + "copy", + "test" + ] + }, + "path": { + "type": "string", + "description": "A JSON-Pointer" + }, + "value": { + "type": "object", + "description": "The value to be used within the operations." + }, + "from": { + "type": "string", + "description": "A string containing a JSON Pointer value." + } + } + } + }, + "parameters": { + "Id": { + "name": "id", + "required": true, + "schema": { + "type": "string" + }, + "in": "path", + "description": "Identifier of the Service" + }, + "Fields": { + "name": "fields", + "in": "query", + "description": "Comma-separated properties to be provided in response", + "schema": { + "type": "string" + } + }, + "Offset": { + "name": "offset", + "in": "query", + "description": "Requested index for start of resources to be provided in response", + "schema": { + "type": "integer" + } + }, + "Limit": { + "name": "limit", + "in": "query", + "description": "Requested number of resources to be provided in response", + "schema": { + "type": "integer" + } + } + }, + "requestBodies": { + "GeographicSite_Create": { + "description": "The GeographicSite to be created", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/GeographicSite_Create" + }, + "examples": { + "Create_a_new_GeographicSite": { + "$ref": "#/components/examples/Create_a_new_GeographicSite_request" + } + } + } + }, + "required": true + }, + "GeographicSite_Update": { + "description": "The GeographicSite to be patched", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/GeographicSite_Update" + } + }, + "application/merge-patch+json": { + "schema": { + "$ref": "#/components/schemas/GeographicSite_Update" + }, + "examples": { + "updateGeoSite_using_merge-patch_json": { + "$ref": "#/components/examples/updateGeoSite_using_merge-patch_json_request" + } + } + }, + "application/json-patch+json": { + "schema": { + "$ref": "#/components/schemas/JsonPatch" + }, + "examples": { + "updateGeoSite_using_json-patch_query": { + "$ref": "#/components/examples/updateGeoSite_using_json-patch_query_request" + } + } + }, + "application/json-patch-query+json": { + "schema": { + "$ref": "#/components/schemas/JsonPatch" + } + } + }, + "required": true + }, + "EventSubscriptionInput": { + "description": "Data containing the callback endpoint to deliver the information", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/EventSubscriptionInput" + } + } + }, + "required": true + } + }, + "responses": { + "204": { + "description": "Deleted", + "content": {} + }, + "200GeographicSiteArray": { + "description": "Success", + "headers": { + "X-Total-Count": { + "$ref": "#/components/headers/X-Total-Count" + }, + "X-Result-Count": { + "$ref": "#/components/headers/X-Result-Count" + } + }, + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "$ref": "#/components/schemas/GeographicSite" + } + }, + "examples": { + "RetrieveGeoSiteByList": { + "$ref": "#/components/examples/RetrieveGeoSiteByList_response" + }, + "RetrieveGeoSiteByListwithFieldsSelection": { + "$ref": "#/components/examples/RetrieveGeoSiteByListwithFieldsSelection_response" + } + } + } + } + }, + "200GeographicSite_Get": { + "description": "Success", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/GeographicSite" + }, + "examples": { + "RetrieveGeographicSiteById_1": { + "$ref": "#/components/examples/RetrieveGeographicSiteById_1_response" + }, + "RetrieveGeographicSiteById_2": { + "$ref": "#/components/examples/RetrieveGeographicSiteById_2_response" + } + } + } + } + }, + "200GeographicSite_Patch": { + "description": "Success", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/GeographicSite" + } + }, + "application/merge-patch+json": { + "schema": { + "$ref": "#/components/schemas/GeographicSite" + }, + "examples": { + "updateGeoSite_using_merge-patch_json": { + "$ref": "#/components/examples/updateGeoSite_using_merge-patch_json_response" + } + } + }, + "application/json-patch+json": { + "schema": { + "oneOf": [ + { + "$ref": "#/components/schemas/GeographicSite" + }, + { + "type": "array", + "items": { + "$ref": "#/components/schemas/GeographicSite" + } + }, + { + "type": "string", + "nullable": true + } + ] + }, + "examples": { + "updateGeoSite_using_json-patch_query": { + "$ref": "#/components/examples/updateGeoSite_using_json-patch_query_response" + } + } + }, + "application/json-patch-query+json": { + "schema": { + "oneOf": [ + { + "$ref": "#/components/schemas/GeographicSite" + }, + { + "type": "array", + "items": { + "$ref": "#/components/schemas/GeographicSite" + } + }, + { + "type": "string", + "nullable": true + } + ] + } + } + } + }, + "200GeographicSite_Put": { + "description": "Success", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/GeographicSite" + } + } + } + }, + "201GeographicSite": { + "description": "Created", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/GeographicSite" + }, + "examples": { + "Create_a_new_GeographicSite": { + "$ref": "#/components/examples/Create_a_new_GeographicSite_response" + } + } + } + } + }, + "Error": { + "description": "Error", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error" + } + } + } + }, + "EventSubscription": { + "description": "Notified", + "content": { + "application/json;charset=utf-8": { + "schema": { + "$ref": "#/components/schemas/EventSubscription" + } + } + } + } + }, + "headers": { + "X-Total-Count": { + "description": "Total number of items matching criteria", + "schema": { + "type": "integer" + } + }, + "X-Result-Count": { + "description": "Actual number of items returned in the response body", + "schema": { + "type": "integer" + } + } + }, + "securitySchemes": {}, + "examples": { + "RetrieveGeographicSiteById_1_response": { + "value": { + "id": "sd65-8874", + "href": "https://host:port/geographicSiteManagement/v4/geographicSite/sd65-8874", + "code": "Warehouse", + "description": "Warehouse in Marseille", + "status": "active", + "calendar": [ + { + "day": "weeekdays", + "status": "open", + "timeZone": "GMT+1", + "hourPeriod": [ + { + "endHour": "16:30 pm", + "startHour": "6:30 am", + "@type": "HourPeriod" + } + ], + "@type": "Calendar" + } + ], + "place": [ + { + "id": "9912", + "href": "https://host:port/geographicAddressManagement/v4/geographicAddress/9912", + "@type": "PlaceRef", + "@referredType": "GeographicAddress" + } + ], + "relatedParty": [ + { + "id": "45", + "href": "https://host:port/partyManagement/v4/individual/45", + "name": "Jean Pontus", + "role": "Warehouse manager", + "@type": "RelatedParty", + "@referredType": "Individual" + } + ], + "siteRelationship": [ + { + "id": "4589-jj65", + "href": "string", + "relationshipType": "support", + "role": "support site in case of stock shortage", + "validFor": { + "endDateTime": "2019-01-02T09:33:35.749Z", + "startDateTime": "2023-12-31T09:33:35.749Z" + }, + "@type": "SiteRelationship" + } + ], + "@type": "GeographicSite" + }, + "description": "GeographicSite representation." + }, + "RetrieveGeographicSiteById_2_response": { + "value": { + "id": "sd65-4444", + "href": "https://host:port/geographicSiteManagement/v4/geographicSite/sd65-4444", + "code": "Warehouse", + "description": "Warehouse in Bordeaux", + "creationDate": "2021-08-26T07:36:54.773Z", + "status": "active", + "externalIdentifier": [ + { + "@type": "ExternalIdentifier", + "owner": "Supply chain", + "externalIdentifierType": "Warehouse Identifier", + "id": "BOD4" + } + ], + "calendar": [ + { + "day": "weeekdays", + "status": "open", + "timeZone": "GMT+1", + "hourPeriod": [ + { + "endHour": "16:45 pm", + "startHour": "6:15 am", + "@type": "HourPeriod" + } + ], + "@type": "Calendar" + } + ], + "place": [ + { + "@type": "GeographicAddress", + "geographicAddress": { + "streetNr": "48", + "streetName": "Kieser", + "streetType": "rue", + "postcode": "33000", + "locality": "Bordeaux", + "city": "Bordeaux", + "stateOrProvince": "Gironde", + "country": "France" + } + } + ], + "relatedParty": [ + { + "id": "99", + "href": "https://host:port/partyManagement/v4/individual/99", + "name": "Louise Pontus", + "role": "Warehouse manager", + "@type": "RelatedParty", + "@referredType": "Individual" + } + ], + "@type": "GeographicSite" + }, + "description": "GeographicSite representation." + }, + "RetrieveGeoSiteByList_response": { + "value": [ + { + "id": "sd65-8874", + "href": "https://host:port/geographicSiteManagement/v4/geographicSite/sd65-8874", + "code": "Warehouse", + "description": "Warehouse in Marseille", + "status": "active", + "calendar": [ + { + "day": "weeekdays", + "status": "open", + "timeZone": "GMT+1", + "hourPeriod": [ + { + "endHour": "16:30 pm", + "startHour": "6:30 am", + "@type": "HourPeriod" + } + ], + "@type": "Calendar" + } + ], + "place": [ + { + "id": "9912", + "href": "https://host:port/geographicAddressManagement/v4/geographicAddress/9912", + "@type": "PlaceRef", + "@referredType": "GeographicAddress" + } + ], + "relatedParty": [ + { + "id": "45", + "href": "https://host:port/partyManagement/v4/individual/45", + "name": "Jean Pontus", + "role": "Warehouse manager", + "@type": "RelatedParty", + "@referredType": "Individual" + } + ], + "siteRelationship": [ + { + "id": "4589-jj65", + "href": "string", + "relationshipType": "support", + "role": "support site in case of stock shortage", + "validFor": { + "endDateTime": "2019-01-02T09:33:35.749Z", + "startDateTime": "2023-12-31T09:33:35.749Z" + }, + "@type": "SiteRelationship" + } + ], + "@type": "GeographicSite" + }, + { + "id": "sd65-4444", + "href": "https://host:port/geographicSiteManagement/v4/geographicSite/sd65-4444", + "code": "Warehouse", + "description": "Warehouse in Bordeaux", + "creationDate": "2021-08-26T07:36:54.773Z", + "status": "active", + "externalIdentifier": [ + { + "@type": "ExternalIdentifier", + "owner": "Supply chain", + "externalIdentifierType": "Warehouse Identifier", + "id": "BOD4" + } + ], + "calendar": [ + { + "day": "weeekdays", + "status": "open", + "timeZone": "GMT+1", + "hourPeriod": [ + { + "endHour": "16:45 pm", + "startHour": "6:15 am", + "@type": "HourPeriod" + } + ], + "@type": "Calendar" + } + ], + "place": [ + { + "@type": "GeographicAddress", + "geographicAddress": { + "streetNr": "48", + "streetName": "Kieser", + "streetType": "rue", + "postcode": "33000", + "locality": "Bordeaux", + "city": "Bordeaux", + "stateOrProvince": "Gironde", + "country": "France" + } + } + ], + "relatedParty": [ + { + "id": "99", + "href": "https://host:port/partyManagement/v4/individual/99", + "name": "Louise Pontus", + "role": "Warehouse manager", + "@type": "RelatedParty", + "@referredType": "Individual" + } + ], + "@type": "GeographicSite" + } + ], + "description": "A collection of GeographicSite representation" + }, + "RetrieveGeoSiteByListwithFieldsSelection_response": { + "value": [ + { + "id": "6987", + "href": "https://host:port/geographicSiteManagement/v4/geographicSite/sd65-8874", + "name": "Marseille Warehouse", + "@type": "GeographicSite" + }, + { + "id": "7412", + "href": "https://host:port/geographicSiteManagement/v4/geographicSite/sd65-885l", + "name": "Paris Nord Warehouse", + "@type": "GeographicSite" + }, + { + "id": "3214", + "href": "https://host:port/geographicSiteManagement/v4/geographicSite/sd65-8814", + "name": "Bordeaux Warehouse", + "@type": "GeographicSite" + }, + { + "id": "6547", + "href": "https://host:port/geographicSiteManagement/v4/geographicSite/sd65-547", + "name": "Lille Warehouse", + "@type": "GeographicSite" + } + ], + "description": "A collection of GeographicSite representation" + }, + "Create_a_new_GeographicSite_request": { + "value": { + "code": "Warehouse", + "description": "Warehouse in Bordeaux", + "status": "active", + "externalIdentifier": [ + { + "@type": "ExternalIdentifier", + "owner": "Supply chain", + "externalIdentifierType": "Warehouse Identifier", + "id": "BOD4" + } + ], + "calendar": [ + { + "day": "weeekdays", + "status": "open", + "timeZone": "GMT+1", + "hourPeriod": [ + { + "endHour": "16:45 pm", + "startHour": "6:15 am", + "@type": "HourPeriod" + } + ], + "@type": "Calendar" + } + ], + "place": [ + { + "@type": "GeographicAddress", + "geographicAddress": { + "streetNr": "48", + "streetName": "Kieser", + "streetType": "rue", + "postcode": "33000", + "locality": "Bordeaux", + "city": "Bordeaux", + "stateOrProvince": "Gironde", + "country": "France" + } + } + ], + "relatedParty": [ + { + "id": "99", + "name": "Louise Pontus", + "role": "Warehouse manager", + "@referredType": "Individual" + } + ], + "@type": "GeographicSite" + }, + "description": "POST GeographicSite Request Example" + }, + "Create_a_new_GeographicSite_response": { + "value": { + "id": "sd65-4444", + "href": "https://host:port/geographicSiteManagement/v4/geographicSite/sd65-4444", + "code": "Warehouse", + "description": "Warehouse in Bordeaux", + "creationDate": "2021-08-26T07:36:54.773Z", + "status": "active", + "externalIdentifier": [ + { + "@type": "ExternalIdentifier", + "owner": "Supply chain", + "externalIdentifierType": "Warehouse Identifier", + "id": "BOD4" + } + ], + "calendar": [ + { + "day": "weeekdays", + "status": "open", + "timeZone": "GMT+1", + "hourPeriod": [ + { + "endHour": "16:45 pm", + "startHour": "6:15 am", + "@type": "HourPeriod" + } + ], + "@type": "Calendar" + } + ], + "place": [ + { + "@type": "GeographicAddress", + "geographicAddress": { + "streetNr": "48", + "streetName": "Kieser", + "streetType": "rue", + "postcode": "33000", + "locality": "Bordeaux", + "city": "Bordeaux", + "stateOrProvince": "Gironde", + "country": "France" + } + } + ], + "relatedParty": [ + { + "id": "99", + "href": "https://host:port/partyManagement/v4/individual/99", + "name": "Louise Pontus", + "role": "Warehouse manager", + "@type": "RelatedParty", + "@referredType": "Individual" + } + ], + "@type": "GeographicSite" + }, + "description": "POST GeographicSite Response Example." + }, + "updateGeoSite_using_json-patch_query_request": { + "value": [ + { + "op": "replace", + "path": "/calendar/hourPeriod/startHour", + "value": "6:00 am" + } + ], + "description": "PATCH GeographicSite Request Example" + }, + "updateGeoSite_using_json-patch_query_response": { + "value": { + "id": "sd65-8874", + "href": "https://host:port/geographicSiteManagement/v4/geographicSite/sd65-8874", + "code": "Warehouse", + "description": "Warehouse in Marseille", + "status": "active", + "calendar": [ + { + "day": "weeekdays", + "status": "open", + "timeZone": "GMT+1", + "hourPeriod": [ + { + "endHour": "16:30 pm", + "startHour": "6:00 am", + "@type": "HourPeriod" + } + ], + "@type": "Calendar" + } + ], + "place": [ + { + "id": "9912", + "href": "https://host:port/geographicAddressManagement/v4/geographicAddress/9912", + "@type": "PlaceRef", + "@referredType": "GeographicAddress" + } + ], + "relatedParty": [ + { + "id": "45", + "href": "https://host:port/partyManagement/v4/individual/45", + "name": "Jean Pontus", + "role": "Warehouse manager", + "@type": "RelatedParty", + "@referredType": "Individual" + } + ], + "siteRelationship": [ + { + "id": "4589-jj65", + "href": "string", + "relationshipType": "support", + "role": "support site in case of stock shortage", + "validFor": { + "endDateTime": "2019-01-02T09:33:35.749Z", + "startDateTime": "2023-12-31T09:33:35.749Z" + }, + "@type": "SiteRelationship" + } + ], + "@type": "GeographicSite" + }, + "description": "PATCH GeographicSite Response Example." + }, + "updateGeoSite_using_merge-patch_json_request": { + "value": { + "id": "sd65-8874", + "code": "Warehouse", + "description": "Warehouse in Marseille", + "status": "active", + "calendar": [ + { + "day": "weeekdays", + "status": "open", + "timeZone": "GMT+1", + "hourPeriod": [ + { + "endHour": "16:30 pm", + "startHour": "6:00 am", + "@type": "HourPeriod" + } + ], + "@type": "Calendar" + } + ], + "place": [ + { + "id": "9912", + "@type": "PlaceRef", + "@referredType": "GeographicAddress" + } + ], + "relatedParty": [ + { + "id": "45", + "name": "Jean Pontus", + "role": "Warehouse manager", + "@type": "RelatedParty", + "@referredType": "Individual" + } + ], + "siteRelationship": [ + { + "id": "4589-jj65", + "href": "string", + "relationshipType": "support", + "role": "support site in case of stock shortage", + "validFor": { + "endDateTime": "2019-01-02T09:33:35.749Z", + "startDateTime": "2023-12-31T09:33:35.749Z" + }, + "@type": "SiteRelationship" + } + ], + "@type": "GeographicSite" + }, + "description": "PATCH GeographicSite Request Example" + }, + "updateGeoSite_using_merge-patch_json_response": { + "value": { + "id": "sd65-8874", + "href": "https://host:port/geographicSiteManagement/v4/geographicSite/sd65-8874", + "code": "Warehouse", + "description": "Warehouse in Marseille", + "status": "active", + "calendar": [ + { + "day": "weeekdays", + "status": "open", + "timeZone": "GMT+1", + "hourPeriod": [ + { + "endHour": "16:30 pm", + "startHour": "6:00 am", + "@type": "HourPeriod" + } + ], + "@type": "Calendar" + } + ], + "place": [ + { + "id": "9912", + "href": "https://host:port/geographicAddressManagement/v4/geographicAddress/9912", + "@type": "PlaceRef", + "@referredType": "GeographicAddress" + } + ], + "relatedParty": [ + { + "id": "45", + "href": "https://host:port/partyManagement/v4/individual/45", + "name": "Jean Pontus", + "role": "Warehouse manager", + "@type": "RelatedParty", + "@referredType": "Individual" + } + ], + "siteRelationship": [ + { + "id": "4589-jj65", + "href": "string", + "relationshipType": "support", + "role": "support site in case of stock shortage", + "validFor": { + "endDateTime": "2019-01-02T09:33:35.749Z", + "startDateTime": "2023-12-31T09:33:35.749Z" + }, + "@type": "SiteRelationship" + } + ], + "@type": "GeographicSite" + }, + "description": "PATCH GeographicSite Response Example." + } + } + } +} \ No newline at end of file -- GitLab From 721c4c991fe8d40897dbb268e8f3a9617fd6d451 Mon Sep 17 00:00:00 2001 From: lpapadopoulos Date: Mon, 20 May 2024 12:59:09 +0300 Subject: [PATCH 03/18] add new fields for location management --- .../edit-individuals.component.html | 86 +++++++++++++++---- .../edit-individuals.component.ts | 25 ++++-- 2 files changed, 85 insertions(+), 26 deletions(-) diff --git a/src/app/shared/components/partyManagement/edit-individuals/edit-individuals.component.html b/src/app/shared/components/partyManagement/edit-individuals/edit-individuals.component.html index 73905be..5518d0a 100644 --- a/src/app/shared/components/partyManagement/edit-individuals/edit-individuals.component.html +++ b/src/app/shared/components/partyManagement/edit-individuals/edit-individuals.component.html @@ -1,10 +1,10 @@
- +
- +
@@ -43,7 +43,7 @@ Given Name - + Location @@ -53,7 +53,7 @@ Organization - +
Contact Details
@@ -71,27 +71,77 @@ - + - + phonePhone - -
+
- +
Geographic Site Details
+
+ + + City + + + + + + + Email + + + + + + + Phone + + + + + + City + + + + + + + Email + + + + + + + Phone + + + + + + Phone + + + +
+ + +
diff --git a/src/app/shared/components/partyManagement/edit-individuals/edit-individuals.component.ts b/src/app/shared/components/partyManagement/edit-individuals/edit-individuals.component.ts index aedc7fb..bead41a 100644 --- a/src/app/shared/components/partyManagement/edit-individuals/edit-individuals.component.ts +++ b/src/app/shared/components/partyManagement/edit-individuals/edit-individuals.component.ts @@ -41,9 +41,18 @@ export class EditIndividualsComponent implements OnInit { city: new FormControl(), emailAddress: new FormControl(), phoneNumber: new FormControl() - }) + }), + geographicSiteInfo: new FormGroup({ + locality: new FormControl(), + postcode: new FormControl(), + stateOrProvince: new FormControl(), + streetNr: new FormControl(), + city: new FormControl(), + country: new FormControl(), + streetName: new FormControl(), + }) }) - + predefinedOrganizationCtrl = new FormControl() customOrganizationCtrl = new FormControl() @@ -56,12 +65,12 @@ export class EditIndividualsComponent implements OnInit { newIndividual = false subscriptions = new Subscription() - + ngOnInit() { // this.retrieveOrganizations() this.routerEventsSubscription() - if (this.activatedRoute.snapshot.params.id) + if (this.activatedRoute.snapshot.params.id) { this.individualID = this.activatedRoute.snapshot.params.id if (this.authService.portalUser && this.authService.portalUser.id === this.individualID) { @@ -69,7 +78,7 @@ export class EditIndividualsComponent implements OnInit { } this.retrieveIndividual() } else { - // this.initNewOrganizationFormArray() + // this.initNewOrganizationFormArray() this.newIndividual = true } @@ -118,10 +127,10 @@ export class EditIndividualsComponent implements OnInit { } //prefefined Organization in Related Party - + // } - + ) } @@ -156,7 +165,7 @@ export class EditIndividualsComponent implements OnInit { this.refreshIndividual(updatedIndividual) } ) - } + } else { this.individualService.patchIndividual({id: this.individual.id, individual: updateObj}).subscribe( data => { updatedIndividual = data }, -- GitLab From 5f6fdafb2568bca578691ef74ae1844d5b6f178c Mon Sep 17 00:00:00 2001 From: lpapadopoulos Date: Mon, 20 May 2024 13:41:55 +0300 Subject: [PATCH 04/18] fix export api configuration class --- src/app/openApis/geographicSiteManagement/api-configuration.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/app/openApis/geographicSiteManagement/api-configuration.ts b/src/app/openApis/geographicSiteManagement/api-configuration.ts index c04761c..63c5fb5 100644 --- a/src/app/openApis/geographicSiteManagement/api-configuration.ts +++ b/src/app/openApis/geographicSiteManagement/api-configuration.ts @@ -164,8 +164,8 @@ export class Configuration { return encodeURIComponent(String(value)); } +} export class ApiConfiguration { rootUrl: string = '//portal.openslice.io/osapi'; } -} -- GitLab From e006355bf36835f193cea7c2ba68af9c04226b27 Mon Sep 17 00:00:00 2001 From: lpapadopoulos Date: Mon, 20 May 2024 18:44:44 +0300 Subject: [PATCH 05/18] add validation for null portalUserJwt value --- src/app/shared/components/redirect/redirect.component.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/app/shared/components/redirect/redirect.component.ts b/src/app/shared/components/redirect/redirect.component.ts index 9936f6c..003fe2c 100644 --- a/src/app/shared/components/redirect/redirect.component.ts +++ b/src/app/shared/components/redirect/redirect.component.ts @@ -18,11 +18,12 @@ export class RedirectComponent implements OnInit { ngOnInit() { let isTestbedProvider = false; + if(this.authService != null && this.authService.portalUserJWT !=null) { for(var val of this.authService.portalUserJWT.realm_access.roles){ if (val ==='TESTBED_PROVIDER') { isTestbedProvider=true } - } + }} //TODO insert redirection logic const activePortal = localStorage.getItem('active_portal') -- GitLab From 9eb60b6bca156d3a18e89cd2f807251dba4e7b95 Mon Sep 17 00:00:00 2001 From: lpapadopoulos Date: Tue, 21 May 2024 18:42:52 +0300 Subject: [PATCH 06/18] Injection fix for tmf 674 --- src/app/shared/services/app.service.ts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/app/shared/services/app.service.ts b/src/app/shared/services/app.service.ts index 029e931..e29e1cc 100644 --- a/src/app/shared/services/app.service.ts +++ b/src/app/shared/services/app.service.ts @@ -41,8 +41,8 @@ export class AppService { private tmfResourceCatalogConfig: ResourceCatalogAPIconfig, private tmfResourceInventoryConfig: ResourceInventoryAPIconfig, private resourcePoolManagementAPIconfig: resourcePoolManagementAPIconfig, - private tmfProductCatalogConfig: ProductCatalogAPIconfig, - private tmfGeographicSiteConfig: GeographicSiteManagementAPIconfig + private tmfProductCatalogConfig: ProductCatalogAPIconfig +// private tmfGeographicSiteConfig: GeographicSiteManagementAPIconfig ) { this.setAPIurls() this.recognizePortalDomain() @@ -66,7 +66,7 @@ export class AppService { this.serviceTestManagementAPIconfig.rootUrl = this.config.APITMFURL this.resourcePoolManagementAPIconfig.rootUrl = this.config.APITMFURL this.tmfProductCatalogConfig.rootUrl = this.config.APITMFURL - this.tmfGeographicSiteConfig.rootUrl = this.config.APITMFURL +// this.tmfGeographicSiteConfig.rootUrl = this.config.APITMFURL } //recognition of which portal is used (services/testing/product) -- GitLab From dcdff5e6c7b25ea037f5180bdd120ef89c25a31e Mon Sep 17 00:00:00 2001 From: lpapadopoulos Date: Thu, 23 May 2024 11:27:17 +0300 Subject: [PATCH 07/18] Edit individual form --- .../api-configuration.ts | 343 +++++++++--------- .../geographicSiteManagement/api.module.ts | 61 ++-- .../geographicSiteManagement/base-service.ts | 63 ++++ .../model/geographicAddressValue.ts | 2 +- .../model/geographicSiteCreate.ts | 2 +- .../model/geographicSiteUpdate.ts | 2 +- .../model/geographicSubAddressValue.ts | 2 +- .../model/placeRef.ts | 2 +- .../model/placeRefOrValue.ts | 6 +- .../model/relatedParty.ts | 2 +- .../geographicSiteManagement/services.ts | 1 + .../services/eventsSubscription.service.ts | 38 +- .../services/geographicSite.service.ts | 243 ++++++------- .../services/notificationListener.service.ts | 74 ++-- .../edit-individuals.component.html | 110 +++++- .../edit-individuals.component.ts | 157 +++++++- .../components/redirect/redirect.component.ts | 1 + src/app/shared/services/app.service.ts | 6 +- src/app/shared/services/auth.service.ts | 12 + 19 files changed, 730 insertions(+), 397 deletions(-) create mode 100644 src/app/openApis/geographicSiteManagement/base-service.ts create mode 100644 src/app/openApis/geographicSiteManagement/services.ts diff --git a/src/app/openApis/geographicSiteManagement/api-configuration.ts b/src/app/openApis/geographicSiteManagement/api-configuration.ts index 63c5fb5..7072a70 100644 --- a/src/app/openApis/geographicSiteManagement/api-configuration.ts +++ b/src/app/openApis/geographicSiteManagement/api-configuration.ts @@ -1,171 +1,186 @@ import { HttpParameterCodec } from '@angular/common/http'; import { Param } from './param'; +import { Injectable, Inject } from '@angular/core'; -export interface ConfigurationParameters { - /** - * @deprecated Since 5.0. Use credentials instead - */ - apiKeys?: {[ key: string ]: string}; - username?: string; - password?: string; - /** - * @deprecated Since 5.0. Use credentials instead - */ - accessToken?: string | (() => string); - basePath?: string; - withCredentials?: boolean; - /** - * Takes care of encoding query- and form-parameters. - */ - encoder?: HttpParameterCodec; - /** - * Override the default method for encoding path parameters in various - * styles. - *

- * See {@link README.md} for more details - *

- */ - encodeParam?: (param: Param) => string; - /** - * The keys are the names in the securitySchemes section of the OpenAPI - * document. They should map to the value used for authentication - * minus any standard prefixes such as 'Basic' or 'Bearer'. - */ - credentials?: {[ key: string ]: string | (() => string | undefined)}; -} - -export class Configuration { - /** - * @deprecated Since 5.0. Use credentials instead - */ - apiKeys?: {[ key: string ]: string}; - username?: string; - password?: string; - /** - * @deprecated Since 5.0. Use credentials instead - */ - accessToken?: string | (() => string); - basePath?: string; - withCredentials?: boolean; - /** - * Takes care of encoding query- and form-parameters. - */ - encoder?: HttpParameterCodec; - /** - * Encoding of various path parameter - * styles. - *

- * See {@link README.md} for more details - *

- */ - encodeParam: (param: Param) => string; - /** - * The keys are the names in the securitySchemes section of the OpenAPI - * document. They should map to the value used for authentication - * minus any standard prefixes such as 'Basic' or 'Bearer'. - */ - credentials: {[ key: string ]: string | (() => string | undefined)}; - - constructor(configurationParameters: ConfigurationParameters = {}) { - this.apiKeys = configurationParameters.apiKeys; - this.username = configurationParameters.username; - this.password = configurationParameters.password; - this.accessToken = configurationParameters.accessToken; - this.basePath = configurationParameters.basePath; - this.withCredentials = configurationParameters.withCredentials; - this.encoder = configurationParameters.encoder; - if (configurationParameters.encodeParam) { - this.encodeParam = configurationParameters.encodeParam; - } - else { - this.encodeParam = param => this.defaultEncodeParam(param); - } - if (configurationParameters.credentials) { - this.credentials = configurationParameters.credentials; - } - else { - this.credentials = {}; - } - } - - /** - * Select the correct content-type to use for a request. - * Uses {@link Configuration#isJsonMime} to determine the correct content-type. - * If no content type is found return the first found type if the contentTypes is not empty - * @param contentTypes - the array of content types that are available for selection - * @returns the selected content-type or undefined if no selection could be made. - */ - public selectHeaderContentType (contentTypes: string[]): string | undefined { - if (contentTypes.length === 0) { - return undefined; - } - - const type = contentTypes.find((x: string) => this.isJsonMime(x)); - if (type === undefined) { - return contentTypes[0]; - } - return type; - } - - /** - * Select the correct accept content-type to use for a request. - * Uses {@link Configuration#isJsonMime} to determine the correct accept content-type. - * If no content type is found return the first found type if the contentTypes is not empty - * @param accepts - the array of content types that are available for selection. - * @returns the selected content-type or undefined if no selection could be made. - */ - public selectHeaderAccept(accepts: string[]): string | undefined { - if (accepts.length === 0) { - return undefined; - } - const type = accepts.find((x: string) => this.isJsonMime(x)); - if (type === undefined) { - return accepts[0]; - } - return type; - } - - /** - * Check if the given MIME is a JSON MIME. - * JSON MIME examples: - * application/json - * application/json; charset=UTF8 - * APPLICATION/JSON - * application/vnd.company+json - * @param mime - MIME (Multipurpose Internet Mail Extensions) - * @return True if the given MIME is JSON, false otherwise. - */ - public isJsonMime(mime: string): boolean { - const jsonMime: RegExp = new RegExp('^(application\/json|[^;/ \t]+\/[^;/ \t]+[+]json)[ \t]*(;.*)?$', 'i'); - return mime !== null && (jsonMime.test(mime) || mime.toLowerCase() === 'application/json-patch+json'); - } - - public lookupCredential(key: string): string | undefined { - const value = this.credentials[key]; - return typeof value === 'function' - ? value() - : value; - } - - private defaultEncodeParam(param: Param): string { - // This implementation exists as fallback for missing configuration - // and for backwards compatibility to older typescript-angular generator versions. - // It only works for the 'simple' parameter style. - // Date-handling only works for the 'date-time' format. - // All other styles and Date-formats are probably handled incorrectly. - // - // But: if that's all you need (i.e.: the most common use-case): no need for customization! - - const value = param.dataFormat === 'date-time' && param.value instanceof Date - ? (param.value as Date).toISOString() - : param.value; - - return encodeURIComponent(String(value)); - } +// export interface ConfigurationParameters { +// /** +// * @deprecated Since 5.0. Use credentials instead +// */ +// apiKeys?: {[ key: string ]: string}; +// username?: string; +// password?: string; +// /** +// * @deprecated Since 5.0. Use credentials instead +// */ +// accessToken?: string | (() => string); +// basePath?: string; +// withCredentials?: boolean; +// /** +// * Takes care of encoding query- and form-parameters. +// */ +// encoder?: HttpParameterCodec; +// /** +// * Override the default method for encoding path parameters in various +// * styles. +// *

+// * See {@link README.md} for more details +// *

+// */ +// encodeParam?: (param: Param) => string; +// /** +// * The keys are the names in the securitySchemes section of the OpenAPI +// * document. They should map to the value used for authentication +// * minus any standard prefixes such as 'Basic' or 'Bearer'. +// */ +// credentials?: {[ key: string ]: string | (() => string | undefined)}; +// } +// +// @Injectable({ +// providedIn: 'root', +// }) +// export class ApiConfiguration { +// /** +// * @deprecated Since 5.0. Use credentials instead +// */ +// apiKeys?: {[ key: string ]: string}; +// username?: string; +// password?: string; +// /** +// * @deprecated Since 5.0. Use credentials instead +// */ +// accessToken?: string | (() => string); +// basePath?: string; +// withCredentials?: boolean; +// /** +// * Takes care of encoding query- and form-parameters. +// */ +// encoder?: HttpParameterCodec; +// /** +// * Encoding of various path parameter +// * styles. +// *

+// * See {@link README.md} for more details +// *

+// */ +// encodeParam: (param: Param) => string; +// /** +// * The keys are the names in the securitySchemes section of the OpenAPI +// * document. They should map to the value used for authentication +// * minus any standard prefixes such as 'Basic' or 'Bearer'. +// */ +// credentials: {[ key: string ]: string | (() => string | undefined)}; +// +// constructor(configurationParameters: ConfigurationParameters = {}) { +// this.apiKeys = configurationParameters.apiKeys; +// this.username = configurationParameters.username; +// this.password = configurationParameters.password; +// this.accessToken = configurationParameters.accessToken; +// this.basePath = configurationParameters.basePath; +// this.withCredentials = configurationParameters.withCredentials; +// this.encoder = configurationParameters.encoder; +// if (configurationParameters.encodeParam) { +// this.encodeParam = configurationParameters.encodeParam; +// } +// else { +// this.encodeParam = param => this.defaultEncodeParam(param); +// } +// if (configurationParameters.credentials) { +// this.credentials = configurationParameters.credentials; +// } +// else { +// this.credentials = {}; +// } +// } +// +// /** +// * Select the correct content-type to use for a request. +// * Uses {@link Configuration#isJsonMime} to determine the correct content-type. +// * If no content type is found return the first found type if the contentTypes is not empty +// * @param contentTypes - the array of content types that are available for selection +// * @returns the selected content-type or undefined if no selection could be made. +// */ +// public selectHeaderContentType (contentTypes: string[]): string | undefined { +// if (contentTypes.length === 0) { +// return undefined; +// } +// +// const type = contentTypes.find((x: string) => this.isJsonMime(x)); +// if (type === undefined) { +// return contentTypes[0]; +// } +// return type; +// } +// +// /** +// * Select the correct accept content-type to use for a request. +// * Uses {@link Configuration#isJsonMime} to determine the correct accept content-type. +// * If no content type is found return the first found type if the contentTypes is not empty +// * @param accepts - the array of content types that are available for selection. +// * @returns the selected content-type or undefined if no selection could be made. +// */ +// public selectHeaderAccept(accepts: string[]): string | undefined { +// if (accepts.length === 0) { +// return undefined; +// } +// +// const type = accepts.find((x: string) => this.isJsonMime(x)); +// if (type === undefined) { +// return accepts[0]; +// } +// return type; +// } +// +// /** +// * Check if the given MIME is a JSON MIME. +// * JSON MIME examples: +// * application/json +// * application/json; charset=UTF8 +// * APPLICATION/JSON +// * application/vnd.company+json +// * @param mime - MIME (Multipurpose Internet Mail Extensions) +// * @return True if the given MIME is JSON, false otherwise. +// */ +// public isJsonMime(mime: string): boolean { +// const jsonMime: RegExp = new RegExp('^(application\/json|[^;/ \t]+\/[^;/ \t]+[+]json)[ \t]*(;.*)?$', 'i'); +// return mime !== null && (jsonMime.test(mime) || mime.toLowerCase() === 'application/json-patch+json'); +// } +// +// public lookupCredential(key: string): string | undefined { +// const value = this.credentials[key]; +// return typeof value === 'function' +// ? value() +// : value; +// } +// +// private defaultEncodeParam(param: Param): string { +// // This implementation exists as fallback for missing configuration +// // and for backwards compatibility to older typescript-angular generator versions. +// // It only works for the 'simple' parameter style. +// // Date-handling only works for the 'date-time' format. +// // All other styles and Date-formats are probably handled incorrectly. +// // +// // But: if that's all you need (i.e.: the most common use-case): no need for customization! +// +// const value = param.dataFormat === 'date-time' && param.value instanceof Date +// ? (param.value as Date).toISOString() +// : param.value; +// +// return encodeURIComponent(String(value)); +// } +// +// } + // export class ApiConfiguration { + // rootUrl: string = '//portal.openslice.io/osapi'; + // } +@Injectable({ + providedIn: 'root', +}) +export class ApiConfiguration { + rootUrl: string = '//portal.openslice.io/tmf-api'; } - export class ApiConfiguration { - rootUrl: string = '//portal.openslice.io/osapi'; - } +export interface ApiConfigurationInterface { + rootUrl?: string; +} diff --git a/src/app/openApis/geographicSiteManagement/api.module.ts b/src/app/openApis/geographicSiteManagement/api.module.ts index 58d341f..f555ac7 100644 --- a/src/app/openApis/geographicSiteManagement/api.module.ts +++ b/src/app/openApis/geographicSiteManagement/api.module.ts @@ -1,30 +1,49 @@ -import { NgModule, ModuleWithProviders, SkipSelf, Optional } from '@angular/core'; -import { Configuration } from './configuration'; -import { HttpClient } from '@angular/common/http'; +import { NgModule, ModuleWithProviders} from '@angular/core'; +import { ApiConfiguration, ApiConfigurationInterface } from './api-configuration'; +import { HttpClientModule } from '@angular/common/http'; +import { EventsSubscriptionService } from './services/events-subscription.service'; +import { GeographicSiteService } from './services/geographicSite.service'; +import { NotificationListenerService } from './services/notificationListener.service'; @NgModule({ - imports: [], + imports: [HttpClientModule], declarations: [], - exports: [], - providers: [] + exports: [HttpClientModule], + providers: [ ApiConfiguration, + EventsSubscriptionService, + GeographicSiteService, + NotificationListenerService] }) export class ApiModule { - public static forRoot(configurationFactory: () => Configuration): ModuleWithProviders { - return { - ngModule: ApiModule, - providers: [ { provide: Configuration, useFactory: configurationFactory } ] - }; - } - - constructor( @Optional() @SkipSelf() parentModule: ApiModule, - @Optional() http: HttpClient) { - if (parentModule) { - throw new Error('ApiModule is already loaded. Import in your base AppModule only.'); - } - if (!http) { - throw new Error('You need to import the HttpClientModule in your AppModule! \n' + - 'See also https://github.com/angular/angular/issues/20575'); + static forRoot(customParams: ApiConfigurationInterface): ModuleWithProviders { + return { + ngModule: ApiModule, + providers: [ + { + provide: ApiConfiguration, + useValue: {rootUrl: customParams.rootUrl} } + ] } + } } +// export class ApiModule { +// public static forRoot(configurationFactory: () => Configuration): ModuleWithProviders { +// return { +// ngModule: ApiModule, +// providers: [ { provide: Configuration, useFactory: configurationFactory } ] +// }; +// } +// +// constructor( @Optional() @SkipSelf() parentModule: ApiModule, +// @Optional() http: HttpClient) { +// if (parentModule) { +// throw new Error('ApiModule is already loaded. Import in your base AppModule only.'); +// } +// if (!http) { +// throw new Error('You need to import the HttpClientModule in your AppModule! \n' + +// 'See also https://github.com/angular/angular/issues/20575'); +// } +// } +// } diff --git a/src/app/openApis/geographicSiteManagement/base-service.ts b/src/app/openApis/geographicSiteManagement/base-service.ts new file mode 100644 index 0000000..ee9c3ce --- /dev/null +++ b/src/app/openApis/geographicSiteManagement/base-service.ts @@ -0,0 +1,63 @@ +/* tslint:disable */ +import { HttpClient, HttpParameterCodec, HttpParams } from '@angular/common/http'; +import { ApiConfiguration } from './api-configuration'; + +/** + * Custom parameter codec to correctly handle the plus sign in parameter + * values. See https://github.com/angular/angular/issues/18261 + */ +class ParameterCodec implements HttpParameterCodec { + encodeKey(key: string): string { + return encodeURIComponent(key); + } + + encodeValue(value: string): string { + return encodeURIComponent(value); + } + + decodeKey(key: string): string { + return decodeURIComponent(key); + } + + decodeValue(value: string): string { + return decodeURIComponent(value); + } +} +const PARAMETER_CODEC = new ParameterCodec(); + +/** + * Base class for API services + */ +export class BaseService { + constructor( + protected config: ApiConfiguration, + protected http: HttpClient + ) { + } + + private _rootUrl: string = ''; + + /** + * Returns the root url for API operations. If not set directly in this + * service, will fallback to ApiConfiguration.rootUrl. + */ + get rootUrl(): string { + return this._rootUrl || this.config.rootUrl; + } + + /** + * Sets the root URL for API operations in this service. + */ + set rootUrl(rootUrl: string) { + this._rootUrl = rootUrl; + } + + /** + * Creates a new `HttpParams` with the correct codec + */ + protected newParams(): HttpParams { + return new HttpParams({ + encoder: PARAMETER_CODEC + }); + } +} diff --git a/src/app/openApis/geographicSiteManagement/model/geographicAddressValue.ts b/src/app/openApis/geographicSiteManagement/model/geographicAddressValue.ts index 707ed19..181f7a1 100644 --- a/src/app/openApis/geographicSiteManagement/model/geographicAddressValue.ts +++ b/src/app/openApis/geographicSiteManagement/model/geographicAddressValue.ts @@ -17,7 +17,7 @@ export interface GeographicAddressValue extends PlaceRefOrValue { /** * When sub-classing, this defines the sub-class Extensible name */ - type: string; + type?: string; /** * When sub-classing, this defines the super-class */ diff --git a/src/app/openApis/geographicSiteManagement/model/geographicSiteCreate.ts b/src/app/openApis/geographicSiteManagement/model/geographicSiteCreate.ts index bdc0f2a..ea69a95 100644 --- a/src/app/openApis/geographicSiteManagement/model/geographicSiteCreate.ts +++ b/src/app/openApis/geographicSiteManagement/model/geographicSiteCreate.ts @@ -20,7 +20,7 @@ export interface GeographicSiteCreate { /** * When sub-classing, this defines the sub-class Extensible name */ - type: string; + '@type'?: string; /** * When sub-classing, this defines the super-class */ diff --git a/src/app/openApis/geographicSiteManagement/model/geographicSiteUpdate.ts b/src/app/openApis/geographicSiteManagement/model/geographicSiteUpdate.ts index ee939bd..50507a7 100644 --- a/src/app/openApis/geographicSiteManagement/model/geographicSiteUpdate.ts +++ b/src/app/openApis/geographicSiteManagement/model/geographicSiteUpdate.ts @@ -20,7 +20,7 @@ export interface GeographicSiteUpdate { /** * When sub-classing, this defines the sub-class Extensible name */ - type: string; + type?: string; /** * When sub-classing, this defines the super-class */ diff --git a/src/app/openApis/geographicSiteManagement/model/geographicSubAddressValue.ts b/src/app/openApis/geographicSiteManagement/model/geographicSubAddressValue.ts index f6ff941..24d6365 100644 --- a/src/app/openApis/geographicSiteManagement/model/geographicSubAddressValue.ts +++ b/src/app/openApis/geographicSiteManagement/model/geographicSubAddressValue.ts @@ -16,7 +16,7 @@ export interface GeographicSubAddressValue { /** * When sub-classing, this defines the sub-class Extensible name */ - type: string; + type?: string; /** * When sub-classing, this defines the super-class */ diff --git a/src/app/openApis/geographicSiteManagement/model/placeRef.ts b/src/app/openApis/geographicSiteManagement/model/placeRef.ts index cb57173..0db836f 100644 --- a/src/app/openApis/geographicSiteManagement/model/placeRef.ts +++ b/src/app/openApis/geographicSiteManagement/model/placeRef.ts @@ -12,7 +12,7 @@ import { PlaceRefOrValue } from './placeRefOrValue'; -export interface PlaceRef extends PlaceRefOrValue { +export interface PlaceRef { /** * Identifier of the referred entity. */ diff --git a/src/app/openApis/geographicSiteManagement/model/placeRefOrValue.ts b/src/app/openApis/geographicSiteManagement/model/placeRefOrValue.ts index d860763..3184855 100644 --- a/src/app/openApis/geographicSiteManagement/model/placeRefOrValue.ts +++ b/src/app/openApis/geographicSiteManagement/model/placeRefOrValue.ts @@ -10,12 +10,14 @@ * Do not edit the class manually. */ +import { GeographicAddressValue } from "./geographicAddressValue"; + export interface PlaceRefOrValue { /** * When sub-classing, this defines the sub-class Extensible name */ - type: string; + type?: string; /** * When sub-classing, this defines the super-class */ @@ -24,5 +26,7 @@ export interface PlaceRefOrValue { * A URI to a JSON-Schema file that defines additional attributes and relationships */ schemaLocation?: string; + + geographicAddress?: GeographicAddressValue; } diff --git a/src/app/openApis/geographicSiteManagement/model/relatedParty.ts b/src/app/openApis/geographicSiteManagement/model/relatedParty.ts index 4a86c96..b0c4f34 100644 --- a/src/app/openApis/geographicSiteManagement/model/relatedParty.ts +++ b/src/app/openApis/geographicSiteManagement/model/relatedParty.ts @@ -23,7 +23,7 @@ export interface RelatedParty { /** * The actual type of the target instance when needed for disambiguation. */ - referredType: string; + referredType?: string; /** * Hyperlink reference */ diff --git a/src/app/openApis/geographicSiteManagement/services.ts b/src/app/openApis/geographicSiteManagement/services.ts new file mode 100644 index 0000000..0a26c8b --- /dev/null +++ b/src/app/openApis/geographicSiteManagement/services.ts @@ -0,0 +1 @@ +export { GeographicSiteService } from './services/geographicSite.service'; \ No newline at end of file diff --git a/src/app/openApis/geographicSiteManagement/services/eventsSubscription.service.ts b/src/app/openApis/geographicSiteManagement/services/eventsSubscription.service.ts index 2bf05ce..ac0b9ff 100644 --- a/src/app/openApis/geographicSiteManagement/services/eventsSubscription.service.ts +++ b/src/app/openApis/geographicSiteManagement/services/eventsSubscription.service.ts @@ -25,7 +25,7 @@ import { EventSubscriptionInput } from '../model/eventSubscriptionInput'; // @ts-ignore import { BASE_PATH, COLLECTION_FORMATS } from '../variables'; -import { Configuration } from '../configuration'; +import { Configuration } from '../api-configuration'; @@ -100,10 +100,10 @@ export class EventsSubscriptionService { * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. * @param reportProgress flag to report request and response progress. */ - public registerListener(eventSubscriptionInput: EventSubscriptionInput, observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json;charset=utf-8' | 'application/json', context?: HttpContext, transferCache?: boolean}): Observable; - public registerListener(eventSubscriptionInput: EventSubscriptionInput, observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json;charset=utf-8' | 'application/json', context?: HttpContext, transferCache?: boolean}): Observable>; - public registerListener(eventSubscriptionInput: EventSubscriptionInput, observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json;charset=utf-8' | 'application/json', context?: HttpContext, transferCache?: boolean}): Observable>; - public registerListener(eventSubscriptionInput: EventSubscriptionInput, observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: 'application/json;charset=utf-8' | 'application/json', context?: HttpContext, transferCache?: boolean}): Observable { + public registerListener(eventSubscriptionInput: EventSubscriptionInput, observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json;charset=utf-8' | 'application/json', context?: HttpContext }): Observable; + public registerListener(eventSubscriptionInput: EventSubscriptionInput, observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json;charset=utf-8' | 'application/json', context?: HttpContext}): Observable>; + public registerListener(eventSubscriptionInput: EventSubscriptionInput, observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json;charset=utf-8' | 'application/json', context?: HttpContext}): Observable>; + public registerListener(eventSubscriptionInput: EventSubscriptionInput, observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: 'application/json;charset=utf-8' | 'application/json', context?: HttpContext}): Observable { if (eventSubscriptionInput === null || eventSubscriptionInput === undefined) { throw new Error('Required parameter eventSubscriptionInput was null or undefined when calling registerListener.'); } @@ -128,10 +128,10 @@ export class EventsSubscriptionService { localVarHttpContext = new HttpContext(); } - let localVarTransferCache: boolean | undefined = options && options.transferCache; - if (localVarTransferCache === undefined) { - localVarTransferCache = true; - } + // let localVarTransferCache: boolean | undefined = options && options.transferCache; + // if (localVarTransferCache === undefined) { + // localVarTransferCache = true; + // } // to determine the Content-Type header @@ -163,7 +163,7 @@ export class EventsSubscriptionService { withCredentials: this.configuration.withCredentials, headers: localVarHeaders, observe: observe, - transferCache: localVarTransferCache, + // transferCache: localVarTransferCache, reportProgress: reportProgress } ); @@ -176,10 +176,10 @@ export class EventsSubscriptionService { * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. * @param reportProgress flag to report request and response progress. */ - public unregisterListener(id: string, observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable; - public unregisterListener(id: string, observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable>; - public unregisterListener(id: string, observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable>; - public unregisterListener(id: string, observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable { + public unregisterListener(id: string, observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext}): Observable; + public unregisterListener(id: string, observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext}): Observable>; + public unregisterListener(id: string, observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext}): Observable>; + public unregisterListener(id: string, observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext}): Observable { if (id === null || id === undefined) { throw new Error('Required parameter id was null or undefined when calling unregisterListener.'); } @@ -203,10 +203,10 @@ export class EventsSubscriptionService { localVarHttpContext = new HttpContext(); } - let localVarTransferCache: boolean | undefined = options && options.transferCache; - if (localVarTransferCache === undefined) { - localVarTransferCache = true; - } + // let localVarTransferCache: boolean | undefined = options && options.transferCache; + // if (localVarTransferCache === undefined) { + // localVarTransferCache = true; + // } let responseType_: 'text' | 'json' | 'blob' = 'json'; @@ -228,7 +228,7 @@ export class EventsSubscriptionService { withCredentials: this.configuration.withCredentials, headers: localVarHeaders, observe: observe, - transferCache: localVarTransferCache, + // transferCache: localVarTransferCache, reportProgress: reportProgress } ); diff --git a/src/app/openApis/geographicSiteManagement/services/geographicSite.service.ts b/src/app/openApis/geographicSiteManagement/services/geographicSite.service.ts index 996182e..a0957e2 100644 --- a/src/app/openApis/geographicSiteManagement/services/geographicSite.service.ts +++ b/src/app/openApis/geographicSiteManagement/services/geographicSite.service.ts @@ -17,7 +17,7 @@ import { HttpClient, HttpHeaders, HttpParams, } from '@angular/common/http'; import { CustomHttpParameterCodec } from '../encoder'; import { Observable } from 'rxjs'; - +import { BaseService } from '../base-service'; // @ts-ignore import { GeographicSite } from '../model/geographicSite'; // @ts-ignore @@ -31,7 +31,7 @@ import { PatchGeographicSite200Response } from '../model/patchGeographicSite200R // @ts-ignore import { BASE_PATH, COLLECTION_FORMATS } from '../variables'; -import { Configuration } from '../configuration'; +import { ApiConfiguration } from '../api-configuration'; @@ -42,14 +42,14 @@ export class GeographicSiteService { protected basePath = 'https://serverRoot'; public defaultHeaders = new HttpHeaders(); - public configuration = new Configuration(); + public configuration = new ApiConfiguration(); public encoder: HttpParameterCodec; - constructor(protected httpClient: HttpClient, @Optional()@Inject(BASE_PATH) basePath: string|string[], @Optional() configuration: Configuration) { + constructor(protected httpClient: HttpClient, @Optional()@Inject(BASE_PATH) basePath: string|string[], @Optional() configuration: ApiConfiguration) { if (configuration) { this.configuration = configuration; } - if (typeof this.configuration.basePath !== 'string') { + if (typeof this.configuration.rootUrl !== 'string') { if (Array.isArray(basePath) && basePath.length > 0) { basePath = basePath[0]; } @@ -57,9 +57,9 @@ export class GeographicSiteService { if (typeof basePath !== 'string') { basePath = this.basePath; } - this.configuration.basePath = basePath; + this.configuration.rootUrl = basePath; } - this.encoder = this.configuration.encoder || new CustomHttpParameterCodec(); + this.encoder = new CustomHttpParameterCodec(); } @@ -106,10 +106,10 @@ export class GeographicSiteService { * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. * @param reportProgress flag to report request and response progress. */ - public createGeographicSite(geographicSiteCreate: GeographicSiteCreate, observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable; - public createGeographicSite(geographicSiteCreate: GeographicSiteCreate, observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable>; - public createGeographicSite(geographicSiteCreate: GeographicSiteCreate, observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable>; - public createGeographicSite(geographicSiteCreate: GeographicSiteCreate, observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable { + public createGeographicSite(geographicSiteCreate: GeographicSiteCreate, observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext}): Observable; + public createGeographicSite(geographicSiteCreate: GeographicSiteCreate, observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext}): Observable>; + public createGeographicSite(geographicSiteCreate: GeographicSiteCreate, observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext}): Observable>; + public createGeographicSite(geographicSiteCreate: GeographicSiteCreate, observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext}): Observable { if (geographicSiteCreate === null || geographicSiteCreate === undefined) { throw new Error('Required parameter geographicSiteCreate was null or undefined when calling createGeographicSite.'); } @@ -122,7 +122,7 @@ export class GeographicSiteService { const httpHeaderAccepts: string[] = [ 'application/json' ]; - localVarHttpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts); + // localVarHttpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts); } if (localVarHttpHeaderAcceptSelected !== undefined) { localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected); @@ -133,42 +133,42 @@ export class GeographicSiteService { localVarHttpContext = new HttpContext(); } - let localVarTransferCache: boolean | undefined = options && options.transferCache; - if (localVarTransferCache === undefined) { - localVarTransferCache = true; - } + // let localVarTransferCache: boolean | undefined = options && options.transferCache; + // if (localVarTransferCache === undefined) { + // localVarTransferCache = true; + // } // to determine the Content-Type header const consumes: string[] = [ 'application/json' ]; - const httpContentTypeSelected: string | undefined = this.configuration.selectHeaderContentType(consumes); + const httpContentTypeSelected: string | undefined = 'application/json'; if (httpContentTypeSelected !== undefined) { localVarHeaders = localVarHeaders.set('Content-Type', httpContentTypeSelected); } let responseType_: 'text' | 'json' | 'blob' = 'json'; - if (localVarHttpHeaderAcceptSelected) { - if (localVarHttpHeaderAcceptSelected.startsWith('text')) { - responseType_ = 'text'; - } else if (this.configuration.isJsonMime(localVarHttpHeaderAcceptSelected)) { - responseType_ = 'json'; - } else { - responseType_ = 'blob'; - } - } - - let localVarPath = `/geographicSite`; - return this.httpClient.request('post', `${this.configuration.basePath}${localVarPath}`, + // if (localVarHttpHeaderAcceptSelected) { + // if (localVarHttpHeaderAcceptSelected.startsWith('text')) { + // responseType_ = 'text'; + // } else if (this.configuration.isJsonMime(localVarHttpHeaderAcceptSelected)) { + // responseType_ = 'json'; + // } else { + // responseType_ = 'blob'; + // } + // } + + let localVarPath = `/geographicSiteManagement/v5/geographicSite`; + return this.httpClient.request('post', `${this.configuration.rootUrl}${localVarPath}`, { context: localVarHttpContext, body: geographicSiteCreate, responseType: responseType_, - withCredentials: this.configuration.withCredentials, + // withCredentials: this.configuration.withCredentials, headers: localVarHeaders, observe: observe, - transferCache: localVarTransferCache, + // transferCache: localVarTransferCache, reportProgress: reportProgress } ); @@ -181,10 +181,10 @@ export class GeographicSiteService { * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. * @param reportProgress flag to report request and response progress. */ - public deleteGeographicSite(id: string, observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable; - public deleteGeographicSite(id: string, observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable>; - public deleteGeographicSite(id: string, observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable>; - public deleteGeographicSite(id: string, observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable { + public deleteGeographicSite(id: string, observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext}): Observable; + public deleteGeographicSite(id: string, observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext}): Observable>; + public deleteGeographicSite(id: string, observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext}): Observable>; + public deleteGeographicSite(id: string, observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext}): Observable { if (id === null || id === undefined) { throw new Error('Required parameter id was null or undefined when calling deleteGeographicSite.'); } @@ -197,7 +197,7 @@ export class GeographicSiteService { const httpHeaderAccepts: string[] = [ 'application/json' ]; - localVarHttpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts); + localVarHttpHeaderAcceptSelected = 'application/json'; } if (localVarHttpHeaderAcceptSelected !== undefined) { localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected); @@ -208,32 +208,32 @@ export class GeographicSiteService { localVarHttpContext = new HttpContext(); } - let localVarTransferCache: boolean | undefined = options && options.transferCache; - if (localVarTransferCache === undefined) { - localVarTransferCache = true; - } + // let localVarTransferCache: boolean | undefined = options && options.transferCache; + // if (localVarTransferCache === undefined) { + // localVarTransferCache = true; + // } let responseType_: 'text' | 'json' | 'blob' = 'json'; - if (localVarHttpHeaderAcceptSelected) { - if (localVarHttpHeaderAcceptSelected.startsWith('text')) { - responseType_ = 'text'; - } else if (this.configuration.isJsonMime(localVarHttpHeaderAcceptSelected)) { - responseType_ = 'json'; - } else { - responseType_ = 'blob'; - } - } - - let localVarPath = `/geographicSite/${this.configuration.encodeParam({name: "id", value: id, in: "path", style: "simple", explode: false, dataType: "string", dataFormat: undefined})}`; - return this.httpClient.request('delete', `${this.configuration.basePath}${localVarPath}`, + // if (localVarHttpHeaderAcceptSelected) { + // if (localVarHttpHeaderAcceptSelected.startsWith('text')) { + // responseType_ = 'text'; + // } else if (this.configuration.isJsonMime(localVarHttpHeaderAcceptSelected)) { + // responseType_ = 'json'; + // } else { + // responseType_ = 'blob'; + // } + // } + + let localVarPath = `/geographicSiteManagement/v5/geographicSite/${this.encoder.encodeValue(id)}`; + return this.httpClient.request('delete', `${this.configuration.rootUrl}${localVarPath}`, { context: localVarHttpContext, responseType: responseType_, - withCredentials: this.configuration.withCredentials, + // withCredentials: this.configuration.withCredentials, headers: localVarHeaders, observe: observe, - transferCache: localVarTransferCache, + // transferCache: localVarTransferCache, reportProgress: reportProgress } ); @@ -248,10 +248,10 @@ export class GeographicSiteService { * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. * @param reportProgress flag to report request and response progress. */ - public listGeographicSite(fields?: string, offset?: number, limit?: number, observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable>; - public listGeographicSite(fields?: string, offset?: number, limit?: number, observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable>>; - public listGeographicSite(fields?: string, offset?: number, limit?: number, observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable>>; - public listGeographicSite(fields?: string, offset?: number, limit?: number, observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable { + public listGeographicSite(fields?: string, offset?: number, limit?: number, observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext}): Observable>; + public listGeographicSite(fields?: string, offset?: number, limit?: number, observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext}): Observable>>; + public listGeographicSite(fields?: string, offset?: number, limit?: number, observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext}): Observable>>; + public listGeographicSite(fields?: string, offset?: number, limit?: number, observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext}): Observable { let localVarQueryParameters = new HttpParams({encoder: this.encoder}); if (fields !== undefined && fields !== null) { @@ -275,7 +275,7 @@ export class GeographicSiteService { const httpHeaderAccepts: string[] = [ 'application/json' ]; - localVarHttpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts); + localVarHttpHeaderAcceptSelected = 'application/json'; } if (localVarHttpHeaderAcceptSelected !== undefined) { localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected); @@ -286,33 +286,33 @@ export class GeographicSiteService { localVarHttpContext = new HttpContext(); } - let localVarTransferCache: boolean | undefined = options && options.transferCache; - if (localVarTransferCache === undefined) { - localVarTransferCache = true; - } + // let localVarTransferCache: boolean | undefined = options && options.transferCache; + // if (localVarTransferCache === undefined) { + // localVarTransferCache = true; + // } let responseType_: 'text' | 'json' | 'blob' = 'json'; - if (localVarHttpHeaderAcceptSelected) { - if (localVarHttpHeaderAcceptSelected.startsWith('text')) { - responseType_ = 'text'; - } else if (this.configuration.isJsonMime(localVarHttpHeaderAcceptSelected)) { - responseType_ = 'json'; - } else { - responseType_ = 'blob'; - } - } - - let localVarPath = `/geographicSite`; - return this.httpClient.request>('get', `${this.configuration.basePath}${localVarPath}`, + // if (localVarHttpHeaderAcceptSelected) { + // if (localVarHttpHeaderAcceptSelected.startsWith('text')) { + // responseType_ = 'text'; + // } else if (this.configuration.isJsonMime(localVarHttpHeaderAcceptSelected)) { + // responseType_ = 'json'; + // } else { + // responseType_ = 'blob'; + // } + // } + + let localVarPath = `/geographicSiteManagement/v5/geographicSite`; + return this.httpClient.request>('get', `${this.configuration.rootUrl}${localVarPath}`, { context: localVarHttpContext, params: localVarQueryParameters, responseType: responseType_, - withCredentials: this.configuration.withCredentials, + // withCredentials: this.configuration.withCredentials, headers: localVarHeaders, observe: observe, - transferCache: localVarTransferCache, + // transferCache: localVarTransferCache, reportProgress: reportProgress } ); @@ -326,10 +326,10 @@ export class GeographicSiteService { * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. * @param reportProgress flag to report request and response progress. */ - public patchGeographicSite(id: string, geographicSiteUpdate: GeographicSiteUpdate, observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json' | 'application/merge-patch+json' | 'application/json-patch+json' | 'application/json-patch-query+json', context?: HttpContext, transferCache?: boolean}): Observable; - public patchGeographicSite(id: string, geographicSiteUpdate: GeographicSiteUpdate, observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json' | 'application/merge-patch+json' | 'application/json-patch+json' | 'application/json-patch-query+json', context?: HttpContext, transferCache?: boolean}): Observable>; - public patchGeographicSite(id: string, geographicSiteUpdate: GeographicSiteUpdate, observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json' | 'application/merge-patch+json' | 'application/json-patch+json' | 'application/json-patch-query+json', context?: HttpContext, transferCache?: boolean}): Observable>; - public patchGeographicSite(id: string, geographicSiteUpdate: GeographicSiteUpdate, observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: 'application/json' | 'application/merge-patch+json' | 'application/json-patch+json' | 'application/json-patch-query+json', context?: HttpContext, transferCache?: boolean}): Observable { + public patchGeographicSite(id: string, geographicSiteUpdate: GeographicSiteUpdate, observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json' | 'application/merge-patch+json' | 'application/json-patch+json' | 'application/json-patch-query+json', context?: HttpContext}): Observable; + public patchGeographicSite(id: string, geographicSiteUpdate: GeographicSiteUpdate, observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json' | 'application/merge-patch+json' | 'application/json-patch+json' | 'application/json-patch-query+json', context?: HttpContext}): Observable>; + public patchGeographicSite(id: string, geographicSiteUpdate: GeographicSiteUpdate, observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json' | 'application/merge-patch+json' | 'application/json-patch+json' | 'application/json-patch-query+json', context?: HttpContext}): Observable>; + public patchGeographicSite(id: string, geographicSiteUpdate: GeographicSiteUpdate, observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: 'application/json' | 'application/merge-patch+json' | 'application/json-patch+json' | 'application/json-patch-query+json', context?: HttpContext}): Observable { if (id === null || id === undefined) { throw new Error('Required parameter id was null or undefined when calling patchGeographicSite.'); } @@ -348,7 +348,7 @@ export class GeographicSiteService { 'application/json-patch+json', 'application/json-patch-query+json' ]; - localVarHttpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts); + localVarHttpHeaderAcceptSelected = 'application/json'; } if (localVarHttpHeaderAcceptSelected !== undefined) { localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected); @@ -359,10 +359,10 @@ export class GeographicSiteService { localVarHttpContext = new HttpContext(); } - let localVarTransferCache: boolean | undefined = options && options.transferCache; - if (localVarTransferCache === undefined) { - localVarTransferCache = true; - } + // let localVarTransferCache: boolean | undefined = options && options.transferCache; + // if (localVarTransferCache === undefined) { + // localVarTransferCache = true; + // } // to determine the Content-Type header @@ -372,32 +372,31 @@ export class GeographicSiteService { 'application/json-patch+json', 'application/json-patch-query+json' ]; - const httpContentTypeSelected: string | undefined = this.configuration.selectHeaderContentType(consumes); + const httpContentTypeSelected: string | undefined = 'application/json'; if (httpContentTypeSelected !== undefined) { localVarHeaders = localVarHeaders.set('Content-Type', httpContentTypeSelected); } let responseType_: 'text' | 'json' | 'blob' = 'json'; - if (localVarHttpHeaderAcceptSelected) { - if (localVarHttpHeaderAcceptSelected.startsWith('text')) { - responseType_ = 'text'; - } else if (this.configuration.isJsonMime(localVarHttpHeaderAcceptSelected)) { - responseType_ = 'json'; - } else { - responseType_ = 'blob'; - } - } - - let localVarPath = `/geographicSite/${this.configuration.encodeParam({name: "id", value: id, in: "path", style: "simple", explode: false, dataType: "string", dataFormat: undefined})}`; - return this.httpClient.request('patch', `${this.configuration.basePath}${localVarPath}`, + // if (localVarHttpHeaderAcceptSelected) { + // if (localVarHttpHeaderAcceptSelected.startsWith('text')) { + // responseType_ = 'text'; + // } else if (this.configuration.isJsonMime(localVarHttpHeaderAcceptSelected)) { + // responseType_ = 'json'; + // } else { + // responseType_ = 'blob'; + // } + // } + + let localVarPath = `/geographicSiteManagement/v5/geographicSite/${this.encoder.encodeValue(id)}`; + return this.httpClient.request('patch', `${this.configuration.rootUrl}${localVarPath}`, { context: localVarHttpContext, body: geographicSiteUpdate, responseType: responseType_, - withCredentials: this.configuration.withCredentials, + // withCredentials: this.configuration.withCredentials, headers: localVarHeaders, observe: observe, - transferCache: localVarTransferCache, reportProgress: reportProgress } ); @@ -410,10 +409,10 @@ export class GeographicSiteService { * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. * @param reportProgress flag to report request and response progress. */ - public retrieveGeographicSite(id: string, observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable; - public retrieveGeographicSite(id: string, observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable>; - public retrieveGeographicSite(id: string, observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable>; - public retrieveGeographicSite(id: string, observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable { + public retrieveGeographicSite(id: string, observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext}): Observable; + public retrieveGeographicSite(id: string, observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext}): Observable>; + public retrieveGeographicSite(id: string, observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext}): Observable>; + public retrieveGeographicSite(id: string, observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext}): Observable { if (id === null || id === undefined) { throw new Error('Required parameter id was null or undefined when calling retrieveGeographicSite.'); } @@ -426,7 +425,7 @@ export class GeographicSiteService { const httpHeaderAccepts: string[] = [ 'application/json' ]; - localVarHttpHeaderAcceptSelected = this.configuration.selectHeaderAccept(httpHeaderAccepts); + localVarHttpHeaderAcceptSelected = 'application/json'; } if (localVarHttpHeaderAcceptSelected !== undefined) { localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected); @@ -437,32 +436,26 @@ export class GeographicSiteService { localVarHttpContext = new HttpContext(); } - let localVarTransferCache: boolean | undefined = options && options.transferCache; - if (localVarTransferCache === undefined) { - localVarTransferCache = true; - } - let responseType_: 'text' | 'json' | 'blob' = 'json'; - if (localVarHttpHeaderAcceptSelected) { - if (localVarHttpHeaderAcceptSelected.startsWith('text')) { - responseType_ = 'text'; - } else if (this.configuration.isJsonMime(localVarHttpHeaderAcceptSelected)) { - responseType_ = 'json'; - } else { - responseType_ = 'blob'; - } - } - - let localVarPath = `/geographicSite/${this.configuration.encodeParam({name: "id", value: id, in: "path", style: "simple", explode: false, dataType: "string", dataFormat: undefined})}`; - return this.httpClient.request('get', `${this.configuration.basePath}${localVarPath}`, + // if (localVarHttpHeaderAcceptSelected) { + // if (localVarHttpHeaderAcceptSelected.startsWith('text')) { + // responseType_ = 'text'; + // } else if (this.configuration.isJsonMime(localVarHttpHeaderAcceptSelected)) { + // responseType_ = 'json'; + // } else { + // responseType_ = 'blob'; + // } + // } + + let localVarPath = `/geographicSiteManagement/v5/geographicSite/${this.encoder.encodeValue(id)}`; + return this.httpClient.request('get', `${this.configuration.rootUrl}${localVarPath}`, { context: localVarHttpContext, responseType: responseType_, - withCredentials: this.configuration.withCredentials, + // withCredentials: this.configuration.withCredentials, headers: localVarHeaders, observe: observe, - transferCache: localVarTransferCache, reportProgress: reportProgress } ); diff --git a/src/app/openApis/geographicSiteManagement/services/notificationListener.service.ts b/src/app/openApis/geographicSiteManagement/services/notificationListener.service.ts index 1078f91..98e5de2 100644 --- a/src/app/openApis/geographicSiteManagement/services/notificationListener.service.ts +++ b/src/app/openApis/geographicSiteManagement/services/notificationListener.service.ts @@ -29,7 +29,7 @@ import { GeographicSiteStateChangeEvent } from '../model/geographicSiteStateChan // @ts-ignore import { BASE_PATH, COLLECTION_FORMATS } from '../variables'; -import { Configuration } from '../configuration'; +import { Configuration } from '../api-configuration'; @@ -104,10 +104,10 @@ export class NotificationListenerService { * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. * @param reportProgress flag to report request and response progress. */ - public geographicSiteAttributeValueChangeEvent(geographicSiteAttributeValueChangeEvent: GeographicSiteAttributeValueChangeEvent, observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable; - public geographicSiteAttributeValueChangeEvent(geographicSiteAttributeValueChangeEvent: GeographicSiteAttributeValueChangeEvent, observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable>; - public geographicSiteAttributeValueChangeEvent(geographicSiteAttributeValueChangeEvent: GeographicSiteAttributeValueChangeEvent, observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable>; - public geographicSiteAttributeValueChangeEvent(geographicSiteAttributeValueChangeEvent: GeographicSiteAttributeValueChangeEvent, observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable { + public geographicSiteAttributeValueChangeEvent(geographicSiteAttributeValueChangeEvent: GeographicSiteAttributeValueChangeEvent, observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext}): Observable; + public geographicSiteAttributeValueChangeEvent(geographicSiteAttributeValueChangeEvent: GeographicSiteAttributeValueChangeEvent, observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext}): Observable>; + public geographicSiteAttributeValueChangeEvent(geographicSiteAttributeValueChangeEvent: GeographicSiteAttributeValueChangeEvent, observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext}): Observable>; + public geographicSiteAttributeValueChangeEvent(geographicSiteAttributeValueChangeEvent: GeographicSiteAttributeValueChangeEvent, observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext}): Observable { if (geographicSiteAttributeValueChangeEvent === null || geographicSiteAttributeValueChangeEvent === undefined) { throw new Error('Required parameter geographicSiteAttributeValueChangeEvent was null or undefined when calling geographicSiteAttributeValueChangeEvent.'); } @@ -131,10 +131,10 @@ export class NotificationListenerService { localVarHttpContext = new HttpContext(); } - let localVarTransferCache: boolean | undefined = options && options.transferCache; - if (localVarTransferCache === undefined) { - localVarTransferCache = true; - } + // let localVarTransferCache: boolean | undefined = options && options.transferCache; + // if (localVarTransferCache === undefined) { + // localVarTransferCache = true; + // } // to determine the Content-Type header @@ -166,7 +166,7 @@ export class NotificationListenerService { withCredentials: this.configuration.withCredentials, headers: localVarHeaders, observe: observe, - transferCache: localVarTransferCache, + // transferCache: localVarTransferCache, reportProgress: reportProgress } ); @@ -179,10 +179,10 @@ export class NotificationListenerService { * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. * @param reportProgress flag to report request and response progress. */ - public geographicSiteCreateEvent(geographicSiteCreateEvent: GeographicSiteCreateEvent, observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable; - public geographicSiteCreateEvent(geographicSiteCreateEvent: GeographicSiteCreateEvent, observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable>; - public geographicSiteCreateEvent(geographicSiteCreateEvent: GeographicSiteCreateEvent, observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable>; - public geographicSiteCreateEvent(geographicSiteCreateEvent: GeographicSiteCreateEvent, observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable { + public geographicSiteCreateEvent(geographicSiteCreateEvent: GeographicSiteCreateEvent, observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext}): Observable; + public geographicSiteCreateEvent(geographicSiteCreateEvent: GeographicSiteCreateEvent, observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext}): Observable>; + public geographicSiteCreateEvent(geographicSiteCreateEvent: GeographicSiteCreateEvent, observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext}): Observable>; + public geographicSiteCreateEvent(geographicSiteCreateEvent: GeographicSiteCreateEvent, observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext}): Observable { if (geographicSiteCreateEvent === null || geographicSiteCreateEvent === undefined) { throw new Error('Required parameter geographicSiteCreateEvent was null or undefined when calling geographicSiteCreateEvent.'); } @@ -206,10 +206,10 @@ export class NotificationListenerService { localVarHttpContext = new HttpContext(); } - let localVarTransferCache: boolean | undefined = options && options.transferCache; - if (localVarTransferCache === undefined) { - localVarTransferCache = true; - } + // let localVarTransferCache: boolean | undefined = options && options.transferCache; + // if (localVarTransferCache === undefined) { + // localVarTransferCache = true; + // } // to determine the Content-Type header @@ -241,7 +241,7 @@ export class NotificationListenerService { withCredentials: this.configuration.withCredentials, headers: localVarHeaders, observe: observe, - transferCache: localVarTransferCache, + // transferCache: localVarTransferCache, reportProgress: reportProgress } ); @@ -254,10 +254,10 @@ export class NotificationListenerService { * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. * @param reportProgress flag to report request and response progress. */ - public geographicSiteDeleteEvent(geographicSiteDeleteEvent: GeographicSiteDeleteEvent, observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable; - public geographicSiteDeleteEvent(geographicSiteDeleteEvent: GeographicSiteDeleteEvent, observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable>; - public geographicSiteDeleteEvent(geographicSiteDeleteEvent: GeographicSiteDeleteEvent, observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable>; - public geographicSiteDeleteEvent(geographicSiteDeleteEvent: GeographicSiteDeleteEvent, observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable { + public geographicSiteDeleteEvent(geographicSiteDeleteEvent: GeographicSiteDeleteEvent, observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext}): Observable; + public geographicSiteDeleteEvent(geographicSiteDeleteEvent: GeographicSiteDeleteEvent, observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext}): Observable>; + public geographicSiteDeleteEvent(geographicSiteDeleteEvent: GeographicSiteDeleteEvent, observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext}): Observable>; + public geographicSiteDeleteEvent(geographicSiteDeleteEvent: GeographicSiteDeleteEvent, observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext}): Observable { if (geographicSiteDeleteEvent === null || geographicSiteDeleteEvent === undefined) { throw new Error('Required parameter geographicSiteDeleteEvent was null or undefined when calling geographicSiteDeleteEvent.'); } @@ -281,10 +281,10 @@ export class NotificationListenerService { localVarHttpContext = new HttpContext(); } - let localVarTransferCache: boolean | undefined = options && options.transferCache; - if (localVarTransferCache === undefined) { - localVarTransferCache = true; - } + // let localVarTransferCache: boolean | undefined = options && options.transferCache; + // if (localVarTransferCache === undefined) { + // localVarTransferCache = true; + // } // to determine the Content-Type header @@ -316,7 +316,7 @@ export class NotificationListenerService { withCredentials: this.configuration.withCredentials, headers: localVarHeaders, observe: observe, - transferCache: localVarTransferCache, + // transferCache: localVarTransferCache, reportProgress: reportProgress } ); @@ -329,10 +329,10 @@ export class NotificationListenerService { * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body. * @param reportProgress flag to report request and response progress. */ - public geographicSiteStateChangeEvent(geographicSiteStateChangeEvent: GeographicSiteStateChangeEvent, observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable; - public geographicSiteStateChangeEvent(geographicSiteStateChangeEvent: GeographicSiteStateChangeEvent, observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable>; - public geographicSiteStateChangeEvent(geographicSiteStateChangeEvent: GeographicSiteStateChangeEvent, observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable>; - public geographicSiteStateChangeEvent(geographicSiteStateChangeEvent: GeographicSiteStateChangeEvent, observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable { + public geographicSiteStateChangeEvent(geographicSiteStateChangeEvent: GeographicSiteStateChangeEvent, observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext}): Observable; + public geographicSiteStateChangeEvent(geographicSiteStateChangeEvent: GeographicSiteStateChangeEvent, observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext}): Observable>; + public geographicSiteStateChangeEvent(geographicSiteStateChangeEvent: GeographicSiteStateChangeEvent, observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext}): Observable>; + public geographicSiteStateChangeEvent(geographicSiteStateChangeEvent: GeographicSiteStateChangeEvent, observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext}): Observable { if (geographicSiteStateChangeEvent === null || geographicSiteStateChangeEvent === undefined) { throw new Error('Required parameter geographicSiteStateChangeEvent was null or undefined when calling geographicSiteStateChangeEvent.'); } @@ -356,10 +356,10 @@ export class NotificationListenerService { localVarHttpContext = new HttpContext(); } - let localVarTransferCache: boolean | undefined = options && options.transferCache; - if (localVarTransferCache === undefined) { - localVarTransferCache = true; - } + // let localVarTransferCache: boolean | undefined = options && options.transferCache; + // if (localVarTransferCache === undefined) { + // localVarTransferCache = true; + // } // to determine the Content-Type header @@ -391,7 +391,7 @@ export class NotificationListenerService { withCredentials: this.configuration.withCredentials, headers: localVarHeaders, observe: observe, - transferCache: localVarTransferCache, + // transferCache: localVarTransferCache, reportProgress: reportProgress } ); diff --git a/src/app/shared/components/partyManagement/edit-individuals/edit-individuals.component.html b/src/app/shared/components/partyManagement/edit-individuals/edit-individuals.component.html index 5518d0a..8d6f29e 100644 --- a/src/app/shared/components/partyManagement/edit-individuals/edit-individuals.component.html +++ b/src/app/shared/components/partyManagement/edit-individuals/edit-individuals.component.html @@ -81,54 +81,138 @@
-
Geographic Site Details
-
+
Geographic Site Details
+
+ - City + Code - + - Email + Description + + + + + + + Status + + + + + + Locality + + + + + + + Postcode - Phone + State Or Province + + + Street Number + + + + + + Street Suffix + + + + Street Type + + + + + + City - + + + + + + Country + + + + + + Street Name + + - Email + Building Name - + - Phone + Level Type - + + - Phone + Level Number - + + + + + + Private Street Name + + + + + + Private Street Number + + + + + + + Sub Address Name + + + + + + + Sub Address Type + + + + +
diff --git a/src/app/shared/components/partyManagement/edit-individuals/edit-individuals.component.ts b/src/app/shared/components/partyManagement/edit-individuals/edit-individuals.component.ts index bead41a..9cd38a8 100644 --- a/src/app/shared/components/partyManagement/edit-individuals/edit-individuals.component.ts +++ b/src/app/shared/components/partyManagement/edit-individuals/edit-individuals.component.ts @@ -1,10 +1,12 @@ import { Component, OnInit } from '@angular/core'; import { ActivatedRoute, Router, ActivationEnd } from '@angular/router'; import { IndividualService, OrganizationService } from 'src/app/openApis/partyManagement/services'; +import { GeographicSiteService } from 'src/app/openApis/geographicSiteManagement/services'; import { MatDialog } from '@angular/material/dialog'; import { ToastrService } from 'ngx-toastr'; import { Individual, Organization, IndividualCreate, IndividualUpdate } from 'src/app/openApis/partyManagement/models'; -import { FormGroup, FormControl } from '@angular/forms'; +import { GeographicSite, GeographicSiteCreate, GeographicSiteUpdate } from 'src/app/openApis/geographicSiteManagement/model/models'; +import { FormGroup, FormControl, Validators } from '@angular/forms'; import { Subscription } from 'rxjs'; import { AuthService } from 'src/app/shared/services/auth.service'; import { trigger } from '@angular/animations'; @@ -22,6 +24,7 @@ export class EditIndividualsComponent implements OnInit { private activatedRoute: ActivatedRoute, private individualService: IndividualService, private organizationService: OrganizationService, + private geographicSiteService: GeographicSiteService, private authService: AuthService, private router: Router, private dialog: MatDialog, @@ -30,6 +33,7 @@ export class EditIndividualsComponent implements OnInit { individualID: string individual: Individual + geographicSite: GeographicSite organizations: Organization[] @@ -44,12 +48,24 @@ export class EditIndividualsComponent implements OnInit { }), geographicSiteInfo: new FormGroup({ locality: new FormControl(), - postcode: new FormControl(), + postcode: new FormControl(null, Validators.required), stateOrProvince: new FormControl(), - streetNr: new FormControl(), - city: new FormControl(), - country: new FormControl(), - streetName: new FormControl(), + streetNr: new FormControl(null, Validators.required), + city: new FormControl(null, Validators.required), + country: new FormControl(null, Validators.required), + streetName: new FormControl(null, Validators.required), + code : new FormControl(), + description : new FormControl(), + status : new FormControl(), + buildingName : new FormControl(), + levelType : new FormControl(), + levelNumber : new FormControl(), + privateStreetName : new FormControl(), + privateStreetNumber : new FormControl(), + subAddressName : new FormControl(), + subAddressType : new FormControl(), + streetSuffix : new FormControl(), + streetType : new FormControl() }) }) @@ -64,6 +80,8 @@ export class EditIndividualsComponent implements OnInit { newIndividual = false + testbedProvider = false + subscriptions = new Subscription() ngOnInit() { @@ -76,6 +94,12 @@ export class EditIndividualsComponent implements OnInit { if (this.authService.portalUser && this.authService.portalUser.id === this.individualID) { this.individualID = "myuser" } + for(var val of this.authService.portalUserJWT.realm_access.roles){ + if (val ==='TESTBED_PROVIDER') { + this.testbedProvider=true + this.retrieveGeographicSite() + } + } this.retrieveIndividual() } else { // this.initNewOrganizationFormArray() @@ -151,7 +175,7 @@ export class EditIndividualsComponent implements OnInit { // updateObj = this.editForm.value let updatedIndividual: Individual - + if (this.newIndividual) { // const definedCharacteristics = this.editForm.get('partyCharacteristic').value.filter(el => el.value) // if (definedCharacteristics.length) updateObj.partyCharacteristic = definedCharacteristics @@ -160,6 +184,9 @@ export class EditIndividualsComponent implements OnInit { data => { updatedIndividual = data }, error => console.error(error), () => { + if(this.testbedProvider) { + this.updateGeographicSite(updatedIndividual.id); + } this.newIndividual = false this.toast.success("Individual was successfully created") this.refreshIndividual(updatedIndividual) @@ -171,18 +198,132 @@ export class EditIndividualsComponent implements OnInit { data => { updatedIndividual = data }, error => console.error(error), () => { + if(this.testbedProvider) { + this.updateGeographicSite(updatedIndividual.id); + } this.newIndividual = false this.toast.success("Individual was successfully updated") this.refreshIndividual(updatedIndividual) } ) } - + // this.updateGeographicSite(); } refreshIndividual(updatedIndividual: Individual) { // this.individualID = updatedIndividual.id this.retrieveIndividual() + if(this.testbedProvider) { + this.retrieveGeographicSite() + } + console.log("TODO-Retrieve Geographic Site info as well")//TODO + } + + retrieveGeographicSite(){ + this.geographicSiteService.retrieveGeographicSite(this.individualID).subscribe( + data => this.geographicSite = data, + error => console.error(error), + () => { + this.editForm.patchValue({ + geographicSiteInfo: { + code:this.geographicSite.code, + description: this.geographicSite.description, + locality: this.geographicSite.place[0].geographicAddress.locality , + postcode: this.geographicSite.place[0].geographicAddress.postcode , + stateOrProvince: this.geographicSite.place[0].geographicAddress.stateOrProvince , + streetNr: this.geographicSite.place[0].geographicAddress.streetNr , + streetSuffix: this.geographicSite.place[0].geographicAddress.streetSuffix , + streetType: this.geographicSite.place[0].geographicAddress.streetType , + streetName: this.geographicSite.place[0].geographicAddress.streetName , + city: this.geographicSite.place[0].geographicAddress.city , + country: this.geographicSite.place[0].geographicAddress.country , + buildingName: this.geographicSite.place[0].geographicAddress.geographicSubAddress.buildingName , + levelNumber: this.geographicSite.place[0].geographicAddress.geographicSubAddress.levelNumber , + levelType: this.geographicSite.place[0].geographicAddress.geographicSubAddress.levelType , + name: this.geographicSite.place[0].geographicAddress.geographicSubAddress.name , + privateStreetName: this.geographicSite.place[0].geographicAddress.geographicSubAddress.privateStreetName , + privateStreetNumber: this.geographicSite.place[0].geographicAddress.geographicSubAddress.privateStreetNumber , + subAddressType: this.geographicSite.place[0].geographicAddress.geographicSubAddress.subAddressType + } + + }) + + // if (this.individual.partyCharacteristic.length) { + // this.customOrganizationCtrl.setValue(this.individual.partyCharacteristic.find( char => char.name === 'organization').value.value) + // } + + // if (this.individualID ==="myuser") { + // this.authService.portalUser = this.individual + // } + + //prefefined Organization in Related Party + + // + } + + ) + } + + updateGeographicSite(id: String){ + if (this.editForm.valid) { + let updateObj: GeographicSiteCreate | GeographicSiteUpdate ={ + code:this.editForm.value.geographicSiteInfo.code, + description: this.editForm.value.geographicSiteInfo.description, + relatedParty: [{ + id:this.individualID + }], + externalIdentifier: [], + calendar:[], + place:[{ + geographicAddress:{ + locality: this.editForm.value.geographicSiteInfo.locality , + postcode: this.editForm.value.geographicSiteInfo.postcode , + stateOrProvince: this.editForm.value.geographicSiteInfo.stateOrProvince , + streetNr: this.editForm.value.geographicSiteInfo.streetNr , + streetSuffix: this.editForm.value.geographicSiteInfo.streetSuffix , + streetType: this.editForm.value.geographicSiteInfo.streetType , + streetName: this.editForm.value.geographicSiteInfo.streetName , + city: this.editForm.value.geographicSiteInfo.city , + country: this.editForm.value.geographicSiteInfo.country , + geographicSubAddress: { + buildingName: this.editForm.value.geographicSiteInfo.buildingName , + levelNumber: this.editForm.value.geographicSiteInfo.levelNumber , + levelType: this.editForm.value.geographicSiteInfo.levelType , + name: this.editForm.value.geographicSiteInfo.subAddressName , + privateStreetName: this.editForm.value.geographicSiteInfo.privateStreetName , + privateStreetNumber: this.editForm.value.geographicSiteInfo.privateStreetNumber , + subAddressType: this.editForm.value.geographicSiteInfo.subAddressType + } + + } + + }], + siteRelationship:[] + } + console.log(updateObj) + let updatedGeographicSite: GeographicSite + + if (this.newIndividual) { + + this.geographicSiteService.createGeographicSite(updateObj).subscribe( + data => { updatedGeographicSite = data }, + error => console.error(error), + () => { + this.toast.success("Geographic site was successfully created") + } + ) + } + else { + this.geographicSiteService.patchGeographicSite(this.individual.id,updateObj).subscribe( + data => { updatedGeographicSite = data }, + error => console.error(error), + () => { + this.toast.success("Geographic site was successfully updated") + } + ) + } + + } } ngOnDestroy() { diff --git a/src/app/shared/components/redirect/redirect.component.ts b/src/app/shared/components/redirect/redirect.component.ts index 003fe2c..f84844c 100644 --- a/src/app/shared/components/redirect/redirect.component.ts +++ b/src/app/shared/components/redirect/redirect.component.ts @@ -17,6 +17,7 @@ export class RedirectComponent implements OnInit { ) { } ngOnInit() { + // this.authService.fetchIndividualInfo(); let isTestbedProvider = false; if(this.authService != null && this.authService.portalUserJWT !=null) { for(var val of this.authService.portalUserJWT.realm_access.roles){ diff --git a/src/app/shared/services/app.service.ts b/src/app/shared/services/app.service.ts index e29e1cc..029e931 100644 --- a/src/app/shared/services/app.service.ts +++ b/src/app/shared/services/app.service.ts @@ -41,8 +41,8 @@ export class AppService { private tmfResourceCatalogConfig: ResourceCatalogAPIconfig, private tmfResourceInventoryConfig: ResourceInventoryAPIconfig, private resourcePoolManagementAPIconfig: resourcePoolManagementAPIconfig, - private tmfProductCatalogConfig: ProductCatalogAPIconfig -// private tmfGeographicSiteConfig: GeographicSiteManagementAPIconfig + private tmfProductCatalogConfig: ProductCatalogAPIconfig, + private tmfGeographicSiteConfig: GeographicSiteManagementAPIconfig ) { this.setAPIurls() this.recognizePortalDomain() @@ -66,7 +66,7 @@ export class AppService { this.serviceTestManagementAPIconfig.rootUrl = this.config.APITMFURL this.resourcePoolManagementAPIconfig.rootUrl = this.config.APITMFURL this.tmfProductCatalogConfig.rootUrl = this.config.APITMFURL -// this.tmfGeographicSiteConfig.rootUrl = this.config.APITMFURL + this.tmfGeographicSiteConfig.rootUrl = this.config.APITMFURL } //recognition of which portal is used (services/testing/product) diff --git a/src/app/shared/services/auth.service.ts b/src/app/shared/services/auth.service.ts index cf7cda0..d2227e4 100644 --- a/src/app/shared/services/auth.service.ts +++ b/src/app/shared/services/auth.service.ts @@ -126,6 +126,18 @@ export class AuthService { ) } + public fetchIndividualInfo() { + // this.portalUserJWT = decode(this.getAccessToken()) + this.individualService.retrieveIndividual({id:'myuser'}).subscribe( + data => { this.portalUser = data }, + error => { + console.error(error) + // this.toast.error('An error occurred fetching user information') + // this.logout() + } + ) + } + public login() { this.oauthService.initCodeFlow() } -- GitLab From 38573ada22c4d3571cb4b0f9e495028ad91d232a Mon Sep 17 00:00:00 2001 From: lpapadopoulos Date: Tue, 28 May 2024 11:57:54 +0300 Subject: [PATCH 08/18] send @type --- .../geographicSiteManagement/model/geographicAddressValue.ts | 2 +- .../openApis/geographicSiteManagement/model/placeRefOrValue.ts | 2 +- .../edit-individuals/edit-individuals.component.ts | 3 ++- 3 files changed, 4 insertions(+), 3 deletions(-) diff --git a/src/app/openApis/geographicSiteManagement/model/geographicAddressValue.ts b/src/app/openApis/geographicSiteManagement/model/geographicAddressValue.ts index 181f7a1..707ed19 100644 --- a/src/app/openApis/geographicSiteManagement/model/geographicAddressValue.ts +++ b/src/app/openApis/geographicSiteManagement/model/geographicAddressValue.ts @@ -17,7 +17,7 @@ export interface GeographicAddressValue extends PlaceRefOrValue { /** * When sub-classing, this defines the sub-class Extensible name */ - type?: string; + type: string; /** * When sub-classing, this defines the super-class */ diff --git a/src/app/openApis/geographicSiteManagement/model/placeRefOrValue.ts b/src/app/openApis/geographicSiteManagement/model/placeRefOrValue.ts index 3184855..611a1e8 100644 --- a/src/app/openApis/geographicSiteManagement/model/placeRefOrValue.ts +++ b/src/app/openApis/geographicSiteManagement/model/placeRefOrValue.ts @@ -17,7 +17,7 @@ export interface PlaceRefOrValue { /** * When sub-classing, this defines the sub-class Extensible name */ - type?: string; + type: string; /** * When sub-classing, this defines the super-class */ diff --git a/src/app/shared/components/partyManagement/edit-individuals/edit-individuals.component.ts b/src/app/shared/components/partyManagement/edit-individuals/edit-individuals.component.ts index 9cd38a8..bb40d6d 100644 --- a/src/app/shared/components/partyManagement/edit-individuals/edit-individuals.component.ts +++ b/src/app/shared/components/partyManagement/edit-individuals/edit-individuals.component.ts @@ -274,8 +274,9 @@ export class EditIndividualsComponent implements OnInit { }], externalIdentifier: [], calendar:[], - place:[{ + place:[{type:null, geographicAddress:{ + type:null, locality: this.editForm.value.geographicSiteInfo.locality , postcode: this.editForm.value.geographicSiteInfo.postcode , stateOrProvince: this.editForm.value.geographicSiteInfo.stateOrProvince , -- GitLab From 33f863346ce0a811f6f91e8acbb708466e3204ed Mon Sep 17 00:00:00 2001 From: lpapadopoulos Date: Tue, 28 May 2024 12:42:52 +0300 Subject: [PATCH 09/18] fix malformed object --- .../geographicSiteManagement/model/geographicAddressValue.ts | 2 +- .../geographicSiteManagement/model/placeRefOrValue.ts | 2 +- .../edit-individuals/edit-individuals.component.ts | 4 ++-- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/app/openApis/geographicSiteManagement/model/geographicAddressValue.ts b/src/app/openApis/geographicSiteManagement/model/geographicAddressValue.ts index 707ed19..23c9cdf 100644 --- a/src/app/openApis/geographicSiteManagement/model/geographicAddressValue.ts +++ b/src/app/openApis/geographicSiteManagement/model/geographicAddressValue.ts @@ -17,7 +17,7 @@ export interface GeographicAddressValue extends PlaceRefOrValue { /** * When sub-classing, this defines the sub-class Extensible name */ - type: string; + '@type': string; /** * When sub-classing, this defines the super-class */ diff --git a/src/app/openApis/geographicSiteManagement/model/placeRefOrValue.ts b/src/app/openApis/geographicSiteManagement/model/placeRefOrValue.ts index 611a1e8..d60d994 100644 --- a/src/app/openApis/geographicSiteManagement/model/placeRefOrValue.ts +++ b/src/app/openApis/geographicSiteManagement/model/placeRefOrValue.ts @@ -17,7 +17,7 @@ export interface PlaceRefOrValue { /** * When sub-classing, this defines the sub-class Extensible name */ - type: string; + '@type': string; /** * When sub-classing, this defines the super-class */ diff --git a/src/app/shared/components/partyManagement/edit-individuals/edit-individuals.component.ts b/src/app/shared/components/partyManagement/edit-individuals/edit-individuals.component.ts index bb40d6d..d98ffda 100644 --- a/src/app/shared/components/partyManagement/edit-individuals/edit-individuals.component.ts +++ b/src/app/shared/components/partyManagement/edit-individuals/edit-individuals.component.ts @@ -274,9 +274,9 @@ export class EditIndividualsComponent implements OnInit { }], externalIdentifier: [], calendar:[], - place:[{type:null, + place:[{'@type':"GeographicAddressValue", geographicAddress:{ - type:null, + '@type':"GeographicAddressValue", locality: this.editForm.value.geographicSiteInfo.locality , postcode: this.editForm.value.geographicSiteInfo.postcode , stateOrProvince: this.editForm.value.geographicSiteInfo.stateOrProvince , -- GitLab From 54d1fa2ac53aef65d057c4894c299757d4e7ccc7 Mon Sep 17 00:00:00 2001 From: lpapadopoulos Date: Tue, 28 May 2024 13:19:26 +0300 Subject: [PATCH 10/18] fix the related party id --- .../edit-individuals/edit-individuals.component.ts | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/app/shared/components/partyManagement/edit-individuals/edit-individuals.component.ts b/src/app/shared/components/partyManagement/edit-individuals/edit-individuals.component.ts index d98ffda..2e0e121 100644 --- a/src/app/shared/components/partyManagement/edit-individuals/edit-individuals.component.ts +++ b/src/app/shared/components/partyManagement/edit-individuals/edit-individuals.component.ts @@ -33,7 +33,7 @@ export class EditIndividualsComponent implements OnInit { individualID: string individual: Individual - geographicSite: GeographicSite + geographicSite: GeographicSite organizations: Organization[] @@ -175,7 +175,7 @@ export class EditIndividualsComponent implements OnInit { // updateObj = this.editForm.value let updatedIndividual: Individual - + if (this.newIndividual) { // const definedCharacteristics = this.editForm.get('partyCharacteristic').value.filter(el => el.value) // if (definedCharacteristics.length) updateObj.partyCharacteristic = definedCharacteristics @@ -245,7 +245,7 @@ export class EditIndividualsComponent implements OnInit { privateStreetNumber: this.geographicSite.place[0].geographicAddress.geographicSubAddress.privateStreetNumber , subAddressType: this.geographicSite.place[0].geographicAddress.geographicSubAddress.subAddressType } - + }) // if (this.individual.partyCharacteristic.length) { @@ -270,7 +270,7 @@ export class EditIndividualsComponent implements OnInit { code:this.editForm.value.geographicSiteInfo.code, description: this.editForm.value.geographicSiteInfo.description, relatedParty: [{ - id:this.individualID + id: id }], externalIdentifier: [], calendar:[], -- GitLab From 78ed1110106f49ae27fecea3005cb5b4f20b7142 Mon Sep 17 00:00:00 2001 From: lpapadopoulos Date: Tue, 28 May 2024 13:26:00 +0300 Subject: [PATCH 11/18] fix String to primitive value --- .../edit-individuals/edit-individuals.component.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/app/shared/components/partyManagement/edit-individuals/edit-individuals.component.ts b/src/app/shared/components/partyManagement/edit-individuals/edit-individuals.component.ts index 2e0e121..adaa194 100644 --- a/src/app/shared/components/partyManagement/edit-individuals/edit-individuals.component.ts +++ b/src/app/shared/components/partyManagement/edit-individuals/edit-individuals.component.ts @@ -264,7 +264,7 @@ export class EditIndividualsComponent implements OnInit { ) } - updateGeographicSite(id: String){ + updateGeographicSite(id: string){ if (this.editForm.valid) { let updateObj: GeographicSiteCreate | GeographicSiteUpdate ={ code:this.editForm.value.geographicSiteInfo.code, -- GitLab From 78ca6661d4bb2504a00c689c60f346d78190b26d Mon Sep 17 00:00:00 2001 From: lpapadopoulos Date: Tue, 28 May 2024 15:53:12 +0300 Subject: [PATCH 12/18] add logic in case new individual --- .../edit-individuals/edit-individuals.component.ts | 6 ++++++ src/app/shared/components/redirect/redirect.component.ts | 4 +++- 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/src/app/shared/components/partyManagement/edit-individuals/edit-individuals.component.ts b/src/app/shared/components/partyManagement/edit-individuals/edit-individuals.component.ts index adaa194..bd1d93c 100644 --- a/src/app/shared/components/partyManagement/edit-individuals/edit-individuals.component.ts +++ b/src/app/shared/components/partyManagement/edit-individuals/edit-individuals.component.ts @@ -102,6 +102,12 @@ export class EditIndividualsComponent implements OnInit { } this.retrieveIndividual() } else { + for(var val of this.authService.portalUserJWT.realm_access.roles){ + if (val ==='TESTBED_PROVIDER') { + this.testbedProvider=true + + } + } // this.initNewOrganizationFormArray() this.newIndividual = true } diff --git a/src/app/shared/components/redirect/redirect.component.ts b/src/app/shared/components/redirect/redirect.component.ts index f84844c..fcd8950 100644 --- a/src/app/shared/components/redirect/redirect.component.ts +++ b/src/app/shared/components/redirect/redirect.component.ts @@ -33,7 +33,9 @@ export class RedirectComponent implements OnInit { this.router.navigate(['services', 'individual_update']) } else { - this.router.navigate(['services', 'services_marketplace']) + // this.router.navigate(['services', 'services_marketplace']) + this.router.navigate(['services', 'individual_update']) + } } else if (activePortal === 'resources') { -- GitLab From 2502ad356990f76f4b5cf8d17b11da95a14a7d98 Mon Sep 17 00:00:00 2001 From: lpapadopoulos Date: Tue, 28 May 2024 18:52:05 +0300 Subject: [PATCH 13/18] fix referredGivenName bug --- .../edit-individuals/edit-individuals.component.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/app/shared/components/partyManagement/edit-individuals/edit-individuals.component.ts b/src/app/shared/components/partyManagement/edit-individuals/edit-individuals.component.ts index bd1d93c..7306dc3 100644 --- a/src/app/shared/components/partyManagement/edit-individuals/edit-individuals.component.ts +++ b/src/app/shared/components/partyManagement/edit-individuals/edit-individuals.component.ts @@ -168,6 +168,7 @@ export class EditIndividualsComponent implements OnInit { let updateObj: IndividualCreate | IndividualUpdate = { familyName: this.editForm.value.familyName, givenName: this.editForm.value.givenName, + preferredGivenName: this.editForm.value.givenName, location: this.editForm.value.location, contactMedium: [{ mediumType: 'main', @@ -226,7 +227,7 @@ export class EditIndividualsComponent implements OnInit { } retrieveGeographicSite(){ - this.geographicSiteService.retrieveGeographicSite(this.individualID).subscribe( + this.geographicSiteService.retrieveGeographicSite("myuser").subscribe( data => this.geographicSite = data, error => console.error(error), () => { -- GitLab From 56022ce95168d32762e70d3a3829dfd9392f47f1 Mon Sep 17 00:00:00 2001 From: lpapadopoulos Date: Tue, 28 May 2024 19:32:19 +0300 Subject: [PATCH 14/18] adding security to the patch operation --- .../edit-individuals/edit-individuals.component.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/app/shared/components/partyManagement/edit-individuals/edit-individuals.component.ts b/src/app/shared/components/partyManagement/edit-individuals/edit-individuals.component.ts index 7306dc3..ca79f47 100644 --- a/src/app/shared/components/partyManagement/edit-individuals/edit-individuals.component.ts +++ b/src/app/shared/components/partyManagement/edit-individuals/edit-individuals.component.ts @@ -322,7 +322,7 @@ export class EditIndividualsComponent implements OnInit { ) } else { - this.geographicSiteService.patchGeographicSite(this.individual.id,updateObj).subscribe( + this.geographicSiteService.patchGeographicSite("myuser",updateObj).subscribe( data => { updatedGeographicSite = data }, error => console.error(error), () => { -- GitLab From f7733648053d18758c033996020be4af81756ae9 Mon Sep 17 00:00:00 2001 From: lpapadopoulos Date: Tue, 28 May 2024 23:16:26 +0300 Subject: [PATCH 15/18] redirection logic --- .../edit-individuals.component.ts | 2 -- .../components/redirect/redirect.component.ts | 24 +------------ src/app/shared/services/auth.service.ts | 34 ++++++------------- 3 files changed, 12 insertions(+), 48 deletions(-) diff --git a/src/app/shared/components/partyManagement/edit-individuals/edit-individuals.component.ts b/src/app/shared/components/partyManagement/edit-individuals/edit-individuals.component.ts index ca79f47..337b3f9 100644 --- a/src/app/shared/components/partyManagement/edit-individuals/edit-individuals.component.ts +++ b/src/app/shared/components/partyManagement/edit-individuals/edit-individuals.component.ts @@ -214,7 +214,6 @@ export class EditIndividualsComponent implements OnInit { } ) } - // this.updateGeographicSite(); } refreshIndividual(updatedIndividual: Individual) { @@ -223,7 +222,6 @@ export class EditIndividualsComponent implements OnInit { if(this.testbedProvider) { this.retrieveGeographicSite() } - console.log("TODO-Retrieve Geographic Site info as well")//TODO } retrieveGeographicSite(){ diff --git a/src/app/shared/components/redirect/redirect.component.ts b/src/app/shared/components/redirect/redirect.component.ts index fcd8950..aabf208 100644 --- a/src/app/shared/components/redirect/redirect.component.ts +++ b/src/app/shared/components/redirect/redirect.component.ts @@ -17,46 +17,24 @@ export class RedirectComponent implements OnInit { ) { } ngOnInit() { - // this.authService.fetchIndividualInfo(); - let isTestbedProvider = false; - if(this.authService != null && this.authService.portalUserJWT !=null) { - for(var val of this.authService.portalUserJWT.realm_access.roles){ - if (val ==='TESTBED_PROVIDER') { - isTestbedProvider=true - } - }} - //TODO insert redirection logic + const activePortal = localStorage.getItem('active_portal') if (activePortal === 'services') { - if (isTestbedProvider){ - this.router.navigate(['services', 'individual_update']) - } - else { - // this.router.navigate(['services', 'services_marketplace']) this.router.navigate(['services', 'individual_update']) - } } else if (activePortal === 'resources') { this.router.navigate(['resources', 'resource_catalogs']) } else if (activePortal === 'testing') { - if (isTestbedProvider){ this.router.navigate(['testing', 'individual_update']) - } else { - this.router.navigate(['testing', 'service_test_specs']) - } } else if (activePortal === 'products') { - if (isTestbedProvider){ this.router.navigate(['products', 'individual_update']) - } else { - this.router.navigate(['products', 'marketplace']) - } } else { diff --git a/src/app/shared/services/auth.service.ts b/src/app/shared/services/auth.service.ts index d2227e4..b233d46 100644 --- a/src/app/shared/services/auth.service.ts +++ b/src/app/shared/services/auth.service.ts @@ -37,12 +37,12 @@ export class AuthService { public portalUser: Individual public portalUserJWT: userFromJWT - constructor( + constructor( private oauthService: OAuthService, private router: Router, private bootstrapService: BootstrapService, private individualService: IndividualService - ) + ) { window.addEventListener('storage', (event) => { // The `key` is `null` if the event was caused by `.clear()` @@ -77,7 +77,7 @@ export class AuthService { public runInitialLoginSequence() { this.authConfigFile = this.bootstrapService.getConfig().OAUTH_CONFIG - + this.oauthService.configure(this.authConfigFile); this.oauthService.setStorage(localStorage); @@ -88,15 +88,15 @@ export class AuthService { this.oauthService.tryLoginCodeFlow() .catch(error => console.error(error)) .then( - () => { + () => { // console.warn('AccessTokenExpiration : ', new Date(this.oauthService.getAccessTokenExpiration()).toUTCString()); if (this.oauthService.hasValidAccessToken()) { // console.warn('this.oauthService.hasValidAccessToken() === true') this.isAuthenticatedSubject$.next(this.oauthService.hasValidAccessToken()); return Promise.resolve(); - } - + } + //If Silent LOGIN isn't implemented else { // console.warn('this.oauthService.hasValidAccessToken() === false') @@ -108,12 +108,12 @@ export class AuthService { this.isDoneLoadingSubject$.next(true) } ) - .catch( error => { + .catch( error => { this.isDoneLoadingSubject$.next(true) }) } - + public fetchUserInfo() { this.portalUserJWT = decode(this.getAccessToken()) this.individualService.retrieveIndividual({id:'myuser'}).subscribe( @@ -126,23 +126,11 @@ export class AuthService { ) } - public fetchIndividualInfo() { - // this.portalUserJWT = decode(this.getAccessToken()) - this.individualService.retrieveIndividual({id:'myuser'}).subscribe( - data => { this.portalUser = data }, - error => { - console.error(error) - // this.toast.error('An error occurred fetching user information') - // this.logout() - } - ) - } - public login() { this.oauthService.initCodeFlow() } - public logout() { + public logout() { // this.http.delete(authConfig.tokenEndpoint).subscribe( // data => console.log(data) // ) @@ -150,7 +138,7 @@ export class AuthService { localStorage.clear() // this.http.delete(this.authConfigFile.tokenEndpoint).subscribe( - // data => { + // data => { // console.warn(data) // this.oauthService.logOut() // this.router.navigate([this.router.routerState.snapshot.url]) @@ -158,7 +146,7 @@ export class AuthService { // error => { // console.error(error) // this.oauthService.logOut() - // this.router.navigate([this.router.routerState.snapshot.url]) + // this.router.navigate([this.router.routerState.snapshot.url]) // } // ) } -- GitLab From 7cee035abe83789352540669f00ad7db8ca6ac58 Mon Sep 17 00:00:00 2001 From: lpapadopoulos Date: Wed, 29 May 2024 14:41:19 +0300 Subject: [PATCH 16/18] check if it has geographic info --- .../edit-individuals/edit-individuals.component.ts | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/src/app/shared/components/partyManagement/edit-individuals/edit-individuals.component.ts b/src/app/shared/components/partyManagement/edit-individuals/edit-individuals.component.ts index 337b3f9..be056a8 100644 --- a/src/app/shared/components/partyManagement/edit-individuals/edit-individuals.component.ts +++ b/src/app/shared/components/partyManagement/edit-individuals/edit-individuals.component.ts @@ -82,6 +82,8 @@ export class EditIndividualsComponent implements OnInit { testbedProvider = false + hasGeographicSite = false + subscriptions = new Subscription() ngOnInit() { @@ -98,6 +100,11 @@ export class EditIndividualsComponent implements OnInit { if (val ==='TESTBED_PROVIDER') { this.testbedProvider=true this.retrieveGeographicSite() + console.log(this.geographicSite) + if (this.geographicSite.place[0].geographicAddress.city!==null){ + this.hasGeographicSite=true + console.log(this.hasGeographicSite) + } } } this.retrieveIndividual() @@ -309,7 +316,7 @@ export class EditIndividualsComponent implements OnInit { console.log(updateObj) let updatedGeographicSite: GeographicSite - if (this.newIndividual) { + if (!this.hasGeographicSite) { this.geographicSiteService.createGeographicSite(updateObj).subscribe( data => { updatedGeographicSite = data }, -- GitLab From f8defb1cabb278a3b6c5dcbd3552c2cac78b6484 Mon Sep 17 00:00:00 2001 From: lpapadopoulos Date: Wed, 29 May 2024 15:59:02 +0300 Subject: [PATCH 17/18] fixing redirecting and geographic site info form --- .../edit-individuals/edit-individuals.component.ts | 13 ++++++++----- .../components/redirect/redirect.component.ts | 6 +++--- 2 files changed, 11 insertions(+), 8 deletions(-) diff --git a/src/app/shared/components/partyManagement/edit-individuals/edit-individuals.component.ts b/src/app/shared/components/partyManagement/edit-individuals/edit-individuals.component.ts index be056a8..82411e6 100644 --- a/src/app/shared/components/partyManagement/edit-individuals/edit-individuals.component.ts +++ b/src/app/shared/components/partyManagement/edit-individuals/edit-individuals.component.ts @@ -101,10 +101,7 @@ export class EditIndividualsComponent implements OnInit { this.testbedProvider=true this.retrieveGeographicSite() console.log(this.geographicSite) - if (this.geographicSite.place[0].geographicAddress.city!==null){ - this.hasGeographicSite=true - console.log(this.hasGeographicSite) - } + } } this.retrieveIndividual() @@ -233,7 +230,13 @@ export class EditIndividualsComponent implements OnInit { retrieveGeographicSite(){ this.geographicSiteService.retrieveGeographicSite("myuser").subscribe( - data => this.geographicSite = data, + data => { + this.geographicSite = data + if (this.geographicSite.place[0].geographicAddress.city!==null){ + this.hasGeographicSite=true + console.log(this.hasGeographicSite) + } + }, error => console.error(error), () => { this.editForm.patchValue({ diff --git a/src/app/shared/components/redirect/redirect.component.ts b/src/app/shared/components/redirect/redirect.component.ts index aabf208..15fa389 100644 --- a/src/app/shared/components/redirect/redirect.component.ts +++ b/src/app/shared/components/redirect/redirect.component.ts @@ -21,7 +21,7 @@ export class RedirectComponent implements OnInit { const activePortal = localStorage.getItem('active_portal') if (activePortal === 'services') { - this.router.navigate(['services', 'individual_update']) + this.router.navigate(['services/individual_update', 'myuser']) } else if (activePortal === 'resources') { @@ -29,12 +29,12 @@ export class RedirectComponent implements OnInit { } else if (activePortal === 'testing') { - this.router.navigate(['testing', 'individual_update']) + this.router.navigate(['testing/individual_update', 'myuser']) } else if (activePortal === 'products') { - this.router.navigate(['products', 'individual_update']) + this.router.navigate(['products/individual_update', 'myuser']) } else { -- GitLab From d504b4b021f12e0ed2e2797fe40aac316ea1408a Mon Sep 17 00:00:00 2001 From: lpapadopoulos Date: Tue, 11 Jun 2024 16:25:42 +0300 Subject: [PATCH 18/18] ommit my-user functionality --- .../edit-individuals/edit-individuals.component.ts | 9 +++++---- src/app/shared/components/redirect/redirect.component.ts | 6 +++--- 2 files changed, 8 insertions(+), 7 deletions(-) diff --git a/src/app/shared/components/partyManagement/edit-individuals/edit-individuals.component.ts b/src/app/shared/components/partyManagement/edit-individuals/edit-individuals.component.ts index 82411e6..9d6412f 100644 --- a/src/app/shared/components/partyManagement/edit-individuals/edit-individuals.component.ts +++ b/src/app/shared/components/partyManagement/edit-individuals/edit-individuals.component.ts @@ -96,15 +96,16 @@ export class EditIndividualsComponent implements OnInit { if (this.authService.portalUser && this.authService.portalUser.id === this.individualID) { this.individualID = "myuser" } + this.retrieveIndividual() for(var val of this.authService.portalUserJWT.realm_access.roles){ if (val ==='TESTBED_PROVIDER') { this.testbedProvider=true this.retrieveGeographicSite() console.log(this.geographicSite) - + } } - this.retrieveIndividual() + } else { for(var val of this.authService.portalUserJWT.realm_access.roles){ if (val ==='TESTBED_PROVIDER') { @@ -229,7 +230,7 @@ export class EditIndividualsComponent implements OnInit { } retrieveGeographicSite(){ - this.geographicSiteService.retrieveGeographicSite("myuser").subscribe( + this.geographicSiteService.retrieveGeographicSite(this.individual.id).subscribe( data => { this.geographicSite = data if (this.geographicSite.place[0].geographicAddress.city!==null){ @@ -330,7 +331,7 @@ export class EditIndividualsComponent implements OnInit { ) } else { - this.geographicSiteService.patchGeographicSite("myuser",updateObj).subscribe( + this.geographicSiteService.patchGeographicSite(id,updateObj).subscribe( data => { updatedGeographicSite = data }, error => console.error(error), () => { diff --git a/src/app/shared/components/redirect/redirect.component.ts b/src/app/shared/components/redirect/redirect.component.ts index 15fa389..bad895e 100644 --- a/src/app/shared/components/redirect/redirect.component.ts +++ b/src/app/shared/components/redirect/redirect.component.ts @@ -21,7 +21,7 @@ export class RedirectComponent implements OnInit { const activePortal = localStorage.getItem('active_portal') if (activePortal === 'services') { - this.router.navigate(['services/individual_update', 'myuser']) + this.router.navigate(['services', 'services_marketplace']) } else if (activePortal === 'resources') { @@ -29,12 +29,12 @@ export class RedirectComponent implements OnInit { } else if (activePortal === 'testing') { - this.router.navigate(['testing/individual_update', 'myuser']) + this.router.navigate(['testing', 'service_test_specs']) } else if (activePortal === 'products') { - this.router.navigate(['products/individual_update', 'myuser']) + this.router.navigate(['products', 'marketplace']) } else { -- GitLab