@outseta/react 0.4.33 → 0.4.35

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
@@ -1909,6 +1909,97 @@ var useRegistrationRegisterAccount = (options) => {
1909
1909
  const mutationOptions = getRegistrationRegisterAccountMutationOptions(options);
1910
1910
  return useMutation(mutationOptions);
1911
1911
  };
1912
+ var segmentAddTagToEntity = (entityUid, segmentAddTagToEntityBody, options, signal) => {
1913
+ return customFetch2({
1914
+ url: `/api/v1/crm/segments/${entityUid}/tags`,
1915
+ method: "POST",
1916
+ headers: { "Content-Type": "application/json" },
1917
+ data: segmentAddTagToEntityBody,
1918
+ responseType: "blob",
1919
+ signal
1920
+ }, options);
1921
+ };
1922
+ var getSegmentAddTagToEntityMutationOptions = (options) => {
1923
+ const mutationKey = ["segmentAddTagToEntity"];
1924
+ const { mutation: mutationOptions, request: requestOptions } = options ? options.mutation && "mutationKey" in options.mutation && options.mutation.mutationKey ? options : { ...options, mutation: { ...options.mutation, mutationKey } } : { mutation: { mutationKey }, request: undefined };
1925
+ const mutationFn = (props) => {
1926
+ const { entityUid, data } = props ?? {};
1927
+ return segmentAddTagToEntity(entityUid, data, requestOptions);
1928
+ };
1929
+ return { mutationFn, ...mutationOptions };
1930
+ };
1931
+ var useSegmentAddTagToEntity = (options) => {
1932
+ const mutationOptions = getSegmentAddTagToEntityMutationOptions(options);
1933
+ return useMutation(mutationOptions);
1934
+ };
1935
+ var segmentGetTagsForEntity = (entityUid, params, options, signal) => {
1936
+ return customFetch2({
1937
+ url: `/api/v1/crm/segments/${entityUid}/tags`,
1938
+ method: "GET",
1939
+ params,
1940
+ signal
1941
+ }, options);
1942
+ };
1943
+ var getSegmentGetTagsForEntityQueryKey = (entityUid, params) => {
1944
+ return [
1945
+ `/api/v1/crm/segments/${entityUid}/tags`,
1946
+ ...params ? [params] : []
1947
+ ];
1948
+ };
1949
+ var getSegmentGetTagsForEntityQueryOptions = (entityUid, params, options) => {
1950
+ const { query: queryOptions, request: requestOptions } = options ?? {};
1951
+ const queryKey = queryOptions?.queryKey ?? getSegmentGetTagsForEntityQueryKey(entityUid, params);
1952
+ const queryFn = ({ signal }) => segmentGetTagsForEntity(entityUid, params, requestOptions, signal);
1953
+ return { queryKey, queryFn, enabled: !!entityUid, ...queryOptions };
1954
+ };
1955
+ function useSegmentGetTagsForEntity(entityUid, params, options) {
1956
+ const queryOptions = getSegmentGetTagsForEntityQueryOptions(entityUid, params, options);
1957
+ const query = useQuery(queryOptions);
1958
+ query.queryKey = queryOptions.queryKey;
1959
+ return query;
1960
+ }
1961
+ var segmentSetTagsForEntity = (entityUid, segmentSetTagsForEntityBody, options) => {
1962
+ return customFetch2({
1963
+ url: `/api/v1/crm/segments/${entityUid}/tags`,
1964
+ method: "PUT",
1965
+ headers: { "Content-Type": "application/json" },
1966
+ data: segmentSetTagsForEntityBody,
1967
+ responseType: "blob"
1968
+ }, options);
1969
+ };
1970
+ var getSegmentSetTagsForEntityMutationOptions = (options) => {
1971
+ const mutationKey = ["segmentSetTagsForEntity"];
1972
+ const { mutation: mutationOptions, request: requestOptions } = options ? options.mutation && "mutationKey" in options.mutation && options.mutation.mutationKey ? options : { ...options, mutation: { ...options.mutation, mutationKey } } : { mutation: { mutationKey }, request: undefined };
1973
+ const mutationFn = (props) => {
1974
+ const { entityUid, data } = props ?? {};
1975
+ return segmentSetTagsForEntity(entityUid, data, requestOptions);
1976
+ };
1977
+ return { mutationFn, ...mutationOptions };
1978
+ };
1979
+ var useSegmentSetTagsForEntity = (options) => {
1980
+ const mutationOptions = getSegmentSetTagsForEntityMutationOptions(options);
1981
+ return useMutation(mutationOptions);
1982
+ };
1983
+ var segmentRemoveTagFromEntity = (entityUid, tagUid, options) => {
1984
+ return customFetch2({
1985
+ url: `/api/v1/crm/segments/${entityUid}/tags/${tagUid}`,
1986
+ method: "DELETE",
1987
+ responseType: "blob"
1988
+ }, options);
1989
+ };
1990
+ var getSegmentRemoveTagFromEntityMutationOptions = (options) => {
1991
+ const mutationKey = ["segmentRemoveTagFromEntity"];
1992
+ const { mutation: mutationOptions, request: requestOptions } = options ? options.mutation && "mutationKey" in options.mutation && options.mutation.mutationKey ? options : { ...options, mutation: { ...options.mutation, mutationKey } } : { mutation: { mutationKey }, request: undefined };
1993
+ const mutationFn = (props) => {
1994
+ const { entityUid, tagUid } = props ?? {};
1995
+ return segmentRemoveTagFromEntity(entityUid, tagUid, requestOptions);
1996
+ };
1997
+ return { mutationFn, ...mutationOptions };
1998
+ };
1999
+ var useSegmentRemoveTagFromEntity = (options) => {
2000
+ const mutationOptions = getSegmentRemoveTagFromEntityMutationOptions(options);
2001
+ return useMutation(mutationOptions);
2002
+ };
1912
2003
  var accountGetAllAccounts = (params, options, signal) => {
1913
2004
  return customFetch2({
1914
2005
  url: `/api/v1/crm/accounts`,
@@ -2774,6 +2865,97 @@ var useCampaignSendTestCampaignEmail = (options) => {
2774
2865
  const mutationOptions = getCampaignSendTestCampaignEmailMutationOptions(options);
2775
2866
  return useMutation(mutationOptions);
2776
2867
  };
2868
+ var campaignAddTagToEntity = (entityUid, campaignAddTagToEntityBody, options, signal) => {
2869
+ return customFetch2({
2870
+ url: `/api/v1/email/campaigns/broadcasts/${entityUid}/tags`,
2871
+ method: "POST",
2872
+ headers: { "Content-Type": "application/json" },
2873
+ data: campaignAddTagToEntityBody,
2874
+ responseType: "blob",
2875
+ signal
2876
+ }, options);
2877
+ };
2878
+ var getCampaignAddTagToEntityMutationOptions = (options) => {
2879
+ const mutationKey = ["campaignAddTagToEntity"];
2880
+ const { mutation: mutationOptions, request: requestOptions } = options ? options.mutation && "mutationKey" in options.mutation && options.mutation.mutationKey ? options : { ...options, mutation: { ...options.mutation, mutationKey } } : { mutation: { mutationKey }, request: undefined };
2881
+ const mutationFn = (props) => {
2882
+ const { entityUid, data } = props ?? {};
2883
+ return campaignAddTagToEntity(entityUid, data, requestOptions);
2884
+ };
2885
+ return { mutationFn, ...mutationOptions };
2886
+ };
2887
+ var useCampaignAddTagToEntity = (options) => {
2888
+ const mutationOptions = getCampaignAddTagToEntityMutationOptions(options);
2889
+ return useMutation(mutationOptions);
2890
+ };
2891
+ var campaignGetTagsForEntity = (entityUid, params, options, signal) => {
2892
+ return customFetch2({
2893
+ url: `/api/v1/email/campaigns/broadcasts/${entityUid}/tags`,
2894
+ method: "GET",
2895
+ params,
2896
+ signal
2897
+ }, options);
2898
+ };
2899
+ var getCampaignGetTagsForEntityQueryKey = (entityUid, params) => {
2900
+ return [
2901
+ `/api/v1/email/campaigns/broadcasts/${entityUid}/tags`,
2902
+ ...params ? [params] : []
2903
+ ];
2904
+ };
2905
+ var getCampaignGetTagsForEntityQueryOptions = (entityUid, params, options) => {
2906
+ const { query: queryOptions, request: requestOptions } = options ?? {};
2907
+ const queryKey = queryOptions?.queryKey ?? getCampaignGetTagsForEntityQueryKey(entityUid, params);
2908
+ const queryFn = ({ signal }) => campaignGetTagsForEntity(entityUid, params, requestOptions, signal);
2909
+ return { queryKey, queryFn, enabled: !!entityUid, ...queryOptions };
2910
+ };
2911
+ function useCampaignGetTagsForEntity(entityUid, params, options) {
2912
+ const queryOptions = getCampaignGetTagsForEntityQueryOptions(entityUid, params, options);
2913
+ const query = useQuery(queryOptions);
2914
+ query.queryKey = queryOptions.queryKey;
2915
+ return query;
2916
+ }
2917
+ var campaignSetTagsForEntity = (entityUid, campaignSetTagsForEntityBody, options) => {
2918
+ return customFetch2({
2919
+ url: `/api/v1/email/campaigns/broadcasts/${entityUid}/tags`,
2920
+ method: "PUT",
2921
+ headers: { "Content-Type": "application/json" },
2922
+ data: campaignSetTagsForEntityBody,
2923
+ responseType: "blob"
2924
+ }, options);
2925
+ };
2926
+ var getCampaignSetTagsForEntityMutationOptions = (options) => {
2927
+ const mutationKey = ["campaignSetTagsForEntity"];
2928
+ const { mutation: mutationOptions, request: requestOptions } = options ? options.mutation && "mutationKey" in options.mutation && options.mutation.mutationKey ? options : { ...options, mutation: { ...options.mutation, mutationKey } } : { mutation: { mutationKey }, request: undefined };
2929
+ const mutationFn = (props) => {
2930
+ const { entityUid, data } = props ?? {};
2931
+ return campaignSetTagsForEntity(entityUid, data, requestOptions);
2932
+ };
2933
+ return { mutationFn, ...mutationOptions };
2934
+ };
2935
+ var useCampaignSetTagsForEntity = (options) => {
2936
+ const mutationOptions = getCampaignSetTagsForEntityMutationOptions(options);
2937
+ return useMutation(mutationOptions);
2938
+ };
2939
+ var campaignRemoveTagFromEntity = (entityUid, tagUid, options) => {
2940
+ return customFetch2({
2941
+ url: `/api/v1/email/campaigns/broadcasts/${entityUid}/tags/${tagUid}`,
2942
+ method: "DELETE",
2943
+ responseType: "blob"
2944
+ }, options);
2945
+ };
2946
+ var getCampaignRemoveTagFromEntityMutationOptions = (options) => {
2947
+ const mutationKey = ["campaignRemoveTagFromEntity"];
2948
+ const { mutation: mutationOptions, request: requestOptions } = options ? options.mutation && "mutationKey" in options.mutation && options.mutation.mutationKey ? options : { ...options, mutation: { ...options.mutation, mutationKey } } : { mutation: { mutationKey }, request: undefined };
2949
+ const mutationFn = (props) => {
2950
+ const { entityUid, tagUid } = props ?? {};
2951
+ return campaignRemoveTagFromEntity(entityUid, tagUid, requestOptions);
2952
+ };
2953
+ return { mutationFn, ...mutationOptions };
2954
+ };
2955
+ var useCampaignRemoveTagFromEntity = (options) => {
2956
+ const mutationOptions = getCampaignRemoveTagFromEntityMutationOptions(options);
2957
+ return useMutation(mutationOptions);
2958
+ };
2777
2959
  var emailListGetAllEmailLists = (params, options, signal) => {
2778
2960
  return customFetch2({
2779
2961
  url: `/api/v1/email/lists`,
@@ -3163,6 +3345,97 @@ function useArticleGetArticle(articleUid, options) {
3163
3345
  query.queryKey = queryOptions.queryKey;
3164
3346
  return query;
3165
3347
  }
3348
+ var articleAddTagToEntity = (entityUid, articleAddTagToEntityBody, options, signal) => {
3349
+ return customFetch2({
3350
+ url: `/api/v1/support/articles/${entityUid}/tags`,
3351
+ method: "POST",
3352
+ headers: { "Content-Type": "application/json" },
3353
+ data: articleAddTagToEntityBody,
3354
+ responseType: "blob",
3355
+ signal
3356
+ }, options);
3357
+ };
3358
+ var getArticleAddTagToEntityMutationOptions = (options) => {
3359
+ const mutationKey = ["articleAddTagToEntity"];
3360
+ const { mutation: mutationOptions, request: requestOptions } = options ? options.mutation && "mutationKey" in options.mutation && options.mutation.mutationKey ? options : { ...options, mutation: { ...options.mutation, mutationKey } } : { mutation: { mutationKey }, request: undefined };
3361
+ const mutationFn = (props) => {
3362
+ const { entityUid, data } = props ?? {};
3363
+ return articleAddTagToEntity(entityUid, data, requestOptions);
3364
+ };
3365
+ return { mutationFn, ...mutationOptions };
3366
+ };
3367
+ var useArticleAddTagToEntity = (options) => {
3368
+ const mutationOptions = getArticleAddTagToEntityMutationOptions(options);
3369
+ return useMutation(mutationOptions);
3370
+ };
3371
+ var articleGetTagsForEntity = (entityUid, params, options, signal) => {
3372
+ return customFetch2({
3373
+ url: `/api/v1/support/articles/${entityUid}/tags`,
3374
+ method: "GET",
3375
+ params,
3376
+ signal
3377
+ }, options);
3378
+ };
3379
+ var getArticleGetTagsForEntityQueryKey = (entityUid, params) => {
3380
+ return [
3381
+ `/api/v1/support/articles/${entityUid}/tags`,
3382
+ ...params ? [params] : []
3383
+ ];
3384
+ };
3385
+ var getArticleGetTagsForEntityQueryOptions = (entityUid, params, options) => {
3386
+ const { query: queryOptions, request: requestOptions } = options ?? {};
3387
+ const queryKey = queryOptions?.queryKey ?? getArticleGetTagsForEntityQueryKey(entityUid, params);
3388
+ const queryFn = ({ signal }) => articleGetTagsForEntity(entityUid, params, requestOptions, signal);
3389
+ return { queryKey, queryFn, enabled: !!entityUid, ...queryOptions };
3390
+ };
3391
+ function useArticleGetTagsForEntity(entityUid, params, options) {
3392
+ const queryOptions = getArticleGetTagsForEntityQueryOptions(entityUid, params, options);
3393
+ const query = useQuery(queryOptions);
3394
+ query.queryKey = queryOptions.queryKey;
3395
+ return query;
3396
+ }
3397
+ var articleSetTagsForEntity = (entityUid, articleSetTagsForEntityBody, options) => {
3398
+ return customFetch2({
3399
+ url: `/api/v1/support/articles/${entityUid}/tags`,
3400
+ method: "PUT",
3401
+ headers: { "Content-Type": "application/json" },
3402
+ data: articleSetTagsForEntityBody,
3403
+ responseType: "blob"
3404
+ }, options);
3405
+ };
3406
+ var getArticleSetTagsForEntityMutationOptions = (options) => {
3407
+ const mutationKey = ["articleSetTagsForEntity"];
3408
+ const { mutation: mutationOptions, request: requestOptions } = options ? options.mutation && "mutationKey" in options.mutation && options.mutation.mutationKey ? options : { ...options, mutation: { ...options.mutation, mutationKey } } : { mutation: { mutationKey }, request: undefined };
3409
+ const mutationFn = (props) => {
3410
+ const { entityUid, data } = props ?? {};
3411
+ return articleSetTagsForEntity(entityUid, data, requestOptions);
3412
+ };
3413
+ return { mutationFn, ...mutationOptions };
3414
+ };
3415
+ var useArticleSetTagsForEntity = (options) => {
3416
+ const mutationOptions = getArticleSetTagsForEntityMutationOptions(options);
3417
+ return useMutation(mutationOptions);
3418
+ };
3419
+ var articleRemoveTagFromEntity = (entityUid, tagUid, options) => {
3420
+ return customFetch2({
3421
+ url: `/api/v1/support/articles/${entityUid}/tags/${tagUid}`,
3422
+ method: "DELETE",
3423
+ responseType: "blob"
3424
+ }, options);
3425
+ };
3426
+ var getArticleRemoveTagFromEntityMutationOptions = (options) => {
3427
+ const mutationKey = ["articleRemoveTagFromEntity"];
3428
+ const { mutation: mutationOptions, request: requestOptions } = options ? options.mutation && "mutationKey" in options.mutation && options.mutation.mutationKey ? options : { ...options, mutation: { ...options.mutation, mutationKey } } : { mutation: { mutationKey }, request: undefined };
3429
+ const mutationFn = (props) => {
3430
+ const { entityUid, tagUid } = props ?? {};
3431
+ return articleRemoveTagFromEntity(entityUid, tagUid, requestOptions);
3432
+ };
3433
+ return { mutationFn, ...mutationOptions };
3434
+ };
3435
+ var useArticleRemoveTagFromEntity = (options) => {
3436
+ const mutationOptions = getArticleRemoveTagFromEntityMutationOptions(options);
3437
+ return useMutation(mutationOptions);
3438
+ };
3166
3439
  var categoryGetAllCategories = (params, options, signal) => {
3167
3440
  return customFetch2({
3168
3441
  url: `/api/v1/support/categories`,
@@ -3220,7 +3493,8 @@ var EntityType = {
3220
3493
  AddOn: 9,
3221
3494
  Task: 10,
3222
3495
  Segment: 11,
3223
- Broadcast: 12
3496
+ Broadcast: 12,
3497
+ Article: 13
3224
3498
  };
3225
3499
  var AccountStage = {
3226
3500
  Trialing: 2,
@@ -3605,6 +3879,10 @@ var AccountWebhookEntitySubscriptionsItemLatestInvoiceBillingInvoiceStatus = {
3605
3879
  Uncollectible: 6,
3606
3880
  Processing: 7
3607
3881
  };
3882
+ var AccountWebhookEntityCurrentStripeProductInstancesItemAccountRegistrationMode = {
3883
+ Individual: 1,
3884
+ Team: 2
3885
+ };
3608
3886
  var AccountWebhookEntityCurrentSubscriptionBillingRenewalTerm = {
3609
3887
  Monthly: 1,
3610
3888
  Yearly: 2,
@@ -3755,6 +4033,7 @@ export {
3755
4033
  AccountRegistrationMode,
3756
4034
  AccountStage,
3757
4035
  AccountWebhookEntityAccountStage,
4036
+ AccountWebhookEntityCurrentStripeProductInstancesItemAccountRegistrationMode,
3758
4037
  AccountWebhookEntityCurrentSubscriptionBillingRenewalTerm,
3759
4038
  AccountWebhookEntityCurrentSubscriptionDiscountCouponSubscriptionsItemDiscountCouponDuration,
3760
4039
  AccountWebhookEntityCurrentSubscriptionLatestInvoiceBillingInvoiceStatus,
@@ -3854,14 +4133,22 @@ export {
3854
4133
  activityAddCustomActivity,
3855
4134
  activityGetAll,
3856
4135
  articleAddArticle,
4136
+ articleAddTagToEntity,
3857
4137
  articleGetAllArticles,
3858
4138
  articleGetArticle,
4139
+ articleGetTagsForEntity,
4140
+ articleRemoveTagFromEntity,
4141
+ articleSetTagsForEntity,
3859
4142
  campaignAddBroadcastEmail,
4143
+ campaignAddTagToEntity,
3860
4144
  campaignArchiveBroadcastCampaign,
3861
4145
  campaignDeleteBroadcastCampaign,
3862
4146
  campaignGetAllBroadcastEmails,
3863
4147
  campaignGetBroadcastEmail,
4148
+ campaignGetTagsForEntity,
4149
+ campaignRemoveTagFromEntity,
3864
4150
  campaignSendTestCampaignEmail,
4151
+ campaignSetTagsForEntity,
3865
4152
  campaignUnscheduleBroadcastEmail,
3866
4153
  campaignUpdateBroadcastEmail,
3867
4154
  caseAddCase,
@@ -3920,18 +4207,28 @@ export {
3920
4207
  getActivityGetAllQueryKey,
3921
4208
  getActivityGetAllQueryOptions,
3922
4209
  getArticleAddArticleMutationOptions,
4210
+ getArticleAddTagToEntityMutationOptions,
3923
4211
  getArticleGetAllArticlesQueryKey,
3924
4212
  getArticleGetAllArticlesQueryOptions,
3925
4213
  getArticleGetArticleQueryKey,
3926
4214
  getArticleGetArticleQueryOptions,
4215
+ getArticleGetTagsForEntityQueryKey,
4216
+ getArticleGetTagsForEntityQueryOptions,
4217
+ getArticleRemoveTagFromEntityMutationOptions,
4218
+ getArticleSetTagsForEntityMutationOptions,
3927
4219
  getCampaignAddBroadcastEmailMutationOptions,
4220
+ getCampaignAddTagToEntityMutationOptions,
3928
4221
  getCampaignArchiveBroadcastCampaignMutationOptions,
3929
4222
  getCampaignDeleteBroadcastCampaignMutationOptions,
3930
4223
  getCampaignGetAllBroadcastEmailsQueryKey,
3931
4224
  getCampaignGetAllBroadcastEmailsQueryOptions,
3932
4225
  getCampaignGetBroadcastEmailQueryKey,
3933
4226
  getCampaignGetBroadcastEmailQueryOptions,
4227
+ getCampaignGetTagsForEntityQueryKey,
4228
+ getCampaignGetTagsForEntityQueryOptions,
4229
+ getCampaignRemoveTagFromEntityMutationOptions,
3934
4230
  getCampaignSendTestCampaignEmailMutationOptions,
4231
+ getCampaignSetTagsForEntityMutationOptions,
3935
4232
  getCampaignUnscheduleBroadcastEmailMutationOptions,
3936
4233
  getCampaignUpdateBroadcastEmailMutationOptions,
3937
4234
  getCaseAddCaseMutationOptions,
@@ -4024,6 +4321,11 @@ export {
4024
4321
  getPlanGetPlanQueryOptions,
4025
4322
  getPlanUpdatePlanMutationOptions,
4026
4323
  getRegistrationRegisterAccountMutationOptions,
4324
+ getSegmentAddTagToEntityMutationOptions,
4325
+ getSegmentGetTagsForEntityQueryKey,
4326
+ getSegmentGetTagsForEntityQueryOptions,
4327
+ getSegmentRemoveTagFromEntityMutationOptions,
4328
+ getSegmentSetTagsForEntityMutationOptions,
4027
4329
  getSubscriptionAddDiscountToSubscriptionMutationOptions,
4028
4330
  getSubscriptionAddOnAddSubscriptionAddOnMutationOptions,
4029
4331
  getSubscriptionAddOnAddSubscriptionAddOnPreviewMutationOptions,
@@ -4078,6 +4380,10 @@ export {
4078
4380
  planGetPlan,
4079
4381
  planUpdatePlan,
4080
4382
  registrationRegisterAccount,
4383
+ segmentAddTagToEntity,
4384
+ segmentGetTagsForEntity,
4385
+ segmentRemoveTagFromEntity,
4386
+ segmentSetTagsForEntity,
4081
4387
  subscriptionAddDiscountToSubscription,
4082
4388
  subscriptionAddOnAddSubscriptionAddOn,
4083
4389
  subscriptionAddOnAddSubscriptionAddOnPreview,
@@ -4113,14 +4419,22 @@ export {
4113
4419
  useActivityAddCustomActivity,
4114
4420
  useActivityGetAll,
4115
4421
  useArticleAddArticle,
4422
+ useArticleAddTagToEntity,
4116
4423
  useArticleGetAllArticles,
4117
4424
  useArticleGetArticle,
4425
+ useArticleGetTagsForEntity,
4426
+ useArticleRemoveTagFromEntity,
4427
+ useArticleSetTagsForEntity,
4118
4428
  useCampaignAddBroadcastEmail,
4429
+ useCampaignAddTagToEntity,
4119
4430
  useCampaignArchiveBroadcastCampaign,
4120
4431
  useCampaignDeleteBroadcastCampaign,
4121
4432
  useCampaignGetAllBroadcastEmails,
4122
4433
  useCampaignGetBroadcastEmail,
4434
+ useCampaignGetTagsForEntity,
4435
+ useCampaignRemoveTagFromEntity,
4123
4436
  useCampaignSendTestCampaignEmail,
4437
+ useCampaignSetTagsForEntity,
4124
4438
  useCampaignUnscheduleBroadcastEmail,
4125
4439
  useCampaignUpdateBroadcastEmail,
4126
4440
  useCaseAddCase,
@@ -4190,6 +4504,10 @@ export {
4190
4504
  usePlanGetPlan,
4191
4505
  usePlanUpdatePlan,
4192
4506
  useRegistrationRegisterAccount,
4507
+ useSegmentAddTagToEntity,
4508
+ useSegmentGetTagsForEntity,
4509
+ useSegmentRemoveTagFromEntity,
4510
+ useSegmentSetTagsForEntity,
4193
4511
  useSubscriptionAddDiscountToSubscription,
4194
4512
  useSubscriptionAddOnAddSubscriptionAddOn,
4195
4513
  useSubscriptionAddOnAddSubscriptionAddOnPreview,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@outseta/react",
3
- "version": "0.4.33",
3
+ "version": "0.4.35",
4
4
  "description": "React hooks and components for the Outseta API",
5
5
  "license": "MIT",
6
6
  "repository": {
@@ -18,7 +18,7 @@
18
18
  }
19
19
  },
20
20
  "dependencies": {
21
- "@outseta/api-client": "0.3.39"
21
+ "@outseta/api-client": "0.3.41"
22
22
  },
23
23
  "peerDependencies": {
24
24
  "react": "^18.0.0 || ^19.0.0"
@@ -59,13 +59,18 @@ type SecondParameter<T extends (...args: never) => unknown> = Parameters<T>[1];
59
59
 
60
60
 
61
61
  /**
62
- * Each tag applies to a single entity type. Pass entityType=Case to retrieve the tags
63
- that can be put on support tickets.
62
+ * Each tag applies to a single entity type. Pass entityType to retrieve the tags for one
63
+ of them, for example entityType=Article for knowledge base article tags.
64
64
 
65
- How a tag goes onto a record depends on the entity type. A support ticket holds its
66
- tags in its own CaseTags collection, so you add and remove ticket tags with
67
- PUT /support/cases/{caseUid}. Other entity types store their tags differently. This
68
- documentation covers ticket tags only.
65
+ How a tag goes onto a record depends on the entity type. Articles, broadcasts and
66
+ segments each take tags on a tags sub-resource of the record:
67
+
68
+ - POST /support/articles/{entityUid}/tags and PUT, GET, DELETE on the same path
69
+ - POST /email/campaigns/broadcasts/{entityUid}/tags and the same for the rest
70
+ - POST /crm/segments/{entityUid}/tags and the same for the rest
71
+
72
+ A support ticket is the exception. It holds its tags in its own CaseTags collection, so
73
+ you add and remove ticket tags with PUT /support/cases/{caseUid}.
69
74
 
70
75
  Name is unique within an entity type. SystemName and SystemDescription identify a
71
76
  built-in tag (for example Priority.Urgent) and are set by Outseta.
@@ -138,8 +143,9 @@ export function useTagGetAllTags<TData = Awaited<ReturnType<typeof tagGetAllTags
138
143
 
139
144
 
140
145
  /**
141
- * Name and EntityType are required. Use EntityType 4 (Case) for a tag that goes on
142
- support tickets. TagColor sets the color the tag shows in.
146
+ * Name and EntityType are required. EntityType fixes what the tag can go on: 4 (Case) for
147
+ support tickets, 13 (Article) for knowledge base articles, 12 (Broadcast) for broadcast
148
+ emails, 11 (Segment) for segments. TagColor sets the color the tag shows in.
143
149
 
144
150
  Name must be unique within an entity type. If the name already exists for that
145
151
  entity type, the existing tag is returned instead of a duplicate, and its color is
@@ -346,6 +352,9 @@ export const useTagUpdateTag = <TError = void,
346
352
  /**
347
353
  * The tag is also taken off every record that carries it. For a Case tag, it is
348
354
  removed from all support tickets that have it.
355
+
356
+ An Article tag that the knowledge base version filter names cannot be deleted. Take it
357
+ out of the version filter first, then delete it.
349
358
  * @summary Delete a tag.
350
359
  */
351
360
  export const tagDeleteTag = (