@connectedxm/admin 6.18.0 → 6.19.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.
package/dist/index.cjs CHANGED
@@ -3839,7 +3839,6 @@ var SupportedLocale = /* @__PURE__ */ ((SupportedLocale2) => {
3839
3839
  SupportedLocale2["cs"] = "cs";
3840
3840
  SupportedLocale2["da"] = "da";
3841
3841
  SupportedLocale2["nl"] = "nl";
3842
- SupportedLocale2["en"] = "en";
3843
3842
  SupportedLocale2["et"] = "et";
3844
3843
  SupportedLocale2["fi"] = "fi";
3845
3844
  SupportedLocale2["fr"] = "fr";
@@ -23546,12 +23545,16 @@ var useGetSurveySectionQuestions = (surveyId = "", sectionId = "", params = {},
23546
23545
  };
23547
23546
 
23548
23547
  // src/queries/surveys/submissions/useGetSurveySubmissions.ts
23549
- var SURVEY_SUBMISSIONS_QUERY_KEY = (surveyId) => [
23550
- ...SURVEY_QUERY_KEY(surveyId),
23551
- "SUBMISSIONS"
23552
- ];
23548
+ var SURVEY_SUBMISSIONS_QUERY_KEY = (surveyId, status) => {
23549
+ const key = [...SURVEY_QUERY_KEY(surveyId), "SUBMISSIONS"];
23550
+ if (status) {
23551
+ key.push(status);
23552
+ }
23553
+ return key;
23554
+ };
23553
23555
  var GetSurveySubmissions = async ({
23554
23556
  surveyId,
23557
+ status,
23555
23558
  pageParam,
23556
23559
  pageSize,
23557
23560
  orderBy,
@@ -23561,6 +23564,7 @@ var GetSurveySubmissions = async ({
23561
23564
  const adminApi = await GetAdminAPI(adminApiParams);
23562
23565
  const { data } = await adminApi.get(`/surveys/${surveyId}/submissions`, {
23563
23566
  params: {
23567
+ status: status || void 0,
23564
23568
  page: pageParam || void 0,
23565
23569
  pageSize: pageSize || void 0,
23566
23570
  orderBy: orderBy || void 0,
@@ -23569,12 +23573,13 @@ var GetSurveySubmissions = async ({
23569
23573
  });
23570
23574
  return data;
23571
23575
  };
23572
- var useGetSurveySubmissions = (surveyId = "", params = {}, options = {}) => {
23576
+ var useGetSurveySubmissions = (surveyId = "", status, params = {}, options = {}) => {
23573
23577
  return useConnectedInfiniteQuery(
23574
- SURVEY_SUBMISSIONS_QUERY_KEY(surveyId),
23578
+ SURVEY_SUBMISSIONS_QUERY_KEY(surveyId, status),
23575
23579
  (params2) => GetSurveySubmissions({
23576
23580
  ...params2,
23577
- surveyId
23581
+ surveyId,
23582
+ status
23578
23583
  }),
23579
23584
  params,
23580
23585
  {
package/dist/index.d.cts CHANGED
@@ -1117,7 +1117,6 @@ declare enum SupportedLocale {
1117
1117
  cs = "cs",
1118
1118
  da = "da",
1119
1119
  nl = "nl",
1120
- en = "en",
1121
1120
  et = "et",
1122
1121
  fi = "fi",
1123
1122
  fr = "fr",
@@ -19284,20 +19283,21 @@ declare const useGetSurveySubmissionResponseChanges: (surveyId?: string, submiss
19284
19283
  * @category Keys
19285
19284
  * @group Surveys
19286
19285
  */
19287
- declare const SURVEY_SUBMISSIONS_QUERY_KEY: (surveyId: string) => string[];
19286
+ declare const SURVEY_SUBMISSIONS_QUERY_KEY: (surveyId: string, status?: PurchaseStatus) => string[];
19288
19287
  interface GetSurveySubmissionsProps extends InfiniteQueryParams {
19289
19288
  surveyId: string;
19289
+ status?: PurchaseStatus;
19290
19290
  }
19291
19291
  /**
19292
19292
  * @category Queries
19293
19293
  * @group Surveys
19294
19294
  */
19295
- declare const GetSurveySubmissions: ({ surveyId, pageParam, pageSize, orderBy, search, adminApiParams, }: GetSurveySubmissionsProps) => Promise<ConnectedXMResponse<SurveySubmission[]>>;
19295
+ declare const GetSurveySubmissions: ({ surveyId, status, pageParam, pageSize, orderBy, search, adminApiParams, }: GetSurveySubmissionsProps) => Promise<ConnectedXMResponse<SurveySubmission[]>>;
19296
19296
  /**
19297
19297
  * @category Hooks
19298
19298
  * @group Surveys
19299
19299
  */
19300
- declare const useGetSurveySubmissions: (surveyId?: string, params?: Omit<InfiniteQueryParams, "pageParam" | "queryClient" | "adminApiParams">, options?: InfiniteQueryOptions<Awaited<ReturnType<typeof GetSurveySubmissions>>>) => _tanstack_react_query.UseInfiniteQueryResult<_tanstack_query_core.InfiniteData<ConnectedXMResponse<SurveySubmission[]>, number>, axios.AxiosError<ConnectedXMResponse<null>, any>>;
19300
+ declare const useGetSurveySubmissions: (surveyId?: string, status?: PurchaseStatus, params?: Omit<InfiniteQueryParams, "pageParam" | "queryClient" | "adminApiParams">, options?: InfiniteQueryOptions<Awaited<ReturnType<typeof GetSurveySubmissions>>>) => _tanstack_react_query.UseInfiniteQueryResult<_tanstack_query_core.InfiniteData<ConnectedXMResponse<SurveySubmission[]>, number>, axios.AxiosError<ConnectedXMResponse<null>, any>>;
19301
19301
 
19302
19302
  /**
19303
19303
  * @category Keys
package/dist/index.d.ts CHANGED
@@ -1117,7 +1117,6 @@ declare enum SupportedLocale {
1117
1117
  cs = "cs",
1118
1118
  da = "da",
1119
1119
  nl = "nl",
1120
- en = "en",
1121
1120
  et = "et",
1122
1121
  fi = "fi",
1123
1122
  fr = "fr",
@@ -19284,20 +19283,21 @@ declare const useGetSurveySubmissionResponseChanges: (surveyId?: string, submiss
19284
19283
  * @category Keys
19285
19284
  * @group Surveys
19286
19285
  */
19287
- declare const SURVEY_SUBMISSIONS_QUERY_KEY: (surveyId: string) => string[];
19286
+ declare const SURVEY_SUBMISSIONS_QUERY_KEY: (surveyId: string, status?: PurchaseStatus) => string[];
19288
19287
  interface GetSurveySubmissionsProps extends InfiniteQueryParams {
19289
19288
  surveyId: string;
19289
+ status?: PurchaseStatus;
19290
19290
  }
19291
19291
  /**
19292
19292
  * @category Queries
19293
19293
  * @group Surveys
19294
19294
  */
19295
- declare const GetSurveySubmissions: ({ surveyId, pageParam, pageSize, orderBy, search, adminApiParams, }: GetSurveySubmissionsProps) => Promise<ConnectedXMResponse<SurveySubmission[]>>;
19295
+ declare const GetSurveySubmissions: ({ surveyId, status, pageParam, pageSize, orderBy, search, adminApiParams, }: GetSurveySubmissionsProps) => Promise<ConnectedXMResponse<SurveySubmission[]>>;
19296
19296
  /**
19297
19297
  * @category Hooks
19298
19298
  * @group Surveys
19299
19299
  */
19300
- declare const useGetSurveySubmissions: (surveyId?: string, params?: Omit<InfiniteQueryParams, "pageParam" | "queryClient" | "adminApiParams">, options?: InfiniteQueryOptions<Awaited<ReturnType<typeof GetSurveySubmissions>>>) => _tanstack_react_query.UseInfiniteQueryResult<_tanstack_query_core.InfiniteData<ConnectedXMResponse<SurveySubmission[]>, number>, axios.AxiosError<ConnectedXMResponse<null>, any>>;
19300
+ declare const useGetSurveySubmissions: (surveyId?: string, status?: PurchaseStatus, params?: Omit<InfiniteQueryParams, "pageParam" | "queryClient" | "adminApiParams">, options?: InfiniteQueryOptions<Awaited<ReturnType<typeof GetSurveySubmissions>>>) => _tanstack_react_query.UseInfiniteQueryResult<_tanstack_query_core.InfiniteData<ConnectedXMResponse<SurveySubmission[]>, number>, axios.AxiosError<ConnectedXMResponse<null>, any>>;
19301
19301
 
19302
19302
  /**
19303
19303
  * @category Keys
package/dist/index.js CHANGED
@@ -391,7 +391,6 @@ var SupportedLocale = /* @__PURE__ */ ((SupportedLocale2) => {
391
391
  SupportedLocale2["cs"] = "cs";
392
392
  SupportedLocale2["da"] = "da";
393
393
  SupportedLocale2["nl"] = "nl";
394
- SupportedLocale2["en"] = "en";
395
394
  SupportedLocale2["et"] = "et";
396
395
  SupportedLocale2["fi"] = "fi";
397
396
  SupportedLocale2["fr"] = "fr";
@@ -20102,12 +20101,16 @@ var useGetSurveySectionQuestions = (surveyId = "", sectionId = "", params = {},
20102
20101
  };
20103
20102
 
20104
20103
  // src/queries/surveys/submissions/useGetSurveySubmissions.ts
20105
- var SURVEY_SUBMISSIONS_QUERY_KEY = (surveyId) => [
20106
- ...SURVEY_QUERY_KEY(surveyId),
20107
- "SUBMISSIONS"
20108
- ];
20104
+ var SURVEY_SUBMISSIONS_QUERY_KEY = (surveyId, status) => {
20105
+ const key = [...SURVEY_QUERY_KEY(surveyId), "SUBMISSIONS"];
20106
+ if (status) {
20107
+ key.push(status);
20108
+ }
20109
+ return key;
20110
+ };
20109
20111
  var GetSurveySubmissions = async ({
20110
20112
  surveyId,
20113
+ status,
20111
20114
  pageParam,
20112
20115
  pageSize,
20113
20116
  orderBy,
@@ -20117,6 +20120,7 @@ var GetSurveySubmissions = async ({
20117
20120
  const adminApi = await GetAdminAPI(adminApiParams);
20118
20121
  const { data } = await adminApi.get(`/surveys/${surveyId}/submissions`, {
20119
20122
  params: {
20123
+ status: status || void 0,
20120
20124
  page: pageParam || void 0,
20121
20125
  pageSize: pageSize || void 0,
20122
20126
  orderBy: orderBy || void 0,
@@ -20125,12 +20129,13 @@ var GetSurveySubmissions = async ({
20125
20129
  });
20126
20130
  return data;
20127
20131
  };
20128
- var useGetSurveySubmissions = (surveyId = "", params = {}, options = {}) => {
20132
+ var useGetSurveySubmissions = (surveyId = "", status, params = {}, options = {}) => {
20129
20133
  return useConnectedInfiniteQuery(
20130
- SURVEY_SUBMISSIONS_QUERY_KEY(surveyId),
20134
+ SURVEY_SUBMISSIONS_QUERY_KEY(surveyId, status),
20131
20135
  (params2) => GetSurveySubmissions({
20132
20136
  ...params2,
20133
- surveyId
20137
+ surveyId,
20138
+ status
20134
20139
  }),
20135
20140
  params,
20136
20141
  {