ticketHistory.api.ts 3.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106
  1. import * as Types from '#shared/graphql/types.ts';
  2. import gql from 'graphql-tag';
  3. import * as VueApolloComposable from '@vue/apollo-composable';
  4. import * as VueCompositionApi from 'vue';
  5. export type ReactiveFunction<TParam> = () => TParam;
  6. export const TicketHistoryDocument = gql`
  7. query ticketHistory($ticketId: ID, $ticketInternalId: Int, $ticketNumber: String) {
  8. ticketHistory(
  9. ticket: {ticketId: $ticketId, ticketInternalId: $ticketInternalId, ticketNumber: $ticketNumber}
  10. ) {
  11. createdAt
  12. records {
  13. issuer {
  14. ... on User {
  15. id
  16. internalId
  17. firstname
  18. lastname
  19. fullname
  20. phone
  21. email
  22. image
  23. }
  24. ... on Trigger {
  25. id
  26. name
  27. }
  28. ... on Job {
  29. id
  30. name
  31. }
  32. ... on PostmasterFilter {
  33. id
  34. name
  35. }
  36. ... on ObjectClass {
  37. klass
  38. info
  39. }
  40. }
  41. events {
  42. createdAt
  43. action
  44. object {
  45. ... on Checklist {
  46. id
  47. name
  48. }
  49. ... on ChecklistItem {
  50. id
  51. text
  52. checked
  53. }
  54. ... on Group {
  55. id
  56. name
  57. }
  58. ... on Mention {
  59. id
  60. user {
  61. id
  62. fullname
  63. }
  64. }
  65. ... on Organization {
  66. id
  67. name
  68. }
  69. ... on Ticket {
  70. id
  71. internalId
  72. number
  73. title
  74. }
  75. ... on TicketArticle {
  76. id
  77. body
  78. }
  79. ... on TicketSharedDraftZoom {
  80. id
  81. }
  82. ... on User {
  83. id
  84. fullname
  85. }
  86. ... on ObjectClass {
  87. klass
  88. info
  89. }
  90. }
  91. attribute
  92. changes
  93. }
  94. }
  95. }
  96. }
  97. `;
  98. export function useTicketHistoryQuery(variables: Types.TicketHistoryQueryVariables | VueCompositionApi.Ref<Types.TicketHistoryQueryVariables> | ReactiveFunction<Types.TicketHistoryQueryVariables> = {}, options: VueApolloComposable.UseQueryOptions<Types.TicketHistoryQuery, Types.TicketHistoryQueryVariables> | VueCompositionApi.Ref<VueApolloComposable.UseQueryOptions<Types.TicketHistoryQuery, Types.TicketHistoryQueryVariables>> | ReactiveFunction<VueApolloComposable.UseQueryOptions<Types.TicketHistoryQuery, Types.TicketHistoryQueryVariables>> = {}) {
  99. return VueApolloComposable.useQuery<Types.TicketHistoryQuery, Types.TicketHistoryQueryVariables>(TicketHistoryDocument, variables, options);
  100. }
  101. export function useTicketHistoryLazyQuery(variables: Types.TicketHistoryQueryVariables | VueCompositionApi.Ref<Types.TicketHistoryQueryVariables> | ReactiveFunction<Types.TicketHistoryQueryVariables> = {}, options: VueApolloComposable.UseQueryOptions<Types.TicketHistoryQuery, Types.TicketHistoryQueryVariables> | VueCompositionApi.Ref<VueApolloComposable.UseQueryOptions<Types.TicketHistoryQuery, Types.TicketHistoryQueryVariables>> | ReactiveFunction<VueApolloComposable.UseQueryOptions<Types.TicketHistoryQuery, Types.TicketHistoryQueryVariables>> = {}) {
  102. return VueApolloComposable.useLazyQuery<Types.TicketHistoryQuery, Types.TicketHistoryQueryVariables>(TicketHistoryDocument, variables, options);
  103. }
  104. export type TicketHistoryQueryCompositionFunctionResult = VueApolloComposable.UseQueryReturn<Types.TicketHistoryQuery, Types.TicketHistoryQueryVariables>;