-
+
-
+
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 aedc7fbf8bc5628995e28a34e52a29006e553a9e..9d6412fa1a9e06df9084d814c5f35591dae3e6ee 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[]
@@ -41,9 +45,30 @@ export class EditIndividualsComponent implements OnInit {
city: new FormControl(),
emailAddress: new FormControl(),
phoneNumber: new FormControl()
- })
+ }),
+ geographicSiteInfo: new FormGroup({
+ locality: new FormControl(),
+ postcode: new FormControl(null, Validators.required),
+ stateOrProvince: 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()
+ })
})
-
+
predefinedOrganizationCtrl = new FormControl()
customOrganizationCtrl = new FormControl()
@@ -55,21 +80,40 @@ export class EditIndividualsComponent implements OnInit {
newIndividual = false
+ testbedProvider = false
+
+ hasGeographicSite = 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) {
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)
+
+ }
+ }
+
} else {
- // this.initNewOrganizationFormArray()
+ for(var val of this.authService.portalUserJWT.realm_access.roles){
+ if (val ==='TESTBED_PROVIDER') {
+ this.testbedProvider=true
+
+ }
+ }
+ // this.initNewOrganizationFormArray()
this.newIndividual = true
}
@@ -118,10 +162,10 @@ export class EditIndividualsComponent implements OnInit {
}
//prefefined Organization in Related Party
-
+
//
}
-
+
)
}
@@ -129,6 +173,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',
@@ -151,29 +196,151 @@ 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)
}
)
- }
+ }
else {
this.individualService.patchIndividual({id: this.individual.id, individual: updateObj}).subscribe(
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)
}
)
}
-
}
refreshIndividual(updatedIndividual: Individual) {
// this.individualID = updatedIndividual.id
this.retrieveIndividual()
+ if(this.testbedProvider) {
+ this.retrieveGeographicSite()
+ }
+ }
+
+ retrieveGeographicSite(){
+ this.geographicSiteService.retrieveGeographicSite(this.individual.id).subscribe(
+ 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({
+ 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: id
+ }],
+ externalIdentifier: [],
+ calendar:[],
+ place:[{'@type':"GeographicAddressValue",
+ geographicAddress:{
+ '@type':"GeographicAddressValue",
+ 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.hasGeographicSite) {
+
+ this.geographicSiteService.createGeographicSite(updateObj).subscribe(
+ data => { updatedGeographicSite = data },
+ error => console.error(error),
+ () => {
+ this.toast.success("Geographic site was successfully created")
+ }
+ )
+ }
+ else {
+ this.geographicSiteService.patchGeographicSite(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 9dd049f6d347714ce422b0956ca154aaaf4bf8dc..bad895e9d2c70a6036a4c9c00800160fd2d971d3 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,29 @@ export class RedirectComponent implements OnInit {
constructor(
private appService: AppService,
- private router: Router
+ private router: Router,
+ private authService: AuthService
) { }
ngOnInit() {
+
const activePortal = localStorage.getItem('active_portal')
if (activePortal === 'services') {
this.router.navigate(['services', 'services_marketplace'])
+
}
else if (activePortal === 'resources') {
this.router.navigate(['resources', 'resource_catalogs'])
}
else if (activePortal === 'testing') {
+
this.router.navigate(['testing', 'service_test_specs'])
}
else if (activePortal === 'products') {
- this.router.navigate(['products', 'marketplace'])
+
+ 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 2b6aa780e41d6dff1b562dd38d1560d9af8fc9ad..029e931ed9f6a3b2ee93a65ccd25fcd20d537511 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)
diff --git a/src/app/shared/services/auth.service.ts b/src/app/shared/services/auth.service.ts
index cf7cda01e290021b66fafbac951c364f75370c7b..b233d46ed3a5eb3ffa44e9a6cfa4b976836356f7 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(
@@ -130,7 +130,7 @@ export class AuthService {
this.oauthService.initCodeFlow()
}
- public logout() {
+ public logout() {
// this.http.delete(authConfig.tokenEndpoint).subscribe(
// data => console.log(data)
// )
@@ -138,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])
@@ -146,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])
// }
// )
}
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 0000000000000000000000000000000000000000..0ec1bf46e719ce3c2ad76d9ffff65e99b1dd09c3
--- /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