@droz-js/sdk
Advanced tools
Comparing version 0.9.1 to 0.9.2
{ | ||
"name": "@droz-js/sdk", | ||
"description": "Droz SDK", | ||
"version": "0.9.1", | ||
"version": "0.9.2", | ||
"private": false, | ||
@@ -6,0 +6,0 @@ "exports": { |
@@ -141,2 +141,8 @@ export type Maybe<T> = T; | ||
}; | ||
export type AnalyticsVolume = { | ||
data?: Maybe<Array<Maybe<Grouped>>>; | ||
delta?: Maybe<Scalars['Float']['output']>; | ||
prevTotal: Scalars['Float']['output']; | ||
total: Scalars['Float']['output']; | ||
}; | ||
export declare enum AppInstanceStatus { | ||
@@ -153,2 +159,6 @@ Active = "Active", | ||
} | ||
export type Grouped = { | ||
name: Scalars['String']['output']; | ||
value: Scalars['Float']['output']; | ||
}; | ||
export type I18nText = { | ||
@@ -189,7 +199,15 @@ lang: Scalars['Locale']['output']; | ||
app?: Maybe<Scalars['DRN']['output']>; | ||
getAttendanceTime?: Maybe<AnalyticsAverage>; | ||
getFirstResponseTime?: Maybe<AnalyticsAverage>; | ||
getHttpEndpoint?: Maybe<Scalars['String']['output']>; | ||
getTicketsByStatus?: Maybe<Array<Maybe<AnalyticsChart>>>; | ||
getTicketsByTriggerApp?: Maybe<Array<Maybe<AnalyticsChart>>>; | ||
getVolumeOfTicketsPerDay?: Maybe<AnalyticsVolume>; | ||
getVolumeOfTicketsPerHour?: Maybe<Array<Maybe<Grouped>>>; | ||
version?: Maybe<Scalars['String']['output']>; | ||
}; | ||
export type QueryGetAttendanceTimeArgs = { | ||
endDate: Scalars['Date']['input']; | ||
startDate: Scalars['Date']['input']; | ||
}; | ||
export type QueryGetFirstResponseTimeArgs = { | ||
@@ -203,2 +221,13 @@ endDate: Scalars['Date']['input']; | ||
}; | ||
export type QueryGetTicketsByTriggerAppArgs = { | ||
endDate: Scalars['Date']['input']; | ||
startDate: Scalars['Date']['input']; | ||
}; | ||
export type QueryGetVolumeOfTicketsPerDayArgs = { | ||
endDate: Scalars['Date']['input']; | ||
startDate: Scalars['Date']['input']; | ||
}; | ||
export type QueryGetVolumeOfTicketsPerHourArgs = { | ||
date: Scalars['Date']['input']; | ||
}; | ||
export type SearchResultsFacet = { | ||
@@ -256,2 +285,7 @@ name: Scalars['String']['output']; | ||
} | ||
export type AverageFragment = Pick<AnalyticsAverage, 'delta' | 'current' | 'previous'>; | ||
export type VolumeFragment = (Pick<AnalyticsVolume, 'delta' | 'total' | 'prevTotal'> & { | ||
data?: Maybe<Array<Maybe<Pick<Grouped, 'name' | 'value'>>>>; | ||
}); | ||
export type ChartFragment = Pick<AnalyticsChart, 'delta' | 'current' | 'previous' | 'name'>; | ||
export type GetFirstResponseTimeQueryVariables = Exact<{ | ||
@@ -262,4 +296,11 @@ startDate: Scalars['Date']['input']; | ||
export type GetFirstResponseTimeQuery = { | ||
getFirstResponseTime?: Maybe<Pick<AnalyticsAverage, 'current' | 'previous' | 'delta'>>; | ||
getFirstResponseTime?: Maybe<AverageFragment>; | ||
}; | ||
export type GetAttendanceTimeQueryVariables = Exact<{ | ||
startDate: Scalars['Date']['input']; | ||
endDate: Scalars['Date']['input']; | ||
}>; | ||
export type GetAttendanceTimeQuery = { | ||
getAttendanceTime?: Maybe<AverageFragment>; | ||
}; | ||
export type GetTicketsByStatusQueryVariables = Exact<{ | ||
@@ -270,12 +311,43 @@ startDate: Scalars['Date']['input']; | ||
export type GetTicketsByStatusQuery = { | ||
getTicketsByStatus?: Maybe<Array<Maybe<Pick<AnalyticsChart, 'name' | 'current' | 'previous' | 'delta'>>>>; | ||
getTicketsByStatus?: Maybe<Array<Maybe<ChartFragment>>>; | ||
}; | ||
export declare const GetFirstResponseTimeDocument = "\n query getFirstResponseTime($startDate: Date!, $endDate: Date!) {\n getFirstResponseTime(startDate: $startDate, endDate: $endDate) {\n current\n previous\n delta\n }\n}\n "; | ||
export declare const GetTicketsByStatusDocument = "\n query getTicketsByStatus($startDate: Date!, $endDate: Date!) {\n getTicketsByStatus(startDate: $startDate, endDate: $endDate) {\n name\n current\n previous\n delta\n }\n}\n "; | ||
export type GetVolumeOfTicketsPerDayQueryVariables = Exact<{ | ||
startDate: Scalars['Date']['input']; | ||
endDate: Scalars['Date']['input']; | ||
}>; | ||
export type GetVolumeOfTicketsPerDayQuery = { | ||
getVolumeOfTicketsPerDay?: Maybe<VolumeFragment>; | ||
}; | ||
export type GetVolumeOfTicketsPerHourQueryVariables = Exact<{ | ||
date: Scalars['Date']['input']; | ||
}>; | ||
export type GetVolumeOfTicketsPerHourQuery = { | ||
getVolumeOfTicketsPerHour?: Maybe<Array<Maybe<Pick<Grouped, 'name' | 'value'>>>>; | ||
}; | ||
export type GetTicketsByTriggerAppQueryVariables = Exact<{ | ||
startDate: Scalars['Date']['input']; | ||
endDate: Scalars['Date']['input']; | ||
}>; | ||
export type GetTicketsByTriggerAppQuery = { | ||
getTicketsByTriggerApp?: Maybe<Array<Maybe<ChartFragment>>>; | ||
}; | ||
export declare const AverageFragmentDoc = "\n fragment average on AnalyticsAverage {\n delta\n current\n previous\n}\n "; | ||
export declare const VolumeFragmentDoc = "\n fragment volume on AnalyticsVolume {\n delta\n total\n prevTotal\n data {\n name\n value\n }\n}\n "; | ||
export declare const ChartFragmentDoc = "\n fragment chart on AnalyticsChart {\n delta\n current\n previous\n name\n}\n "; | ||
export declare const GetFirstResponseTimeDocument = "\n query getFirstResponseTime($startDate: Date!, $endDate: Date!) {\n getFirstResponseTime(startDate: $startDate, endDate: $endDate) {\n ...average\n }\n}\n \n fragment average on AnalyticsAverage {\n delta\n current\n previous\n}\n "; | ||
export declare const GetAttendanceTimeDocument = "\n query getAttendanceTime($startDate: Date!, $endDate: Date!) {\n getAttendanceTime(startDate: $startDate, endDate: $endDate) {\n ...average\n }\n}\n \n fragment average on AnalyticsAverage {\n delta\n current\n previous\n}\n "; | ||
export declare const GetTicketsByStatusDocument = "\n query getTicketsByStatus($startDate: Date!, $endDate: Date!) {\n getTicketsByStatus(startDate: $startDate, endDate: $endDate) {\n ...chart\n }\n}\n \n fragment chart on AnalyticsChart {\n delta\n current\n previous\n name\n}\n "; | ||
export declare const GetVolumeOfTicketsPerDayDocument = "\n query getVolumeOfTicketsPerDay($startDate: Date!, $endDate: Date!) {\n getVolumeOfTicketsPerDay(startDate: $startDate, endDate: $endDate) {\n ...volume\n }\n}\n \n fragment volume on AnalyticsVolume {\n delta\n total\n prevTotal\n data {\n name\n value\n }\n}\n "; | ||
export declare const GetVolumeOfTicketsPerHourDocument = "\n query getVolumeOfTicketsPerHour($date: Date!) {\n getVolumeOfTicketsPerHour(date: $date) {\n name\n value\n }\n}\n "; | ||
export declare const GetTicketsByTriggerAppDocument = "\n query getTicketsByTriggerApp($startDate: Date!, $endDate: Date!) {\n getTicketsByTriggerApp(startDate: $startDate, endDate: $endDate) {\n ...chart\n }\n}\n \n fragment chart on AnalyticsChart {\n delta\n current\n previous\n name\n}\n "; | ||
export type Requester<C = {}> = <R, V>(doc: string, vars?: V, options?: C) => Promise<R> | AsyncIterableIterator<R>; | ||
export declare function getSdk<C>(requester: Requester<C>): { | ||
getFirstResponseTime(variables: GetFirstResponseTimeQueryVariables, options?: C): Promise<GetFirstResponseTimeQuery>; | ||
getAttendanceTime(variables: GetAttendanceTimeQueryVariables, options?: C): Promise<GetAttendanceTimeQuery>; | ||
getTicketsByStatus(variables: GetTicketsByStatusQueryVariables, options?: C): Promise<GetTicketsByStatusQuery>; | ||
getVolumeOfTicketsPerDay(variables: GetVolumeOfTicketsPerDayQueryVariables, options?: C): Promise<GetVolumeOfTicketsPerDayQuery>; | ||
getVolumeOfTicketsPerHour(variables: GetVolumeOfTicketsPerHourQueryVariables, options?: C): Promise<GetVolumeOfTicketsPerHourQuery>; | ||
getTicketsByTriggerApp(variables: GetTicketsByTriggerAppQueryVariables, options?: C): Promise<GetTicketsByTriggerAppQuery>; | ||
}; | ||
export type Sdk = ReturnType<typeof getSdk>; | ||
export declare const serviceName = "@droz/drozanalytics"; |
"use strict"; | ||
/* istanbul ignore file */ | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.serviceName = exports.GetTicketsByStatusDocument = exports.GetFirstResponseTimeDocument = exports.Typenames = exports.Can = exports.AppInstanceStatus = void 0; | ||
exports.serviceName = exports.GetTicketsByTriggerAppDocument = exports.GetVolumeOfTicketsPerHourDocument = exports.GetVolumeOfTicketsPerDayDocument = exports.GetTicketsByStatusDocument = exports.GetAttendanceTimeDocument = exports.GetFirstResponseTimeDocument = exports.ChartFragmentDoc = exports.VolumeFragmentDoc = exports.AverageFragmentDoc = exports.Typenames = exports.Can = exports.AppInstanceStatus = void 0; | ||
exports.getSdk = getSdk; | ||
@@ -25,21 +25,71 @@ var AppInstanceStatus; | ||
})(Typenames || (exports.Typenames = Typenames = {})); | ||
exports.AverageFragmentDoc = ` | ||
fragment average on AnalyticsAverage { | ||
delta | ||
current | ||
previous | ||
} | ||
`; | ||
exports.VolumeFragmentDoc = ` | ||
fragment volume on AnalyticsVolume { | ||
delta | ||
total | ||
prevTotal | ||
data { | ||
name | ||
value | ||
} | ||
} | ||
`; | ||
exports.ChartFragmentDoc = ` | ||
fragment chart on AnalyticsChart { | ||
delta | ||
current | ||
previous | ||
name | ||
} | ||
`; | ||
exports.GetFirstResponseTimeDocument = ` | ||
query getFirstResponseTime($startDate: Date!, $endDate: Date!) { | ||
getFirstResponseTime(startDate: $startDate, endDate: $endDate) { | ||
current | ||
previous | ||
delta | ||
...average | ||
} | ||
} | ||
`; | ||
${exports.AverageFragmentDoc}`; | ||
exports.GetAttendanceTimeDocument = ` | ||
query getAttendanceTime($startDate: Date!, $endDate: Date!) { | ||
getAttendanceTime(startDate: $startDate, endDate: $endDate) { | ||
...average | ||
} | ||
} | ||
${exports.AverageFragmentDoc}`; | ||
exports.GetTicketsByStatusDocument = ` | ||
query getTicketsByStatus($startDate: Date!, $endDate: Date!) { | ||
getTicketsByStatus(startDate: $startDate, endDate: $endDate) { | ||
...chart | ||
} | ||
} | ||
${exports.ChartFragmentDoc}`; | ||
exports.GetVolumeOfTicketsPerDayDocument = ` | ||
query getVolumeOfTicketsPerDay($startDate: Date!, $endDate: Date!) { | ||
getVolumeOfTicketsPerDay(startDate: $startDate, endDate: $endDate) { | ||
...volume | ||
} | ||
} | ||
${exports.VolumeFragmentDoc}`; | ||
exports.GetVolumeOfTicketsPerHourDocument = ` | ||
query getVolumeOfTicketsPerHour($date: Date!) { | ||
getVolumeOfTicketsPerHour(date: $date) { | ||
name | ||
current | ||
previous | ||
delta | ||
value | ||
} | ||
} | ||
`; | ||
exports.GetTicketsByTriggerAppDocument = ` | ||
query getTicketsByTriggerApp($startDate: Date!, $endDate: Date!) { | ||
getTicketsByTriggerApp(startDate: $startDate, endDate: $endDate) { | ||
...chart | ||
} | ||
} | ||
${exports.ChartFragmentDoc}`; | ||
function getSdk(requester) { | ||
@@ -50,4 +100,16 @@ return { | ||
}, | ||
getAttendanceTime(variables, options) { | ||
return requester(exports.GetAttendanceTimeDocument, variables, options); | ||
}, | ||
getTicketsByStatus(variables, options) { | ||
return requester(exports.GetTicketsByStatusDocument, variables, options); | ||
}, | ||
getVolumeOfTicketsPerDay(variables, options) { | ||
return requester(exports.GetVolumeOfTicketsPerDayDocument, variables, options); | ||
}, | ||
getVolumeOfTicketsPerHour(variables, options) { | ||
return requester(exports.GetVolumeOfTicketsPerHourDocument, variables, options); | ||
}, | ||
getTicketsByTriggerApp(variables, options) { | ||
return requester(exports.GetTicketsByTriggerAppDocument, variables, options); | ||
} | ||
@@ -54,0 +116,0 @@ }; |
1450309
82
28951