@starsched/sdk
Version:
ABA clinic control and management service API SDK
133 lines • 3.54 kB
TypeScript
import type { StarSchedAPIProtocols } from '../../../common/types/common';
import type { HttpClientProtocols } from '../../../http/protocols/client.protocols';
import type { CompanyMember } from './company-member';
export declare namespace ListCompanyMembers {
type Input = {
company_id: string;
sort_by?: 'name' | 'role' | 'access' | 'created_at';
order_by?: 'asc' | 'desc';
limit?: number;
offset?: number;
};
type Options = Pick<HttpClientProtocols.GetOptions, 'abortSignal'>;
type Success = {
total_items_count: number;
items: CompanyMember[];
};
type ErrorCodes = 'validation' | 'token.not.provided' | 'token.invalid' | 'token.expired' | 'user.not.exists' | 'company.not.exists' | 'access.denied' | 'internal';
type Failure = {
code: "validation";
message: string;
validation: {
field: "company_id";
type: "required";
value?: number;
message: string;
};
} | {
code: "validation";
message: string;
validation: {
field: "company_id";
type: "type";
value?: number;
message: string;
};
} | {
code: "validation";
message: string;
validation: {
field: "company_id";
type: "invalid";
value?: number;
message: string;
};
} | {
code: "validation";
message: string;
validation: {
field: "order_by";
type: "invalid";
value?: number;
message: string;
};
} | {
code: "validation";
message: string;
validation: {
field: "sort_by";
type: "invalid";
value?: number;
message: string;
};
} | {
code: "validation";
message: string;
validation: {
field: "limit";
type: "number";
value?: number;
message: string;
};
} | {
code: "validation";
message: string;
validation: {
field: "limit";
type: "min";
value: number;
message: string;
};
} | {
code: "validation";
message: string;
validation: {
field: "limit";
type: "max";
value: number;
message: string;
};
} | {
code: "validation";
message: string;
validation: {
field: "offset";
type: "number";
value?: number;
message: string;
};
} | {
code: "validation";
message: string;
validation: {
field: "offset";
type: "min";
value: number;
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