@connectedxm/admin 0.0.49 → 0.0.50

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.js CHANGED
@@ -218,6 +218,7 @@ __export(src_exports, {
218
218
  CreateOrganizationPaymentIntegration: () => CreateOrganizationPaymentIntegration,
219
219
  CreateOrganizationTeamMember: () => CreateOrganizationTeamMember,
220
220
  CreateReport: () => CreateReport,
221
+ CreateSelfApiKey: () => CreateSelfApiKey,
221
222
  CreateSeries: () => CreateSeries,
222
223
  CreateStreamInput: () => CreateStreamInput,
223
224
  CreateStreamInputOutput: () => CreateStreamInputOutput,
@@ -297,6 +298,7 @@ __export(src_exports, {
297
298
  DeleteOrganizationTeamMember: () => DeleteOrganizationTeamMember,
298
299
  DeleteOrganizationUser: () => DeleteOrganizationUser,
299
300
  DeleteReport: () => DeleteReport,
301
+ DeleteSelfApiKey: () => DeleteSelfApiKey,
300
302
  DeleteSeries: () => DeleteSeries,
301
303
  DeleteStreamInput: () => DeleteStreamInput,
302
304
  DeleteStreamInputOutput: () => DeleteStreamInputOutput,
@@ -707,6 +709,8 @@ __export(src_exports, {
707
709
  GetReservationSectionTranslations: () => GetReservationSectionTranslations,
708
710
  GetReservationSections: () => GetReservationSections,
709
711
  GetSelf: () => GetSelf,
712
+ GetSelfApiKey: () => GetSelfApiKey,
713
+ GetSelfApiKeys: () => GetSelfApiKeys,
710
714
  GetSelfOrgMembership: () => GetSelfOrgMembership,
711
715
  GetSelfOrganizations: () => GetSelfOrganizations,
712
716
  GetSeries: () => GetSeries,
@@ -868,6 +872,8 @@ __export(src_exports, {
868
872
  ReportType: () => ReportType,
869
873
  ResendEventRegistrationConfirmationEmail: () => ResendEventRegistrationConfirmationEmail,
870
874
  SEARCH_ORGANIZATION_QUERY_KEY: () => SEARCH_ORGANIZATION_QUERY_KEY,
875
+ SELF_API_KEYS_QUERY_KEY: () => SELF_API_KEYS_QUERY_KEY,
876
+ SELF_API_KEY_QUERY_KEY: () => SELF_API_KEY_QUERY_KEY,
871
877
  SELF_MEMBERSHIP_QUERY_KEY: () => SELF_MEMBERSHIP_QUERY_KEY,
872
878
  SELF_ORGANIZATIONS_QUERY_KEY: () => SELF_ORGANIZATIONS_QUERY_KEY,
873
879
  SELF_QUERY_KEY: () => SELF_QUERY_KEY,
@@ -1117,6 +1123,8 @@ __export(src_exports, {
1117
1123
  SET_REPORT_PARENT_QUERY_DATA: () => SET_REPORT_PARENT_QUERY_DATA,
1118
1124
  SET_REPORT_QUERY_DATA: () => SET_REPORT_QUERY_DATA,
1119
1125
  SET_SEARCH_ORGANIZATION_QUERY_DATA: () => SET_SEARCH_ORGANIZATION_QUERY_DATA,
1126
+ SET_SELF_API_KEYS_QUERY_DATA: () => SET_SELF_API_KEYS_QUERY_DATA,
1127
+ SET_SELF_API_KEY_QUERY_DATA: () => SET_SELF_API_KEY_QUERY_DATA,
1120
1128
  SET_SELF_MEMBERSHIP_QUERY_DATA: () => SET_SELF_MEMBERSHIP_QUERY_DATA,
1121
1129
  SET_SELF_ORGANIZATIONS_QUERY_DATA: () => SET_SELF_ORGANIZATIONS_QUERY_DATA,
1122
1130
  SET_SELF_QUERY_DATA: () => SET_SELF_QUERY_DATA,
@@ -1420,6 +1428,7 @@ __export(src_exports, {
1420
1428
  useCreateOrganizationPaymentIntegration: () => useCreateOrganizationPaymentIntegration,
1421
1429
  useCreateOrganizationTeamMember: () => useCreateOrganizationTeamMember,
1422
1430
  useCreateReport: () => useCreateReport,
1431
+ useCreateSelfApiKey: () => useCreateSelfApiKey,
1423
1432
  useCreateSeries: () => useCreateSeries,
1424
1433
  useCreateStreamInput: () => useCreateStreamInput,
1425
1434
  useCreateStreamInputOutput: () => useCreateStreamInputOutput,
@@ -1496,6 +1505,7 @@ __export(src_exports, {
1496
1505
  useDeleteOrganizationTeamMember: () => useDeleteOrganizationTeamMember,
1497
1506
  useDeleteOrganizationUser: () => useDeleteOrganizationUser,
1498
1507
  useDeleteReport: () => useDeleteReport,
1508
+ useDeleteSelfApiKey: () => useDeleteSelfApiKey,
1499
1509
  useDeleteSeries: () => useDeleteSeries,
1500
1510
  useDeleteStreamInput: () => useDeleteStreamInput,
1501
1511
  useDeleteStreamInputOutput: () => useDeleteStreamInputOutput,
@@ -1758,6 +1768,8 @@ __export(src_exports, {
1758
1768
  useGetReservationSectionTranslations: () => useGetReservationSectionTranslations,
1759
1769
  useGetReservationSections: () => useGetReservationSections,
1760
1770
  useGetSelf: () => useGetSelf,
1771
+ useGetSelfApiKey: () => useGetSelfApiKey,
1772
+ useGetSelfApiKeys: () => useGetSelfApiKeys,
1761
1773
  useGetSelfOrgMembership: () => useGetSelfOrgMembership,
1762
1774
  useGetSelfOrganizations: () => useGetSelfOrganizations,
1763
1775
  useGetSeries: () => useGetSeries,
@@ -12512,6 +12524,65 @@ var useGetSelf = (options = {}) => {
12512
12524
  );
12513
12525
  };
12514
12526
 
12527
+ // src/queries/self/useGetSelfApiKeys.ts
12528
+ var SELF_API_KEYS_QUERY_KEY = () => [...SELF_QUERY_KEY(), "API_KEYS"];
12529
+ var SET_SELF_API_KEYS_QUERY_DATA = (client, response) => {
12530
+ client.setQueryData(SELF_API_KEYS_QUERY_KEY(), response);
12531
+ };
12532
+ var GetSelfApiKeys = async ({
12533
+ pageParam,
12534
+ pageSize,
12535
+ orderBy,
12536
+ search,
12537
+ adminApiParams
12538
+ }) => {
12539
+ const adminApi = await GetAdminAPI(adminApiParams);
12540
+ const { data } = await adminApi.get(`/self/api-keys`, {
12541
+ params: {
12542
+ page: pageParam || void 0,
12543
+ pageSize: pageSize || void 0,
12544
+ orderBy: orderBy || void 0,
12545
+ search: search || void 0
12546
+ }
12547
+ });
12548
+ return data;
12549
+ };
12550
+ var useGetSelfApiKeys = (params = {}, options = {}) => {
12551
+ return useConnectedInfiniteQuery(
12552
+ SELF_API_KEYS_QUERY_KEY(),
12553
+ (queryParams) => GetSelfApiKeys(queryParams),
12554
+ params,
12555
+ options
12556
+ );
12557
+ };
12558
+
12559
+ // src/queries/self/useGetSelfApiKey.ts
12560
+ var SELF_API_KEY_QUERY_KEY = (apiKeyId) => [
12561
+ ...SELF_API_KEYS_QUERY_KEY(),
12562
+ apiKeyId
12563
+ ];
12564
+ var SET_SELF_API_KEY_QUERY_DATA = (client, keyParams, response) => {
12565
+ client.setQueryData(SELF_API_KEY_QUERY_KEY(...keyParams), response);
12566
+ };
12567
+ var GetSelfApiKey = async ({
12568
+ apiKeyId = "",
12569
+ adminApiParams
12570
+ }) => {
12571
+ const adminApi = await GetAdminAPI(adminApiParams);
12572
+ const { data } = await adminApi.get(`/self/api-keys/${apiKeyId}`);
12573
+ return data;
12574
+ };
12575
+ var useGetSelfApiKey = (apiKeyId = "", options = {}) => {
12576
+ return useConnectedSingleQuery(
12577
+ SELF_API_KEY_QUERY_KEY(apiKeyId),
12578
+ (params) => GetSelfApiKey({ apiKeyId, ...params }),
12579
+ {
12580
+ ...options,
12581
+ enabled: !!apiKeyId && (options?.enabled ?? true)
12582
+ }
12583
+ );
12584
+ };
12585
+
12515
12586
  // src/queries/self/useGetSelfOrgMembership.ts
12516
12587
  var SELF_MEMBERSHIP_QUERY_KEY = () => [
12517
12588
  ...SELF_QUERY_KEY(),
@@ -23214,6 +23285,47 @@ var useUpdateReport = (options = {}) => {
23214
23285
  });
23215
23286
  };
23216
23287
 
23288
+ // src/mutations/self/useCreateSelfApiKey.ts
23289
+ var CreateSelfApiKey = async ({
23290
+ apiKeyData,
23291
+ adminApiParams,
23292
+ queryClient
23293
+ }) => {
23294
+ const adminApi = await GetAdminAPI(adminApiParams);
23295
+ const { data } = await adminApi.post(
23296
+ `/self/api-keys`,
23297
+ apiKeyData
23298
+ );
23299
+ if (queryClient && data.status === "ok") {
23300
+ queryClient.invalidateQueries({ queryKey: SELF_API_KEYS_QUERY_KEY() });
23301
+ SET_SELF_API_KEY_QUERY_DATA(queryClient, [data.data.id], data);
23302
+ }
23303
+ return data;
23304
+ };
23305
+ var useCreateSelfApiKey = (options = {}) => {
23306
+ return useConnectedMutation(CreateSelfApiKey, options);
23307
+ };
23308
+
23309
+ // src/mutations/self/useDeleteSelfApiKey.ts
23310
+ var DeleteSelfApiKey = async ({
23311
+ apiKeyId,
23312
+ adminApiParams,
23313
+ queryClient
23314
+ }) => {
23315
+ const adminApi = await GetAdminAPI(adminApiParams);
23316
+ const { data } = await adminApi.delete(
23317
+ `/self/api-keys/${apiKeyId}`
23318
+ );
23319
+ if (queryClient && data.status === "ok") {
23320
+ queryClient.invalidateQueries({ queryKey: SELF_API_KEYS_QUERY_KEY() });
23321
+ queryClient.removeQueries({ queryKey: SELF_API_KEY_QUERY_KEY(apiKeyId) });
23322
+ }
23323
+ return data;
23324
+ };
23325
+ var useDeleteSelfApiKey = (options = {}) => {
23326
+ return useConnectedMutation(DeleteSelfApiKey, options);
23327
+ };
23328
+
23217
23329
  // src/mutations/self/useDeleteUserImage.ts
23218
23330
  var DeleteUserImage = async ({
23219
23331
  adminApiParams,
@@ -24642,6 +24754,7 @@ var useUpdateVideo = (options = {}) => {
24642
24754
  CreateOrganizationPaymentIntegration,
24643
24755
  CreateOrganizationTeamMember,
24644
24756
  CreateReport,
24757
+ CreateSelfApiKey,
24645
24758
  CreateSeries,
24646
24759
  CreateStreamInput,
24647
24760
  CreateStreamInputOutput,
@@ -24721,6 +24834,7 @@ var useUpdateVideo = (options = {}) => {
24721
24834
  DeleteOrganizationTeamMember,
24722
24835
  DeleteOrganizationUser,
24723
24836
  DeleteReport,
24837
+ DeleteSelfApiKey,
24724
24838
  DeleteSeries,
24725
24839
  DeleteStreamInput,
24726
24840
  DeleteStreamInputOutput,
@@ -25131,6 +25245,8 @@ var useUpdateVideo = (options = {}) => {
25131
25245
  GetReservationSectionTranslations,
25132
25246
  GetReservationSections,
25133
25247
  GetSelf,
25248
+ GetSelfApiKey,
25249
+ GetSelfApiKeys,
25134
25250
  GetSelfOrgMembership,
25135
25251
  GetSelfOrganizations,
25136
25252
  GetSeries,
@@ -25292,6 +25408,8 @@ var useUpdateVideo = (options = {}) => {
25292
25408
  ReportType,
25293
25409
  ResendEventRegistrationConfirmationEmail,
25294
25410
  SEARCH_ORGANIZATION_QUERY_KEY,
25411
+ SELF_API_KEYS_QUERY_KEY,
25412
+ SELF_API_KEY_QUERY_KEY,
25295
25413
  SELF_MEMBERSHIP_QUERY_KEY,
25296
25414
  SELF_ORGANIZATIONS_QUERY_KEY,
25297
25415
  SELF_QUERY_KEY,
@@ -25541,6 +25659,8 @@ var useUpdateVideo = (options = {}) => {
25541
25659
  SET_REPORT_PARENT_QUERY_DATA,
25542
25660
  SET_REPORT_QUERY_DATA,
25543
25661
  SET_SEARCH_ORGANIZATION_QUERY_DATA,
25662
+ SET_SELF_API_KEYS_QUERY_DATA,
25663
+ SET_SELF_API_KEY_QUERY_DATA,
25544
25664
  SET_SELF_MEMBERSHIP_QUERY_DATA,
25545
25665
  SET_SELF_ORGANIZATIONS_QUERY_DATA,
25546
25666
  SET_SELF_QUERY_DATA,
@@ -25844,6 +25964,7 @@ var useUpdateVideo = (options = {}) => {
25844
25964
  useCreateOrganizationPaymentIntegration,
25845
25965
  useCreateOrganizationTeamMember,
25846
25966
  useCreateReport,
25967
+ useCreateSelfApiKey,
25847
25968
  useCreateSeries,
25848
25969
  useCreateStreamInput,
25849
25970
  useCreateStreamInputOutput,
@@ -25920,6 +26041,7 @@ var useUpdateVideo = (options = {}) => {
25920
26041
  useDeleteOrganizationTeamMember,
25921
26042
  useDeleteOrganizationUser,
25922
26043
  useDeleteReport,
26044
+ useDeleteSelfApiKey,
25923
26045
  useDeleteSeries,
25924
26046
  useDeleteStreamInput,
25925
26047
  useDeleteStreamInputOutput,
@@ -26182,6 +26304,8 @@ var useUpdateVideo = (options = {}) => {
26182
26304
  useGetReservationSectionTranslations,
26183
26305
  useGetReservationSections,
26184
26306
  useGetSelf,
26307
+ useGetSelfApiKey,
26308
+ useGetSelfApiKeys,
26185
26309
  useGetSelfOrgMembership,
26186
26310
  useGetSelfOrganizations,
26187
26311
  useGetSeries,
package/dist/index.mjs CHANGED
@@ -10561,6 +10561,65 @@ var useGetSelf = (options = {}) => {
10561
10561
  );
10562
10562
  };
10563
10563
 
10564
+ // src/queries/self/useGetSelfApiKeys.ts
10565
+ var SELF_API_KEYS_QUERY_KEY = () => [...SELF_QUERY_KEY(), "API_KEYS"];
10566
+ var SET_SELF_API_KEYS_QUERY_DATA = (client, response) => {
10567
+ client.setQueryData(SELF_API_KEYS_QUERY_KEY(), response);
10568
+ };
10569
+ var GetSelfApiKeys = async ({
10570
+ pageParam,
10571
+ pageSize,
10572
+ orderBy,
10573
+ search,
10574
+ adminApiParams
10575
+ }) => {
10576
+ const adminApi = await GetAdminAPI(adminApiParams);
10577
+ const { data } = await adminApi.get(`/self/api-keys`, {
10578
+ params: {
10579
+ page: pageParam || void 0,
10580
+ pageSize: pageSize || void 0,
10581
+ orderBy: orderBy || void 0,
10582
+ search: search || void 0
10583
+ }
10584
+ });
10585
+ return data;
10586
+ };
10587
+ var useGetSelfApiKeys = (params = {}, options = {}) => {
10588
+ return useConnectedInfiniteQuery(
10589
+ SELF_API_KEYS_QUERY_KEY(),
10590
+ (queryParams) => GetSelfApiKeys(queryParams),
10591
+ params,
10592
+ options
10593
+ );
10594
+ };
10595
+
10596
+ // src/queries/self/useGetSelfApiKey.ts
10597
+ var SELF_API_KEY_QUERY_KEY = (apiKeyId) => [
10598
+ ...SELF_API_KEYS_QUERY_KEY(),
10599
+ apiKeyId
10600
+ ];
10601
+ var SET_SELF_API_KEY_QUERY_DATA = (client, keyParams, response) => {
10602
+ client.setQueryData(SELF_API_KEY_QUERY_KEY(...keyParams), response);
10603
+ };
10604
+ var GetSelfApiKey = async ({
10605
+ apiKeyId = "",
10606
+ adminApiParams
10607
+ }) => {
10608
+ const adminApi = await GetAdminAPI(adminApiParams);
10609
+ const { data } = await adminApi.get(`/self/api-keys/${apiKeyId}`);
10610
+ return data;
10611
+ };
10612
+ var useGetSelfApiKey = (apiKeyId = "", options = {}) => {
10613
+ return useConnectedSingleQuery(
10614
+ SELF_API_KEY_QUERY_KEY(apiKeyId),
10615
+ (params) => GetSelfApiKey({ apiKeyId, ...params }),
10616
+ {
10617
+ ...options,
10618
+ enabled: !!apiKeyId && (options?.enabled ?? true)
10619
+ }
10620
+ );
10621
+ };
10622
+
10564
10623
  // src/queries/self/useGetSelfOrgMembership.ts
10565
10624
  var SELF_MEMBERSHIP_QUERY_KEY = () => [
10566
10625
  ...SELF_QUERY_KEY(),
@@ -21266,6 +21325,47 @@ var useUpdateReport = (options = {}) => {
21266
21325
  });
21267
21326
  };
21268
21327
 
21328
+ // src/mutations/self/useCreateSelfApiKey.ts
21329
+ var CreateSelfApiKey = async ({
21330
+ apiKeyData,
21331
+ adminApiParams,
21332
+ queryClient
21333
+ }) => {
21334
+ const adminApi = await GetAdminAPI(adminApiParams);
21335
+ const { data } = await adminApi.post(
21336
+ `/self/api-keys`,
21337
+ apiKeyData
21338
+ );
21339
+ if (queryClient && data.status === "ok") {
21340
+ queryClient.invalidateQueries({ queryKey: SELF_API_KEYS_QUERY_KEY() });
21341
+ SET_SELF_API_KEY_QUERY_DATA(queryClient, [data.data.id], data);
21342
+ }
21343
+ return data;
21344
+ };
21345
+ var useCreateSelfApiKey = (options = {}) => {
21346
+ return useConnectedMutation(CreateSelfApiKey, options);
21347
+ };
21348
+
21349
+ // src/mutations/self/useDeleteSelfApiKey.ts
21350
+ var DeleteSelfApiKey = async ({
21351
+ apiKeyId,
21352
+ adminApiParams,
21353
+ queryClient
21354
+ }) => {
21355
+ const adminApi = await GetAdminAPI(adminApiParams);
21356
+ const { data } = await adminApi.delete(
21357
+ `/self/api-keys/${apiKeyId}`
21358
+ );
21359
+ if (queryClient && data.status === "ok") {
21360
+ queryClient.invalidateQueries({ queryKey: SELF_API_KEYS_QUERY_KEY() });
21361
+ queryClient.removeQueries({ queryKey: SELF_API_KEY_QUERY_KEY(apiKeyId) });
21362
+ }
21363
+ return data;
21364
+ };
21365
+ var useDeleteSelfApiKey = (options = {}) => {
21366
+ return useConnectedMutation(DeleteSelfApiKey, options);
21367
+ };
21368
+
21269
21369
  // src/mutations/self/useDeleteUserImage.ts
21270
21370
  var DeleteUserImage = async ({
21271
21371
  adminApiParams,
@@ -22693,6 +22793,7 @@ export {
22693
22793
  CreateOrganizationPaymentIntegration,
22694
22794
  CreateOrganizationTeamMember,
22695
22795
  CreateReport,
22796
+ CreateSelfApiKey,
22696
22797
  CreateSeries,
22697
22798
  CreateStreamInput,
22698
22799
  CreateStreamInputOutput,
@@ -22772,6 +22873,7 @@ export {
22772
22873
  DeleteOrganizationTeamMember,
22773
22874
  DeleteOrganizationUser,
22774
22875
  DeleteReport,
22876
+ DeleteSelfApiKey,
22775
22877
  DeleteSeries,
22776
22878
  DeleteStreamInput,
22777
22879
  DeleteStreamInputOutput,
@@ -23182,6 +23284,8 @@ export {
23182
23284
  GetReservationSectionTranslations,
23183
23285
  GetReservationSections,
23184
23286
  GetSelf,
23287
+ GetSelfApiKey,
23288
+ GetSelfApiKeys,
23185
23289
  GetSelfOrgMembership,
23186
23290
  GetSelfOrganizations,
23187
23291
  GetSeries,
@@ -23343,6 +23447,8 @@ export {
23343
23447
  ReportType,
23344
23448
  ResendEventRegistrationConfirmationEmail,
23345
23449
  SEARCH_ORGANIZATION_QUERY_KEY,
23450
+ SELF_API_KEYS_QUERY_KEY,
23451
+ SELF_API_KEY_QUERY_KEY,
23346
23452
  SELF_MEMBERSHIP_QUERY_KEY,
23347
23453
  SELF_ORGANIZATIONS_QUERY_KEY,
23348
23454
  SELF_QUERY_KEY,
@@ -23592,6 +23698,8 @@ export {
23592
23698
  SET_REPORT_PARENT_QUERY_DATA,
23593
23699
  SET_REPORT_QUERY_DATA,
23594
23700
  SET_SEARCH_ORGANIZATION_QUERY_DATA,
23701
+ SET_SELF_API_KEYS_QUERY_DATA,
23702
+ SET_SELF_API_KEY_QUERY_DATA,
23595
23703
  SET_SELF_MEMBERSHIP_QUERY_DATA,
23596
23704
  SET_SELF_ORGANIZATIONS_QUERY_DATA,
23597
23705
  SET_SELF_QUERY_DATA,
@@ -23895,6 +24003,7 @@ export {
23895
24003
  useCreateOrganizationPaymentIntegration,
23896
24004
  useCreateOrganizationTeamMember,
23897
24005
  useCreateReport,
24006
+ useCreateSelfApiKey,
23898
24007
  useCreateSeries,
23899
24008
  useCreateStreamInput,
23900
24009
  useCreateStreamInputOutput,
@@ -23971,6 +24080,7 @@ export {
23971
24080
  useDeleteOrganizationTeamMember,
23972
24081
  useDeleteOrganizationUser,
23973
24082
  useDeleteReport,
24083
+ useDeleteSelfApiKey,
23974
24084
  useDeleteSeries,
23975
24085
  useDeleteStreamInput,
23976
24086
  useDeleteStreamInputOutput,
@@ -24233,6 +24343,8 @@ export {
24233
24343
  useGetReservationSectionTranslations,
24234
24344
  useGetReservationSections,
24235
24345
  useGetSelf,
24346
+ useGetSelfApiKey,
24347
+ useGetSelfApiKeys,
24236
24348
  useGetSelfOrgMembership,
24237
24349
  useGetSelfOrganizations,
24238
24350
  useGetSeries,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@connectedxm/admin",
3
- "version": "0.0.49",
3
+ "version": "0.0.50",
4
4
  "description": "Admin API javascript SDK",
5
5
  "author": "ConnectedXM Inc.",
6
6
  "repository": {