@connectedxm/admin 6.8.0 → 6.8.1

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.
package/dist/index.cjs CHANGED
@@ -21956,11 +21956,18 @@ var useGetSupportTickets = (type, state, assignment, params = {}, options = {})
21956
21956
  };
21957
21957
 
21958
21958
  // src/queries/surveys/useGetSurveys.ts
21959
- var SURVEYS_QUERY_KEY = () => ["SURVEYS"];
21959
+ var SURVEYS_QUERY_KEY = (eventId, sessionId) => {
21960
+ const keys = ["SURVEYS"];
21961
+ if (eventId) keys.push(eventId);
21962
+ if (sessionId) keys.push(sessionId);
21963
+ return keys;
21964
+ };
21960
21965
  var SET_SURVEYS_QUERY_DATA = (client, keyParams, response) => {
21961
21966
  client.setQueryData(SURVEYS_QUERY_KEY(...keyParams), response);
21962
21967
  };
21963
21968
  var GetSurveys = async ({
21969
+ eventId,
21970
+ sessionId,
21964
21971
  pageParam,
21965
21972
  pageSize,
21966
21973
  orderBy,
@@ -21973,16 +21980,20 @@ var GetSurveys = async ({
21973
21980
  page: pageParam || void 0,
21974
21981
  pageSize: pageSize || void 0,
21975
21982
  orderBy: orderBy || void 0,
21976
- search: search || void 0
21983
+ search: search || void 0,
21984
+ eventId: eventId || void 0,
21985
+ sessionId: sessionId || void 0
21977
21986
  }
21978
21987
  });
21979
21988
  return data;
21980
21989
  };
21981
- var useGetSurveys = (params = {}, options = {}) => {
21990
+ var useGetSurveys = (eventId, sessionId, params = {}, options = {}) => {
21982
21991
  return useConnectedInfiniteQuery(
21983
- SURVEYS_QUERY_KEY(),
21992
+ SURVEYS_QUERY_KEY(eventId, sessionId),
21984
21993
  (params2) => GetSurveys({
21985
- ...params2
21994
+ ...params2,
21995
+ eventId,
21996
+ sessionId
21986
21997
  }),
21987
21998
  params,
21988
21999
  options
package/dist/index.d.cts CHANGED
@@ -3828,6 +3828,10 @@ interface Survey extends BaseSurvey {
3828
3828
  emailBody: string | null;
3829
3829
  createdAt: string;
3830
3830
  updatedAt: string;
3831
+ eventId: string | null;
3832
+ event: BaseEvent | null;
3833
+ sessionId: string | null;
3834
+ session: BaseEventSession | null;
3831
3835
  }
3832
3836
  interface SurveyTranslation {
3833
3837
  id: string;
@@ -6285,6 +6289,8 @@ interface SurveyCreateInputs {
6285
6289
  submissionsPerAccount?: string | number;
6286
6290
  replyTo?: string | null;
6287
6291
  emailBody?: string | null;
6292
+ eventId?: string | null;
6293
+ sessionId?: string | null;
6288
6294
  }
6289
6295
  interface SurveyUpdateInputs {
6290
6296
  name?: string;
@@ -6295,6 +6301,8 @@ interface SurveyUpdateInputs {
6295
6301
  submissionsPerAccount?: string | number;
6296
6302
  replyTo?: string | null;
6297
6303
  emailBody?: string | null;
6304
+ eventId?: string | null;
6305
+ sessionId?: string | null;
6298
6306
  }
6299
6307
  interface SurveyTranslationUpdateInputs {
6300
6308
  name?: string | null;
@@ -18568,24 +18576,26 @@ declare const useGetSurvey: (surveyId?: string, options?: SingleQueryOptions<Ret
18568
18576
  * @category Keys
18569
18577
  * @group Surveys
18570
18578
  */
18571
- declare const SURVEYS_QUERY_KEY: () => string[];
18579
+ declare const SURVEYS_QUERY_KEY: (eventId?: string, sessionId?: string) => string[];
18572
18580
  /**
18573
18581
  * @category Setters
18574
18582
  * @group Surveys
18575
18583
  */
18576
18584
  declare const SET_SURVEYS_QUERY_DATA: (client: QueryClient, keyParams: Parameters<typeof SURVEYS_QUERY_KEY>, response: Awaited<ReturnType<typeof GetSurveys>>) => void;
18577
18585
  interface GetSurveysProps extends InfiniteQueryParams {
18586
+ eventId?: string;
18587
+ sessionId?: string;
18578
18588
  }
18579
18589
  /**
18580
18590
  * @category Queries
18581
18591
  * @group Surveys
18582
18592
  */
18583
- declare const GetSurveys: ({ pageParam, pageSize, orderBy, search, adminApiParams, }: GetSurveysProps) => Promise<ConnectedXMResponse<Survey[]>>;
18593
+ declare const GetSurveys: ({ eventId, sessionId, pageParam, pageSize, orderBy, search, adminApiParams, }: GetSurveysProps) => Promise<ConnectedXMResponse<Survey[]>>;
18584
18594
  /**
18585
18595
  * @category Hooks
18586
18596
  * @group Surveys
18587
18597
  */
18588
- declare const useGetSurveys: (params?: Omit<InfiniteQueryParams, "pageParam" | "queryClient" | "adminApiParams">, options?: InfiniteQueryOptions<Awaited<ReturnType<typeof GetSurveys>>>) => _tanstack_react_query.UseInfiniteQueryResult<_tanstack_react_query.InfiniteData<ConnectedXMResponse<Survey[]>, number>, axios.AxiosError<ConnectedXMResponse<null>, any>>;
18598
+ declare const useGetSurveys: (eventId?: string, sessionId?: string, params?: Omit<InfiniteQueryParams, "pageParam" | "queryClient" | "adminApiParams">, options?: InfiniteQueryOptions<Awaited<ReturnType<typeof GetSurveys>>>) => _tanstack_react_query.UseInfiniteQueryResult<_tanstack_react_query.InfiniteData<ConnectedXMResponse<Survey[]>, number>, axios.AxiosError<ConnectedXMResponse<null>, any>>;
18589
18599
 
18590
18600
  /**
18591
18601
  * @category Keys
package/dist/index.d.ts CHANGED
@@ -3828,6 +3828,10 @@ interface Survey extends BaseSurvey {
3828
3828
  emailBody: string | null;
3829
3829
  createdAt: string;
3830
3830
  updatedAt: string;
3831
+ eventId: string | null;
3832
+ event: BaseEvent | null;
3833
+ sessionId: string | null;
3834
+ session: BaseEventSession | null;
3831
3835
  }
3832
3836
  interface SurveyTranslation {
3833
3837
  id: string;
@@ -6285,6 +6289,8 @@ interface SurveyCreateInputs {
6285
6289
  submissionsPerAccount?: string | number;
6286
6290
  replyTo?: string | null;
6287
6291
  emailBody?: string | null;
6292
+ eventId?: string | null;
6293
+ sessionId?: string | null;
6288
6294
  }
6289
6295
  interface SurveyUpdateInputs {
6290
6296
  name?: string;
@@ -6295,6 +6301,8 @@ interface SurveyUpdateInputs {
6295
6301
  submissionsPerAccount?: string | number;
6296
6302
  replyTo?: string | null;
6297
6303
  emailBody?: string | null;
6304
+ eventId?: string | null;
6305
+ sessionId?: string | null;
6298
6306
  }
6299
6307
  interface SurveyTranslationUpdateInputs {
6300
6308
  name?: string | null;
@@ -18568,24 +18576,26 @@ declare const useGetSurvey: (surveyId?: string, options?: SingleQueryOptions<Ret
18568
18576
  * @category Keys
18569
18577
  * @group Surveys
18570
18578
  */
18571
- declare const SURVEYS_QUERY_KEY: () => string[];
18579
+ declare const SURVEYS_QUERY_KEY: (eventId?: string, sessionId?: string) => string[];
18572
18580
  /**
18573
18581
  * @category Setters
18574
18582
  * @group Surveys
18575
18583
  */
18576
18584
  declare const SET_SURVEYS_QUERY_DATA: (client: QueryClient, keyParams: Parameters<typeof SURVEYS_QUERY_KEY>, response: Awaited<ReturnType<typeof GetSurveys>>) => void;
18577
18585
  interface GetSurveysProps extends InfiniteQueryParams {
18586
+ eventId?: string;
18587
+ sessionId?: string;
18578
18588
  }
18579
18589
  /**
18580
18590
  * @category Queries
18581
18591
  * @group Surveys
18582
18592
  */
18583
- declare const GetSurveys: ({ pageParam, pageSize, orderBy, search, adminApiParams, }: GetSurveysProps) => Promise<ConnectedXMResponse<Survey[]>>;
18593
+ declare const GetSurveys: ({ eventId, sessionId, pageParam, pageSize, orderBy, search, adminApiParams, }: GetSurveysProps) => Promise<ConnectedXMResponse<Survey[]>>;
18584
18594
  /**
18585
18595
  * @category Hooks
18586
18596
  * @group Surveys
18587
18597
  */
18588
- declare const useGetSurveys: (params?: Omit<InfiniteQueryParams, "pageParam" | "queryClient" | "adminApiParams">, options?: InfiniteQueryOptions<Awaited<ReturnType<typeof GetSurveys>>>) => _tanstack_react_query.UseInfiniteQueryResult<_tanstack_react_query.InfiniteData<ConnectedXMResponse<Survey[]>, number>, axios.AxiosError<ConnectedXMResponse<null>, any>>;
18598
+ declare const useGetSurveys: (eventId?: string, sessionId?: string, params?: Omit<InfiniteQueryParams, "pageParam" | "queryClient" | "adminApiParams">, options?: InfiniteQueryOptions<Awaited<ReturnType<typeof GetSurveys>>>) => _tanstack_react_query.UseInfiniteQueryResult<_tanstack_react_query.InfiniteData<ConnectedXMResponse<Survey[]>, number>, axios.AxiosError<ConnectedXMResponse<null>, any>>;
18589
18599
 
18590
18600
  /**
18591
18601
  * @category Keys
package/dist/index.js CHANGED
@@ -18644,11 +18644,18 @@ var useGetSupportTickets = (type, state, assignment, params = {}, options = {})
18644
18644
  };
18645
18645
 
18646
18646
  // src/queries/surveys/useGetSurveys.ts
18647
- var SURVEYS_QUERY_KEY = () => ["SURVEYS"];
18647
+ var SURVEYS_QUERY_KEY = (eventId, sessionId) => {
18648
+ const keys = ["SURVEYS"];
18649
+ if (eventId) keys.push(eventId);
18650
+ if (sessionId) keys.push(sessionId);
18651
+ return keys;
18652
+ };
18648
18653
  var SET_SURVEYS_QUERY_DATA = (client, keyParams, response) => {
18649
18654
  client.setQueryData(SURVEYS_QUERY_KEY(...keyParams), response);
18650
18655
  };
18651
18656
  var GetSurveys = async ({
18657
+ eventId,
18658
+ sessionId,
18652
18659
  pageParam,
18653
18660
  pageSize,
18654
18661
  orderBy,
@@ -18661,16 +18668,20 @@ var GetSurveys = async ({
18661
18668
  page: pageParam || void 0,
18662
18669
  pageSize: pageSize || void 0,
18663
18670
  orderBy: orderBy || void 0,
18664
- search: search || void 0
18671
+ search: search || void 0,
18672
+ eventId: eventId || void 0,
18673
+ sessionId: sessionId || void 0
18665
18674
  }
18666
18675
  });
18667
18676
  return data;
18668
18677
  };
18669
- var useGetSurveys = (params = {}, options = {}) => {
18678
+ var useGetSurveys = (eventId, sessionId, params = {}, options = {}) => {
18670
18679
  return useConnectedInfiniteQuery(
18671
- SURVEYS_QUERY_KEY(),
18680
+ SURVEYS_QUERY_KEY(eventId, sessionId),
18672
18681
  (params2) => GetSurveys({
18673
- ...params2
18682
+ ...params2,
18683
+ eventId,
18684
+ sessionId
18674
18685
  }),
18675
18686
  params,
18676
18687
  options
package/openapi.json CHANGED
@@ -64154,6 +64154,24 @@
64154
64154
  "summary": "Get Surveys",
64155
64155
  "description": "Get Surveys endpoint",
64156
64156
  "parameters": [
64157
+ {
64158
+ "in": "query",
64159
+ "name": "eventId",
64160
+ "schema": {
64161
+ "type": "string"
64162
+ },
64163
+ "description": "Filter by eventId",
64164
+ "required": false
64165
+ },
64166
+ {
64167
+ "in": "query",
64168
+ "name": "sessionId",
64169
+ "schema": {
64170
+ "type": "string"
64171
+ },
64172
+ "description": "Filter by sessionId",
64173
+ "required": false
64174
+ },
64157
64175
  {
64158
64176
  "in": "query",
64159
64177
  "name": "page",
@@ -87190,13 +87208,41 @@
87190
87208
  },
87191
87209
  "updatedAt": {
87192
87210
  "type": "string"
87211
+ },
87212
+ "eventId": {
87213
+ "type": "string",
87214
+ "nullable": true
87215
+ },
87216
+ "event": {
87217
+ "allOf": [
87218
+ {
87219
+ "$ref": "#/components/schemas/BaseEvent"
87220
+ }
87221
+ ],
87222
+ "nullable": true
87223
+ },
87224
+ "sessionId": {
87225
+ "type": "string",
87226
+ "nullable": true
87227
+ },
87228
+ "session": {
87229
+ "allOf": [
87230
+ {
87231
+ "$ref": "#/components/schemas/BaseEventSession"
87232
+ }
87233
+ ],
87234
+ "nullable": true
87193
87235
  }
87194
87236
  },
87195
87237
  "required": [
87196
87238
  "replyTo",
87197
87239
  "emailBody",
87198
87240
  "createdAt",
87199
- "updatedAt"
87241
+ "updatedAt",
87242
+ "eventId",
87243
+ "event",
87244
+ "sessionId",
87245
+ "session"
87200
87246
  ]
87201
87247
  }
87202
87248
  ]
@@ -97476,6 +97522,14 @@
97476
97522
  "emailBody": {
97477
97523
  "type": "string",
97478
97524
  "nullable": true
97525
+ },
97526
+ "eventId": {
97527
+ "type": "string",
97528
+ "nullable": true
97529
+ },
97530
+ "sessionId": {
97531
+ "type": "string",
97532
+ "nullable": true
97479
97533
  }
97480
97534
  },
97481
97535
  "required": [
@@ -97519,6 +97573,14 @@
97519
97573
  "emailBody": {
97520
97574
  "type": "string",
97521
97575
  "nullable": true
97576
+ },
97577
+ "eventId": {
97578
+ "type": "string",
97579
+ "nullable": true
97580
+ },
97581
+ "sessionId": {
97582
+ "type": "string",
97583
+ "nullable": true
97522
97584
  }
97523
97585
  }
97524
97586
  },
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@connectedxm/admin",
3
- "version": "6.8.0",
3
+ "version": "6.8.1",
4
4
  "description": "Admin API javascript SDK",
5
5
  "author": "ConnectedXM Inc.",
6
6
  "type": "module",