ticketsByOverview.api.ts 3.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778
  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. name
  44. }
  45. }
  46. group {
  47. id
  48. name
  49. }
  50. priority @include(if: $showPriority) {
  51. id
  52. name
  53. uiColor
  54. defaultCreate
  55. }
  56. objectAttributeValues @include(if: $withObjectAttributes) {
  57. ...objectAttributeValues
  58. }
  59. stateColorCode
  60. }
  61. cursor
  62. }
  63. pageInfo {
  64. endCursor
  65. hasNextPage
  66. }
  67. }
  68. }
  69. ${ObjectAttributeValuesFragmentDoc}`;
  70. 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>> = {}) {
  71. return VueApolloComposable.useQuery<Types.TicketsByOverviewQuery, Types.TicketsByOverviewQueryVariables>(TicketsByOverviewDocument, variables, options);
  72. }
  73. 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>> = {}) {
  74. return VueApolloComposable.useLazyQuery<Types.TicketsByOverviewQuery, Types.TicketsByOverviewQueryVariables>(TicketsByOverviewDocument, variables, options);
  75. }
  76. export type TicketsByOverviewQueryCompositionFunctionResult = VueApolloComposable.UseQueryReturn<Types.TicketsByOverviewQuery, Types.TicketsByOverviewQueryVariables>;