@connectedxm/admin 6.8.0 → 6.8.3

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
@@ -3818,6 +3818,7 @@ interface BaseSurvey {
3818
3818
  id: string;
3819
3819
  slug: string;
3820
3820
  name: string;
3821
+ active: boolean;
3821
3822
  description: string | null;
3822
3823
  image: BaseImage;
3823
3824
  requireAuth: boolean;
@@ -3828,6 +3829,13 @@ interface Survey extends BaseSurvey {
3828
3829
  emailBody: string | null;
3829
3830
  createdAt: string;
3830
3831
  updatedAt: string;
3832
+ eventId: string | null;
3833
+ event: BaseEvent | null;
3834
+ sessionId: string | null;
3835
+ session: BaseEventSession | null;
3836
+ activationId: string | null;
3837
+ activation: BaseEventActivation | null;
3838
+ passTypes: BaseEventPassType[] | null;
3831
3839
  }
3832
3840
  interface SurveyTranslation {
3833
3841
  id: string;
@@ -3839,6 +3847,7 @@ interface SurveyTranslation {
3839
3847
  }
3840
3848
  interface BaseSurveySubmission {
3841
3849
  id: string;
3850
+ accountId: string | null;
3842
3851
  account: BaseAccount | null;
3843
3852
  status: PurchaseStatus;
3844
3853
  responses: BaseSurveyQuestionResponse[];
@@ -6279,15 +6288,20 @@ interface DashboardWidgetUpdateInputs {
6279
6288
  interface SurveyCreateInputs {
6280
6289
  name: string;
6281
6290
  slug?: string;
6291
+ active?: boolean;
6282
6292
  description?: string | null;
6283
6293
  imageId?: string | null;
6284
6294
  requireAuth?: boolean;
6285
6295
  submissionsPerAccount?: string | number;
6286
6296
  replyTo?: string | null;
6287
6297
  emailBody?: string | null;
6298
+ eventId?: string | null;
6299
+ sessionId?: string | null;
6300
+ activationId?: string | null;
6288
6301
  }
6289
6302
  interface SurveyUpdateInputs {
6290
6303
  name?: string;
6304
+ active?: boolean;
6291
6305
  slug?: string;
6292
6306
  description?: string | null;
6293
6307
  imageId?: string | null;
@@ -6295,6 +6309,9 @@ interface SurveyUpdateInputs {
6295
6309
  submissionsPerAccount?: string | number;
6296
6310
  replyTo?: string | null;
6297
6311
  emailBody?: string | null;
6312
+ eventId?: string | null;
6313
+ sessionId?: string | null;
6314
+ activationId?: string | null;
6298
6315
  }
6299
6316
  interface SurveyTranslationUpdateInputs {
6300
6317
  name?: string | null;
@@ -18568,24 +18585,26 @@ declare const useGetSurvey: (surveyId?: string, options?: SingleQueryOptions<Ret
18568
18585
  * @category Keys
18569
18586
  * @group Surveys
18570
18587
  */
18571
- declare const SURVEYS_QUERY_KEY: () => string[];
18588
+ declare const SURVEYS_QUERY_KEY: (eventId?: string, sessionId?: string) => string[];
18572
18589
  /**
18573
18590
  * @category Setters
18574
18591
  * @group Surveys
18575
18592
  */
18576
18593
  declare const SET_SURVEYS_QUERY_DATA: (client: QueryClient, keyParams: Parameters<typeof SURVEYS_QUERY_KEY>, response: Awaited<ReturnType<typeof GetSurveys>>) => void;
18577
18594
  interface GetSurveysProps extends InfiniteQueryParams {
18595
+ eventId?: string;
18596
+ sessionId?: string;
18578
18597
  }
18579
18598
  /**
18580
18599
  * @category Queries
18581
18600
  * @group Surveys
18582
18601
  */
18583
- declare const GetSurveys: ({ pageParam, pageSize, orderBy, search, adminApiParams, }: GetSurveysProps) => Promise<ConnectedXMResponse<Survey[]>>;
18602
+ declare const GetSurveys: ({ eventId, sessionId, pageParam, pageSize, orderBy, search, adminApiParams, }: GetSurveysProps) => Promise<ConnectedXMResponse<Survey[]>>;
18584
18603
  /**
18585
18604
  * @category Hooks
18586
18605
  * @group Surveys
18587
18606
  */
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>>;
18607
+ 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
18608
 
18590
18609
  /**
18591
18610
  * @category Keys
package/dist/index.d.ts CHANGED
@@ -3818,6 +3818,7 @@ interface BaseSurvey {
3818
3818
  id: string;
3819
3819
  slug: string;
3820
3820
  name: string;
3821
+ active: boolean;
3821
3822
  description: string | null;
3822
3823
  image: BaseImage;
3823
3824
  requireAuth: boolean;
@@ -3828,6 +3829,13 @@ interface Survey extends BaseSurvey {
3828
3829
  emailBody: string | null;
3829
3830
  createdAt: string;
3830
3831
  updatedAt: string;
3832
+ eventId: string | null;
3833
+ event: BaseEvent | null;
3834
+ sessionId: string | null;
3835
+ session: BaseEventSession | null;
3836
+ activationId: string | null;
3837
+ activation: BaseEventActivation | null;
3838
+ passTypes: BaseEventPassType[] | null;
3831
3839
  }
3832
3840
  interface SurveyTranslation {
3833
3841
  id: string;
@@ -3839,6 +3847,7 @@ interface SurveyTranslation {
3839
3847
  }
3840
3848
  interface BaseSurveySubmission {
3841
3849
  id: string;
3850
+ accountId: string | null;
3842
3851
  account: BaseAccount | null;
3843
3852
  status: PurchaseStatus;
3844
3853
  responses: BaseSurveyQuestionResponse[];
@@ -6279,15 +6288,20 @@ interface DashboardWidgetUpdateInputs {
6279
6288
  interface SurveyCreateInputs {
6280
6289
  name: string;
6281
6290
  slug?: string;
6291
+ active?: boolean;
6282
6292
  description?: string | null;
6283
6293
  imageId?: string | null;
6284
6294
  requireAuth?: boolean;
6285
6295
  submissionsPerAccount?: string | number;
6286
6296
  replyTo?: string | null;
6287
6297
  emailBody?: string | null;
6298
+ eventId?: string | null;
6299
+ sessionId?: string | null;
6300
+ activationId?: string | null;
6288
6301
  }
6289
6302
  interface SurveyUpdateInputs {
6290
6303
  name?: string;
6304
+ active?: boolean;
6291
6305
  slug?: string;
6292
6306
  description?: string | null;
6293
6307
  imageId?: string | null;
@@ -6295,6 +6309,9 @@ interface SurveyUpdateInputs {
6295
6309
  submissionsPerAccount?: string | number;
6296
6310
  replyTo?: string | null;
6297
6311
  emailBody?: string | null;
6312
+ eventId?: string | null;
6313
+ sessionId?: string | null;
6314
+ activationId?: string | null;
6298
6315
  }
6299
6316
  interface SurveyTranslationUpdateInputs {
6300
6317
  name?: string | null;
@@ -18568,24 +18585,26 @@ declare const useGetSurvey: (surveyId?: string, options?: SingleQueryOptions<Ret
18568
18585
  * @category Keys
18569
18586
  * @group Surveys
18570
18587
  */
18571
- declare const SURVEYS_QUERY_KEY: () => string[];
18588
+ declare const SURVEYS_QUERY_KEY: (eventId?: string, sessionId?: string) => string[];
18572
18589
  /**
18573
18590
  * @category Setters
18574
18591
  * @group Surveys
18575
18592
  */
18576
18593
  declare const SET_SURVEYS_QUERY_DATA: (client: QueryClient, keyParams: Parameters<typeof SURVEYS_QUERY_KEY>, response: Awaited<ReturnType<typeof GetSurveys>>) => void;
18577
18594
  interface GetSurveysProps extends InfiniteQueryParams {
18595
+ eventId?: string;
18596
+ sessionId?: string;
18578
18597
  }
18579
18598
  /**
18580
18599
  * @category Queries
18581
18600
  * @group Surveys
18582
18601
  */
18583
- declare const GetSurveys: ({ pageParam, pageSize, orderBy, search, adminApiParams, }: GetSurveysProps) => Promise<ConnectedXMResponse<Survey[]>>;
18602
+ declare const GetSurveys: ({ eventId, sessionId, pageParam, pageSize, orderBy, search, adminApiParams, }: GetSurveysProps) => Promise<ConnectedXMResponse<Survey[]>>;
18584
18603
  /**
18585
18604
  * @category Hooks
18586
18605
  * @group Surveys
18587
18606
  */
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>>;
18607
+ 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
18608
 
18590
18609
  /**
18591
18610
  * @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",
@@ -87145,6 +87163,9 @@
87145
87163
  "name": {
87146
87164
  "type": "string"
87147
87165
  },
87166
+ "active": {
87167
+ "type": "boolean"
87168
+ },
87148
87169
  "description": {
87149
87170
  "type": "string",
87150
87171
  "nullable": true
@@ -87163,6 +87184,7 @@
87163
87184
  "id",
87164
87185
  "slug",
87165
87186
  "name",
87187
+ "active",
87166
87188
  "description",
87167
87189
  "image",
87168
87190
  "requireAuth",
@@ -87190,13 +87212,63 @@
87190
87212
  },
87191
87213
  "updatedAt": {
87192
87214
  "type": "string"
87215
+ },
87216
+ "eventId": {
87217
+ "type": "string",
87218
+ "nullable": true
87219
+ },
87220
+ "event": {
87221
+ "allOf": [
87222
+ {
87223
+ "$ref": "#/components/schemas/BaseEvent"
87224
+ }
87225
+ ],
87226
+ "nullable": true
87227
+ },
87228
+ "sessionId": {
87229
+ "type": "string",
87230
+ "nullable": true
87231
+ },
87232
+ "session": {
87233
+ "allOf": [
87234
+ {
87235
+ "$ref": "#/components/schemas/BaseEventSession"
87236
+ }
87237
+ ],
87238
+ "nullable": true
87239
+ },
87240
+ "activationId": {
87241
+ "type": "string",
87242
+ "nullable": true
87243
+ },
87244
+ "activation": {
87245
+ "allOf": [
87246
+ {
87247
+ "$ref": "#/components/schemas/BaseEventActivation"
87248
+ }
87249
+ ],
87250
+ "nullable": true
87251
+ },
87252
+ "passTypes": {
87253
+ "type": "array",
87254
+ "items": {
87255
+ "$ref": "#/components/schemas/BaseEventPassType"
87256
+ },
87257
+ "nullable": true
87193
87258
  }
87194
87259
  },
87195
87260
  "required": [
87196
87261
  "replyTo",
87197
87262
  "emailBody",
87198
87263
  "createdAt",
87199
- "updatedAt"
87264
+ "updatedAt",
87265
+ "eventId",
87266
+ "event",
87267
+ "sessionId",
87268
+ "session",
87269
+ "activationId",
87270
+ "activation",
87271
+ "passTypes"
87200
87272
  ]
87201
87273
  }
87202
87274
  ]
@@ -87239,6 +87311,10 @@
87239
87311
  "id": {
87240
87312
  "type": "string"
87241
87313
  },
87314
+ "accountId": {
87315
+ "type": "string",
87316
+ "nullable": true
87317
+ },
87242
87318
  "account": {
87243
87319
  "allOf": [
87244
87320
  {
@@ -87259,6 +87335,7 @@
87259
87335
  },
87260
87336
  "required": [
87261
87337
  "id",
87338
+ "accountId",
87262
87339
  "account",
87263
87340
  "status",
87264
87341
  "responses"
@@ -97448,6 +97525,9 @@
97448
97525
  "slug": {
97449
97526
  "type": "string"
97450
97527
  },
97528
+ "active": {
97529
+ "type": "boolean"
97530
+ },
97451
97531
  "description": {
97452
97532
  "type": "string",
97453
97533
  "nullable": true
@@ -97476,6 +97556,18 @@
97476
97556
  "emailBody": {
97477
97557
  "type": "string",
97478
97558
  "nullable": true
97559
+ },
97560
+ "eventId": {
97561
+ "type": "string",
97562
+ "nullable": true
97563
+ },
97564
+ "sessionId": {
97565
+ "type": "string",
97566
+ "nullable": true
97567
+ },
97568
+ "activationId": {
97569
+ "type": "string",
97570
+ "nullable": true
97479
97571
  }
97480
97572
  },
97481
97573
  "required": [
@@ -97488,6 +97580,9 @@
97488
97580
  "name": {
97489
97581
  "type": "string"
97490
97582
  },
97583
+ "active": {
97584
+ "type": "boolean"
97585
+ },
97491
97586
  "slug": {
97492
97587
  "type": "string"
97493
97588
  },
@@ -97519,6 +97614,18 @@
97519
97614
  "emailBody": {
97520
97615
  "type": "string",
97521
97616
  "nullable": true
97617
+ },
97618
+ "eventId": {
97619
+ "type": "string",
97620
+ "nullable": true
97621
+ },
97622
+ "sessionId": {
97623
+ "type": "string",
97624
+ "nullable": true
97625
+ },
97626
+ "activationId": {
97627
+ "type": "string",
97628
+ "nullable": true
97522
97629
  }
97523
97630
  }
97524
97631
  },
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@connectedxm/admin",
3
- "version": "6.8.0",
3
+ "version": "6.8.3",
4
4
  "description": "Admin API javascript SDK",
5
5
  "author": "ConnectedXM Inc.",
6
6
  "type": "module",