Skip to content

Commit

Permalink
fix(types): add extended sync service types
Browse files Browse the repository at this point in the history
  • Loading branch information
dkundel committed Jul 19, 2019
1 parent 413b13b commit e735e81
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion packages/serverless-runtime-types/types.d.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
import * as twilio from 'twilio';
import { SyncListListInstance } from 'twilio/lib/rest/preview/sync/service/syncList';
import { ServiceContext } from 'twilio/lib/rest/sync/v1/service';
import { SyncMapListInstance } from 'twilio/lib/rest/sync/v1/service/syncMap';
import { TwilioClientOptions } from 'twilio/lib/rest/Twilio';

export type EnvironmentVariables = {
Expand Down Expand Up @@ -30,10 +32,15 @@ export type RuntimeSyncClientOptions = TwilioClientOptions & {
serviceName?: string;
};

export type RuntimeSyncServiceContext = ServiceContext & {
maps: SyncMapListInstance;
lists: SyncListListInstance;
};

export type RuntimeInstance = {
getAssets(): AssetResourceMap;
getFunctions(): ResourceMap;
getSync(options?: RuntimeSyncClientOptions): ServiceContext;
getSync(options?: RuntimeSyncClientOptions): RuntimeSyncServiceContext;
};

export type Context<T = {}> = {
Expand Down

0 comments on commit e735e81

Please sign in to comment.