@connectedxm/admin 1.4.20 → 1.4.23
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 +9 -8
- package/dist/index.d.ts +9 -8
- package/dist/index.js +9 -15
- package/dist/index.mjs +9 -15
- 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"
|
|
@@ -3762,6 +3763,7 @@ interface ReportCreateInputs {
|
|
|
3762
3763
|
parentId: string | number;
|
|
3763
3764
|
eventId?: string | null;
|
|
3764
3765
|
placeId?: string | null;
|
|
3766
|
+
groupId?: string | null;
|
|
3765
3767
|
description?: string | null;
|
|
3766
3768
|
filters?: string | null;
|
|
3767
3769
|
columns?: string | null;
|
|
@@ -11488,22 +11490,20 @@ declare const REPORT_QUERY_KEY: (type: keyof typeof ReportType, reportId: string
|
|
|
11488
11490
|
* @category Setters
|
|
11489
11491
|
* @group Reports
|
|
11490
11492
|
*/
|
|
11491
|
-
declare const SET_REPORT_QUERY_DATA: (client: QueryClient, keyParams: [type: "organization" | "event" | "booking", reportId: string], response: Awaited<ReturnType<typeof GetReport>>) => void;
|
|
11493
|
+
declare const SET_REPORT_QUERY_DATA: (client: QueryClient, keyParams: [type: "organization" | "event" | "booking" | "group", reportId: string], response: Awaited<ReturnType<typeof GetReport>>) => void;
|
|
11492
11494
|
interface GetReportProps extends SingleQueryParams {
|
|
11493
11495
|
reportId: string;
|
|
11494
|
-
eventId?: string;
|
|
11495
|
-
placeId?: string;
|
|
11496
11496
|
}
|
|
11497
11497
|
/**
|
|
11498
11498
|
* @category Queries
|
|
11499
11499
|
* @group Reports
|
|
11500
11500
|
*/
|
|
11501
|
-
declare const GetReport: ({ reportId,
|
|
11501
|
+
declare const GetReport: ({ reportId, adminApiParams, }: GetReportProps) => Promise<ConnectedXMResponse<Report>>;
|
|
11502
11502
|
/**
|
|
11503
11503
|
* @category Hooks
|
|
11504
11504
|
* @group Reports
|
|
11505
11505
|
*/
|
|
11506
|
-
declare const useGetReport: (
|
|
11506
|
+
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
11507
|
|
|
11508
11508
|
/**
|
|
11509
11509
|
* @category Keys
|
|
@@ -11562,7 +11562,7 @@ declare const REPORT_USERS_QUERY_KEY: (type: keyof typeof ReportType, reportId:
|
|
|
11562
11562
|
* @category Setters
|
|
11563
11563
|
* @group Reports
|
|
11564
11564
|
*/
|
|
11565
|
-
declare const SET_REPORT_USERS_QUERY_DATA: (client: QueryClient, keyParams: [type: "organization" | "event" | "booking", reportId: string], response: Awaited<ReturnType<typeof GetReportUsers>>) => void;
|
|
11565
|
+
declare const SET_REPORT_USERS_QUERY_DATA: (client: QueryClient, keyParams: [type: "organization" | "event" | "booking" | "group", reportId: string], response: Awaited<ReturnType<typeof GetReportUsers>>) => void;
|
|
11566
11566
|
interface GetReportUsersProps extends SingleQueryParams {
|
|
11567
11567
|
reportId: string;
|
|
11568
11568
|
}
|
|
@@ -11580,6 +11580,7 @@ declare const useGetReportUsers: (reportId?: string, options?: SingleQueryOption
|
|
|
11580
11580
|
interface ReportFilters {
|
|
11581
11581
|
eventId?: string;
|
|
11582
11582
|
placeId?: string;
|
|
11583
|
+
groupId?: string;
|
|
11583
11584
|
}
|
|
11584
11585
|
/**
|
|
11585
11586
|
* @category Keys
|
|
@@ -11590,7 +11591,7 @@ declare const REPORTS_QUERY_KEY: (type: keyof typeof ReportType, filters?: Repor
|
|
|
11590
11591
|
* @category Setters
|
|
11591
11592
|
* @group Reports
|
|
11592
11593
|
*/
|
|
11593
|
-
declare const SET_REPORTS_QUERY_DATA: (client: QueryClient, keyParams: [type: "organization" | "event" | "booking", filters?: ReportFilters | undefined], response: Awaited<ReturnType<typeof GetReports>>) => void;
|
|
11594
|
+
declare const SET_REPORTS_QUERY_DATA: (client: QueryClient, keyParams: [type: "organization" | "event" | "booking" | "group", filters?: ReportFilters | undefined], response: Awaited<ReturnType<typeof GetReports>>) => void;
|
|
11594
11595
|
interface GetReportsProps extends InfiniteQueryParams {
|
|
11595
11596
|
type: keyof typeof ReportType;
|
|
11596
11597
|
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"
|
|
@@ -3762,6 +3763,7 @@ interface ReportCreateInputs {
|
|
|
3762
3763
|
parentId: string | number;
|
|
3763
3764
|
eventId?: string | null;
|
|
3764
3765
|
placeId?: string | null;
|
|
3766
|
+
groupId?: string | null;
|
|
3765
3767
|
description?: string | null;
|
|
3766
3768
|
filters?: string | null;
|
|
3767
3769
|
columns?: string | null;
|
|
@@ -11488,22 +11490,20 @@ declare const REPORT_QUERY_KEY: (type: keyof typeof ReportType, reportId: string
|
|
|
11488
11490
|
* @category Setters
|
|
11489
11491
|
* @group Reports
|
|
11490
11492
|
*/
|
|
11491
|
-
declare const SET_REPORT_QUERY_DATA: (client: QueryClient, keyParams: [type: "organization" | "event" | "booking", reportId: string], response: Awaited<ReturnType<typeof GetReport>>) => void;
|
|
11493
|
+
declare const SET_REPORT_QUERY_DATA: (client: QueryClient, keyParams: [type: "organization" | "event" | "booking" | "group", reportId: string], response: Awaited<ReturnType<typeof GetReport>>) => void;
|
|
11492
11494
|
interface GetReportProps extends SingleQueryParams {
|
|
11493
11495
|
reportId: string;
|
|
11494
|
-
eventId?: string;
|
|
11495
|
-
placeId?: string;
|
|
11496
11496
|
}
|
|
11497
11497
|
/**
|
|
11498
11498
|
* @category Queries
|
|
11499
11499
|
* @group Reports
|
|
11500
11500
|
*/
|
|
11501
|
-
declare const GetReport: ({ reportId,
|
|
11501
|
+
declare const GetReport: ({ reportId, adminApiParams, }: GetReportProps) => Promise<ConnectedXMResponse<Report>>;
|
|
11502
11502
|
/**
|
|
11503
11503
|
* @category Hooks
|
|
11504
11504
|
* @group Reports
|
|
11505
11505
|
*/
|
|
11506
|
-
declare const useGetReport: (
|
|
11506
|
+
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
11507
|
|
|
11508
11508
|
/**
|
|
11509
11509
|
* @category Keys
|
|
@@ -11562,7 +11562,7 @@ declare const REPORT_USERS_QUERY_KEY: (type: keyof typeof ReportType, reportId:
|
|
|
11562
11562
|
* @category Setters
|
|
11563
11563
|
* @group Reports
|
|
11564
11564
|
*/
|
|
11565
|
-
declare const SET_REPORT_USERS_QUERY_DATA: (client: QueryClient, keyParams: [type: "organization" | "event" | "booking", reportId: string], response: Awaited<ReturnType<typeof GetReportUsers>>) => void;
|
|
11565
|
+
declare const SET_REPORT_USERS_QUERY_DATA: (client: QueryClient, keyParams: [type: "organization" | "event" | "booking" | "group", reportId: string], response: Awaited<ReturnType<typeof GetReportUsers>>) => void;
|
|
11566
11566
|
interface GetReportUsersProps extends SingleQueryParams {
|
|
11567
11567
|
reportId: string;
|
|
11568
11568
|
}
|
|
@@ -11580,6 +11580,7 @@ declare const useGetReportUsers: (reportId?: string, options?: SingleQueryOption
|
|
|
11580
11580
|
interface ReportFilters {
|
|
11581
11581
|
eventId?: string;
|
|
11582
11582
|
placeId?: string;
|
|
11583
|
+
groupId?: string;
|
|
11583
11584
|
}
|
|
11584
11585
|
/**
|
|
11585
11586
|
* @category Keys
|
|
@@ -11590,7 +11591,7 @@ declare const REPORTS_QUERY_KEY: (type: keyof typeof ReportType, filters?: Repor
|
|
|
11590
11591
|
* @category Setters
|
|
11591
11592
|
* @group Reports
|
|
11592
11593
|
*/
|
|
11593
|
-
declare const SET_REPORTS_QUERY_DATA: (client: QueryClient, keyParams: [type: "organization" | "event" | "booking", filters?: ReportFilters | undefined], response: Awaited<ReturnType<typeof GetReports>>) => void;
|
|
11594
|
+
declare const SET_REPORTS_QUERY_DATA: (client: QueryClient, keyParams: [type: "organization" | "event" | "booking" | "group", filters?: ReportFilters | undefined], response: Awaited<ReturnType<typeof GetReports>>) => void;
|
|
11594
11595
|
interface GetReportsProps extends InfiniteQueryParams {
|
|
11595
11596
|
type: keyof typeof ReportType;
|
|
11596
11597
|
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;
|
|
@@ -14260,7 +14263,7 @@ var useGetReports = (type, filters, params = {}, options = {}) => {
|
|
|
14260
14263
|
params,
|
|
14261
14264
|
{
|
|
14262
14265
|
...options,
|
|
14263
|
-
enabled: (type === "organization" || type === "event" && !!filters?.eventId || type === "booking" && !!filters?.placeId) && (options.enabled ?? true)
|
|
14266
|
+
enabled: (type === "organization" || type === "event" && !!filters?.eventId || type === "booking" && !!filters?.placeId || type === "group" && !!filters?.groupId) && (options.enabled ?? true)
|
|
14264
14267
|
},
|
|
14265
14268
|
"reports"
|
|
14266
14269
|
);
|
|
@@ -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;
|
|
@@ -11993,7 +11996,7 @@ var useGetReports = (type, filters, params = {}, options = {}) => {
|
|
|
11993
11996
|
params,
|
|
11994
11997
|
{
|
|
11995
11998
|
...options,
|
|
11996
|
-
enabled: (type === "organization" || type === "event" && !!filters?.eventId || type === "booking" && !!filters?.placeId) && (options.enabled ?? true)
|
|
11999
|
+
enabled: (type === "organization" || type === "event" && !!filters?.eventId || type === "booking" && !!filters?.placeId || type === "group" && !!filters?.groupId) && (options.enabled ?? true)
|
|
11997
12000
|
},
|
|
11998
12001
|
"reports"
|
|
11999
12002
|
);
|
|
@@ -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),
|