diff --git a/src/app/app-products-routing.module.ts b/src/app/app-products-routing.module.ts index 0c87cc63d6228111455ed353af85d270a8261651..7cfa3c336324ff99ac42778d68eb72ba71241ce6 100644 --- a/src/app/app-products-routing.module.ts +++ b/src/app/app-products-routing.module.ts @@ -15,6 +15,9 @@ import { EditIndividualsComponent } from './shared/components/partyManagement/ed import { ListProductOfferingsComponent } from './p_product/admin/productCatalogManagement/list-product-offerings/list-product-offerings.component'; import { EditProductCatalogsComponent } from './p_product/admin/productCatalogManagement/edit-product-catalogs/edit-product-catalogs.component'; import { EditProductOfferingsComponent } from './p_product/admin/productCatalogManagement/edit-product-offerings/edit-product-offerings.component'; +import { ProductOrderCheckoutComponent } from './p_product/orderCheckout/product-order-checkout/product-order-checkout.component'; +import { PreviewProductOrderComponent } from './p_product/admin/productOrderManagement/preview-product-order/preview-product-order.component'; +import { ListProductOrdersComponent } from './p_product/admin/productOrderManagement/list-product-orders/list-product-orders.component'; const routes: Routes = [ @@ -29,6 +32,11 @@ const routes: Routes = [ { path: 'product_category_update/:id', component: EditProductCategoriesComponent }, { path: 'product_category_update', component: EditProductCategoriesComponent }, + { path: 'product_orders', component: ListProductOrdersComponent }, + { path: 'product_order/:id', component: PreviewProductOrderComponent }, + + { path: 'product_order_checkout', component: ProductOrderCheckoutComponent }, + { path: 'product_offerings', component: ListProductOfferingsComponent }, { path: 'product_offering_update/:id', component: EditProductOfferingsComponent }, { path: 'product_offering_update', component: EditProductOfferingsComponent }, diff --git a/src/app/app-products.module.ts b/src/app/app-products.module.ts index a83a0f98d10299a08f7a714f1ee36ff6f7e47388..7837b0a1d05a7afb4176905fca899d1eeecb4f33 100644 --- a/src/app/app-products.module.ts +++ b/src/app/app-products.module.ts @@ -25,6 +25,15 @@ import { AssignProductOfferingsComponent } from './p_product/admin/productCatalo import { AssignSubcategoriesComponent } from './p_product/admin/productCatalogManagement/edit-product-categories/assign-subcategories/assign-subcategories.component'; import { ConfirmCharacteristicAssignmentComponent } from './p_product/admin/productCatalogManagement/edit-product-specs/assign-service-specification/confirm-characteristic-assignment/confirm-characteristic-assignment.component'; import { SortByValuePipe } from './p_product/admin/productCatalogManagement/edit-product-offerings/sort-by-value.pipe'; +import { ProductOrderCheckoutComponent } from './p_product/orderCheckout/product-order-checkout/product-order-checkout.component'; +import { ProductOrderCalendarComponent } from './p_product/admin/productOrderManagement/product-order-calendar/product-order-calendar.component'; +import { ListProductOrdersComponent } from './p_product/admin/productOrderManagement/list-product-orders/list-product-orders.component'; +import { PreviewProductOrderComponent } from './p_product/admin/productOrderManagement/preview-product-order/preview-product-order.component'; +import { EditProductOrderItemsComponent } from './p_product/admin/productOrderManagement/preview-product-order/edit-product-order-items/edit-product-order-items.component'; +import { TerminateProductOrderItemsComponent } from './p_product/admin/productOrderManagement/preview-product-order/terminate-product-order-items/terminate-product-order-items.component'; +import { DeleteProductOrderComponent } from './p_product/admin/productOrderManagement/delete-product-order/delete-product-order.component'; +import { EditOrdersProductSpecCharacteristicsComponent } from './p_product/admin/productOrderManagement/preview-product-order/edit-product-order-items/edit-orders-product-spec-characteristics/edit-orders-product-spec-characteristics.component'; +import { FullCalendarModule } from "@fullcalendar/angular"; @NgModule({ declarations: [ @@ -49,13 +58,22 @@ import { SortByValuePipe } from './p_product/admin/productCatalogManagement/edit PreviewMarketPlaceItemComponent, AssignProductOfferingsComponent, AssignSubcategoriesComponent, - SortByValuePipe + SortByValuePipe, + ProductOrderCheckoutComponent, + ProductOrderCalendarComponent, + PreviewProductOrderComponent, + EditProductOrderItemsComponent, + TerminateProductOrderItemsComponent, + DeleteProductOrderComponent, + ListProductOrdersComponent, + EditOrdersProductSpecCharacteristicsComponent ], imports: [ - CommonModule, - SharedModule, - AppProductsRoutingModule, - ] + CommonModule, + SharedModule, + AppProductsRoutingModule, + FullCalendarModule +] }) export class AppProductsModule { } diff --git a/src/app/openApis/productOrderingManagement/api-configuration.ts b/src/app/openApis/productOrderingManagement/api-configuration.ts new file mode 100644 index 0000000000000000000000000000000000000000..27e795c2ba98215bf3df38e848c8de0967d0e2be --- /dev/null +++ b/src/app/openApis/productOrderingManagement/api-configuration.ts @@ -0,0 +1,22 @@ +/* tslint:disable */ +/* eslint-disable */ +/* Code generated by ng-openapi-gen DO NOT EDIT. */ + +import { Injectable } from '@angular/core'; + +/** + * Global configuration + */ +@Injectable({ + providedIn: 'root', +}) +export class ApiConfiguration { + rootUrl: string = 'https://portal.openslice.eu/tmf-api'; +} + +/** + * Parameters for `ApiModule.forRoot()` + */ +export interface ApiConfigurationParams { + rootUrl?: string; +} diff --git a/src/app/openApis/productOrderingManagement/api.module.ts b/src/app/openApis/productOrderingManagement/api.module.ts new file mode 100644 index 0000000000000000000000000000000000000000..91ee782eaa127b12ff16009f77486bc2fa1f81ce --- /dev/null +++ b/src/app/openApis/productOrderingManagement/api.module.ts @@ -0,0 +1,58 @@ +/* tslint:disable */ +/* eslint-disable */ +/* Code generated by ng-openapi-gen DO NOT EDIT. */ + +import { NgModule, ModuleWithProviders, SkipSelf, Optional } from '@angular/core'; +import { HttpClient } from '@angular/common/http'; +import { ApiConfiguration, ApiConfigurationParams } from './api-configuration'; + +import { ProductOrderService } from './services/product-order.service'; +import { ListenerService } from './services/listener.service'; +import { NotificationListenersClientSideService } from './services/notification-listeners-client-side.service'; +import { HubService } from './services/hub.service'; +import { EventsSubscriptionService } from './services/events-subscription.service'; +import { CancelProductOrderService } from './services/cancel-product-order.service'; + +/** + * Module that provides all services and configuration. + */ +@NgModule({ + imports: [], + exports: [], + declarations: [], + providers: [ + ProductOrderService, + ListenerService, + NotificationListenersClientSideService, + HubService, + EventsSubscriptionService, + CancelProductOrderService, + ApiConfiguration + ], +}) +export class ApiModule { + static forRoot(params: ApiConfigurationParams): ModuleWithProviders { + return { + ngModule: ApiModule, + providers: [ + { + provide: ApiConfiguration, + useValue: params + } + ] + } + } + + 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/productOrderingManagement/base-service.ts b/src/app/openApis/productOrderingManagement/base-service.ts new file mode 100644 index 0000000000000000000000000000000000000000..7bb77d7c45d988360808973f608eb2f9e808819b --- /dev/null +++ b/src/app/openApis/productOrderingManagement/base-service.ts @@ -0,0 +1,36 @@ +/* tslint:disable */ +/* eslint-disable */ +/* Code generated by ng-openapi-gen DO NOT EDIT. */ + +import { Injectable } from '@angular/core'; +import { HttpClient } from '@angular/common/http'; +import { ApiConfiguration } from './api-configuration'; + +/** + * Base class for services + */ +@Injectable() +export class BaseService { + constructor( + protected config: ApiConfiguration, + protected http: HttpClient + ) { + } + + private _rootUrl?: string; + + /** + * Returns the root url for all operations in this service. 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; + } +} diff --git a/src/app/openApis/productOrderingManagement/fn/cancel-product-order/create-cancel-product-order.ts b/src/app/openApis/productOrderingManagement/fn/cancel-product-order/create-cancel-product-order.ts new file mode 100644 index 0000000000000000000000000000000000000000..6fbe5ffcd57de87029550a9ace7d9e5e35d257cf --- /dev/null +++ b/src/app/openApis/productOrderingManagement/fn/cancel-product-order/create-cancel-product-order.ts @@ -0,0 +1,33 @@ +/* tslint:disable */ +/* eslint-disable */ +/* Code generated by ng-openapi-gen DO NOT EDIT. */ + +import { HttpClient, HttpContext, HttpResponse } from '@angular/common/http'; +import { Observable } from 'rxjs'; +import { filter, map } from 'rxjs/operators'; +import { StrictHttpResponse } from '../../strict-http-response'; +import { RequestBuilder } from '../../request-builder'; + +import { CancelProductOrderCreate } from '../../models/cancel-product-order-create'; + +export interface CreateCancelProductOrder$Params { + body: CancelProductOrderCreate +} + +export function createCancelProductOrder(http: HttpClient, rootUrl: string, params: CreateCancelProductOrder$Params, context?: HttpContext): Observable> { + const rb = new RequestBuilder(rootUrl, createCancelProductOrder.PATH, 'post'); + if (params) { + rb.body(params.body, 'application/json;charset=utf-8'); + } + + return http.request( + rb.build({ responseType: 'text', accept: '*/*', context }) + ).pipe( + filter((r: any): r is HttpResponse => r instanceof HttpResponse), + map((r: HttpResponse) => { + return (r as HttpResponse).clone({ body: undefined }) as StrictHttpResponse; + }) + ); +} + +createCancelProductOrder.PATH = '/cancelProductOrder'; diff --git a/src/app/openApis/productOrderingManagement/fn/cancel-product-order/list-cancel-product-order.ts b/src/app/openApis/productOrderingManagement/fn/cancel-product-order/list-cancel-product-order.ts new file mode 100644 index 0000000000000000000000000000000000000000..77384860c70a50d42d809c6a586ecdfade4badda --- /dev/null +++ b/src/app/openApis/productOrderingManagement/fn/cancel-product-order/list-cancel-product-order.ts @@ -0,0 +1,49 @@ +/* tslint:disable */ +/* eslint-disable */ +/* Code generated by ng-openapi-gen DO NOT EDIT. */ + +import { HttpClient, HttpContext, HttpResponse } from '@angular/common/http'; +import { Observable } from 'rxjs'; +import { filter, map } from 'rxjs/operators'; +import { StrictHttpResponse } from '../../strict-http-response'; +import { RequestBuilder } from '../../request-builder'; + +import { CancelProductOrder } from '../../models/cancel-product-order'; + +export interface ListCancelProductOrder$Params { + +/** + * Comma-separated properties to be provided in response + */ + fields?: string; + +/** + * Requested index for start of resources to be provided in response + */ + offset?: number; + +/** + * Requested number of resources to be provided in response + */ + limit?: number; +} + +export function listCancelProductOrder(http: HttpClient, rootUrl: string, params?: ListCancelProductOrder$Params, context?: HttpContext): Observable>> { + const rb = new RequestBuilder(rootUrl, listCancelProductOrder.PATH, 'get'); + if (params) { + rb.query('fields', params.fields, {}); + rb.query('offset', params.offset, {}); + rb.query('limit', params.limit, {}); + } + + return http.request( + rb.build({ responseType: 'json', accept: 'application/json;charset=utf-8', context }) + ).pipe( + filter((r: any): r is HttpResponse => r instanceof HttpResponse), + map((r: HttpResponse) => { + return r as StrictHttpResponse>; + }) + ); +} + +listCancelProductOrder.PATH = '/cancelProductOrder'; diff --git a/src/app/openApis/productOrderingManagement/fn/cancel-product-order/retrieve-cancel-product-order.ts b/src/app/openApis/productOrderingManagement/fn/cancel-product-order/retrieve-cancel-product-order.ts new file mode 100644 index 0000000000000000000000000000000000000000..1abf647ea6f737c538e99a7708ca4f526e4bd9ce --- /dev/null +++ b/src/app/openApis/productOrderingManagement/fn/cancel-product-order/retrieve-cancel-product-order.ts @@ -0,0 +1,43 @@ +/* tslint:disable */ +/* eslint-disable */ +/* Code generated by ng-openapi-gen DO NOT EDIT. */ + +import { HttpClient, HttpContext, HttpResponse } from '@angular/common/http'; +import { Observable } from 'rxjs'; +import { filter, map } from 'rxjs/operators'; +import { StrictHttpResponse } from '../../strict-http-response'; +import { RequestBuilder } from '../../request-builder'; + +import { CancelProductOrder } from '../../models/cancel-product-order'; + +export interface RetrieveCancelProductOrder$Params { + +/** + * Identifier of the CancelProductOrder + */ + id: string; + +/** + * Comma-separated properties to provide in response + */ + fields?: string; +} + +export function retrieveCancelProductOrder(http: HttpClient, rootUrl: string, params: RetrieveCancelProductOrder$Params, context?: HttpContext): Observable> { + const rb = new RequestBuilder(rootUrl, retrieveCancelProductOrder.PATH, 'get'); + if (params) { + rb.path('id', params.id, {}); + rb.query('fields', params.fields, {}); + } + + return http.request( + rb.build({ responseType: 'json', accept: 'application/json;charset=utf-8', context }) + ).pipe( + filter((r: any): r is HttpResponse => r instanceof HttpResponse), + map((r: HttpResponse) => { + return r as StrictHttpResponse; + }) + ); +} + +retrieveCancelProductOrder.PATH = '/cancelProductOrder/{id}'; diff --git a/src/app/openApis/productOrderingManagement/fn/hub/register-listener.ts b/src/app/openApis/productOrderingManagement/fn/hub/register-listener.ts new file mode 100644 index 0000000000000000000000000000000000000000..4c3e3bedf473629d9450f00e77c8d3b9c8e66339 --- /dev/null +++ b/src/app/openApis/productOrderingManagement/fn/hub/register-listener.ts @@ -0,0 +1,33 @@ +/* tslint:disable */ +/* eslint-disable */ +/* Code generated by ng-openapi-gen DO NOT EDIT. */ + +import { HttpClient, HttpContext, HttpResponse } from '@angular/common/http'; +import { Observable } from 'rxjs'; +import { filter, map } from 'rxjs/operators'; +import { StrictHttpResponse } from '../../strict-http-response'; +import { RequestBuilder } from '../../request-builder'; + +import { EventSubscriptionInput } from '../../models/event-subscription-input'; + +export interface RegisterListener$Params { + body: EventSubscriptionInput +} + +export function registerListener(http: HttpClient, rootUrl: string, params: RegisterListener$Params, context?: HttpContext): Observable> { + const rb = new RequestBuilder(rootUrl, registerListener.PATH, 'post'); + if (params) { + rb.body(params.body, 'application/json;charset=utf-8'); + } + + return http.request( + rb.build({ responseType: 'text', accept: '*/*', context }) + ).pipe( + filter((r: any): r is HttpResponse => r instanceof HttpResponse), + map((r: HttpResponse) => { + return (r as HttpResponse).clone({ body: undefined }) as StrictHttpResponse; + }) + ); +} + +registerListener.PATH = '/productOrderingManagement/v4/hub'; diff --git a/src/app/openApis/productOrderingManagement/fn/hub/unregister-listener.ts b/src/app/openApis/productOrderingManagement/fn/hub/unregister-listener.ts new file mode 100644 index 0000000000000000000000000000000000000000..c225b70ae394234f2ae640358e7ddd56d97b15f7 --- /dev/null +++ b/src/app/openApis/productOrderingManagement/fn/hub/unregister-listener.ts @@ -0,0 +1,36 @@ +/* tslint:disable */ +/* eslint-disable */ +/* Code generated by ng-openapi-gen DO NOT EDIT. */ + +import { HttpClient, HttpContext, HttpResponse } from '@angular/common/http'; +import { Observable } from 'rxjs'; +import { filter, map } from 'rxjs/operators'; +import { StrictHttpResponse } from '../../strict-http-response'; +import { RequestBuilder } from '../../request-builder'; + + +export interface UnregisterListener$Params { + +/** + * The id of the registered listener + */ + id: string; +} + +export function unregisterListener(http: HttpClient, rootUrl: string, params: UnregisterListener$Params, context?: HttpContext): Observable> { + const rb = new RequestBuilder(rootUrl, unregisterListener.PATH, 'delete'); + if (params) { + rb.path('id', params.id, {}); + } + + return http.request( + rb.build({ responseType: 'text', accept: '*/*', context }) + ).pipe( + filter((r: any): r is HttpResponse => r instanceof HttpResponse), + map((r: HttpResponse) => { + return (r as HttpResponse).clone({ body: undefined }) as StrictHttpResponse; + }) + ); +} + +unregisterListener.PATH = '/productOrderingManagement/v4/hub/{id}'; diff --git a/src/app/openApis/productOrderingManagement/fn/listener/listen-to-cancel-product-order-create-event.ts b/src/app/openApis/productOrderingManagement/fn/listener/listen-to-cancel-product-order-create-event.ts new file mode 100644 index 0000000000000000000000000000000000000000..597ffb6fad48260d0de051bc59e3089426614a91 --- /dev/null +++ b/src/app/openApis/productOrderingManagement/fn/listener/listen-to-cancel-product-order-create-event.ts @@ -0,0 +1,33 @@ +/* tslint:disable */ +/* eslint-disable */ +/* Code generated by ng-openapi-gen DO NOT EDIT. */ + +import { HttpClient, HttpContext, HttpResponse } from '@angular/common/http'; +import { Observable } from 'rxjs'; +import { filter, map } from 'rxjs/operators'; +import { StrictHttpResponse } from '../../strict-http-response'; +import { RequestBuilder } from '../../request-builder'; + +import { CancelProductOrderCreateEvent } from '../../models/cancel-product-order-create-event'; + +export interface ListenToCancelProductOrderCreateEvent$Params { + body: CancelProductOrderCreateEvent +} + +export function listenToCancelProductOrderCreateEvent(http: HttpClient, rootUrl: string, params: ListenToCancelProductOrderCreateEvent$Params, context?: HttpContext): Observable> { + const rb = new RequestBuilder(rootUrl, listenToCancelProductOrderCreateEvent.PATH, 'post'); + if (params) { + rb.body(params.body, 'application/json;charset=utf-8'); + } + + return http.request( + rb.build({ responseType: 'text', accept: '*/*', context }) + ).pipe( + filter((r: any): r is HttpResponse => r instanceof HttpResponse), + map((r: HttpResponse) => { + return (r as HttpResponse).clone({ body: undefined }) as StrictHttpResponse; + }) + ); +} + +listenToCancelProductOrderCreateEvent.PATH = '/productOrderingManagement/v4/listener/cancelProductOrderCreateEvent'; diff --git a/src/app/openApis/productOrderingManagement/fn/listener/listen-to-cancel-product-order-information-required-event.ts b/src/app/openApis/productOrderingManagement/fn/listener/listen-to-cancel-product-order-information-required-event.ts new file mode 100644 index 0000000000000000000000000000000000000000..900e7a3d824a9f82e92a27b493c34333b377b380 --- /dev/null +++ b/src/app/openApis/productOrderingManagement/fn/listener/listen-to-cancel-product-order-information-required-event.ts @@ -0,0 +1,33 @@ +/* tslint:disable */ +/* eslint-disable */ +/* Code generated by ng-openapi-gen DO NOT EDIT. */ + +import { HttpClient, HttpContext, HttpResponse } from '@angular/common/http'; +import { Observable } from 'rxjs'; +import { filter, map } from 'rxjs/operators'; +import { StrictHttpResponse } from '../../strict-http-response'; +import { RequestBuilder } from '../../request-builder'; + +import { CancelProductOrderInformationRequiredEvent } from '../../models/cancel-product-order-information-required-event'; + +export interface ListenToCancelProductOrderInformationRequiredEvent$Params { + body: CancelProductOrderInformationRequiredEvent +} + +export function listenToCancelProductOrderInformationRequiredEvent(http: HttpClient, rootUrl: string, params: ListenToCancelProductOrderInformationRequiredEvent$Params, context?: HttpContext): Observable> { + const rb = new RequestBuilder(rootUrl, listenToCancelProductOrderInformationRequiredEvent.PATH, 'post'); + if (params) { + rb.body(params.body, 'application/json;charset=utf-8'); + } + + return http.request( + rb.build({ responseType: 'text', accept: '*/*', context }) + ).pipe( + filter((r: any): r is HttpResponse => r instanceof HttpResponse), + map((r: HttpResponse) => { + return (r as HttpResponse).clone({ body: undefined }) as StrictHttpResponse; + }) + ); +} + +listenToCancelProductOrderInformationRequiredEvent.PATH = '/productOrderingManagement/v4/listener/cancelProductOrderInformationRequiredEvent'; diff --git a/src/app/openApis/productOrderingManagement/fn/listener/listen-to-cancel-product-order-state-change-event.ts b/src/app/openApis/productOrderingManagement/fn/listener/listen-to-cancel-product-order-state-change-event.ts new file mode 100644 index 0000000000000000000000000000000000000000..cc16411df3871e55d79ab1e55a57b1360afee153 --- /dev/null +++ b/src/app/openApis/productOrderingManagement/fn/listener/listen-to-cancel-product-order-state-change-event.ts @@ -0,0 +1,33 @@ +/* tslint:disable */ +/* eslint-disable */ +/* Code generated by ng-openapi-gen DO NOT EDIT. */ + +import { HttpClient, HttpContext, HttpResponse } from '@angular/common/http'; +import { Observable } from 'rxjs'; +import { filter, map } from 'rxjs/operators'; +import { StrictHttpResponse } from '../../strict-http-response'; +import { RequestBuilder } from '../../request-builder'; + +import { CancelProductOrderStateChangeEvent } from '../../models/cancel-product-order-state-change-event'; + +export interface ListenToCancelProductOrderStateChangeEvent$Params { + body: CancelProductOrderStateChangeEvent +} + +export function listenToCancelProductOrderStateChangeEvent(http: HttpClient, rootUrl: string, params: ListenToCancelProductOrderStateChangeEvent$Params, context?: HttpContext): Observable> { + const rb = new RequestBuilder(rootUrl, listenToCancelProductOrderStateChangeEvent.PATH, 'post'); + if (params) { + rb.body(params.body, 'application/json;charset=utf-8'); + } + + return http.request( + rb.build({ responseType: 'text', accept: '*/*', context }) + ).pipe( + filter((r: any): r is HttpResponse => r instanceof HttpResponse), + map((r: HttpResponse) => { + return (r as HttpResponse).clone({ body: undefined }) as StrictHttpResponse; + }) + ); +} + +listenToCancelProductOrderStateChangeEvent.PATH = '/productOrderingManagement/v4/listener/cancelProductOrderStateChangeEvent'; diff --git a/src/app/openApis/productOrderingManagement/fn/listener/listen-to-product-order-attribute-value-change-event.ts b/src/app/openApis/productOrderingManagement/fn/listener/listen-to-product-order-attribute-value-change-event.ts new file mode 100644 index 0000000000000000000000000000000000000000..5f00d6b02a10a196b6c3e765980162f367e4d3a3 --- /dev/null +++ b/src/app/openApis/productOrderingManagement/fn/listener/listen-to-product-order-attribute-value-change-event.ts @@ -0,0 +1,33 @@ +/* tslint:disable */ +/* eslint-disable */ +/* Code generated by ng-openapi-gen DO NOT EDIT. */ + +import { HttpClient, HttpContext, HttpResponse } from '@angular/common/http'; +import { Observable } from 'rxjs'; +import { filter, map } from 'rxjs/operators'; +import { StrictHttpResponse } from '../../strict-http-response'; +import { RequestBuilder } from '../../request-builder'; + +import { ProductOrderAttributeValueChangeEvent } from '../../models/product-order-attribute-value-change-event'; + +export interface ListenToProductOrderAttributeValueChangeEvent$Params { + body: ProductOrderAttributeValueChangeEvent +} + +export function listenToProductOrderAttributeValueChangeEvent(http: HttpClient, rootUrl: string, params: ListenToProductOrderAttributeValueChangeEvent$Params, context?: HttpContext): Observable> { + const rb = new RequestBuilder(rootUrl, listenToProductOrderAttributeValueChangeEvent.PATH, 'post'); + if (params) { + rb.body(params.body, 'application/json;charset=utf-8'); + } + + return http.request( + rb.build({ responseType: 'text', accept: '*/*', context }) + ).pipe( + filter((r: any): r is HttpResponse => r instanceof HttpResponse), + map((r: HttpResponse) => { + return (r as HttpResponse).clone({ body: undefined }) as StrictHttpResponse; + }) + ); +} + +listenToProductOrderAttributeValueChangeEvent.PATH = '/productOrderingManagement/v4/listener/productOrderAttributeValueChangeEvent'; diff --git a/src/app/openApis/productOrderingManagement/fn/listener/listen-to-product-order-create-event.ts b/src/app/openApis/productOrderingManagement/fn/listener/listen-to-product-order-create-event.ts new file mode 100644 index 0000000000000000000000000000000000000000..e65dca9fa07f7fe5dd9978c6c895dde50f22a690 --- /dev/null +++ b/src/app/openApis/productOrderingManagement/fn/listener/listen-to-product-order-create-event.ts @@ -0,0 +1,33 @@ +/* tslint:disable */ +/* eslint-disable */ +/* Code generated by ng-openapi-gen DO NOT EDIT. */ + +import { HttpClient, HttpContext, HttpResponse } from '@angular/common/http'; +import { Observable } from 'rxjs'; +import { filter, map } from 'rxjs/operators'; +import { StrictHttpResponse } from '../../strict-http-response'; +import { RequestBuilder } from '../../request-builder'; + +import { ProductOrderCreateEvent } from '../../models/product-order-create-event'; + +export interface ListenToProductOrderCreateEvent$Params { + body: ProductOrderCreateEvent +} + +export function listenToProductOrderCreateEvent(http: HttpClient, rootUrl: string, params: ListenToProductOrderCreateEvent$Params, context?: HttpContext): Observable> { + const rb = new RequestBuilder(rootUrl, listenToProductOrderCreateEvent.PATH, 'post'); + if (params) { + rb.body(params.body, 'application/json;charset=utf-8'); + } + + return http.request( + rb.build({ responseType: 'text', accept: '*/*', context }) + ).pipe( + filter((r: any): r is HttpResponse => r instanceof HttpResponse), + map((r: HttpResponse) => { + return (r as HttpResponse).clone({ body: undefined }) as StrictHttpResponse; + }) + ); +} + +listenToProductOrderCreateEvent.PATH = '/productOrderingManagement/v4/listener/productOrderCreateEvent'; diff --git a/src/app/openApis/productOrderingManagement/fn/listener/listen-to-product-order-delete-event.ts b/src/app/openApis/productOrderingManagement/fn/listener/listen-to-product-order-delete-event.ts new file mode 100644 index 0000000000000000000000000000000000000000..2ccb89de64d304b7a73610dd77964f4da14a6dc8 --- /dev/null +++ b/src/app/openApis/productOrderingManagement/fn/listener/listen-to-product-order-delete-event.ts @@ -0,0 +1,33 @@ +/* tslint:disable */ +/* eslint-disable */ +/* Code generated by ng-openapi-gen DO NOT EDIT. */ + +import { HttpClient, HttpContext, HttpResponse } from '@angular/common/http'; +import { Observable } from 'rxjs'; +import { filter, map } from 'rxjs/operators'; +import { StrictHttpResponse } from '../../strict-http-response'; +import { RequestBuilder } from '../../request-builder'; + +import { ProductOrderDeleteEvent } from '../../models/product-order-delete-event'; + +export interface ListenToProductOrderDeleteEvent$Params { + body: ProductOrderDeleteEvent +} + +export function listenToProductOrderDeleteEvent(http: HttpClient, rootUrl: string, params: ListenToProductOrderDeleteEvent$Params, context?: HttpContext): Observable> { + const rb = new RequestBuilder(rootUrl, listenToProductOrderDeleteEvent.PATH, 'post'); + if (params) { + rb.body(params.body, 'application/json;charset=utf-8'); + } + + return http.request( + rb.build({ responseType: 'text', accept: '*/*', context }) + ).pipe( + filter((r: any): r is HttpResponse => r instanceof HttpResponse), + map((r: HttpResponse) => { + return (r as HttpResponse).clone({ body: undefined }) as StrictHttpResponse; + }) + ); +} + +listenToProductOrderDeleteEvent.PATH = '/productOrderingManagement/v4/listener/productOrderDeleteEvent'; diff --git a/src/app/openApis/productOrderingManagement/fn/listener/listen-to-product-order-information-required-event.ts b/src/app/openApis/productOrderingManagement/fn/listener/listen-to-product-order-information-required-event.ts new file mode 100644 index 0000000000000000000000000000000000000000..cd2583784a5c86d8555e83abea66b23f855b3136 --- /dev/null +++ b/src/app/openApis/productOrderingManagement/fn/listener/listen-to-product-order-information-required-event.ts @@ -0,0 +1,33 @@ +/* tslint:disable */ +/* eslint-disable */ +/* Code generated by ng-openapi-gen DO NOT EDIT. */ + +import { HttpClient, HttpContext, HttpResponse } from '@angular/common/http'; +import { Observable } from 'rxjs'; +import { filter, map } from 'rxjs/operators'; +import { StrictHttpResponse } from '../../strict-http-response'; +import { RequestBuilder } from '../../request-builder'; + +import { ProductOrderInformationRequiredEvent } from '../../models/product-order-information-required-event'; + +export interface ListenToProductOrderInformationRequiredEvent$Params { + body: ProductOrderInformationRequiredEvent +} + +export function listenToProductOrderInformationRequiredEvent(http: HttpClient, rootUrl: string, params: ListenToProductOrderInformationRequiredEvent$Params, context?: HttpContext): Observable> { + const rb = new RequestBuilder(rootUrl, listenToProductOrderInformationRequiredEvent.PATH, 'post'); + if (params) { + rb.body(params.body, 'application/json;charset=utf-8'); + } + + return http.request( + rb.build({ responseType: 'text', accept: '*/*', context }) + ).pipe( + filter((r: any): r is HttpResponse => r instanceof HttpResponse), + map((r: HttpResponse) => { + return (r as HttpResponse).clone({ body: undefined }) as StrictHttpResponse; + }) + ); +} + +listenToProductOrderInformationRequiredEvent.PATH = '/productOrderingManagement/v4/listener/productOrderInformationRequiredEvent'; diff --git a/src/app/openApis/productOrderingManagement/fn/listener/listen-to-product-order-state-change-event.ts b/src/app/openApis/productOrderingManagement/fn/listener/listen-to-product-order-state-change-event.ts new file mode 100644 index 0000000000000000000000000000000000000000..40e4b93a4ad4e22db39ac53ab1b95634a7c5aebd --- /dev/null +++ b/src/app/openApis/productOrderingManagement/fn/listener/listen-to-product-order-state-change-event.ts @@ -0,0 +1,33 @@ +/* tslint:disable */ +/* eslint-disable */ +/* Code generated by ng-openapi-gen DO NOT EDIT. */ + +import { HttpClient, HttpContext, HttpResponse } from '@angular/common/http'; +import { Observable } from 'rxjs'; +import { filter, map } from 'rxjs/operators'; +import { StrictHttpResponse } from '../../strict-http-response'; +import { RequestBuilder } from '../../request-builder'; + +import { ProductOrderStateChangeEvent } from '../../models/product-order-state-change-event'; + +export interface ListenToProductOrderStateChangeEvent$Params { + body: ProductOrderStateChangeEvent +} + +export function listenToProductOrderStateChangeEvent(http: HttpClient, rootUrl: string, params: ListenToProductOrderStateChangeEvent$Params, context?: HttpContext): Observable> { + const rb = new RequestBuilder(rootUrl, listenToProductOrderStateChangeEvent.PATH, 'post'); + if (params) { + rb.body(params.body, 'application/json;charset=utf-8'); + } + + return http.request( + rb.build({ responseType: 'text', accept: '*/*', context }) + ).pipe( + filter((r: any): r is HttpResponse => r instanceof HttpResponse), + map((r: HttpResponse) => { + return (r as HttpResponse).clone({ body: undefined }) as StrictHttpResponse; + }) + ); +} + +listenToProductOrderStateChangeEvent.PATH = '/productOrderingManagement/v4/listener/productOrderStateChangeEvent'; diff --git a/src/app/openApis/productOrderingManagement/fn/product-order/create-product-order.ts b/src/app/openApis/productOrderingManagement/fn/product-order/create-product-order.ts new file mode 100644 index 0000000000000000000000000000000000000000..3f87735dbceba0a9171976768d512ef7a33aa93c --- /dev/null +++ b/src/app/openApis/productOrderingManagement/fn/product-order/create-product-order.ts @@ -0,0 +1,34 @@ +/* tslint:disable */ +/* eslint-disable */ +/* Code generated by ng-openapi-gen DO NOT EDIT. */ + +import { HttpClient, HttpContext, HttpResponse } from '@angular/common/http'; +import { Observable } from 'rxjs'; +import { filter, map } from 'rxjs/operators'; +import { StrictHttpResponse } from '../../strict-http-response'; +import { RequestBuilder } from '../../request-builder'; + +import { ProductOrderCreate } from '../../models/product-order-create'; +import { ProductOrder } from '../../models'; + +export interface CreateProductOrder$Params { + body: ProductOrderCreate +} + +export function createProductOrder(http: HttpClient, rootUrl: string, params: CreateProductOrder$Params, context?: HttpContext): Observable> { + const rb = new RequestBuilder(rootUrl, createProductOrder.PATH, 'post'); + if (params) { + rb.body(params.body, 'application/json;charset=utf-8'); + } + + return http.request( + rb.build({ responseType: 'text', accept: '*/*', context }) + ).pipe( + filter((r: any): r is HttpResponse => r instanceof HttpResponse), + map((r: HttpResponse) => { + return (r as HttpResponse).clone({ body: undefined }) as StrictHttpResponse; + }) + ); +} + +createProductOrder.PATH = '/productOrderingManagement/v4/productOrder'; diff --git a/src/app/openApis/productOrderingManagement/fn/product-order/delete-product-order.ts b/src/app/openApis/productOrderingManagement/fn/product-order/delete-product-order.ts new file mode 100644 index 0000000000000000000000000000000000000000..4aff62c17c76133ffc81df903a93708532dc2968 --- /dev/null +++ b/src/app/openApis/productOrderingManagement/fn/product-order/delete-product-order.ts @@ -0,0 +1,36 @@ +/* tslint:disable */ +/* eslint-disable */ +/* Code generated by ng-openapi-gen DO NOT EDIT. */ + +import { HttpClient, HttpContext, HttpResponse } from '@angular/common/http'; +import { Observable } from 'rxjs'; +import { filter, map } from 'rxjs/operators'; +import { StrictHttpResponse } from '../../strict-http-response'; +import { RequestBuilder } from '../../request-builder'; + + +export interface DeleteProductOrder$Params { + +/** + * Identifier of the ProductOrder + */ + id: string; +} + +export function deleteProductOrder(http: HttpClient, rootUrl: string, params: DeleteProductOrder$Params, context?: HttpContext): Observable> { + const rb = new RequestBuilder(rootUrl, deleteProductOrder.PATH, 'delete'); + if (params) { + rb.path('id', params.id, {}); + } + + return http.request( + rb.build({ responseType: 'text', accept: '*/*', context }) + ).pipe( + filter((r: any): r is HttpResponse => r instanceof HttpResponse), + map((r: HttpResponse) => { + return (r as HttpResponse).clone({ body: undefined }) as StrictHttpResponse; + }) + ); +} + +deleteProductOrder.PATH = '/productOrderingManagement/v4/productOrder/{id}'; diff --git a/src/app/openApis/productOrderingManagement/fn/product-order/get-image-product-order-item-relationship-graph.ts b/src/app/openApis/productOrderingManagement/fn/product-order/get-image-product-order-item-relationship-graph.ts new file mode 100644 index 0000000000000000000000000000000000000000..60aab18bf13d4754036066fd648468e0074fec2f --- /dev/null +++ b/src/app/openApis/productOrderingManagement/fn/product-order/get-image-product-order-item-relationship-graph.ts @@ -0,0 +1,42 @@ +/* tslint:disable */ +/* eslint-disable */ +/* Code generated by ng-openapi-gen DO NOT EDIT. */ + +import { HttpClient, HttpContext, HttpResponse } from '@angular/common/http'; +import { Observable } from 'rxjs'; +import { filter, map } from 'rxjs/operators'; +import { StrictHttpResponse } from '../../strict-http-response'; +import { RequestBuilder } from '../../request-builder'; + + +export interface GetImageProductOrderItemRelationshipGraph$Params { + +/** + * Identifier of the ProductOrder + */ + id: string; + +/** + * Identifier of the ProductOrderItem + */ + itemid: string; +} + +export function getImageProductOrderItemRelationshipGraph(http: HttpClient, rootUrl: string, params: GetImageProductOrderItemRelationshipGraph$Params, context?: HttpContext): Observable> { + const rb = new RequestBuilder(rootUrl, getImageProductOrderItemRelationshipGraph.PATH, 'get'); + if (params) { + rb.path('id', params.id, {}); + rb.path('itemid', params.itemid, {}); + } + + return http.request( + rb.build({ responseType: 'text', accept: '*/*', context }) + ).pipe( + filter((r: any): r is HttpResponse => r instanceof HttpResponse), + map((r: HttpResponse) => { + return (r as HttpResponse).clone({ body: undefined }) as StrictHttpResponse; + }) + ); +} + +getImageProductOrderItemRelationshipGraph.PATH = '/productOrderingManagement/v4/productOrder/{id}/item/{itemid}/relationship_graph'; diff --git a/src/app/openApis/productOrderingManagement/fn/product-order/get-image-product-order-notes-graph.ts b/src/app/openApis/productOrderingManagement/fn/product-order/get-image-product-order-notes-graph.ts new file mode 100644 index 0000000000000000000000000000000000000000..9b2f33cdaaa35dda023a35ec2acede5f273ee9db --- /dev/null +++ b/src/app/openApis/productOrderingManagement/fn/product-order/get-image-product-order-notes-graph.ts @@ -0,0 +1,36 @@ +/* tslint:disable */ +/* eslint-disable */ +/* Code generated by ng-openapi-gen DO NOT EDIT. */ + +import { HttpClient, HttpContext, HttpResponse } from '@angular/common/http'; +import { Observable } from 'rxjs'; +import { filter, map } from 'rxjs/operators'; +import { StrictHttpResponse } from '../../strict-http-response'; +import { RequestBuilder } from '../../request-builder'; + + +export interface GetImageProductOrderNotesGraph$Params { + +/** + * Identifier of the ProductOrder + */ + id: string; +} + +export function getImageProductOrderNotesGraph(http: HttpClient, rootUrl: string, params: GetImageProductOrderNotesGraph$Params, context?: HttpContext): Observable> { + const rb = new RequestBuilder(rootUrl, getImageProductOrderNotesGraph.PATH, 'get'); + if (params) { + rb.path('id', params.id, {}); + } + + return http.request( + rb.build({ responseType: 'text', accept: '*/*', context }) + ).pipe( + filter((r: any): r is HttpResponse => r instanceof HttpResponse), + map((r: HttpResponse) => { + return (r as HttpResponse).clone({ body: undefined }) as StrictHttpResponse; + }) + ); +} + +getImageProductOrderNotesGraph.PATH = '/productOrderingManagement/v4/productOrder/{id}/notes_graph'; diff --git a/src/app/openApis/productOrderingManagement/fn/product-order/list-product-order.ts b/src/app/openApis/productOrderingManagement/fn/product-order/list-product-order.ts new file mode 100644 index 0000000000000000000000000000000000000000..e3ecebe2eb12174f0a93b2fc515ccd13af158dae --- /dev/null +++ b/src/app/openApis/productOrderingManagement/fn/product-order/list-product-order.ts @@ -0,0 +1,61 @@ +/* tslint:disable */ +/* eslint-disable */ +/* Code generated by ng-openapi-gen DO NOT EDIT. */ + +import { HttpClient, HttpContext, HttpResponse } from '@angular/common/http'; +import { Observable } from 'rxjs'; +import { filter, map } from 'rxjs/operators'; +import { StrictHttpResponse } from '../../strict-http-response'; +import { RequestBuilder } from '../../request-builder'; + +import { ProductOrder } from '../../models/product-order'; + +export interface ListProductOrder$Params { + +/** + * Comma-separated properties to be provided in response + */ + fields?: string; + +/** + * Requested index for start of resources to be provided in response + */ + offset?: number; + +/** + * Requested number of resources to be provided in response + */ + limit?: number; + +/** + * Requested starttime for start of resources to be provided in response + */ + starttime?: string; + +/** + * Requested endtime for start of resources to be provided in response + */ + endtime?: string; +} + +export function listProductOrder(http: HttpClient, rootUrl: string, params?: ListProductOrder$Params, context?: HttpContext): Observable>> { + const rb = new RequestBuilder(rootUrl, listProductOrder.PATH, 'get'); + if (params) { + rb.query('fields', params.fields, {}); + rb.query('offset', params.offset, {}); + rb.query('limit', params.limit, {}); + rb.query('starttime', params.starttime, {}); + rb.query('endtime', params.endtime, {}); + } + + return http.request( + rb.build({ responseType: 'json', accept: 'application/json;charset=utf-8', context }) + ).pipe( + filter((r: any): r is HttpResponse => r instanceof HttpResponse), + map((r: HttpResponse) => { + return r as StrictHttpResponse>; + }) + ); +} + +listProductOrder.PATH = '/productOrderingManagement/v4/productOrder'; diff --git a/src/app/openApis/productOrderingManagement/fn/product-order/patch-product-order.ts b/src/app/openApis/productOrderingManagement/fn/product-order/patch-product-order.ts new file mode 100644 index 0000000000000000000000000000000000000000..80f976c4d33c47be8a994bc1c4c04652574538e6 --- /dev/null +++ b/src/app/openApis/productOrderingManagement/fn/product-order/patch-product-order.ts @@ -0,0 +1,40 @@ +/* tslint:disable */ +/* eslint-disable */ +/* Code generated by ng-openapi-gen DO NOT EDIT. */ + +import { HttpClient, HttpContext, HttpResponse } from '@angular/common/http'; +import { Observable } from 'rxjs'; +import { filter, map } from 'rxjs/operators'; +import { StrictHttpResponse } from '../../strict-http-response'; +import { RequestBuilder } from '../../request-builder'; + +import { ProductOrder } from '../../models/product-order'; +import { ProductOrderUpdate } from '../../models/product-order-update'; + +export interface PatchProductOrder$Params { + +/** + * Identifier of the ProductOrder + */ + id: string; + body: ProductOrderUpdate +} + +export function patchProductOrder(http: HttpClient, rootUrl: string, params: PatchProductOrder$Params, context?: HttpContext): Observable> { + const rb = new RequestBuilder(rootUrl, patchProductOrder.PATH, 'patch'); + if (params) { + rb.path('id', params.id, {}); + rb.body(params.body, 'application/json;charset=utf-8'); + } + + return http.request( + rb.build({ responseType: 'json', accept: 'application/json;charset=utf-8', context }) + ).pipe( + filter((r: any): r is HttpResponse => r instanceof HttpResponse), + map((r: HttpResponse) => { + return r as StrictHttpResponse; + }) + ); +} + +patchProductOrder.PATH = '/productOrderingManagement/v4/productOrder/{id}'; diff --git a/src/app/openApis/productOrderingManagement/fn/product-order/retrieve-product-order.ts b/src/app/openApis/productOrderingManagement/fn/product-order/retrieve-product-order.ts new file mode 100644 index 0000000000000000000000000000000000000000..bc402edc65c7df2140d7dc7c54f46a32bd5b5e67 --- /dev/null +++ b/src/app/openApis/productOrderingManagement/fn/product-order/retrieve-product-order.ts @@ -0,0 +1,43 @@ +/* tslint:disable */ +/* eslint-disable */ +/* Code generated by ng-openapi-gen DO NOT EDIT. */ + +import { HttpClient, HttpContext, HttpResponse } from '@angular/common/http'; +import { Observable } from 'rxjs'; +import { filter, map } from 'rxjs/operators'; +import { StrictHttpResponse } from '../../strict-http-response'; +import { RequestBuilder } from '../../request-builder'; + +import { ProductOrder } from '../../models/product-order'; + +export interface RetrieveProductOrder$Params { + +/** + * Identifier of the ProductOrder + */ + id: string; + +/** + * Comma-separated properties to provide in response + */ + fields?: string; +} + +export function retrieveProductOrder(http: HttpClient, rootUrl: string, params: RetrieveProductOrder$Params, context?: HttpContext): Observable> { + const rb = new RequestBuilder(rootUrl, retrieveProductOrder.PATH, 'get'); + if (params) { + rb.path('id', params.id, {}); + rb.query('fields', params.fields, {}); + } + + return http.request( + rb.build({ responseType: 'json', accept: 'application/json;charset=utf-8', context }) + ).pipe( + filter((r: any): r is HttpResponse => r instanceof HttpResponse), + map((r: HttpResponse) => { + return r as StrictHttpResponse; + }) + ); +} + +retrieveProductOrder.PATH = '/productOrderingManagement/v4/productOrder/{id}'; diff --git a/src/app/openApis/productOrderingManagement/models.ts b/src/app/openApis/productOrderingManagement/models.ts new file mode 100644 index 0000000000000000000000000000000000000000..555584ea845f6a9bcd499f9ca0a7da11cdb42109 --- /dev/null +++ b/src/app/openApis/productOrderingManagement/models.ts @@ -0,0 +1,62 @@ +/* tslint:disable */ +/* eslint-disable */ +/* Code generated by ng-openapi-gen DO NOT EDIT. */ + +export type { AgreementItemRef } from './models/agreement-item-ref'; +export type { AgreementRef } from './models/agreement-ref'; +export type { AppointmentRef } from './models/appointment-ref'; +export type { BillingAccountRef } from './models/billing-account-ref'; +export type { CancelProductOrder } from './models/cancel-product-order'; +export type { CancelProductOrderCreate } from './models/cancel-product-order-create'; +export type { CancelProductOrderCreateEvent } from './models/cancel-product-order-create-event'; +export type { CancelProductOrderCreateEventPayload } from './models/cancel-product-order-create-event-payload'; +export type { CancelProductOrderInformationRequiredEvent } from './models/cancel-product-order-information-required-event'; +export type { CancelProductOrderInformationRequiredEventPayload } from './models/cancel-product-order-information-required-event-payload'; +export type { CancelProductOrderStateChangeEvent } from './models/cancel-product-order-state-change-event'; +export type { CancelProductOrderStateChangeEventPayload } from './models/cancel-product-order-state-change-event-payload'; +export type { Characteristic } from './models/characteristic'; +export type { EventSubscription } from './models/event-subscription'; +export type { EventSubscriptionInput } from './models/event-subscription-input'; +export type { Money } from './models/money'; +export type { Note } from './models/note'; +export type { OrderItemRelationship } from './models/order-item-relationship'; +export type { OrderPrice } from './models/order-price'; +export type { OrderTerm } from './models/order-term'; +export type { PaymentRef } from './models/payment-ref'; +export type { Price } from './models/price'; +export type { PriceAlteration } from './models/price-alteration'; +export type { ProductOfferingPriceRef } from './models/product-offering-price-ref'; +export type { ProductOfferingQualificationItemRef } from './models/product-offering-qualification-item-ref'; +export type { ProductOfferingQualificationRef } from './models/product-offering-qualification-ref'; +export type { ProductOfferingRef } from './models/product-offering-ref'; +export type { ProductOrder } from './models/product-order'; +export type { ProductOrderAttributeValueChangeEvent } from './models/product-order-attribute-value-change-event'; +export type { ProductOrderAttributeValueChangeEventPayload } from './models/product-order-attribute-value-change-event-payload'; +export type { ProductOrderCreate } from './models/product-order-create'; +export type { ProductOrderCreateEvent } from './models/product-order-create-event'; +export type { ProductOrderCreateEventPayload } from './models/product-order-create-event-payload'; +export type { ProductOrderDeleteEvent } from './models/product-order-delete-event'; +export type { ProductOrderDeleteEventPayload } from './models/product-order-delete-event-payload'; +export type { ProductOrderInformationRequiredEvent } from './models/product-order-information-required-event'; +export type { ProductOrderInformationRequiredEventPayload } from './models/product-order-information-required-event-payload'; +export type { ProductOrderItem } from './models/product-order-item'; +export type { ProductOrderRef } from './models/product-order-ref'; +export type { ProductOrderStateChangeEvent } from './models/product-order-state-change-event'; +export type { ProductOrderStateChangeEventPayload } from './models/product-order-state-change-event-payload'; +export type { ProductOrderUpdate } from './models/product-order-update'; +export type { ProductPrice } from './models/product-price'; +export type { ProductRefOrValue } from './models/product-ref-or-value'; +export type { ProductRelationship } from './models/product-relationship'; +export type { ProductSpecificationRef } from './models/product-specification-ref'; +export type { ProductTerm } from './models/product-term'; +export type { Quantity } from './models/quantity'; +export type { QuoteItemRef } from './models/quote-item-ref'; +export type { QuoteRef } from './models/quote-ref'; +export type { RelatedChannel } from './models/related-channel'; +export type { RelatedParty } from './models/related-party'; +export type { RelatedPlaceRefOrValue } from './models/related-place-ref-or-value'; +export type { RelatedProductOrderItem } from './models/related-product-order-item'; +export type { ResourceRef } from './models/resource-ref'; +export type { ServiceRef } from './models/service-ref'; +export type { TargetProductSchema } from './models/target-product-schema'; +export type { TimePeriod } from './models/time-period'; diff --git a/src/app/openApis/productOrderingManagement/models/agreement-item-ref.ts b/src/app/openApis/productOrderingManagement/models/agreement-item-ref.ts new file mode 100644 index 0000000000000000000000000000000000000000..1f806ac3768e2a4d975d90b918d15cbd6bc269ab --- /dev/null +++ b/src/app/openApis/productOrderingManagement/models/agreement-item-ref.ts @@ -0,0 +1,44 @@ +/* tslint:disable */ +/* eslint-disable */ +/* Code generated by ng-openapi-gen DO NOT EDIT. */ + + +/** + * Agreement reference. An agreement represents a contract or arrangement, either written or verbal and sometimes enforceable by law, such as a service level agreement or a customer price agreement. An agreement involves a number of other business entities, such as products, services, and resources and/or their specifications. + */ +export interface AgreementItemRef { + + /** + * When sub-classing, this defines the super-class + */ + '@baseType'?: string; + '@referredType'?: string; + + /** + * A URI to a JSON-Schema file that defines additional attributes and relationships + */ + '@schemaLocation'?: string; + '@type'?: string; + agreementItemId?: string; + + /** + * The actual type of the target instance when needed for disambiguation. + */ + atReferredType?: string; + + /** + * Unique reference of the entity + */ + href?: string; + + /** + * Unique identifier of a related entity. + */ + id: string; + + /** + * Name of the entity + */ + name?: string; + uuid?: string; +} diff --git a/src/app/openApis/productOrderingManagement/models/agreement-ref.ts b/src/app/openApis/productOrderingManagement/models/agreement-ref.ts new file mode 100644 index 0000000000000000000000000000000000000000..137f01875002ffed76189bf52eb1bb96b0fc40ef --- /dev/null +++ b/src/app/openApis/productOrderingManagement/models/agreement-ref.ts @@ -0,0 +1,58 @@ +/* tslint:disable */ +/* eslint-disable */ +/* Code generated by ng-openapi-gen DO NOT EDIT. */ + + +/** + * Agreement reference. An agreement represents a contract or arrangement, either written or verbal and sometimes enforceable by law, such as a service level agreement or a customer price agreement. An agreement involves a number of other business entities, such as products, services, and resources and/or their specifications. + */ +export interface AgreementRef { + + /** + * When sub-classing, this defines the super-class + */ + '@baseType'?: string; + '@referredType'?: string; + + /** + * A URI to a JSON-Schema file that defines additional attributes and relationships + */ + '@schemaLocation'?: string; + '@type'?: string; + + /** + * When sub-classing, this defines the super-class + */ + atBaseType?: string; + + /** + * The actual type of the target instance when needed for disambiguation. + */ + atReferredType?: string; + + /** + * A URI to a JSON-Schema file that defines additional attributes and relationships + */ + atSchemaLocation?: string; + + /** + * When sub-classing, this defines the sub-class entity name + */ + atType?: string; + + /** + * Reference of the related entity. + */ + href?: string; + + /** + * Unique identifier of a related entity. + */ + id: string; + + /** + * Name of the agreement + */ + name?: string; + uuid?: string; +} diff --git a/src/app/openApis/productOrderingManagement/models/appointment-ref.ts b/src/app/openApis/productOrderingManagement/models/appointment-ref.ts new file mode 100644 index 0000000000000000000000000000000000000000..eb19f9897d3c5d09ea289e6ccda949cb9d4ba4c9 --- /dev/null +++ b/src/app/openApis/productOrderingManagement/models/appointment-ref.ts @@ -0,0 +1,58 @@ +/* tslint:disable */ +/* eslint-disable */ +/* Code generated by ng-openapi-gen DO NOT EDIT. */ + + +/** + * Refers an appointment, such as a Customer presentation or internal meeting or site visit + */ +export interface AppointmentRef { + + /** + * When sub-classing, this defines the super-class + */ + '@baseType'?: string; + '@referredType'?: string; + + /** + * A URI to a JSON-Schema file that defines additional attributes and relationships + */ + '@schemaLocation'?: string; + '@type'?: string; + + /** + * When sub-classing, this defines the super-class + */ + atBaseType?: string; + + /** + * The actual type of the target instance when needed for disambiguation + */ + atReferredType?: string; + + /** + * A URI to a JSON-Schema file that defines additional attributes and relationships + */ + atSchemaLocation?: string; + + /** + * When sub-classing, this defines the sub-class entity name + */ + atType?: string; + + /** + * An explanatory text regarding the appointment made with a party + */ + description?: string; + + /** + * The reference of the appointment + */ + href?: string; + + /** + * The identifier of the referred appointment + */ + id: string; + uuid?: string; +} diff --git a/src/app/openApis/productOrderingManagement/models/billing-account-ref.ts b/src/app/openApis/productOrderingManagement/models/billing-account-ref.ts new file mode 100644 index 0000000000000000000000000000000000000000..a39800d7805f0e6bf17a4e8b0c379c3f164903b4 --- /dev/null +++ b/src/app/openApis/productOrderingManagement/models/billing-account-ref.ts @@ -0,0 +1,58 @@ +/* tslint:disable */ +/* eslint-disable */ +/* Code generated by ng-openapi-gen DO NOT EDIT. */ + + +/** + * BillingAccount reference. A BillingAccount is a detailed description of a bill structure. + */ +export interface BillingAccountRef { + + /** + * When sub-classing, this defines the super-class + */ + '@baseType'?: string; + '@referredType'?: string; + + /** + * A URI to a JSON-Schema file that defines additional attributes and relationships + */ + '@schemaLocation'?: string; + '@type'?: string; + + /** + * When sub-classing, this defines the super-class + */ + atBaseType?: string; + + /** + * The actual type of the target instance when needed for disambiguation. + */ + atReferredType?: string; + + /** + * A URI to a JSON-Schema file that defines additional attributes and relationships + */ + atSchemaLocation?: string; + + /** + * When sub-classing, this defines the sub-class entity name + */ + atType?: string; + + /** + * Reference of the billing account + */ + href?: string; + + /** + * Unique identifier of the billing account + */ + id: string; + + /** + * Name of the billing account + */ + name?: string; + uuid?: string; +} diff --git a/src/app/openApis/productOrderingManagement/models/cancel-product-order-create-event-payload.ts b/src/app/openApis/productOrderingManagement/models/cancel-product-order-create-event-payload.ts new file mode 100644 index 0000000000000000000000000000000000000000..9f690fefd7675dab3630bdb56152698cf6e3917b --- /dev/null +++ b/src/app/openApis/productOrderingManagement/models/cancel-product-order-create-event-payload.ts @@ -0,0 +1,12 @@ +/* tslint:disable */ +/* eslint-disable */ +/* Code generated by ng-openapi-gen DO NOT EDIT. */ + +import { CancelProductOrder } from '../models/cancel-product-order'; + +/** + * The event data structure + */ +export interface CancelProductOrderCreateEventPayload { + cancelProductOrder?: CancelProductOrder; +} diff --git a/src/app/openApis/productOrderingManagement/models/cancel-product-order-create-event.ts b/src/app/openApis/productOrderingManagement/models/cancel-product-order-create-event.ts new file mode 100644 index 0000000000000000000000000000000000000000..7148cc04be52b601fc1c8fcb94124e25db3d1a1b --- /dev/null +++ b/src/app/openApis/productOrderingManagement/models/cancel-product-order-create-event.ts @@ -0,0 +1,59 @@ +/* tslint:disable */ +/* eslint-disable */ +/* Code generated by ng-openapi-gen DO NOT EDIT. */ + +import { CancelProductOrderCreateEventPayload } from '../models/cancel-product-order-create-event-payload'; + +/** + * The event data + */ +export interface CancelProductOrderCreateEvent { + + /** + * The correlation id for this event. + */ + correlationId?: string; + + /** + * An explnatory of the event. + */ + description?: string; + + /** + * The domain of the event. + */ + domain?: string; + event?: CancelProductOrderCreateEventPayload; + + /** + * The identifier of the notification. + */ + eventId?: string; + eventTime?: string; + + /** + * The type of the notification. + */ + eventType?: string; + + /** + * Reference of the ProcessFlow + */ + href?: string; + + /** + * Identifier of the Process flow + */ + id?: string; + + /** + * A priority. + */ + priority?: string; + timeOcurred?: string; + + /** + * The title of the event. + */ + title?: string; +} diff --git a/src/app/openApis/productOrderingManagement/models/cancel-product-order-create.ts b/src/app/openApis/productOrderingManagement/models/cancel-product-order-create.ts new file mode 100644 index 0000000000000000000000000000000000000000..a80cfff668e59e99cd71e39a710c1e42cedab9a4 --- /dev/null +++ b/src/app/openApis/productOrderingManagement/models/cancel-product-order-create.ts @@ -0,0 +1,36 @@ +/* tslint:disable */ +/* eslint-disable */ +/* Code generated by ng-openapi-gen DO NOT EDIT. */ + +import { ProductOrderRef } from '../models/product-order-ref'; + +/** + * The CancelProductOrder to be created + */ +export interface CancelProductOrderCreate { + '@baseType'?: string; + '@schemaLocation'?: string; + '@type'?: string; + + /** + * When sub-classing, this defines the super-class + */ + atBaseType?: string; + + /** + * A URI to a JSON-Schema file that defines additional attributes and relationships + */ + atSchemaLocation?: string; + + /** + * When sub-classing, this defines the sub-class entity name + */ + atType?: string; + + /** + * Reason why the order is cancelled. + */ + cancellationReason?: string; + productOrder: ProductOrderRef; + requestedCancellationDate?: string; +} diff --git a/src/app/openApis/productOrderingManagement/models/cancel-product-order-information-required-event-payload.ts b/src/app/openApis/productOrderingManagement/models/cancel-product-order-information-required-event-payload.ts new file mode 100644 index 0000000000000000000000000000000000000000..6914c22c49a9742242f8627232cc640d4d9c275e --- /dev/null +++ b/src/app/openApis/productOrderingManagement/models/cancel-product-order-information-required-event-payload.ts @@ -0,0 +1,12 @@ +/* tslint:disable */ +/* eslint-disable */ +/* Code generated by ng-openapi-gen DO NOT EDIT. */ + +import { CancelProductOrder } from '../models/cancel-product-order'; + +/** + * The event data structure + */ +export interface CancelProductOrderInformationRequiredEventPayload { + cancelProductOrder?: CancelProductOrder; +} diff --git a/src/app/openApis/productOrderingManagement/models/cancel-product-order-information-required-event.ts b/src/app/openApis/productOrderingManagement/models/cancel-product-order-information-required-event.ts new file mode 100644 index 0000000000000000000000000000000000000000..d11ac9e0cd7ca32736c902448630c639f9dcc927 --- /dev/null +++ b/src/app/openApis/productOrderingManagement/models/cancel-product-order-information-required-event.ts @@ -0,0 +1,54 @@ +/* tslint:disable */ +/* eslint-disable */ +/* Code generated by ng-openapi-gen DO NOT EDIT. */ + +import { CancelProductOrderInformationRequiredEventPayload } from '../models/cancel-product-order-information-required-event-payload'; + +/** + * The event data + */ +export interface CancelProductOrderInformationRequiredEvent { + + /** + * The correlation id for this event. + */ + correlationId?: string; + + /** + * An explnatory of the event. + */ + description?: string; + + /** + * The domain of the event. + */ + domain?: string; + event?: CancelProductOrderInformationRequiredEventPayload; + + /** + * The identifier of the notification. + */ + eventId?: string; + eventTime?: string; + + /** + * The type of the notification. + */ + eventType?: string; + + /** + * The path identifying the object field concerned by this notification. + */ + fieldPath?: string; + + /** + * A priority. + */ + priority?: string; + timeOcurred?: string; + + /** + * The title of the event. + */ + title?: string; +} diff --git a/src/app/openApis/productOrderingManagement/models/cancel-product-order-state-change-event-payload.ts b/src/app/openApis/productOrderingManagement/models/cancel-product-order-state-change-event-payload.ts new file mode 100644 index 0000000000000000000000000000000000000000..42ba1dd62c127d90574a669eccc37df5adcab27f --- /dev/null +++ b/src/app/openApis/productOrderingManagement/models/cancel-product-order-state-change-event-payload.ts @@ -0,0 +1,12 @@ +/* tslint:disable */ +/* eslint-disable */ +/* Code generated by ng-openapi-gen DO NOT EDIT. */ + +import { CancelProductOrder } from '../models/cancel-product-order'; + +/** + * The event data structure + */ +export interface CancelProductOrderStateChangeEventPayload { + cancelProductOrder?: CancelProductOrder; +} diff --git a/src/app/openApis/productOrderingManagement/models/cancel-product-order-state-change-event.ts b/src/app/openApis/productOrderingManagement/models/cancel-product-order-state-change-event.ts new file mode 100644 index 0000000000000000000000000000000000000000..08061c6a3267f2dace09b9ef8d368c58de1d617b --- /dev/null +++ b/src/app/openApis/productOrderingManagement/models/cancel-product-order-state-change-event.ts @@ -0,0 +1,59 @@ +/* tslint:disable */ +/* eslint-disable */ +/* Code generated by ng-openapi-gen DO NOT EDIT. */ + +import { CancelProductOrderStateChangeEventPayload } from '../models/cancel-product-order-state-change-event-payload'; + +/** + * The event data + */ +export interface CancelProductOrderStateChangeEvent { + + /** + * The correlation id for this event. + */ + correlationId?: string; + + /** + * An explnatory of the event. + */ + description?: string; + + /** + * The domain of the event. + */ + domain?: string; + event?: CancelProductOrderStateChangeEventPayload; + + /** + * The identifier of the notification. + */ + eventId?: string; + eventTime?: string; + + /** + * The type of the notification. + */ + eventType?: string; + + /** + * Reference of the ProcessFlow + */ + href?: string; + + /** + * Identifier of the Process flow + */ + id?: string; + + /** + * A priority. + */ + priority?: string; + timeOcurred?: string; + + /** + * The title of the event. + */ + title?: string; +} diff --git a/src/app/openApis/productOrderingManagement/models/cancel-product-order.ts b/src/app/openApis/productOrderingManagement/models/cancel-product-order.ts new file mode 100644 index 0000000000000000000000000000000000000000..70b96f49ffadd1eec04fd086c7709b4c5ccbe1b2 --- /dev/null +++ b/src/app/openApis/productOrderingManagement/models/cancel-product-order.ts @@ -0,0 +1,48 @@ +/* tslint:disable */ +/* eslint-disable */ +/* Code generated by ng-openapi-gen DO NOT EDIT. */ + +import { ProductOrderRef } from '../models/product-order-ref'; + +/** + * Request for cancellation an existing product order + */ +export interface CancelProductOrder { + '@baseType'?: string; + '@schemaLocation'?: string; + '@type'?: string; + + /** + * When sub-classing, this defines the super-class + */ + atBaseType?: string; + + /** + * A URI to a JSON-Schema file that defines additional attributes and relationships + */ + atSchemaLocation?: string; + + /** + * When sub-classing, this defines the sub-class entity name + */ + atType?: string; + + /** + * Reason why the order is cancelled. + */ + cancellationReason?: string; + effectiveCancellationDate?: string; + + /** + * Hyperlink to access the cancellation request + */ + href?: string; + + /** + * id of the cancellation request (this is not an order id) + */ + id?: string; + productOrder: ProductOrderRef; + requestedCancellationDate?: string; + state?: 'acknowledged' | 'terminatedWithError' | 'inProgress' | 'done'; +} diff --git a/src/app/openApis/productOrderingManagement/models/characteristic.ts b/src/app/openApis/productOrderingManagement/models/characteristic.ts new file mode 100644 index 0000000000000000000000000000000000000000..e684d19d6750147e3bad8f95c84dff669990df97 --- /dev/null +++ b/src/app/openApis/productOrderingManagement/models/characteristic.ts @@ -0,0 +1,43 @@ +/* tslint:disable */ +/* eslint-disable */ +/* Code generated by ng-openapi-gen DO NOT EDIT. */ + + +/** + * Describes a given characteristic of an object or entity through a name/value pair. + */ +export interface Characteristic { + + /** + * 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; + '@type'?: string; + + /** + * Unique reference of the entity + */ + href?: string; + + /** + * Name of the entity + */ + name?: string; + uuid?: string; + + /** + * The value of the characteristic + */ + value: { +}; + + /** + * Data type of the value of the characteristic + */ + valueType?: string; +} diff --git a/src/app/openApis/productOrderingManagement/models/event-subscription-input.ts b/src/app/openApis/productOrderingManagement/models/event-subscription-input.ts new file mode 100644 index 0000000000000000000000000000000000000000..32966676953efdf7d2ae279557574db8431aadb9 --- /dev/null +++ b/src/app/openApis/productOrderingManagement/models/event-subscription-input.ts @@ -0,0 +1,20 @@ +/* tslint:disable */ +/* eslint-disable */ +/* Code generated by ng-openapi-gen DO NOT EDIT. */ + + +/** + * Data containing the callback endpoint to deliver the information + */ +export interface EventSubscriptionInput { + + /** + * The callback being registered. + */ + callback: string; + + /** + * additional data to be passed + */ + query?: string; +} diff --git a/src/app/openApis/productOrderingManagement/models/event-subscription.ts b/src/app/openApis/productOrderingManagement/models/event-subscription.ts new file mode 100644 index 0000000000000000000000000000000000000000..4053833798459a92be42b9e236c38844ef02649c --- /dev/null +++ b/src/app/openApis/productOrderingManagement/models/event-subscription.ts @@ -0,0 +1,25 @@ +/* tslint:disable */ +/* eslint-disable */ +/* Code generated by ng-openapi-gen DO NOT EDIT. */ + + +/** + * Sets the communication endpoint address the service instance must use to deliver notification information + */ +export interface EventSubscription { + + /** + * The callback being registered. + */ + callback: string; + + /** + * Id of the listener + */ + id: string; + + /** + * additional data to be passed + */ + query?: string; +} diff --git a/src/app/openApis/productOrderingManagement/models/money.ts b/src/app/openApis/productOrderingManagement/models/money.ts new file mode 100644 index 0000000000000000000000000000000000000000..743815e2558203c4c395c277b6c8c12d265ff7c6 --- /dev/null +++ b/src/app/openApis/productOrderingManagement/models/money.ts @@ -0,0 +1,37 @@ +/* tslint:disable */ +/* eslint-disable */ +/* Code generated by ng-openapi-gen DO NOT EDIT. */ + + +/** + * A base / value business entity used to represent money + */ +export interface Money { + + /** + * 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; + '@type'?: string; + + /** + * Unique reference of the entity + */ + href?: string; + + /** + * Currency (ISO4217 norm uses 3 letters to define the currency) + */ + unit: string; + uuid?: string; + + /** + * A positive floating point number + */ + value: number; +} diff --git a/src/app/openApis/productOrderingManagement/models/note.ts b/src/app/openApis/productOrderingManagement/models/note.ts new file mode 100644 index 0000000000000000000000000000000000000000..e5ac8cbd44bb82bdd0e007f9eeff8e74bb543e58 --- /dev/null +++ b/src/app/openApis/productOrderingManagement/models/note.ts @@ -0,0 +1,47 @@ +/* tslint:disable */ +/* eslint-disable */ +/* Code generated by ng-openapi-gen DO NOT EDIT. */ + + +/** + * Extra information about a given entity + */ +export interface Note { + + /** + * 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; + '@type'?: string; + + /** + * Author of the note + */ + author?: string; + + /** + * Date of the note + */ + date?: string; + + /** + * Unique reference of the entity + */ + href?: string; + + /** + * Describes the system from which the action related to this note was done + */ + system?: string; + + /** + * Text of the note + */ + text?: string; + uuid?: string; +} diff --git a/src/app/openApis/productOrderingManagement/models/order-item-relationship.ts b/src/app/openApis/productOrderingManagement/models/order-item-relationship.ts new file mode 100644 index 0000000000000000000000000000000000000000..3d53e9ad7617f188ca05570b1fc8d7dba9068ad9 --- /dev/null +++ b/src/app/openApis/productOrderingManagement/models/order-item-relationship.ts @@ -0,0 +1,44 @@ +/* tslint:disable */ +/* eslint-disable */ +/* Code generated by ng-openapi-gen DO NOT EDIT. */ + +export interface OrderItemRelationship { + + /** + * 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; + '@type'?: string; + + /** + * When sub-classing, this defines the super-class + */ + atBaseType?: string; + + /** + * A URI to a JSON-Schema file that defines additional attributes and relationships + */ + atSchemaLocation?: string; + + /** + * When sub-classing, this defines the sub-class entity name + */ + atType?: string; + + /** + * Unique reference of the entity + */ + href?: string; + id?: string; + + /** + * The type of order item relationship + */ + relationshipType?: string; + uuid?: string; +} diff --git a/src/app/openApis/productOrderingManagement/models/order-price.ts b/src/app/openApis/productOrderingManagement/models/order-price.ts new file mode 100644 index 0000000000000000000000000000000000000000..f3d8cf2d818ca9db59cfd7456a46c3229a2ced54 --- /dev/null +++ b/src/app/openApis/productOrderingManagement/models/order-price.ts @@ -0,0 +1,79 @@ +/* tslint:disable */ +/* eslint-disable */ +/* Code generated by ng-openapi-gen DO NOT EDIT. */ + +import { BillingAccountRef } from '../models/billing-account-ref'; +import { Price } from '../models/price'; +import { PriceAlteration } from '../models/price-alteration'; +import { ProductOfferingPriceRef } from '../models/product-offering-price-ref'; + +/** + * An amount, usually of money, that represents the actual price paid by the Customer for this item or this order + */ +export interface OrderPrice { + + /** + * 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; + '@type'?: string; + + /** + * When sub-classing, this defines the super-class + */ + atBaseType?: string; + + /** + * A URI to a JSON-Schema file that defines additional attributes and relationships + */ + atSchemaLocation?: string; + + /** + * When sub-classing, this defines the sub-class entity name + */ + atType?: string; + billingAccount?: BillingAccountRef; + + /** + * A narrative that explains in detail the semantics of this order item price. + */ + description?: string; + + /** + * Unique reference of the entity + */ + href?: string; + + /** + * A short descriptive name such as "Subscription price". + */ + name?: string; + price?: Price; + + /** + * a strucuture used to describe a price alteration + */ + priceAlteration?: Array; + + /** + * A category that describes the price, such as recurring, discount, allowance, penalty, and so forth + */ + priceType?: string; + productOfferingPrice?: ProductOfferingPriceRef; + + /** + * Could be month, week... + */ + recurringChargePeriod?: string; + + /** + * Could be minutes, GB... + */ + unitOfMeasure?: string; + uuid?: string; +} diff --git a/src/app/openApis/productOrderingManagement/models/order-term.ts b/src/app/openApis/productOrderingManagement/models/order-term.ts new file mode 100644 index 0000000000000000000000000000000000000000..1573bfda54270874322f4d3dc0edaea3877c380f --- /dev/null +++ b/src/app/openApis/productOrderingManagement/models/order-term.ts @@ -0,0 +1,54 @@ +/* tslint:disable */ +/* eslint-disable */ +/* Code generated by ng-openapi-gen DO NOT EDIT. */ + +import { Quantity } from '../models/quantity'; + +/** + * Description of a productTerm linked to this orderItem. This represent a commitment with a duration + */ +export interface OrderTerm { + + /** + * 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; + '@type'?: string; + + /** + * When sub-classing, this defines the super-class + */ + atBaseType?: string; + + /** + * A URI to a JSON-Schema file that defines additional attributes and relationships + */ + atSchemaLocation?: string; + + /** + * When sub-classing, this defines the sub-class entity name + */ + atType?: string; + + /** + * Description of the productOrderTerm + */ + description?: string; + duration?: Quantity; + + /** + * Unique reference of the entity + */ + href?: string; + + /** + * Name of the productOrderTerm + */ + name?: string; + uuid?: string; +} diff --git a/src/app/openApis/productOrderingManagement/models/payment-ref.ts b/src/app/openApis/productOrderingManagement/models/payment-ref.ts new file mode 100644 index 0000000000000000000000000000000000000000..efeba6990516f891337fea1f0939ad374279e8ae --- /dev/null +++ b/src/app/openApis/productOrderingManagement/models/payment-ref.ts @@ -0,0 +1,58 @@ +/* tslint:disable */ +/* eslint-disable */ +/* Code generated by ng-openapi-gen DO NOT EDIT. */ + + +/** + * If an immediate payment has been done at the product order submission, the payment information are captured and stored (as a reference) in the order. + */ +export interface PaymentRef { + + /** + * When sub-classing, this defines the super-class + */ + '@baseType'?: string; + '@referredType'?: string; + + /** + * A URI to a JSON-Schema file that defines additional attributes and relationships + */ + '@schemaLocation'?: string; + '@type'?: string; + + /** + * When sub-classing, this defines the super-class + */ + atBaseType?: string; + + /** + * The actual type of the target instance when needed for disambiguation. + */ + atReferredType?: string; + + /** + * A URI to a JSON-Schema file that defines additional attributes and relationships + */ + atSchemaLocation?: string; + + /** + * When sub-classing, this defines the sub-class entity name + */ + atType?: string; + + /** + * Reference of the related entity. + */ + href?: string; + + /** + * Unique identifier of a related entity. + */ + id: string; + + /** + * A name for the payment + */ + name?: string; + uuid?: string; +} diff --git a/src/app/openApis/productOrderingManagement/models/price-alteration.ts b/src/app/openApis/productOrderingManagement/models/price-alteration.ts new file mode 100644 index 0000000000000000000000000000000000000000..def79b66ef2c09b5f5c4f952d1a0e02291f92921 --- /dev/null +++ b/src/app/openApis/productOrderingManagement/models/price-alteration.ts @@ -0,0 +1,66 @@ +/* tslint:disable */ +/* eslint-disable */ +/* Code generated by ng-openapi-gen DO NOT EDIT. */ + +import { Price } from '../models/price'; +import { ProductOfferingPriceRef } from '../models/product-offering-price-ref'; + +/** + * Is an amount, usually of money, that modifies the price charged for an order item. + */ +export interface PriceAlteration { + + /** + * 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; + '@type'?: string; + + /** + * Duration during which the alteration applies on the order item price (for instance 2 months free of charge for the recurring charge) + */ + applicationDuration: number; + + /** + * A narrative that explains in detail the semantics of this order item price alteration + */ + description: string; + + /** + * Unique reference of the entity + */ + href?: string; + + /** + * Name of the order item price alteration + */ + name: string; + price: Price; + + /** + * A category that describes the price such as recurring, one time and usage. + */ + priceType: string; + + /** + * Priority level for applying this alteration among all the defined alterations on the order item price + */ + priority: number; + productOfferingPrice: ProductOfferingPriceRef; + + /** + * Could be month, week... + */ + recurringChargePeriod: string; + + /** + * Could be minutes, GB... + */ + unitOfMeasure: string; + uuid?: string; +} diff --git a/src/app/openApis/productOrderingManagement/models/price.ts b/src/app/openApis/productOrderingManagement/models/price.ts new file mode 100644 index 0000000000000000000000000000000000000000..bc1ed1b9b16265843b2ab9ffbe3e5f251dbec7a4 --- /dev/null +++ b/src/app/openApis/productOrderingManagement/models/price.ts @@ -0,0 +1,55 @@ +/* tslint:disable */ +/* eslint-disable */ +/* Code generated by ng-openapi-gen DO NOT EDIT. */ + +import { Money } from '../models/money'; + +/** + * Provides all amounts (tax included, duty free, tax rate), used currency and percentage to apply for Price Alteration. + */ +export interface Price { + + /** + * 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; + '@type'?: string; + + /** + * When sub-classing, this defines the super-class + */ + atBaseType: string; + + /** + * A URI to a JSON-Schema file that defines additional attributes and relationships + */ + atSchemaLocation: string; + + /** + * When sub-classing, this defines the sub-class entity name + */ + atType: string; + dutyFreeAmount: Money; + + /** + * Unique reference of the entity + */ + href?: string; + + /** + * Percentage to apply for ProdOfferPriceAlteration + */ + percentage: number; + taxIncludedAmount: Money; + + /** + * Tax rate + */ + taxRate: number; + uuid?: string; +} diff --git a/src/app/openApis/productOrderingManagement/models/product-offering-price-ref.ts b/src/app/openApis/productOrderingManagement/models/product-offering-price-ref.ts new file mode 100644 index 0000000000000000000000000000000000000000..d9553fda6fac5b4419c4006e4bfc117d7390169c --- /dev/null +++ b/src/app/openApis/productOrderingManagement/models/product-offering-price-ref.ts @@ -0,0 +1,65 @@ +/* tslint:disable */ +/* eslint-disable */ +/* Code generated by ng-openapi-gen DO NOT EDIT. */ + +import { TimePeriod } from '../models/time-period'; + +/** + * ProductPriceOffering reference. An amount, usually of money, that is asked for or allowed when a ProductOffering is bought, rented, or leased + */ +export interface ProductOfferingPriceRef { + + /** + * When sub-classing, this defines the super-class + */ + '@baseType'?: string; + + /** + * The actual type of the target instance when needed for disambiguation. + */ + '@referredType'?: string; + + /** + * A URI to a JSON-Schema file that defines additional attributes and relationships + */ + '@schemaLocation'?: string; + '@type'?: string; + + /** + * Description of this catalog + */ + description?: string; + + /** + * Unique reference of the entity + */ + href?: string; + + /** + * Unique identifier of a related entity. + */ + id: string; + + /** + * Date and time of the last update + */ + lastUpdate?: string; + + /** + * Used to indicate the current lifecycle status + */ + lifecycleStatus?: string; + lifecycleStatusEnum?: 'In study' | 'In design' | 'In test' | 'Active' | 'Launched' | 'Retired' | 'Obsolete' | 'Rejected'; + + /** + * Name of the entity + */ + name?: string; + uuid?: string; + validFor?: TimePeriod; + + /** + * Entity version + */ + version?: string; +} diff --git a/src/app/openApis/productOrderingManagement/models/product-offering-qualification-item-ref.ts b/src/app/openApis/productOrderingManagement/models/product-offering-qualification-item-ref.ts new file mode 100644 index 0000000000000000000000000000000000000000..b2dd4f7c37ffb11a3fe2cc41e2c99002f916b98f --- /dev/null +++ b/src/app/openApis/productOrderingManagement/models/product-offering-qualification-item-ref.ts @@ -0,0 +1,73 @@ +/* tslint:disable */ +/* eslint-disable */ +/* Code generated by ng-openapi-gen DO NOT EDIT. */ + + +/** + * It's a productOfferingQualification item that has been executed previously. + */ +export interface ProductOfferingQualificationItemRef { + + /** + * When sub-classing, this defines the super-class + */ + '@baseType'?: string; + '@referredType'?: string; + + /** + * A URI to a JSON-Schema file that defines additional attributes and relationships + */ + '@schemaLocation'?: string; + '@type'?: string; + + /** + * When sub-classing, this defines the super-class + */ + atBaseType?: string; + + /** + * The actual type of the target instance when needed for disambiguation. + */ + atReferredType?: string; + + /** + * A URI to a JSON-Schema file that defines additional attributes and relationships + */ + atSchemaLocation?: string; + + /** + * When sub-classing, this defines the sub-class entity name + */ + atType?: string; + + /** + * Reference of the related entity. + */ + href?: string; + + /** + * Id of an item of a product offering qualification + */ + id: string; + + /** + * Name of the related entity. + */ + name?: string; + + /** + * Reference of the related entity. + */ + productOfferingQualificationHref?: string; + + /** + * Unique identifier of a related entity. + */ + productOfferingQualificationId: string; + + /** + * Name of the related entity. + */ + productOfferingQualificationName?: string; + uuid?: string; +} diff --git a/src/app/openApis/productOrderingManagement/models/product-offering-qualification-ref.ts b/src/app/openApis/productOrderingManagement/models/product-offering-qualification-ref.ts new file mode 100644 index 0000000000000000000000000000000000000000..171f413714bb8cbdf11287260d16c93ba308ce55 --- /dev/null +++ b/src/app/openApis/productOrderingManagement/models/product-offering-qualification-ref.ts @@ -0,0 +1,58 @@ +/* tslint:disable */ +/* eslint-disable */ +/* Code generated by ng-openapi-gen DO NOT EDIT. */ + + +/** + * It's a productOfferingQualification that has been executed previously + */ +export interface ProductOfferingQualificationRef { + + /** + * When sub-classing, this defines the super-class + */ + '@baseType'?: string; + '@referredType'?: string; + + /** + * A URI to a JSON-Schema file that defines additional attributes and relationships + */ + '@schemaLocation'?: string; + '@type'?: string; + + /** + * When sub-classing, this defines the super-class + */ + atBaseType?: string; + + /** + * The actual type of the target instance when needed for disambiguation. + */ + atReferredType?: string; + + /** + * A URI to a JSON-Schema file that defines additional attributes and relationships + */ + atSchemaLocation?: string; + + /** + * When sub-classing, this defines the sub-class entity name + */ + atType?: string; + + /** + * Reference of the related entity. + */ + href?: string; + + /** + * Unique identifier of a related entity. + */ + id: string; + + /** + * Name of the related entity. + */ + name?: string; + uuid?: string; +} diff --git a/src/app/openApis/productOrderingManagement/models/product-offering-ref.ts b/src/app/openApis/productOrderingManagement/models/product-offering-ref.ts new file mode 100644 index 0000000000000000000000000000000000000000..db15164cfed00732eec3382bee847081c0b59817 --- /dev/null +++ b/src/app/openApis/productOrderingManagement/models/product-offering-ref.ts @@ -0,0 +1,41 @@ +/* tslint:disable */ +/* eslint-disable */ +/* Code generated by ng-openapi-gen DO NOT EDIT. */ + + +/** + * ProductOffering reference. A product offering represents entities that are orderable from the provider of the catalog, this resource includes pricing information. + */ +export interface ProductOfferingRef { + + /** + * When sub-classing, this defines the super-class + */ + '@baseType'?: string; + + /** + * The actual type of the target instance when needed for disambiguation. + */ + '@referredType'?: string; + + /** + * A URI to a JSON-Schema file that defines additional attributes and relationships + */ + '@schemaLocation'?: string; + '@type'?: string; + + /** + * Unique reference of the entity + */ + href?: string; + + /** + * Unique identifier of a related entity. + */ + id: string; + + /** + * Name of the entity + */ + name?: string; +} diff --git a/src/app/openApis/productOrderingManagement/models/product-order-attribute-value-change-event-payload.ts b/src/app/openApis/productOrderingManagement/models/product-order-attribute-value-change-event-payload.ts new file mode 100644 index 0000000000000000000000000000000000000000..556a81dabf3aa5138449cd8618bb250596a8d459 --- /dev/null +++ b/src/app/openApis/productOrderingManagement/models/product-order-attribute-value-change-event-payload.ts @@ -0,0 +1,12 @@ +/* tslint:disable */ +/* eslint-disable */ +/* Code generated by ng-openapi-gen DO NOT EDIT. */ + +import { ProductOrder } from '../models/product-order'; + +/** + * The event data structure + */ +export interface ProductOrderAttributeValueChangeEventPayload { + productOrder?: ProductOrder; +} diff --git a/src/app/openApis/productOrderingManagement/models/product-order-attribute-value-change-event.ts b/src/app/openApis/productOrderingManagement/models/product-order-attribute-value-change-event.ts new file mode 100644 index 0000000000000000000000000000000000000000..43bf7b9bb2ebc5ee2ef778c74f324b0297d3f00d --- /dev/null +++ b/src/app/openApis/productOrderingManagement/models/product-order-attribute-value-change-event.ts @@ -0,0 +1,54 @@ +/* tslint:disable */ +/* eslint-disable */ +/* Code generated by ng-openapi-gen DO NOT EDIT. */ + +import { ProductOrderAttributeValueChangeEventPayload } from '../models/product-order-attribute-value-change-event-payload'; + +/** + * The event data + */ +export interface ProductOrderAttributeValueChangeEvent { + + /** + * The correlation id for this event. + */ + correlationId?: string; + + /** + * An explnatory of the event. + */ + description?: string; + + /** + * The domain of the event. + */ + domain?: string; + event?: ProductOrderAttributeValueChangeEventPayload; + + /** + * The identifier of the notification. + */ + eventId?: string; + eventTime?: string; + + /** + * The type of the notification. + */ + eventType?: string; + + /** + * The path identifying the object field concerned by this notification. + */ + fieldPath?: string; + + /** + * A priority. + */ + priority?: string; + timeOcurred?: string; + + /** + * The title of the event. + */ + title?: string; +} diff --git a/src/app/openApis/productOrderingManagement/models/product-order-create-event-payload.ts b/src/app/openApis/productOrderingManagement/models/product-order-create-event-payload.ts new file mode 100644 index 0000000000000000000000000000000000000000..4a4b30fc5f8554c380a87049d8409bd3b8245ec1 --- /dev/null +++ b/src/app/openApis/productOrderingManagement/models/product-order-create-event-payload.ts @@ -0,0 +1,12 @@ +/* tslint:disable */ +/* eslint-disable */ +/* Code generated by ng-openapi-gen DO NOT EDIT. */ + +import { ProductOrder } from '../models/product-order'; + +/** + * The event data structure + */ +export interface ProductOrderCreateEventPayload { + productOrder?: ProductOrder; +} diff --git a/src/app/openApis/productOrderingManagement/models/product-order-create-event.ts b/src/app/openApis/productOrderingManagement/models/product-order-create-event.ts new file mode 100644 index 0000000000000000000000000000000000000000..aeece8de253155ab9bc3007c122c9b4ef7d32cb3 --- /dev/null +++ b/src/app/openApis/productOrderingManagement/models/product-order-create-event.ts @@ -0,0 +1,59 @@ +/* tslint:disable */ +/* eslint-disable */ +/* Code generated by ng-openapi-gen DO NOT EDIT. */ + +import { ProductOrderCreateEventPayload } from '../models/product-order-create-event-payload'; + +/** + * The event data + */ +export interface ProductOrderCreateEvent { + + /** + * The correlation id for this event. + */ + correlationId?: string; + + /** + * An explnatory of the event. + */ + description?: string; + + /** + * The domain of the event. + */ + domain?: string; + event?: ProductOrderCreateEventPayload; + + /** + * The identifier of the notification. + */ + eventId?: string; + eventTime?: string; + + /** + * The type of the notification. + */ + eventType?: string; + + /** + * Reference of the ProcessFlow + */ + href?: string; + + /** + * Identifier of the Process flow + */ + id?: string; + + /** + * A priority. + */ + priority?: string; + timeOcurred?: string; + + /** + * The title of the event. + */ + title?: string; +} diff --git a/src/app/openApis/productOrderingManagement/models/product-order-create.ts b/src/app/openApis/productOrderingManagement/models/product-order-create.ts new file mode 100644 index 0000000000000000000000000000000000000000..01ee3e06e4ff26b96e753f4ac54ba4994eb96832 --- /dev/null +++ b/src/app/openApis/productOrderingManagement/models/product-order-create.ts @@ -0,0 +1,94 @@ +/* tslint:disable */ +/* eslint-disable */ +/* Code generated by ng-openapi-gen DO NOT EDIT. */ + +import { AgreementRef } from '../models/agreement-ref'; +import { BillingAccountRef } from '../models/billing-account-ref'; +import { Note } from '../models/note'; +import { OrderPrice } from '../models/order-price'; +import { PaymentRef } from '../models/payment-ref'; +import { ProductOfferingQualificationRef } from '../models/product-offering-qualification-ref'; +import { ProductOrderItem } from '../models/product-order-item'; +import { QuoteRef } from '../models/quote-ref'; +import { RelatedChannel } from '../models/related-channel'; +import { RelatedParty } from '../models/related-party'; + +/** + * The ProductOrder to be created + */ +export interface ProductOrderCreate { + '@baseType'?: string; + '@schemaLocation'?: string; + '@type'?: string; + + /** + * A reference to an agreement defined in the context of the product order + */ + agreement?: Array; + + /** + * When sub-classing, this defines the super-class + */ + atBaseType?: string; + + /** + * A URI to a JSON-Schema file that defines additional attributes and relationships + */ + atSchemaLocation?: string; + + /** + * When sub-classing, this defines the sub-class entity name + */ + atType?: string; + billingAccount?: BillingAccountRef; + cancellationDate?: string; + + /** + * Reason why the order is cancelled. This is used when order is cancelled. + */ + cancellationReason?: string; + + /** + * Used to categorize the order from a business perspective that can be useful for the OM system (e.g. "enterprise", "residential", ...) + */ + category?: string; + channel?: Array; + + /** + * Description of the product order + */ + description?: string; + + /** + * ID given by the consumer and only understandable by him (to facilitate his searches afterwards) + */ + externalId?: string; + note?: Array; + + /** + * Contact attached to the order to send back information regarding this order + */ + notificationContact?: string; + orderTotalPrice?: Array; + payment?: Array; + + /** + * A way that can be used by consumers to prioritize orders in OM system (from 0 to 4 : 0 is the highest priority, and 4 the lowest) + */ + priority?: string; + productOfferingQualification?: Array; + productOrderItem: Array; + quote?: Array; + relatedParty?: Array; + + /** + * Requested delivery date from the requestor perspective + */ + requestedCompletionDate?: string; + + /** + * Order fulfillment start date wished by the requestor. This is used when, for any reason, requestor cannot allow seller to begin to operationally begin the fulfillment before a date. + */ + requestedStartDate?: string; + state?: 'INITIAL' | 'ACKNOWLEDGED' | 'REJECTED' | 'PENDING' | 'HELD' | 'INPROGRESS' | 'CANCELLED' | 'COMPLETED' | 'FAILED' | 'PARTIAL' | 'ASSESSINGCANCELLATION' | 'PENDINGCANCELLATION'; +} diff --git a/src/app/openApis/productOrderingManagement/models/product-order-delete-event-payload.ts b/src/app/openApis/productOrderingManagement/models/product-order-delete-event-payload.ts new file mode 100644 index 0000000000000000000000000000000000000000..723175ea4616bd97f18fc9f2a881062562d330b5 --- /dev/null +++ b/src/app/openApis/productOrderingManagement/models/product-order-delete-event-payload.ts @@ -0,0 +1,12 @@ +/* tslint:disable */ +/* eslint-disable */ +/* Code generated by ng-openapi-gen DO NOT EDIT. */ + +import { ProductOrder } from '../models/product-order'; + +/** + * The event data structure + */ +export interface ProductOrderDeleteEventPayload { + productOrder?: ProductOrder; +} diff --git a/src/app/openApis/productOrderingManagement/models/product-order-delete-event.ts b/src/app/openApis/productOrderingManagement/models/product-order-delete-event.ts new file mode 100644 index 0000000000000000000000000000000000000000..59971c847f6d679ebf85c4ecaace6f335a2747f1 --- /dev/null +++ b/src/app/openApis/productOrderingManagement/models/product-order-delete-event.ts @@ -0,0 +1,59 @@ +/* tslint:disable */ +/* eslint-disable */ +/* Code generated by ng-openapi-gen DO NOT EDIT. */ + +import { ProductOrderDeleteEventPayload } from '../models/product-order-delete-event-payload'; + +/** + * The event data + */ +export interface ProductOrderDeleteEvent { + + /** + * The correlation id for this event. + */ + correlationId?: string; + + /** + * An explnatory of the event. + */ + description?: string; + + /** + * The domain of the event. + */ + domain?: string; + event?: ProductOrderDeleteEventPayload; + + /** + * The identifier of the notification. + */ + eventId?: string; + eventTime?: string; + + /** + * The type of the notification. + */ + eventType?: string; + + /** + * Reference of the ProcessFlow + */ + href?: string; + + /** + * Identifier of the Process flow + */ + id?: string; + + /** + * A priority. + */ + priority?: string; + timeOcurred?: string; + + /** + * The title of the event. + */ + title?: string; +} diff --git a/src/app/openApis/productOrderingManagement/models/product-order-information-required-event-payload.ts b/src/app/openApis/productOrderingManagement/models/product-order-information-required-event-payload.ts new file mode 100644 index 0000000000000000000000000000000000000000..8968bb36dacec70ba67fabc4465991e1dd5c75c4 --- /dev/null +++ b/src/app/openApis/productOrderingManagement/models/product-order-information-required-event-payload.ts @@ -0,0 +1,12 @@ +/* tslint:disable */ +/* eslint-disable */ +/* Code generated by ng-openapi-gen DO NOT EDIT. */ + +import { ProductOrder } from '../models/product-order'; + +/** + * The event data structure + */ +export interface ProductOrderInformationRequiredEventPayload { + productOrder?: ProductOrder; +} diff --git a/src/app/openApis/productOrderingManagement/models/product-order-information-required-event.ts b/src/app/openApis/productOrderingManagement/models/product-order-information-required-event.ts new file mode 100644 index 0000000000000000000000000000000000000000..63baf5a38d9a64d820d7737ff78e082ad19ea3c0 --- /dev/null +++ b/src/app/openApis/productOrderingManagement/models/product-order-information-required-event.ts @@ -0,0 +1,54 @@ +/* tslint:disable */ +/* eslint-disable */ +/* Code generated by ng-openapi-gen DO NOT EDIT. */ + +import { ProductOrderInformationRequiredEventPayload } from '../models/product-order-information-required-event-payload'; + +/** + * The event data + */ +export interface ProductOrderInformationRequiredEvent { + + /** + * The correlation id for this event. + */ + correlationId?: string; + + /** + * An explnatory of the event. + */ + description?: string; + + /** + * The domain of the event. + */ + domain?: string; + event?: ProductOrderInformationRequiredEventPayload; + + /** + * The identifier of the notification. + */ + eventId?: string; + eventTime?: string; + + /** + * The type of the notification. + */ + eventType?: string; + + /** + * The path identifying the object field concerned by this notification. + */ + fieldPath?: string; + + /** + * A priority. + */ + priority?: string; + timeOcurred?: string; + + /** + * The title of the event. + */ + title?: string; +} diff --git a/src/app/openApis/productOrderingManagement/models/product-order-item.ts b/src/app/openApis/productOrderingManagement/models/product-order-item.ts new file mode 100644 index 0000000000000000000000000000000000000000..81768fd63575524e63882fb3465b4deb7b732f96 --- /dev/null +++ b/src/app/openApis/productOrderingManagement/models/product-order-item.ts @@ -0,0 +1,78 @@ +/* tslint:disable */ +/* eslint-disable */ +/* Code generated by ng-openapi-gen DO NOT EDIT. */ + +import { AppointmentRef } from '../models/appointment-ref'; +import { BillingAccountRef } from '../models/billing-account-ref'; +import { OrderItemRelationship } from '../models/order-item-relationship'; +import { OrderPrice } from '../models/order-price'; +import { OrderTerm } from '../models/order-term'; +import { PaymentRef } from '../models/payment-ref'; +import { ProductOfferingQualificationItemRef } from '../models/product-offering-qualification-item-ref'; +import { ProductOfferingQualificationRef } from '../models/product-offering-qualification-ref'; +import { ProductOfferingRef } from '../models/product-offering-ref'; +import { ProductRefOrValue } from '../models/product-ref-or-value'; +import { QuoteItemRef } from '../models/quote-item-ref'; + +/** + * An identified part of the order. A product order is decomposed into one or more order items. + */ +export interface ProductOrderItem { + + /** + * 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; + '@type'?: string; + action: 'ADD' | 'MODIFY' | 'DELETE' | 'NOCHANGE'; + appointment?: AppointmentRef; + + /** + * When sub-classing, this defines the super-class + */ + atBaseType?: string; + + /** + * A URI to a JSON-Schema file that defines additional attributes and relationships + */ + atSchemaLocation?: string; + + /** + * When sub-classing, this defines the sub-class entity name + */ + atType?: string; + billingAccount?: BillingAccountRef; + + /** + * Unique reference of the entity + */ + href?: string; + + /** + * Identifier of the line item (generally it is a sequence number 01, 02, 03, ...) + */ + id: string; + itemPrice?: Array; + itemTerm?: Array; + itemTotalPrice?: Array; + payment?: Array; + product?: ProductRefOrValue; + productOffering?: ProductOfferingRef; + productOfferingQualificationItem?: ProductOfferingQualificationItemRef; + productOrderItem?: Array; + productOrderItemRelationship?: Array; + qualification?: Array; + + /** + * Quantity ordered + */ + quantity?: number; + quoteItem?: QuoteItemRef; + state?: 'INITIAL' | 'ACKNOWLEDGED' | 'REJECTED' | 'PENDING' | 'HELD' | 'INPROGRESS' | 'CANCELLED' | 'COMPLETED' | 'FAILED' | 'ASSESSINGCANCELLATION' | 'PENDINGCANCELLATION'; + uuid?: string; +} diff --git a/src/app/openApis/productOrderingManagement/models/product-order-ref.ts b/src/app/openApis/productOrderingManagement/models/product-order-ref.ts new file mode 100644 index 0000000000000000000000000000000000000000..a943589c58e0eb24dcfcf13475c5abad29f8d137 --- /dev/null +++ b/src/app/openApis/productOrderingManagement/models/product-order-ref.ts @@ -0,0 +1,49 @@ +/* tslint:disable */ +/* eslint-disable */ +/* Code generated by ng-openapi-gen DO NOT EDIT. */ + + +/** + * ProductOrder (ProductOrder) .The product order which the recommendation is related with. + */ +export interface ProductOrderRef { + '@baseType'?: string; + '@referredType'?: string; + '@schemaLocation'?: string; + '@type'?: string; + + /** + * When sub-classing, this defines the super-class + */ + atBaseType?: string; + + /** + * The actual type of the target instance when needed for disambiguation. + */ + atReferredType?: string; + + /** + * A URI to a JSON-Schema file that defines additional attributes and relationships + */ + atSchemaLocation?: string; + + /** + * When sub-classing, this defines the sub-class entity name + */ + atType?: string; + + /** + * Reference of the related entity. + */ + href?: string; + + /** + * Unique identifier of a related entity. + */ + id: string; + + /** + * Name of the related entity. + */ + name?: string; +} diff --git a/src/app/openApis/productOrderingManagement/models/product-order-state-change-event-payload.ts b/src/app/openApis/productOrderingManagement/models/product-order-state-change-event-payload.ts new file mode 100644 index 0000000000000000000000000000000000000000..52f209c4bd37c5bc6d93b680f2ce33bbf3c2ff05 --- /dev/null +++ b/src/app/openApis/productOrderingManagement/models/product-order-state-change-event-payload.ts @@ -0,0 +1,12 @@ +/* tslint:disable */ +/* eslint-disable */ +/* Code generated by ng-openapi-gen DO NOT EDIT. */ + +import { ProductOrder } from '../models/product-order'; + +/** + * The event data structure + */ +export interface ProductOrderStateChangeEventPayload { + productOrder?: ProductOrder; +} diff --git a/src/app/openApis/productOrderingManagement/models/product-order-state-change-event.ts b/src/app/openApis/productOrderingManagement/models/product-order-state-change-event.ts new file mode 100644 index 0000000000000000000000000000000000000000..4184e17a978171e0cd544f0e87e62f464bf29efd --- /dev/null +++ b/src/app/openApis/productOrderingManagement/models/product-order-state-change-event.ts @@ -0,0 +1,59 @@ +/* tslint:disable */ +/* eslint-disable */ +/* Code generated by ng-openapi-gen DO NOT EDIT. */ + +import { ProductOrderStateChangeEventPayload } from '../models/product-order-state-change-event-payload'; + +/** + * The event data + */ +export interface ProductOrderStateChangeEvent { + + /** + * The correlation id for this event. + */ + correlationId?: string; + + /** + * An explnatory of the event. + */ + description?: string; + + /** + * The domain of the event. + */ + domain?: string; + event?: ProductOrderStateChangeEventPayload; + + /** + * The identifier of the notification. + */ + eventId?: string; + eventTime?: string; + + /** + * The type of the notification. + */ + eventType?: string; + + /** + * Reference of the ProcessFlow + */ + href?: string; + + /** + * Identifier of the Process flow + */ + id?: string; + + /** + * A priority. + */ + priority?: string; + timeOcurred?: string; + + /** + * The title of the event. + */ + title?: string; +} diff --git a/src/app/openApis/productOrderingManagement/models/product-order-update.ts b/src/app/openApis/productOrderingManagement/models/product-order-update.ts new file mode 100644 index 0000000000000000000000000000000000000000..9517b707d0e114d233406e1418111622b47747ad --- /dev/null +++ b/src/app/openApis/productOrderingManagement/models/product-order-update.ts @@ -0,0 +1,104 @@ +/* tslint:disable */ +/* eslint-disable */ +/* Code generated by ng-openapi-gen DO NOT EDIT. */ + +import { AgreementRef } from '../models/agreement-ref'; +import { BillingAccountRef } from '../models/billing-account-ref'; +import { Note } from '../models/note'; +import { OrderPrice } from '../models/order-price'; +import { PaymentRef } from '../models/payment-ref'; +import { ProductOfferingQualificationRef } from '../models/product-offering-qualification-ref'; +import { ProductOrderItem } from '../models/product-order-item'; +import { QuoteRef } from '../models/quote-ref'; +import { RelatedChannel } from '../models/related-channel'; +import { RelatedParty } from '../models/related-party'; + +/** + * The ProductOrder to be updated + */ +export interface ProductOrderUpdate { + '@baseType'?: string; + '@schemaLocation'?: string; + '@type'?: string; + + /** + * A reference to an agreement defined in the context of the product order + */ + agreement?: Array; + + /** + * When sub-classing, this defines the super-class + */ + atBaseType?: string; + + /** + * A URI to a JSON-Schema file that defines additional attributes and relationships + */ + atSchemaLocation?: string; + + /** + * When sub-classing, this defines the sub-class entity name + */ + atType?: string; + billingAccount?: BillingAccountRef; + cancellationDate?: string; + + /** + * Reason why the order is cancelled. This is used when order is cancelled. + */ + cancellationReason?: string; + + /** + * Used to categorize the order from a business perspective that can be useful for the OM system (e.g. "enterprise", "residential", ...) + */ + category?: string; + channel?: Array; + + /** + * Date when the order was completed + */ + completionDate?: string; + + /** + * Description of the product order + */ + description?: string; + + /** + * Expected delivery date amended by the provider + */ + expectedCompletionDate?: string; + + /** + * ID given by the consumer and only understandable by him (to facilitate his searches afterwards) + */ + externalId?: string; + note?: Array; + + /** + * Contact attached to the order to send back information regarding this order + */ + notificationContact?: string; + orderTotalPrice?: Array; + payment?: Array; + + /** + * A way that can be used by consumers to prioritize orders in OM system (from 0 to 4 : 0 is the highest priority, and 4 the lowest) + */ + priority?: string; + productOfferingQualification?: Array; + productOrderItem: Array; + quote?: Array; + relatedParty?: Array; + + /** + * Requested delivery date from the requestor perspective + */ + requestedCompletionDate?: string; + + /** + * Order fulfillment start date wished by the requestor. This is used when, for any reason, requestor cannot allow seller to begin to operationally begin the fulfillment before a date. + */ + requestedStartDate?: string; + state?: 'INITIAL' | 'ACKNOWLEDGED' | 'REJECTED' | 'PENDING' | 'HELD' | 'INPROGRESS' | 'CANCELLED' | 'COMPLETED' | 'FAILED' | 'PARTIAL' | 'ASSESSINGCANCELLATION' | 'PENDINGCANCELLATION'; +} diff --git a/src/app/openApis/productOrderingManagement/models/product-order.ts b/src/app/openApis/productOrderingManagement/models/product-order.ts new file mode 100644 index 0000000000000000000000000000000000000000..d4cfb8adaa780baa737859a1c89795a8c16602c2 --- /dev/null +++ b/src/app/openApis/productOrderingManagement/models/product-order.ts @@ -0,0 +1,128 @@ +/* tslint:disable */ +/* eslint-disable */ +/* Code generated by ng-openapi-gen DO NOT EDIT. */ + +import { AgreementRef } from '../models/agreement-ref'; +import { BillingAccountRef } from '../models/billing-account-ref'; +import { Note } from '../models/note'; +import { OrderPrice } from '../models/order-price'; +import { PaymentRef } from '../models/payment-ref'; +import { ProductOfferingQualificationRef } from '../models/product-offering-qualification-ref'; +import { ProductOrderItem } from '../models/product-order-item'; +import { QuoteRef } from '../models/quote-ref'; +import { RelatedChannel } from '../models/related-channel'; +import { RelatedParty } from '../models/related-party'; + +/** + * A Product Order is a type of order which can be used to place an order between a customer and a service provider or between a service provider and a partner and vice versa, + */ +export interface ProductOrder { + + /** + * 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; + '@type'?: string; + + /** + * A reference to an agreement defined in the context of the product order + */ + agreement?: Array; + + /** + * When sub-classing, this defines the super-class + */ + atBaseType?: string; + + /** + * A URI to a JSON-Schema file that defines additional attributes and relationships + */ + atSchemaLocation?: string; + + /** + * When sub-classing, this defines the sub-class entity name + */ + atType?: string; + billingAccount?: BillingAccountRef; + cancellationDate?: string; + + /** + * Reason why the order is cancelled. This is used when order is cancelled. + */ + cancellationReason?: string; + + /** + * Used to categorize the order from a business perspective that can be useful for the OM system (e.g. "enterprise", "residential", ...) + */ + category?: string; + channel?: Array; + + /** + * Date when the order was completed + */ + completionDate?: string; + + /** + * Description of the product order + */ + description?: string; + + /** + * Expected delivery date amended by the provider + */ + expectedCompletionDate?: string; + + /** + * ID given by the consumer and only understandable by him (to facilitate his searches afterwards) + */ + externalId?: string; + + /** + * Hyperlink to access the order + */ + href?: string; + + /** + * ID created on repository side (OM system) + */ + id?: string; + note?: Array; + + /** + * Contact attached to the order to send back information regarding this order + */ + notificationContact?: string; + + /** + * Date when the order was created + */ + orderDate?: string; + orderTotalPrice?: Array; + payment?: Array; + + /** + * A way that can be used by consumers to prioritize orders in OM system (from 0 to 4 : 0 is the highest priority, and 4 the lowest) + */ + priority?: string; + productOfferingQualification?: Array; + productOrderItem: Array; + quote?: Array; + relatedParty?: Array; + + /** + * Requested delivery date from the requestor perspective + */ + requestedCompletionDate?: string; + + /** + * Order fulfillment start date wished by the requestor. This is used when, for any reason, requestor cannot allow seller to begin to operationally begin the fulfillment before a date. + */ + requestedStartDate?: string; + state?: 'INITIAL' | 'ACKNOWLEDGED' | 'REJECTED' | 'PENDING' | 'HELD' | 'INPROGRESS' | 'CANCELLED' | 'COMPLETED' | 'FAILED' | 'PARTIAL' | 'ASSESSINGCANCELLATION' | 'PENDINGCANCELLATION'; + uuid?: string; +} diff --git a/src/app/openApis/productOrderingManagement/models/product-price.ts b/src/app/openApis/productOrderingManagement/models/product-price.ts new file mode 100644 index 0000000000000000000000000000000000000000..a86aeae81276e6fab0edfe52bb8bf20f18b9aa0c --- /dev/null +++ b/src/app/openApis/productOrderingManagement/models/product-price.ts @@ -0,0 +1,60 @@ +/* tslint:disable */ +/* eslint-disable */ +/* Code generated by ng-openapi-gen DO NOT EDIT. */ + +import { BillingAccountRef } from '../models/billing-account-ref'; +import { Price } from '../models/price'; +import { PriceAlteration } from '../models/price-alteration'; +import { ProductOfferingPriceRef } from '../models/product-offering-price-ref'; + +/** + * An amount, usually of money, that represents the actual price paid by a Customer for a purchase, a rent or a lease of a Product. The price is valid for a defined period of time. + */ +export interface ProductPrice { + + /** + * 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; + '@type'?: string; + billingAccount: BillingAccountRef; + + /** + * A narrative that explains in detail the semantics of this product price. + */ + description: string; + + /** + * Unique reference of the entity + */ + href?: string; + + /** + * A short descriptive name such as "Subscription price". + */ + name: string; + price: Price; + + /** + * A category that describes the price, such as recurring, discount, allowance, penalty, and so forth. + */ + priceType: string; + productOfferingPrice: ProductOfferingPriceRef; + productPriceAlteration: Array; + + /** + * Could be month, week... + */ + recurringChargePeriod: string; + + /** + * Could be minutes, GB... + */ + unitOfMeasure: string; + uuid?: string; +} diff --git a/src/app/openApis/productOrderingManagement/models/product-ref-or-value.ts b/src/app/openApis/productOrderingManagement/models/product-ref-or-value.ts new file mode 100644 index 0000000000000000000000000000000000000000..9764a1eac4a38f99b538ae7d1311f00ccfec0f01 --- /dev/null +++ b/src/app/openApis/productOrderingManagement/models/product-ref-or-value.ts @@ -0,0 +1,99 @@ +/* tslint:disable */ +/* eslint-disable */ +/* Code generated by ng-openapi-gen DO NOT EDIT. */ + +import { AgreementItemRef } from '../models/agreement-item-ref'; +import { BillingAccountRef } from '../models/billing-account-ref'; +import { Characteristic } from '../models/characteristic'; +import { ProductOfferingRef } from '../models/product-offering-ref'; +import { ProductPrice } from '../models/product-price'; +import { ProductRelationship } from '../models/product-relationship'; +import { ProductSpecificationRef } from '../models/product-specification-ref'; +import { ProductTerm } from '../models/product-term'; +import { RelatedParty } from '../models/related-party'; +import { RelatedPlaceRefOrValue } from '../models/related-place-ref-or-value'; +import { RelatedProductOrderItem } from '../models/related-product-order-item'; +import { ResourceRef } from '../models/resource-ref'; +import { ServiceRef } from '../models/service-ref'; + +/** + * A product to be created defined by value or existing defined by reference. The polymorphic attributes @type, @schemaLocation & @referredType are related to the product entity and not the RelatedProductRefOrValue class itself + */ +export interface ProductRefOrValue { + + /** + * 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; + '@type'?: string; + agreement: Array; + billingAccount: BillingAccountRef; + + /** + * Is the description of the product. It could be copied from the description of the Product Offering. + */ + description: string; + + /** + * Reference of the product + */ + href: string; + + /** + * Unique identifier of the product + */ + id: string; + + /** + * If true, the product is a ProductBundle which is an instantiation of a BundledProductOffering. If false, the product is a ProductComponent which is an instantiation of a SimpleProductOffering. + */ + isBundle: boolean; + + /** + * If true, the product is visible by the customer. + */ + isCustomerVisible: boolean; + + /** + * Name of the product. It could be the same as the name of the product offering + */ + name: string; + + /** + * Is the date when the product was ordered + */ + orderDate: string; + place: Array; + product: Array; + productCharacteristic: Array; + productOffering: ProductOfferingRef; + productOrderItem: Array; + productPrice: Array; + productRelationship: Array; + + /** + * Is the serial number for the product. This is typically applicable to tangible products e.g. Broadband Router. + */ + productSerialNumber: string; + productSpecification: ProductSpecificationRef; + productTerm: Array; + realizingResource: Array; + realizingService: Array; + relatedParty: Array; + + /** + * Is the date from which the product starts + */ + startDate: string; + status: 'CREATED' | 'PENDINGACTIVE' | 'CANCELLED' | 'ACTIVE' | 'PENDINGTERMINATE' | 'TERMINATED' | 'SUSPENDED' | 'ABORTED_ '; + + /** + * Is the date when the product was terminated + */ + terminationDate: string; +} diff --git a/src/app/openApis/productOrderingManagement/models/product-relationship.ts b/src/app/openApis/productOrderingManagement/models/product-relationship.ts new file mode 100644 index 0000000000000000000000000000000000000000..6c63bb468c77a155f206fa75e481209549b4c2e4 --- /dev/null +++ b/src/app/openApis/productOrderingManagement/models/product-relationship.ts @@ -0,0 +1,34 @@ +/* tslint:disable */ +/* eslint-disable */ +/* Code generated by ng-openapi-gen DO NOT EDIT. */ + +import { ProductRefOrValue } from '../models/product-ref-or-value'; + +/** + * Linked products to the one instantiate, such as [bundled] if the product is a bundle and you want to describe the bundled products inside this bundle; [reliesOn] if the product needs another already owned product to rely on (e.g. an option on an already owned mobile access product) [targets] or [isTargeted] (depending on the way of expressing the link) for any other kind of links that may be useful + */ +export interface ProductRelationship { + + /** + * 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; + '@type'?: string; + + /** + * Unique reference of the entity + */ + href?: string; + product: ProductRefOrValue; + + /** + * Type of the product relationship, such as [bundled] if the product is a bundle and you want to describe the bundled products inside this bundle; [reliesOn] if the product needs another already owned product to rely on (e.g. an option on an already owned mobile access product) [targets] or [isTargeted] (depending on the way of expressing the link) for any other kind of links that may be useful + */ + relationshipType: string; + uuid?: string; +} diff --git a/src/app/openApis/productOrderingManagement/models/product-specification-ref.ts b/src/app/openApis/productOrderingManagement/models/product-specification-ref.ts new file mode 100644 index 0000000000000000000000000000000000000000..8951657f838992bee8f789e97604074f9dd61a32 --- /dev/null +++ b/src/app/openApis/productOrderingManagement/models/product-specification-ref.ts @@ -0,0 +1,71 @@ +/* tslint:disable */ +/* eslint-disable */ +/* Code generated by ng-openapi-gen DO NOT EDIT. */ + +import { TargetProductSchema } from '../models/target-product-schema'; +import { TimePeriod } from '../models/time-period'; + +/** + * Product specification reference: A ProductSpecification is a detailed description of a tangible or intangible object made available externally in the form of a ProductOffering to customers or other parties playing a party role. + */ +export interface ProductSpecificationRef { + + /** + * When sub-classing, this defines the super-class + */ + '@baseType'?: string; + + /** + * The actual type of the target instance when needed for disambiguation. + */ + '@referredType'?: string; + + /** + * A URI to a JSON-Schema file that defines additional attributes and relationships + */ + '@schemaLocation'?: string; + + /** + * When sub-classing, this defines the sub-class entity name + */ + '@type'?: string; + + /** + * Description of this catalog + */ + description?: string; + + /** + * Unique reference of the entity + */ + href?: string; + + /** + * Unique identifier of a related entity. + */ + id: string; + + /** + * Date and time of the last update + */ + lastUpdate?: string; + + /** + * Used to indicate the current lifecycle status + */ + lifecycleStatus?: string; + lifecycleStatusEnum?: 'In study' | 'In design' | 'In test' | 'Active' | 'Launched' | 'Retired' | 'Obsolete' | 'Rejected'; + + /** + * Name of the entity + */ + name?: string; + targetProductSchema?: TargetProductSchema; + uuid?: string; + validFor?: TimePeriod; + + /** + * Entity version + */ + version?: string; +} diff --git a/src/app/openApis/productOrderingManagement/models/product-term.ts b/src/app/openApis/productOrderingManagement/models/product-term.ts new file mode 100644 index 0000000000000000000000000000000000000000..b7c97039f75310a4864bc91e0630c59de3802f4c --- /dev/null +++ b/src/app/openApis/productOrderingManagement/models/product-term.ts @@ -0,0 +1,41 @@ +/* tslint:disable */ +/* eslint-disable */ +/* Code generated by ng-openapi-gen DO NOT EDIT. */ + +import { Quantity } from '../models/quantity'; +import { TimePeriod } from '../models/time-period'; + +/** + * Description of a productTerm linked to this product. This represent a commitment with a duration + */ +export interface ProductTerm { + + /** + * 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; + '@type'?: string; + + /** + * Description of the productTerm + */ + description: string; + duration: Quantity; + + /** + * Unique reference of the entity + */ + href?: string; + + /** + * Name of the productTerm + */ + name: string; + uuid?: string; + validFor: TimePeriod; +} diff --git a/src/app/openApis/productOrderingManagement/models/quantity.ts b/src/app/openApis/productOrderingManagement/models/quantity.ts new file mode 100644 index 0000000000000000000000000000000000000000..fd1b15eff6cdf3f66b25dfecc6dfaf67b9ebb896 --- /dev/null +++ b/src/app/openApis/productOrderingManagement/models/quantity.ts @@ -0,0 +1,20 @@ +/* tslint:disable */ +/* eslint-disable */ +/* Code generated by ng-openapi-gen DO NOT EDIT. */ + + +/** + * An amount in a given unit + */ +export interface Quantity { + + /** + * Numeric value in a given unit + */ + amount?: number; + + /** + * Unit + */ + units?: string; +} diff --git a/src/app/openApis/productOrderingManagement/models/quote-item-ref.ts b/src/app/openApis/productOrderingManagement/models/quote-item-ref.ts new file mode 100644 index 0000000000000000000000000000000000000000..bc4e5b1fc5c8422e287e4ce256e99f5bfe0ec818 --- /dev/null +++ b/src/app/openApis/productOrderingManagement/models/quote-item-ref.ts @@ -0,0 +1,73 @@ +/* tslint:disable */ +/* eslint-disable */ +/* Code generated by ng-openapi-gen DO NOT EDIT. */ + + +/** + * It's a Quote item that has been executed previously. + */ +export interface QuoteItemRef { + + /** + * When sub-classing, this defines the super-class + */ + '@baseType'?: string; + '@referredType'?: string; + + /** + * A URI to a JSON-Schema file that defines additional attributes and relationships + */ + '@schemaLocation'?: string; + '@type'?: string; + + /** + * When sub-classing, this defines the super-class + */ + atBaseType?: string; + + /** + * The actual type of the target instance when needed for disambiguation. + */ + atReferredType?: string; + + /** + * A URI to a JSON-Schema file that defines additional attributes and relationships + */ + atSchemaLocation?: string; + + /** + * When sub-classing, this defines the sub-class entity name + */ + atType?: string; + + /** + * Reference of the related entity. + */ + href?: string; + + /** + * Id of an item of a quote + */ + id: string; + + /** + * Name of the related entity. + */ + name?: string; + + /** + * Reference of the related entity. + */ + quoteHref?: string; + + /** + * Unique identifier of a related entity. + */ + quoteId: string; + + /** + * Name of the related entity. + */ + quoteName?: string; + uuid?: string; +} diff --git a/src/app/openApis/productOrderingManagement/models/quote-ref.ts b/src/app/openApis/productOrderingManagement/models/quote-ref.ts new file mode 100644 index 0000000000000000000000000000000000000000..72bd361007c277441c129a109296ec2eefa8bf06 --- /dev/null +++ b/src/app/openApis/productOrderingManagement/models/quote-ref.ts @@ -0,0 +1,58 @@ +/* tslint:disable */ +/* eslint-disable */ +/* Code generated by ng-openapi-gen DO NOT EDIT. */ + + +/** + * It's a Quote that has been executed previously + */ +export interface QuoteRef { + + /** + * When sub-classing, this defines the super-class + */ + '@baseType'?: string; + '@referredType'?: string; + + /** + * A URI to a JSON-Schema file that defines additional attributes and relationships + */ + '@schemaLocation'?: string; + '@type'?: string; + + /** + * When sub-classing, this defines the super-class + */ + atBaseType?: string; + + /** + * The actual type of the target instance when needed for disambiguation. + */ + atReferredType?: string; + + /** + * A URI to a JSON-Schema file that defines additional attributes and relationships + */ + atSchemaLocation?: string; + + /** + * When sub-classing, this defines the sub-class entity name + */ + atType?: string; + + /** + * Reference of the related entity. + */ + href?: string; + + /** + * Unique identifier of a related entity. + */ + id: string; + + /** + * Name of the related entity. + */ + name?: string; + uuid?: string; +} diff --git a/src/app/openApis/productOrderingManagement/models/related-channel.ts b/src/app/openApis/productOrderingManagement/models/related-channel.ts new file mode 100644 index 0000000000000000000000000000000000000000..56e4b7bae24139575d726e9448b247dc86d39a21 --- /dev/null +++ b/src/app/openApis/productOrderingManagement/models/related-channel.ts @@ -0,0 +1,63 @@ +/* tslint:disable */ +/* eslint-disable */ +/* Code generated by ng-openapi-gen DO NOT EDIT. */ + + +/** + * Related channel to another entity. May be online web, mobile app, social ,etc. + */ +export interface RelatedChannel { + + /** + * When sub-classing, this defines the super-class + */ + '@baseType'?: string; + '@referredType'?: string; + + /** + * A URI to a JSON-Schema file that defines additional attributes and relationships + */ + '@schemaLocation'?: string; + '@type'?: string; + + /** + * When sub-classing, this defines the super-class + */ + atBaseType?: string; + + /** + * The actual type of the target instance when needed for disambiguation. + */ + atReferredType?: string; + + /** + * A URI to a JSON-Schema file that defines additional attributes and relationships + */ + atSchemaLocation?: string; + + /** + * When sub-classing, this defines the sub-class entity name + */ + atType?: string; + + /** + * Reference of the related entity. + */ + href?: string; + + /** + * Unique identifier of a related entity. + */ + id: string; + + /** + * Name of the channel. + */ + name?: string; + + /** + * Role playing by the channel. + */ + role?: string; + uuid?: string; +} diff --git a/src/app/openApis/productOrderingManagement/models/related-party.ts b/src/app/openApis/productOrderingManagement/models/related-party.ts new file mode 100644 index 0000000000000000000000000000000000000000..23f41dfaf26abe9faa83df8475c3d27dd4ae91db --- /dev/null +++ b/src/app/openApis/productOrderingManagement/models/related-party.ts @@ -0,0 +1,44 @@ +/* tslint:disable */ +/* eslint-disable */ +/* Code generated by ng-openapi-gen DO NOT EDIT. */ + + +/** + * RelatedParty reference. A related party defines party or party role linked to a specific entity. + */ +export interface RelatedParty { + + /** + * When sub-classing, this defines the super-class + */ + '@baseType'?: string; + + /** + * The actual type of the target instance when needed for disambiguation. + */ + '@referredType'?: string; + + /** + * A URI to a JSON-Schema file that defines additional attributes and relationships + */ + '@schemaLocation'?: string; + '@type'?: string; + extendedInfo?: string; + + /** + * Unique reference of the entity + */ + href?: string; + id?: string; + + /** + * Name of the entity + */ + name?: string; + + /** + * Role of the related party. + */ + role?: string; + uuid?: string; +} diff --git a/src/app/openApis/productOrderingManagement/models/related-place-ref-or-value.ts b/src/app/openApis/productOrderingManagement/models/related-place-ref-or-value.ts new file mode 100644 index 0000000000000000000000000000000000000000..14e6da200fb23de6ea450dc8314db7416c40dac7 --- /dev/null +++ b/src/app/openApis/productOrderingManagement/models/related-place-ref-or-value.ts @@ -0,0 +1,44 @@ +/* tslint:disable */ +/* eslint-disable */ +/* Code generated by ng-openapi-gen DO NOT EDIT. */ + + +/** + * Related Entity reference. A related place defines a place described by reference or by value linked to a specific entity. The polymorphic attributes @type, @schemaLocation & @referredType are related to the place entity and not the RelatedPlaceRefOrValue class itself + */ +export interface RelatedPlaceRefOrValue { + + /** + * When sub-classing, this defines the super-class + */ + '@baseType'?: string; + '@referredType'?: string; + + /** + * A URI to a JSON-Schema file that defines additional attributes and relationships + */ + '@schemaLocation'?: string; + '@type'?: string; + + /** + * The actual type of the target instance when needed for disambiguation. + */ + atReferredType: string; + + /** + * Unique reference of the place + */ + href: string; + + /** + * Unique identifier of the place + */ + id: string; + + /** + * A user-friendly name for the place, such as [Paris Store], [London Store], [Main Home] + */ + name: string; + role: string; + uuid?: string; +} diff --git a/src/app/openApis/productOrderingManagement/models/related-product-order-item.ts b/src/app/openApis/productOrderingManagement/models/related-product-order-item.ts new file mode 100644 index 0000000000000000000000000000000000000000..03b27eb5f5d1504c2e2fe70d7ba90c35a338a827 --- /dev/null +++ b/src/app/openApis/productOrderingManagement/models/related-product-order-item.ts @@ -0,0 +1,73 @@ +/* tslint:disable */ +/* eslint-disable */ +/* Code generated by ng-openapi-gen DO NOT EDIT. */ + + +/** + * RelatedProductOrderItem (ProductOrder item) .The product order item which triggered product creation/change/termination. + */ +export interface RelatedProductOrderItem { + + /** + * When sub-classing, this defines the super-class + */ + '@baseType'?: string; + '@referredType'?: string; + + /** + * A URI to a JSON-Schema file that defines additional attributes and relationships + */ + '@schemaLocation'?: string; + '@type'?: string; + + /** + * When sub-classing, this defines the super-class + */ + atBaseType?: string; + + /** + * The actual type of the target instance when needed for disambiguation. + */ + atReferredType?: string; + + /** + * A URI to a JSON-Schema file that defines additional attributes and relationships + */ + atSchemaLocation?: string; + + /** + * When sub-classing, this defines the sub-class entity name + */ + atType?: string; + + /** + * Unique reference of the entity + */ + href?: string; + + /** + * Action of the order item for this product + */ + orderItemAction?: string; + + /** + * Identifier of the order item where the product was managed + */ + orderItemId: string; + + /** + * Reference of the related entity. + */ + productOrderHref?: string; + + /** + * Unique identifier of a related entity. + */ + productOrderId: string; + + /** + * role of the product order item for this product + */ + role?: string; + uuid?: string; +} diff --git a/src/app/openApis/productOrderingManagement/models/resource-ref.ts b/src/app/openApis/productOrderingManagement/models/resource-ref.ts new file mode 100644 index 0000000000000000000000000000000000000000..8ad30c061c61aadceb1bce3b1d7eef1c44fd6d1a --- /dev/null +++ b/src/app/openApis/productOrderingManagement/models/resource-ref.ts @@ -0,0 +1,38 @@ +/* tslint:disable */ +/* eslint-disable */ +/* Code generated by ng-openapi-gen DO NOT EDIT. */ + +export interface ResourceRef { + + /** + * When sub-classing, this defines the super-class + */ + '@baseType'?: string; + + /** + * The actual type of the target instance when needed for disambiguation. + */ + '@referredType'?: string; + + /** + * A URI to a JSON-Schema file that defines additional attributes and relationships + */ + '@schemaLocation'?: string; + '@type'?: string; + + /** + * Unique reference of the entity + */ + href?: string; + + /** + * Unique identifier of the supporting resource + */ + id: string; + + /** + * Name of the entity + */ + name?: string; + uuid?: string; +} diff --git a/src/app/openApis/productOrderingManagement/models/service-ref.ts b/src/app/openApis/productOrderingManagement/models/service-ref.ts new file mode 100644 index 0000000000000000000000000000000000000000..6ecdd6a2a8fd6083a7687f0c3f5da54b1959bc28 --- /dev/null +++ b/src/app/openApis/productOrderingManagement/models/service-ref.ts @@ -0,0 +1,42 @@ +/* tslint:disable */ +/* eslint-disable */ +/* Code generated by ng-openapi-gen DO NOT EDIT. */ + + +/** + * Service reference, for when Service is used by other entities + */ +export interface ServiceRef { + + /** + * When sub-classing, this defines the super-class + */ + '@baseType'?: string; + + /** + * The actual type of the target instance when needed for disambiguation. + */ + '@referredType'?: string; + + /** + * A URI to a JSON-Schema file that defines additional attributes and relationships + */ + '@schemaLocation'?: string; + '@type'?: string; + + /** + * Unique reference of the entity + */ + href?: string; + + /** + * Id of the service + */ + id: string; + + /** + * Name of the entity + */ + name?: string; + uuid?: string; +} diff --git a/src/app/openApis/productOrderingManagement/models/target-product-schema.ts b/src/app/openApis/productOrderingManagement/models/target-product-schema.ts new file mode 100644 index 0000000000000000000000000000000000000000..be4609c11455a66ed19d1b7687d34b295abc3bac --- /dev/null +++ b/src/app/openApis/productOrderingManagement/models/target-product-schema.ts @@ -0,0 +1,26 @@ +/* tslint:disable */ +/* eslint-disable */ +/* Code generated by ng-openapi-gen DO NOT EDIT. */ + + +/** + * The reference object to the schema and type of target product which is described by product specification + */ +export interface TargetProductSchema { + + /** + * 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; + '@type'?: string; + + /** + * Unique reference of the entity + */ + href?: string; +} diff --git a/src/app/openApis/productOrderingManagement/models/time-period.ts b/src/app/openApis/productOrderingManagement/models/time-period.ts new file mode 100644 index 0000000000000000000000000000000000000000..2d39ac716efaeaba388455c34be135c7ca57a063 --- /dev/null +++ b/src/app/openApis/productOrderingManagement/models/time-period.ts @@ -0,0 +1,20 @@ +/* tslint:disable */ +/* eslint-disable */ +/* Code generated by ng-openapi-gen DO NOT EDIT. */ + + +/** + * A period of time, either as a deadline (endDateTime only) a startDateTime only, or both + */ +export interface TimePeriod { + + /** + * End of the time period, using IETC-RFC-3339 format + */ + endDateTime?: string; + + /** + * Start of the time period, using IETC-RFC-3339 format. If you define a start, you must also define an end + */ + startDateTime?: string; +} diff --git a/src/app/openApis/productOrderingManagement/request-builder.ts b/src/app/openApis/productOrderingManagement/request-builder.ts new file mode 100644 index 0000000000000000000000000000000000000000..a7f253b1547e27bfb9cad1a5db21a38c01311730 --- /dev/null +++ b/src/app/openApis/productOrderingManagement/request-builder.ts @@ -0,0 +1,370 @@ +/* tslint:disable */ +/* eslint-disable */ +/* Code generated by ng-openapi-gen DO NOT EDIT. */ + +import { HttpRequest, HttpParameterCodec, HttpParams, HttpHeaders, HttpContext } from '@angular/common/http'; + +/** + * 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 ParameterCodecInstance = new ParameterCodec(); + +/** + * Defines the options for appending a parameter + */ +interface ParameterOptions { + style?: string; + explode?: boolean; +} + +/** + * Base class for a parameter + */ +abstract class Parameter { + constructor(public name: string, public value: any, public options: ParameterOptions, defaultStyle: string, defaultExplode: boolean) { + this.options = options || {}; + if (this.options.style === null || this.options.style === undefined) { + this.options.style = defaultStyle; + } + if (this.options.explode === null || this.options.explode === undefined) { + this.options.explode = defaultExplode; + } + } + + serializeValue(value: any, separator = ','): string { + if (value === null || value === undefined) { + return ''; + } else if (value instanceof Array) { + return value.map(v => this.serializeValue(v).split(separator).join(encodeURIComponent(separator))).join(separator); + } else if (typeof value === 'object') { + const array: string[] = []; + for (const key of Object.keys(value)) { + let propVal = value[key]; + if (propVal !== null && propVal !== undefined) { + propVal = this.serializeValue(propVal).split(separator).join(encodeURIComponent(separator)); + if (this.options.explode) { + array.push(`${key}=${propVal}`); + } else { + array.push(key); + array.push(propVal); + } + } + } + return array.join(separator); + } else { + return String(value); + } + } +} + +/** + * A parameter in the operation path + */ +class PathParameter extends Parameter { + constructor(name: string, value: any, options: ParameterOptions) { + super(name, value, options, 'simple', false); + } + + append(path: string): string { + let value = this.value; + if (value === null || value === undefined) { + value = ''; + } + let prefix = this.options.style === 'label' ? '.' : ''; + let separator = this.options.explode ? prefix === '' ? ',' : prefix : ','; + let alreadySerialized = false; + if (this.options.style === 'matrix') { + // The parameter name is just used as prefix, except in some cases... + prefix = `;${this.name}=`; + if (this.options.explode && typeof value === 'object') { + prefix = ';'; + if (value instanceof Array) { + // For arrays we have to repeat the name for each element + value = value.map(v => `${this.name}=${this.serializeValue(v, ';')}`); + value = value.join(';'); + alreadySerialized = true; + } else { + // For objects we have to put each the key / value pairs + value = this.serializeValue(value, ';'); + alreadySerialized = true + } + } + } + value = prefix + (alreadySerialized ? value : this.serializeValue(value, separator)); + // Replace both the plain variable and the corresponding variant taking in the prefix and explode into account + path = path.replace(`{${this.name}}`, value); + path = path.replace(`{${prefix}${this.name}${this.options.explode ? '*' : ''}}`, value); + return path; + } + + // @ts-ignore + serializeValue(value: any, separator = ','): string { + var result = typeof value === 'string' ? encodeURIComponent(value) : super.serializeValue(value, separator); + result = result.replace(/%3D/g, '='); + result = result.replace(/%3B/g, ';'); + result = result.replace(/%2C/g, ','); + return result; + } +} + +/** + * A parameter in the query + */ +class QueryParameter extends Parameter { + constructor(name: string, value: any, options: ParameterOptions) { + super(name, value, options, 'form', true); + } + + append(params: HttpParams): HttpParams { + if (this.value instanceof Array) { + // Array serialization + if (this.options.explode) { + for (const v of this.value) { + params = params.append(this.name, this.serializeValue(v)); + } + } else { + const separator = this.options.style === 'spaceDelimited' + ? ' ' : this.options.style === 'pipeDelimited' + ? '|' : ','; + return params.append(this.name, this.serializeValue(this.value, separator)); + } + } else if (this.value !== null && typeof this.value === 'object') { + // Object serialization + if (this.options.style === 'deepObject') { + // Append a parameter for each key, in the form `name[key]` + for (const key of Object.keys(this.value)) { + const propVal = this.value[key]; + if (propVal !== null && propVal !== undefined) { + params = params.append(`${this.name}[${key}]`, this.serializeValue(propVal)); + } + } + } else if (this.options.explode) { + // Append a parameter for each key without using the parameter name + for (const key of Object.keys(this.value)) { + const propVal = this.value[key]; + if (propVal !== null && propVal !== undefined) { + params = params.append(key, this.serializeValue(propVal)); + } + } + } else { + // Append a single parameter whose values are a comma-separated list of key,value,key,value... + const array: any[] = []; + for (const key of Object.keys(this.value)) { + const propVal = this.value[key]; + if (propVal !== null && propVal !== undefined) { + array.push(key); + array.push(propVal); + } + } + params = params.append(this.name, this.serializeValue(array)); + } + } else if (this.value !== null && this.value !== undefined) { + // Plain value + params = params.append(this.name, this.serializeValue(this.value)); + } + return params; + } +} + +/** + * A parameter in the HTTP request header + */ +class HeaderParameter extends Parameter { + constructor(name: string, value: any, options: ParameterOptions) { + super(name, value, options, 'simple', false); + } + + append(headers: HttpHeaders): HttpHeaders { + if (this.value !== null && this.value !== undefined) { + if (this.value instanceof Array) { + for (const v of this.value) { + headers = headers.append(this.name, this.serializeValue(v)); + } + } else { + headers = headers.append(this.name, this.serializeValue(this.value)); + } + } + return headers; + } +} + +/** + * Helper to build http requests from parameters + */ +export class RequestBuilder { + + private _path = new Map(); + private _query = new Map(); + private _header = new Map(); + _bodyContent: any | null; + _bodyContentType?: string; + + constructor( + public rootUrl: string, + public operationPath: string, + public method: string) { + } + + /** + * Sets a path parameter + */ + path(name: string, value: any, options?: ParameterOptions): void { + this._path.set(name, new PathParameter(name, value, options || {})); + } + + /** + * Sets a query parameter + */ + query(name: string, value: any, options?: ParameterOptions): void { + this._query.set(name, new QueryParameter(name, value, options || {})); + } + + /** + * Sets a header parameter + */ + header(name: string, value: any, options?: ParameterOptions): void { + this._header.set(name, new HeaderParameter(name, value, options || {})); + } + + /** + * Sets the body content, along with the content type + */ + body(value: any, contentType = 'application/json'): void { + if (value instanceof Blob) { + this._bodyContentType = value.type; + } else { + this._bodyContentType = contentType; + } + if (this._bodyContentType === 'application/x-www-form-urlencoded' && value !== null && typeof value === 'object') { + // Handle URL-encoded data + const pairs: Array<[string, string]> = []; + for (const key of Object.keys(value)) { + let val = value[key]; + if (!(val instanceof Array)) { + val = [val]; + } + for (const v of val) { + const formValue = this.formDataValue(v); + if (formValue !== null) { + pairs.push([key, formValue]); + } + } + } + this._bodyContent = pairs.map(p => `${encodeURIComponent(p[0])}=${encodeURIComponent(p[1])}`).join('&'); + } else if (this._bodyContentType === 'multipart/form-data') { + // Handle multipart form data + const formData = new FormData(); + if (value !== null && value !== undefined) { + for (const key of Object.keys(value)) { + const val = value[key]; + if (val instanceof Array) { + for (const v of val) { + const toAppend = this.formDataValue(v); + if (toAppend !== null) { + formData.append(key, toAppend); + } + } + } else { + const toAppend = this.formDataValue(val); + if (toAppend !== null) { + formData.set(key, toAppend); + } + } + } + } + this._bodyContent = formData; + } else { + // The body is the plain content + this._bodyContent = value; + } + } + + private formDataValue(value: any): any { + if (value === null || value === undefined) { + return null; + } + if (value instanceof Blob) { + return value; + } + if (typeof value === 'object') { + return new Blob([JSON.stringify(value)], {type: 'application/json'}) + } + return String(value); + } + + /** + * Builds the request with the current set parameters + */ + build(options?: { + /** Which content types to accept */ + accept?: string; + + /** The expected response type */ + responseType?: 'json' | 'text' | 'blob' | 'arraybuffer'; + + /** Whether to report progress on uploads / downloads */ + reportProgress?: boolean; + + /** Allow passing HttpContext for HttpClient */ + context?: HttpContext; + }): HttpRequest { + + options = options || {}; + + // Path parameters + let path = this.operationPath; + for (const pathParam of this._path.values()) { + path = pathParam.append(path); + } + const url = this.rootUrl + path; + + // Query parameters + let httpParams = new HttpParams({ + encoder: ParameterCodecInstance + }); + for (const queryParam of this._query.values()) { + httpParams = queryParam.append(httpParams); + } + + // Header parameters + let httpHeaders = new HttpHeaders(); + if (options.accept) { + httpHeaders = httpHeaders.append('Accept', options.accept); + } + for (const headerParam of this._header.values()) { + httpHeaders = headerParam.append(httpHeaders); + } + + // Request content headers + if (this._bodyContentType && !(this._bodyContent instanceof FormData)) { + httpHeaders = httpHeaders.set('Content-Type', this._bodyContentType); + } + + // Perform the request + return new HttpRequest(this.method.toUpperCase(), url, this._bodyContent, { + params: httpParams, + headers: httpHeaders, + responseType: options.responseType, + reportProgress: options.reportProgress, + context: options.context + }); + } +} diff --git a/src/app/openApis/productOrderingManagement/services.ts b/src/app/openApis/productOrderingManagement/services.ts new file mode 100644 index 0000000000000000000000000000000000000000..660fa1cdc1e11d289a36eaf8ba5e0085fb0ada26 --- /dev/null +++ b/src/app/openApis/productOrderingManagement/services.ts @@ -0,0 +1,10 @@ +/* tslint:disable */ +/* eslint-disable */ +/* Code generated by ng-openapi-gen DO NOT EDIT. */ + +export { ProductOrderService } from './services/product-order.service'; +export { ListenerService } from './services/listener.service'; +export { NotificationListenersClientSideService } from './services/notification-listeners-client-side.service'; +export { HubService } from './services/hub.service'; +export { EventsSubscriptionService } from './services/events-subscription.service'; +export { CancelProductOrderService } from './services/cancel-product-order.service'; diff --git a/src/app/openApis/productOrderingManagement/services/cancel-product-order.service.ts b/src/app/openApis/productOrderingManagement/services/cancel-product-order.service.ts new file mode 100644 index 0000000000000000000000000000000000000000..4329c190883df3dc1d66330620f99c1d3753003b --- /dev/null +++ b/src/app/openApis/productOrderingManagement/services/cancel-product-order.service.ts @@ -0,0 +1,131 @@ +/* tslint:disable */ +/* eslint-disable */ +/* Code generated by ng-openapi-gen DO NOT EDIT. */ + +import { HttpClient, HttpContext } from '@angular/common/http'; +import { Injectable } from '@angular/core'; +import { Observable } from 'rxjs'; +import { map } from 'rxjs/operators'; + +import { BaseService } from '../base-service'; +import { ApiConfiguration } from '../api-configuration'; +import { StrictHttpResponse } from '../strict-http-response'; + +import { CancelProductOrder } from '../models/cancel-product-order'; +import { createCancelProductOrder } from '../fn/cancel-product-order/create-cancel-product-order'; +import { CreateCancelProductOrder$Params } from '../fn/cancel-product-order/create-cancel-product-order'; +import { listCancelProductOrder } from '../fn/cancel-product-order/list-cancel-product-order'; +import { ListCancelProductOrder$Params } from '../fn/cancel-product-order/list-cancel-product-order'; +import { retrieveCancelProductOrder } from '../fn/cancel-product-order/retrieve-cancel-product-order'; +import { RetrieveCancelProductOrder$Params } from '../fn/cancel-product-order/retrieve-cancel-product-order'; + + +/** + * the cancelProductOrder API + */ +@Injectable({ providedIn: 'root' }) +export class CancelProductOrderService extends BaseService { + constructor(config: ApiConfiguration, http: HttpClient) { + super(config, http); + } + + /** Path part for operation `listCancelProductOrder()` */ + static readonly ListCancelProductOrderPath = '/cancelProductOrder'; + + /** + * List or find CancelProductOrder objects. + * + * This operation list or find CancelProductOrder entities + * + * This method provides access to the full `HttpResponse`, allowing access to response headers. + * To access only the response body, use `listCancelProductOrder()` instead. + * + * This method doesn't expect any request body. + */ + listCancelProductOrder$Response(params?: ListCancelProductOrder$Params, context?: HttpContext): Observable>> { + return listCancelProductOrder(this.http, this.rootUrl, params, context); + } + + /** + * List or find CancelProductOrder objects. + * + * This operation list or find CancelProductOrder entities + * + * This method provides access only to the response body. + * To access the full response (for headers, for example), `listCancelProductOrder$Response()` instead. + * + * This method doesn't expect any request body. + */ + listCancelProductOrder(params?: ListCancelProductOrder$Params, context?: HttpContext): Observable> { + return this.listCancelProductOrder$Response(params, context).pipe( + map((r: StrictHttpResponse>): Array => r.body) + ); + } + + /** Path part for operation `createCancelProductOrder()` */ + static readonly CreateCancelProductOrderPath = '/cancelProductOrder'; + + /** + * Creates a CancelProductOrder. + * + * This operation creates a CancelProductOrder entity. + * + * This method provides access to the full `HttpResponse`, allowing access to response headers. + * To access only the response body, use `createCancelProductOrder()` instead. + * + * This method sends `application/json;charset=utf-8` and handles request body of type `application/json;charset=utf-8`. + */ + createCancelProductOrder$Response(params: CreateCancelProductOrder$Params, context?: HttpContext): Observable> { + return createCancelProductOrder(this.http, this.rootUrl, params, context); + } + + /** + * Creates a CancelProductOrder. + * + * This operation creates a CancelProductOrder entity. + * + * This method provides access only to the response body. + * To access the full response (for headers, for example), `createCancelProductOrder$Response()` instead. + * + * This method sends `application/json;charset=utf-8` and handles request body of type `application/json;charset=utf-8`. + */ + createCancelProductOrder(params: CreateCancelProductOrder$Params, context?: HttpContext): Observable { + return this.createCancelProductOrder$Response(params, context).pipe( + map((r: StrictHttpResponse): void => r.body) + ); + } + + /** Path part for operation `retrieveCancelProductOrder()` */ + static readonly RetrieveCancelProductOrderPath = '/cancelProductOrder/{id}'; + + /** + * Retrieves a CancelProductOrder by ID. + * + * This operation retrieves a CancelProductOrder entity. Attribute selection is enabled for all first level attributes. + * + * This method provides access to the full `HttpResponse`, allowing access to response headers. + * To access only the response body, use `retrieveCancelProductOrder()` instead. + * + * This method doesn't expect any request body. + */ + retrieveCancelProductOrder$Response(params: RetrieveCancelProductOrder$Params, context?: HttpContext): Observable> { + return retrieveCancelProductOrder(this.http, this.rootUrl, params, context); + } + + /** + * Retrieves a CancelProductOrder by ID. + * + * This operation retrieves a CancelProductOrder entity. Attribute selection is enabled for all first level attributes. + * + * This method provides access only to the response body. + * To access the full response (for headers, for example), `retrieveCancelProductOrder$Response()` instead. + * + * This method doesn't expect any request body. + */ + retrieveCancelProductOrder(params: RetrieveCancelProductOrder$Params, context?: HttpContext): Observable { + return this.retrieveCancelProductOrder$Response(params, context).pipe( + map((r: StrictHttpResponse): CancelProductOrder => r.body) + ); + } + +} diff --git a/src/app/openApis/productOrderingManagement/services/events-subscription.service.ts b/src/app/openApis/productOrderingManagement/services/events-subscription.service.ts new file mode 100644 index 0000000000000000000000000000000000000000..d31eb5563760d60e4f5bb66860b5d5cf29e2d4a8 --- /dev/null +++ b/src/app/openApis/productOrderingManagement/services/events-subscription.service.ts @@ -0,0 +1,91 @@ +/* tslint:disable */ +/* eslint-disable */ +/* Code generated by ng-openapi-gen DO NOT EDIT. */ + +import { HttpClient, HttpContext } from '@angular/common/http'; +import { Injectable } from '@angular/core'; +import { Observable } from 'rxjs'; +import { map } from 'rxjs/operators'; + +import { BaseService } from '../base-service'; +import { ApiConfiguration } from '../api-configuration'; +import { StrictHttpResponse } from '../strict-http-response'; + +import { registerListener } from '../fn/hub/register-listener'; +import { RegisterListener$Params } from '../fn/hub/register-listener'; +import { unregisterListener } from '../fn/hub/unregister-listener'; +import { UnregisterListener$Params } from '../fn/hub/unregister-listener'; + +@Injectable({ providedIn: 'root' }) +export class EventsSubscriptionService extends BaseService { + constructor(config: ApiConfiguration, http: HttpClient) { + super(config, http); + } + + /** Path part for operation `registerListener()` */ + static readonly RegisterListenerPath = '/productOrderingManagement/v4/hub'; + + /** + * 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. + * + * This method provides access to the full `HttpResponse`, allowing access to response headers. + * To access only the response body, use `registerListener()` instead. + * + * This method sends `application/json;charset=utf-8` and handles request body of type `application/json;charset=utf-8`. + */ + registerListener$Response(params: RegisterListener$Params, context?: HttpContext): Observable> { + return registerListener(this.http, this.rootUrl, params, context); + } + + /** + * 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. + * + * This method provides access only to the response body. + * To access the full response (for headers, for example), `registerListener$Response()` instead. + * + * This method sends `application/json;charset=utf-8` and handles request body of type `application/json;charset=utf-8`. + */ + registerListener(params: RegisterListener$Params, context?: HttpContext): Observable { + return this.registerListener$Response(params, context).pipe( + map((r: StrictHttpResponse): void => r.body) + ); + } + + /** Path part for operation `unregisterListener()` */ + static readonly UnregisterListenerPath = '/productOrderingManagement/v4/hub/{id}'; + + /** + * 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. + * + * This method provides access to the full `HttpResponse`, allowing access to response headers. + * To access only the response body, use `unregisterListener()` instead. + * + * This method doesn't expect any request body. + */ + unregisterListener$Response(params: UnregisterListener$Params, context?: HttpContext): Observable> { + return unregisterListener(this.http, this.rootUrl, params, context); + } + + /** + * 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. + * + * This method provides access only to the response body. + * To access the full response (for headers, for example), `unregisterListener$Response()` instead. + * + * This method doesn't expect any request body. + */ + unregisterListener(params: UnregisterListener$Params, context?: HttpContext): Observable { + return this.unregisterListener$Response(params, context).pipe( + map((r: StrictHttpResponse): void => r.body) + ); + } + +} diff --git a/src/app/openApis/productOrderingManagement/services/hub.service.ts b/src/app/openApis/productOrderingManagement/services/hub.service.ts new file mode 100644 index 0000000000000000000000000000000000000000..891580e2cacfa974ebf6a7bcda5bb20d963f7e36 --- /dev/null +++ b/src/app/openApis/productOrderingManagement/services/hub.service.ts @@ -0,0 +1,95 @@ +/* tslint:disable */ +/* eslint-disable */ +/* Code generated by ng-openapi-gen DO NOT EDIT. */ + +import { HttpClient, HttpContext } from '@angular/common/http'; +import { Injectable } from '@angular/core'; +import { Observable } from 'rxjs'; +import { map } from 'rxjs/operators'; + +import { BaseService } from '../base-service'; +import { ApiConfiguration } from '../api-configuration'; +import { StrictHttpResponse } from '../strict-http-response'; + +import { registerListener } from '../fn/hub/register-listener'; +import { RegisterListener$Params } from '../fn/hub/register-listener'; +import { unregisterListener } from '../fn/hub/unregister-listener'; +import { UnregisterListener$Params } from '../fn/hub/unregister-listener'; + + +/** + * the hub API + */ +@Injectable({ providedIn: 'root' }) +export class HubService extends BaseService { + constructor(config: ApiConfiguration, http: HttpClient) { + super(config, http); + } + + /** Path part for operation `registerListener()` */ + static readonly RegisterListenerPath = '/productOrderingManagement/v4/hub'; + + /** + * 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. + * + * This method provides access to the full `HttpResponse`, allowing access to response headers. + * To access only the response body, use `registerListener()` instead. + * + * This method sends `application/json;charset=utf-8` and handles request body of type `application/json;charset=utf-8`. + */ + registerListener$Response(params: RegisterListener$Params, context?: HttpContext): Observable> { + return registerListener(this.http, this.rootUrl, params, context); + } + + /** + * 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. + * + * This method provides access only to the response body. + * To access the full response (for headers, for example), `registerListener$Response()` instead. + * + * This method sends `application/json;charset=utf-8` and handles request body of type `application/json;charset=utf-8`. + */ + registerListener(params: RegisterListener$Params, context?: HttpContext): Observable { + return this.registerListener$Response(params, context).pipe( + map((r: StrictHttpResponse): void => r.body) + ); + } + + /** Path part for operation `unregisterListener()` */ + static readonly UnregisterListenerPath = '/productOrderingManagement/v4/hub/{id}'; + + /** + * 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. + * + * This method provides access to the full `HttpResponse`, allowing access to response headers. + * To access only the response body, use `unregisterListener()` instead. + * + * This method doesn't expect any request body. + */ + unregisterListener$Response(params: UnregisterListener$Params, context?: HttpContext): Observable> { + return unregisterListener(this.http, this.rootUrl, params, context); + } + + /** + * 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. + * + * This method provides access only to the response body. + * To access the full response (for headers, for example), `unregisterListener$Response()` instead. + * + * This method doesn't expect any request body. + */ + unregisterListener(params: UnregisterListener$Params, context?: HttpContext): Observable { + return this.unregisterListener$Response(params, context).pipe( + map((r: StrictHttpResponse): void => r.body) + ); + } + +} diff --git a/src/app/openApis/productOrderingManagement/services/listener.service.ts b/src/app/openApis/productOrderingManagement/services/listener.service.ts new file mode 100644 index 0000000000000000000000000000000000000000..8ee61f9e32bf8a88a924dc1f9d19c22a72bc91e9 --- /dev/null +++ b/src/app/openApis/productOrderingManagement/services/listener.service.ts @@ -0,0 +1,305 @@ +/* tslint:disable */ +/* eslint-disable */ +/* Code generated by ng-openapi-gen DO NOT EDIT. */ + +import { HttpClient, HttpContext } from '@angular/common/http'; +import { Injectable } from '@angular/core'; +import { Observable } from 'rxjs'; +import { map } from 'rxjs/operators'; + +import { BaseService } from '../base-service'; +import { ApiConfiguration } from '../api-configuration'; +import { StrictHttpResponse } from '../strict-http-response'; + +import { listenToCancelProductOrderCreateEvent } from '../fn/listener/listen-to-cancel-product-order-create-event'; +import { ListenToCancelProductOrderCreateEvent$Params } from '../fn/listener/listen-to-cancel-product-order-create-event'; +import { listenToCancelProductOrderInformationRequiredEvent } from '../fn/listener/listen-to-cancel-product-order-information-required-event'; +import { ListenToCancelProductOrderInformationRequiredEvent$Params } from '../fn/listener/listen-to-cancel-product-order-information-required-event'; +import { listenToCancelProductOrderStateChangeEvent } from '../fn/listener/listen-to-cancel-product-order-state-change-event'; +import { ListenToCancelProductOrderStateChangeEvent$Params } from '../fn/listener/listen-to-cancel-product-order-state-change-event'; +import { listenToProductOrderAttributeValueChangeEvent } from '../fn/listener/listen-to-product-order-attribute-value-change-event'; +import { ListenToProductOrderAttributeValueChangeEvent$Params } from '../fn/listener/listen-to-product-order-attribute-value-change-event'; +import { listenToProductOrderCreateEvent } from '../fn/listener/listen-to-product-order-create-event'; +import { ListenToProductOrderCreateEvent$Params } from '../fn/listener/listen-to-product-order-create-event'; +import { listenToProductOrderDeleteEvent } from '../fn/listener/listen-to-product-order-delete-event'; +import { ListenToProductOrderDeleteEvent$Params } from '../fn/listener/listen-to-product-order-delete-event'; +import { listenToProductOrderInformationRequiredEvent } from '../fn/listener/listen-to-product-order-information-required-event'; +import { ListenToProductOrderInformationRequiredEvent$Params } from '../fn/listener/listen-to-product-order-information-required-event'; +import { listenToProductOrderStateChangeEvent } from '../fn/listener/listen-to-product-order-state-change-event'; +import { ListenToProductOrderStateChangeEvent$Params } from '../fn/listener/listen-to-product-order-state-change-event'; + + +/** + * the listener API + */ +@Injectable({ providedIn: 'root' }) +export class ListenerService extends BaseService { + constructor(config: ApiConfiguration, http: HttpClient) { + super(config, http); + } + + /** Path part for operation `listenToProductOrderStateChangeEvent()` */ + static readonly ListenToProductOrderStateChangeEventPath = '/productOrderingManagement/v4/listener/productOrderStateChangeEvent'; + + /** + * Client listener for entity ProductOrderStateChangeEvent. + * + * Example of a client listener for receiving the notification ProductOrderStateChangeEvent + * + * This method provides access to the full `HttpResponse`, allowing access to response headers. + * To access only the response body, use `listenToProductOrderStateChangeEvent()` instead. + * + * This method sends `application/json;charset=utf-8` and handles request body of type `application/json;charset=utf-8`. + */ + listenToProductOrderStateChangeEvent$Response(params: ListenToProductOrderStateChangeEvent$Params, context?: HttpContext): Observable> { + return listenToProductOrderStateChangeEvent(this.http, this.rootUrl, params, context); + } + + /** + * Client listener for entity ProductOrderStateChangeEvent. + * + * Example of a client listener for receiving the notification ProductOrderStateChangeEvent + * + * This method provides access only to the response body. + * To access the full response (for headers, for example), `listenToProductOrderStateChangeEvent$Response()` instead. + * + * This method sends `application/json;charset=utf-8` and handles request body of type `application/json;charset=utf-8`. + */ + listenToProductOrderStateChangeEvent(params: ListenToProductOrderStateChangeEvent$Params, context?: HttpContext): Observable { + return this.listenToProductOrderStateChangeEvent$Response(params, context).pipe( + map((r: StrictHttpResponse): void => r.body) + ); + } + + /** Path part for operation `listenToProductOrderInformationRequiredEvent()` */ + static readonly ListenToProductOrderInformationRequiredEventPath = '/productOrderingManagement/v4/listener/productOrderInformationRequiredEvent'; + + /** + * Client listener for entity ProductOrderInformationRequiredEvent. + * + * Example of a client listener for receiving the notification ProductOrderInformationRequiredEvent + * + * This method provides access to the full `HttpResponse`, allowing access to response headers. + * To access only the response body, use `listenToProductOrderInformationRequiredEvent()` instead. + * + * This method sends `application/json;charset=utf-8` and handles request body of type `application/json;charset=utf-8`. + */ + listenToProductOrderInformationRequiredEvent$Response(params: ListenToProductOrderInformationRequiredEvent$Params, context?: HttpContext): Observable> { + return listenToProductOrderInformationRequiredEvent(this.http, this.rootUrl, params, context); + } + + /** + * Client listener for entity ProductOrderInformationRequiredEvent. + * + * Example of a client listener for receiving the notification ProductOrderInformationRequiredEvent + * + * This method provides access only to the response body. + * To access the full response (for headers, for example), `listenToProductOrderInformationRequiredEvent$Response()` instead. + * + * This method sends `application/json;charset=utf-8` and handles request body of type `application/json;charset=utf-8`. + */ + listenToProductOrderInformationRequiredEvent(params: ListenToProductOrderInformationRequiredEvent$Params, context?: HttpContext): Observable { + return this.listenToProductOrderInformationRequiredEvent$Response(params, context).pipe( + map((r: StrictHttpResponse): void => r.body) + ); + } + + /** Path part for operation `listenToProductOrderDeleteEvent()` */ + static readonly ListenToProductOrderDeleteEventPath = '/productOrderingManagement/v4/listener/productOrderDeleteEvent'; + + /** + * Client listener for entity ProductOrderDeleteEvent. + * + * Example of a client listener for receiving the notification ProductOrderDeleteEvent + * + * This method provides access to the full `HttpResponse`, allowing access to response headers. + * To access only the response body, use `listenToProductOrderDeleteEvent()` instead. + * + * This method sends `application/json;charset=utf-8` and handles request body of type `application/json;charset=utf-8`. + */ + listenToProductOrderDeleteEvent$Response(params: ListenToProductOrderDeleteEvent$Params, context?: HttpContext): Observable> { + return listenToProductOrderDeleteEvent(this.http, this.rootUrl, params, context); + } + + /** + * Client listener for entity ProductOrderDeleteEvent. + * + * Example of a client listener for receiving the notification ProductOrderDeleteEvent + * + * This method provides access only to the response body. + * To access the full response (for headers, for example), `listenToProductOrderDeleteEvent$Response()` instead. + * + * This method sends `application/json;charset=utf-8` and handles request body of type `application/json;charset=utf-8`. + */ + listenToProductOrderDeleteEvent(params: ListenToProductOrderDeleteEvent$Params, context?: HttpContext): Observable { + return this.listenToProductOrderDeleteEvent$Response(params, context).pipe( + map((r: StrictHttpResponse): void => r.body) + ); + } + + /** Path part for operation `listenToProductOrderCreateEvent()` */ + static readonly ListenToProductOrderCreateEventPath = '/productOrderingManagement/v4/listener/productOrderCreateEvent'; + + /** + * Client listener for entity ProductOrderCreateEvent. + * + * Example of a client listener for receiving the notification ProductOrderCreateEvent + * + * This method provides access to the full `HttpResponse`, allowing access to response headers. + * To access only the response body, use `listenToProductOrderCreateEvent()` instead. + * + * This method sends `application/json;charset=utf-8` and handles request body of type `application/json;charset=utf-8`. + */ + listenToProductOrderCreateEvent$Response(params: ListenToProductOrderCreateEvent$Params, context?: HttpContext): Observable> { + return listenToProductOrderCreateEvent(this.http, this.rootUrl, params, context); + } + + /** + * Client listener for entity ProductOrderCreateEvent. + * + * Example of a client listener for receiving the notification ProductOrderCreateEvent + * + * This method provides access only to the response body. + * To access the full response (for headers, for example), `listenToProductOrderCreateEvent$Response()` instead. + * + * This method sends `application/json;charset=utf-8` and handles request body of type `application/json;charset=utf-8`. + */ + listenToProductOrderCreateEvent(params: ListenToProductOrderCreateEvent$Params, context?: HttpContext): Observable { + return this.listenToProductOrderCreateEvent$Response(params, context).pipe( + map((r: StrictHttpResponse): void => r.body) + ); + } + + /** Path part for operation `listenToProductOrderAttributeValueChangeEvent()` */ + static readonly ListenToProductOrderAttributeValueChangeEventPath = '/productOrderingManagement/v4/listener/productOrderAttributeValueChangeEvent'; + + /** + * Client listener for entity ProductOrderAttributeValueChangeEvent. + * + * Example of a client listener for receiving the notification ProductOrderAttributeValueChangeEvent + * + * This method provides access to the full `HttpResponse`, allowing access to response headers. + * To access only the response body, use `listenToProductOrderAttributeValueChangeEvent()` instead. + * + * This method sends `application/json;charset=utf-8` and handles request body of type `application/json;charset=utf-8`. + */ + listenToProductOrderAttributeValueChangeEvent$Response(params: ListenToProductOrderAttributeValueChangeEvent$Params, context?: HttpContext): Observable> { + return listenToProductOrderAttributeValueChangeEvent(this.http, this.rootUrl, params, context); + } + + /** + * Client listener for entity ProductOrderAttributeValueChangeEvent. + * + * Example of a client listener for receiving the notification ProductOrderAttributeValueChangeEvent + * + * This method provides access only to the response body. + * To access the full response (for headers, for example), `listenToProductOrderAttributeValueChangeEvent$Response()` instead. + * + * This method sends `application/json;charset=utf-8` and handles request body of type `application/json;charset=utf-8`. + */ + listenToProductOrderAttributeValueChangeEvent(params: ListenToProductOrderAttributeValueChangeEvent$Params, context?: HttpContext): Observable { + return this.listenToProductOrderAttributeValueChangeEvent$Response(params, context).pipe( + map((r: StrictHttpResponse): void => r.body) + ); + } + + /** Path part for operation `listenToCancelProductOrderStateChangeEvent()` */ + static readonly ListenToCancelProductOrderStateChangeEventPath = '/productOrderingManagement/v4/listener/cancelProductOrderStateChangeEvent'; + + /** + * Client listener for entity CancelProductOrderStateChangeEvent. + * + * Example of a client listener for receiving the notification CancelProductOrderStateChangeEvent + * + * This method provides access to the full `HttpResponse`, allowing access to response headers. + * To access only the response body, use `listenToCancelProductOrderStateChangeEvent()` instead. + * + * This method sends `application/json;charset=utf-8` and handles request body of type `application/json;charset=utf-8`. + */ + listenToCancelProductOrderStateChangeEvent$Response(params: ListenToCancelProductOrderStateChangeEvent$Params, context?: HttpContext): Observable> { + return listenToCancelProductOrderStateChangeEvent(this.http, this.rootUrl, params, context); + } + + /** + * Client listener for entity CancelProductOrderStateChangeEvent. + * + * Example of a client listener for receiving the notification CancelProductOrderStateChangeEvent + * + * This method provides access only to the response body. + * To access the full response (for headers, for example), `listenToCancelProductOrderStateChangeEvent$Response()` instead. + * + * This method sends `application/json;charset=utf-8` and handles request body of type `application/json;charset=utf-8`. + */ + listenToCancelProductOrderStateChangeEvent(params: ListenToCancelProductOrderStateChangeEvent$Params, context?: HttpContext): Observable { + return this.listenToCancelProductOrderStateChangeEvent$Response(params, context).pipe( + map((r: StrictHttpResponse): void => r.body) + ); + } + + /** Path part for operation `listenToCancelProductOrderInformationRequiredEvent()` */ + static readonly ListenToCancelProductOrderInformationRequiredEventPath = '/productOrderingManagement/v4/listener/cancelProductOrderInformationRequiredEvent'; + + /** + * Client listener for entity CancelProductOrderInformationRequiredEvent. + * + * Example of a client listener for receiving the notification CancelProductOrderInformationRequiredEvent + * + * This method provides access to the full `HttpResponse`, allowing access to response headers. + * To access only the response body, use `listenToCancelProductOrderInformationRequiredEvent()` instead. + * + * This method sends `application/json;charset=utf-8` and handles request body of type `application/json;charset=utf-8`. + */ + listenToCancelProductOrderInformationRequiredEvent$Response(params: ListenToCancelProductOrderInformationRequiredEvent$Params, context?: HttpContext): Observable> { + return listenToCancelProductOrderInformationRequiredEvent(this.http, this.rootUrl, params, context); + } + + /** + * Client listener for entity CancelProductOrderInformationRequiredEvent. + * + * Example of a client listener for receiving the notification CancelProductOrderInformationRequiredEvent + * + * This method provides access only to the response body. + * To access the full response (for headers, for example), `listenToCancelProductOrderInformationRequiredEvent$Response()` instead. + * + * This method sends `application/json;charset=utf-8` and handles request body of type `application/json;charset=utf-8`. + */ + listenToCancelProductOrderInformationRequiredEvent(params: ListenToCancelProductOrderInformationRequiredEvent$Params, context?: HttpContext): Observable { + return this.listenToCancelProductOrderInformationRequiredEvent$Response(params, context).pipe( + map((r: StrictHttpResponse): void => r.body) + ); + } + + /** Path part for operation `listenToCancelProductOrderCreateEvent()` */ + static readonly ListenToCancelProductOrderCreateEventPath = '/productOrderingManagement/v4/listener/cancelProductOrderCreateEvent'; + + /** + * Client listener for entity CancelProductOrderCreateEvent. + * + * Example of a client listener for receiving the notification CancelProductOrderCreateEvent + * + * This method provides access to the full `HttpResponse`, allowing access to response headers. + * To access only the response body, use `listenToCancelProductOrderCreateEvent()` instead. + * + * This method sends `application/json;charset=utf-8` and handles request body of type `application/json;charset=utf-8`. + */ + listenToCancelProductOrderCreateEvent$Response(params: ListenToCancelProductOrderCreateEvent$Params, context?: HttpContext): Observable> { + return listenToCancelProductOrderCreateEvent(this.http, this.rootUrl, params, context); + } + + /** + * Client listener for entity CancelProductOrderCreateEvent. + * + * Example of a client listener for receiving the notification CancelProductOrderCreateEvent + * + * This method provides access only to the response body. + * To access the full response (for headers, for example), `listenToCancelProductOrderCreateEvent$Response()` instead. + * + * This method sends `application/json;charset=utf-8` and handles request body of type `application/json;charset=utf-8`. + */ + listenToCancelProductOrderCreateEvent(params: ListenToCancelProductOrderCreateEvent$Params, context?: HttpContext): Observable { + return this.listenToCancelProductOrderCreateEvent$Response(params, context).pipe( + map((r: StrictHttpResponse): void => r.body) + ); + } + +} diff --git a/src/app/openApis/productOrderingManagement/services/notification-listeners-client-side.service.ts b/src/app/openApis/productOrderingManagement/services/notification-listeners-client-side.service.ts new file mode 100644 index 0000000000000000000000000000000000000000..2756433a62cc72da7e178bacf4d95c7689f4d7d1 --- /dev/null +++ b/src/app/openApis/productOrderingManagement/services/notification-listeners-client-side.service.ts @@ -0,0 +1,301 @@ +/* tslint:disable */ +/* eslint-disable */ +/* Code generated by ng-openapi-gen DO NOT EDIT. */ + +import { HttpClient, HttpContext } from '@angular/common/http'; +import { Injectable } from '@angular/core'; +import { Observable } from 'rxjs'; +import { map } from 'rxjs/operators'; + +import { BaseService } from '../base-service'; +import { ApiConfiguration } from '../api-configuration'; +import { StrictHttpResponse } from '../strict-http-response'; + +import { listenToCancelProductOrderCreateEvent } from '../fn/listener/listen-to-cancel-product-order-create-event'; +import { ListenToCancelProductOrderCreateEvent$Params } from '../fn/listener/listen-to-cancel-product-order-create-event'; +import { listenToCancelProductOrderInformationRequiredEvent } from '../fn/listener/listen-to-cancel-product-order-information-required-event'; +import { ListenToCancelProductOrderInformationRequiredEvent$Params } from '../fn/listener/listen-to-cancel-product-order-information-required-event'; +import { listenToCancelProductOrderStateChangeEvent } from '../fn/listener/listen-to-cancel-product-order-state-change-event'; +import { ListenToCancelProductOrderStateChangeEvent$Params } from '../fn/listener/listen-to-cancel-product-order-state-change-event'; +import { listenToProductOrderAttributeValueChangeEvent } from '../fn/listener/listen-to-product-order-attribute-value-change-event'; +import { ListenToProductOrderAttributeValueChangeEvent$Params } from '../fn/listener/listen-to-product-order-attribute-value-change-event'; +import { listenToProductOrderCreateEvent } from '../fn/listener/listen-to-product-order-create-event'; +import { ListenToProductOrderCreateEvent$Params } from '../fn/listener/listen-to-product-order-create-event'; +import { listenToProductOrderDeleteEvent } from '../fn/listener/listen-to-product-order-delete-event'; +import { ListenToProductOrderDeleteEvent$Params } from '../fn/listener/listen-to-product-order-delete-event'; +import { listenToProductOrderInformationRequiredEvent } from '../fn/listener/listen-to-product-order-information-required-event'; +import { ListenToProductOrderInformationRequiredEvent$Params } from '../fn/listener/listen-to-product-order-information-required-event'; +import { listenToProductOrderStateChangeEvent } from '../fn/listener/listen-to-product-order-state-change-event'; +import { ListenToProductOrderStateChangeEvent$Params } from '../fn/listener/listen-to-product-order-state-change-event'; + +@Injectable({ providedIn: 'root' }) +export class NotificationListenersClientSideService extends BaseService { + constructor(config: ApiConfiguration, http: HttpClient) { + super(config, http); + } + + /** Path part for operation `listenToProductOrderStateChangeEvent()` */ + static readonly ListenToProductOrderStateChangeEventPath = '/productOrderingManagement/v4/listener/productOrderStateChangeEvent'; + + /** + * Client listener for entity ProductOrderStateChangeEvent. + * + * Example of a client listener for receiving the notification ProductOrderStateChangeEvent + * + * This method provides access to the full `HttpResponse`, allowing access to response headers. + * To access only the response body, use `listenToProductOrderStateChangeEvent()` instead. + * + * This method sends `application/json;charset=utf-8` and handles request body of type `application/json;charset=utf-8`. + */ + listenToProductOrderStateChangeEvent$Response(params: ListenToProductOrderStateChangeEvent$Params, context?: HttpContext): Observable> { + return listenToProductOrderStateChangeEvent(this.http, this.rootUrl, params, context); + } + + /** + * Client listener for entity ProductOrderStateChangeEvent. + * + * Example of a client listener for receiving the notification ProductOrderStateChangeEvent + * + * This method provides access only to the response body. + * To access the full response (for headers, for example), `listenToProductOrderStateChangeEvent$Response()` instead. + * + * This method sends `application/json;charset=utf-8` and handles request body of type `application/json;charset=utf-8`. + */ + listenToProductOrderStateChangeEvent(params: ListenToProductOrderStateChangeEvent$Params, context?: HttpContext): Observable { + return this.listenToProductOrderStateChangeEvent$Response(params, context).pipe( + map((r: StrictHttpResponse): void => r.body) + ); + } + + /** Path part for operation `listenToProductOrderInformationRequiredEvent()` */ + static readonly ListenToProductOrderInformationRequiredEventPath = '/productOrderingManagement/v4/listener/productOrderInformationRequiredEvent'; + + /** + * Client listener for entity ProductOrderInformationRequiredEvent. + * + * Example of a client listener for receiving the notification ProductOrderInformationRequiredEvent + * + * This method provides access to the full `HttpResponse`, allowing access to response headers. + * To access only the response body, use `listenToProductOrderInformationRequiredEvent()` instead. + * + * This method sends `application/json;charset=utf-8` and handles request body of type `application/json;charset=utf-8`. + */ + listenToProductOrderInformationRequiredEvent$Response(params: ListenToProductOrderInformationRequiredEvent$Params, context?: HttpContext): Observable> { + return listenToProductOrderInformationRequiredEvent(this.http, this.rootUrl, params, context); + } + + /** + * Client listener for entity ProductOrderInformationRequiredEvent. + * + * Example of a client listener for receiving the notification ProductOrderInformationRequiredEvent + * + * This method provides access only to the response body. + * To access the full response (for headers, for example), `listenToProductOrderInformationRequiredEvent$Response()` instead. + * + * This method sends `application/json;charset=utf-8` and handles request body of type `application/json;charset=utf-8`. + */ + listenToProductOrderInformationRequiredEvent(params: ListenToProductOrderInformationRequiredEvent$Params, context?: HttpContext): Observable { + return this.listenToProductOrderInformationRequiredEvent$Response(params, context).pipe( + map((r: StrictHttpResponse): void => r.body) + ); + } + + /** Path part for operation `listenToProductOrderDeleteEvent()` */ + static readonly ListenToProductOrderDeleteEventPath = '/productOrderingManagement/v4/listener/productOrderDeleteEvent'; + + /** + * Client listener for entity ProductOrderDeleteEvent. + * + * Example of a client listener for receiving the notification ProductOrderDeleteEvent + * + * This method provides access to the full `HttpResponse`, allowing access to response headers. + * To access only the response body, use `listenToProductOrderDeleteEvent()` instead. + * + * This method sends `application/json;charset=utf-8` and handles request body of type `application/json;charset=utf-8`. + */ + listenToProductOrderDeleteEvent$Response(params: ListenToProductOrderDeleteEvent$Params, context?: HttpContext): Observable> { + return listenToProductOrderDeleteEvent(this.http, this.rootUrl, params, context); + } + + /** + * Client listener for entity ProductOrderDeleteEvent. + * + * Example of a client listener for receiving the notification ProductOrderDeleteEvent + * + * This method provides access only to the response body. + * To access the full response (for headers, for example), `listenToProductOrderDeleteEvent$Response()` instead. + * + * This method sends `application/json;charset=utf-8` and handles request body of type `application/json;charset=utf-8`. + */ + listenToProductOrderDeleteEvent(params: ListenToProductOrderDeleteEvent$Params, context?: HttpContext): Observable { + return this.listenToProductOrderDeleteEvent$Response(params, context).pipe( + map((r: StrictHttpResponse): void => r.body) + ); + } + + /** Path part for operation `listenToProductOrderCreateEvent()` */ + static readonly ListenToProductOrderCreateEventPath = '/productOrderingManagement/v4/listener/productOrderCreateEvent'; + + /** + * Client listener for entity ProductOrderCreateEvent. + * + * Example of a client listener for receiving the notification ProductOrderCreateEvent + * + * This method provides access to the full `HttpResponse`, allowing access to response headers. + * To access only the response body, use `listenToProductOrderCreateEvent()` instead. + * + * This method sends `application/json;charset=utf-8` and handles request body of type `application/json;charset=utf-8`. + */ + listenToProductOrderCreateEvent$Response(params: ListenToProductOrderCreateEvent$Params, context?: HttpContext): Observable> { + return listenToProductOrderCreateEvent(this.http, this.rootUrl, params, context); + } + + /** + * Client listener for entity ProductOrderCreateEvent. + * + * Example of a client listener for receiving the notification ProductOrderCreateEvent + * + * This method provides access only to the response body. + * To access the full response (for headers, for example), `listenToProductOrderCreateEvent$Response()` instead. + * + * This method sends `application/json;charset=utf-8` and handles request body of type `application/json;charset=utf-8`. + */ + listenToProductOrderCreateEvent(params: ListenToProductOrderCreateEvent$Params, context?: HttpContext): Observable { + return this.listenToProductOrderCreateEvent$Response(params, context).pipe( + map((r: StrictHttpResponse): void => r.body) + ); + } + + /** Path part for operation `listenToProductOrderAttributeValueChangeEvent()` */ + static readonly ListenToProductOrderAttributeValueChangeEventPath = '/productOrderingManagement/v4/listener/productOrderAttributeValueChangeEvent'; + + /** + * Client listener for entity ProductOrderAttributeValueChangeEvent. + * + * Example of a client listener for receiving the notification ProductOrderAttributeValueChangeEvent + * + * This method provides access to the full `HttpResponse`, allowing access to response headers. + * To access only the response body, use `listenToProductOrderAttributeValueChangeEvent()` instead. + * + * This method sends `application/json;charset=utf-8` and handles request body of type `application/json;charset=utf-8`. + */ + listenToProductOrderAttributeValueChangeEvent$Response(params: ListenToProductOrderAttributeValueChangeEvent$Params, context?: HttpContext): Observable> { + return listenToProductOrderAttributeValueChangeEvent(this.http, this.rootUrl, params, context); + } + + /** + * Client listener for entity ProductOrderAttributeValueChangeEvent. + * + * Example of a client listener for receiving the notification ProductOrderAttributeValueChangeEvent + * + * This method provides access only to the response body. + * To access the full response (for headers, for example), `listenToProductOrderAttributeValueChangeEvent$Response()` instead. + * + * This method sends `application/json;charset=utf-8` and handles request body of type `application/json;charset=utf-8`. + */ + listenToProductOrderAttributeValueChangeEvent(params: ListenToProductOrderAttributeValueChangeEvent$Params, context?: HttpContext): Observable { + return this.listenToProductOrderAttributeValueChangeEvent$Response(params, context).pipe( + map((r: StrictHttpResponse): void => r.body) + ); + } + + /** Path part for operation `listenToCancelProductOrderStateChangeEvent()` */ + static readonly ListenToCancelProductOrderStateChangeEventPath = '/productOrderingManagement/v4/listener/cancelProductOrderStateChangeEvent'; + + /** + * Client listener for entity CancelProductOrderStateChangeEvent. + * + * Example of a client listener for receiving the notification CancelProductOrderStateChangeEvent + * + * This method provides access to the full `HttpResponse`, allowing access to response headers. + * To access only the response body, use `listenToCancelProductOrderStateChangeEvent()` instead. + * + * This method sends `application/json;charset=utf-8` and handles request body of type `application/json;charset=utf-8`. + */ + listenToCancelProductOrderStateChangeEvent$Response(params: ListenToCancelProductOrderStateChangeEvent$Params, context?: HttpContext): Observable> { + return listenToCancelProductOrderStateChangeEvent(this.http, this.rootUrl, params, context); + } + + /** + * Client listener for entity CancelProductOrderStateChangeEvent. + * + * Example of a client listener for receiving the notification CancelProductOrderStateChangeEvent + * + * This method provides access only to the response body. + * To access the full response (for headers, for example), `listenToCancelProductOrderStateChangeEvent$Response()` instead. + * + * This method sends `application/json;charset=utf-8` and handles request body of type `application/json;charset=utf-8`. + */ + listenToCancelProductOrderStateChangeEvent(params: ListenToCancelProductOrderStateChangeEvent$Params, context?: HttpContext): Observable { + return this.listenToCancelProductOrderStateChangeEvent$Response(params, context).pipe( + map((r: StrictHttpResponse): void => r.body) + ); + } + + /** Path part for operation `listenToCancelProductOrderInformationRequiredEvent()` */ + static readonly ListenToCancelProductOrderInformationRequiredEventPath = '/productOrderingManagement/v4/listener/cancelProductOrderInformationRequiredEvent'; + + /** + * Client listener for entity CancelProductOrderInformationRequiredEvent. + * + * Example of a client listener for receiving the notification CancelProductOrderInformationRequiredEvent + * + * This method provides access to the full `HttpResponse`, allowing access to response headers. + * To access only the response body, use `listenToCancelProductOrderInformationRequiredEvent()` instead. + * + * This method sends `application/json;charset=utf-8` and handles request body of type `application/json;charset=utf-8`. + */ + listenToCancelProductOrderInformationRequiredEvent$Response(params: ListenToCancelProductOrderInformationRequiredEvent$Params, context?: HttpContext): Observable> { + return listenToCancelProductOrderInformationRequiredEvent(this.http, this.rootUrl, params, context); + } + + /** + * Client listener for entity CancelProductOrderInformationRequiredEvent. + * + * Example of a client listener for receiving the notification CancelProductOrderInformationRequiredEvent + * + * This method provides access only to the response body. + * To access the full response (for headers, for example), `listenToCancelProductOrderInformationRequiredEvent$Response()` instead. + * + * This method sends `application/json;charset=utf-8` and handles request body of type `application/json;charset=utf-8`. + */ + listenToCancelProductOrderInformationRequiredEvent(params: ListenToCancelProductOrderInformationRequiredEvent$Params, context?: HttpContext): Observable { + return this.listenToCancelProductOrderInformationRequiredEvent$Response(params, context).pipe( + map((r: StrictHttpResponse): void => r.body) + ); + } + + /** Path part for operation `listenToCancelProductOrderCreateEvent()` */ + static readonly ListenToCancelProductOrderCreateEventPath = '/productOrderingManagement/v4/listener/cancelProductOrderCreateEvent'; + + /** + * Client listener for entity CancelProductOrderCreateEvent. + * + * Example of a client listener for receiving the notification CancelProductOrderCreateEvent + * + * This method provides access to the full `HttpResponse`, allowing access to response headers. + * To access only the response body, use `listenToCancelProductOrderCreateEvent()` instead. + * + * This method sends `application/json;charset=utf-8` and handles request body of type `application/json;charset=utf-8`. + */ + listenToCancelProductOrderCreateEvent$Response(params: ListenToCancelProductOrderCreateEvent$Params, context?: HttpContext): Observable> { + return listenToCancelProductOrderCreateEvent(this.http, this.rootUrl, params, context); + } + + /** + * Client listener for entity CancelProductOrderCreateEvent. + * + * Example of a client listener for receiving the notification CancelProductOrderCreateEvent + * + * This method provides access only to the response body. + * To access the full response (for headers, for example), `listenToCancelProductOrderCreateEvent$Response()` instead. + * + * This method sends `application/json;charset=utf-8` and handles request body of type `application/json;charset=utf-8`. + */ + listenToCancelProductOrderCreateEvent(params: ListenToCancelProductOrderCreateEvent$Params, context?: HttpContext): Observable { + return this.listenToCancelProductOrderCreateEvent$Response(params, context).pipe( + map((r: StrictHttpResponse): void => r.body) + ); + } + +} diff --git a/src/app/openApis/productOrderingManagement/services/product-order.service.ts b/src/app/openApis/productOrderingManagement/services/product-order.service.ts new file mode 100644 index 0000000000000000000000000000000000000000..975f6d22bf59ec99552ff5e8002e844987f42230 --- /dev/null +++ b/src/app/openApis/productOrderingManagement/services/product-order.service.ts @@ -0,0 +1,271 @@ +/* tslint:disable */ +/* eslint-disable */ +/* Code generated by ng-openapi-gen DO NOT EDIT. */ + +import { HttpClient, HttpContext } from '@angular/common/http'; +import { Injectable } from '@angular/core'; +import { Observable } from 'rxjs'; +import { map } from 'rxjs/operators'; + +import { BaseService } from '../base-service'; +import { ApiConfiguration } from '../api-configuration'; +import { StrictHttpResponse } from '../strict-http-response'; + +import { createProductOrder } from '../fn/product-order/create-product-order'; +import { CreateProductOrder$Params } from '../fn/product-order/create-product-order'; +import { deleteProductOrder } from '../fn/product-order/delete-product-order'; +import { DeleteProductOrder$Params } from '../fn/product-order/delete-product-order'; +import { getImageProductOrderItemRelationshipGraph } from '../fn/product-order/get-image-product-order-item-relationship-graph'; +import { GetImageProductOrderItemRelationshipGraph$Params } from '../fn/product-order/get-image-product-order-item-relationship-graph'; +import { getImageProductOrderNotesGraph } from '../fn/product-order/get-image-product-order-notes-graph'; +import { GetImageProductOrderNotesGraph$Params } from '../fn/product-order/get-image-product-order-notes-graph'; +import { listProductOrder } from '../fn/product-order/list-product-order'; +import { ListProductOrder$Params } from '../fn/product-order/list-product-order'; +import { patchProductOrder } from '../fn/product-order/patch-product-order'; +import { PatchProductOrder$Params } from '../fn/product-order/patch-product-order'; +import { ProductOrder } from '../models/product-order'; +import { retrieveProductOrder } from '../fn/product-order/retrieve-product-order'; +import { RetrieveProductOrder$Params } from '../fn/product-order/retrieve-product-order'; + + +/** + * the productOrder API + */ +@Injectable({ providedIn: 'root' }) +export class ProductOrderService extends BaseService { + constructor(config: ApiConfiguration, http: HttpClient) { + super(config, http); + } + + /** Path part for operation `listProductOrder()` */ + static readonly ListProductOrderPath = '/productOrderingManagement/v4/productOrder'; + + /** + * List or find ProductOrder objects. + * + * This operation list or find ProductOrder entities + * + * This method provides access to the full `HttpResponse`, allowing access to response headers. + * To access only the response body, use `listProductOrder()` instead. + * + * This method doesn't expect any request body. + */ + listProductOrder$Response(params?: ListProductOrder$Params, context?: HttpContext): Observable>> { + return listProductOrder(this.http, this.rootUrl, params, context); + } + + /** + * List or find ProductOrder objects. + * + * This operation list or find ProductOrder entities + * + * This method provides access only to the response body. + * To access the full response (for headers, for example), `listProductOrder$Response()` instead. + * + * This method doesn't expect any request body. + */ + listProductOrder(params?: ListProductOrder$Params, context?: HttpContext): Observable> { + return this.listProductOrder$Response(params, context).pipe( + map((r: StrictHttpResponse>): Array => r.body) + ); + } + + /** Path part for operation `createProductOrder()` */ + static readonly CreateProductOrderPath = '/productOrderingManagement/v4/productOrder'; + + /** + * Creates a ProductOrder. + * + * This operation creates a ProductOrder entity. + * + * This method provides access to the full `HttpResponse`, allowing access to response headers. + * To access only the response body, use `createProductOrder()` instead. + * + * This method sends `application/json;charset=utf-8` and handles request body of type `application/json;charset=utf-8`. + */ + createProductOrder$Response(params: CreateProductOrder$Params, context?: HttpContext): Observable> { + return createProductOrder(this.http, this.rootUrl, params, context); + } + + /** + * Creates a ProductOrder. + * + * This operation creates a ProductOrder entity. + * + * This method provides access only to the response body. + * To access the full response (for headers, for example), `createProductOrder$Response()` instead. + * + * This method sends `application/json;charset=utf-8` and handles request body of type `application/json;charset=utf-8`. + */ + createProductOrder(params: CreateProductOrder$Params, context?: HttpContext): Observable { + return this.createProductOrder$Response(params, context).pipe( + map((r: StrictHttpResponse): ProductOrder => r.body) + ); + } + + /** Path part for operation `retrieveProductOrder()` */ + static readonly RetrieveProductOrderPath = '/productOrderingManagement/v4/productOrder/{id}'; + + /** + * Retrieves a ProductOrder by ID. + * + * This operation retrieves a ProductOrder entity. Attribute selection is enabled for all first level attributes. + * + * This method provides access to the full `HttpResponse`, allowing access to response headers. + * To access only the response body, use `retrieveProductOrder()` instead. + * + * This method doesn't expect any request body. + */ + retrieveProductOrder$Response(params: RetrieveProductOrder$Params, context?: HttpContext): Observable> { + return retrieveProductOrder(this.http, this.rootUrl, params, context); + } + + /** + * Retrieves a ProductOrder by ID. + * + * This operation retrieves a ProductOrder entity. Attribute selection is enabled for all first level attributes. + * + * This method provides access only to the response body. + * To access the full response (for headers, for example), `retrieveProductOrder$Response()` instead. + * + * This method doesn't expect any request body. + */ + retrieveProductOrder(params: RetrieveProductOrder$Params, context?: HttpContext): Observable { + return this.retrieveProductOrder$Response(params, context).pipe( + map((r: StrictHttpResponse): ProductOrder => r.body) + ); + } + + /** Path part for operation `deleteProductOrder()` */ + static readonly DeleteProductOrderPath = '/productOrderingManagement/v4/productOrder/{id}'; + + /** + * Deletes a ProductOrder. + * + * This operation deletes a ProductOrder entity. + * + * This method provides access to the full `HttpResponse`, allowing access to response headers. + * To access only the response body, use `deleteProductOrder()` instead. + * + * This method doesn't expect any request body. + */ + deleteProductOrder$Response(params: DeleteProductOrder$Params, context?: HttpContext): Observable> { + return deleteProductOrder(this.http, this.rootUrl, params, context); + } + + /** + * Deletes a ProductOrder. + * + * This operation deletes a ProductOrder entity. + * + * This method provides access only to the response body. + * To access the full response (for headers, for example), `deleteProductOrder$Response()` instead. + * + * This method doesn't expect any request body. + */ + deleteProductOrder(params: DeleteProductOrder$Params, context?: HttpContext): Observable { + return this.deleteProductOrder$Response(params, context).pipe( + map((r: StrictHttpResponse): void => r.body) + ); + } + + /** Path part for operation `patchProductOrder()` */ + static readonly PatchProductOrderPath = '/productOrderingManagement/v4/productOrder/{id}'; + + /** + * Updates partially a ProductOrder. + * + * This operation updates partially a ProductOrder entity. + * + * This method provides access to the full `HttpResponse`, allowing access to response headers. + * To access only the response body, use `patchProductOrder()` instead. + * + * This method sends `application/json;charset=utf-8` and handles request body of type `application/json;charset=utf-8`. + */ + patchProductOrder$Response(params: PatchProductOrder$Params, context?: HttpContext): Observable> { + return patchProductOrder(this.http, this.rootUrl, params, context); + } + + /** + * Updates partially a ProductOrder. + * + * This operation updates partially a ProductOrder entity. + * + * This method provides access only to the response body. + * To access the full response (for headers, for example), `patchProductOrder$Response()` instead. + * + * This method sends `application/json;charset=utf-8` and handles request body of type `application/json;charset=utf-8`. + */ + patchProductOrder(params: PatchProductOrder$Params, context?: HttpContext): Observable { + return this.patchProductOrder$Response(params, context).pipe( + map((r: StrictHttpResponse): ProductOrder => r.body) + ); + } + + /** Path part for operation `getImageProductOrderNotesGraph()` */ + static readonly GetImageProductOrderNotesGraphPath = '/productOrderingManagement/v4/productOrder/{id}/notes_graph'; + + /** + * Get a SVG image with Product order notes activity graph. + * + * This operation returns a SVG image with Product order notes activity graph + * + * This method provides access to the full `HttpResponse`, allowing access to response headers. + * To access only the response body, use `getImageProductOrderNotesGraph()` instead. + * + * This method doesn't expect any request body. + */ + getImageProductOrderNotesGraph$Response(params: GetImageProductOrderNotesGraph$Params, context?: HttpContext): Observable> { + return getImageProductOrderNotesGraph(this.http, this.rootUrl, params, context); + } + + /** + * Get a SVG image with Product order notes activity graph. + * + * This operation returns a SVG image with Product order notes activity graph + * + * This method provides access only to the response body. + * To access the full response (for headers, for example), `getImageProductOrderNotesGraph$Response()` instead. + * + * This method doesn't expect any request body. + */ + getImageProductOrderNotesGraph(params: GetImageProductOrderNotesGraph$Params, context?: HttpContext): Observable { + return this.getImageProductOrderNotesGraph$Response(params, context).pipe( + map((r: StrictHttpResponse): void => r.body) + ); + } + + /** Path part for operation `getImageProductOrderItemRelationshipGraph()` */ + static readonly GetImageProductOrderItemRelationshipGraphPath = '/productOrderingManagement/v4/productOrder/{id}/item/{itemid}/relationship_graph'; + + /** + * Get a SVG image with product order item services relationship graph. + * + * This operation returns a SVG image with Product order item services relationship graph + * + * This method provides access to the full `HttpResponse`, allowing access to response headers. + * To access only the response body, use `getImageProductOrderItemRelationshipGraph()` instead. + * + * This method doesn't expect any request body. + */ + getImageProductOrderItemRelationshipGraph$Response(params: GetImageProductOrderItemRelationshipGraph$Params, context?: HttpContext): Observable> { + return getImageProductOrderItemRelationshipGraph(this.http, this.rootUrl, params, context); + } + + /** + * Get a SVG image with product order item services relationship graph. + * + * This operation returns a SVG image with Product order item services relationship graph + * + * This method provides access only to the response body. + * To access the full response (for headers, for example), `getImageProductOrderItemRelationshipGraph$Response()` instead. + * + * This method doesn't expect any request body. + */ + getImageProductOrderItemRelationshipGraph(params: GetImageProductOrderItemRelationshipGraph$Params, context?: HttpContext): Observable { + return this.getImageProductOrderItemRelationshipGraph$Response(params, context).pipe( + map((r: StrictHttpResponse): void => r.body) + ); + } + +} diff --git a/src/app/openApis/productOrderingManagement/strict-http-response.ts b/src/app/openApis/productOrderingManagement/strict-http-response.ts new file mode 100644 index 0000000000000000000000000000000000000000..b3fa5fbcb411746975aeb7202828f5175cc88a85 --- /dev/null +++ b/src/app/openApis/productOrderingManagement/strict-http-response.ts @@ -0,0 +1,12 @@ +/* tslint:disable */ +/* eslint-disable */ +/* Code generated by ng-openapi-gen DO NOT EDIT. */ + +import { HttpResponse } from '@angular/common/http'; + +/** + * Constrains the http response to not have the body defined as `T | null`, but `T` only. + */ +export type StrictHttpResponse = HttpResponse & { + readonly body: T; +} diff --git a/src/app/p_product/admin/productCatalogManagement/edit-product-offerings/edit-product-offerings.component.html b/src/app/p_product/admin/productCatalogManagement/edit-product-offerings/edit-product-offerings.component.html index f431895c68cd1de92d119f25c658c672c5ece328..41d5ae7d7c30643387f4913db1be14f3ca4bb9d3 100644 --- a/src/app/p_product/admin/productCatalogManagement/edit-product-offerings/edit-product-offerings.component.html +++ b/src/app/p_product/admin/productCatalogManagement/edit-product-offerings/edit-product-offerings.component.html @@ -224,7 +224,7 @@ (change)="onValueToggle(char, val, $event)"> - + {{val.value.alias}}: {{val.value.value}} - ({{val.unitOfMeasure}}) diff --git a/src/app/p_product/admin/productOrderManagement/delete-product-order/delete-product-order.component.html b/src/app/p_product/admin/productOrderManagement/delete-product-order/delete-product-order.component.html new file mode 100644 index 0000000000000000000000000000000000000000..90a3fa6551a77e6637c551e0d3c9612361277d9c --- /dev/null +++ b/src/app/p_product/admin/productOrderManagement/delete-product-order/delete-product-order.component.html @@ -0,0 +1,14 @@ +

+ + Confirm deletion +

+
+ Are you sure you want to permanently delete order with id + {{data.id}} ? +
+ +
+ + +
+ \ No newline at end of file diff --git a/src/app/p_product/admin/productOrderManagement/delete-product-order/delete-product-order.component.scss b/src/app/p_product/admin/productOrderManagement/delete-product-order/delete-product-order.component.scss new file mode 100644 index 0000000000000000000000000000000000000000..e69de29bb2d1d6434b8b29ae775ad8c2e48c5391 diff --git a/src/app/p_product/admin/productOrderManagement/delete-product-order/delete-product-order.component.ts b/src/app/p_product/admin/productOrderManagement/delete-product-order/delete-product-order.component.ts new file mode 100644 index 0000000000000000000000000000000000000000..3a081c55b94201780de5db433e68d4453576a40f --- /dev/null +++ b/src/app/p_product/admin/productOrderManagement/delete-product-order/delete-product-order.component.ts @@ -0,0 +1,37 @@ +import { Component, OnInit, Inject } from '@angular/core'; +import { MAT_DIALOG_DATA, MatDialogRef } from '@angular/material/dialog'; +import { ProductOrder } from 'src/app/openApis/productOrderingManagement/models'; +import { DeleteProductSpecsComponent } from 'src/app/p_product/admin/productCatalogManagement/delete-product-specs/delete-product-specs.component'; +import { ProductOrderService } from 'src/app/openApis/productOrderingManagement/services'; + +@Component({ + selector: 'app-delete-product-order', + templateUrl: './delete-product-order.component.html', + styleUrls: ['./delete-product-order.component.scss'] +}) +export class DeleteProductOrderComponent implements OnInit { + + constructor( + @Inject(MAT_DIALOG_DATA) public data: ProductOrder, + private dialogRef: MatDialogRef, + private productOrderService: ProductOrderService + + ) { } + + ngOnInit() { + } + + confirmDelete() { + // this.dialogRef.close('deleted') + this.productOrderService.deleteProductOrder({ id: this.data.id }).subscribe( + data => {}, + error => {this.dialogRef.close(error); console.error(error)}, + () => this.dialogRef.close('deleted') + ) + } + + closeDialog() { + this.dialogRef.close() + } + +} diff --git a/src/app/p_product/admin/productOrderManagement/list-product-orders/list-product-orders.component.html b/src/app/p_product/admin/productOrderManagement/list-product-orders/list-product-orders.component.html new file mode 100644 index 0000000000000000000000000000000000000000..724dedd90b186ac4e47b7bbbe35261b283ba897c --- /dev/null +++ b/src/app/p_product/admin/productOrderManagement/list-product-orders/list-product-orders.component.html @@ -0,0 +1,130 @@ +
+
+ +
+
+
+
+

Product Orders

+

View and manage product orders

+
+ + +
+ +
+
+ + Filter Order User + + +
+ +
+ + Orders from (datetime) + + + date_range + + + + + Orders to (datetime) + + date_range + + + +
+ +
+
+ +
+ + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Order ID {{element.id}} + Placed By {{element.relatedParty[0].name}} ({{element.relatedParty[0].role}}) Order Date (Local Time) {{element.orderDate | date:'d MMM y, h:mm a'}} + State {{element.state}} + Actions + + + + +
+ + + +
+ +
+
+ +
+
+
+
+

Product Orders Calendar

+

View Product Orders

+
+ +
+ + + +
+
+ +
+ + +
+ + + + + + \ No newline at end of file diff --git a/src/app/p_product/admin/productOrderManagement/list-product-orders/list-product-orders.component.scss b/src/app/p_product/admin/productOrderManagement/list-product-orders/list-product-orders.component.scss new file mode 100644 index 0000000000000000000000000000000000000000..e69de29bb2d1d6434b8b29ae775ad8c2e48c5391 diff --git a/src/app/p_product/admin/productOrderManagement/list-product-orders/list-product-orders.component.ts b/src/app/p_product/admin/productOrderManagement/list-product-orders/list-product-orders.component.ts new file mode 100644 index 0000000000000000000000000000000000000000..b5cdd2f59d022c1d435b8d989c761e052e52e0cb --- /dev/null +++ b/src/app/p_product/admin/productOrderManagement/list-product-orders/list-product-orders.component.ts @@ -0,0 +1,277 @@ + +import { Component, OnInit, ViewChild } from '@angular/core'; +import { ProductOrderService } from 'src/app/openApis/productOrderingManagement/services'; +import { ToastrService } from 'ngx-toastr'; +import { ProductOrder } from 'src/app/openApis/productOrderingManagement/models'; +import { MatDialog } from '@angular/material/dialog'; +import { MatPaginator } from '@angular/material/paginator'; +import { MatSort } from '@angular/material/sort'; +import { MatTableDataSource } from '@angular/material/table'; +import { UntypedFormGroup, UntypedFormControl } from '@angular/forms'; +import { DeleteProductOrderComponent } from '../delete-product-order/delete-product-order.component'; +import { HttpErrorResponse } from '@angular/common/http'; +import { trigger } from '@angular/animations'; +import { fadeIn } from 'src/app/shared/animations/animations'; +// import { CacheSearchParametersService } from 'src/app/shared/services/cache-search-parameters.service'; +import { AppService } from 'src/app/shared/services/app.service'; +import { CalendarOptions, DateSelectArg, EventClickArg, EventApi } from '@fullcalendar/core'; +import dayGridPlugin from '@fullcalendar/daygrid'; +import timeGridPlugin from '@fullcalendar/timegrid'; +import listPlugin from '@fullcalendar/list'; +import interactionPlugin from '@fullcalendar/interaction'; +import resourceTimelinePlugin from '@fullcalendar/resource-timeline'; +import { Router } from '@angular/router'; +import { Plugins } from 'protractor/built/plugins'; +import { AuthService } from 'src/app/shared/services/auth.service'; + +@Component({ + selector: 'app-list-product-orders', + templateUrl: './list-product-orders.component.html', + styleUrls: ['./list-product-orders.component.scss'], + animations: [ trigger('fadeIn', fadeIn()) ] +}) +export class ListProductOrdersComponent implements OnInit { + + constructor( + private productOrder: ProductOrderService, + private dialog: MatDialog, + private toastr: ToastrService, + // private cacheService: CacheSearchParametersService, + public appService: AppService, + public authService: AuthService, + private router: Router + ) { } + + //displayedColumns = ['id', 'placed_by', 'order_date', 'state', 'requested_startdate', 'requested_enddate', 'actions'] + displayedColumns = ['id', 'placed_by', 'order_date', 'state', 'actions'] + dataSource = new MatTableDataSource() + + productOrders: ProductOrder[] + + @ViewChild(MatSort, {static: true}) sort: MatSort; + @ViewChild(MatPaginator, {static: true}) paginator: MatPaginator; + + orderStates = ['initial', 'acknowledged', 'rejected', 'pending', 'held', 'inProgress', 'cancelled', 'completed', 'failed', 'partial'] + + filterForm = new UntypedFormGroup({ + text: new UntypedFormControl(), + fromDate: new UntypedFormControl(new Date(new Date().setMonth(new Date().getMonth()-4))), + toDate: new UntypedFormControl(new Date()), + }); + + get fromDate() { return this.filterForm.get('fromDate').value; } + get toDate() { return this.filterForm.get('toDate').value; } + get text() { return this.filterForm.get('text').value; } + + + //------------------calendar related START------------------------------ + + + calendarVisible = true; + calendarOptions: CalendarOptions = { + headerToolbar: { + left: 'prev,next today', + center: 'title', + right: 'dayGridMonth,timeGridWeek,timeGridDay,listWeek' + }, + plugins: [ dayGridPlugin, timeGridPlugin, listPlugin, interactionPlugin, resourceTimelinePlugin], + initialView: 'dayGridMonth', + schedulerLicenseKey: 'CC-Attribution-NonCommercial-NoDerivatives', + //initialEvents: INITIAL_EVENTS, // alternatively, use the `events` setting to fetch from a feed + weekends: true, + editable: true, + selectable: true, + selectMirror: true, + dayMaxEvents: true, + select: this.handleDateSelect.bind(this), + eventClick: this.handleEventClick.bind(this), + eventsSet: this.handleEvents.bind(this), + /* you can update a remote database when these fire: + eventAdd: + eventChange: + eventRemove: + */ + + events: function(info, successCallback, failureCallback) { + + if ( this == null){ + console.info("this is null") + return + } + + var str = info.start.valueOf(); + const adate = new Date(str); + adate.setDate(adate.getDate() - 30); + const dateTimeNow = adate.toISOString(); + + this.productOrder.listProductOrder({ requestedStartDate: `${dateTimeNow}` }).subscribe( + + //this.productOrder.listProductOrder({ }).subscribe( + data => { this.productOrders = data }, + error => { + console.error(error) + failureCallback(error) + }, + () => { + successCallback( + Array.prototype.slice.call( // convert to array + this.productOrders + ).map(function(eventEl: ProductOrder) { + + // console.info("this is event: " + eventEl.id +" " + eventEl.requestedStartDate ) + // var result = new Date(eventEl.startDate); + // var evd = result.toISOString().replace(/T.*$/, ''); // YYYY-MM-DD of today + + return { + title: eventEl.relatedParty[0].name, + extendedProps: eventEl , + start: eventEl.requestedStartDate, + end: eventEl.expectedCompletionDate + } + }) + ) + + } + ) + + }.bind(this) + + }; + currentEvents: EventApi[] = []; + + handleDateSelect(selectInfo: DateSelectArg) { + // const title = prompt('Please enter a new title for your event'); + // const calendarApi = selectInfo.view.calendar; + + // calendarApi.unselect(); // clear date selection + + // if (title) { + // calendarApi.addEvent({ + // id: createEventId(), + // title, + // start: selectInfo.startStr, + // end: selectInfo.endStr, + // allDay: selectInfo.allDay + // }); + // } + } + + handleEventClick(clickInfo: EventClickArg) { + this.router.navigate([`products/product_order/${clickInfo.event.extendedProps.id}`]); + } + + handleEvents(events: EventApi[]) { + this.currentEvents = events; + } + + //------------------calendar related end ------------------------------ + + + + + ngOnInit() { + this.retrieveOrderList() + } + + retrieveOrderList() { + this.productOrder.listProductOrder({}).subscribe( + data => { this.productOrders = data }, + error => { console.error(error) }, + () => { + this.dataSource.data = this.productOrders + this.dataSource.sort = this.sort + this.dataSource.paginator = this.paginator + this.dataSource.sortingDataAccessor = (item, property): string | number => { + switch (property) { + case 'placed_by': return item.relatedParty[0].name + case 'order_date': return new Date(item.orderDate).getTime() + case 'requested_startdate': return new Date(item.requestedStartDate).getTime() + case 'requested_enddate': return new Date(item.requestedCompletionDate).getTime() + default: return item[property] + } + } + this.dataSource.filterPredicate = (data, filter) => { + // console.log(filter) + + const dataString = `${data.relatedParty[0].name} (${data.relatedParty[0].role})` + + let filterExpression: boolean = true + + // console.log(filterExpression) + if (this.text) { + filterExpression = dataString.trim().toLowerCase().includes(this.text) + } + + + if (this.fromDate && this.toDate) { + filterExpression = filterExpression && new Date(data.orderDate).getTime() >= new Date(this.fromDate).getTime() && new Date(data.orderDate).getTime() <= new Date(this.toDate).getTime() + } + + return filterExpression + + + if (filter !== "applyPeriodFilter") { + filter = filter.trim(); + filter = filter.toLowerCase(); + const dataString = `${data.relatedParty[0].name} (${data.relatedParty[0].role})` + let filterExpression = dataString.trim().toLowerCase().includes(filter) + if (this.fromDate && this.toDate) { + filterExpression = new Date(data.orderDate).getTime() >= new Date(this.fromDate).getTime() && new Date(data.orderDate).getTime() <= new Date(this.toDate).getTime() && dataString.trim().toLowerCase().includes(filter) + } + return filterExpression + } + + else + { + if (this.fromDate && this.toDate) { + return new Date(data.orderDate).getTime() >= new Date(this.fromDate).getTime() && new Date(data.orderDate).getTime() <= new Date(this.toDate).getTime() + } + } + + } + this.applyPeriodFilter() + } + ) + } + + applyTextFilter(filterValue: string) { + filterValue = filterValue.trim(); + filterValue = filterValue.toLowerCase(); + if (filterValue) { + this.dataSource.filter = filterValue; + } + } + + applyPeriodFilter() { + if (this.fromDate && this.toDate) { + this.dataSource.filter = "applyPeriodFilter" + } + // this.cacheService.productOrderListDateFrom = this.fromDate + // this.cacheService.productOrderListDateTo = this.toDate + // this.dataSource.filterPredicate = this.filterPeriod + } + + filterPeriod (data: ProductOrder, filter: string) { + return data.orderDate >= this.fromDate && data.orderDate <= this.toDate + } + + openOrderDeleteDialog(element: ProductOrder) { + const dialogRef = this.dialog.open(DeleteProductOrderComponent, {data: element}) + + dialogRef.afterClosed().subscribe ( + result => { + if (result) { + if (result instanceof HttpErrorResponse) { + this.toastr.error("An error occurred while attempting to delete Product Order") + } else { + this.toastr.success("Product Order list is successfully updated") + this.retrieveOrderList() + } + } + } + ) + } + + + +} diff --git a/src/app/p_product/admin/productOrderManagement/preview-product-order/edit-product-order-items/edit-orders-product-spec-characteristics/edit-orders-product-spec-characteristics.component.html b/src/app/p_product/admin/productOrderManagement/preview-product-order/edit-product-order-items/edit-orders-product-spec-characteristics/edit-orders-product-spec-characteristics.component.html new file mode 100644 index 0000000000000000000000000000000000000000..ed0bc1b29c6c1345c43c598b3ba1f69a9c0db14f --- /dev/null +++ b/src/app/p_product/admin/productOrderManagement/preview-product-order/edit-product-order-items/edit-orders-product-spec-characteristics/edit-orders-product-spec-characteristics.component.html @@ -0,0 +1,144 @@ + + + +
+
+ This product does not contain any configurable characteristics +
+ +
+
User Configurable Characteristics
+
+ +
- {{charForm.get('name').value}}
+
+ + + + + + + + + + + + + + + + + + + + Custom Value + + date_range + + + + + + + + Custom Value + + + + + + + + + + Custom Value + + + {{charValue.value.alias}} + + + + + + + Custom Value + + + {{charValue.value.alias}} + + + + + + +
+
+
+
+ + Custom Alias + + + + + + Custom Value + + + +
+
+
+ +
+
+ +
+
+ +
+
+ +
+ +
+
+
+ +
+ + + + +
+ +
+ +
+ + + diff --git a/src/app/p_product/admin/productOrderManagement/preview-product-order/edit-product-order-items/edit-orders-product-spec-characteristics/edit-orders-product-spec-characteristics.component.scss b/src/app/p_product/admin/productOrderManagement/preview-product-order/edit-product-order-items/edit-orders-product-spec-characteristics/edit-orders-product-spec-characteristics.component.scss new file mode 100644 index 0000000000000000000000000000000000000000..f26be3632681e69f1000aba26841217e2f35d7fa --- /dev/null +++ b/src/app/p_product/admin/productOrderManagement/preview-product-order/edit-product-order-items/edit-orders-product-spec-characteristics/edit-orders-product-spec-characteristics.component.scss @@ -0,0 +1,15 @@ +.spinner-container { + display: flex; + justify-content: center; + align-items: center; + min-height: 20vh; +} + +.service-spec-container { + min-height: 20vh; +} + +.border-bottom { + border-bottom: 1px dotted rgba(0, 0, 0, 0.125); + margin-bottom: .75rem; +} \ No newline at end of file diff --git a/src/app/p_product/admin/productOrderManagement/preview-product-order/edit-product-order-items/edit-orders-product-spec-characteristics/edit-orders-product-spec-characteristics.component.ts b/src/app/p_product/admin/productOrderManagement/preview-product-order/edit-product-order-items/edit-orders-product-spec-characteristics/edit-orders-product-spec-characteristics.component.ts new file mode 100644 index 0000000000000000000000000000000000000000..7e138907a4a61ae8093141cbca733a408964e87b --- /dev/null +++ b/src/app/p_product/admin/productOrderManagement/preview-product-order/edit-product-order-items/edit-orders-product-spec-characteristics/edit-orders-product-spec-characteristics.component.ts @@ -0,0 +1,151 @@ +import { Component, OnInit, Inject, Input, Output, EventEmitter } from '@angular/core'; +import { MatDialogRef, MAT_DIALOG_DATA } from '@angular/material/dialog'; +import { ProductOfferingService } from 'src/app/openApis/productCatalogManagement/services'; +import { ToastrService } from 'ngx-toastr'; +import { ProductOrderItem } from 'src/app/openApis/productOrderingManagement/models'; +import { UntypedFormArray, UntypedFormGroup, UntypedFormControl } from '@angular/forms'; +import { ProductOffering, ProductSpecificationCharacteristicRes, ProductSpecificationCharacteristicValueUseReq, ProductSpecificationCharacteristicValueUseRes } from 'src/app/openApis/productCatalogManagement/models'; +import { SortingService } from 'src/app/shared/functions/sorting.service'; +import { trigger } from '@angular/animations'; +import { fadeIn, simpleFade } from 'src/app/shared/animations/animations'; +import { AuthService } from 'src/app/shared/services/auth.service'; + +@Component({ + selector: 'app-edit-orders-product-spec-characteristics', + templateUrl: './edit-orders-product-spec-characteristics.component.html', + styleUrls: ['./edit-orders-product-spec-characteristics.component.scss'], + animations: [ + trigger('fadeIn', fadeIn()), + trigger('simpleFade', simpleFade()) + ] + +}) +export class EditOrdersProductSpecCharacteristicsComponent implements OnInit { + + constructor( + private dialogRef: MatDialogRef, + private offeringService: ProductOfferingService, + private toastr: ToastrService, + private sortingService: SortingService, + private authService: AuthService + ) { } + + isAdminUser: boolean = false + + @Input() set _activeListItem(activeItem: {orderItem: ProductOrderItem, productOffering: ProductOffering}) { + this.orderItem = activeItem.orderItem + this.productOffering = activeItem.productOffering + this.isAdminUser = this.authService.portalUserJWT.realm_access.roles.includes('ADMIN') + this.initValuesForm() + } + @Output() characteristicsWasEdited = new EventEmitter<{orderItemID: string, productSpecChars:[]}>() + + orderItem: ProductOrderItem + productOffering: ProductOffering + + confSpecFormArray = new UntypedFormArray([]) + + confSpecCharacteristics: ProductSpecificationCharacteristicRes[] = [] + + ngOnInit() { } + + retrieveProductSpec() { + this.offeringService.retrieveProductOffering({id: this.orderItem.productOffering.id}).subscribe( + data => { this.productOffering = data }, + error => this.toastr.error("An error occurred retrieving Product Specification Characteristics information"), + () => { + this.initValuesForm() + } + ) + } + + initValuesForm() { + this.confSpecFormArray = new UntypedFormArray([]) + + const confSpecFA = this.confSpecFormArray as UntypedFormArray + + this.confSpecCharacteristics = this.productOffering.prodSpecCharValueUse.filter(specChar => {return specChar && this.orderItem.product.productCharacteristic.some( item => item.name === specChar.name) } ) || [] + this.confSpecCharacteristics.sort(this.sortingService.ascStringSortingFunctionByNameProperty()) + + + + this.confSpecCharacteristics.forEach ( (confSpecChar) => { + confSpecFA.push(this.updateFormArrayItem(confSpecChar, this.confSpecCharacteristics)) + }) + + + } + + updateFormArrayItem( specChar: ProductSpecificationCharacteristicValueUseRes, specCharList: ProductSpecificationCharacteristicValueUseRes[]): UntypedFormGroup { + + const orderedServiceCharacteristic = this.orderItem.product.productCharacteristic.find(char => char.name === specChar.name) + + let charValueArray = orderedServiceCharacteristic.value + + if (['SET', 'ARRAY', 'ENUMERABLE'].includes(this.orderItem.product.productCharacteristic.find(char => char.name === specChar.name).valueType)) { + charValueArray = JSON.parse(orderedServiceCharacteristic.value['value'] as unknown as string) + } + + return new UntypedFormGroup({ + name: new UntypedFormControl(specChar.name), + valueType: new UntypedFormControl(specChar.valueType), + value: new UntypedFormControl(charValueArray) + }) + } + + addToArrayCharacteristicValue(characteristic: ProductSpecificationCharacteristicValueUseRes) { + const charControl = this.confSpecFormArray.value.find(char => char.name === characteristic.name); + if (charControl) { + charControl.value.push({ + value: '', + alias: '' + }); + } + } + + deleteFromArrayCharacteristicValue(characteristic: ProductSpecificationCharacteristicValueUseRes, index) { + const charControl = this.confSpecFormArray.value.find(char => char.name === characteristic.name); + if (charControl) { + charControl.value.splice(index, 1); + } + } + + compareFn( optionOne, optionTwo ) : boolean { + return (optionOne.value === optionTwo.value) || (optionOne.alias === optionTwo.alias); + } + + + closeDialog() { + this.dialogRef.close() + } + + submitDialog() { + // console.log(this.confSpecFormArray.value) + // console.log(this.nonConfSpecFormArray.value) + const editedCharsFA = this.confSpecFormArray.value; + // console.log(editedCharsFA) + + let newServiceCharacteristics = [] + let editedCharValue + editedCharsFA.forEach( editedChar => { + editedCharValue = editedChar.value + if (editedChar.valueType === "SET" || editedChar.valueType === "ARRAY") { + editedCharValue = { + value: JSON.stringify( editedChar.value.map(el => {return {'value': el.value, 'alias': el.alias}}) ), + alias: '' + } + } + editedChar.value = editedCharValue + }) + + this.characteristicsWasEdited.emit({ + orderItemID: this.orderItem.id, + productSpecChars: editedCharsFA + }) + } + + ngOnDestroy() { + this.submitDialog() + } + +} diff --git a/src/app/p_product/admin/productOrderManagement/preview-product-order/edit-product-order-items/edit-product-order-items.component.html b/src/app/p_product/admin/productOrderManagement/preview-product-order/edit-product-order-items/edit-product-order-items.component.html new file mode 100644 index 0000000000000000000000000000000000000000..849fc10a8534a5c28f8a2b4a6407feeb0c12fbd4 --- /dev/null +++ b/src/app/p_product/admin/productOrderManagement/preview-product-order/edit-product-order-items/edit-product-order-items.component.html @@ -0,0 +1,47 @@ + +
+

+ + Edit Specification Characteristics of Selected Order Items' allocated Offerings +

+ + + + + + + + + + + + + +
+ +
+
+
+
+ + + + +
+
+ + +
+
+
diff --git a/src/app/p_product/admin/productOrderManagement/preview-product-order/edit-product-order-items/edit-product-order-items.component.scss b/src/app/p_product/admin/productOrderManagement/preview-product-order/edit-product-order-items/edit-product-order-items.component.scss new file mode 100644 index 0000000000000000000000000000000000000000..630305506529d02677d61d7efe0db1fef960e3f4 --- /dev/null +++ b/src/app/p_product/admin/productOrderManagement/preview-product-order/edit-product-order-items/edit-product-order-items.component.scss @@ -0,0 +1,15 @@ +mat-tab-group { + margin-bottom: 1rem; + // border-top: 1px solid rgba(0, 0, 0, 0.1); + // border-bottom: 1px solid rgba(0, 0, 0, 0.1); +} + +.spinner-container { + display: flex; + justify-content: center; + align-items: center; + min-height: 40vh; + max-height: 65vh; + transition: all 2s linear; +} + diff --git a/src/app/p_product/admin/productOrderManagement/preview-product-order/edit-product-order-items/edit-product-order-items.component.ts b/src/app/p_product/admin/productOrderManagement/preview-product-order/edit-product-order-items/edit-product-order-items.component.ts new file mode 100644 index 0000000000000000000000000000000000000000..42463985060eea814338b1ad1bc1b23c2c46eeca --- /dev/null +++ b/src/app/p_product/admin/productOrderManagement/preview-product-order/edit-product-order-items/edit-product-order-items.component.ts @@ -0,0 +1,78 @@ +import { Component, OnInit, Inject } from '@angular/core'; +import { MAT_DIALOG_DATA, MatDialogRef } from '@angular/material/dialog'; +import { MatTabChangeEvent } from '@angular/material/tabs'; +import { ProductOrderItem, ProductOrderUpdate } from 'src/app/openApis/productOrderingManagement/models'; +import { forkJoin } from 'rxjs'; +import { ProductOffering, ProductSpecification } from 'src/app/openApis/productCatalogManagement/models'; +import { ProductOfferingService, ProductSpecificationService } from 'src/app/openApis/productCatalogManagement/services'; + +@Component({ + selector: 'app-edit-product-order-items', + templateUrl: './edit-product-order-items.component.html', + styleUrls: ['./edit-product-order-items.component.scss'] +}) +export class EditProductOrderItemsComponent implements OnInit { + + constructor( + @Inject(MAT_DIALOG_DATA) public selectedOrderItems: ProductOrderItem[], + private dialogRef: MatDialogRef, + private offeringService: ProductOfferingService + ) { } + + activeListItem: { + orderItem: ProductOrderItem + productOffering: ProductOffering + } + selectedItemsProductOfferings: ProductOffering[] + activeTabIndex: number + + editedOrderItems: {orderItemID: string, productSpecChars:[]}[] = [] + + ngOnInit() { + // this.activeListItem = this.selectedOrderItems[0] + this.retrieveOfferingFromOrderItems() + } + + retrieveOfferingFromOrderItems() { + let productSpecs$ = [] + this.selectedOrderItems.forEach( item => { + productSpecs$.push(this.offeringService.retrieveProductOffering({id: item.productOffering.id})) + }) + + forkJoin(productSpecs$).subscribe( + data => {this.selectedItemsProductOfferings = data}, + error => {console.error(error)}, + () => { + this.activeListItem = { + orderItem: this.selectedOrderItems[0], + productOffering: this.selectedItemsProductOfferings[0] + } + this.activeTabIndex = 0 + } + ) + } + + changeTab(event: MatTabChangeEvent) { + setTimeout(() => { + this.activeTabIndex = event.index + this.activeListItem = { + orderItem: this.selectedOrderItems[event.index], + productOffering: this.selectedItemsProductOfferings[event.index] + } + }, 500); + } + + orderItemCharsEdited(event: {orderItemID: string, productSpecChars:[]}) { + if (!this.editedOrderItems.some(item => item.orderItemID === event.orderItemID)) { + this.editedOrderItems.push(event) + } + } + + closeDialog() { + this.dialogRef.close() + } + + submitDialog() { + this.dialogRef.close(this.editedOrderItems) + } +} diff --git a/src/app/p_product/admin/productOrderManagement/preview-product-order/preview-product-order.component.html b/src/app/p_product/admin/productOrderManagement/preview-product-order/preview-product-order.component.html new file mode 100644 index 0000000000000000000000000000000000000000..a28e0aa4343cd05bf7ffa42391ea370a1b805e50 --- /dev/null +++ b/src/app/p_product/admin/productOrderManagement/preview-product-order/preview-product-order.component.html @@ -0,0 +1,513 @@ +
+
+
+

Product Order with id #{{orderID}} is not found

+
+
+
+ +
+
+
+ + +
+ +
+
+
+
+

Product Order Overview And Management

+ + +

Overview and Manage Product Order #{{productOrder?.id}}

+ + +
+
+
+
+ +
+
+
+ +
+
+
+ + +
+
+
+
+
+ + A related Service Order has been created. +
+ + View on Service Orders + + +
+
+
+
+
Orderer By
+

{{productOrder?.relatedParty[0].name}}

+
+
+
Order Date
+

{{productOrder?.orderDate | date:'d MMM y, h:mm a'}} - Local Time

+

{{productOrder?.orderDate | date:'d MMM y, h:mm a':'UTC'}} - UTC

+
+ +
+
Requested Starting Date
+

{{productOrder?.requestedStartDate | date:'d MMM y, h:mm a'}} - Local Time

+

{{productOrder?.requestedStartDate | date:'d MMM y, h:mm a':'UTC'}} - UTC

+
+
+
Requested Completion Date
+

{{productOrder?.requestedCompletionDate | date:'d MMM y, h:mm a'}} - Local Time

+

{{productOrder?.requestedCompletionDate | date:'d MMM y, h:mm a':'UTC'}} - UTC

+
+ +
+
Description
+

{{productOrder?.description}}

+
+
+
Notification Contact
+

{{productOrder?.notificationContact}}

+
+ +
+ +
Priority
+

{{productOrder?.priority}}

+
+ + +
+
+ +
State
+

{{productOrder?.state}}

+
+ + + State + + + + {{state | uppercase}} + + + + + + {{state | uppercase}} + + + + +
+ +
+ +
Starting Date
+
+

{{productOrder?.requestedStartDate | date:'d MMM y, h:mm a'}} - Local Time

+

{{productOrder?.requestedStartDate | date:'d MMM y, h:mm a':'UTC'}} - UTC

+
+
+ + + Starting Date + + date_range + + Date is displayed in Local Time (UTC: {{editForm.value.startDate | date:'dd/MM/yy, HH:mm':'UTC'}}) + +
+ +
+ +
Expected Completion Date
+
+

{{productOrder?.expectedCompletionDate | date:'d MMM y, h:mm a'}} - Local Time

+

{{productOrder?.expectedCompletionDate | date:'d MMM y, h:mm a':'UTC'}} - UTC

+
+ +
+ + + Expected Completion Date + + date_range + + Date is displayed in Local Time (UTC: {{editForm.value.expectedCompletionDate | date:'dd/MM/yy, HH:mm':'UTC'}}) + +
+ +
+
Notes
+
+
+
+
+ {{note.text}} +
+ {{note.date | date:'d MMM y, h:mm:ss a'}} (Local Time) + by {{note.author}} +
+
+
+
+
+ +
+ + +
+
+
+ + New Note + + + +
+
+
+
+
+
+ +
+ + + +
+
+ +
+
+ + + +
+
+ +
+ + +
+
+ + + +
+
+
+
+ There are not any related parties assigned +
+ +
+
Username (Role)
+

{{relatedParty.name}} ({{relatedParty.role}})

+ + +
+
+ +
+
+ + + + + +
+
+
+ + + + + + + Order Item's Product main properties + + + +
+
+
ID
+

{{orderItem?.productOffering.id}}

+
+
+
Name
+

{{orderItem?.productOffering.name}}

+
+
+ +
+
+
Product Type
+

{{orderItem?.type}}

+
+
+
Category
+

{{orderItem?.category}}

+
+
+
+ + + + + Product Specification Characteristics allocated with Order Item's Offering + + + +
+ There are not any Product Specification Characteristics allocated. +
+ +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Characteristic
Value (Alias)
{{specCharacteristic.name}} + {{specCharacteristic.value?.value}} + + ({{specCharacteristic.value.alias}}) + + + + + + + + +
+ + {{item.value}} ({{item.alias}}) + + + {{item}} + +
+
+
+
+ + + + + +
+ +
+ +
+
+
+ + + + + +
+ +
+ +
+
+ + +
+
+
+
\ No newline at end of file diff --git a/src/app/p_product/admin/productOrderManagement/preview-product-order/preview-product-order.component.scss b/src/app/p_product/admin/productOrderManagement/preview-product-order/preview-product-order.component.scss new file mode 100644 index 0000000000000000000000000000000000000000..f8d7d92a203d4e5f8898273428e2fbcd6fb5f188 --- /dev/null +++ b/src/app/p_product/admin/productOrderManagement/preview-product-order/preview-product-order.component.scss @@ -0,0 +1,89 @@ +.minh-40vh { + min-height: 30vh; +} + +.nav-link:hover { + cursor: pointer; +} + +.nav-link.disabled { + color: rgba(0,0,0,.30); +} + +.nav-pills .nav-link.active { + color: #fff; + transition: all 0.2s; +} + +.nav-item { + border-bottom: 1px dashed rgba(0, 0, 0, 0.125); + padding: .5rem 0; +} + + +.tab-pane > .card:nth-child(1) { + min-height: max(350px, 20vh); +} + +.tab-pane .card .card-body.space-between{ + display: flex; + flex-direction: column; + justify-content: space-between; +} + +.orderItem-border { + border: 2px dotted #ddd; + padding: 1rem .5rem .5rem .5rem; + border-radius: 12px; + margin-bottom: 1rem; +} + +.orderItem-title { + margin-bottom: 1rem; + text-align: center; +} + +.note-card-body { + padding: .5rem; +} + +mat-form-field { + width: 100%; +} + +.notes-container { + max-height: 660px; + overflow-y: auto; +} + +.notes-graph-container { + display: flex; + justify-content: center; +} + +.service-spec-container { + display: flex; + justify-content: space-between; + align-items: center; +} + +table.table-borderless tbody tr td { + padding: 0; +} + +.supporting-service-card { + cursor: pointer +} + +.no-shadow { + box-shadow: none; +} + +.supporting-service-card:hover { + box-shadow: none; +} + +.supporting-service-card .note-card-body:hover { + background: #e5e5e5; + border-radius: 12px; +} \ No newline at end of file diff --git a/src/app/p_product/admin/productOrderManagement/preview-product-order/preview-product-order.component.ts b/src/app/p_product/admin/productOrderManagement/preview-product-order/preview-product-order.component.ts new file mode 100644 index 0000000000000000000000000000000000000000..6e41567530544b57fc152cc38fc88d655063a607 --- /dev/null +++ b/src/app/p_product/admin/productOrderManagement/preview-product-order/preview-product-order.component.ts @@ -0,0 +1,408 @@ +import { Component, OnInit } from '@angular/core'; +import { ActivatedRoute, Router } from '@angular/router'; +import { ProductOrder, ProductOrderUpdate, ServiceRef, ProductOrderItem } from 'src/app/openApis/productOrderingManagement/models'; +import { ProductOrderService } from 'src/app/openApis/productOrderingManagement/services'; +import { ToastrService } from 'ngx-toastr'; +import { UntypedFormControl, UntypedFormGroup } from '@angular/forms'; +import { ServiceService } from 'src/app/openApis/serviceInventoryManagement/services'; +import { Service } from 'src/app/openApis/serviceInventoryManagement/models'; +import { delay } from 'rxjs/operators'; +import { AuthService } from 'src/app/shared/services/auth.service'; +import { MatDialog } from '@angular/material/dialog'; + +import { timer, Subscription } from 'rxjs'; +import { SortingService } from 'src/app/shared/functions/sorting.service'; +import { trigger } from '@angular/animations'; +import { fadeIn, simpleFade } from 'src/app/shared/animations/animations'; +import { SelectionModel } from '@angular/cdk/collections'; +import { AppService } from 'src/app/shared/services/app.service'; +import { relative } from 'path'; +import { TerminateProductOrderItemsComponent } from './terminate-product-order-items/terminate-product-order-items.component'; +import { EditProductOrderItemsComponent } from './edit-product-order-items/edit-product-order-items.component'; +import { EditOrdersProductSpecCharacteristicsComponent } from './edit-product-order-items/edit-orders-product-spec-characteristics/edit-orders-product-spec-characteristics.component'; +import { ServiceOrderService } from 'src/app/openApis/serviceOrderingManagement/services'; + +@Component({ + selector: 'app-preview-product-order', + templateUrl: './preview-product-order.component.html', + styleUrls: ['./preview-product-order.component.scss'], + animations: [ + trigger('fadeIn', fadeIn()), + trigger('simpleFade', simpleFade()), + ] + +}) +export class PreviewProductOrderComponent implements OnInit { + + constructor( + private activatedRoute: ActivatedRoute, + private orderService: ProductOrderService, + private router: Router, + private inventoryService: ServiceService, + private toast: ToastrService, + private authService: AuthService, + private dialog: MatDialog, + private sortingService: SortingService, + public appService: AppService, + private serviceOrderService: ServiceOrderService + ) { } + + staticListItems = ["Main Order Properties", "Related Parties"] + activeListItem = "Main Order Properties" + + availableOrderStates = ['INITIAL', 'ACKNOWLEDGED', 'REJECTED', 'PENDING', 'HELD', 'INPROGRESS', 'CANCELLED', 'COMPLETED', 'FAILED', 'PARTIAL'] + availableInitialOrderStates = ['INITIAL', 'ACKNOWLEDGED', 'REJECTED'] + + availablePriorities = ['low', 'normal', 'high'] + + relatedServiceOrder: boolean = false; + + + productOrder: ProductOrder + orderID: string + productOrderNotFound: boolean = false + finishedLoading: boolean = false + + supportingServices: Service[][] = [] + // supportingServices' first array is Order Item Index and second array is SupportingService index of the respective Order Item + editMode: boolean = false + editModeNotes: boolean = false + isAdminUser: boolean = false + + editForm = new UntypedFormGroup ({ + state: new UntypedFormControl(), + priority: new UntypedFormControl('NORMAL'), + startDate: new UntypedFormControl(), + expectedCompletionDate: new UntypedFormControl(), + note: new UntypedFormControl() + }) + + checkboxesOrderItemList: {orderItem: ProductOrderItem, isChecked: boolean}[] = [] + selection = new SelectionModel(true, []); + + subscription = new Subscription + + currentItemRelationshipsUrl: string[] = [] + notesGraphUrl: string + + ngOnInit() { + this.isAdminUser = this.authService.portalUserJWT.realm_access.roles.includes('ADMIN') + + if (this.activatedRoute.snapshot.params.id) + { + this.orderID = this.activatedRoute.snapshot.params.id + this.retrieveProductOrder() + } else { + this.router.navigate(['../product_orders'], { relativeTo: this.activatedRoute}) + } + } + + selectListItem(item: string) { + this.activeListItem = item + + if (!this.staticListItems.includes(item)) + this.productOrder.productOrderItem.find(it => it.id === item).product.productCharacteristic + } + + retrieveProductOrder() { + this.selection.clear() + this.orderService.retrieveProductOrder({id: this.orderID}).subscribe( + data => this.productOrder = data, + error => { console.error(error) }, + () => { + if (this.productOrder) { + this.finishedLoading = true + + this.editForm.patchValue({ + state: this.productOrder.state, + startDate: this.productOrder.requestedStartDate ? this.productOrder.requestedStartDate : this.productOrder.requestedStartDate, + expectedCompletionDate: this.productOrder.expectedCompletionDate ? this.productOrder.expectedCompletionDate : this.productOrder.completionDate + }) + + this.productOrder.note.sort(this.sortingService.ascDateSortingFuncByDateProperty()) + + if (!this.productOrder.requestedStartDate) { this.productOrder.requestedStartDate = this.productOrder.requestedStartDate } + + if (!this.productOrder.expectedCompletionDate) { this.productOrder.expectedCompletionDate = this.productOrder.requestedCompletionDate } + + this.checkboxesOrderItemList = [] + this.currentItemRelationshipsUrl = [] + + this.supportingServices = [] + this.productOrder.productOrderItem.forEach((orderItem) => { + + //Expands the length of the array for each Service Order Item + this.supportingServices.push([]) + + this.checkboxesOrderItemList.push({orderItem: orderItem, isChecked: false}) + + orderItem.product.productCharacteristic.sort(this.sortingService.ascStringSortingFunctionByNameProperty()) + + // orderItem.product.realizingService.forEach( (supService) => { + // this.retrieveProductInventory(supService.id).subscribe( + // data => { + // const orderItemIndex = this.productOrder.productOrderItem.findIndex(SOI => orderItem.id === SOI.id) + // const supportingServiceIndex = this.productOrder.productOrderItem[orderItemIndex].product.realizingService.findIndex(SupS => supService.id === SupS.id) + // this.supportingServices[orderItemIndex][supportingServiceIndex] = data + // } + // ) + // }) + + // this.currentItemRelationshipsUrl.push( this.orderService.rootUrl + "/productOrderingManagement/v4/productOrder/" + this.productOrder.id + "/item/" + orderItem.id + "/relationship_graph" ); + }) + + // this.notesGraphUrl = this.orderService.rootUrl + "/productOrderingManagement/v4/productOrder/" + this.productOrder.id + "/notes_graph"; + + if (this.activatedRoute.snapshot.queryParams && this.productOrder.productOrderItem.some(item => item.id === this.activatedRoute.snapshot.queryParams.item)) { + // console.log(this.activatedRoute.snapshot.queryParams) + this.activeListItem = this.activatedRoute.snapshot.queryParams.item + + } + if (['ACKNOWLEDGED', 'INPROGRESS', 'COMPLETED', 'PARTIAL'].includes(this.productOrder.state)) { + this.relatedServiceOrder = true; + } + + } else { + this.productOrderNotFound = true + } + } + ) + } + + + retrieveProductInventory(serviceId:string) { + return this.inventoryService.retrieveService({id:serviceId}) + } + + orderItemStateClassSelector(state:'INITIAL' | 'ACKNOWLEDGED' | 'REJECTED' | 'PENDING' | 'HELD' | 'INPROGRESS' | 'CANCELLED' | 'COMPLETED' | 'FAILED' | 'ASSESSINGCANCELLATION' | 'PENDINGCANCELLATION') { + let cssClass: string = 'badge' + switch (state) { + case 'INITIAL': + cssClass += ' badge-primary' + break; + case 'COMPLETED': + cssClass += ' badge-success' + break; + case 'PENDING': + case 'HELD': + cssClass += ' badge-secondary' + break; + case 'CANCELLED': + case 'FAILED': + case 'REJECTED': + cssClass += ' badge-danger' + break; + default: + cssClass += ' badge-warning' + } + return cssClass + } + + orderStateClassSelector(state:'INITIAL'|'ACKNOWLEDGED'|'REJECTED'|'PENDING'|'HELD'|'INPROGRESS'|'CANCELLED'|'COMPLETED'|'FAILED'|'PARTIAL') { + let cssClass: string = 'badge' + switch (state) { + case 'INITIAL': + cssClass += ' badge-primary' + break; + case 'REJECTED': + case 'CANCELLED': + case 'FAILED': + cssClass += ' badge-danger' + break; + case 'COMPLETED': + cssClass += ' badge-success' + break; + default: + cssClass += ' badge-warning' + } + return cssClass + } + + enableOrderEditing() { + this.editMode = true + } + + submitOrderEditing() { + this.editMode = false + let orderUpdate: ProductOrderUpdate = { + state: this.editForm.get('state').value, + requestedStartDate: this.editForm.get('startDate').value, + expectedCompletionDate: this.editForm.get('expectedCompletionDate').value, + productOrderItem: [] + } + if (this.editForm.get('note').value) { + orderUpdate.note = [{ + author:this.authService.portalUserJWT.preferred_username, + text: this.editForm.get('note').value, + date: new Date().toISOString() + }] + } + + this.orderService.patchProductOrder({body: orderUpdate, id: this.orderID}).subscribe( + data => {this.toast.success("Product Order was successfully updated")}, + error => {console.error(error); this.toast.error("An error occurred while editing Product Order")}, + () => { + this.enableOrderRefreshTimer() + } + ) + } + + cancelOrderEditing() { + this.editMode = false + } + + triggerAdminNote() { + this.editModeNotes = !this.editModeNotes + } + + // openOrdersSpecCharacteristicsDialog(orderItem: ProductOrderItem) { + + // const dialogRef = this.dialog.open(EditOrdersProductSpecCharacteristicsComponent, { + // data: { orderItem } + // }) + + // dialogRef.afterClosed().subscribe( + // result => { + // // console.log(result) + // // console.log() + // // if (result) { + // // orderItem.service.serviceCharacteristic = result + // // } + // console.log(this.productOrder) + // if (result) { + + // let newOrderUpdate: ProductOrderUpdate = { + // productOrderItem: [] + // } + + // this.productOrder.productOrderItem.find(item => item.id === orderItem.id).product.productCharacteristic = result + // newOrderUpdate.productOrderItem = this.productOrder.productOrderItem + // this.orderService.patchProductOrder({body: newOrderUpdate, id: this.productOrder.id}).subscribe( + // data => { this.retrieveProductOrder() }, + // error => console.error(error) + // ) + // } + // } + // ) + // } + + areOrderItemsEditable() { + // states > 'INITIAL'|'ACKNOWLEDGED'|'REJECTED'|'PENDING'|'HELD'|'INPROGRESS'|'CANCELLED'|'COMPLETED'|'FAILED'|'PARTIAL' + // return ['INITIAL', 'REJECTED','CANCELLED', 'COMPLETED', 'FAILED', 'PARTIAL'].includes(this.productOrder.state) + return ['INITIAL'].includes(this.productOrder.state) + } + + areOrderItemsTerminable() { + return ['COMPLETED', 'FAILED', 'PARTIAL'].includes(this.productOrder.state) + } + + openEditProductOrderItemsDialog() { + const dialogRef = this.dialog.open(EditProductOrderItemsComponent, { + data: this.selection.selected, + minWidth: "60vw" + }) + + dialogRef.afterClosed().subscribe( + (editedOrderItems: {orderItemID: string, productSpecChars:[]}[]) => { + + // console.log(editedOrderItems) + if (editedOrderItems) { + + let newOrderUpdate: ProductOrderUpdate = { + productOrderItem: [] + } + editedOrderItems.forEach( editedOrderItem => { + this.productOrder.productOrderItem.find(item => item.id === editedOrderItem.orderItemID).product.productCharacteristic = editedOrderItem.productSpecChars + // Decide orderItem action verb + if (this.productOrder.state === "COMPLETED") { + this.productOrder.productOrderItem.find(item => item.id === editedOrderItem.orderItemID).action = "MODIFY" + } + + // newOrderUpdate.orderItem.push(this.productOrder.orderItem.find(item => item.id === editedOrderItem.orderItemID)) + }) + + newOrderUpdate.productOrderItem = this.productOrder.productOrderItem + + // console.log(newOrderUpdate) + + this.orderService.patchProductOrder({body: newOrderUpdate, id: this.productOrder.id}).subscribe( + data => { + this.toast.success("Selected Order Items were successfully updated") + this.retrieveProductOrder() + }, + error => { + this.toast.error("An error occurred while updating Product Order Items") + this.retrieveProductOrder() + console.error(error) + } + ) + } + } + ) + + } + + terminateProductOrderItemsDialog() { + const dialogRef = this.dialog.open(TerminateProductOrderItemsComponent, { + data: this.selection.selected + }) + + dialogRef.afterClosed().subscribe( + result => { + if (result) { + let newOrderUpdate: ProductOrderUpdate = { + productOrderItem: [] + } + this.selection.selected.forEach( selectedOrderItem => { + this.productOrder.productOrderItem.find(item => item.id === selectedOrderItem.id).action = "DELETE" + // this.productOrder.productOrderItem.find(item => item.id === selectedOrderItem.id).service.state = "TERMINATED" + }) + + newOrderUpdate.productOrderItem = this.productOrder.productOrderItem + + // console.log(newOrderUpdate) + + this.orderService.patchProductOrder({body: newOrderUpdate, id: this.productOrder.id}).subscribe({ + next: () => { + this.toast.success("Selected Order Items were successfully updated") + this.retrieveProductOrder() + }, + error: (error) => { + this.toast.error("An error occurred while updating Product Order Items") + this.retrieveProductOrder() + console.error(error) + } + }) + } + } + ) + } + + //checkBoxSelection Logic + isAllSelected() { + const numSelected = this.selection.selected.length + const numItems = this.productOrder.productOrderItem.length + return numSelected === numItems + } + + masterCheckboxToggle() { + this.isAllSelected() ? + this.selection.clear() : + this.productOrder.productOrderItem.forEach (item => this.selection.select(item)) + } + //---checkBoxSelection Logic + + enableOrderRefreshTimer() { + this.subscription.unsubscribe() + this.subscription = timer(0, 10000).subscribe( + data => { + // this.supportingServices = [[]] + this.retrieveProductOrder() + } + ) + } + + ngOnDestroy() { + this.subscription.unsubscribe() + } +} diff --git a/src/app/p_product/admin/productOrderManagement/preview-product-order/terminate-product-order-items/terminate-product-order-items.component.html b/src/app/p_product/admin/productOrderManagement/preview-product-order/terminate-product-order-items/terminate-product-order-items.component.html new file mode 100644 index 0000000000000000000000000000000000000000..ee19bb4413b71e1c38bf9ab73f6a15660e63b3d5 --- /dev/null +++ b/src/app/p_product/admin/productOrderManagement/preview-product-order/terminate-product-order-items/terminate-product-order-items.component.html @@ -0,0 +1,16 @@ +

+ + Confirm termination +

+
+ Are you sure you want to terminate products allocated with the selected Order Items? +
    +
  • {{orderItem.productOffering.name}}
  • +
+
+ +
+ + +
+ \ No newline at end of file diff --git a/src/app/p_product/admin/productOrderManagement/preview-product-order/terminate-product-order-items/terminate-product-order-items.component.scss b/src/app/p_product/admin/productOrderManagement/preview-product-order/terminate-product-order-items/terminate-product-order-items.component.scss new file mode 100644 index 0000000000000000000000000000000000000000..e69de29bb2d1d6434b8b29ae775ad8c2e48c5391 diff --git a/src/app/p_product/admin/productOrderManagement/preview-product-order/terminate-product-order-items/terminate-product-order-items.component.ts b/src/app/p_product/admin/productOrderManagement/preview-product-order/terminate-product-order-items/terminate-product-order-items.component.ts new file mode 100644 index 0000000000000000000000000000000000000000..a90bf0c4b21c4c23af2d40d8281db8f954f75ad1 --- /dev/null +++ b/src/app/p_product/admin/productOrderManagement/preview-product-order/terminate-product-order-items/terminate-product-order-items.component.ts @@ -0,0 +1,30 @@ +import { Component, OnInit, Inject } from '@angular/core'; +import { MatDialogRef, MAT_DIALOG_DATA } from '@angular/material/dialog'; +import { DeleteProductCategoriesComponent } from 'src/app/p_product/admin/productCatalogManagement/delete-product-categories/delete-product-categories.component'; +import { ProductOrderItem } from 'src/app/openApis/productOrderingManagement/models'; +import { DeleteProductOfferingComponent } from '../../../productCatalogManagement/delete-product-offering/delete-product-offering.component'; + +@Component({ + selector: 'app-terminate-product-order-items', + templateUrl: './terminate-product-order-items.component.html', + styleUrls: ['./terminate-product-order-items.component.scss'] +}) +export class TerminateProductOrderItemsComponent implements OnInit { + + constructor( + @Inject(MAT_DIALOG_DATA) public data: ProductOrderItem[], + private dialogRef: MatDialogRef, + ) { } + + ngOnInit() { + } + + confirmTermination() { + this.dialogRef.close('deleted') + } + + closeDialog() { + this.dialogRef.close() + } + +} diff --git a/src/app/p_product/admin/productOrderManagement/product-order-calendar/event-utils.ts b/src/app/p_product/admin/productOrderManagement/product-order-calendar/event-utils.ts new file mode 100644 index 0000000000000000000000000000000000000000..5bdc5ebc1e538bef2bc09bc5cbccf655ee6f083f --- /dev/null +++ b/src/app/p_product/admin/productOrderManagement/product-order-calendar/event-utils.ts @@ -0,0 +1,25 @@ +import { EventInput } from '@fullcalendar/core'; + +let eventGuid = 0; +const TODAY_STR = new Date().toISOString().replace(/T.*$/, ''); // YYYY-MM-DD of today +var result = new Date(); +result.setDate(result.getDate() + 2); +const TODAY_STRONW = result.toISOString().replace(/T.*$/, ''); // YYYY-MM-DD of today + +export const INITIAL_EVENTS: EventInput[] = [ + { + id: createEventId(), + title: 'All-day event', + start: TODAY_STR + }, + { + id: createEventId(), + title: 'Timed event', + start: TODAY_STR + 'T12:00:00', + end: TODAY_STRONW + 'T18:00:00' + } +]; + +export function createEventId() { + return String(eventGuid++); +} diff --git a/src/app/p_product/admin/productOrderManagement/product-order-calendar/product-order-calendar.component.html b/src/app/p_product/admin/productOrderManagement/product-order-calendar/product-order-calendar.component.html new file mode 100644 index 0000000000000000000000000000000000000000..7ff50361924839fdd278bbd14f558fb8f745059b --- /dev/null +++ b/src/app/p_product/admin/productOrderManagement/product-order-calendar/product-order-calendar.component.html @@ -0,0 +1,20 @@ +
+
+
+
+
+
+

Product Orders Calendar

+

View Product Orders

+
+ +
+ + + + + +
+
+
+
\ No newline at end of file diff --git a/src/app/p_product/admin/productOrderManagement/product-order-calendar/product-order-calendar.component.scss b/src/app/p_product/admin/productOrderManagement/product-order-calendar/product-order-calendar.component.scss new file mode 100644 index 0000000000000000000000000000000000000000..6c61423bebb55df0dc47f1e1c3759d93885a0cf3 --- /dev/null +++ b/src/app/p_product/admin/productOrderManagement/product-order-calendar/product-order-calendar.component.scss @@ -0,0 +1,5 @@ +.jumbotron-heading { + display: flex; + justify-content: space-between; + align-items: center; +} \ No newline at end of file diff --git a/src/app/p_product/admin/productOrderManagement/product-order-calendar/product-order-calendar.component.ts b/src/app/p_product/admin/productOrderManagement/product-order-calendar/product-order-calendar.component.ts new file mode 100644 index 0000000000000000000000000000000000000000..0789f95adfe8b5f902135cab713b1f21c5b2a498 --- /dev/null +++ b/src/app/p_product/admin/productOrderManagement/product-order-calendar/product-order-calendar.component.ts @@ -0,0 +1,170 @@ +import { Router } from '@angular/router'; +import { startWith } from 'rxjs/operators'; +import { MatTableDataSource } from '@angular/material/table'; +import { ProductOrder } from 'src/app/openApis/productOrderingManagement/models'; +import { ProductOrderService } from 'src/app/openApis/productOrderingManagement/services'; + +import { Component, OnInit, ViewChild } from '@angular/core'; +import { MatDialog } from '@angular/material/dialog'; +import { ToastrService } from 'ngx-toastr'; +import { trigger } from '@angular/animations'; +import { fadeIn } from 'src/app/shared/animations/animations'; +import { CalendarOptions, DateSelectArg, EventClickArg, EventApi } from '@fullcalendar/core'; +import dayGridPlugin from '@fullcalendar/daygrid'; +import timeGridPlugin from '@fullcalendar/timegrid'; +import listPlugin from '@fullcalendar/list'; +import interactionPlugin from '@fullcalendar/interaction'; +import resourceTimelinePlugin from '@fullcalendar/resource-timeline'; +import { formatDate } from '@angular/common'; + +@Component({ + selector: 'product-order-calendar', + templateUrl: './product-order-calendar.component.html', + styleUrls: ['./product-order-calendar.component.scss'] + }) +export class ProductOrderCalendarComponent implements OnInit { + + calendarVisible = true; + calendarOptions: CalendarOptions = { + headerToolbar: { + left: 'prev,next today', + center: 'title', + right: 'dayGridMonth,timeGridWeek,timeGridDay,listWeek' + }, + plugins: [ dayGridPlugin, timeGridPlugin, listPlugin, interactionPlugin, resourceTimelinePlugin], + initialView: 'dayGridMonth', + //initialEvents: INITIAL_EVENTS, // alternatively, use the `events` setting to fetch from a feed + weekends: true, + editable: true, + selectable: true, + selectMirror: true, + dayMaxEvents: true, + select: this.handleDateSelect.bind(this), + eventClick: this.handleEventClick.bind(this), + eventsSet: this.handleEvents.bind(this), + /* you can update a remote database when these fire: + eventAdd: + eventChange: + eventRemove: + */ + + events: function(info, successCallback, failureCallback) { + + if ( this == null){ + console.info("this is null") + return + } + + var str = info.start.valueOf(); + const adate = new Date(str); + adate.setDate(adate.getDate() - 30); + const dateTimeNow = adate.toISOString(); + + this.productOrder.listProductOrder({ starttime: `${dateTimeNow}` }).subscribe( + + //this.productOrder.listProductOrder({ }).subscribe( + data => { this.productOrders = data }, + error => { + console.error(error) + failureCallback(error) + }, + () => { + successCallback( + Array.prototype.slice.call( // convert to array + this.productOrders + ).map(function(eventEl: ProductOrder) { + + // console.info("this is event: " + eventEl.id +" " + eventEl.requestedStartDate ) + // var result = new Date(eventEl.startDate); + // var evd = result.toISOString().replace(/T.*$/, ''); // YYYY-MM-DD of today + + return { + title: eventEl.id , + start: eventEl.requestedStartDate, + end: eventEl.expectedCompletionDate + } + }) + ) + + } + ) + + }.bind(this) + + }; + currentEvents: EventApi[] = []; + + + constructor( + private productOrder: ProductOrderService, + private router: Router + ) { } + + + productOrders: ProductOrder[] + dataSource = new MatTableDataSource() + + retrieveOrderList() { + this.productOrder.listProductOrder({}).subscribe( + data => { this.productOrders = data }, + error => { console.error(error) }, + () => { + + + } + ) + } + + + handleCalendarToggle() { + this.calendarVisible = !this.calendarVisible; + } + + handleWeekendsToggle() { + const { calendarOptions } = this; + calendarOptions.weekends = !calendarOptions.weekends; + } + + handleDateSelect(selectInfo: DateSelectArg) { + // const title = prompt('Please enter a new title for your event'); + // const calendarApi = selectInfo.view.calendar; + + // calendarApi.unselect(); // clear date selection + + // if (title) { + // calendarApi.addEvent({ + // id: createEventId(), + // title, + // start: selectInfo.startStr, + // end: selectInfo.endStr, + // allDay: selectInfo.allDay + // }); + // } + } + + handleEventClick(clickInfo: EventClickArg) { + // if (confirm(`Are you sure you want to delete the event '${clickInfo.event.title}'`)) { + // clickInfo.event.remove(); + // } + + ///services/service_order/{{element.id}} + this.router.navigate([`products/product_order/${clickInfo.event.title}`]); + + + } + + handleEvents(events: EventApi[]) { + this.currentEvents = events; + } + + + + + ngOnInit() { + + + + } + + +} \ No newline at end of file diff --git a/src/app/p_product/marketplace/preview-market-place-item/preview-market-place-item.component.html b/src/app/p_product/marketplace/preview-market-place-item/preview-market-place-item.component.html index ccb2bacd4d8ab7783148d3af4c96390a8ce311ae..0cdacb485c6852efc81d62205ffe9ec1be451c78 100644 --- a/src/app/p_product/marketplace/preview-market-place-item/preview-market-place-item.component.html +++ b/src/app/p_product/marketplace/preview-market-place-item/preview-market-place-item.component.html @@ -14,14 +14,16 @@
{{productOffering?.name}}
-
- +
+
+
+
Version @@ -29,14 +31,6 @@ {{productOffering?.version}}
-
- Bundle -
- {{productSpec?.isBundle}} - Not Specified -
-
- - - - - - - - - + \ No newline at end of file diff --git a/src/app/p_product/marketplace/preview-market-place-item/preview-market-place-item.component.ts b/src/app/p_product/marketplace/preview-market-place-item/preview-market-place-item.component.ts index c4e2e85cdaf0ff224638f1883b80def43319e64b..87031c89b3541a339659bf3f77e776f3f7570aee 100644 --- a/src/app/p_product/marketplace/preview-market-place-item/preview-market-place-item.component.ts +++ b/src/app/p_product/marketplace/preview-market-place-item/preview-market-place-item.component.ts @@ -1,11 +1,15 @@ import { trigger } from '@angular/animations'; -import { Component, OnInit, Inject } from '@angular/core'; +import { Component, OnInit, Inject, ViewChild } from '@angular/core'; import { MAT_DIALOG_DATA, MatDialogRef } from '@angular/material/dialog'; -import { ProductOffering, ProductSpecification } from 'src/app/openApis/productCatalogManagement/models'; -import { ProductSpecificationService } from 'src/app/openApis/productCatalogManagement/services'; +import { MatSort } from '@angular/material/sort'; +import { MatTableDataSource } from '@angular/material/table'; +import { ProductOffering, ProductSpecificationCharacteristicRes } from 'src/app/openApis/productCatalogManagement/models'; +import { ProductOfferingService } from 'src/app/openApis/productCatalogManagement/services'; import { fadeIn } from 'src/app/shared/animations/animations'; import { AuthService } from 'src/app/shared/services/auth.service'; import { ThemingService } from 'src/app/theming/theming.service'; +import { ProductRequesterService } from '../../orderCheckout/services/product-requester.service'; +import { ToastrService } from 'ngx-toastr'; @Component({ selector: 'app-preview-market-place-item', @@ -20,47 +24,83 @@ export class PreviewMarketPlaceItemComponent implements OnInit { productOffering: ProductOffering }, private dialogRef: MatDialogRef, - private specService: ProductSpecificationService, + private productOfferingService: ProductOfferingService, private themingService: ThemingService, - public authService: AuthService + public authService: AuthService, + private productRequesterService: ProductRequesterService, + private toastr: ToastrService ) { } productOffering: ProductOffering - productSpec: ProductSpecification finishedLoading: boolean = false specLogoUrl: string + dataSource = new MatTableDataSource(); + displayedColumns = ['name', 'defaultValues']; + + @ViewChild('sort1', {static: true}) sort1: MatSort; + ngOnInit(): void { this.productOffering = this.data.productOffering - if (this.productOffering.productSpecification && this.productOffering.productSpecification.id) { - this.retrieveProductSpec(this.data.productOffering) + + if (this.productOffering.prodSpecCharValueUse) { + this.dataSource.data = this.productOffering.prodSpecCharValueUse; + this.dataSource.sort = this.sort1; + } + + // Logic to fetch logo or extra spec details + if (this.productOffering && this.productOffering.id) { + this.retrieveProductOffering(this.data.productOffering) } else { this.specLogoUrl = this.themingService.getConfig().DEPLOYMENT_LOGO_PATH this.finishedLoading = true } } - retrieveProductSpec(offering: ProductOffering) { - this.specService.retrieveProductSpecification({ id: offering.productSpecification.id }).subscribe( - data => this.productSpec = data, + retrieveProductOffering(offering: ProductOffering) { + this.productOfferingService.retrieveProductOffering({ id: offering.id }).subscribe( + data => this.productOffering = data, error => console.error(error), () => { this.finishedLoading = true - //Check if spec has a defined logo this.specLogoUrl = this.themingService.getConfig().DEPLOYMENT_LOGO_PATH + + if (this.dataSource.data.length === 0 && this.productOffering.prodSpecCharValueUse == null) { + this.dataSource.data = this.productOffering.prodSpecCharValueUse; + this.dataSource.sort = this.sort1; + } } ) + } + placeInOrderList() { + if (!this.productRequesterService.orderedProductSpecsList.some(el => el.id === this.productOffering.id)) { + // this.requesterService.serviceSpecsCart.push(this.spec) + + this.productRequesterService.orderedProductSpecsList.push(this.productOffering) + this.saveOrderToLocalStorage(this.productOffering.id) + // this.requesterService.serviceConfigurationList.push({ + // spec: this.spec, + // checked: false, + // specCharacteristics: this.initCharacteristicsValue() + // }) + this.dialogRef.close("added_to_order_list") + } else { + this.toastr.warning("This Product is already in your Product Order List") + } } - placeInOrderList() {} + saveOrderToLocalStorage(specId) { + let orderArray = [] + orderArray = JSON.parse(localStorage.getItem('orderedProductSpecsList')) || [] + orderArray.push(specId) + localStorage.setItem('orderedProductSpecsList', JSON.stringify(orderArray)) + } closeDialog() { this.dialogRef.close() } - - -} +} \ No newline at end of file diff --git a/src/app/p_product/marketplace/product-marketplace.component.ts b/src/app/p_product/marketplace/product-marketplace.component.ts index 171f833463be5159242369f26dd92adcc1e8ed76..01bc8e6b6e6c64439e87e4e979654f50178e8197 100644 --- a/src/app/p_product/marketplace/product-marketplace.component.ts +++ b/src/app/p_product/marketplace/product-marketplace.component.ts @@ -3,7 +3,7 @@ import { AppService } from 'src/app/shared/services/app.service'; import { TreeServiceMarketPlaceService } from './services/tree-service-market-place.service'; import { MatDialog } from '@angular/material/dialog'; import { SortingService } from 'src/app/shared/functions/sorting.service'; -import { CatalogService, ProductOfferingService } from 'src/app/openApis/productCatalogManagement/services'; +import { CatalogService, ProductOfferingService, CategoryService } from 'src/app/openApis/productCatalogManagement/services'; import { Catalog, Category, CategoryRef, ProductOffering, ProductOfferingRef } from 'src/app/openApis/productCatalogManagement/models'; import { UntypedFormControl } from '@angular/forms'; import { Observable, Subscription } from 'rxjs'; @@ -19,7 +19,6 @@ import { ThemingService } from 'src/app/theming/theming.service'; templateUrl: './product-marketplace.component.html', styleUrls: ['./product-marketplace.component.scss'], animations: [ trigger('simpleFade', simpleFade()) ] - }) export class ProductMarketplaceComponent implements OnInit { @@ -27,6 +26,7 @@ export class ProductMarketplaceComponent implements OnInit { private appService: AppService, private catalogService: CatalogService, private productOfferingService: ProductOfferingService, + private categoryService: CategoryService, private treeMarketPlaceService: TreeServiceMarketPlaceService, private dialog: MatDialog, private sortingService: SortingService, @@ -37,7 +37,6 @@ export class ProductMarketplaceComponent implements OnInit { isCatalogsCollapsed: Boolean[] = [] selectedCategoryRef: CategoryRef - selectedCategory: Category productOfferings: ProductOffering[] = [] @@ -50,9 +49,14 @@ export class ProductMarketplaceComponent implements OnInit { resultsNotFound: boolean = false subscriptions = new Subscription() + // key: Offering ID, value: array of Category References + offeringCategoryMap: Map = new Map(); + ngOnInit() { this.config = this.appService.config + this.buildOfferingCategoryMap(); + this.retrieveCatalogsList() this.treeMarketPlaceService.categorySelected$.subscribe( @@ -70,6 +74,34 @@ export class ProductMarketplaceComponent implements OnInit { ) } + buildOfferingCategoryMap() { + this.categoryService.listCategory({}).subscribe( + (allCategories: Category[]) => { + allCategories.forEach(category => { + if (category.productOffering && category.productOffering.length > 0) { + + category.productOffering.forEach(offeringRef => { + const existingCategories = this.offeringCategoryMap.get(offeringRef.id) || []; + + const catRef: CategoryRef = { + id: category.id, + name: category.name, + "@type": "CategoryRef" + }; + + if (!existingCategories.some(c => c.id === catRef.id)) { + existingCategories.push(catRef); + } + + this.offeringCategoryMap.set(offeringRef.id, existingCategories); + }); + } + }); + }, + error => console.error('Failed to build category map', error) + ); + } + retrieveCatalogsList() { this.catalogService.listCatalog({}).subscribe( data => { this.productCatalogs = data }, @@ -86,26 +118,17 @@ export class ProductMarketplaceComponent implements OnInit { data => { let productOffering: ProductOffering = data // offering.fetchingLogo = true - productOffering['logo'] = this.themingService.getConfig().DEFAULT_SERVICE_LOGO_PATH //set Default App Image, path defined in theming.service.ts + productOffering['logo'] = this.themingService.getConfig().DEFAULT_SERVICE_LOGO_PATH - this.productOfferings.push(productOffering) - - // this.specificationService.getAttachment({id: data.serviceSpecification.id, attid:'logo'}).subscribe( - // data => { - // const reader = new FileReader(); - // reader.readAsDataURL(data); - // reader.onload = (__event) => { - // const base64data = reader.result; - // this.serviceCandidates.find(cand => cand.id === candidateRef.id).logo = base64data - // candidate.fetchingLogo = false - // } - // }, - // error => { - // candidate.fetchingLogo = false - // // console.error (error) - // } - // ) + if (this.offeringCategoryMap.has(productOffering.id)) { + if (!productOffering.category || productOffering.category.length === 0) { + productOffering.category = this.offeringCategoryMap.get(productOffering.id); + } else { + productOffering.category = this.offeringCategoryMap.get(productOffering.id); + } + } + this.productOfferings.push(productOffering) }, error => { console.error(error) }, () => { @@ -138,4 +161,4 @@ export class ProductMarketplaceComponent implements OnInit { this.subscriptions.unsubscribe() } -} +} \ No newline at end of file diff --git a/src/app/p_product/orderCheckout/product-order-checkout/product-order-checkout.component.html b/src/app/p_product/orderCheckout/product-order-checkout/product-order-checkout.component.html new file mode 100644 index 0000000000000000000000000000000000000000..03913a68c61ff53635f97e9f226ba6ffb6aeca01 --- /dev/null +++ b/src/app/p_product/orderCheckout/product-order-checkout/product-order-checkout.component.html @@ -0,0 +1,217 @@ +
+ + +

Product Order Checkout

+ +

+ Product Order List is empty +

+ + + +
+
+
+
+ Selected Product Configuration + {{selectedOrderSpecToView?.offering.name}} +
+
+ +
+ This product does not contain any configurable characteristics +
+ +
+
+
+
+ + + {{charForm.get('name').value}} {{charForm.get('valueType').value}} +
+ +
+
+ + + + + + + + + + + + + + + + + + + + Custom Value + + date_range + + + + + + + Custom Value + + + + + + + Custom Value + + + {{charValue.value.alias}} + + + + + + + Custom Value + + + {{charValue.value.alias}} + + + + + + +
+
+
+
+ + Custom Alias + + + + Custom Value + + +
+
+
+ +
+
+ +
+
+ +
+
+ +
+ +
+
+
+
+
+ + +
+
+ +
+ +
+ Order Item List + {{orderedSpecsConfigurationList.length}} +
+ +
    +
  • +
    +
    {{item.offering.name}}
    + {{item.offering.version}} +
    +
    + +
    +
  • +
+
+
+ +
+
+
+
+ Product Order Preferences +
+
+
+ + Notes about the order + + +
+
+ + Requested Start Date + + + date_range + + Date is displayed in Local Time (UTC: {{reqStartDate.value | date:'dd/MM/yy, HH:mm':'UTC'}}) + + + + Requested Completion Date + + date_range + + Date is displayed in Local Time (UTC: {{reqCompletionDate.value | date:'dd/MM/yy, HH:mm':'UTC'}}) + +
+
+ +
+
+
+
+ + +
+
+ +
+
+ +
\ No newline at end of file diff --git a/src/app/p_product/orderCheckout/product-order-checkout/product-order-checkout.component.scss b/src/app/p_product/orderCheckout/product-order-checkout/product-order-checkout.component.scss new file mode 100644 index 0000000000000000000000000000000000000000..fd36c88ccc4999bd789679e12e5f11b283995638 --- /dev/null +++ b/src/app/p_product/orderCheckout/product-order-checkout/product-order-checkout.component.scss @@ -0,0 +1,31 @@ +.shadow { + box-shadow: 0 2px 4px -1px rgba(0,0,0,.2), 0 4px 5px 0 rgba(0,0,0,.14), 0 1px 10px 0 rgba(0,0,0,.12); +} + +.selected-spec { + // color: #fff; + background-color: rgba(0, 0, 0, 0.06); + border-color: #ddd; +} + +.list-group-item { + cursor: pointer; +} + +.container { + min-height: 40vh; + display: flex; + flex-direction: column; + justify-content: center; +} + +.info-icon { + color:555; + cursor: pointer; +} + +.border-bottom { + border-bottom: 1px dotted rgba(0, 0, 0, 0.125); + margin-bottom: .75rem; +} + diff --git a/src/app/p_product/orderCheckout/product-order-checkout/product-order-checkout.component.ts b/src/app/p_product/orderCheckout/product-order-checkout/product-order-checkout.component.ts new file mode 100644 index 0000000000000000000000000000000000000000..3d0ae561f9d5980e33ce9801d13bd2ffdf843a9b --- /dev/null +++ b/src/app/p_product/orderCheckout/product-order-checkout/product-order-checkout.component.ts @@ -0,0 +1,301 @@ +import { Component, OnInit } from '@angular/core'; +import { ProductRequesterService, productSpecConfigurationListItem } from '../services/product-requester.service'; +import { UntypedFormArray, UntypedFormControl, UntypedFormGroup } from '@angular/forms'; +import { ProductOffering, ProductSpecificationCharacteristicRes, ProductSpecificationCharacteristicValue } from 'src/app/openApis/productCatalogManagement/models'; +import { Subscription } from 'rxjs'; +import { SortingService } from 'src/app/shared/functions/sorting.service'; +import { ToastrService } from 'ngx-toastr'; +import { ProductOrder, ProductOrderCreate, ProductOrderItem } from 'src/app/openApis/productOrderingManagement/models'; +import { AuthService } from 'src/app/shared/services/auth.service'; +import { Router } from '@angular/router'; +import { ProductOrderService } from 'src/app/openApis/productOrderingManagement/services'; +import { AppService } from 'src/app/shared/services/app.service'; + +const today = new Date(); + +@Component({ + selector: 'app-product-order-checkout', + templateUrl: './product-order-checkout.component.html', + styleUrls: ['./product-order-checkout.component.scss'] +}) +export class ProductOrderCheckoutComponent implements OnInit { + + constructor( + private productRequesterService: ProductRequesterService, + private sortingService: SortingService, + private authService: AuthService, + private router: Router, + private orderService: ProductOrderService, + private toastr: ToastrService, + private appService: AppService + ) { } + + subscription = new Subscription + serviceNoteCtrl = new UntypedFormControl('') + reqStartDate = new UntypedFormControl(new Date()) + reqCompletionDate = new UntypedFormControl(new Date(new Date().setDate(today.getDate() + 1))) + + specCharFormArray = new UntypedFormArray([]) + + configurableSpecChar: ProductSpecificationCharacteristicRes[] = [] + + orderedSpecsConfigurationList: productSpecConfigurationListItem[] = [] + selectedOrderSpecToView: productSpecConfigurationListItem + + ngOnInit(): void { + if (this.productRequesterService.orderedProductSpecsList.length === 0) { + this.freshLoadOrderListChanges() + } + + this.populateOrderedSpecsConfigurationList() + } + + freshLoadOrderListChanges() { + let storageOrderArray = [] + storageOrderArray = JSON.parse(localStorage.getItem('orderedProductSpecsList')) || [] + + this.subscription = this.productRequesterService.orderListUpdated$.subscribe( + () => { + if (storageOrderArray.length && (storageOrderArray.length === this.productRequesterService.orderedProductSpecsList.length)) { + this.populateOrderedSpecsConfigurationList() + } + } + ) + } + + populateOrderedSpecsConfigurationList() { + this.productRequesterService.orderedProductSpecsList.forEach(orderedSpec => { + this.orderedSpecsConfigurationList.push({ + offering: orderedSpec, + checked: false, + specCharacteristics: this.initCharacteristicsValue(orderedSpec) + }) + }) + + this.selectedOrderSpecToView = this.orderedSpecsConfigurationList[0] + + if (this.orderedSpecsConfigurationList.length) { + this.initValuesForm() + } + } + + initCharacteristicsValue(orderedSpec: ProductOffering): { name: string; valueType: string; value: ProductSpecificationCharacteristicValue[]; }[] { + let initialCharValues: { + name: string, + valueType: string, + value: ProductSpecificationCharacteristicRes[] + }[] = [] + + const configurableSpecChar = orderedSpec.prodSpecCharValueUse; + + configurableSpecChar.forEach(confSpecChar => { + + const charDefaultValueArray = confSpecChar.productSpecCharacteristicValue.filter(val => val.isDefault) + + //In case there are no Default Values assigned, initiate Default Value Array with null values + if (charDefaultValueArray.length === 0) { charDefaultValueArray[0] = { value: { value: '', alias: '' } } } + + initialCharValues.push({ + name: confSpecChar.name, + valueType: confSpecChar.valueType, + value: charDefaultValueArray + }) + }) + + return initialCharValues + } + + initValuesForm() { + this.specCharFormArray = new UntypedFormArray([]) + const formArray = this.specCharFormArray as UntypedFormArray + this.configurableSpecChar = this.selectedOrderSpecToView.offering.prodSpecCharValueUse; + + //Sort Configurable Characteristics by Asc Name Order + this.configurableSpecChar.sort(this.sortingService.ascStringSortingFunctionByNameProperty()) + + this.configurableSpecChar.forEach((confSpecChar) => { + formArray.push(this.updateFormArrayItem(confSpecChar)) + }) + } + + updateFormArrayItem(specChar: ProductSpecificationCharacteristicRes): UntypedFormGroup { + const charValueArray = this.orderedSpecsConfigurationList.find(listItem => listItem.offering.id === this.selectedOrderSpecToView.offering.id).specCharacteristics.find(char => char.name === specChar.name).value + + return new UntypedFormGroup({ + name: new UntypedFormControl(specChar.name), + valueType: new UntypedFormControl(specChar.valueType), + value: new UntypedFormControl(charValueArray) + }) + } + + addToArrayCharacteristicValue(characteristic: ProductSpecificationCharacteristicRes) { + this.orderedSpecsConfigurationList.find(listItem => listItem.offering.id === this.selectedOrderSpecToView.offering.id).specCharacteristics.find(char => char.name === characteristic.name).value.push( + { + isDefault: true, + valueType: characteristic.productSpecCharacteristicValue[0].valueType, + value: { value: '', alias: '' } + } + ) + } + + deleteFromArrayCharacteristicValue(characteristic: ProductSpecificationCharacteristicRes, index) { + this.orderedSpecsConfigurationList.find(listItem => listItem.offering.id === this.selectedOrderSpecToView.offering.id).specCharacteristics.find(char => char.name === characteristic.name).value.splice(index, 1) + } + + viewAndConfigureSpec(item: productSpecConfigurationListItem) { + this.updateActiveProductInList() + this.selectedOrderSpecToView = item + this.initValuesForm() + } + + removeSpecFromCart(item: productSpecConfigurationListItem) { + const toBeRemovedSpecIndex = this.orderedSpecsConfigurationList.findIndex(el => el.offering.id === item.offering.id) + this.selectedOrderSpecToView = null + + this.orderedSpecsConfigurationList.splice(toBeRemovedSpecIndex, 1) + this.productRequesterService.orderedProductSpecsList.splice(toBeRemovedSpecIndex, 1) + this.removeOrderFromLocalStorage(item.offering.id) + + if (toBeRemovedSpecIndex === this.orderedSpecsConfigurationList.length) { + this.selectedOrderSpecToView = this.orderedSpecsConfigurationList[toBeRemovedSpecIndex - 1] + } else { + this.selectedOrderSpecToView = this.orderedSpecsConfigurationList[toBeRemovedSpecIndex] + } + this.initValuesForm(); + } + + removeOrderFromLocalStorage(specId) { + let orderArray = [] + orderArray = JSON.parse(localStorage.getItem('orderedProductSpecsList')) || [] + if (orderArray.length) { + orderArray.splice(orderArray.findIndex(el => el === specId), 1) + } + localStorage.setItem('orderedProductSpecsList', JSON.stringify(orderArray)) + } + + submitOrder() { + + this.updateActiveProductInList(); + + const startDate = this.reqStartDate.value + ? new Date(this.reqStartDate.value).toISOString() + : new Date().toISOString(); + + const completionDate = this.reqCompletionDate.value + ? new Date(this.reqCompletionDate.value).toISOString() + : new Date().toISOString(); + + let newOrder: ProductOrderCreate = { + category: "Product Order", + description: "Product Order via Portal", + requestedStartDate: startDate, + requestedCompletionDate: completionDate, + productOrderItem: [], + relatedParty: [], + note: [] + }; + + if (this.authService.portalUserJWT) { + newOrder.relatedParty.push({ + role: 'REQUESTER', + name: this.authService.portalUserJWT.preferred_username || 'Unknown', + }); + } + + if (this.serviceNoteCtrl.value) { + newOrder.note.push({ + author: this.authService.portalUserJWT?.preferred_username || 'User', + text: this.serviceNoteCtrl.value, + date: new Date().toISOString() + }); + } + + this.orderedSpecsConfigurationList.forEach((productItem, index) => { + if (!productItem.offering?.id) return; + + const pChars = []; + + productItem.specCharacteristics.forEach((characteristic) => { + const validItems = characteristic.value.filter(el => el.value && el.value.value && String(el.value.value).trim() !== ''); + + if (validItems.length > 0) { + let finalValue: any; + + if (characteristic.valueType === 'SET' || characteristic.valueType === 'ARRAY') { + finalValue = JSON.stringify(validItems.map(el => ({ value: el.value.value, alias: el.value.alias }))); + } + else { + let rawValue = validItems[0].value.value; + + if (characteristic.valueType === 'INTEGER') { + finalValue = {value: parseInt(rawValue as string), alias: validItems[0].value.alias}; + } else if (characteristic.valueType === 'FLOAT') { + finalValue = {value: parseFloat(rawValue as string), alias: validItems[0].value.alias}; + } else if (characteristic.valueType === 'BOOLEAN') { + finalValue = {value: (String(rawValue).toLowerCase() === 'true'), alias: validItems[0].value.alias}; + } else { + finalValue = {value: rawValue, alias: validItems[0].value.alias}; + } + } + + pChars.push({ + name: characteristic.name, + valueType: characteristic.valueType, + value: finalValue + }); + } + }); + + const newOrderItem: ProductOrderItem = { + id: (index + 1).toString(), + action: 'ADD', + quantity: 1, + productOffering: { + id: productItem.offering.id, + name: productItem.offering.name + }, + product: { + productCharacteristic: pChars, + productSpecification: productItem.offering.productSpecification ? { + id: productItem.offering.productSpecification.id, + name: productItem.offering.name, + version: productItem.offering.version + } : undefined + } as any + }; + + newOrder.productOrderItem.push(newOrderItem); + }); + + + this.orderService.createProductOrder({ body: newOrder }).subscribe({ + next: (createdOrder: ProductOrder) => { + this.toastr.success("Order Placed Successfully"); + + this.orderedSpecsConfigurationList = []; + this.productRequesterService.orderedProductSpecsList = []; + localStorage.removeItem('orderedProductSpecsList'); + + if (createdOrder?.id) { + this.router.navigate(["products", 'product_order', createdOrder.id]); + } else { + this.router.navigate(["products", 'product_orders']); + } + }, + error: (error) => { + console.error("Submission Error:", error); + this.toastr.error("Product Order Failed"); + } + }); + } + + + updateActiveProductInList() { + this.orderedSpecsConfigurationList.find(listItem => listItem.offering.id === this.selectedOrderSpecToView.offering.id).specCharacteristics = this.specCharFormArray.value + } + + ngOnDestroy() { + this.subscription.unsubscribe() + } + +} \ No newline at end of file diff --git a/src/app/p_product/orderCheckout/services/product-requester.service.ts b/src/app/p_product/orderCheckout/services/product-requester.service.ts new file mode 100644 index 0000000000000000000000000000000000000000..07f60cd1eb44f8f179100382e0d4552850f2ab30 --- /dev/null +++ b/src/app/p_product/orderCheckout/services/product-requester.service.ts @@ -0,0 +1,44 @@ +import { Injectable } from '@angular/core'; +import { ProductSpecification, ProductOffering, ProductSpecificationCharacteristicValue, ProductSpecificationCharacteristicRes } from 'src/app/openApis/productCatalogManagement/models'; +import { Subject } from 'rxjs'; +import { ProductOfferingService } from 'src/app/openApis/productCatalogManagement/services'; + +@Injectable({ + providedIn: 'root' +}) +export class ProductRequesterService { + + orderedProductSpecsList: ProductOffering[] = [] + + orderListUpdated$ = new Subject() + + constructor( + private specService: ProductOfferingService + ) { + const orderList: string[] = JSON.parse(localStorage.getItem('orderedProductSpecsList')) + if (orderList && (this.orderedProductSpecsList.length === 0 || orderList.length !== this.orderedProductSpecsList.length)) { + orderList.forEach(specId => { + if (!this.orderedProductSpecsList.some(el => el.id === specId)) { + this.specService.retrieveProductOffering({id: specId}).subscribe( + data => { + this.orderedProductSpecsList.push(data) + this.orderListUpdated$.next(true) + }, + error => { + this.orderedProductSpecsList = [] + localStorage.removeItem('orderedProductSpecsList') + } + ) + } + }); + } + } +} +export interface productSpecConfigurationListItem { + checked:boolean, + offering: ProductOffering, + specCharacteristics: { + name: string, + valueType: string, + value: ProductSpecificationCharacteristicValue[] }[] +} diff --git a/src/app/shared/navbar/navbar.component.html b/src/app/shared/navbar/navbar.component.html index 61d2099e9c28400d4d20a0fece63654667e240ef..f9cbd9eee69c3044e6cadd1d2965bd1c4e4c499a 100644 --- a/src/app/shared/navbar/navbar.component.html +++ b/src/app/shared/navbar/navbar.component.html @@ -203,6 +203,8 @@
  • Product Categories
  • Product Offerings
  • Product Specifications
  • + +
  • Product Orders
  • +