@squonk/account-server-client 2.1.0-rc.8 → 2.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (79) hide show
  1. package/README.md +1 -1
  2. package/admin/admin.cjs +19 -4
  3. package/admin/admin.cjs.map +1 -1
  4. package/admin/admin.d.cts +23 -6
  5. package/admin/admin.d.ts +23 -6
  6. package/admin/admin.js +19 -4
  7. package/admin/admin.js.map +1 -1
  8. package/asset/asset.cjs +33 -18
  9. package/asset/asset.cjs.map +1 -1
  10. package/asset/asset.d.cts +31 -14
  11. package/asset/asset.d.ts +31 -14
  12. package/asset/asset.js +25 -10
  13. package/asset/asset.js.map +1 -1
  14. package/{chunk-UKA7G3OB.js → chunk-EBOQPVLG.js} +2 -2
  15. package/{chunk-UKA7G3OB.js.map → chunk-EBOQPVLG.js.map} +1 -1
  16. package/{chunk-J22A7LHX.cjs → chunk-TKLTUR4R.cjs} +2 -2
  17. package/chunk-TKLTUR4R.cjs.map +1 -0
  18. package/event-stream/event-stream.cjs +39 -10
  19. package/event-stream/event-stream.cjs.map +1 -1
  20. package/event-stream/event-stream.d.cts +51 -17
  21. package/event-stream/event-stream.d.ts +51 -17
  22. package/event-stream/event-stream.js +36 -7
  23. package/event-stream/event-stream.js.map +1 -1
  24. package/index.cjs +2 -2
  25. package/index.cjs.map +1 -1
  26. package/index.d.cts +702 -2
  27. package/index.d.ts +702 -2
  28. package/index.js +1 -1
  29. package/index.js.map +1 -1
  30. package/merchant/merchant.cjs +35 -6
  31. package/merchant/merchant.cjs.map +1 -1
  32. package/merchant/merchant.d.cts +42 -8
  33. package/merchant/merchant.d.ts +42 -8
  34. package/merchant/merchant.js +34 -5
  35. package/merchant/merchant.js.map +1 -1
  36. package/organisation/organisation.cjs +73 -16
  37. package/organisation/organisation.cjs.map +1 -1
  38. package/organisation/organisation.d.cts +84 -16
  39. package/organisation/organisation.d.ts +84 -16
  40. package/organisation/organisation.js +66 -9
  41. package/organisation/organisation.js.map +1 -1
  42. package/package.json +12 -12
  43. package/product/product.cjs +121 -22
  44. package/product/product.cjs.map +1 -1
  45. package/product/product.d.cts +141 -22
  46. package/product/product.d.ts +141 -22
  47. package/product/product.js +111 -12
  48. package/product/product.js.map +1 -1
  49. package/src/account-server-api.schemas.ts +4 -2
  50. package/src/admin/admin.ts +50 -14
  51. package/src/asset/asset.ts +57 -35
  52. package/src/custom-instance.ts +3 -4
  53. package/src/event-stream/event-stream.ts +100 -29
  54. package/src/merchant/merchant.ts +93 -18
  55. package/src/organisation/organisation.ts +184 -35
  56. package/src/product/product.ts +313 -47
  57. package/src/state/state.ts +50 -14
  58. package/src/unit/unit.ts +190 -45
  59. package/src/user/user.ts +140 -34
  60. package/state/state.cjs +19 -4
  61. package/state/state.cjs.map +1 -1
  62. package/state/state.d.cts +23 -6
  63. package/state/state.d.ts +23 -6
  64. package/state/state.js +19 -4
  65. package/state/state.js.map +1 -1
  66. package/unit/unit.cjs +77 -20
  67. package/unit/unit.cjs.map +1 -1
  68. package/unit/unit.d.cts +91 -23
  69. package/unit/unit.d.ts +91 -23
  70. package/unit/unit.js +68 -11
  71. package/unit/unit.js.map +1 -1
  72. package/user/user.cjs +59 -16
  73. package/user/user.cjs.map +1 -1
  74. package/user/user.d.cts +66 -15
  75. package/user/user.d.ts +66 -15
  76. package/user/user.js +53 -10
  77. package/user/user.js.map +1 -1
  78. package/chunk-J22A7LHX.cjs.map +0 -1
  79. package/custom-instance-6780910b.d.ts +0 -700
@@ -1 +1 @@
1
- {"version":3,"sources":["../../src/event-stream/event-stream.ts"],"names":[],"mappings":";;;;;AAUA;AAAA,EACE;AAAA,EACA;AAAA,OACK;AA+BA,IAAM,iBAAiB,CAE7B,SAAiD,WAC7C;AAGC,SAAO;AAAA,IACP;AAAA,MAAC,KAAK;AAAA,MAAiB,QAAQ;AAAA,MAAO;AAAA,IACxC;AAAA,IACE;AAAA,EAAO;AACT;AAGG,IAAM,4BAA4B,MAAM;AAE3C,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AW,CAAC;AAEjE,QAAM,YAAY,6CAAc,aAAY,gCAAgC,aAAa;AAIvF,QAAM,UAA2E,CAAC,EAAE,OAAO,MAAM,qBAAqB,eAAe,gBAAgB,MAAM;AAM5J,SAAQ,EAAE,UAAU,SAAS,SAAS,CAAC,CAAE,eAAgB,GAAG,aAAY;AAC3E;AAQO,IAAM,0BAA0B,CACtC,eAAuB,YAEwC;AAE9D,QAAM,eAAe,oCAAoC,eAAc,OAAO;AAE9E,QAAM,QAAQ,SAAS,YAAY;AAEnC,QAAM,WAAW,aAAa;AAE9B,SAAO;AACT;AAWO,IAAM,oBAAoB,CAC7B,eACH,YAAsD;AAGjD,SAAO;AAAA,IACP;AAAA,MAAC,KAAK,iBAAiB,aAAa;AAAA,MAAI,QAAQ;AAAA,IAClD;AAAA,IACE;AAAA,EAAO;AACT;AAIG,IAAM,sCAAsC,CAE3B,YAC0F;AACjH,QAAM,EAAC,UAAU,iBAAiB,SAAS,eAAc,IAAI,WAAW,CAAC;AAKpE,QAAM,aAAuG,CAAC,UAAU;AACpH,UAAM,EAAC,cAAa,IAAI,SAAS,CAAC;AAElC,WAAQ,kBAAkB,eAAc,cAAc;AAAA,EACxD;AAKL,SAAQ,EAAE,YAAY,GAAG,gBAAgB;AAAC;AAStC,IAAM,uBAAuB,CAEZ,YACnB;AAEC,QAAM,kBAAkB,oCAAoC,OAAO;AAEnE,SAAO,YAAY,eAAe;AACpC","sourcesContent":["/**\n * Generated by orval v6.20.0 🍺\n * Do not edit manually.\n * Account Server API\n * The Informatics Matters Account Server API.\n\nA service that provides access to the Account Server, which gives *registered* users access to and management of **Organisations**, **Units**, **Products**, **Users**, and **Assets**.\n\n * OpenAPI spec version: 2.1\n */\nimport {\n useMutation,\n useQuery\n} from '@tanstack/react-query'\nimport type {\n MutationFunction,\n QueryFunction,\n QueryKey,\n UseMutationOptions,\n UseQueryOptions,\n UseQueryResult\n} from '@tanstack/react-query'\nimport type {\n AsError,\n EventStreamGetPostResponse\n} from '../account-server-api.schemas'\nimport { customInstance } from '.././custom-instance';\nimport type { ErrorType } from '.././custom-instance';\n\n\n// eslint-disable-next-line\n type SecondParameter<T extends (...args: any) => any> = T extends (\n config: any,\n args: infer P,\n) => any\n ? P\n : never;\n\n\n/**\n * Gets your EventStream ID and read token, if you have created one.\n\n * @summary Gets the details of your EventStream\n */\nexport const getEventStream = (\n \n options?: SecondParameter<typeof customInstance>,signal?: AbortSignal\n) => {\n \n \n return customInstance<EventStreamGetPostResponse>(\n {url: `/event-stream`, method: 'get', signal\n },\n options);\n }\n \n\nexport const getGetEventStreamQueryKey = () => {\n \n return [\"account-server-api\", `/event-stream`] as const;\n }\n\n \nexport const getGetEventStreamQueryOptions = <TData = Awaited<ReturnType<typeof getEventStream>>, TError = ErrorType<void | AsError>>( options?: { query?:UseQueryOptions<Awaited<ReturnType<typeof getEventStream>>, TError, TData>, request?: SecondParameter<typeof customInstance>}\n) => {\n\nconst {query: queryOptions, request: requestOptions} = options ?? {};\n\n const queryKey = queryOptions?.queryKey ?? getGetEventStreamQueryKey();\n\n \n\n const queryFn: QueryFunction<Awaited<ReturnType<typeof getEventStream>>> = ({ signal }) => getEventStream(requestOptions, signal);\n\n \n\n \n\n return { queryKey, queryFn, ...queryOptions} as UseQueryOptions<Awaited<ReturnType<typeof getEventStream>>, TError, TData> & { queryKey: QueryKey }\n}\n\nexport type GetEventStreamQueryResult = NonNullable<Awaited<ReturnType<typeof getEventStream>>>\nexport type GetEventStreamQueryError = ErrorType<void | AsError>\n\n/**\n * @summary Gets the details of your EventStream\n */\nexport const useGetEventStream = <TData = Awaited<ReturnType<typeof getEventStream>>, TError = ErrorType<void | AsError>>(\n options?: { query?:UseQueryOptions<Awaited<ReturnType<typeof getEventStream>>, TError, TData>, request?: SecondParameter<typeof customInstance>}\n\n ): UseQueryResult<TData, TError> & { queryKey: QueryKey } => {\n\n const queryOptions = getGetEventStreamQueryOptions(options)\n\n const query = useQuery(queryOptions) as UseQueryResult<TData, TError> & { queryKey: QueryKey };\n\n query.queryKey = queryOptions.queryKey ;\n\n return query;\n}\n\n\n\n/**\n * Creates a new event stream (based on the **Server Sent Events** framework) for the authenticated user.\n\nA user is only permitted one event stream.\n\n * @summary Create a new Server-Sent Events EventStream\n */\nexport const createEventStream = (\n \n options?: SecondParameter<typeof customInstance>,) => {\n \n \n return customInstance<EventStreamGetPostResponse>(\n {url: `/event-stream`, method: 'post'\n },\n options);\n }\n \n\n\nexport const getCreateEventStreamMutationOptions = <TError = ErrorType<AsError | void>,\n TVariables = void,\n TContext = unknown>(options?: { mutation?:UseMutationOptions<Awaited<ReturnType<typeof createEventStream>>, TError,TVariables, TContext>, request?: SecondParameter<typeof customInstance>}\n): UseMutationOptions<Awaited<ReturnType<typeof createEventStream>>, TError,TVariables, TContext> => {\n const {mutation: mutationOptions, request: requestOptions} = options ?? {};\n\n \n\n\n const mutationFn: MutationFunction<Awaited<ReturnType<typeof createEventStream>>, TVariables> = () => {\n \n\n return createEventStream(requestOptions)\n }\n\n \n\n\n return { mutationFn, ...mutationOptions }}\n\n export type CreateEventStreamMutationResult = NonNullable<Awaited<ReturnType<typeof createEventStream>>>\n \n export type CreateEventStreamMutationError = ErrorType<AsError | void>\n\n /**\n * @summary Create a new Server-Sent Events EventStream\n */\nexport const useCreateEventStream = <TError = ErrorType<AsError | void>,\n TVariables = void,\n TContext = unknown>(options?: { mutation?:UseMutationOptions<Awaited<ReturnType<typeof createEventStream>>, TError,TVariables, TContext>, request?: SecondParameter<typeof customInstance>}\n) => {\n\n const mutationOptions = getCreateEventStreamMutationOptions(options);\n\n return useMutation(mutationOptions);\n }\n /**\n * Gets events that you are entitled to receive. Events are delivered as **Server Sent Events** and you are expected to continuously read form this endpoint or it will be closed.\n\nThis is an un-authenticated endpoint. In order to read from the stream the caller must provide the **read token** they were allocated when the stream was created The token must be provided in the request header property `X-IM-AS-EventStreamReadToken`.\n\n * @summary Subscribe to Server-Sent Events events from an EventStream\n */\nexport const getEventStreamEvents = (\n eventStreamId: number,\n options?: SecondParameter<typeof customInstance>,signal?: AbortSignal\n) => {\n \n \n return customInstance<string>(\n {url: `/event-stream/${eventStreamId}`, method: 'get', signal\n },\n options);\n }\n \n\nexport const getGetEventStreamEventsQueryKey = (eventStreamId: number,) => {\n \n return [\"account-server-api\", `/event-stream/${eventStreamId}`] as const;\n }\n\n \nexport const getGetEventStreamEventsQueryOptions = <TData = Awaited<ReturnType<typeof getEventStreamEvents>>, TError = ErrorType<void | AsError>>(eventStreamId: number, options?: { query?:UseQueryOptions<Awaited<ReturnType<typeof getEventStreamEvents>>, TError, TData>, request?: SecondParameter<typeof customInstance>}\n) => {\n\nconst {query: queryOptions, request: requestOptions} = options ?? {};\n\n const queryKey = queryOptions?.queryKey ?? getGetEventStreamEventsQueryKey(eventStreamId);\n\n \n\n const queryFn: QueryFunction<Awaited<ReturnType<typeof getEventStreamEvents>>> = ({ signal }) => getEventStreamEvents(eventStreamId, requestOptions, signal);\n\n \n\n \n\n return { queryKey, queryFn, enabled: !!(eventStreamId), ...queryOptions} as UseQueryOptions<Awaited<ReturnType<typeof getEventStreamEvents>>, TError, TData> & { queryKey: QueryKey }\n}\n\nexport type GetEventStreamEventsQueryResult = NonNullable<Awaited<ReturnType<typeof getEventStreamEvents>>>\nexport type GetEventStreamEventsQueryError = ErrorType<void | AsError>\n\n/**\n * @summary Subscribe to Server-Sent Events events from an EventStream\n */\nexport const useGetEventStreamEvents = <TData = Awaited<ReturnType<typeof getEventStreamEvents>>, TError = ErrorType<void | AsError>>(\n eventStreamId: number, options?: { query?:UseQueryOptions<Awaited<ReturnType<typeof getEventStreamEvents>>, TError, TData>, request?: SecondParameter<typeof customInstance>}\n\n ): UseQueryResult<TData, TError> & { queryKey: QueryKey } => {\n\n const queryOptions = getGetEventStreamEventsQueryOptions(eventStreamId,options)\n\n const query = useQuery(queryOptions) as UseQueryResult<TData, TError> & { queryKey: QueryKey };\n\n query.queryKey = queryOptions.queryKey ;\n\n return query;\n}\n\n\n\n/**\n * Deletes an Event Stream.\n\nYou must be the user who created the event stream.\n\n * @summary Deletes an existing EventStream (that you created)\n */\nexport const deleteEventStream = (\n eventStreamId: number,\n options?: SecondParameter<typeof customInstance>,) => {\n \n \n return customInstance<void>(\n {url: `/event-stream/${eventStreamId}`, method: 'delete'\n },\n options);\n }\n \n\n\nexport const getDeleteEventStreamMutationOptions = <TError = ErrorType<AsError>,\n \n TContext = unknown>(options?: { mutation?:UseMutationOptions<Awaited<ReturnType<typeof deleteEventStream>>, TError,{eventStreamId: number}, TContext>, request?: SecondParameter<typeof customInstance>}\n): UseMutationOptions<Awaited<ReturnType<typeof deleteEventStream>>, TError,{eventStreamId: number}, TContext> => {\n const {mutation: mutationOptions, request: requestOptions} = options ?? {};\n\n \n\n\n const mutationFn: MutationFunction<Awaited<ReturnType<typeof deleteEventStream>>, {eventStreamId: number}> = (props) => {\n const {eventStreamId} = props ?? {};\n\n return deleteEventStream(eventStreamId,requestOptions)\n }\n\n \n\n\n return { mutationFn, ...mutationOptions }}\n\n export type DeleteEventStreamMutationResult = NonNullable<Awaited<ReturnType<typeof deleteEventStream>>>\n \n export type DeleteEventStreamMutationError = ErrorType<AsError>\n\n /**\n * @summary Deletes an existing EventStream (that you created)\n */\nexport const useDeleteEventStream = <TError = ErrorType<AsError>,\n \n TContext = unknown>(options?: { mutation?:UseMutationOptions<Awaited<ReturnType<typeof deleteEventStream>>, TError,{eventStreamId: number}, TContext>, request?: SecondParameter<typeof customInstance>}\n) => {\n\n const mutationOptions = getDeleteEventStreamMutationOptions(options);\n\n return useMutation(mutationOptions);\n }\n "]}
1
+ {"version":3,"sources":["../../src/event-stream/event-stream.ts"],"names":[],"mappings":";;;;;AAUA;AAAA,EACE;AAAA,EACA;AAAA,EACA;AAAA,OACK;AA2BA,IAAM,iBAAiB,CAE7B,SAAiD,WAC7C;AAGC,SAAO;AAAA,IACP;AAAA,MAAC,KAAK;AAAA,MAAiB,QAAQ;AAAA,MAAO;AAAA,IACxC;AAAA,IACE;AAAA,E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AAW,aAAa;AAE9B,SAAO;AACT;AAWO,IAAM,oBAAoB,CAC7B,eACH,YAAsD;AAGjD,SAAO;AAAA,IACP;AAAA,MAAC,KAAK,iBAAiB,aAAa;AAAA,MAAI,QAAQ;AAAA,IAClD;AAAA,IACE;AAAA,EAAO;AACT;AAIG,IAAM,sCAAsC,CAC3B,YAC0F;AACjH,QAAM,EAAC,UAAU,iBAAiB,SAAS,eAAc,IAAI,WAAW,CAAC;AAKpE,QAAM,aAAuG,CAAC,UAAU;AACpH,UAAM,EAAC,cAAa,IAAI,SAAS,CAAC;AAElC,WAAQ,kBAAkB,eAAc,cAAc;AAAA,EACxD;AAKL,SAAQ,EAAE,YAAY,GAAG,gBAAgB;AAAC;AAStC,IAAM,uBAAuB,CACZ,YACnB;AAEC,QAAM,kBAAkB,oCAAoC,OAAO;AAEnE,SAAO,YAAY,eAAe;AACpC","sourcesContent":["/**\n * Generated by orval v6.25.0 🍺\n * Do not edit manually.\n * Account Server API\n * The Informatics Matters Account Server API.\n\nA service that provides access to the Account Server, which gives *registered* users access to and management of **Organisations**, **Units**, **Products**, **Users**, and **Assets**.\n\n * OpenAPI spec version: 2.1\n */\nimport {\n useMutation,\n useQuery,\n useSuspenseQuery\n} from '@tanstack/react-query'\nimport type {\n MutationFunction,\n QueryFunction,\n QueryKey,\n UseMutationOptions,\n UseQueryOptions,\n UseQueryResult,\n UseSuspenseQueryOptions,\n UseSuspenseQueryResult\n} from '@tanstack/react-query'\nimport type {\n AsError,\n EventStreamGetPostResponse\n} from '../account-server-api.schemas'\nimport { customInstance } from '.././custom-instance';\nimport type { ErrorType } from '.././custom-instance';\n\n\ntype SecondParameter<T extends (...args: any) => any> = Parameters<T>[1];\n\n\n/**\n * Gets your EventStream ID and read token, if you have created one.\n\n * @summary Gets the details of your EventStream\n */\nexport const getEventStream = (\n \n options?: SecondParameter<typeof customInstance>,signal?: AbortSignal\n) => {\n \n \n return customInstance<EventStreamGetPostResponse>(\n {url: `/event-stream`, method: 'GET', signal\n },\n options);\n }\n \n\nexport const getGetEventStreamQueryKey = () => {\n return [\"account-server-api\", `/event-stream`] as const;\n }\n\n \nexport const getGetEventStreamQueryOptions = <TData = Awaited<ReturnType<typeof getEventStream>>, TError = ErrorType<void | AsError>>( options?: { query?:Partial<UseQueryOptions<Awaited<ReturnType<typeof getEventStream>>, TError, TData>>, request?: SecondParameter<typeof customInstance>}\n) => {\n\nconst {query: queryOptions, request: requestOptions} = options ?? {};\n\n const queryKey = queryOptions?.queryKey ?? getGetEventStreamQueryKey();\n\n \n\n const queryFn: QueryFunction<Awaited<ReturnType<typeof getEventStream>>> = ({ signal }) => getEventStream(requestOptions, signal);\n\n \n\n \n\n return { queryKey, queryFn, ...queryOptions} as UseQueryOptions<Awaited<ReturnType<typeof getEventStream>>, TError, TData> & { queryKey: QueryKey }\n}\n\nexport type GetEventStreamQueryResult = NonNullable<Awaited<ReturnType<typeof getEventStream>>>\nexport type GetEventStreamQueryError = ErrorType<void | AsError>\n\n/**\n * @summary Gets the details of your EventStream\n */\nexport const useGetEventStream = <TData = Awaited<ReturnType<typeof getEventStream>>, TError = ErrorType<void | AsError>>(\n options?: { query?:Partial<UseQueryOptions<Awaited<ReturnType<typeof getEventStream>>, TError, TData>>, request?: SecondParameter<typeof customInstance>}\n\n ): UseQueryResult<TData, TError> & { queryKey: QueryKey } => {\n\n const queryOptions = getGetEventStreamQueryOptions(options)\n\n const query = useQuery(queryOptions) as UseQueryResult<TData, TError> & { queryKey: QueryKey };\n\n query.queryKey = queryOptions.queryKey ;\n\n return query;\n}\n\n\n\nexport const getGetEventStreamSuspenseQueryOptions = <TData = Awaited<ReturnType<typeof getEventStream>>, TError = ErrorType<void | AsError>>( options?: { query?:Partial<UseSuspenseQueryOptions<Awaited<ReturnType<typeof getEventStream>>, TError, TData>>, request?: SecondParameter<typeof customInstance>}\n) => {\n\nconst {query: queryOptions, request: requestOptions} = options ?? {};\n\n const queryKey = queryOptions?.queryKey ?? getGetEventStreamQueryKey();\n\n \n\n const queryFn: QueryFunction<Awaited<ReturnType<typeof getEventStream>>> = ({ signal }) => getEventStream(requestOptions, signal);\n\n \n\n \n\n return { queryKey, queryFn, ...queryOptions} as UseSuspenseQueryOptions<Awaited<ReturnType<typeof getEventStream>>, TError, TData> & { queryKey: QueryKey }\n}\n\nexport type GetEventStreamSuspenseQueryResult = NonNullable<Awaited<ReturnType<typeof getEventStream>>>\nexport type GetEventStreamSuspenseQueryError = ErrorType<void | AsError>\n\n/**\n * @summary Gets the details of your EventStream\n */\nexport const useGetEventStreamSuspense = <TData = Awaited<ReturnType<typeof getEventStream>>, TError = ErrorType<void | AsError>>(\n options?: { query?:Partial<UseSuspenseQueryOptions<Awaited<ReturnType<typeof getEventStream>>, TError, TData>>, request?: SecondParameter<typeof customInstance>}\n\n ): UseSuspenseQueryResult<TData, TError> & { queryKey: QueryKey } => {\n\n const queryOptions = getGetEventStreamSuspenseQueryOptions(options)\n\n const query = useSuspenseQuery(queryOptions) as UseSuspenseQueryResult<TData, TError> & { queryKey: QueryKey };\n\n query.queryKey = queryOptions.queryKey ;\n\n return query;\n}\n\n\n\n/**\n * Creates a new event stream (based on the **Server Sent Events** framework) for the authenticated user.\n\nA user is only permitted one event stream.\n\n * @summary Create a new Server-Sent Events EventStream\n */\nexport const createEventStream = (\n \n options?: SecondParameter<typeof customInstance>,) => {\n \n \n return customInstance<EventStreamGetPostResponse>(\n {url: `/event-stream`, method: 'POST'\n },\n options);\n }\n \n\n\nexport const getCreateEventStreamMutationOptions = <TError = ErrorType<AsError | void>,\n TContext = unknown>(options?: { mutation?:UseMutationOptions<Awaited<ReturnType<typeof createEventStream>>, TError,void, TContext>, request?: SecondParameter<typeof customInstance>}\n): UseMutationOptions<Awaited<ReturnType<typeof createEventStream>>, TError,void, TContext> => {\n const {mutation: mutationOptions, request: requestOptions} = options ?? {};\n\n \n\n\n const mutationFn: MutationFunction<Awaited<ReturnType<typeof createEventStream>>, void> = () => {\n \n\n return createEventStream(requestOptions)\n }\n\n \n\n\n return { mutationFn, ...mutationOptions }}\n\n export type CreateEventStreamMutationResult = NonNullable<Awaited<ReturnType<typeof createEventStream>>>\n \n export type CreateEventStreamMutationError = ErrorType<AsError | void>\n\n /**\n * @summary Create a new Server-Sent Events EventStream\n */\nexport const useCreateEventStream = <TError = ErrorType<AsError | void>,\n TContext = unknown>(options?: { mutation?:UseMutationOptions<Awaited<ReturnType<typeof createEventStream>>, TError,void, TContext>, request?: SecondParameter<typeof customInstance>}\n) => {\n\n const mutationOptions = getCreateEventStreamMutationOptions(options);\n\n return useMutation(mutationOptions);\n }\n /**\n * Gets events that you are entitled to receive. Events are delivered as **Server Sent Events** and you are expected to continuously read form this endpoint or it will be closed.\n\nThis is an un-authenticated endpoint. In order to read from the stream the caller must provide either the User access token that belongs to the event stream or the **read token** that was allocated when the stream was created. The **read token** must be provided in the request header property `X-IM-AS-EventStreamReadToken`.\n\n * @summary Subscribe to Server-Sent Events events from an EventStream\n */\nexport const getEventStreamEvents = (\n eventStreamId: number,\n options?: SecondParameter<typeof customInstance>,signal?: AbortSignal\n) => {\n \n \n return customInstance<string>(\n {url: `/event-stream/${eventStreamId}`, method: 'GET', signal\n },\n options);\n }\n \n\nexport const getGetEventStreamEventsQueryKey = (eventStreamId: number,) => {\n return [\"account-server-api\", `/event-stream/${eventStreamId}`] as const;\n }\n\n \nexport const getGetEventStreamEventsQueryOptions = <TData = Awaited<ReturnType<typeof getEventStreamEvents>>, TError = ErrorType<void | AsError>>(eventStreamId: number, options?: { query?:Partial<UseQueryOptions<Awaited<ReturnType<typeof getEventStreamEvents>>, TError, TData>>, request?: SecondParameter<typeof customInstance>}\n) => {\n\nconst {query: queryOptions, request: requestOptions} = options ?? {};\n\n const queryKey = queryOptions?.queryKey ?? getGetEventStreamEventsQueryKey(eventStreamId);\n\n \n\n const queryFn: QueryFunction<Awaited<ReturnType<typeof getEventStreamEvents>>> = ({ signal }) => getEventStreamEvents(eventStreamId, requestOptions, signal);\n\n \n\n \n\n return { queryKey, queryFn, enabled: !!(eventStreamId), ...queryOptions} as UseQueryOptions<Awaited<ReturnType<typeof getEventStreamEvents>>, TError, TData> & { queryKey: QueryKey }\n}\n\nexport type GetEventStreamEventsQueryResult = NonNullable<Awaited<ReturnType<typeof getEventStreamEvents>>>\nexport type GetEventStreamEventsQueryError = ErrorType<void | AsError>\n\n/**\n * @summary Subscribe to Server-Sent Events events from an EventStream\n */\nexport const useGetEventStreamEvents = <TData = Awaited<ReturnType<typeof getEventStreamEvents>>, TError = ErrorType<void | AsError>>(\n eventStreamId: number, options?: { query?:Partial<UseQueryOptions<Awaited<ReturnType<typeof getEventStreamEvents>>, TError, TData>>, request?: SecondParameter<typeof customInstance>}\n\n ): UseQueryResult<TData, TError> & { queryKey: QueryKey } => {\n\n const queryOptions = getGetEventStreamEventsQueryOptions(eventStreamId,options)\n\n const query = useQuery(queryOptions) as UseQueryResult<TData, TError> & { queryKey: QueryKey };\n\n query.queryKey = queryOptions.queryKey ;\n\n return query;\n}\n\n\n\nexport const getGetEventStreamEventsSuspenseQueryOptions = <TData = Awaited<ReturnType<typeof getEventStreamEvents>>, TError = ErrorType<void | AsError>>(eventStreamId: number, options?: { query?:Partial<UseSuspenseQueryOptions<Awaited<ReturnType<typeof getEventStreamEvents>>, TError, TData>>, request?: SecondParameter<typeof customInstance>}\n) => {\n\nconst {query: queryOptions, request: requestOptions} = options ?? {};\n\n const queryKey = queryOptions?.queryKey ?? getGetEventStreamEventsQueryKey(eventStreamId);\n\n \n\n const queryFn: QueryFunction<Awaited<ReturnType<typeof getEventStreamEvents>>> = ({ signal }) => getEventStreamEvents(eventStreamId, requestOptions, signal);\n\n \n\n \n\n return { queryKey, queryFn, enabled: !!(eventStreamId), ...queryOptions} as UseSuspenseQueryOptions<Awaited<ReturnType<typeof getEventStreamEvents>>, TError, TData> & { queryKey: QueryKey }\n}\n\nexport type GetEventStreamEventsSuspenseQueryResult = NonNullable<Awaited<ReturnType<typeof getEventStreamEvents>>>\nexport type GetEventStreamEventsSuspenseQueryError = ErrorType<void | AsError>\n\n/**\n * @summary Subscribe to Server-Sent Events events from an EventStream\n */\nexport const useGetEventStreamEventsSuspense = <TData = Awaited<ReturnType<typeof getEventStreamEvents>>, TError = ErrorType<void | AsError>>(\n eventStreamId: number, options?: { query?:Partial<UseSuspenseQueryOptions<Awaited<ReturnType<typeof getEventStreamEvents>>, TError, TData>>, request?: SecondParameter<typeof customInstance>}\n\n ): UseSuspenseQueryResult<TData, TError> & { queryKey: QueryKey } => {\n\n const queryOptions = getGetEventStreamEventsSuspenseQueryOptions(eventStreamId,options)\n\n const query = useSuspenseQuery(queryOptions) as UseSuspenseQueryResult<TData, TError> & { queryKey: QueryKey };\n\n query.queryKey = queryOptions.queryKey ;\n\n return query;\n}\n\n\n\n/**\n * Deletes an Event Stream.\n\nYou must be the user who created the event stream.\n\n * @summary Deletes an existing EventStream (that you created)\n */\nexport const deleteEventStream = (\n eventStreamId: number,\n options?: SecondParameter<typeof customInstance>,) => {\n \n \n return customInstance<void>(\n {url: `/event-stream/${eventStreamId}`, method: 'DELETE'\n },\n options);\n }\n \n\n\nexport const getDeleteEventStreamMutationOptions = <TError = ErrorType<AsError>,\n TContext = unknown>(options?: { mutation?:UseMutationOptions<Awaited<ReturnType<typeof deleteEventStream>>, TError,{eventStreamId: number}, TContext>, request?: SecondParameter<typeof customInstance>}\n): UseMutationOptions<Awaited<ReturnType<typeof deleteEventStream>>, TError,{eventStreamId: number}, TContext> => {\n const {mutation: mutationOptions, request: requestOptions} = options ?? {};\n\n \n\n\n const mutationFn: MutationFunction<Awaited<ReturnType<typeof deleteEventStream>>, {eventStreamId: number}> = (props) => {\n const {eventStreamId} = props ?? {};\n\n return deleteEventStream(eventStreamId,requestOptions)\n }\n\n \n\n\n return { mutationFn, ...mutationOptions }}\n\n export type DeleteEventStreamMutationResult = NonNullable<Awaited<ReturnType<typeof deleteEventStream>>>\n \n export type DeleteEventStreamMutationError = ErrorType<AsError>\n\n /**\n * @summary Deletes an existing EventStream (that you created)\n */\nexport const useDeleteEventStream = <TError = ErrorType<AsError>,\n TContext = unknown>(options?: { mutation?:UseMutationOptions<Awaited<ReturnType<typeof deleteEventStream>>, TError,{eventStreamId: number}, TContext>, request?: SecondParameter<typeof customInstance>}\n) => {\n\n const mutationOptions = getDeleteEventStreamMutationOptions(options);\n\n return useMutation(mutationOptions);\n }\n "]}
@@ -1,9 +1,9 @@
1
- import * as _tanstack_react_query from '@tanstack/react-query';
2
- import { UseQueryOptions, QueryKey, UseQueryResult, UseMutationOptions } from '@tanstack/react-query';
3
- import { aF as customInstance, ax as EventStreamGetPostResponse, aG as ErrorType, aB as AsError } from '../custom-instance-6780910b.js';
1
+ import * as _tanstack_react_query_build_legacy_types from '@tanstack/react-query/build/legacy/types';
2
+ import { UseQueryOptions, QueryKey, UseQueryResult, UseSuspenseQueryOptions, UseSuspenseQueryResult, UseMutationOptions } from '@tanstack/react-query';
3
+ import { customInstance, EventStreamGetPostResponse, ErrorType, AsError } from '../index.cjs';
4
4
  import 'axios';
5
5
 
6
- type SecondParameter<T extends (...args: any) => any> = T extends (config: any, args: infer P) => any ? P : never;
6
+ type SecondParameter<T extends (...args: any) => any> = Parameters<T>[1];
7
7
  /**
8
8
  * Gets your EventStream ID and read token, if you have created one.
9
9
 
@@ -12,7 +12,7 @@ type SecondParameter<T extends (...args: any) => any> = T extends (config: any,
12
12
  declare const getEventStream: (options?: SecondParameter<typeof customInstance>, signal?: AbortSignal) => Promise<EventStreamGetPostResponse>;
13
13
  declare const getGetEventStreamQueryKey: () => readonly ["account-server-api", "/event-stream"];
14
14
  declare const getGetEventStreamQueryOptions: <TData = EventStreamGetPostResponse, TError = ErrorType<void | AsError>>(options?: {
15
- query?: UseQueryOptions<EventStreamGetPostResponse, TError, TData, QueryKey> | undefined;
15
+ query?: Partial<UseQueryOptions<EventStreamGetPostResponse, TError, TData, QueryKey>> | undefined;
16
16
  request?: SecondParameter<typeof customInstance>;
17
17
  } | undefined) => UseQueryOptions<EventStreamGetPostResponse, TError, TData, QueryKey> & {
18
18
  queryKey: QueryKey;
@@ -23,11 +23,28 @@ type GetEventStreamQueryError = ErrorType<void | AsError>;
23
23
  * @summary Gets the details of your EventStream
24
24
  */
25
25
  declare const useGetEventStream: <TData = EventStreamGetPostResponse, TError = ErrorType<void | AsError>>(options?: {
26
- query?: UseQueryOptions<EventStreamGetPostResponse, TError, TData, QueryKey> | undefined;
26
+ query?: Partial<UseQueryOptions<EventStreamGetPostResponse, TError, TData, QueryKey>> | undefined;
27
27
  request?: SecondParameter<typeof customInstance>;
28
28
  } | undefined) => UseQueryResult<TData, TError> & {
29
29
  queryKey: QueryKey;
30
30
  };
31
+ declare const getGetEventStreamSuspenseQueryOptions: <TData = EventStreamGetPostResponse, TError = ErrorType<void | AsError>>(options?: {
32
+ query?: Partial<UseSuspenseQueryOptions<EventStreamGetPostResponse, TError, TData, QueryKey>> | undefined;
33
+ request?: SecondParameter<typeof customInstance>;
34
+ } | undefined) => UseSuspenseQueryOptions<EventStreamGetPostResponse, TError, TData, QueryKey> & {
35
+ queryKey: QueryKey;
36
+ };
37
+ type GetEventStreamSuspenseQueryResult = NonNullable<Awaited<ReturnType<typeof getEventStream>>>;
38
+ type GetEventStreamSuspenseQueryError = ErrorType<void | AsError>;
39
+ /**
40
+ * @summary Gets the details of your EventStream
41
+ */
42
+ declare const useGetEventStreamSuspense: <TData = EventStreamGetPostResponse, TError = ErrorType<void | AsError>>(options?: {
43
+ query?: Partial<UseSuspenseQueryOptions<EventStreamGetPostResponse, TError, TData, QueryKey>> | undefined;
44
+ request?: SecondParameter<typeof customInstance>;
45
+ } | undefined) => UseSuspenseQueryResult<TData, TError> & {
46
+ queryKey: QueryKey;
47
+ };
31
48
  /**
32
49
  * Creates a new event stream (based on the **Server Sent Events** framework) for the authenticated user.
33
50
 
@@ -36,30 +53,30 @@ A user is only permitted one event stream.
36
53
  * @summary Create a new Server-Sent Events EventStream
37
54
  */
38
55
  declare const createEventStream: (options?: SecondParameter<typeof customInstance>) => Promise<EventStreamGetPostResponse>;
39
- declare const getCreateEventStreamMutationOptions: <TError = ErrorType<void | AsError>, TVariables = void, TContext = unknown>(options?: {
40
- mutation?: UseMutationOptions<EventStreamGetPostResponse, TError, TVariables, TContext> | undefined;
56
+ declare const getCreateEventStreamMutationOptions: <TError = ErrorType<void | AsError>, TContext = unknown>(options?: {
57
+ mutation?: UseMutationOptions<EventStreamGetPostResponse, TError, void, TContext> | undefined;
41
58
  request?: SecondParameter<typeof customInstance>;
42
- } | undefined) => UseMutationOptions<EventStreamGetPostResponse, TError, TVariables, TContext>;
59
+ } | undefined) => UseMutationOptions<EventStreamGetPostResponse, TError, void, TContext>;
43
60
  type CreateEventStreamMutationResult = NonNullable<Awaited<ReturnType<typeof createEventStream>>>;
44
61
  type CreateEventStreamMutationError = ErrorType<AsError | void>;
45
62
  /**
46
63
  * @summary Create a new Server-Sent Events EventStream
47
64
  */
48
- declare const useCreateEventStream: <TError = ErrorType<void | AsError>, TVariables = void, TContext = unknown>(options?: {
49
- mutation?: UseMutationOptions<EventStreamGetPostResponse, TError, TVariables, TContext> | undefined;
65
+ declare const useCreateEventStream: <TError = ErrorType<void | AsError>, TContext = unknown>(options?: {
66
+ mutation?: UseMutationOptions<EventStreamGetPostResponse, TError, void, TContext> | undefined;
50
67
  request?: SecondParameter<typeof customInstance>;
51
- } | undefined) => _tanstack_react_query.UseMutationResult<EventStreamGetPostResponse, TError, TVariables, TContext>;
68
+ } | undefined) => _tanstack_react_query_build_legacy_types.UseMutationResult<EventStreamGetPostResponse, TError, void, TContext>;
52
69
  /**
53
70
  * Gets events that you are entitled to receive. Events are delivered as **Server Sent Events** and you are expected to continuously read form this endpoint or it will be closed.
54
71
 
55
- This is an un-authenticated endpoint. In order to read from the stream the caller must provide the **read token** they were allocated when the stream was created The token must be provided in the request header property `X-IM-AS-EventStreamReadToken`.
72
+ This is an un-authenticated endpoint. In order to read from the stream the caller must provide either the User access token that belongs to the event stream or the **read token** that was allocated when the stream was created. The **read token** must be provided in the request header property `X-IM-AS-EventStreamReadToken`.
56
73
 
57
74
  * @summary Subscribe to Server-Sent Events events from an EventStream
58
75
  */
59
76
  declare const getEventStreamEvents: (eventStreamId: number, options?: SecondParameter<typeof customInstance>, signal?: AbortSignal) => Promise<string>;
60
77
  declare const getGetEventStreamEventsQueryKey: (eventStreamId: number) => readonly ["account-server-api", `/event-stream/${number}`];
61
78
  declare const getGetEventStreamEventsQueryOptions: <TData = string, TError = ErrorType<void | AsError>>(eventStreamId: number, options?: {
62
- query?: UseQueryOptions<string, TError, TData, QueryKey> | undefined;
79
+ query?: Partial<UseQueryOptions<string, TError, TData, QueryKey>> | undefined;
63
80
  request?: SecondParameter<typeof customInstance>;
64
81
  } | undefined) => UseQueryOptions<string, TError, TData, QueryKey> & {
65
82
  queryKey: QueryKey;
@@ -70,11 +87,28 @@ type GetEventStreamEventsQueryError = ErrorType<void | AsError>;
70
87
  * @summary Subscribe to Server-Sent Events events from an EventStream
71
88
  */
72
89
  declare const useGetEventStreamEvents: <TData = string, TError = ErrorType<void | AsError>>(eventStreamId: number, options?: {
73
- query?: UseQueryOptions<string, TError, TData, QueryKey> | undefined;
90
+ query?: Partial<UseQueryOptions<string, TError, TData, QueryKey>> | undefined;
74
91
  request?: SecondParameter<typeof customInstance>;
75
92
  } | undefined) => UseQueryResult<TData, TError> & {
76
93
  queryKey: QueryKey;
77
94
  };
95
+ declare const getGetEventStreamEventsSuspenseQueryOptions: <TData = string, TError = ErrorType<void | AsError>>(eventStreamId: number, options?: {
96
+ query?: Partial<UseSuspenseQueryOptions<string, TError, TData, QueryKey>> | undefined;
97
+ request?: SecondParameter<typeof customInstance>;
98
+ } | undefined) => UseSuspenseQueryOptions<string, TError, TData, QueryKey> & {
99
+ queryKey: QueryKey;
100
+ };
101
+ type GetEventStreamEventsSuspenseQueryResult = NonNullable<Awaited<ReturnType<typeof getEventStreamEvents>>>;
102
+ type GetEventStreamEventsSuspenseQueryError = ErrorType<void | AsError>;
103
+ /**
104
+ * @summary Subscribe to Server-Sent Events events from an EventStream
105
+ */
106
+ declare const useGetEventStreamEventsSuspense: <TData = string, TError = ErrorType<void | AsError>>(eventStreamId: number, options?: {
107
+ query?: Partial<UseSuspenseQueryOptions<string, TError, TData, QueryKey>> | undefined;
108
+ request?: SecondParameter<typeof customInstance>;
109
+ } | undefined) => UseSuspenseQueryResult<TData, TError> & {
110
+ queryKey: QueryKey;
111
+ };
78
112
  /**
79
113
  * Deletes an Event Stream.
80
114
 
@@ -101,8 +135,8 @@ declare const useDeleteEventStream: <TError = ErrorType<AsError>, TContext = unk
101
135
  eventStreamId: number;
102
136
  }, TContext> | undefined;
103
137
  request?: SecondParameter<typeof customInstance>;
104
- } | undefined) => _tanstack_react_query.UseMutationResult<void, TError, {
138
+ } | undefined) => _tanstack_react_query_build_legacy_types.UseMutationResult<void, TError, {
105
139
  eventStreamId: number;
106
140
  }, TContext>;
107
141
 
108
- export { CreateEventStreamMutationError, CreateEventStreamMutationResult, DeleteEventStreamMutationError, DeleteEventStreamMutationResult, GetEventStreamEventsQueryError, GetEventStreamEventsQueryResult, GetEventStreamQueryError, GetEventStreamQueryResult, createEventStream, deleteEventStream, getCreateEventStreamMutationOptions, getDeleteEventStreamMutationOptions, getEventStream, getEventStreamEvents, getGetEventStreamEventsQueryKey, getGetEventStreamEventsQueryOptions, getGetEventStreamQueryKey, getGetEventStreamQueryOptions, useCreateEventStream, useDeleteEventStream, useGetEventStream, useGetEventStreamEvents };
142
+ export { type CreateEventStreamMutationError, type CreateEventStreamMutationResult, type DeleteEventStreamMutationError, type DeleteEventStreamMutationResult, type GetEventStreamEventsQueryError, type GetEventStreamEventsQueryResult, type GetEventStreamEventsSuspenseQueryError, type GetEventStreamEventsSuspenseQueryResult, type GetEventStreamQueryError, type GetEventStreamQueryResult, type GetEventStreamSuspenseQueryError, type GetEventStreamSuspenseQueryResult, createEventStream, deleteEventStream, getCreateEventStreamMutationOptions, getDeleteEventStreamMutationOptions, getEventStream, getEventStreamEvents, getGetEventStreamEventsQueryKey, getGetEventStreamEventsQueryOptions, getGetEventStreamEventsSuspenseQueryOptions, getGetEventStreamQueryKey, getGetEventStreamQueryOptions, getGetEventStreamSuspenseQueryOptions, useCreateEventStream, useDeleteEventStream, useGetEventStream, useGetEventStreamEvents, useGetEventStreamEventsSuspense, useGetEventStreamSuspense };
@@ -1,9 +1,9 @@
1
- import * as _tanstack_react_query from '@tanstack/react-query';
2
- import { UseQueryOptions, QueryKey, UseQueryResult, UseMutationOptions } from '@tanstack/react-query';
3
- import { aF as customInstance, ax as EventStreamGetPostResponse, aG as ErrorType, aB as AsError } from '../custom-instance-6780910b.js';
1
+ import * as _tanstack_react_query_build_legacy_types from '@tanstack/react-query/build/legacy/types';
2
+ import { UseQueryOptions, QueryKey, UseQueryResult, UseSuspenseQueryOptions, UseSuspenseQueryResult, UseMutationOptions } from '@tanstack/react-query';
3
+ import { customInstance, EventStreamGetPostResponse, ErrorType, AsError } from '../index.js';
4
4
  import 'axios';
5
5
 
6
- type SecondParameter<T extends (...args: any) => any> = T extends (config: any, args: infer P) => any ? P : never;
6
+ type SecondParameter<T extends (...args: any) => any> = Parameters<T>[1];
7
7
  /**
8
8
  * Gets your EventStream ID and read token, if you have created one.
9
9
 
@@ -12,7 +12,7 @@ type SecondParameter<T extends (...args: any) => any> = T extends (config: any,
12
12
  declare const getEventStream: (options?: SecondParameter<typeof customInstance>, signal?: AbortSignal) => Promise<EventStreamGetPostResponse>;
13
13
  declare const getGetEventStreamQueryKey: () => readonly ["account-server-api", "/event-stream"];
14
14
  declare const getGetEventStreamQueryOptions: <TData = EventStreamGetPostResponse, TError = ErrorType<void | AsError>>(options?: {
15
- query?: UseQueryOptions<EventStreamGetPostResponse, TError, TData, QueryKey> | undefined;
15
+ query?: Partial<UseQueryOptions<EventStreamGetPostResponse, TError, TData, QueryKey>> | undefined;
16
16
  request?: SecondParameter<typeof customInstance>;
17
17
  } | undefined) => UseQueryOptions<EventStreamGetPostResponse, TError, TData, QueryKey> & {
18
18
  queryKey: QueryKey;
@@ -23,11 +23,28 @@ type GetEventStreamQueryError = ErrorType<void | AsError>;
23
23
  * @summary Gets the details of your EventStream
24
24
  */
25
25
  declare const useGetEventStream: <TData = EventStreamGetPostResponse, TError = ErrorType<void | AsError>>(options?: {
26
- query?: UseQueryOptions<EventStreamGetPostResponse, TError, TData, QueryKey> | undefined;
26
+ query?: Partial<UseQueryOptions<EventStreamGetPostResponse, TError, TData, QueryKey>> | undefined;
27
27
  request?: SecondParameter<typeof customInstance>;
28
28
  } | undefined) => UseQueryResult<TData, TError> & {
29
29
  queryKey: QueryKey;
30
30
  };
31
+ declare const getGetEventStreamSuspenseQueryOptions: <TData = EventStreamGetPostResponse, TError = ErrorType<void | AsError>>(options?: {
32
+ query?: Partial<UseSuspenseQueryOptions<EventStreamGetPostResponse, TError, TData, QueryKey>> | undefined;
33
+ request?: SecondParameter<typeof customInstance>;
34
+ } | undefined) => UseSuspenseQueryOptions<EventStreamGetPostResponse, TError, TData, QueryKey> & {
35
+ queryKey: QueryKey;
36
+ };
37
+ type GetEventStreamSuspenseQueryResult = NonNullable<Awaited<ReturnType<typeof getEventStream>>>;
38
+ type GetEventStreamSuspenseQueryError = ErrorType<void | AsError>;
39
+ /**
40
+ * @summary Gets the details of your EventStream
41
+ */
42
+ declare const useGetEventStreamSuspense: <TData = EventStreamGetPostResponse, TError = ErrorType<void | AsError>>(options?: {
43
+ query?: Partial<UseSuspenseQueryOptions<EventStreamGetPostResponse, TError, TData, QueryKey>> | undefined;
44
+ request?: SecondParameter<typeof customInstance>;
45
+ } | undefined) => UseSuspenseQueryResult<TData, TError> & {
46
+ queryKey: QueryKey;
47
+ };
31
48
  /**
32
49
  * Creates a new event stream (based on the **Server Sent Events** framework) for the authenticated user.
33
50
 
@@ -36,30 +53,30 @@ A user is only permitted one event stream.
36
53
  * @summary Create a new Server-Sent Events EventStream
37
54
  */
38
55
  declare const createEventStream: (options?: SecondParameter<typeof customInstance>) => Promise<EventStreamGetPostResponse>;
39
- declare const getCreateEventStreamMutationOptions: <TError = ErrorType<void | AsError>, TVariables = void, TContext = unknown>(options?: {
40
- mutation?: UseMutationOptions<EventStreamGetPostResponse, TError, TVariables, TContext> | undefined;
56
+ declare const getCreateEventStreamMutationOptions: <TError = ErrorType<void | AsError>, TContext = unknown>(options?: {
57
+ mutation?: UseMutationOptions<EventStreamGetPostResponse, TError, void, TContext> | undefined;
41
58
  request?: SecondParameter<typeof customInstance>;
42
- } | undefined) => UseMutationOptions<EventStreamGetPostResponse, TError, TVariables, TContext>;
59
+ } | undefined) => UseMutationOptions<EventStreamGetPostResponse, TError, void, TContext>;
43
60
  type CreateEventStreamMutationResult = NonNullable<Awaited<ReturnType<typeof createEventStream>>>;
44
61
  type CreateEventStreamMutationError = ErrorType<AsError | void>;
45
62
  /**
46
63
  * @summary Create a new Server-Sent Events EventStream
47
64
  */
48
- declare const useCreateEventStream: <TError = ErrorType<void | AsError>, TVariables = void, TContext = unknown>(options?: {
49
- mutation?: UseMutationOptions<EventStreamGetPostResponse, TError, TVariables, TContext> | undefined;
65
+ declare const useCreateEventStream: <TError = ErrorType<void | AsError>, TContext = unknown>(options?: {
66
+ mutation?: UseMutationOptions<EventStreamGetPostResponse, TError, void, TContext> | undefined;
50
67
  request?: SecondParameter<typeof customInstance>;
51
- } | undefined) => _tanstack_react_query.UseMutationResult<EventStreamGetPostResponse, TError, TVariables, TContext>;
68
+ } | undefined) => _tanstack_react_query_build_legacy_types.UseMutationResult<EventStreamGetPostResponse, TError, void, TContext>;
52
69
  /**
53
70
  * Gets events that you are entitled to receive. Events are delivered as **Server Sent Events** and you are expected to continuously read form this endpoint or it will be closed.
54
71
 
55
- This is an un-authenticated endpoint. In order to read from the stream the caller must provide the **read token** they were allocated when the stream was created The token must be provided in the request header property `X-IM-AS-EventStreamReadToken`.
72
+ This is an un-authenticated endpoint. In order to read from the stream the caller must provide either the User access token that belongs to the event stream or the **read token** that was allocated when the stream was created. The **read token** must be provided in the request header property `X-IM-AS-EventStreamReadToken`.
56
73
 
57
74
  * @summary Subscribe to Server-Sent Events events from an EventStream
58
75
  */
59
76
  declare const getEventStreamEvents: (eventStreamId: number, options?: SecondParameter<typeof customInstance>, signal?: AbortSignal) => Promise<string>;
60
77
  declare const getGetEventStreamEventsQueryKey: (eventStreamId: number) => readonly ["account-server-api", `/event-stream/${number}`];
61
78
  declare const getGetEventStreamEventsQueryOptions: <TData = string, TError = ErrorType<void | AsError>>(eventStreamId: number, options?: {
62
- query?: UseQueryOptions<string, TError, TData, QueryKey> | undefined;
79
+ query?: Partial<UseQueryOptions<string, TError, TData, QueryKey>> | undefined;
63
80
  request?: SecondParameter<typeof customInstance>;
64
81
  } | undefined) => UseQueryOptions<string, TError, TData, QueryKey> & {
65
82
  queryKey: QueryKey;
@@ -70,11 +87,28 @@ type GetEventStreamEventsQueryError = ErrorType<void | AsError>;
70
87
  * @summary Subscribe to Server-Sent Events events from an EventStream
71
88
  */
72
89
  declare const useGetEventStreamEvents: <TData = string, TError = ErrorType<void | AsError>>(eventStreamId: number, options?: {
73
- query?: UseQueryOptions<string, TError, TData, QueryKey> | undefined;
90
+ query?: Partial<UseQueryOptions<string, TError, TData, QueryKey>> | undefined;
74
91
  request?: SecondParameter<typeof customInstance>;
75
92
  } | undefined) => UseQueryResult<TData, TError> & {
76
93
  queryKey: QueryKey;
77
94
  };
95
+ declare const getGetEventStreamEventsSuspenseQueryOptions: <TData = string, TError = ErrorType<void | AsError>>(eventStreamId: number, options?: {
96
+ query?: Partial<UseSuspenseQueryOptions<string, TError, TData, QueryKey>> | undefined;
97
+ request?: SecondParameter<typeof customInstance>;
98
+ } | undefined) => UseSuspenseQueryOptions<string, TError, TData, QueryKey> & {
99
+ queryKey: QueryKey;
100
+ };
101
+ type GetEventStreamEventsSuspenseQueryResult = NonNullable<Awaited<ReturnType<typeof getEventStreamEvents>>>;
102
+ type GetEventStreamEventsSuspenseQueryError = ErrorType<void | AsError>;
103
+ /**
104
+ * @summary Subscribe to Server-Sent Events events from an EventStream
105
+ */
106
+ declare const useGetEventStreamEventsSuspense: <TData = string, TError = ErrorType<void | AsError>>(eventStreamId: number, options?: {
107
+ query?: Partial<UseSuspenseQueryOptions<string, TError, TData, QueryKey>> | undefined;
108
+ request?: SecondParameter<typeof customInstance>;
109
+ } | undefined) => UseSuspenseQueryResult<TData, TError> & {
110
+ queryKey: QueryKey;
111
+ };
78
112
  /**
79
113
  * Deletes an Event Stream.
80
114
 
@@ -101,8 +135,8 @@ declare const useDeleteEventStream: <TError = ErrorType<AsError>, TContext = unk
101
135
  eventStreamId: number;
102
136
  }, TContext> | undefined;
103
137
  request?: SecondParameter<typeof customInstance>;
104
- } | undefined) => _tanstack_react_query.UseMutationResult<void, TError, {
138
+ } | undefined) => _tanstack_react_query_build_legacy_types.UseMutationResult<void, TError, {
105
139
  eventStreamId: number;
106
140
  }, TContext>;
107
141
 
108
- export { CreateEventStreamMutationError, CreateEventStreamMutationResult, DeleteEventStreamMutationError, DeleteEventStreamMutationResult, GetEventStreamEventsQueryError, GetEventStreamEventsQueryResult, GetEventStreamQueryError, GetEventStreamQueryResult, createEventStream, deleteEventStream, getCreateEventStreamMutationOptions, getDeleteEventStreamMutationOptions, getEventStream, getEventStreamEvents, getGetEventStreamEventsQueryKey, getGetEventStreamEventsQueryOptions, getGetEventStreamQueryKey, getGetEventStreamQueryOptions, useCreateEventStream, useDeleteEventStream, useGetEventStream, useGetEventStreamEvents };
142
+ export { type CreateEventStreamMutationError, type CreateEventStreamMutationResult, type DeleteEventStreamMutationError, type DeleteEventStreamMutationResult, type GetEventStreamEventsQueryError, type GetEventStreamEventsQueryResult, type GetEventStreamEventsSuspenseQueryError, type GetEventStreamEventsSuspenseQueryResult, type GetEventStreamQueryError, type GetEventStreamQueryResult, type GetEventStreamSuspenseQueryError, type GetEventStreamSuspenseQueryResult, createEventStream, deleteEventStream, getCreateEventStreamMutationOptions, getDeleteEventStreamMutationOptions, getEventStream, getEventStreamEvents, getGetEventStreamEventsQueryKey, getGetEventStreamEventsQueryOptions, getGetEventStreamEventsSuspenseQueryOptions, getGetEventStreamQueryKey, getGetEventStreamQueryOptions, getGetEventStreamSuspenseQueryOptions, useCreateEventStream, useDeleteEventStream, useGetEventStream, useGetEventStreamEvents, useGetEventStreamEventsSuspense, useGetEventStreamSuspense };
@@ -1,17 +1,18 @@
1
1
  import {
2
2
  customInstance
3
- } from "../chunk-UKA7G3OB.js";
3
+ } from "../chunk-EBOQPVLG.js";
4
4
 
5
5
  // src/event-stream/event-stream.ts
6
6
  import {
7
7
  useMutation,
8
- useQuery
8
+ useQuery,
9
+ useSuspenseQuery
9
10
  } from "@tanstack/react-query";
10
11
  var getEventStream = (options, signal) => {
11
12
  return customInstance(
12
13
  {
13
14
  url: `/event-stream`,
14
- method: "get",
15
+ method: "GET",
15
16
  signal
16
17
  },
17
18
  options
@@ -32,11 +33,23 @@ var useGetEventStream = (options) => {
32
33
  query.queryKey = queryOptions.queryKey;
33
34
  return query;
34
35
  };
36
+ var getGetEventStreamSuspenseQueryOptions = (options) => {
37
+ const { query: queryOptions, request: requestOptions } = options ?? {};
38
+ const queryKey = (queryOptions == null ? void 0 : queryOptions.queryKey) ?? getGetEventStreamQueryKey();
39
+ const queryFn = ({ signal }) => getEventStream(requestOptions, signal);
40
+ return { queryKey, queryFn, ...queryOptions };
41
+ };
42
+ var useGetEventStreamSuspense = (options) => {
43
+ const queryOptions = getGetEventStreamSuspenseQueryOptions(options);
44
+ const query = useSuspenseQuery(queryOptions);
45
+ query.queryKey = queryOptions.queryKey;
46
+ return query;
47
+ };
35
48
  var createEventStream = (options) => {
36
49
  return customInstance(
37
50
  {
38
51
  url: `/event-stream`,
39
- method: "post"
52
+ method: "POST"
40
53
  },
41
54
  options
42
55
  );
@@ -56,7 +69,7 @@ var getEventStreamEvents = (eventStreamId, options, signal) => {
56
69
  return customInstance(
57
70
  {
58
71
  url: `/event-stream/${eventStreamId}`,
59
- method: "get",
72
+ method: "GET",
60
73
  signal
61
74
  },
62
75
  options
@@ -77,11 +90,23 @@ var useGetEventStreamEvents = (eventStreamId, options) => {
77
90
  query.queryKey = queryOptions.queryKey;
78
91
  return query;
79
92
  };
93
+ var getGetEventStreamEventsSuspenseQueryOptions = (eventStreamId, options) => {
94
+ const { query: queryOptions, request: requestOptions } = options ?? {};
95
+ const queryKey = (queryOptions == null ? void 0 : queryOptions.queryKey) ?? getGetEventStreamEventsQueryKey(eventStreamId);
96
+ const queryFn = ({ signal }) => getEventStreamEvents(eventStreamId, requestOptions, signal);
97
+ return { queryKey, queryFn, enabled: !!eventStreamId, ...queryOptions };
98
+ };
99
+ var useGetEventStreamEventsSuspense = (eventStreamId, options) => {
100
+ const queryOptions = getGetEventStreamEventsSuspenseQueryOptions(eventStreamId, options);
101
+ const query = useSuspenseQuery(queryOptions);
102
+ query.queryKey = queryOptions.queryKey;
103
+ return query;
104
+ };
80
105
  var deleteEventStream = (eventStreamId, options) => {
81
106
  return customInstance(
82
107
  {
83
108
  url: `/event-stream/${eventStreamId}`,
84
- method: "delete"
109
+ method: "DELETE"
85
110
  },
86
111
  options
87
112
  );
@@ -107,11 +132,15 @@ export {
107
132
  getEventStreamEvents,
108
133
  getGetEventStreamEventsQueryKey,
109
134
  getGetEventStreamEventsQueryOptions,
135
+ getGetEventStreamEventsSuspenseQueryOptions,
110
136
  getGetEventStreamQueryKey,
111
137
  getGetEventStreamQueryOptions,
138
+ getGetEventStreamSuspenseQueryOptions,
112
139
  useCreateEventStream,
113
140
  useDeleteEventStream,
114
141
  useGetEventStream,
115
- useGetEventStreamEvents
142
+ useGetEventStreamEvents,
143
+ useGetEventStreamEventsSuspense,
144
+ useGetEventStreamSuspense
116
145
  };
117
146
  //# sourceMappingURL=event-stream.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["../../src/event-stream/event-stream.ts"],"sourcesContent":["/**\n * Generated by orval v6.20.0 🍺\n * Do not edit manually.\n * Account Server API\n * The Informatics Matters Account Server API.\n\nA service that provides access to the Account Server, which gives *registered* users access to and management of **Organisations**, **Units**, **Products**, **Users**, and **Assets**.\n\n * OpenAPI spec version: 2.1\n */\nimport {\n useMutation,\n useQuery\n} from '@tanstack/react-query'\nimport type {\n MutationFunction,\n QueryFunction,\n QueryKey,\n UseMutationOptions,\n UseQueryOptions,\n UseQueryResult\n} from '@tanstack/react-query'\nimport type {\n AsError,\n EventStreamGetPostResponse\n} from '../account-server-api.schemas'\nimport { customInstance } from '.././custom-instance';\nimport type { ErrorType } from '.././custom-instance';\n\n\n// eslint-disable-next-line\n type SecondParameter<T extends (...args: any) => any> = T extends (\n config: any,\n args: infer P,\n) => any\n ? P\n : never;\n\n\n/**\n * Gets your EventStream ID and read token, if you have created one.\n\n * @summary Gets the details of your EventStream\n */\nexport const getEventStream = (\n \n options?: SecondParameter<typeof customInstance>,signal?: AbortSignal\n) => {\n \n \n return customInstance<EventStreamGetPostResponse>(\n {url: `/event-stream`, method: 'get', signal\n },\n options);\n }\n \n\nexport const getGetEventStreamQueryKey = () => {\n \n return [\"account-server-api\", `/event-stream`] as const;\n }\n\n \nexport const getGetEventStreamQueryOptions = <TData = Awaited<ReturnType<typeof getEventStream>>, TError = ErrorType<void | AsError>>( options?: { query?:UseQueryOptions<Awaited<ReturnType<typeof getEventStream>>, TError, TData>, request?: SecondParameter<typeof customInstance>}\n) => {\n\nconst {query: queryOptions, request: requestOptions} = options ?? {};\n\n const queryKey = queryOptions?.queryKey ?? getGetEventStreamQueryKey();\n\n \n\n const queryFn: QueryFunction<Awaited<ReturnType<typeof getEventStream>>> = ({ signal }) => getEventStream(requestOptions, signal);\n\n \n\n \n\n return { queryKey, queryFn, ...queryOptions} as UseQueryOptions<Awaited<ReturnType<typeof getEventStream>>, TError, TData> & { queryKey: QueryKey }\n}\n\nexport type GetEventStreamQueryResult = NonNullable<Awaited<ReturnType<typeof getEventStream>>>\nexport type GetEventStreamQueryError = ErrorType<void | AsError>\n\n/**\n * @summary Gets the details of your EventStream\n */\nexport const useGetEventStream = <TData = Awaited<ReturnType<typeof getEventStream>>, TError = ErrorType<void | AsError>>(\n options?: { query?:UseQueryOptions<Awaited<ReturnType<typeof getEventStream>>, TError, TData>, request?: SecondParameter<typeof customInstance>}\n\n ): UseQueryResult<TData, TError> & { queryKey: QueryKey } => {\n\n const queryOptions = getGetEventStreamQueryOptions(options)\n\n const query = useQuery(queryOptions) as UseQueryResult<TData, TError> & { queryKey: QueryKey };\n\n query.queryKey = queryOptions.queryKey ;\n\n return query;\n}\n\n\n\n/**\n * Creates a new event stream (based on the **Server Sent Events** framework) for the authenticated user.\n\nA user is only permitted one event stream.\n\n * @summary Create a new Server-Sent Events EventStream\n */\nexport const createEventStream = (\n \n options?: SecondParameter<typeof customInstance>,) => {\n \n \n return customInstance<EventStreamGetPostResponse>(\n {url: `/event-stream`, method: 'post'\n },\n options);\n }\n \n\n\nexport const getCreateEventStreamMutationOptions = <TError = ErrorType<AsError | void>,\n TVariables = void,\n TContext = unknown>(options?: { mutation?:UseMutationOptions<Awaited<ReturnType<typeof createEventStream>>, TError,TVariables, TContext>, request?: SecondParameter<typeof customInstance>}\n): UseMutationOptions<Awaited<ReturnType<typeof createEventStream>>, TError,TVariables, TContext> => {\n const {mutation: mutationOptions, request: requestOptions} = options ?? {};\n\n \n\n\n const mutationFn: MutationFunction<Awaited<ReturnType<typeof createEventStream>>, TVariables> = () => {\n \n\n return createEventStream(requestOptions)\n }\n\n \n\n\n return { mutationFn, ...mutationOptions }}\n\n export type CreateEventStreamMutationResult = NonNullable<Awaited<ReturnType<typeof createEventStream>>>\n \n export type CreateEventStreamMutationError = ErrorType<AsError | void>\n\n /**\n * @summary Create a new Server-Sent Events EventStream\n */\nexport const useCreateEventStream = <TError = ErrorType<AsError | void>,\n TVariables = void,\n TContext = unknown>(options?: { mutation?:UseMutationOptions<Awaited<ReturnType<typeof createEventStream>>, TError,TVariables, TContext>, request?: SecondParameter<typeof customInstance>}\n) => {\n\n const mutationOptions = getCreateEventStreamMutationOptions(options);\n\n return useMutation(mutationOptions);\n }\n /**\n * Gets events that you are entitled to receive. Events are delivered as **Server Sent Events** and you are expected to continuously read form this endpoint or it will be closed.\n\nThis is an un-authenticated endpoint. In order to read from the stream the caller must provide the **read token** they were allocated when the stream was created The token must be provided in the request header property `X-IM-AS-EventStreamReadToken`.\n\n * @summary Subscribe to Server-Sent Events events from an EventStream\n */\nexport const getEventStreamEvents = (\n eventStreamId: number,\n options?: SecondParameter<typeof customInstance>,signal?: AbortSignal\n) => {\n \n \n return customInstance<string>(\n {url: `/event-stream/${eventStreamId}`, method: 'get', signal\n },\n options);\n }\n \n\nexport const getGetEventStreamEventsQueryKey = (eventStreamId: number,) => {\n \n return [\"account-server-api\", `/event-stream/${eventStreamId}`] as const;\n }\n\n \nexport const getGetEventStreamEventsQueryOptions = <TData = Awaited<ReturnType<typeof getEventStreamEvents>>, TError = ErrorType<void | AsError>>(eventStreamId: number, options?: { query?:UseQueryOptions<Awaited<ReturnType<typeof getEventStreamEvents>>, TError, TData>, request?: SecondParameter<typeof customInstance>}\n) => {\n\nconst {query: queryOptions, request: requestOptions} = options ?? {};\n\n const queryKey = queryOptions?.queryKey ?? getGetEventStreamEventsQueryKey(eventStreamId);\n\n \n\n const queryFn: QueryFunction<Awaited<ReturnType<typeof getEventStreamEvents>>> = ({ signal }) => getEventStreamEvents(eventStreamId, requestOptions, signal);\n\n \n\n \n\n return { queryKey, queryFn, enabled: !!(eventStreamId), ...queryOptions} as UseQueryOptions<Awaited<ReturnType<typeof getEventStreamEvents>>, TError, TData> & { queryKey: QueryKey }\n}\n\nexport type GetEventStreamEventsQueryResult = NonNullable<Awaited<ReturnType<typeof getEventStreamEvents>>>\nexport type GetEventStreamEventsQueryError = ErrorType<void | AsError>\n\n/**\n * @summary Subscribe to Server-Sent Events events from an EventStream\n */\nexport const useGetEventStreamEvents = <TData = Awaited<ReturnType<typeof getEventStreamEvents>>, TError = ErrorType<void | AsError>>(\n eventStreamId: number, options?: { query?:UseQueryOptions<Awaited<ReturnType<typeof getEventStreamEvents>>, TError, TData>, request?: SecondParameter<typeof customInstance>}\n\n ): UseQueryResult<TData, TError> & { queryKey: QueryKey } => {\n\n const queryOptions = getGetEventStreamEventsQueryOptions(eventStreamId,options)\n\n const query = useQuery(queryOptions) as UseQueryResult<TData, TError> & { queryKey: QueryKey };\n\n query.queryKey = queryOptions.queryKey ;\n\n return query;\n}\n\n\n\n/**\n * Deletes an Event Stream.\n\nYou must be the user who created the event stream.\n\n * @summary Deletes an existing EventStream (that you created)\n */\nexport const deleteEventStream = (\n eventStreamId: number,\n options?: SecondParameter<typeof customInstance>,) => {\n \n \n return customInstance<void>(\n {url: `/event-stream/${eventStreamId}`, method: 'delete'\n },\n options);\n }\n \n\n\nexport const getDeleteEventStreamMutationOptions = <TError = ErrorType<AsError>,\n \n TContext = unknown>(options?: { mutation?:UseMutationOptions<Awaited<ReturnType<typeof deleteEventStream>>, TError,{eventStreamId: number}, TContext>, request?: SecondParameter<typeof customInstance>}\n): UseMutationOptions<Awaited<ReturnType<typeof deleteEventStream>>, TError,{eventStreamId: number}, TContext> => {\n const {mutation: mutationOptions, request: requestOptions} = options ?? {};\n\n \n\n\n const mutationFn: MutationFunction<Awaited<ReturnType<typeof deleteEventStream>>, {eventStreamId: number}> = (props) => {\n const {eventStreamId} = props ?? {};\n\n return deleteEventStream(eventStreamId,requestOptions)\n }\n\n \n\n\n return { mutationFn, ...mutationOptions }}\n\n export type DeleteEventStreamMutationResult = NonNullable<Awaited<ReturnType<typeof deleteEventStream>>>\n \n export type DeleteEventStreamMutationError = ErrorType<AsError>\n\n /**\n * @summary Deletes an existing EventStream (that you created)\n */\nexport const useDeleteEventStream = <TError = ErrorType<AsError>,\n \n TContext = unknown>(options?: { mutation?:UseMutationOptions<Awaited<ReturnType<typeof deleteEventStream>>, TError,{eventStreamId: number}, TContext>, request?: SecondParameter<typeof customInstance>}\n) => {\n\n const mutationOptions = getDeleteEventStreamMutationOptions(options);\n\n return useMutation(mutationOptions);\n }\n "],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QAAQ;AAAA,MAAO;AAAA,IACzD;AAAA,IACE;AAAA,EAAO;AACT;AAGG,IAAM,kCAAkC,CAAC,kBAA2B;AAEvE,SAAO,CAAC,sBAAsB,iBAAiB,aAAa,EAAE;AAC9D;AAGG,IAAM,sCAAsC,CAA+F,eAAuB,YACpK;AAEL,QAAM,EAAC,OAAO,cAAc,SAAS,eAAc,IAAI,WAAW,CAAC;AAEjE,QAAM,YAAY,6CAAc,aAAY,gCAAgC,aAAa;AAIvF,QAAM,UAA2E,CAAC,EAAE,OAAO,MAAM,qBAAqB,eAAe,gBAAgB,MAAM;AAM5J,SAAQ,EAAE,UAAU,SAAS,SAAS,CAAC,CAAE,eAAgB,GAAG,aAAY;AAC3E;AAQO,IAAM,0BAA0B,CACtC,eAAuB,YAEwC;AAE9D,QAAM,eAAe,oCAAoC,eAAc,OAAO;AAE9E,QAAM,QAAQ,SAAS,YAAY;AAEnC,QAAM,WAAW,aAAa;AAE9B,SAAO;AACT;AAWO,IAAM,oBAAoB,CAC7B,eACH,YAAsD;AAGjD,SAAO;AAAA,IACP;AAAA,MAAC,KAAK,iBAAiB,aAAa;AAAA,MAAI,QAAQ;AAAA,IAClD;AAAA,IACE;AAAA,EAAO;AACT;AAIG,IAAM,sCAAsC,CAE3B,YAC0F;AACjH,QAAM,EAAC,UAAU,iBAAiB,SAAS,eAAc,IAAI,WAAW,CAAC;AAKpE,QAAM,aAAuG,CAAC,UAAU;AACpH,UAAM,EAAC,cAAa,IAAI,SAAS,CAAC;AAElC,WAAQ,kBAAkB,eAAc,cAAc;AAAA,EACxD;AAKL,SAAQ,EAAE,YAAY,GAAG,gBAAgB;AAAC;AAStC,IAAM,uBAAuB,CAEZ,YACnB;AAEC,QAAM,kBAAkB,oCAAoC,OAAO;AAEnE,SAAO,YAAY,eAAe;AACpC;","names":[]}
1
+ {"version":3,"sources":["../../src/event-stream/event-stream.ts"],"sourcesContent":["/**\n * Generated by orval v6.25.0 🍺\n * Do not edit manually.\n * Account Server API\n * The Informatics Matters Account Server API.\n\nA service that provides access to the Account Server, which gives *registered* users access to and management of **Organisations**, **Units**, **Products**, **Users**, and **Assets**.\n\n * OpenAPI spec version: 2.1\n */\nimport {\n useMutation,\n useQuery,\n useSuspenseQuery\n} from '@tanstack/react-query'\nimport type {\n MutationFunction,\n QueryFunction,\n QueryKey,\n UseMutationOptions,\n UseQueryOptions,\n UseQueryResult,\n UseSuspenseQueryOptions,\n UseSuspenseQueryResult\n} from '@tanstack/react-query'\nimport type {\n AsError,\n EventStreamGetPostResponse\n} from '../account-server-api.schemas'\nimport { customInstance } from '.././custom-instance';\nimport type { ErrorType } from '.././custom-instance';\n\n\ntype SecondParameter<T extends (...args: any) => any> = Parameters<T>[1];\n\n\n/**\n * Gets your EventStream ID and read token, if you have created one.\n\n * @summary Gets the details of your EventStream\n */\nexport const getEventStream = (\n \n options?: SecondParameter<typeof customInstance>,signal?: AbortSignal\n) => {\n \n \n return customInstance<EventStreamGetPostResponse>(\n {url: `/event-stream`, method: 'GET', signal\n },\n options);\n }\n \n\nexport const getGetEventStreamQueryKey = () => {\n return [\"account-server-api\", `/event-stream`] as const;\n }\n\n \nexport const getGetEventStreamQueryOptions = <TData = Awaited<ReturnType<typeof getEventStream>>, TError = ErrorType<void | AsError>>( options?: { query?:Partial<UseQueryOptions<Awaited<ReturnType<typeof getEventStream>>, TError, TData>>, request?: SecondParameter<typeof customInstance>}\n) => {\n\nconst {query: queryOptions, request: requestOptions} = options ?? {};\n\n const queryKey = queryOptions?.queryKey ?? getGetEventStreamQueryKey();\n\n \n\n const queryFn: QueryFunction<Awaited<ReturnType<typeof getEventStream>>> = ({ signal }) => getEventStream(requestOptions, signal);\n\n \n\n \n\n return { queryKey, queryFn, ...queryOptions} as UseQueryOptions<Awaited<ReturnType<typeof getEventStream>>, TError, TData> & { queryKey: QueryKey }\n}\n\nexport type GetEventStreamQueryResult = NonNullable<Awaited<ReturnType<typeof getEventStream>>>\nexport type GetEventStreamQueryError = ErrorType<void | AsError>\n\n/**\n * @summary Gets the details of your EventStream\n */\nexport const useGetEventStream = <TData = Awaited<ReturnType<typeof getEventStream>>, TError = ErrorType<void | AsError>>(\n options?: { query?:Partial<UseQueryOptions<Awaited<ReturnType<typeof getEventStream>>, TError, TData>>, request?: SecondParameter<typeof customInstance>}\n\n ): UseQueryResult<TData, TError> & { queryKey: QueryKey } => {\n\n const queryOptions = getGetEventStreamQueryOptions(options)\n\n const query = useQuery(queryOptions) as UseQueryResult<TData, TError> & { queryKey: QueryKey };\n\n query.queryKey = queryOptions.queryKey ;\n\n return query;\n}\n\n\n\nexport const getGetEventStreamSuspenseQueryOptions = <TData = Awaited<ReturnType<typeof getEventStream>>, TError = ErrorType<void | AsError>>( options?: { query?:Partial<UseSuspenseQueryOptions<Awaited<ReturnType<typeof getEventStream>>, TError, TData>>, request?: SecondParameter<typeof customInstance>}\n) => {\n\nconst {query: queryOptions, request: requestOptions} = options ?? {};\n\n const queryKey = queryOptions?.queryKey ?? getGetEventStreamQueryKey();\n\n \n\n const queryFn: QueryFunction<Awaited<ReturnType<typeof getEventStream>>> = ({ signal }) => getEventStream(requestOptions, signal);\n\n \n\n \n\n return { queryKey, queryFn, ...queryOptions} as UseSuspenseQueryOptions<Awaited<ReturnType<typeof getEventStream>>, TError, TData> & { queryKey: QueryKey }\n}\n\nexport type GetEventStreamSuspenseQueryResult = NonNullable<Awaited<ReturnType<typeof getEventStream>>>\nexport type GetEventStreamSuspenseQueryError = ErrorType<void | AsError>\n\n/**\n * @summary Gets the details of your EventStream\n */\nexport const useGetEventStreamSuspense = <TData = Awaited<ReturnType<typeof getEventStream>>, TError = ErrorType<void | AsError>>(\n options?: { query?:Partial<UseSuspenseQueryOptions<Awaited<ReturnType<typeof getEventStream>>, TError, TData>>, request?: SecondParameter<typeof customInstance>}\n\n ): UseSuspenseQueryResult<TData, TError> & { queryKey: QueryKey } => {\n\n const queryOptions = getGetEventStreamSuspenseQueryOptions(options)\n\n const query = useSuspenseQuery(queryOptions) as UseSuspenseQueryResult<TData, TError> & { queryKey: QueryKey };\n\n query.queryKey = queryOptions.queryKey ;\n\n return query;\n}\n\n\n\n/**\n * Creates a new event stream (based on the **Server Sent Events** framework) for the authenticated user.\n\nA user is only permitted one event stream.\n\n * @summary Create a new Server-Sent Events EventStream\n */\nexport const createEventStream = (\n \n options?: SecondParameter<typeof customInstance>,) => {\n \n \n return customInstance<EventStreamGetPostResponse>(\n {url: `/event-stream`, method: 'POST'\n },\n options);\n }\n \n\n\nexport const getCreateEventStreamMutationOptions = <TError = ErrorType<AsError | void>,\n TContext = unknown>(options?: { mutation?:UseMutationOptions<Awaited<ReturnType<typeof createEventStream>>, TError,void, TContext>, request?: SecondParameter<typeof customInstance>}\n): UseMutationOptions<Awaited<ReturnType<typeof createEventStream>>, TError,void, TContext> => {\n const {mutation: mutationOptions, request: requestOptions} = options ?? {};\n\n \n\n\n const mutationFn: MutationFunction<Awaited<ReturnType<typeof createEventStream>>, void> = () => {\n \n\n return createEventStream(requestOptions)\n }\n\n \n\n\n return { mutationFn, ...mutationOptions }}\n\n export type CreateEventStreamMutationResult = NonNullable<Awaited<ReturnType<typeof createEventStream>>>\n \n export type CreateEventStreamMutationError = ErrorType<AsError | void>\n\n /**\n * @summary Create a new Server-Sent Events EventStream\n */\nexport const useCreateEventStream = <TError = ErrorType<AsError | void>,\n TContext = unknown>(options?: { mutation?:UseMutationOptions<Awaited<ReturnType<typeof createEventStream>>, TError,void, TContext>, request?: SecondParameter<typeof customInstance>}\n) => {\n\n const mutationOptions = getCreateEventStreamMutationOptions(options);\n\n return useMutation(mutationOptions);\n }\n /**\n * Gets events that you are entitled to receive. Events are delivered as **Server Sent Events** and you are expected to continuously read form this endpoint or it will be closed.\n\nThis is an un-authenticated endpoint. In order to read from the stream the caller must provide either the User access token that belongs to the event stream or the **read token** that was allocated when the stream was created. The **read token** must be provided in the request header property `X-IM-AS-EventStreamReadToken`.\n\n * @summary Subscribe to Server-Sent Events events from an EventStream\n */\nexport const getEventStreamEvents = (\n eventStreamId: number,\n options?: SecondParameter<typeof customInstance>,signal?: AbortSignal\n) => {\n \n \n return customInstance<string>(\n {url: `/event-stream/${eventStreamId}`, method: 'GET', signal\n },\n options);\n }\n \n\nexport const getGetEventStreamEventsQueryKey = (eventStreamId: number,) => {\n return [\"account-server-api\", `/event-stream/${eventStreamId}`] as const;\n }\n\n \nexport const getGetEventStreamEventsQueryOptions = <TData = Awaited<ReturnType<typeof getEventStreamEvents>>, TError = ErrorType<void | AsError>>(eventStreamId: number, options?: { query?:Partial<UseQueryOptions<Awaited<ReturnType<typeof getEventStreamEvents>>, TError, TData>>, request?: SecondParameter<typeof customInstance>}\n) => {\n\nconst {query: queryOptions, request: requestOptions} = options ?? {};\n\n const queryKey = queryOptions?.queryKey ?? getGetEventStreamEventsQueryKey(eventStreamId);\n\n \n\n const queryFn: QueryFunction<Awaited<ReturnType<typeof getEventStreamEvents>>> = ({ signal }) => getEventStreamEvents(eventStreamId, requestOptions, signal);\n\n \n\n \n\n return { queryKey, queryFn, enabled: !!(eventStreamId), ...queryOptions} as UseQueryOptions<Awaited<ReturnType<typeof getEventStreamEvents>>, TError, TData> & { queryKey: QueryKey }\n}\n\nexport type GetEventStreamEventsQueryResult = NonNullable<Awaited<ReturnType<typeof getEventStreamEvents>>>\nexport type GetEventStreamEventsQueryError = ErrorType<void | AsError>\n\n/**\n * @summary Subscribe to Server-Sent Events events from an EventStream\n */\nexport const useGetEventStreamEvents = <TData = Awaited<ReturnType<typeof getEventStreamEvents>>, TError = ErrorType<void | AsError>>(\n eventStreamId: number, options?: { query?:Partial<UseQueryOptions<Awaited<ReturnType<typeof getEventStreamEvents>>, TError, TData>>, request?: SecondParameter<typeof customInstance>}\n\n ): UseQueryResult<TData, TError> & { queryKey: QueryKey } => {\n\n const queryOptions = getGetEventStreamEventsQueryOptions(eventStreamId,options)\n\n const query = useQuery(queryOptions) as UseQueryResult<TData, TError> & { queryKey: QueryKey };\n\n query.queryKey = queryOptions.queryKey ;\n\n return query;\n}\n\n\n\nexport const getGetEventStreamEventsSuspenseQueryOptions = <TData = Awaited<ReturnType<typeof getEventStreamEvents>>, TError = ErrorType<void | AsError>>(eventStreamId: number, options?: { query?:Partial<UseSuspenseQueryOptions<Awaited<ReturnType<typeof getEventStreamEvents>>, TError, TData>>, request?: SecondParameter<typeof customInstance>}\n) => {\n\nconst {query: queryOptions, request: requestOptions} = options ?? {};\n\n const queryKey = queryOptions?.queryKey ?? getGetEventStreamEventsQueryKey(eventStreamId);\n\n \n\n const queryFn: QueryFunction<Awaited<ReturnType<typeof getEventStreamEvents>>> = ({ signal }) => getEventStreamEvents(eventStreamId, requestOptions, signal);\n\n \n\n \n\n return { queryKey, queryFn, enabled: !!(eventStreamId), ...queryOptions} as UseSuspenseQueryOptions<Awaited<ReturnType<typeof getEventStreamEvents>>, TError, TData> & { queryKey: QueryKey }\n}\n\nexport type GetEventStreamEventsSuspenseQueryResult = NonNullable<Awaited<ReturnType<typeof getEventStreamEvents>>>\nexport type GetEventStreamEventsSuspenseQueryError = ErrorType<void | AsError>\n\n/**\n * @summary Subscribe to Server-Sent Events events from an EventStream\n */\nexport const useGetEventStreamEventsSuspense = <TData = Awaited<ReturnType<typeof getEventStreamEvents>>, TError = ErrorType<void | AsError>>(\n eventStreamId: number, options?: { query?:Partial<UseSuspenseQueryOptions<Awaited<ReturnType<typeof getEventStreamEvents>>, TError, TData>>, request?: SecondParameter<typeof customInstance>}\n\n ): UseSuspenseQueryResult<TData, TError> & { queryKey: QueryKey } => {\n\n const queryOptions = getGetEventStreamEventsSuspenseQueryOptions(eventStreamId,options)\n\n const query = useSuspenseQuery(queryOptions) as UseSuspenseQueryResult<TData, TError> & { queryKey: QueryKey };\n\n query.queryKey = queryOptions.queryKey ;\n\n return query;\n}\n\n\n\n/**\n * Deletes an Event Stream.\n\nYou must be the user who created the event stream.\n\n * @summary Deletes an existing EventStream (that you created)\n */\nexport const deleteEventStream = (\n eventStreamId: number,\n options?: SecondParameter<typeof customInstance>,) => {\n \n \n return customInstance<void>(\n {url: `/event-stream/${eventStreamId}`, method: 'DELETE'\n },\n options);\n }\n \n\n\nexport const getDeleteEventStreamMutationOptions = <TError = ErrorType<AsError>,\n TContext = unknown>(options?: { mutation?:UseMutationOptions<Awaited<ReturnType<typeof deleteEventStream>>, TError,{eventStreamId: number}, TContext>, request?: SecondParameter<typeof customInstance>}\n): UseMutationOptions<Awaited<ReturnType<typeof deleteEventStream>>, TError,{eventStreamId: number}, TContext> => {\n const {mutation: mutationOptions, request: requestOptions} = options ?? {};\n\n \n\n\n const mutationFn: MutationFunction<Awaited<ReturnType<typeof deleteEventStream>>, {eventStreamId: number}> = (props) => {\n const {eventStreamId} = props ?? {};\n\n return deleteEventStream(eventStreamId,requestOptions)\n }\n\n \n\n\n return { mutationFn, ...mutationOptions }}\n\n export type DeleteEventStreamMutationResult = NonNullable<Awaited<ReturnType<typeof deleteEventStream>>>\n \n export type DeleteEventStreamMutationError = ErrorType<AsError>\n\n /**\n * @summary Deletes an existing EventStream (that you created)\n */\nexport const useDeleteEventStream = <TError = ErrorType<AsError>,\n TContext = unknown>(options?: { mutation?:UseMutationOptions<Awaited<ReturnType<typeof deleteEventStream>>, TError,{eventStreamId: number}, TContext>, request?: SecondParameter<typeof customInstance>}\n) => {\n\n const mutationOptions = getDeleteEventStreamMutationOptions(options);\n\n return useMutation(mutationOptions);\n }\n "],"mappings":";;;;;AAUA;AAAA,EACE;AAAA,EACA;AAAA,EACA;AAAA,OACK;AA2BA,IAAM,iBAAiB,CAE7B,SAAiD,WAC7C;AAGC,SAAO;AAAA,IACP;AAAA,MAAC,KAAK;AAAA,MAAiB,QAAQ;AAAA,MAAO;AAAA,IACxC;AAAA,IACE;AAAA,EAAO;AACT;AAGG,IAAM,4BAA4B,MAAM;AAC3C,SAAO,CAAC,sBAAsB,eAAe;AAC7C;AAGG,IAAM,gCAAgC,CAA0F,YAClI;AAEL,QAAM,EAAC,OAAO,cAAc,SAAS,eAAc,IAAI,WAAW,C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;AAAA,EAAO;AACT;AAIG,IAAM,sCAAsC,CAC3B,YAC0F;AACjH,QAAM,EAAC,UAAU,iBAAiB,SAAS,eAAc,IAAI,WAAW,CAAC;AAKpE,QAAM,aAAuG,CAAC,UAAU;AACpH,UAAM,EAAC,cAAa,IAAI,SAAS,CAAC;AAElC,WAAQ,kBAAkB,eAAc,cAAc;AAAA,EACxD;AAKL,SAAQ,EAAE,YAAY,GAAG,gBAAgB;AAAC;AAStC,IAAM,uBAAuB,CACZ,YACnB;AAEC,QAAM,kBAAkB,oCAAoC,OAAO;AAEnE,SAAO,YAAY,eAAe;AACpC;","names":[]}
package/index.cjs CHANGED
@@ -3,7 +3,7 @@
3
3
 
4
4
 
5
5
 
6
- var _chunkJ22A7LHXcjs = require('./chunk-J22A7LHX.cjs');
6
+ var _chunkTKLTUR4Rcjs = require('./chunk-TKLTUR4R.cjs');
7
7
 
8
8
  // src/account-server-api.schemas.ts
9
9
  var UnitProductPostBodyBodyType = {
@@ -73,5 +73,5 @@ var ProductChargesGetResponseProductType = {
73
73
 
74
74
 
75
75
 
76
- exports.AXIOS_INSTANCE = _chunkJ22A7LHXcjs.AXIOS_INSTANCE; exports.AssetDetailScope = AssetDetailScope; exports.AssetPostBodyBodyScope = AssetPostBodyBodyScope; exports.ChargeSummaryType = ChargeSummaryType; exports.MerchantDetailKind = MerchantDetailKind; exports.ProcessingChargesMerchantKind = ProcessingChargesMerchantKind; exports.ProductChargesGetResponseProductType = ProductChargesGetResponseProductType; exports.ProductDetailFlavour = ProductDetailFlavour; exports.ProductDetailType = ProductDetailType; exports.ProductTypeServiceKind = ProductTypeServiceKind; exports.UnitProductPostBodyBodyFlavour = UnitProductPostBodyBodyFlavour; exports.UnitProductPostBodyBodyType = UnitProductPostBodyBodyType; exports.customInstance = _chunkJ22A7LHXcjs.customInstance; exports.setAuthToken = _chunkJ22A7LHXcjs.setAuthToken; exports.setBaseUrl = _chunkJ22A7LHXcjs.setBaseUrl;
76
+ exports.AXIOS_INSTANCE = _chunkTKLTUR4Rcjs.AXIOS_INSTANCE; exports.AssetDetailScope = AssetDetailScope; exports.AssetPostBodyBodyScope = AssetPostBodyBodyScope; exports.ChargeSummaryType = ChargeSummaryType; exports.MerchantDetailKind = MerchantDetailKind; exports.ProcessingChargesMerchantKind = ProcessingChargesMerchantKind; exports.ProductChargesGetResponseProductType = ProductChargesGetResponseProductType; exports.ProductDetailFlavour = ProductDetailFlavour; exports.ProductDetailType = ProductDetailType; exports.ProductTypeServiceKind = ProductTypeServiceKind; exports.UnitProductPostBodyBodyFlavour = UnitProductPostBodyBodyFlavour; exports.UnitProductPostBodyBodyType = UnitProductPostBodyBodyType; exports.customInstance = _chunkTKLTUR4Rcjs.customInstance; exports.setAuthToken = _chunkTKLTUR4Rcjs.setAuthToken; exports.setBaseUrl = _chunkTKLTUR4Rcjs.setBaseUrl;
77
77
  //# sourceMappingURL=index.cjs.map