Skip to content

Commit

Permalink
Updates typings to include the conditional resource
Browse files Browse the repository at this point in the history
  • Loading branch information
coconutcraig committed May 18, 2019
1 parent 3d3dd19 commit d38fba9
Show file tree
Hide file tree
Showing 7 changed files with 14 additions and 14 deletions.
4 changes: 2 additions & 2 deletions src/resources/appointment.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import { AxiosInstance } from 'axios';

import { Resource } from '../index';
import { AttendeeModel } from '../models/attendee';
import Conditional from './conditional';
import Conditional, { ConditionalResource } from './conditional';

export interface AppointmentFilter {
location?: number;
Expand Down Expand Up @@ -47,7 +47,7 @@ export interface AppointmentParameters {
};
}

export interface AppointmentResource extends Resource {
export interface AppointmentResource extends Resource, ConditionalResource {
at(location: number): this;

book(): Promise<any>;
Expand Down
4 changes: 2 additions & 2 deletions src/resources/location.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import { AxiosInstance } from 'axios';

import { combine } from '../helpers/filters';
import { Filterable, Pageable } from '../index';
import Conditional from './conditional';
import Conditional, { ConditionalResource } from './conditional';

export interface LocationFilter {
assigned?: boolean;
Expand All @@ -18,7 +18,7 @@ export interface LocationParameters {
user?: number | string;
}

export interface LocationResource extends Pageable {
export interface LocationResource extends Pageable, ConditionalResource {
assigned(assigned: boolean): this;

containing(user: number | string): this;
Expand Down
4 changes: 2 additions & 2 deletions src/resources/question.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import { AxiosInstance } from 'axios';

import { combine } from '../helpers/filters';
import { Filterable, Pageable } from '../index';
import Conditional from './conditional';
import Conditional, { ConditionalResource } from './conditional';

export interface QuestionFilter {
services?: number | number[] | string | string[];
Expand All @@ -12,7 +12,7 @@ export interface QuestionParameters {
service?: number | number[] | string | string[];
}

export interface QuestionResource extends Pageable {
export interface QuestionResource extends Pageable, ConditionalResource {
for(services: number | number[] | string | string[]): this;
}

Expand Down
4 changes: 2 additions & 2 deletions src/resources/service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import { AxiosInstance } from 'axios';

import { combine } from '../helpers/filters';
import { Filterable, Pageable } from '../index';
import Conditional from './conditional';
import Conditional, { ConditionalResource } from './conditional';

export interface ServiceFilter {
assigned?: boolean;
Expand All @@ -20,7 +20,7 @@ export interface ServiceParameters {
user?: number | string;
}

export interface ServiceResource extends Pageable {
export interface ServiceResource extends Pageable, ConditionalResource {
assigned(assigned: boolean): this;

at(location: number | string): this;
Expand Down
4 changes: 2 additions & 2 deletions src/resources/time-slot.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { AxiosInstance } from 'axios';

import { Resource } from '../index';
import Conditional from './conditional';
import Conditional, { ConditionalResource } from './conditional';

export interface TimeSlotFilter {
end?: string;
Expand All @@ -19,7 +19,7 @@ export interface TimeSlotParameters {
start?: string;
}

export interface TimeSlotResource extends Resource {
export interface TimeSlotResource extends Resource, ConditionalResource {
at(location: number): this;

between(start: string, end: string): this;
Expand Down
4 changes: 2 additions & 2 deletions src/resources/user.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import { AxiosInstance } from 'axios';

import { combine } from '../helpers/filters';
import { Filterable, Pageable } from '../index';
import Conditional from './conditional';
import Conditional, { ConditionalResource } from './conditional';

export interface UserFilter {
assigned?: boolean;
Expand All @@ -16,7 +16,7 @@ export interface UserParameters {
location?: number | string;
}

export interface UserResource extends Pageable {
export interface UserResource extends Pageable, ConditionalResource {
assigned(assigned: boolean): this;

at(location: number | string): this;
Expand Down
4 changes: 2 additions & 2 deletions src/resources/wait-list.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import { AxiosInstance } from 'axios';
import { IncludableParameters } from '../index';
import { AttendeeModel } from '../models/attendee';
import { PreferenceModel } from '../models/preference';
import Conditional from './conditional';
import Conditional, { ConditionalResource } from './conditional';

export interface WaitListAttributes {
notes?: string;
Expand Down Expand Up @@ -52,7 +52,7 @@ export interface WaitListRelationship {
user?: number | string;
}

export interface WaitListResource {
export interface WaitListResource extends ConditionalResource {
add(): Promise<any>;

at(location: number | string): this;
Expand Down

0 comments on commit d38fba9

Please sign in to comment.