@phoenixlan/phoenix.js 1.0.1 → 2.1.0

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.
@@ -0,0 +1,10 @@
1
+ interface AgendaEntry {
2
+ uuid: string;
3
+ time: number;
4
+ title: string;
5
+ description: string;
6
+ }
7
+ export declare const getAgenda: () => Promise<Array<AgendaEntry>>;
8
+ export declare const createAgendaEntry: (title: string, description: string, event_uuid: string, time: number) => Promise<boolean>;
9
+ export declare const deleteAgendaEntry: (uuid: string) => Promise<boolean>;
10
+ export {};
@@ -0,0 +1,14 @@
1
+ export declare type AvatarState = 'AvatarState.accepted' | 'AvatarState.rejected' | 'AvatarState.uploaded';
2
+ export interface Avatar {
3
+ uuid: string;
4
+ user_uuid: string;
5
+ state: AvatarState;
6
+ urls: {
7
+ hd: string;
8
+ sd: string;
9
+ thumb: string;
10
+ };
11
+ }
12
+ export declare const createAvatar: (file: File, x: number, y: number, w: number, h: number, uuid: string) => Promise<void>;
13
+ export declare const deleteAvatar: (uuid: string) => Promise<void>;
14
+ export declare const getAvatar: (uuid: string) => Promise<Avatar>;
@@ -0,0 +1,25 @@
1
+ import { BasicUser } from "../../user";
2
+ import { BaseCrew } from '../';
3
+ import { Event } from "../../events";
4
+ declare enum ApplicationState {
5
+ created = 1,
6
+ accepted = 2,
7
+ rejected = 3
8
+ }
9
+ export interface Application {
10
+ uuid: string;
11
+ crew: BaseCrew;
12
+ event_uuid: string;
13
+ user: BasicUser;
14
+ contents: string;
15
+ created: number;
16
+ state: string;
17
+ answer?: string;
18
+ }
19
+ export declare const getAllApplications: () => Promise<Array<Application>>;
20
+ export declare const getApplication: (uuid: string) => Promise<Application>;
21
+ export declare const getAllApplicationsByEvent: (event: Event) => Promise<Array<Application>>;
22
+ export declare const getUserApplications: () => Promise<Array<Application>>;
23
+ export declare const createApplication: (crew_uuid: any, contents: any) => Promise<Application>;
24
+ export declare const answerApplication: (uuid: string, answer: string, state: ApplicationState.accepted | ApplicationState.rejected) => Promise<void>;
25
+ export {};
@@ -0,0 +1,43 @@
1
+ import * as Applications from './applications';
2
+ import { BasicUserWithPositions } from "../user";
3
+ export interface Team {
4
+ uuid: string;
5
+ name: string;
6
+ description: string;
7
+ crew: string;
8
+ }
9
+ export interface Permission {
10
+ uuid: string;
11
+ event_uuid?: string;
12
+ permission: string;
13
+ }
14
+ export interface BasePosition {
15
+ uuid: string;
16
+ crew?: string;
17
+ team?: string;
18
+ name?: string;
19
+ description?: string;
20
+ chief: boolean;
21
+ permissions: Array<Permission>;
22
+ }
23
+ export declare type BasicPosition = {
24
+ users: Array<string>;
25
+ } & BasePosition;
26
+ export declare type FullPosition = {
27
+ users: Array<BasicUserWithPositions>;
28
+ } & BasePosition;
29
+ export interface BaseCrew {
30
+ uuid: string;
31
+ name: string;
32
+ description: string;
33
+ active: boolean;
34
+ is_applyable: boolean;
35
+ hex_color: string;
36
+ }
37
+ export declare type FullCrew = {
38
+ teams: Array<Team>;
39
+ positions: Array<FullPosition>;
40
+ } & BaseCrew;
41
+ export declare const getCrews: () => Promise<Array<BaseCrew>>;
42
+ export declare const getCrew: (uuid: string) => Promise<FullCrew>;
43
+ export { Applications };
@@ -0,0 +1,6 @@
1
+ interface Entrance {
2
+ uuid: string;
3
+ name: string;
4
+ }
5
+ export declare const getEntrances: () => Promise<Entrance[]>;
6
+ export {};
@@ -0,0 +1,3 @@
1
+ export declare class ApiGetError extends Error {
2
+ constructor(message: string);
3
+ }
@@ -0,0 +1,3 @@
1
+ export declare class ApiParameterError extends Error {
2
+ constructor(message: string);
3
+ }
@@ -0,0 +1,3 @@
1
+ export declare class ApiPostError extends Error {
2
+ constructor(message: string);
3
+ }
@@ -0,0 +1,3 @@
1
+ export declare class ApiPutError extends Error {
2
+ constructor(message: string);
3
+ }
@@ -0,0 +1,3 @@
1
+ export declare class AuthError extends Error {
2
+ constructor(message: string);
3
+ }
@@ -0,0 +1,3 @@
1
+ export declare class InitError extends Error {
2
+ constructor(message: string);
3
+ }
@@ -0,0 +1,3 @@
1
+ export declare class RefreshError extends Error {
2
+ constructor(message: string);
3
+ }
@@ -0,0 +1,7 @@
1
+ export * from './ApiGetError';
2
+ export * from './ApiPutError';
3
+ export * from './ApiPostError';
4
+ export * from './AuthError';
5
+ export * from './InitError';
6
+ export * from './RefreshError';
7
+ export * from './ApiParameterError';
@@ -0,0 +1,23 @@
1
+ import { BasicTicket } from "../ticket";
2
+ import { TicketType } from "../ticketType";
3
+ export interface Event {
4
+ booking_time: number;
5
+ cancellation_reason: null | string;
6
+ end_time: number;
7
+ max_participants: number;
8
+ priority_seating_time_delta: number;
9
+ seating_time_delta: number;
10
+ seatmap: {
11
+ background_mage: string;
12
+ event_uuid: string;
13
+ uuid: string;
14
+ };
15
+ start_time: number;
16
+ theme: null | string;
17
+ uuid: string;
18
+ }
19
+ export declare const getCurrentEvent: () => Promise<Event>;
20
+ export declare const getEvents: () => Promise<Array<Event>>;
21
+ export declare const getEvent: (uuid: string) => Promise<Event>;
22
+ export declare const getEventTicketTypes: (uuid: string) => Promise<Array<TicketType>>;
23
+ export declare const getEventTickets: (uuid: string) => Promise<Array<BasicTicket>>;
@@ -0,0 +1,15 @@
1
+ export * as User from './user';
2
+ export * from './meta';
3
+ export * from './events';
4
+ export * as Crew from './crew';
5
+ export * from './errors';
6
+ export * as Avatar from './avatar';
7
+ export * from './tos';
8
+ export * as Position from './position';
9
+ export * as Seatmap from './seatmap';
10
+ export * as Entrance from './entrance';
11
+ export * as TicketType from './ticketType';
12
+ export * as Ticket from './ticket';
13
+ export * as Row from './row';
14
+ export * from './payment';
15
+ export * as Agenda from './agenda';