BokaMera.API.Host

<back to all web services

BookingLogQuery

Requires Authentication
Requires any of the roles:bookingsupplier-administrator-write, bookingsupplier-administrator-read, superadmin
The following routes are available for this service:
GET/bookinglogFind booking log for booking.

// @DataContract
export class QueryBase
{
    /** @description Skip over a given number of elements in a sequence and then return the remainder. Use this when you need paging.<br/><br/><strong>Example:</strong><br/><code>?skip=10&orderBy=Id</code> */
    // @DataMember(Order=1)
    public Skip?: number;

    /** @description Return a given number of elements in a sequence and then skip over the remainder. Use this when you need paging.<br/><br/><strong>Example:</strong><br/><code>?take=20</code> */
    // @DataMember(Order=2)
    public Take?: number;

    /** @description Comma separated list of fields to order by. Prefix the field name with a minus if you wan't to invert the sort for that field.<br/><br/><strong>Example:</strong><br/><code>?orderBy=Id,-Age,FirstName</code> */
    // @DataMember(Order=3)
    public OrderBy: string;

    /** @description Comma separated list of fields to order by in descending order. Prefix the field name with a minus if you wan't to invert the sort for that field.<br/><br/><strong>Example:</strong><br/><code>?orderByDesc=Id,-Age,FirstName</code> */
    // @DataMember(Order=4)
    public OrderByDesc: string;

    /** @description Include any of the aggregates <code>AVG, COUNT, FIRST, LAST, MAX, MIN, SUM</code> in your result set. The results will be returned in the meta field.<br/><br/><strong>Example:</strong><br/><code>?include=COUNT(*) as Total</code><br/><br/>or multiple fields with<br/><code>?include=Count(*) Total, Min(Age), AVG(Age) AverageAge</code><br/></br>or unique with<br/><code>?include=COUNT(DISTINCT LivingStatus) as UniqueStatus</code> */
    // @DataMember(Order=5)
    public Include: string;

    // @DataMember(Order=6)
    public Fields: string;

    // @DataMember(Order=7)
    public Meta: { [index: string]: string; };

    public constructor(init?: Partial<QueryBase>) { (Object as any).assign(this, init); }
}

export class QueryDb<From, Into> extends QueryBase
{

    public constructor(init?: Partial<QueryDb<From, Into>>) { super(init); (Object as any).assign(this, init); }
}

export class BookingLogEventTypeResponse
{
    /** @description The event type id */
    // @ApiMember(Description="The event type id")
    public Id: number;

    /** @description The event type name */
    // @ApiMember(Description="The event type name")
    public Name: string;

    /** @description The event type description */
    // @ApiMember(Description="The event type description")
    public Description: string;

    public constructor(init?: Partial<BookingLogEventTypeResponse>) { (Object as any).assign(this, init); }
}

export class BookingLogQueryResponse
{
    /** @description The booking log id */
    // @ApiMember(Description="The booking log id")
    public Id: number;

    /** @description The booking id */
    // @ApiMember(Description="The booking id")
    public BookingId: number;

    /** @description The type of event */
    // @ApiMember(Description="The type of event")
    public EventTypeId: number;

    /** @description The type of event */
    // @ApiMember(Description="The type of event")
    public EventType: BookingLogEventTypeResponse;

    /** @description Comments that could be added to the event log item */
    // @ApiMember(Description="Comments that could be added to the event log item")
    public Comments: string;

    /** @description The user created the event */
    // @ApiMember(Description="The user created the event")
    public UserName: string;

    /** @description Then date when the event occured */
    // @ApiMember(Description="Then date when the event occured")
    public Created: string;

    public constructor(init?: Partial<BookingLogQueryResponse>) { (Object as any).assign(this, init); }
}

export class BaseModel
{

    public constructor(init?: Partial<BaseModel>) { (Object as any).assign(this, init); }
}

export class BookingLogEventType extends BaseModel
{
    // @Required()
    public Name: string;

    // @Required()
    public Description: string;

    public ModifiedDate?: string;
    // @Required()
    public Id: number;

    public constructor(init?: Partial<BookingLogEventType>) { super(init); (Object as any).assign(this, init); }
}

export class BookingLog extends BaseModel
{
    // @References("typeof(BokaMera.API.ServiceModel.Db.BookingLogEventType)")
    public EventTypeId: number;

    public EventType: BookingLogEventType;
    // @Required()
    public CompanyId: string;

    // @Required()
    public BookingId: number;

    public Id: number;
    public Comments: string;
    public UserId: string;
    // @Required()
    public Created: string;

    public ModifiedDate?: string;

    public constructor(init?: Partial<BookingLog>) { super(init); (Object as any).assign(this, init); }
}

// @ApiResponse(Description="You were unauthorized to call this service", StatusCode=401)
// @ApiResponse(Description="You have too low privilegies to call this service", StatusCode=403)
// @ValidateRequest(Validator="IsAuthenticated")
export class BookingLogQuery extends QueryDb<BookingLog, BookingLogQueryResponse>
{
    /** @description Enter the company and booking id you want to see log for, if blank company id and you are an admin, your company id will be used */
    // @ApiMember(Description="Enter the company and booking id you want to see log for, if blank company id and you are an admin, your company id will be used", IsRequired=true, ParameterType="query")
    public CompanyId: string;

    /** @description Enter the booking id you want to get the log */
    // @ApiMember(Description="Enter the booking id you want to get the log", IsRequired=true, ParameterType="query")
    public BookingId: number;

    public constructor(init?: Partial<BookingLogQuery>) { super(init); (Object as any).assign(this, init); }
}

export class AccessKeyTypeResponse
{
    public Id: number;
    public KeyType: string;
    public Description: string;

    public constructor(init?: Partial<AccessKeyTypeResponse>) { (Object as any).assign(this, init); }
}

// @DataContract
export class QueryResponse<AccessKeyTypeResponse>
{
    // @DataMember(Order=1)
    public Offset: number;

    // @DataMember(Order=2)
    public Total: number;

    // @DataMember(Order=3)
    public Results: AccessKeyTypeResponse[];

    // @DataMember(Order=4)
    public Meta: { [index: string]: string; };

    // @DataMember(Order=5)
    public ResponseStatus: ResponseStatus;

    public constructor(init?: Partial<QueryResponse<AccessKeyTypeResponse>>) { (Object as any).assign(this, init); }
}

TypeScript BookingLogQuery DTOs

To override the Content-type in your clients, use the HTTP Accept Header, append the .other suffix or ?format=other

HTTP + OTHER

The following are sample HTTP requests and responses. The placeholders shown need to be replaced with actual values.

GET /bookinglog HTTP/1.1 
Host: api.bokamera.se 
Accept: text/jsonl
HTTP/1.1 200 OK
Content-Type: text/jsonl
Content-Length: length

{"Offset":0,"Total":0,"Results":[{"Id":0,"BookingId":0,"EventTypeId":0,"EventType":{"Id":0,"Name":"String","Description":"String"},"Comments":"String","UserName":"String"}],"Meta":{"String":"String"},"ResponseStatus":{"ErrorCode":"String","Message":"String","StackTrace":"String","Errors":[{"ErrorCode":"String","FieldName":"String","Message":"String","Meta":{"String":"String"}}],"Meta":{"String":"String"}}}