@connectedxm/admin 2.7.6 → 2.8.1

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
@@ -303,6 +303,7 @@ __export(index_exports, {
303
303
  CreateOrganizationPaymentIntegration: () => CreateOrganizationPaymentIntegration,
304
304
  CreateOrganizationSideEffect: () => CreateOrganizationSideEffect,
305
305
  CreateOrganizationTeamMember: () => CreateOrganizationTeamMember,
306
+ CreateOrganizationWebhook: () => CreateOrganizationWebhook,
306
307
  CreateSelfApiKey: () => CreateSelfApiKey,
307
308
  CreateSeries: () => CreateSeries,
308
309
  CreateStreamInput: () => CreateStreamInput,
@@ -451,6 +452,7 @@ __export(index_exports, {
451
452
  DeleteOrganizationSideEffect: () => DeleteOrganizationSideEffect,
452
453
  DeleteOrganizationTeamMember: () => DeleteOrganizationTeamMember,
453
454
  DeleteOrganizationUser: () => DeleteOrganizationUser,
455
+ DeleteOrganizationWebhook: () => DeleteOrganizationWebhook,
454
456
  DeleteSelfApiKey: () => DeleteSelfApiKey,
455
457
  DeleteSeries: () => DeleteSeries,
456
458
  DeleteStreamInput: () => DeleteStreamInput,
@@ -1059,6 +1061,8 @@ __export(index_exports, {
1059
1061
  GetOrganizationTeamMembers: () => GetOrganizationTeamMembers,
1060
1062
  GetOrganizationTrigger: () => GetOrganizationTrigger,
1061
1063
  GetOrganizationUsers: () => GetOrganizationUsers,
1064
+ GetOrganizationWebhook: () => GetOrganizationWebhook,
1065
+ GetOrganizationWebhooks: () => GetOrganizationWebhooks,
1062
1066
  GetPayment: () => GetPayment,
1063
1067
  GetPayments: () => GetPayments,
1064
1068
  GetReport: () => GetReport,
@@ -1205,6 +1209,8 @@ __export(index_exports, {
1205
1209
  ORGANIZATION_TEAM_MEMBER_QUERY_KEY: () => ORGANIZATION_TEAM_MEMBER_QUERY_KEY,
1206
1210
  ORGANIZATION_TRIGGER_QUERY_KEY: () => ORGANIZATION_TRIGGER_QUERY_KEY,
1207
1211
  ORGANIZATION_USERS_QUERY_KEY: () => ORGANIZATION_USERS_QUERY_KEY,
1212
+ ORGANIZATION_WEBHOOKS_QUERY_KEY: () => ORGANIZATION_WEBHOOKS_QUERY_KEY,
1213
+ ORGANIZATION_WEBHOOK_QUERY_KEY: () => ORGANIZATION_WEBHOOK_QUERY_KEY,
1208
1214
  OrganizationActionType: () => OrganizationActionType,
1209
1215
  OrganizationModuleType: () => OrganizationModuleType,
1210
1216
  OrganizationTriggerType: () => OrganizationTriggerType,
@@ -1651,6 +1657,8 @@ __export(index_exports, {
1651
1657
  SET_ORGANIZATION_TEAM_MEMBER_QUERY_DATA: () => SET_ORGANIZATION_TEAM_MEMBER_QUERY_DATA,
1652
1658
  SET_ORGANIZATION_TRIGGER_QUERY_DATA: () => SET_ORGANIZATION_TRIGGER_QUERY_DATA,
1653
1659
  SET_ORGANIZATION_USERS_QUERY_DATA: () => SET_ORGANIZATION_USERS_QUERY_DATA,
1660
+ SET_ORGANIZATION_WEBHOOKS_QUERY_DATA: () => SET_ORGANIZATION_WEBHOOKS_QUERY_DATA,
1661
+ SET_ORGANIZATION_WEBHOOK_QUERY_DATA: () => SET_ORGANIZATION_WEBHOOK_QUERY_DATA,
1654
1662
  SET_PASS_TYPE_COUPONS_QUERY_DATA: () => SET_PASS_TYPE_COUPONS_QUERY_DATA,
1655
1663
  SET_PAYMENTS_QUERY_DATA: () => SET_PAYMENTS_QUERY_DATA,
1656
1664
  SET_PAYMENT_QUERY_DATA: () => SET_PAYMENT_QUERY_DATA,
@@ -1932,6 +1940,7 @@ __export(index_exports, {
1932
1940
  UpdateOrganizationPageTranslation: () => UpdateOrganizationPageTranslation,
1933
1941
  UpdateOrganizationTeamMember: () => UpdateOrganizationTeamMember,
1934
1942
  UpdateOrganizationTrigger: () => UpdateOrganizationTrigger,
1943
+ UpdateOrganizationWebhook: () => UpdateOrganizationWebhook,
1935
1944
  UpdatePayment: () => UpdatePayment,
1936
1945
  UpdateSelf: () => UpdateSelf,
1937
1946
  UpdateSeries: () => UpdateSeries,
@@ -1964,6 +1973,7 @@ __export(index_exports, {
1964
1973
  UserRole: () => UserRole,
1965
1974
  VIDEOS_QUERY_KEY: () => VIDEOS_QUERY_KEY,
1966
1975
  VIDEO_QUERY_KEY: () => VIDEO_QUERY_KEY,
1976
+ VerifyOrganizationWebhook: () => VerifyOrganizationWebhook,
1967
1977
  VideoSource: () => VideoSource,
1968
1978
  VideoStatus: () => VideoStatus,
1969
1979
  WidgetCategory: () => WidgetCategory,
@@ -2139,6 +2149,7 @@ __export(index_exports, {
2139
2149
  useCreateOrganizationPaymentIntegration: () => useCreateOrganizationPaymentIntegration,
2140
2150
  useCreateOrganizationSideEffect: () => useCreateOrganizationSideEffect,
2141
2151
  useCreateOrganizationTeamMember: () => useCreateOrganizationTeamMember,
2152
+ useCreateOrganizationWebhook: () => useCreateOrganizationWebhook,
2142
2153
  useCreateSelfApiKey: () => useCreateSelfApiKey,
2143
2154
  useCreateSeries: () => useCreateSeries,
2144
2155
  useCreateStreamInput: () => useCreateStreamInput,
@@ -2279,6 +2290,7 @@ __export(index_exports, {
2279
2290
  useDeleteOrganizationSideEffect: () => useDeleteOrganizationSideEffect,
2280
2291
  useDeleteOrganizationTeamMember: () => useDeleteOrganizationTeamMember,
2281
2292
  useDeleteOrganizationUser: () => useDeleteOrganizationUser,
2293
+ useDeleteOrganizationWebhook: () => useDeleteOrganizationWebhook,
2282
2294
  useDeleteSelfApiKey: () => useDeleteSelfApiKey,
2283
2295
  useDeleteSeries: () => useDeleteSeries,
2284
2296
  useDeleteStreamInput: () => useDeleteStreamInput,
@@ -2669,6 +2681,8 @@ __export(index_exports, {
2669
2681
  useGetOrganizationTeamMembers: () => useGetOrganizationTeamMembers,
2670
2682
  useGetOrganizationTrigger: () => useGetOrganizationTrigger,
2671
2683
  useGetOrganizationUsers: () => useGetOrganizationUsers,
2684
+ useGetOrganizationWebhook: () => useGetOrganizationWebhook,
2685
+ useGetOrganizationWebhooks: () => useGetOrganizationWebhooks,
2672
2686
  useGetPayment: () => useGetPayment,
2673
2687
  useGetPayments: () => useGetPayments,
2674
2688
  useGetReport: () => useGetReport,
@@ -2947,6 +2961,7 @@ __export(index_exports, {
2947
2961
  useUpdateOrganizationPageTranslation: () => useUpdateOrganizationPageTranslation,
2948
2962
  useUpdateOrganizationTeamMember: () => useUpdateOrganizationTeamMember,
2949
2963
  useUpdateOrganizationTrigger: () => useUpdateOrganizationTrigger,
2964
+ useUpdateOrganizationWebhook: () => useUpdateOrganizationWebhook,
2950
2965
  useUpdatePayment: () => useUpdatePayment,
2951
2966
  useUpdateSelf: () => useUpdateSelf,
2952
2967
  useUpdateSeries: () => useUpdateSeries,
@@ -2975,7 +2990,8 @@ __export(index_exports, {
2975
2990
  useUpdateTier: () => useUpdateTier,
2976
2991
  useUpdateUserImage: () => useUpdateUserImage,
2977
2992
  useUpdateVideo: () => useUpdateVideo,
2978
- useUploadFile: () => useUploadFile
2993
+ useUploadFile: () => useUploadFile,
2994
+ useVerifyOrganizationWebhook: () => useVerifyOrganizationWebhook
2979
2995
  });
2980
2996
  module.exports = __toCommonJS(index_exports);
2981
2997
 
@@ -15773,12 +15789,14 @@ var MatchQuestionType = /* @__PURE__ */ ((MatchQuestionType2) => {
15773
15789
  })(MatchQuestionType || {});
15774
15790
  var SideEffectTriggerType = /* @__PURE__ */ ((SideEffectTriggerType2) => {
15775
15791
  SideEffectTriggerType2["NEW_PASS_OF_PASS_TYPE"] = "NEW_PASS_OF_PASS_TYPE";
15792
+ SideEffectTriggerType2["CHECKED_IN_EVENT_PASS"] = "CHECKED_IN_EVENT_PASS";
15776
15793
  return SideEffectTriggerType2;
15777
15794
  })(SideEffectTriggerType || {});
15778
15795
  var SideEffectActionType = /* @__PURE__ */ ((SideEffectActionType2) => {
15779
15796
  SideEffectActionType2["JOIN_GROUP"] = "JOIN_GROUP";
15780
15797
  SideEffectActionType2["ADD_TO_TIER"] = "ADD_TO_TIER";
15781
15798
  SideEffectActionType2["SUBSCRIBE_TO_CHANNEL"] = "SUBSCRIBE_TO_CHANNEL";
15799
+ SideEffectActionType2["SEND_WEBHOOK"] = "SEND_WEBHOOK";
15782
15800
  return SideEffectActionType2;
15783
15801
  })(SideEffectActionType || {});
15784
15802
  var SystemEventLogStatus = /* @__PURE__ */ ((SystemEventLogStatus2) => {
@@ -18396,6 +18414,70 @@ var useGetOrganizationUsers = (params = {}, options = {}) => {
18396
18414
  );
18397
18415
  };
18398
18416
 
18417
+ // src/queries/organization/useGetOrganizationWebhooks.ts
18418
+ var ORGANIZATION_WEBHOOKS_QUERY_KEY = () => [
18419
+ ...ORGANIZATION_QUERY_KEY(),
18420
+ "WEBHOOKS"
18421
+ ];
18422
+ var SET_ORGANIZATION_WEBHOOKS_QUERY_DATA = (client, keyParams, response) => {
18423
+ client.setQueryData(ORGANIZATION_WEBHOOKS_QUERY_KEY(...keyParams), response);
18424
+ };
18425
+ var GetOrganizationWebhooks = async ({
18426
+ pageParam,
18427
+ pageSize,
18428
+ orderBy,
18429
+ search,
18430
+ adminApiParams
18431
+ }) => {
18432
+ const adminApi = await GetAdminAPI(adminApiParams);
18433
+ const { data } = await adminApi.get(`/organization/webhooks`, {
18434
+ params: {
18435
+ page: pageParam || void 0,
18436
+ pageSize: pageSize || void 0,
18437
+ orderBy: orderBy || void 0,
18438
+ search: search || void 0
18439
+ }
18440
+ });
18441
+ return data;
18442
+ };
18443
+ var useGetOrganizationWebhooks = (params = {}, options = {}) => {
18444
+ return useConnectedInfiniteQuery(
18445
+ ORGANIZATION_WEBHOOKS_QUERY_KEY(),
18446
+ (params2) => GetOrganizationWebhooks(params2),
18447
+ params,
18448
+ options,
18449
+ "org"
18450
+ );
18451
+ };
18452
+
18453
+ // src/queries/organization/useGetOrganizationWebhook.ts
18454
+ var ORGANIZATION_WEBHOOK_QUERY_KEY = (webhookId) => [
18455
+ ...ORGANIZATION_WEBHOOKS_QUERY_KEY(),
18456
+ webhookId
18457
+ ];
18458
+ var SET_ORGANIZATION_WEBHOOK_QUERY_DATA = (client, keyParams, response) => {
18459
+ client.setQueryData(ORGANIZATION_WEBHOOK_QUERY_KEY(...keyParams), response);
18460
+ };
18461
+ var GetOrganizationWebhook = async ({
18462
+ webhookId,
18463
+ adminApiParams
18464
+ }) => {
18465
+ const adminApi = await GetAdminAPI(adminApiParams);
18466
+ const { data } = await adminApi.get(`/organization/webhooks/${webhookId}`);
18467
+ return data;
18468
+ };
18469
+ var useGetOrganizationWebhook = (webhookId = "", options = {}) => {
18470
+ return useConnectedSingleQuery(
18471
+ ORGANIZATION_WEBHOOK_QUERY_KEY(webhookId),
18472
+ (params) => GetOrganizationWebhook({ ...params, webhookId }),
18473
+ {
18474
+ ...options,
18475
+ enabled: !!webhookId && (options.enabled ?? true)
18476
+ },
18477
+ "org"
18478
+ );
18479
+ };
18480
+
18399
18481
  // src/queries/organization/useSearchOrganization.ts
18400
18482
  var SEARCH_ORGANIZATION_QUERY_KEY = (search, filters) => [
18401
18483
  "SEARCH_ORGANIZATION",
@@ -35202,6 +35284,32 @@ var useCreateOrganizationTeamMember = (options = {}) => {
35202
35284
  });
35203
35285
  };
35204
35286
 
35287
+ // src/mutations/organization/useCreateOrganizationWebhook.ts
35288
+ var CreateOrganizationWebhook = async ({
35289
+ webhook,
35290
+ adminApiParams,
35291
+ queryClient
35292
+ }) => {
35293
+ const connectedXM = await GetAdminAPI(adminApiParams);
35294
+ const { data } = await connectedXM.post(
35295
+ `/organization/webhooks`,
35296
+ webhook
35297
+ );
35298
+ if (queryClient && data.status === "ok") {
35299
+ queryClient.invalidateQueries({
35300
+ queryKey: ORGANIZATION_WEBHOOKS_QUERY_KEY()
35301
+ });
35302
+ SET_ORGANIZATION_WEBHOOK_QUERY_DATA(queryClient, [data.data.id], data);
35303
+ }
35304
+ return data;
35305
+ };
35306
+ var useCreateOrganizationWebhook = (options = {}) => {
35307
+ return useConnectedMutation(CreateOrganizationWebhook, options, {
35308
+ domain: "org",
35309
+ type: "update"
35310
+ });
35311
+ };
35312
+
35205
35313
  // src/mutations/organization/useDeleteOrganizationDomain.ts
35206
35314
  var DeleteOrganizationDomain = async ({
35207
35315
  adminApiParams,
@@ -35272,6 +35380,33 @@ var useDeleteOrganizationUser = (options = {}) => {
35272
35380
  });
35273
35381
  };
35274
35382
 
35383
+ // src/mutations/organization/useDeleteOrganizationWebhook.ts
35384
+ var DeleteOrganizationWebhook = async ({
35385
+ webhookId,
35386
+ adminApiParams,
35387
+ queryClient
35388
+ }) => {
35389
+ const connectedXM = await GetAdminAPI(adminApiParams);
35390
+ const { data } = await connectedXM.delete(
35391
+ `/organization/webhooks/${webhookId}`
35392
+ );
35393
+ if (queryClient && data.status === "ok") {
35394
+ queryClient.invalidateQueries({
35395
+ queryKey: ORGANIZATION_WEBHOOKS_QUERY_KEY()
35396
+ });
35397
+ queryClient.removeQueries({
35398
+ queryKey: ORGANIZATION_WEBHOOK_QUERY_KEY(webhookId)
35399
+ });
35400
+ }
35401
+ return data;
35402
+ };
35403
+ var useDeleteOrganizationWebhook = (options = {}) => {
35404
+ return useConnectedMutation(DeleteOrganizationWebhook, options, {
35405
+ domain: "org",
35406
+ type: "update"
35407
+ });
35408
+ };
35409
+
35275
35410
  // src/mutations/organization/useRefundOrganizationPayment.ts
35276
35411
  var RefundOrganizationPayment = async ({
35277
35412
  paymentId,
@@ -35455,6 +35590,58 @@ var useUpdateOrganizationTeamMember = (options = {}) => {
35455
35590
  });
35456
35591
  };
35457
35592
 
35593
+ // src/mutations/organization/useUpdateOrganizationWebhook.ts
35594
+ var UpdateOrganizationWebhook = async ({
35595
+ webhookId,
35596
+ webhook,
35597
+ adminApiParams,
35598
+ queryClient
35599
+ }) => {
35600
+ const connectedXM = await GetAdminAPI(adminApiParams);
35601
+ const { data } = await connectedXM.put(
35602
+ `/organization/webhooks/${webhookId}`,
35603
+ webhook
35604
+ );
35605
+ if (queryClient && data.status === "ok") {
35606
+ queryClient.invalidateQueries({
35607
+ queryKey: ORGANIZATION_WEBHOOKS_QUERY_KEY()
35608
+ });
35609
+ SET_ORGANIZATION_WEBHOOK_QUERY_DATA(queryClient, [webhookId], data);
35610
+ }
35611
+ return data;
35612
+ };
35613
+ var useUpdateOrganizationWebhook = (options = {}) => {
35614
+ return useConnectedMutation(UpdateOrganizationWebhook, options, {
35615
+ domain: "org",
35616
+ type: "update"
35617
+ });
35618
+ };
35619
+
35620
+ // src/mutations/organization/useVerifyOrganizationWebhook.ts
35621
+ var VerifyOrganizationWebhook = async ({
35622
+ webhookId,
35623
+ adminApiParams,
35624
+ queryClient
35625
+ }) => {
35626
+ const connectedXM = await GetAdminAPI(adminApiParams);
35627
+ const { data } = await connectedXM.post(
35628
+ `/organization/webhooks/${webhookId}/verify`
35629
+ );
35630
+ if (queryClient && data.status === "ok") {
35631
+ queryClient.invalidateQueries({
35632
+ queryKey: ORGANIZATION_WEBHOOKS_QUERY_KEY()
35633
+ });
35634
+ SET_ORGANIZATION_WEBHOOK_QUERY_DATA(queryClient, [webhookId], data);
35635
+ }
35636
+ return data;
35637
+ };
35638
+ var useVerifyOrganizationWebhook = (options = {}) => {
35639
+ return useConnectedMutation(VerifyOrganizationWebhook, options, {
35640
+ domain: "org",
35641
+ type: "update"
35642
+ });
35643
+ };
35644
+
35458
35645
  // src/mutations/payments/useUpdatePayment.ts
35459
35646
  var UpdatePayment = async ({
35460
35647
  paymentId,
@@ -38542,6 +38729,7 @@ var useUpdateVideo = (options = {}) => {
38542
38729
  CreateOrganizationPaymentIntegration,
38543
38730
  CreateOrganizationSideEffect,
38544
38731
  CreateOrganizationTeamMember,
38732
+ CreateOrganizationWebhook,
38545
38733
  CreateSelfApiKey,
38546
38734
  CreateSeries,
38547
38735
  CreateStreamInput,
@@ -38690,6 +38878,7 @@ var useUpdateVideo = (options = {}) => {
38690
38878
  DeleteOrganizationSideEffect,
38691
38879
  DeleteOrganizationTeamMember,
38692
38880
  DeleteOrganizationUser,
38881
+ DeleteOrganizationWebhook,
38693
38882
  DeleteSelfApiKey,
38694
38883
  DeleteSeries,
38695
38884
  DeleteStreamInput,
@@ -39298,6 +39487,8 @@ var useUpdateVideo = (options = {}) => {
39298
39487
  GetOrganizationTeamMembers,
39299
39488
  GetOrganizationTrigger,
39300
39489
  GetOrganizationUsers,
39490
+ GetOrganizationWebhook,
39491
+ GetOrganizationWebhooks,
39301
39492
  GetPayment,
39302
39493
  GetPayments,
39303
39494
  GetReport,
@@ -39444,6 +39635,8 @@ var useUpdateVideo = (options = {}) => {
39444
39635
  ORGANIZATION_TEAM_MEMBER_QUERY_KEY,
39445
39636
  ORGANIZATION_TRIGGER_QUERY_KEY,
39446
39637
  ORGANIZATION_USERS_QUERY_KEY,
39638
+ ORGANIZATION_WEBHOOKS_QUERY_KEY,
39639
+ ORGANIZATION_WEBHOOK_QUERY_KEY,
39447
39640
  OrganizationActionType,
39448
39641
  OrganizationModuleType,
39449
39642
  OrganizationTriggerType,
@@ -39890,6 +40083,8 @@ var useUpdateVideo = (options = {}) => {
39890
40083
  SET_ORGANIZATION_TEAM_MEMBER_QUERY_DATA,
39891
40084
  SET_ORGANIZATION_TRIGGER_QUERY_DATA,
39892
40085
  SET_ORGANIZATION_USERS_QUERY_DATA,
40086
+ SET_ORGANIZATION_WEBHOOKS_QUERY_DATA,
40087
+ SET_ORGANIZATION_WEBHOOK_QUERY_DATA,
39893
40088
  SET_PASS_TYPE_COUPONS_QUERY_DATA,
39894
40089
  SET_PAYMENTS_QUERY_DATA,
39895
40090
  SET_PAYMENT_QUERY_DATA,
@@ -40171,6 +40366,7 @@ var useUpdateVideo = (options = {}) => {
40171
40366
  UpdateOrganizationPageTranslation,
40172
40367
  UpdateOrganizationTeamMember,
40173
40368
  UpdateOrganizationTrigger,
40369
+ UpdateOrganizationWebhook,
40174
40370
  UpdatePayment,
40175
40371
  UpdateSelf,
40176
40372
  UpdateSeries,
@@ -40203,6 +40399,7 @@ var useUpdateVideo = (options = {}) => {
40203
40399
  UserRole,
40204
40400
  VIDEOS_QUERY_KEY,
40205
40401
  VIDEO_QUERY_KEY,
40402
+ VerifyOrganizationWebhook,
40206
40403
  VideoSource,
40207
40404
  VideoStatus,
40208
40405
  WidgetCategory,
@@ -40378,6 +40575,7 @@ var useUpdateVideo = (options = {}) => {
40378
40575
  useCreateOrganizationPaymentIntegration,
40379
40576
  useCreateOrganizationSideEffect,
40380
40577
  useCreateOrganizationTeamMember,
40578
+ useCreateOrganizationWebhook,
40381
40579
  useCreateSelfApiKey,
40382
40580
  useCreateSeries,
40383
40581
  useCreateStreamInput,
@@ -40518,6 +40716,7 @@ var useUpdateVideo = (options = {}) => {
40518
40716
  useDeleteOrganizationSideEffect,
40519
40717
  useDeleteOrganizationTeamMember,
40520
40718
  useDeleteOrganizationUser,
40719
+ useDeleteOrganizationWebhook,
40521
40720
  useDeleteSelfApiKey,
40522
40721
  useDeleteSeries,
40523
40722
  useDeleteStreamInput,
@@ -40908,6 +41107,8 @@ var useUpdateVideo = (options = {}) => {
40908
41107
  useGetOrganizationTeamMembers,
40909
41108
  useGetOrganizationTrigger,
40910
41109
  useGetOrganizationUsers,
41110
+ useGetOrganizationWebhook,
41111
+ useGetOrganizationWebhooks,
40911
41112
  useGetPayment,
40912
41113
  useGetPayments,
40913
41114
  useGetReport,
@@ -41186,6 +41387,7 @@ var useUpdateVideo = (options = {}) => {
41186
41387
  useUpdateOrganizationPageTranslation,
41187
41388
  useUpdateOrganizationTeamMember,
41188
41389
  useUpdateOrganizationTrigger,
41390
+ useUpdateOrganizationWebhook,
41189
41391
  useUpdatePayment,
41190
41392
  useUpdateSelf,
41191
41393
  useUpdateSeries,
@@ -41214,5 +41416,6 @@ var useUpdateVideo = (options = {}) => {
41214
41416
  useUpdateTier,
41215
41417
  useUpdateUserImage,
41216
41418
  useUpdateVideo,
41217
- useUploadFile
41419
+ useUploadFile,
41420
+ useVerifyOrganizationWebhook
41218
41421
  });