POST | /codelock/accessy/callback |
---|
export enum AccessyEvent
{
Unknown = 'Unknown',
MEMBERSHIP_CREATED = 'MEMBERSHIP_CREATED',
MEMBERSHIP_REMOVED = 'MEMBERSHIP_REMOVED',
}
export class AccessyCodelockCallback
{
public EventType: AccessyEvent;
public InvitationId: string;
public UserId: string;
public OrganizationId: string;
public constructor(init?: Partial<AccessyCodelockCallback>) { (Object as any).assign(this, init); }
}
export interface IVirtualDirectory
{
}
export interface IVirtualPathProvider
{
RootDirectory: IVirtualDirectory;
VirtualPathSeparator: string;
RealPathSeparator: string;
}
export interface IVirtualFile
{
VirtualPathProvider: IVirtualPathProvider;
Extension: string;
Length: number;
}
// @Flags()
export enum CacheControl
{
None = 0,
Public = 1,
Private = 2,
MustRevalidate = 4,
NoCache = 8,
NoStore = 16,
NoTransform = 32,
ProxyRevalidate = 64,
}
export interface IContentTypeWriter
{
}
export interface IResponse
{
OriginalResponse: Object;
Request: IRequest;
StatusCode: number;
StatusDescription: string;
ContentType: string;
OutputStream: string;
Dto: Object;
UseBufferedStream: boolean;
IsClosed: boolean;
KeepAlive: boolean;
HasStarted: boolean;
Items: { [index: string]: Object; };
}
// @Flags()
export enum RequestAttributes
{
None = 0,
Localhost = 1,
LocalSubnet = 2,
External = 4,
Secure = 8,
InSecure = 16,
AnySecurityMode = 24,
HttpHead = 32,
HttpGet = 64,
HttpPost = 128,
HttpPut = 256,
HttpDelete = 512,
HttpPatch = 1024,
HttpOptions = 2048,
HttpOther = 4096,
AnyHttpMethod = 8160,
OneWay = 8192,
Reply = 16384,
AnyCallStyle = 24576,
Soap11 = 32768,
Soap12 = 65536,
Xml = 131072,
Json = 262144,
Jsv = 524288,
ProtoBuf = 1048576,
Csv = 2097152,
Html = 4194304,
Jsonl = 8388608,
MsgPack = 16777216,
FormatOther = 33554432,
AnyFormat = 67076096,
Http = 67108864,
MessageQueue = 134217728,
Tcp = 268435456,
Grpc = 536870912,
EndpointOther = 1073741824,
AnyEndpoint = 2080374784,
InProcess = -2147483648,
InternalNetworkAccess = -2147483645,
AnyNetworkAccessType = -2147483641,
Any = -1,
}
export interface IRequestPreferences
{
AcceptsBrotli: boolean;
AcceptsDeflate: boolean;
AcceptsGzip: boolean;
}
export interface IRequest
{
OriginalRequest: Object;
Response: IResponse;
OperationName: string;
Verb: string;
RequestAttributes: RequestAttributes;
RequestPreferences: IRequestPreferences;
Dto: Object;
ContentType: string;
IsLocal: boolean;
UserAgent: string;
Cookies: { [index: string]: Cookie; };
ResponseContentType: string;
HasExplicitResponseContentType: boolean;
Items: { [index: string]: Object; };
Headers: NameValueCollection;
QueryString: NameValueCollection;
FormData: NameValueCollection;
UseBufferedStream: boolean;
RawUrl: string;
AbsoluteUri: string;
UserHostAddress: string;
RemoteIp: string;
Authorization: string;
IsSecureConnection: boolean;
AcceptTypes: string[];
PathInfo: string;
OriginalPathInfo: string;
InputStream: string;
ContentLength: number;
Files: IHttpFile[];
UrlReferrer: string;
}
export class HttpResult
{
public ResponseText: string;
public ResponseStream: string;
public FileInfo: FileInfo;
public VirtualFile: IVirtualFile;
public ContentType: string;
public Headers: { [index: string]: string; };
public Cookies: Cookie[];
public ETag: string;
public Age?: string;
public MaxAge?: string;
public Expires?: string;
public LastModified?: string;
public CacheControl: CacheControl;
public ResultScope: Func<IDisposable>;
public AllowsPartialResponse: boolean;
public Options: { [index: string]: string; };
public Status: number;
public StatusCode: HttpStatusCode;
public StatusDescription: string;
public Response: Object;
public ResponseFilter: IContentTypeWriter;
public RequestContext: IRequest;
public View: string;
public Template: string;
public PaddingLength: number;
public IsPartialRequest: boolean;
public constructor(init?: Partial<HttpResult>) { (Object as any).assign(this, init); }
}
export interface IHttpFile
{
Name: string;
FileName: string;
ContentLength: number;
ContentType: string;
InputStream: string;
}
TypeScript AccessyCodelockCallback DTOs
To override the Content-type in your clients, use the HTTP Accept Header, append the .xml suffix or ?format=xml
The following are sample HTTP requests and responses. The placeholders shown need to be replaced with actual values.
POST /codelock/accessy/callback HTTP/1.1
Host: api.bokamera.se
Accept: application/xml
Content-Type: application/xml
Content-Length: length
<AccessyCodelockCallback xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/BokaMera.API.ServiceModel.Dtos">
<EventType>Unknown</EventType>
<InvitationId>00000000-0000-0000-0000-000000000000</InvitationId>
<OrganizationId>00000000-0000-0000-0000-000000000000</OrganizationId>
<UserId>00000000-0000-0000-0000-000000000000</UserId>
</AccessyCodelockCallback>
HTTP/1.1 200 OK Content-Type: application/xml Content-Length: length <CustomHttpResult xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.servicestack.net/types" />