@starsched/sdk
Version:
ABA clinic control and management service API SDK
123 lines • 3.23 kB
TypeScript
import { StarSchedAPIProtocols } from "../../../common/types/common";
import { HttpClientProtocols } from "../../../http/protocols/client.protocols";
import { CompanyPatient } from "./company-patient";
export declare namespace ListCompanyPatients {
type Input = {
company_id: string;
sort_by?: 'name' | 'created_at';
order_by?: 'asc' | 'desc';
limit?: number;
offset?: number;
};
type Options = Pick<HttpClientProtocols.GetOptions, 'abortSignal'>;
type Success = {
total_items_count: number;
items: CompanyPatient[];
};
type ErrorCodes = 'validation' | 'token.not.provided' | 'token.invalid' | 'token.expired' | 'access.denied' | 'user.not.exists' | 'company.not.exists' | 'internal';
type Failure = {
code: "validation";
message: string;
validation: {
field: "company_id";
type: "required";
message: string;
};
} | {
code: "validation";
message: string;
validation: {
field: "company_id";
type: "type";
message: string;
};
} | {
code: "validation";
message: string;
validation: {
field: "company_id";
type: "invalid";
message: string;
};
} | {
code: "validation";
message: string;
validation: {
field: "order_by";
type: "invalid";
message: string;
};
} | {
code: "validation";
message: string;
validation: {
field: "sort_by";
type: "invalid";
message: string;
};
} | {
code: "validation";
message: string;
validation: {
field: "limit";
type: "number";
message: string;
};
} | {
code: "validation";
message: string;
validation: {
field: "limit";
type: "min";
message: string;
};
} | {
code: "validation";
message: string;
validation: {
field: "limit";
type: "max";
message: string;
};
} | {
code: "validation";
message: string;
validation: {
field: "offset";
type: "number";
message: string;
};
} | {
code: "validation";
message: string;
validation: {
field: "offset";
type: "min";
message: string;
};
} | {
code: "token.not.provided";
message: string;
} | {
code: "token.invalid";
message: string;
} | {
code: "token.expired";
message: string;
} | {
code: "access.denied";
message: string;
} | {
code: "user.not.exists";
message: string;
} | {
code: "company.not.exists";
message: string;
} | {
code: "internal";
message: string;
};
type Output = Success | Failure;
type Response = StarSchedAPIProtocols.Response<Success, Failure>;
}
//# sourceMappingURL=list.protocols.d.ts.map