| Requires any of the roles: | bookingsupplier-administrator-write, bookingsupplier-administrator-read, superadmin |
| GET | /settings/changelog | Get change log for settings | Returns a log of all changes made to company settings. Supports filtering and pagination via AutoQuery. |
|---|
"use strict";
export class QueryBase {
/** @param {{Skip?:number,Take?:number,OrderBy?:string,OrderByDesc?:string,Include?:string,Fields?:string,Meta?:{ [index:string]: string; }}} [init] */
constructor(init) { Object.assign(this, init) }
/** @type {?number} */
Skip;
/** @type {?number} */
Take;
/** @type {?string} */
OrderBy;
/** @type {?string} */
OrderByDesc;
/** @type {?string} */
Include;
/** @type {?string} */
Fields;
/** @type {?{ [index:string]: string; }} */
Meta;
}
/** @typedef From {any} */
/** @typedef Into {any} */
export class QueryDb extends QueryBase {
/** @param {{Skip?:number,Take?:number,OrderBy?:string,OrderByDesc?:string,Include?:string,Fields?:string,Meta?:{ [index:string]: string; }}} [init] */
constructor(init) { super(init); Object.assign(this, init) }
}
export class SettingsChangeLogQueryResponse {
/** @param {{Id?:number,CompanyId?:string,SettingsType?:string,PropertyName?:string,OldValue?:string,NewValue?:string,ModifiedBy?:string,CreatedDate?:string}} [init] */
constructor(init) { Object.assign(this, init) }
/**
* @type {number}
* @description The change log entry id */
Id;
/**
* @type {string}
* @description The company id */
CompanyId;
/**
* @type {string}
* @description The settings type that was changed, e.g. BookingSettings */
SettingsType;
/**
* @type {string}
* @description The property name that was changed */
PropertyName;
/**
* @type {?string}
* @description The value before the change */
OldValue;
/**
* @type {?string}
* @description The value after the change */
NewValue;
/**
* @type {?string}
* @description The user who made the change */
ModifiedBy;
/**
* @type {string}
* @description When the change was made */
CreatedDate;
}
export class BaseModel {
constructor(init) { Object.assign(this, init) }
}
export class SettingsChangeLog extends BaseModel {
/** @param {{Id?:number,CompanyId?:string,SettingsType?:string,PropertyName?:string,OldValue?:string,NewValue?:string,ModifiedBy?:string,CreatedDate?:string,ModifiedDate?:string}} [init] */
constructor(init) { super(init); Object.assign(this, init) }
/** @type {number} */
Id;
/** @type {string} */
CompanyId;
/** @type {string} */
SettingsType;
/** @type {string} */
PropertyName;
/** @type {?string} */
OldValue;
/** @type {?string} */
NewValue;
/** @type {?string} */
ModifiedBy;
/** @type {string} */
CreatedDate;
/** @type {?string} */
ModifiedDate;
}
export class SettingsChangeLogQuery extends QueryDb {
/** @param {{CompanyId?:string,SettingsType?:string,PropertyName?:string,ModifiedBy?:string,CreatedDateGreaterThanOrEqualTo?:string,CreatedDateLessThanOrEqualTo?:string,Skip?:number,Take?:number,OrderBy?:string,OrderByDesc?:string,Include?:string,Fields?:string,Meta?:{ [index:string]: string; }}} [init] */
constructor(init) { super(init); Object.assign(this, init) }
/**
* @type {?string}
* @description The company id, if empty will use the company id for the user you are logged in with. */
CompanyId;
/**
* @type {?string}
* @description Filter by settings type, e.g. BookingSettings, PaymentSettings, CompanySetting, EAccountingSettings */
SettingsType;
/**
* @type {?string}
* @description Filter by property name, e.g. SendEmailReminder */
PropertyName;
/**
* @type {?string}
* @description Filter by who made the change */
ModifiedBy;
/**
* @type {?string}
* @description Filter changes created on or after this date */
CreatedDateGreaterThanOrEqualTo;
/**
* @type {?string}
* @description Filter changes created on or before this date */
CreatedDateLessThanOrEqualTo;
}
export class AccessKeyTypeResponse {
/** @param {{Id?:number,KeyType?:string,Description?:string}} [init] */
constructor(init) { Object.assign(this, init) }
/** @type {number} */
Id;
/** @type {string} */
KeyType;
/** @type {string} */
Description;
}
/** @typedef T {any} */
export class QueryResponse {
/** @param {{Offset?:number,Total?:number,Results?:T[],Meta?:{ [index:string]: string; },ResponseStatus?:ResponseStatus}} [init] */
constructor(init) { Object.assign(this, init) }
/** @type {number} */
Offset;
/** @type {number} */
Total;
/** @type {T[]} */
Results = [];
/** @type {?{ [index:string]: string; }} */
Meta;
/** @type {?ResponseStatus} */
ResponseStatus;
}
JavaScript SettingsChangeLogQuery DTOs
To override the Content-type in your clients, use the HTTP Accept Header, append the .jsv suffix or ?format=jsv
The following are sample HTTP requests and responses. The placeholders shown need to be replaced with actual values.
GET /settings/changelog HTTP/1.1 Host: testapi.bokamera.se Accept: text/jsv
HTTP/1.1 200 OK
Content-Type: text/jsv
Content-Length: length
{
Offset: 0,
Total: 0,
Results:
[
{
Id: 0,
SettingsType: String,
PropertyName: String,
OldValue: String,
NewValue: String,
ModifiedBy: String
}
],
Meta:
{
String: String
},
ResponseStatus:
{
ErrorCode: String,
Message: String,
StackTrace: String,
Errors:
[
{
ErrorCode: String,
FieldName: String,
Message: String,
Meta:
{
String: String
}
}
],
Meta:
{
String: String
}
}
}