@connectedxm/admin 1.4.20 → 1.4.21
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.d.mts +8 -8
- package/dist/index.d.ts +8 -8
- package/dist/index.js +8 -14
- package/dist/index.mjs +8 -14
- package/package.json +1 -1
package/dist/index.d.mts
CHANGED
|
@@ -183,7 +183,8 @@ declare enum RegistrationQuestionType {
|
|
|
183
183
|
declare enum ReportType {
|
|
184
184
|
organization = "organization",
|
|
185
185
|
event = "event",
|
|
186
|
-
booking = "booking"
|
|
186
|
+
booking = "booking",
|
|
187
|
+
group = "group"
|
|
187
188
|
}
|
|
188
189
|
declare enum OrganizationTriggerType {
|
|
189
190
|
postAuth = "postAuth"
|
|
@@ -11488,22 +11489,20 @@ declare const REPORT_QUERY_KEY: (type: keyof typeof ReportType, reportId: string
|
|
|
11488
11489
|
* @category Setters
|
|
11489
11490
|
* @group Reports
|
|
11490
11491
|
*/
|
|
11491
|
-
declare const SET_REPORT_QUERY_DATA: (client: QueryClient, keyParams: [type: "organization" | "event" | "booking", reportId: string], response: Awaited<ReturnType<typeof GetReport>>) => void;
|
|
11492
|
+
declare const SET_REPORT_QUERY_DATA: (client: QueryClient, keyParams: [type: "organization" | "event" | "booking" | "group", reportId: string], response: Awaited<ReturnType<typeof GetReport>>) => void;
|
|
11492
11493
|
interface GetReportProps extends SingleQueryParams {
|
|
11493
11494
|
reportId: string;
|
|
11494
|
-
eventId?: string;
|
|
11495
|
-
placeId?: string;
|
|
11496
11495
|
}
|
|
11497
11496
|
/**
|
|
11498
11497
|
* @category Queries
|
|
11499
11498
|
* @group Reports
|
|
11500
11499
|
*/
|
|
11501
|
-
declare const GetReport: ({ reportId,
|
|
11500
|
+
declare const GetReport: ({ reportId, adminApiParams, }: GetReportProps) => Promise<ConnectedXMResponse<Report>>;
|
|
11502
11501
|
/**
|
|
11503
11502
|
* @category Hooks
|
|
11504
11503
|
* @group Reports
|
|
11505
11504
|
*/
|
|
11506
|
-
declare const useGetReport: (
|
|
11505
|
+
declare const useGetReport: (type: keyof typeof ReportType, reportId?: string, options?: SingleQueryOptions<ReturnType<typeof GetReport>>) => _tanstack_react_query.UseQueryResult<ConnectedXMResponse<Report>, axios.AxiosError<ConnectedXMResponse<any>, any>>;
|
|
11507
11506
|
|
|
11508
11507
|
/**
|
|
11509
11508
|
* @category Keys
|
|
@@ -11562,7 +11561,7 @@ declare const REPORT_USERS_QUERY_KEY: (type: keyof typeof ReportType, reportId:
|
|
|
11562
11561
|
* @category Setters
|
|
11563
11562
|
* @group Reports
|
|
11564
11563
|
*/
|
|
11565
|
-
declare const SET_REPORT_USERS_QUERY_DATA: (client: QueryClient, keyParams: [type: "organization" | "event" | "booking", reportId: string], response: Awaited<ReturnType<typeof GetReportUsers>>) => void;
|
|
11564
|
+
declare const SET_REPORT_USERS_QUERY_DATA: (client: QueryClient, keyParams: [type: "organization" | "event" | "booking" | "group", reportId: string], response: Awaited<ReturnType<typeof GetReportUsers>>) => void;
|
|
11566
11565
|
interface GetReportUsersProps extends SingleQueryParams {
|
|
11567
11566
|
reportId: string;
|
|
11568
11567
|
}
|
|
@@ -11580,6 +11579,7 @@ declare const useGetReportUsers: (reportId?: string, options?: SingleQueryOption
|
|
|
11580
11579
|
interface ReportFilters {
|
|
11581
11580
|
eventId?: string;
|
|
11582
11581
|
placeId?: string;
|
|
11582
|
+
groupId?: string;
|
|
11583
11583
|
}
|
|
11584
11584
|
/**
|
|
11585
11585
|
* @category Keys
|
|
@@ -11590,7 +11590,7 @@ declare const REPORTS_QUERY_KEY: (type: keyof typeof ReportType, filters?: Repor
|
|
|
11590
11590
|
* @category Setters
|
|
11591
11591
|
* @group Reports
|
|
11592
11592
|
*/
|
|
11593
|
-
declare const SET_REPORTS_QUERY_DATA: (client: QueryClient, keyParams: [type: "organization" | "event" | "booking", filters?: ReportFilters | undefined], response: Awaited<ReturnType<typeof GetReports>>) => void;
|
|
11593
|
+
declare const SET_REPORTS_QUERY_DATA: (client: QueryClient, keyParams: [type: "organization" | "event" | "booking" | "group", filters?: ReportFilters | undefined], response: Awaited<ReturnType<typeof GetReports>>) => void;
|
|
11594
11594
|
interface GetReportsProps extends InfiniteQueryParams {
|
|
11595
11595
|
type: keyof typeof ReportType;
|
|
11596
11596
|
filters?: ReportFilters;
|
package/dist/index.d.ts
CHANGED
|
@@ -183,7 +183,8 @@ declare enum RegistrationQuestionType {
|
|
|
183
183
|
declare enum ReportType {
|
|
184
184
|
organization = "organization",
|
|
185
185
|
event = "event",
|
|
186
|
-
booking = "booking"
|
|
186
|
+
booking = "booking",
|
|
187
|
+
group = "group"
|
|
187
188
|
}
|
|
188
189
|
declare enum OrganizationTriggerType {
|
|
189
190
|
postAuth = "postAuth"
|
|
@@ -11488,22 +11489,20 @@ declare const REPORT_QUERY_KEY: (type: keyof typeof ReportType, reportId: string
|
|
|
11488
11489
|
* @category Setters
|
|
11489
11490
|
* @group Reports
|
|
11490
11491
|
*/
|
|
11491
|
-
declare const SET_REPORT_QUERY_DATA: (client: QueryClient, keyParams: [type: "organization" | "event" | "booking", reportId: string], response: Awaited<ReturnType<typeof GetReport>>) => void;
|
|
11492
|
+
declare const SET_REPORT_QUERY_DATA: (client: QueryClient, keyParams: [type: "organization" | "event" | "booking" | "group", reportId: string], response: Awaited<ReturnType<typeof GetReport>>) => void;
|
|
11492
11493
|
interface GetReportProps extends SingleQueryParams {
|
|
11493
11494
|
reportId: string;
|
|
11494
|
-
eventId?: string;
|
|
11495
|
-
placeId?: string;
|
|
11496
11495
|
}
|
|
11497
11496
|
/**
|
|
11498
11497
|
* @category Queries
|
|
11499
11498
|
* @group Reports
|
|
11500
11499
|
*/
|
|
11501
|
-
declare const GetReport: ({ reportId,
|
|
11500
|
+
declare const GetReport: ({ reportId, adminApiParams, }: GetReportProps) => Promise<ConnectedXMResponse<Report>>;
|
|
11502
11501
|
/**
|
|
11503
11502
|
* @category Hooks
|
|
11504
11503
|
* @group Reports
|
|
11505
11504
|
*/
|
|
11506
|
-
declare const useGetReport: (
|
|
11505
|
+
declare const useGetReport: (type: keyof typeof ReportType, reportId?: string, options?: SingleQueryOptions<ReturnType<typeof GetReport>>) => _tanstack_react_query.UseQueryResult<ConnectedXMResponse<Report>, axios.AxiosError<ConnectedXMResponse<any>, any>>;
|
|
11507
11506
|
|
|
11508
11507
|
/**
|
|
11509
11508
|
* @category Keys
|
|
@@ -11562,7 +11561,7 @@ declare const REPORT_USERS_QUERY_KEY: (type: keyof typeof ReportType, reportId:
|
|
|
11562
11561
|
* @category Setters
|
|
11563
11562
|
* @group Reports
|
|
11564
11563
|
*/
|
|
11565
|
-
declare const SET_REPORT_USERS_QUERY_DATA: (client: QueryClient, keyParams: [type: "organization" | "event" | "booking", reportId: string], response: Awaited<ReturnType<typeof GetReportUsers>>) => void;
|
|
11564
|
+
declare const SET_REPORT_USERS_QUERY_DATA: (client: QueryClient, keyParams: [type: "organization" | "event" | "booking" | "group", reportId: string], response: Awaited<ReturnType<typeof GetReportUsers>>) => void;
|
|
11566
11565
|
interface GetReportUsersProps extends SingleQueryParams {
|
|
11567
11566
|
reportId: string;
|
|
11568
11567
|
}
|
|
@@ -11580,6 +11579,7 @@ declare const useGetReportUsers: (reportId?: string, options?: SingleQueryOption
|
|
|
11580
11579
|
interface ReportFilters {
|
|
11581
11580
|
eventId?: string;
|
|
11582
11581
|
placeId?: string;
|
|
11582
|
+
groupId?: string;
|
|
11583
11583
|
}
|
|
11584
11584
|
/**
|
|
11585
11585
|
* @category Keys
|
|
@@ -11590,7 +11590,7 @@ declare const REPORTS_QUERY_KEY: (type: keyof typeof ReportType, filters?: Repor
|
|
|
11590
11590
|
* @category Setters
|
|
11591
11591
|
* @group Reports
|
|
11592
11592
|
*/
|
|
11593
|
-
declare const SET_REPORTS_QUERY_DATA: (client: QueryClient, keyParams: [type: "organization" | "event" | "booking", filters?: ReportFilters | undefined], response: Awaited<ReturnType<typeof GetReports>>) => void;
|
|
11593
|
+
declare const SET_REPORTS_QUERY_DATA: (client: QueryClient, keyParams: [type: "organization" | "event" | "booking" | "group", filters?: ReportFilters | undefined], response: Awaited<ReturnType<typeof GetReports>>) => void;
|
|
11594
11594
|
interface GetReportsProps extends InfiniteQueryParams {
|
|
11595
11595
|
type: keyof typeof ReportType;
|
|
11596
11596
|
filters?: ReportFilters;
|
package/dist/index.js
CHANGED
|
@@ -12137,6 +12137,7 @@ var ReportType = /* @__PURE__ */ ((ReportType2) => {
|
|
|
12137
12137
|
ReportType2["organization"] = "organization";
|
|
12138
12138
|
ReportType2["event"] = "event";
|
|
12139
12139
|
ReportType2["booking"] = "booking";
|
|
12140
|
+
ReportType2["group"] = "group";
|
|
12140
12141
|
return ReportType2;
|
|
12141
12142
|
})(ReportType || {});
|
|
12142
12143
|
var OrganizationTriggerType = /* @__PURE__ */ ((OrganizationTriggerType2) => {
|
|
@@ -14225,6 +14226,7 @@ var REPORTS_QUERY_KEY = (type, filters) => {
|
|
|
14225
14226
|
const keys = ["REPORTS", type];
|
|
14226
14227
|
if (filters?.eventId) keys.push(filters.eventId);
|
|
14227
14228
|
if (filters?.placeId) keys.push(filters.placeId);
|
|
14229
|
+
if (filters?.groupId) keys.push(filters.groupId);
|
|
14228
14230
|
return keys;
|
|
14229
14231
|
};
|
|
14230
14232
|
var SET_REPORTS_QUERY_DATA = (client, keyParams, response) => {
|
|
@@ -14248,7 +14250,8 @@ var GetReports = async ({
|
|
|
14248
14250
|
search: search || void 0,
|
|
14249
14251
|
type,
|
|
14250
14252
|
eventId: filters?.eventId,
|
|
14251
|
-
placeId: filters?.placeId
|
|
14253
|
+
placeId: filters?.placeId,
|
|
14254
|
+
groupId: filters?.groupId
|
|
14252
14255
|
}
|
|
14253
14256
|
});
|
|
14254
14257
|
return data;
|
|
@@ -14273,21 +14276,13 @@ var SET_REPORT_QUERY_DATA = (client, keyParams, response) => {
|
|
|
14273
14276
|
};
|
|
14274
14277
|
var GetReport = async ({
|
|
14275
14278
|
reportId,
|
|
14276
|
-
eventId,
|
|
14277
|
-
placeId,
|
|
14278
14279
|
adminApiParams
|
|
14279
14280
|
}) => {
|
|
14280
14281
|
const adminApi = await GetAdminAPI(adminApiParams);
|
|
14281
14282
|
let nextCursor = null;
|
|
14282
14283
|
const rowData = [];
|
|
14283
14284
|
const { data } = await adminApi.get(
|
|
14284
|
-
`/reports/${reportId}
|
|
14285
|
-
{
|
|
14286
|
-
params: {
|
|
14287
|
-
eventId,
|
|
14288
|
-
placeId
|
|
14289
|
-
}
|
|
14290
|
-
}
|
|
14285
|
+
`/reports/${reportId}`
|
|
14291
14286
|
);
|
|
14292
14287
|
rowData.push(...data.data.rowData);
|
|
14293
14288
|
nextCursor = data.data.nextCursor;
|
|
@@ -14296,7 +14291,6 @@ var GetReport = async ({
|
|
|
14296
14291
|
`/reports/${reportId}`,
|
|
14297
14292
|
{
|
|
14298
14293
|
params: {
|
|
14299
|
-
eventId,
|
|
14300
14294
|
cursor: nextCursor
|
|
14301
14295
|
}
|
|
14302
14296
|
}
|
|
@@ -14312,10 +14306,10 @@ var GetReport = async ({
|
|
|
14312
14306
|
}
|
|
14313
14307
|
};
|
|
14314
14308
|
};
|
|
14315
|
-
var useGetReport = (reportId = "",
|
|
14309
|
+
var useGetReport = (type, reportId = "", options = {}) => {
|
|
14316
14310
|
return useConnectedSingleQuery(
|
|
14317
|
-
REPORT_QUERY_KEY(
|
|
14318
|
-
(params) => GetReport({ reportId,
|
|
14311
|
+
REPORT_QUERY_KEY(type, reportId),
|
|
14312
|
+
(params) => GetReport({ reportId, ...params }),
|
|
14319
14313
|
{
|
|
14320
14314
|
...options,
|
|
14321
14315
|
enabled: !!reportId && (options?.enabled ?? true),
|
package/dist/index.mjs
CHANGED
|
@@ -9870,6 +9870,7 @@ var ReportType = /* @__PURE__ */ ((ReportType2) => {
|
|
|
9870
9870
|
ReportType2["organization"] = "organization";
|
|
9871
9871
|
ReportType2["event"] = "event";
|
|
9872
9872
|
ReportType2["booking"] = "booking";
|
|
9873
|
+
ReportType2["group"] = "group";
|
|
9873
9874
|
return ReportType2;
|
|
9874
9875
|
})(ReportType || {});
|
|
9875
9876
|
var OrganizationTriggerType = /* @__PURE__ */ ((OrganizationTriggerType2) => {
|
|
@@ -11958,6 +11959,7 @@ var REPORTS_QUERY_KEY = (type, filters) => {
|
|
|
11958
11959
|
const keys = ["REPORTS", type];
|
|
11959
11960
|
if (filters?.eventId) keys.push(filters.eventId);
|
|
11960
11961
|
if (filters?.placeId) keys.push(filters.placeId);
|
|
11962
|
+
if (filters?.groupId) keys.push(filters.groupId);
|
|
11961
11963
|
return keys;
|
|
11962
11964
|
};
|
|
11963
11965
|
var SET_REPORTS_QUERY_DATA = (client, keyParams, response) => {
|
|
@@ -11981,7 +11983,8 @@ var GetReports = async ({
|
|
|
11981
11983
|
search: search || void 0,
|
|
11982
11984
|
type,
|
|
11983
11985
|
eventId: filters?.eventId,
|
|
11984
|
-
placeId: filters?.placeId
|
|
11986
|
+
placeId: filters?.placeId,
|
|
11987
|
+
groupId: filters?.groupId
|
|
11985
11988
|
}
|
|
11986
11989
|
});
|
|
11987
11990
|
return data;
|
|
@@ -12006,21 +12009,13 @@ var SET_REPORT_QUERY_DATA = (client, keyParams, response) => {
|
|
|
12006
12009
|
};
|
|
12007
12010
|
var GetReport = async ({
|
|
12008
12011
|
reportId,
|
|
12009
|
-
eventId,
|
|
12010
|
-
placeId,
|
|
12011
12012
|
adminApiParams
|
|
12012
12013
|
}) => {
|
|
12013
12014
|
const adminApi = await GetAdminAPI(adminApiParams);
|
|
12014
12015
|
let nextCursor = null;
|
|
12015
12016
|
const rowData = [];
|
|
12016
12017
|
const { data } = await adminApi.get(
|
|
12017
|
-
`/reports/${reportId}
|
|
12018
|
-
{
|
|
12019
|
-
params: {
|
|
12020
|
-
eventId,
|
|
12021
|
-
placeId
|
|
12022
|
-
}
|
|
12023
|
-
}
|
|
12018
|
+
`/reports/${reportId}`
|
|
12024
12019
|
);
|
|
12025
12020
|
rowData.push(...data.data.rowData);
|
|
12026
12021
|
nextCursor = data.data.nextCursor;
|
|
@@ -12029,7 +12024,6 @@ var GetReport = async ({
|
|
|
12029
12024
|
`/reports/${reportId}`,
|
|
12030
12025
|
{
|
|
12031
12026
|
params: {
|
|
12032
|
-
eventId,
|
|
12033
12027
|
cursor: nextCursor
|
|
12034
12028
|
}
|
|
12035
12029
|
}
|
|
@@ -12045,10 +12039,10 @@ var GetReport = async ({
|
|
|
12045
12039
|
}
|
|
12046
12040
|
};
|
|
12047
12041
|
};
|
|
12048
|
-
var useGetReport = (reportId = "",
|
|
12042
|
+
var useGetReport = (type, reportId = "", options = {}) => {
|
|
12049
12043
|
return useConnectedSingleQuery(
|
|
12050
|
-
REPORT_QUERY_KEY(
|
|
12051
|
-
(params) => GetReport({ reportId,
|
|
12044
|
+
REPORT_QUERY_KEY(type, reportId),
|
|
12045
|
+
(params) => GetReport({ reportId, ...params }),
|
|
12052
12046
|
{
|
|
12053
12047
|
...options,
|
|
12054
12048
|
enabled: !!reportId && (options?.enabled ?? true),
|