@smartnowx/hcms-plugin-event-manager 0.0.23 → 0.0.25
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/esm2022/lib/artist.service.mjs +28 -0
- package/esm2022/lib/event.service.mjs +42 -0
- package/esm2022/lib/hcms-plugin-event-manager.module.mjs +31 -0
- package/esm2022/lib/models/Artist.mjs +2 -0
- package/esm2022/lib/models/Event.mjs +2 -0
- package/esm2022/lib/models/Organization.mjs +2 -0
- package/esm2022/lib/models/PromotionCode.mjs +2 -0
- package/esm2022/lib/models/Stage.mjs +2 -0
- package/esm2022/lib/models/Ticket.mjs +2 -0
- package/esm2022/lib/models/TicketOffice.mjs +2 -0
- package/esm2022/lib/models/TicketType.mjs +2 -0
- package/esm2022/lib/models/Venue.mjs +2 -0
- package/esm2022/lib/promotion-code.service.mjs +28 -0
- package/esm2022/lib/stage.service.mjs +28 -0
- package/esm2022/lib/ticket-office.service.mjs +28 -0
- package/esm2022/lib/ticket-type.service.mjs +28 -0
- package/esm2022/lib/venue.service.mjs +28 -0
- package/esm2022/public-api.mjs +21 -0
- package/esm2022/smartnowx-hcms-plugin-event-manager.mjs +5 -0
- package/fesm2022/smartnowx-hcms-plugin-event-manager.mjs +220 -0
- package/fesm2022/smartnowx-hcms-plugin-event-manager.mjs.map +1 -0
- package/index.d.ts +5 -0
- package/lib/artist.service.d.ts +14 -0
- package/lib/event.service.d.ts +16 -0
- package/lib/hcms-plugin-event-manager.module.d.ts +11 -0
- package/{src/lib/models/Artist.ts → lib/models/Artist.d.ts} +2 -2
- package/{src/lib/models/Event.ts → lib/models/Event.d.ts} +4 -2
- package/{src/lib/models/Organization.ts → lib/models/Organization.d.ts} +2 -4
- package/{src/lib/models/PromotionCode.ts → lib/models/PromotionCode.d.ts} +1 -1
- package/{src/lib/models/Stage.ts → lib/models/Stage.d.ts} +2 -2
- package/{src/lib/models/Ticket.ts → lib/models/Ticket.d.ts} +1 -4
- package/lib/models/TicketOffice.d.ts +19 -0
- package/{src/lib/models/TicketType.ts → lib/models/TicketType.d.ts} +3 -5
- package/{src/lib/models/Venue.ts → lib/models/Venue.d.ts} +1 -3
- package/lib/promotion-code.service.d.ts +14 -0
- package/lib/stage.service.d.ts +14 -0
- package/lib/ticket-office.service.d.ts +14 -0
- package/lib/ticket-type.service.d.ts +14 -0
- package/lib/venue.service.d.ts +14 -0
- package/package.json +16 -3
- package/{src/public-api.ts → public-api.d.ts} +0 -6
- package/eslint.config.js +0 -32
- package/ng-package.json +0 -7
- package/src/lib/artist.service.ts +0 -24
- package/src/lib/event.service.ts +0 -37
- package/src/lib/hcms-plugin-event-manager.module.ts +0 -27
- package/src/lib/models/TicketOffice.ts +0 -19
- package/src/lib/promotion-code.service.ts +0 -19
- package/src/lib/stage.service.ts +0 -24
- package/src/lib/ticket-office.service.ts +0 -24
- package/src/lib/ticket-type.service.ts +0 -24
- package/src/lib/venue.service.ts +0 -24
- package/tsconfig.lib.json +0 -15
- package/tsconfig.lib.prod.json +0 -11
- package/tsconfig.spec.json +0 -15
package/index.d.ts
ADDED
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { HttpClient } from '@angular/common/http';
|
|
2
|
+
import { Observable } from 'rxjs';
|
|
3
|
+
import { Artist } from './models/Artist';
|
|
4
|
+
import { HcmsClientConfig } from '@smartnowx/hcms-commons';
|
|
5
|
+
import * as i0 from "@angular/core";
|
|
6
|
+
export declare class ArtistService {
|
|
7
|
+
private config;
|
|
8
|
+
private http;
|
|
9
|
+
private apiUrl;
|
|
10
|
+
constructor(config: HcmsClientConfig, http: HttpClient);
|
|
11
|
+
getArtists(eventId: number): Observable<Artist[]>;
|
|
12
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<ArtistService, never>;
|
|
13
|
+
static ɵprov: i0.ɵɵInjectableDeclaration<ArtistService>;
|
|
14
|
+
}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { HttpClient } from '@angular/common/http';
|
|
2
|
+
import { Observable } from 'rxjs';
|
|
3
|
+
import { Event } from './models/Event';
|
|
4
|
+
import { HcmsClientConfig } from '@smartnowx/hcms-commons';
|
|
5
|
+
import * as i0 from "@angular/core";
|
|
6
|
+
export declare class EventService {
|
|
7
|
+
private config;
|
|
8
|
+
private http;
|
|
9
|
+
private apiUrl;
|
|
10
|
+
private readonly storagePath;
|
|
11
|
+
constructor(config: HcmsClientConfig, http: HttpClient);
|
|
12
|
+
getEvent(eventId: number, relations?: string[]): Observable<Event>;
|
|
13
|
+
private handleImage;
|
|
14
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<EventService, never>;
|
|
15
|
+
static ɵprov: i0.ɵɵInjectableDeclaration<EventService>;
|
|
16
|
+
}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { ModuleWithProviders } from '@angular/core';
|
|
2
|
+
import { HcmsClientConfig } from '@smartnowx/hcms-commons';
|
|
3
|
+
import * as i0 from "@angular/core";
|
|
4
|
+
import * as i1 from "@angular/platform-browser";
|
|
5
|
+
import * as i2 from "@angular/common/http";
|
|
6
|
+
export declare class HcmsEventManagerPluginModule {
|
|
7
|
+
static forRoot(configuration: HcmsClientConfig): ModuleWithProviders<HcmsEventManagerPluginModule>;
|
|
8
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<HcmsEventManagerPluginModule, never>;
|
|
9
|
+
static ɵmod: i0.ɵɵNgModuleDeclaration<HcmsEventManagerPluginModule, never, [typeof i1.BrowserModule, typeof i2.HttpClientModule], never>;
|
|
10
|
+
static ɵinj: i0.ɵɵInjectorDeclaration<HcmsEventManagerPluginModule>;
|
|
11
|
+
}
|
|
@@ -1,6 +1,8 @@
|
|
|
1
|
+
import { Organization } from "./Organization";
|
|
1
2
|
export interface Event {
|
|
2
3
|
id: number;
|
|
3
4
|
organization_id: number;
|
|
5
|
+
organization?: Organization | null;
|
|
4
6
|
name: string;
|
|
5
7
|
type: string;
|
|
6
8
|
description: string;
|
|
@@ -14,5 +16,5 @@ export interface Event {
|
|
|
14
16
|
secondary_image: string;
|
|
15
17
|
created_at?: Date;
|
|
16
18
|
updated_at?: Date;
|
|
17
|
-
active: number;
|
|
18
|
-
|
|
19
|
+
active: number;
|
|
20
|
+
}
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
export interface Organization {
|
|
2
|
-
|
|
3
2
|
id: number;
|
|
4
3
|
name: string;
|
|
5
4
|
image: string;
|
|
@@ -9,6 +8,5 @@ export interface Organization {
|
|
|
9
8
|
transaction_fee_percentage?: number | null;
|
|
10
9
|
created_at: Date | null;
|
|
11
10
|
updated_at: Date | null;
|
|
12
|
-
active: number;
|
|
13
|
-
|
|
14
|
-
}
|
|
11
|
+
active: number;
|
|
12
|
+
}
|
|
@@ -1,6 +1,4 @@
|
|
|
1
|
-
|
|
2
1
|
export interface Ticket {
|
|
3
|
-
|
|
4
2
|
id: number;
|
|
5
3
|
type_id: number;
|
|
6
4
|
status: number;
|
|
@@ -13,6 +11,5 @@ export interface Ticket {
|
|
|
13
11
|
laravel_through_key: number;
|
|
14
12
|
created_at: string | null;
|
|
15
13
|
updated_at: string | null;
|
|
16
|
-
active: number;
|
|
17
|
-
|
|
14
|
+
active: number;
|
|
18
15
|
}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
export interface TicketOffice {
|
|
2
|
+
id: number;
|
|
3
|
+
name: string;
|
|
4
|
+
postcode: number;
|
|
5
|
+
city: string;
|
|
6
|
+
address: string;
|
|
7
|
+
location: string;
|
|
8
|
+
quota: number;
|
|
9
|
+
organization_id: number;
|
|
10
|
+
email: string;
|
|
11
|
+
phone: string;
|
|
12
|
+
leader_id: number;
|
|
13
|
+
opening_days: string;
|
|
14
|
+
open: string;
|
|
15
|
+
close: string;
|
|
16
|
+
created_at?: Date;
|
|
17
|
+
updated_at?: Date;
|
|
18
|
+
active: number;
|
|
19
|
+
}
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
export interface TicketType {
|
|
2
|
-
|
|
3
2
|
id: number;
|
|
4
3
|
name: string;
|
|
5
4
|
description: string;
|
|
@@ -9,14 +8,13 @@ export interface TicketType {
|
|
|
9
8
|
event_id: number;
|
|
10
9
|
sale_start: Date;
|
|
11
10
|
sale_end: Date;
|
|
12
|
-
valid_from?: Date
|
|
13
|
-
valid_to?: Date
|
|
11
|
+
valid_from?: Date;
|
|
12
|
+
valid_to?: Date;
|
|
14
13
|
max_available: number;
|
|
15
14
|
subtype_data?: any;
|
|
16
15
|
queue?: number;
|
|
17
16
|
created_at?: Date;
|
|
18
17
|
updated_at?: Date;
|
|
19
18
|
isSoldOut?: boolean;
|
|
20
|
-
active: number;
|
|
21
|
-
|
|
19
|
+
active: number;
|
|
22
20
|
}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { Observable } from "rxjs";
|
|
2
|
+
import { HttpClient } from "@angular/common/http";
|
|
3
|
+
import { HcmsClientConfig } from "@smartnowx/hcms-commons";
|
|
4
|
+
import { PromotionCode } from "./models/PromotionCode";
|
|
5
|
+
import * as i0 from "@angular/core";
|
|
6
|
+
export declare class PromotionCodeService {
|
|
7
|
+
private config;
|
|
8
|
+
private http;
|
|
9
|
+
private apiUrl;
|
|
10
|
+
constructor(config: HcmsClientConfig, http: HttpClient);
|
|
11
|
+
validateCode(code: string): Observable<PromotionCode>;
|
|
12
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<PromotionCodeService, never>;
|
|
13
|
+
static ɵprov: i0.ɵɵInjectableDeclaration<PromotionCodeService>;
|
|
14
|
+
}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { HttpClient } from '@angular/common/http';
|
|
2
|
+
import { Observable } from 'rxjs';
|
|
3
|
+
import { HcmsClientConfig } from '@smartnowx/hcms-commons';
|
|
4
|
+
import { Stage } from '../public-api';
|
|
5
|
+
import * as i0 from "@angular/core";
|
|
6
|
+
export declare class StageService {
|
|
7
|
+
private config;
|
|
8
|
+
private http;
|
|
9
|
+
private apiUrl;
|
|
10
|
+
constructor(config: HcmsClientConfig, http: HttpClient);
|
|
11
|
+
getStages(venueId: number): Observable<Stage[]>;
|
|
12
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<StageService, never>;
|
|
13
|
+
static ɵprov: i0.ɵɵInjectableDeclaration<StageService>;
|
|
14
|
+
}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { HttpClient } from '@angular/common/http';
|
|
2
|
+
import { Observable } from 'rxjs';
|
|
3
|
+
import { HcmsClientConfig } from '@smartnowx/hcms-commons';
|
|
4
|
+
import { TicketOffice } from './models/TicketOffice';
|
|
5
|
+
import * as i0 from "@angular/core";
|
|
6
|
+
export declare class TicketOfficeService {
|
|
7
|
+
private config;
|
|
8
|
+
private http;
|
|
9
|
+
private apiUrl;
|
|
10
|
+
constructor(config: HcmsClientConfig, http: HttpClient);
|
|
11
|
+
getTicketOffices(): Observable<TicketOffice[]>;
|
|
12
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<TicketOfficeService, never>;
|
|
13
|
+
static ɵprov: i0.ɵɵInjectableDeclaration<TicketOfficeService>;
|
|
14
|
+
}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { Observable } from 'rxjs';
|
|
2
|
+
import { HttpClient } from '@angular/common/http';
|
|
3
|
+
import { HcmsClientConfig } from '@smartnowx/hcms-commons';
|
|
4
|
+
import { TicketType } from './models/TicketType';
|
|
5
|
+
import * as i0 from "@angular/core";
|
|
6
|
+
export declare class TicketTypeService {
|
|
7
|
+
private config;
|
|
8
|
+
private http;
|
|
9
|
+
private apiUrl;
|
|
10
|
+
constructor(config: HcmsClientConfig, http: HttpClient);
|
|
11
|
+
getTicketTypes(eventId: number): Observable<TicketType[]>;
|
|
12
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<TicketTypeService, never>;
|
|
13
|
+
static ɵprov: i0.ɵɵInjectableDeclaration<TicketTypeService>;
|
|
14
|
+
}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { HttpClient } from '@angular/common/http';
|
|
2
|
+
import { Observable } from 'rxjs';
|
|
3
|
+
import { HcmsClientConfig } from '@smartnowx/hcms-commons';
|
|
4
|
+
import { Venue } from './models/Venue';
|
|
5
|
+
import * as i0 from "@angular/core";
|
|
6
|
+
export declare class VenueService {
|
|
7
|
+
private config;
|
|
8
|
+
private http;
|
|
9
|
+
private apiUrl;
|
|
10
|
+
constructor(config: HcmsClientConfig, http: HttpClient);
|
|
11
|
+
getVenues(): Observable<Venue[]>;
|
|
12
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<VenueService, never>;
|
|
13
|
+
static ɵprov: i0.ɵɵInjectableDeclaration<VenueService>;
|
|
14
|
+
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@smartnowx/hcms-plugin-event-manager",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.25",
|
|
4
4
|
"peerDependencies": {
|
|
5
5
|
"@angular/common": "^18.2.0",
|
|
6
6
|
"@angular/core": "^18.2.0",
|
|
@@ -9,5 +9,18 @@
|
|
|
9
9
|
"dependencies": {
|
|
10
10
|
"tslib": "^2.3.0"
|
|
11
11
|
},
|
|
12
|
-
"sideEffects": false
|
|
13
|
-
|
|
12
|
+
"sideEffects": false,
|
|
13
|
+
"module": "fesm2022/smartnowx-hcms-plugin-event-manager.mjs",
|
|
14
|
+
"typings": "index.d.ts",
|
|
15
|
+
"exports": {
|
|
16
|
+
"./package.json": {
|
|
17
|
+
"default": "./package.json"
|
|
18
|
+
},
|
|
19
|
+
".": {
|
|
20
|
+
"types": "./index.d.ts",
|
|
21
|
+
"esm2022": "./esm2022/smartnowx-hcms-plugin-event-manager.mjs",
|
|
22
|
+
"esm": "./esm2022/smartnowx-hcms-plugin-event-manager.mjs",
|
|
23
|
+
"default": "./fesm2022/smartnowx-hcms-plugin-event-manager.mjs"
|
|
24
|
+
}
|
|
25
|
+
}
|
|
26
|
+
}
|
|
@@ -1,9 +1,4 @@
|
|
|
1
|
-
/*
|
|
2
|
-
* Public API Surface of hcms-plugin-event-manager
|
|
3
|
-
*/
|
|
4
|
-
|
|
5
1
|
export * from './lib/hcms-plugin-event-manager.module';
|
|
6
|
-
|
|
7
2
|
export * from './lib/event.service';
|
|
8
3
|
export * from './lib/ticket-type.service';
|
|
9
4
|
export * from './lib/artist.service';
|
|
@@ -11,7 +6,6 @@ export * from './lib/stage.service';
|
|
|
11
6
|
export * from './lib/venue.service';
|
|
12
7
|
export * from './lib/ticket-office.service';
|
|
13
8
|
export * from './lib/promotion-code.service';
|
|
14
|
-
|
|
15
9
|
export * from './lib/models/Artist';
|
|
16
10
|
export * from './lib/models/Organization';
|
|
17
11
|
export * from './lib/models/Event';
|
package/eslint.config.js
DELETED
|
@@ -1,32 +0,0 @@
|
|
|
1
|
-
// @ts-check
|
|
2
|
-
const tseslint = require("typescript-eslint");
|
|
3
|
-
const rootConfig = require("../../eslint.config.js");
|
|
4
|
-
|
|
5
|
-
module.exports = tseslint.config(
|
|
6
|
-
...rootConfig,
|
|
7
|
-
{
|
|
8
|
-
files: ["**/*.ts"],
|
|
9
|
-
rules: {
|
|
10
|
-
"@angular-eslint/directive-selector": [
|
|
11
|
-
"error",
|
|
12
|
-
{
|
|
13
|
-
type: "attribute",
|
|
14
|
-
prefix: "lib",
|
|
15
|
-
style: "camelCase",
|
|
16
|
-
},
|
|
17
|
-
],
|
|
18
|
-
"@angular-eslint/component-selector": [
|
|
19
|
-
"error",
|
|
20
|
-
{
|
|
21
|
-
type: "element",
|
|
22
|
-
prefix: "lib",
|
|
23
|
-
style: "kebab-case",
|
|
24
|
-
},
|
|
25
|
-
],
|
|
26
|
-
},
|
|
27
|
-
},
|
|
28
|
-
{
|
|
29
|
-
files: ["**/*.html"],
|
|
30
|
-
rules: {},
|
|
31
|
-
}
|
|
32
|
-
);
|
package/ng-package.json
DELETED
|
@@ -1,24 +0,0 @@
|
|
|
1
|
-
import { Injectable, Inject } from '@angular/core';
|
|
2
|
-
import { HttpClient } from '@angular/common/http';
|
|
3
|
-
import { Observable, retry } from 'rxjs';
|
|
4
|
-
import { Artist } from './models/Artist';
|
|
5
|
-
import { HcmsClientConfig } from '@smartnowx/hcms-commons';
|
|
6
|
-
|
|
7
|
-
@Injectable({
|
|
8
|
-
providedIn: 'root'
|
|
9
|
-
})
|
|
10
|
-
export class ArtistService {
|
|
11
|
-
|
|
12
|
-
private apiUrl = 'api/v1/event-manager/{eventId}/artists';
|
|
13
|
-
|
|
14
|
-
constructor(@Inject('config') private config: HcmsClientConfig, private http: HttpClient) { }
|
|
15
|
-
|
|
16
|
-
getArtists(eventId: number): Observable<Artist[]> {
|
|
17
|
-
|
|
18
|
-
return this.http.get<Artist[]>(this.config.host+'/'+this.apiUrl.replace('{eventId}', eventId.toString()))
|
|
19
|
-
.pipe(
|
|
20
|
-
retry(2)
|
|
21
|
-
);
|
|
22
|
-
}
|
|
23
|
-
|
|
24
|
-
}
|
package/src/lib/event.service.ts
DELETED
|
@@ -1,37 +0,0 @@
|
|
|
1
|
-
import { Inject, Injectable } from '@angular/core';
|
|
2
|
-
import { HttpClient } from '@angular/common/http';
|
|
3
|
-
import { Observable, retry, tap } from 'rxjs';
|
|
4
|
-
import { Event } from './models/Event';
|
|
5
|
-
import { HcmsClientConfig } from '@smartnowx/hcms-commons';
|
|
6
|
-
|
|
7
|
-
@Injectable({
|
|
8
|
-
providedIn: 'root'
|
|
9
|
-
})
|
|
10
|
-
export class EventService {
|
|
11
|
-
|
|
12
|
-
private apiUrl = 'api/v1/events/{eventId}';
|
|
13
|
-
private readonly storagePath: string;
|
|
14
|
-
|
|
15
|
-
constructor(@Inject('config') private config: HcmsClientConfig, private http: HttpClient) {
|
|
16
|
-
this.storagePath = `${this.config.host}/storage/images/events/`;
|
|
17
|
-
}
|
|
18
|
-
|
|
19
|
-
getEvent(eventId: number): Observable<Event> {
|
|
20
|
-
|
|
21
|
-
return this.http.get<Event>(`${this.config.host}/${this.apiUrl}?api_token=${this.config.apiToken}`.replace('{eventId}', eventId.toString()))
|
|
22
|
-
.pipe(
|
|
23
|
-
retry(2),
|
|
24
|
-
tap(e => this.handleImage(e))
|
|
25
|
-
);
|
|
26
|
-
}
|
|
27
|
-
|
|
28
|
-
private handleImage(p: Event) {
|
|
29
|
-
if (p.image) {
|
|
30
|
-
p.image = this.storagePath + p.image;
|
|
31
|
-
} else {
|
|
32
|
-
p.image = "https://dummyimage.com/720x600";
|
|
33
|
-
}
|
|
34
|
-
return p;
|
|
35
|
-
}
|
|
36
|
-
|
|
37
|
-
}
|
|
@@ -1,27 +0,0 @@
|
|
|
1
|
-
import { ModuleWithProviders, NgModule } from '@angular/core';
|
|
2
|
-
import { BrowserModule } from '@angular/platform-browser';
|
|
3
|
-
import { HttpClientModule } from '@angular/common/http';
|
|
4
|
-
import { HcmsClientConfig } from '@smartnowx/hcms-commons';
|
|
5
|
-
|
|
6
|
-
@NgModule({
|
|
7
|
-
declarations: [
|
|
8
|
-
],
|
|
9
|
-
imports: [
|
|
10
|
-
BrowserModule,
|
|
11
|
-
HttpClientModule
|
|
12
|
-
],
|
|
13
|
-
exports: [
|
|
14
|
-
]
|
|
15
|
-
})
|
|
16
|
-
export class HcmsEventManagerPluginModule {
|
|
17
|
-
|
|
18
|
-
static forRoot(configuration: HcmsClientConfig): ModuleWithProviders<HcmsEventManagerPluginModule> {
|
|
19
|
-
return {
|
|
20
|
-
ngModule: HcmsEventManagerPluginModule,
|
|
21
|
-
providers: [
|
|
22
|
-
{ provide: 'config', useValue: configuration }
|
|
23
|
-
]
|
|
24
|
-
};
|
|
25
|
-
}
|
|
26
|
-
|
|
27
|
-
}
|
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
export interface TicketOffice {
|
|
2
|
-
id: number;
|
|
3
|
-
name: string;
|
|
4
|
-
postcode: number;
|
|
5
|
-
city: string;
|
|
6
|
-
address: string;
|
|
7
|
-
location: string;
|
|
8
|
-
quota: number;
|
|
9
|
-
organization_id: number;
|
|
10
|
-
email: string;
|
|
11
|
-
phone: string;
|
|
12
|
-
leader_id: number;
|
|
13
|
-
opening_days: string;
|
|
14
|
-
open: string;
|
|
15
|
-
close: string;
|
|
16
|
-
created_at?: Date;
|
|
17
|
-
updated_at?: Date;
|
|
18
|
-
active: number;
|
|
19
|
-
}
|
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
import { Inject, Injectable } from "@angular/core";
|
|
2
|
-
import { Observable, retry } from "rxjs";
|
|
3
|
-
import { HttpClient } from "@angular/common/http";
|
|
4
|
-
import { HcmsClientConfig } from "@smartnowx/hcms-commons";
|
|
5
|
-
import { PromotionCode } from "./models/PromotionCode";
|
|
6
|
-
|
|
7
|
-
@Injectable({
|
|
8
|
-
providedIn: "root",
|
|
9
|
-
})
|
|
10
|
-
export class PromotionCodeService {
|
|
11
|
-
private apiUrl = "/api/v1/promotion-code/validate";
|
|
12
|
-
|
|
13
|
-
constructor(@Inject("config") private config: HcmsClientConfig, private http: HttpClient) {}
|
|
14
|
-
|
|
15
|
-
public validateCode(code: string): Observable<PromotionCode> {
|
|
16
|
-
return this.http.post<PromotionCode>(this.config.host + this.apiUrl + "/" + code, null)
|
|
17
|
-
.pipe(retry(2));
|
|
18
|
-
}
|
|
19
|
-
}
|
package/src/lib/stage.service.ts
DELETED
|
@@ -1,24 +0,0 @@
|
|
|
1
|
-
import { Injectable, Inject } from '@angular/core';
|
|
2
|
-
import { HttpClient } from '@angular/common/http';
|
|
3
|
-
import { Observable, retry } from 'rxjs';
|
|
4
|
-
import { HcmsClientConfig } from '@smartnowx/hcms-commons';
|
|
5
|
-
import { Stage } from '../public-api';
|
|
6
|
-
|
|
7
|
-
@Injectable({
|
|
8
|
-
providedIn: 'root'
|
|
9
|
-
})
|
|
10
|
-
export class StageService {
|
|
11
|
-
|
|
12
|
-
private apiUrl = 'api/v1/event-manager/venues/{venueId}/stages';
|
|
13
|
-
|
|
14
|
-
constructor(@Inject('config') private config: HcmsClientConfig, private http: HttpClient) { }
|
|
15
|
-
|
|
16
|
-
getStages(venueId: number): Observable<Stage[]> {
|
|
17
|
-
|
|
18
|
-
return this.http.get<Stage[]>(this.config.host+'/'+this.apiUrl.replace('{venueId}', venueId.toString()))
|
|
19
|
-
.pipe(
|
|
20
|
-
retry(2)
|
|
21
|
-
);
|
|
22
|
-
}
|
|
23
|
-
|
|
24
|
-
}
|
|
@@ -1,24 +0,0 @@
|
|
|
1
|
-
import { Injectable, Inject } from '@angular/core';
|
|
2
|
-
import { HttpClient } from '@angular/common/http';
|
|
3
|
-
import { Observable, retry } from 'rxjs';
|
|
4
|
-
import { HcmsClientConfig } from '@smartnowx/hcms-commons';
|
|
5
|
-
import { TicketOffice } from './models/TicketOffice';
|
|
6
|
-
|
|
7
|
-
@Injectable({
|
|
8
|
-
providedIn: 'root'
|
|
9
|
-
})
|
|
10
|
-
export class TicketOfficeService {
|
|
11
|
-
|
|
12
|
-
private apiUrl = 'api/v1/event-manager/{eventId}/ticket-offices';
|
|
13
|
-
|
|
14
|
-
constructor(@Inject('config') private config: HcmsClientConfig, private http: HttpClient) { }
|
|
15
|
-
|
|
16
|
-
getTicketOffices(): Observable<TicketOffice[]> {
|
|
17
|
-
|
|
18
|
-
return this.http.get<TicketOffice[]>(this.config.host+'/'+this.apiUrl)
|
|
19
|
-
.pipe(
|
|
20
|
-
retry(2)
|
|
21
|
-
);
|
|
22
|
-
}
|
|
23
|
-
|
|
24
|
-
}
|
|
@@ -1,24 +0,0 @@
|
|
|
1
|
-
import { Inject, Injectable } from '@angular/core';
|
|
2
|
-
import { Observable, retry } from 'rxjs';
|
|
3
|
-
import { HttpClient } from '@angular/common/http';
|
|
4
|
-
import { HcmsClientConfig } from '@smartnowx/hcms-commons';
|
|
5
|
-
import { TicketType } from './models/TicketType';
|
|
6
|
-
|
|
7
|
-
@Injectable({
|
|
8
|
-
providedIn: 'root'
|
|
9
|
-
})
|
|
10
|
-
export class TicketTypeService {
|
|
11
|
-
|
|
12
|
-
private apiUrl = '/api/v1/events/{eventId}/ticket-types';
|
|
13
|
-
|
|
14
|
-
constructor(@Inject('config') private config: HcmsClientConfig, private http: HttpClient) { }
|
|
15
|
-
|
|
16
|
-
getTicketTypes(eventId: number): Observable<TicketType[]> {
|
|
17
|
-
|
|
18
|
-
return this.http.get<TicketType[]>(`${this.config.host}${this.apiUrl}`.replace('{eventId}', eventId.toString()))
|
|
19
|
-
.pipe(
|
|
20
|
-
retry(2),
|
|
21
|
-
);
|
|
22
|
-
}
|
|
23
|
-
|
|
24
|
-
}
|
package/src/lib/venue.service.ts
DELETED
|
@@ -1,24 +0,0 @@
|
|
|
1
|
-
import { Injectable, Inject } from '@angular/core';
|
|
2
|
-
import { HttpClient } from '@angular/common/http';
|
|
3
|
-
import { Observable, retry } from 'rxjs';
|
|
4
|
-
import { HcmsClientConfig } from '@smartnowx/hcms-commons';
|
|
5
|
-
import { Venue } from './models/Venue';
|
|
6
|
-
|
|
7
|
-
@Injectable({
|
|
8
|
-
providedIn: 'root'
|
|
9
|
-
})
|
|
10
|
-
export class VenueService {
|
|
11
|
-
|
|
12
|
-
private apiUrl = 'api/v1/event-manager/venues';
|
|
13
|
-
|
|
14
|
-
constructor(@Inject('config') private config: HcmsClientConfig, private http: HttpClient) { }
|
|
15
|
-
|
|
16
|
-
getVenues(): Observable<Venue[]> {
|
|
17
|
-
|
|
18
|
-
return this.http.get<Venue[]>(this.config.host+'/'+this.apiUrl)
|
|
19
|
-
.pipe(
|
|
20
|
-
retry(2)
|
|
21
|
-
);
|
|
22
|
-
}
|
|
23
|
-
|
|
24
|
-
}
|
package/tsconfig.lib.json
DELETED
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
/* To learn more about Typescript configuration file: https://www.typescriptlang.org/docs/handbook/tsconfig-json.html. */
|
|
2
|
-
/* To learn more about Angular compiler options: https://angular.dev/reference/configs/angular-compiler-options. */
|
|
3
|
-
{
|
|
4
|
-
"extends": "../../tsconfig.json",
|
|
5
|
-
"compilerOptions": {
|
|
6
|
-
"outDir": "../../out-tsc/lib",
|
|
7
|
-
"declaration": true,
|
|
8
|
-
"declarationMap": true,
|
|
9
|
-
"inlineSources": true,
|
|
10
|
-
"types": []
|
|
11
|
-
},
|
|
12
|
-
"exclude": [
|
|
13
|
-
"**/*.spec.ts"
|
|
14
|
-
]
|
|
15
|
-
}
|
package/tsconfig.lib.prod.json
DELETED
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
/* To learn more about Typescript configuration file: https://www.typescriptlang.org/docs/handbook/tsconfig-json.html. */
|
|
2
|
-
/* To learn more about Angular compiler options: https://angular.dev/reference/configs/angular-compiler-options. */
|
|
3
|
-
{
|
|
4
|
-
"extends": "./tsconfig.lib.json",
|
|
5
|
-
"compilerOptions": {
|
|
6
|
-
"declarationMap": false
|
|
7
|
-
},
|
|
8
|
-
"angularCompilerOptions": {
|
|
9
|
-
"compilationMode": "partial"
|
|
10
|
-
}
|
|
11
|
-
}
|
package/tsconfig.spec.json
DELETED
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
/* To learn more about Typescript configuration file: https://www.typescriptlang.org/docs/handbook/tsconfig-json.html. */
|
|
2
|
-
/* To learn more about Angular compiler options: https://angular.dev/reference/configs/angular-compiler-options. */
|
|
3
|
-
{
|
|
4
|
-
"extends": "../../tsconfig.json",
|
|
5
|
-
"compilerOptions": {
|
|
6
|
-
"outDir": "../../out-tsc/spec",
|
|
7
|
-
"types": [
|
|
8
|
-
"jasmine"
|
|
9
|
-
]
|
|
10
|
-
},
|
|
11
|
-
"include": [
|
|
12
|
-
"**/*.spec.ts",
|
|
13
|
-
"**/*.d.ts"
|
|
14
|
-
]
|
|
15
|
-
}
|