MyApp

<back to all web services

QueryJobOffers

Talent
Requires Authentication
const std = @import("std");

pub const AppUser = struct {
    id: ?[]const u8 = null,
    firstName: ?[]const u8 = null,
    lastName: ?[]const u8 = null,
    displayName: ?[]const u8 = null,
    profileUrl: ?[]const u8 = null,
};

pub const JobOffer = struct {
    // @DataMember(Order=1)
    createdDate: ?[]const u8 = null,

    // @DataMember(Order=2)
    // @Required()
    createdBy: ?[]const u8 = null,

    // @DataMember(Order=3)
    modifiedDate: ?[]const u8 = null,

    // @DataMember(Order=4)
    // @Required()
    modifiedBy: ?[]const u8 = null,

    // @DataMember(Order=5)
    deletedDate: ?[]const u8 = null,

    // @DataMember(Order=6)
    deletedBy: ?[]const u8 = null,
    id: i32 = 0,
    salaryOffer: i32 = 0,
    currency: ?[]const u8 = null,
    // @References(typeof(JobApplication))
    jobApplicationId: i32 = 0,

    // @References(typeof(AppUser))
    appUserId: ?[]const u8 = null,

    appUser: ?AppUser = null,
    notes: ?[]const u8 = null,
};

// @ValidateRequest(Validator="IsAuthenticated")
pub const QueryJobOffers = struct {
    // @DataMember(Order=1)
    skip: ?i32 = null,

    // @DataMember(Order=2)
    take: ?i32 = null,

    // @DataMember(Order=3)
    orderBy: ?[]const u8 = null,

    // @DataMember(Order=4)
    orderByDesc: ?[]const u8 = null,

    // @DataMember(Order=5)
    include: ?[]const u8 = null,

    // @DataMember(Order=6)
    fields: ?[]const u8 = null,

    // @DataMember(Order=7)
    meta: ?std.json.Value = null,
    id: ?i32 = null,
    jobApplicationId: ?i32 = null,
};

pub const Todo = struct {
    id: i64 = 0,
    text: ?[]const u8 = null,
    isFinished: bool = false,
};

Zig QueryJobOffers DTOs

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

HTTP + CSV

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

POST /csv/reply/QueryJobOffers HTTP/1.1 
Host: blazor-gallery.servicestack.net 
Accept: text/csv
Content-Type: text/csv
Content-Length: length

{"id":0,"jobApplicationId":0,"skip":0,"take":0,"orderBy":"String","orderByDesc":"String","include":"String","fields":"String","meta":{"String":"String"}}
HTTP/1.1 200 OK
Content-Type: text/csv
Content-Length: length

{"offset":0,"total":0,"results":[{"id":0,"salaryOffer":0,"currency":"String","jobApplicationId":0,"appUserId":"String","appUser":{"id":"String","firstName":"String","lastName":"String","displayName":"String","profileUrl":"String"},"notes":"String","createdDate":"0001-01-01T00:00:00","createdBy":"String","modifiedDate":"0001-01-01T00:00:00","modifiedBy":"String","deletedDate":"0001-01-01T00:00:00","deletedBy":"String"}],"meta":{"String":"String"},"responseStatus":{"errorCode":"String","message":"String","stackTrace":"String","errors":[{"errorCode":"String","fieldName":"String","message":"String","meta":{"String":"String"}}],"meta":{"String":"String"}}}