ticketsByOverview.api.ts 3.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879
  1. import * as Types from '#shared/graphql/types.ts';
  2. import gql from 'graphql-tag';
  3. import { ObjectAttributeValuesFragmentDoc } from '../../../../../../shared/graphql/fragments/objectAttributeValues.api';
  4. import * as VueApolloComposable from '@vue/apollo-composable';
  5. import * as VueCompositionApi from 'vue';
  6. export type ReactiveFunction<TParam> = () => TParam;
  7. export const TicketsByOverviewDocument = gql`
  8. query ticketsByOverview($overviewId: ID!, $orderBy: String, $orderDirection: EnumOrderDirection, $cursor: String, $showPriority: Boolean!, $showUpdatedBy: Boolean!, $pageSize: Int = 10, $withObjectAttributes: Boolean = false) {
  9. ticketsByOverview(
  10. overviewId: $overviewId
  11. orderBy: $orderBy
  12. orderDirection: $orderDirection
  13. after: $cursor
  14. first: $pageSize
  15. ) {
  16. totalCount
  17. edges {
  18. node {
  19. id
  20. internalId
  21. number
  22. title
  23. createdAt
  24. updatedAt
  25. updatedBy @include(if: $showUpdatedBy) {
  26. id
  27. fullname
  28. }
  29. customer {
  30. id
  31. firstname
  32. lastname
  33. fullname
  34. }
  35. organization {
  36. id
  37. name
  38. }
  39. state {
  40. id
  41. name
  42. stateType {
  43. id
  44. name
  45. }
  46. }
  47. group {
  48. id
  49. name
  50. }
  51. priority @include(if: $showPriority) {
  52. id
  53. name
  54. uiColor
  55. defaultCreate
  56. }
  57. objectAttributeValues @include(if: $withObjectAttributes) {
  58. ...objectAttributeValues
  59. }
  60. stateColorCode
  61. }
  62. cursor
  63. }
  64. pageInfo {
  65. endCursor
  66. hasNextPage
  67. }
  68. }
  69. }
  70. ${ObjectAttributeValuesFragmentDoc}`;
  71. export function useTicketsByOverviewQuery(variables: Types.TicketsByOverviewQueryVariables | VueCompositionApi.Ref<Types.TicketsByOverviewQueryVariables> | ReactiveFunction<Types.TicketsByOverviewQueryVariables>, options: VueApolloComposable.UseQueryOptions<Types.TicketsByOverviewQuery, Types.TicketsByOverviewQueryVariables> | VueCompositionApi.Ref<VueApolloComposable.UseQueryOptions<Types.TicketsByOverviewQuery, Types.TicketsByOverviewQueryVariables>> | ReactiveFunction<VueApolloComposable.UseQueryOptions<Types.TicketsByOverviewQuery, Types.TicketsByOverviewQueryVariables>> = {}) {
  72. return VueApolloComposable.useQuery<Types.TicketsByOverviewQuery, Types.TicketsByOverviewQueryVariables>(TicketsByOverviewDocument, variables, options);
  73. }
  74. export function useTicketsByOverviewLazyQuery(variables?: Types.TicketsByOverviewQueryVariables | VueCompositionApi.Ref<Types.TicketsByOverviewQueryVariables> | ReactiveFunction<Types.TicketsByOverviewQueryVariables>, options: VueApolloComposable.UseQueryOptions<Types.TicketsByOverviewQuery, Types.TicketsByOverviewQueryVariables> | VueCompositionApi.Ref<VueApolloComposable.UseQueryOptions<Types.TicketsByOverviewQuery, Types.TicketsByOverviewQueryVariables>> | ReactiveFunction<VueApolloComposable.UseQueryOptions<Types.TicketsByOverviewQuery, Types.TicketsByOverviewQueryVariables>> = {}) {
  75. return VueApolloComposable.useLazyQuery<Types.TicketsByOverviewQuery, Types.TicketsByOverviewQueryVariables>(TicketsByOverviewDocument, variables, options);
  76. }
  77. export type TicketsByOverviewQueryCompositionFunctionResult = VueApolloComposable.UseQueryReturn<Types.TicketsByOverviewQuery, Types.TicketsByOverviewQueryVariables>;