@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.
@@ -101,7 +101,7 @@ export const TagColor = {
101
101
  } as const;
102
102
 
103
103
  /**
104
- * `0` - None, `1` - Account, `2` - Person, `3` - Deal, `4` - Case, `5` - Invoice, `6` - EmailLog, `7` - Plan, `8` - DiscountCoupon, `9` - AddOn, `10` - Task, `11` - Segment, `12` - Broadcast
104
+ * `0` - None, `1` - Account, `2` - Person, `3` - Deal, `4` - Case, `5` - Invoice, `6` - EmailLog, `7` - Plan, `8` - DiscountCoupon, `9` - AddOn, `10` - Task, `11` - Segment, `12` - Broadcast, `13` - Article
105
105
  */
106
106
  export type EntityType = typeof EntityType[keyof typeof EntityType];
107
107
 
@@ -121,6 +121,7 @@ export const EntityType = {
121
121
  Task: 10,
122
122
  Segment: 11,
123
123
  Broadcast: 12,
124
+ Article: 13,
124
125
  } as const;
125
126
 
126
127
  export type DefinitionAllOf = {
@@ -594,6 +595,8 @@ export type AccountAllOf = {
594
595
  /** @nullable */
595
596
  CurrentStripeProducts?: string | null;
596
597
  /** @nullable */
598
+ CurrentStripeProductInstances?: StripeProduct[] | null;
599
+ /** @nullable */
597
600
  CurrentSubscription?: AccountAllOfCurrentSubscription;
598
601
  /** @nullable */
599
602
  DomainName?: string | null;
@@ -1003,6 +1006,8 @@ export type StripeProductAllOf = {
1003
1006
  NumberOfPurchases?: number;
1004
1007
  NumberOfSubscriptions?: number;
1005
1008
  /** @nullable */
1009
+ Quantity?: number | null;
1010
+ /** @nullable */
1006
1011
  StripeProductFamily?: StripeProductAllOfStripeProductFamily;
1007
1012
  [key: string]: unknown | null;
1008
1013
  };
@@ -3211,6 +3216,8 @@ export type ArticleAllOf = {
3211
3216
  * @nullable
3212
3217
  */
3213
3218
  Keywords?: string | null;
3219
+ /** @nullable */
3220
+ Tags?: Tag[] | null;
3214
3221
  };
3215
3222
 
3216
3223
  export type Article = AbstractQcountBean & ArticleAllOf;
@@ -3243,6 +3250,11 @@ export type CategoryAllOf = {
3243
3250
 
3244
3251
  export type Category = AbstractQcountBean & CategoryAllOf;
3245
3252
 
3253
+ export interface TagUidList {
3254
+ /** @nullable */
3255
+ TagUids?: string[] | null;
3256
+ }
3257
+
3246
3258
  export type SupportSettingsAllOf = {
3247
3259
  /** @nullable */
3248
3260
  EmailAddress?: string | null;
@@ -3266,6 +3278,8 @@ export type SupportSettingsAllOf = {
3266
3278
  /** @nullable */
3267
3279
  KnowledgeBaseFooterLinkJSON?: string | null;
3268
3280
  /** @nullable */
3281
+ KnowledgeBaseFilterJSON?: string | null;
3282
+ /** @nullable */
3269
3283
  OfficeHoursJSON?: string | null;
3270
3284
  /** @nullable */
3271
3285
  EmailNotificationForNewTickets?: string | null;
@@ -4378,11 +4392,6 @@ export interface SendTestEmailRequest2 {
4378
4392
  AdditionalRecipients?: string[] | null;
4379
4393
  }
4380
4394
 
4381
- export interface TagUidList {
4382
- /** @nullable */
4383
- TagUids?: string[] | null;
4384
- }
4385
-
4386
4395
  /**
4387
4396
  * @nullable
4388
4397
  */
@@ -4559,7 +4568,6 @@ export type CrmSettingsAllOf = {
4559
4568
  RegistrationConfirmationEmailDelaySeconds?: number;
4560
4569
  /** @nullable */
4561
4570
  RegistrationCallbackUrlLocations?: string | null;
4562
- TwoFactorAuthenticationAvailable?: boolean;
4563
4571
  MagicLinkLoginOnly?: boolean;
4564
4572
  };
4565
4573
 
@@ -6120,6 +6128,101 @@ export type AccountWebhookEntityTaxIdsItem = {
6120
6128
  IsInvalid?: boolean;
6121
6129
  };
6122
6130
 
6131
+ /**
6132
+ * `1` - Individual, `2` - Team
6133
+ */
6134
+ export type AccountWebhookEntityCurrentStripeProductInstancesItemAccountRegistrationMode = typeof AccountWebhookEntityCurrentStripeProductInstancesItemAccountRegistrationMode[keyof typeof AccountWebhookEntityCurrentStripeProductInstancesItemAccountRegistrationMode];
6135
+
6136
+
6137
+ // eslint-disable-next-line @typescript-eslint/no-redeclare
6138
+ export const AccountWebhookEntityCurrentStripeProductInstancesItemAccountRegistrationMode = {
6139
+ Individual: 1,
6140
+ Team: 2,
6141
+ } as const;
6142
+
6143
+ export type AccountWebhookEntityCurrentStripeProductInstancesItem = {
6144
+ /**
6145
+ * @maxLength 10
6146
+ * @nullable
6147
+ */
6148
+ Uid?: string | null;
6149
+ /** @nullable */
6150
+ _objectType?: string | null;
6151
+ /** @minLength 1 */
6152
+ Created: string;
6153
+ /** @minLength 1 */
6154
+ Updated: string;
6155
+ /**
6156
+ * @maxLength 255
6157
+ * @nullable
6158
+ */
6159
+ StripeId?: string | null;
6160
+ IsLivemode?: boolean;
6161
+ /**
6162
+ * @maxLength 250
6163
+ * @nullable
6164
+ */
6165
+ Name?: string | null;
6166
+ /**
6167
+ * @maxLength 255
6168
+ * @nullable
6169
+ */
6170
+ DefaultPriceId?: string | null;
6171
+ /** @nullable */
6172
+ Description?: string | null;
6173
+ IsActive?: boolean;
6174
+ /**
6175
+ * @maxLength 36
6176
+ * @nullable
6177
+ */
6178
+ TaxCodeId?: string | null;
6179
+ /**
6180
+ * @maxLength 250
6181
+ * @nullable
6182
+ */
6183
+ UnitLabel?: string | null;
6184
+ /** `1` - Individual, `2` - Team */
6185
+ AccountRegistrationMode?: AccountWebhookEntityCurrentStripeProductInstancesItemAccountRegistrationMode;
6186
+ ExpiresAfterMonths?: number;
6187
+ /** @nullable */
6188
+ ExpirationDate?: string | null;
6189
+ IsPerUser?: boolean;
6190
+ IsQuantityEditable?: boolean;
6191
+ /** @nullable */
6192
+ MaximumPeople?: number | null;
6193
+ /**
6194
+ * @maxLength 8
6195
+ * @nullable
6196
+ */
6197
+ MigratedAddOnUid?: string | null;
6198
+ /**
6199
+ * @maxLength 8
6200
+ * @nullable
6201
+ */
6202
+ MigratedPlanUid?: string | null;
6203
+ /** @nullable */
6204
+ MinimumQuantity?: number | null;
6205
+ /**
6206
+ * @maxLength 250
6207
+ * @nullable
6208
+ */
6209
+ PostLoginPath?: string | null;
6210
+ /**
6211
+ * @maxLength 500
6212
+ * @nullable
6213
+ */
6214
+ PostPurchaseUrl?: string | null;
6215
+ RequirePaymentInformation?: boolean;
6216
+ TrialPeriodDays?: number;
6217
+ /** @nullable */
6218
+ TrialUntilDate?: string | null;
6219
+ CanDelete?: boolean;
6220
+ NumberOfPurchases?: number;
6221
+ NumberOfSubscriptions?: number;
6222
+ /** @nullable */
6223
+ Quantity?: number | null;
6224
+ };
6225
+
6123
6226
  /**
6124
6227
  * `1` - Monthly, `2` - Yearly, `3` - Quarterly, `4` - One Time
6125
6228
  */
@@ -7389,6 +7492,8 @@ export interface AccountWebhookEntity {
7389
7492
  /** @nullable */
7390
7493
  CurrentStripeProducts?: string | null;
7391
7494
  /** @nullable */
7495
+ CurrentStripeProductInstances?: AccountWebhookEntityCurrentStripeProductInstancesItem[] | null;
7496
+ /** @nullable */
7392
7497
  CurrentSubscription?: AccountWebhookEntityCurrentSubscription;
7393
7498
  /** @nullable */
7394
7499
  DomainName?: string | null;
@@ -9364,6 +9469,14 @@ export type ArticleGetAllArticlesParams = {
9364
9469
  * @nullable
9365
9470
  */
9366
9471
  q?: string | null;
9472
+ /**
9473
+ * Keep only the records that carry one of these tags. Separate several tag uids with commas. The value none keeps the records that carry no tag at all.
9474
+ */
9475
+ tagUid?: string;
9476
+ /**
9477
+ * Keep only the records that carry none of these tags. Separate several tag uids with commas. Combined with tagUid, the two widen the result instead of narrowing it: a record is kept when it matches either one.
9478
+ */
9479
+ withoutTagUid?: string;
9367
9480
  /**
9368
9481
  * Requested page size. The server caps it at 100, or 25 when requested fields expand child objects or require additional queries; metadata.limit reports the applied value. Use offset=1 for the second page.
9369
9482
  */
@@ -9384,6 +9497,32 @@ export type ArticleGetAllArticles200 = {
9384
9497
  */
9385
9498
  export type ArticleAddArticleBody = Article | null;
9386
9499
 
9500
+ /**
9501
+ * @nullable
9502
+ */
9503
+ export type ArticleAddTagToEntityBody = TagUidList | null;
9504
+
9505
+ export type ArticleGetTagsForEntityParams = {
9506
+ /**
9507
+ * Requested page size. The server caps it at 100, or 25 when requested fields expand child objects or require additional queries; metadata.limit reports the applied value. Use offset=1 for the second page.
9508
+ */
9509
+ limit?: LimitParameter;
9510
+ /**
9511
+ * Zero-based page number, not a record offset. With limit=50, the second page is offset=1; offset=50 is page index 50 (records 2501-2550).
9512
+ */
9513
+ offset?: OffsetParameter;
9514
+ };
9515
+
9516
+ export type ArticleGetTagsForEntity200 = {
9517
+ metadata?: CollectionMetadata;
9518
+ items?: Tag[];
9519
+ };
9520
+
9521
+ /**
9522
+ * @nullable
9523
+ */
9524
+ export type ArticleSetTagsForEntityBody = TagUidList | null;
9525
+
9387
9526
  export type CategoryGetAllCategoriesParams = {
9388
9527
  /**
9389
9528
  * Requested page size. The server caps it at 100, or 25 when requested fields expand child objects or require additional queries; metadata.limit reports the applied value. Use offset=1 for the second page.
@@ -9479,6 +9618,14 @@ export type DripCampaignUpdateDripCampaignMessageBody = DripCampaignMessage | nu
9479
9618
  export type DripCampaignSendTestCampaignEmailBody = SendTestEmailRequest | null;
9480
9619
 
9481
9620
  export type CampaignGetAllBroadcastEmailsParams = {
9621
+ /**
9622
+ * Keep only the records that carry one of these tags. Separate several tag uids with commas. The value none keeps the records that carry no tag at all.
9623
+ */
9624
+ tagUid?: string;
9625
+ /**
9626
+ * Keep only the records that carry none of these tags. Separate several tag uids with commas. Combined with tagUid, the two widen the result instead of narrowing it: a record is kept when it matches either one.
9627
+ */
9628
+ withoutTagUid?: string;
9482
9629
  /**
9483
9630
  * Requested page size. The server caps it at 100, or 25 when requested fields expand child objects or require additional queries; metadata.limit reports the applied value. Use offset=1 for the second page.
9484
9631
  */
@@ -9509,6 +9656,32 @@ export type CampaignUpdateBroadcastEmailBody = BroadcastCampaign | null;
9509
9656
  */
9510
9657
  export type CampaignSendTestCampaignEmailBody = SendTestEmailRequest2 | null;
9511
9658
 
9659
+ /**
9660
+ * @nullable
9661
+ */
9662
+ export type CampaignAddTagToEntityBody = TagUidList | null;
9663
+
9664
+ export type CampaignGetTagsForEntityParams = {
9665
+ /**
9666
+ * Requested page size. The server caps it at 100, or 25 when requested fields expand child objects or require additional queries; metadata.limit reports the applied value. Use offset=1 for the second page.
9667
+ */
9668
+ limit?: LimitParameter;
9669
+ /**
9670
+ * Zero-based page number, not a record offset. With limit=50, the second page is offset=1; offset=50 is page index 50 (records 2501-2550).
9671
+ */
9672
+ offset?: OffsetParameter;
9673
+ };
9674
+
9675
+ export type CampaignGetTagsForEntity200 = {
9676
+ metadata?: CollectionMetadata;
9677
+ items?: Tag[];
9678
+ };
9679
+
9680
+ /**
9681
+ * @nullable
9682
+ */
9683
+ export type CampaignSetTagsForEntityBody = TagUidList | null;
9684
+
9512
9685
  export type EmailListGetAllEmailListsParams = {
9513
9686
  /**
9514
9687
  * Requested page size. The server caps it at 100, or 25 when requested fields expand child objects or require additional queries; metadata.limit reports the applied value. Use offset=1 for the second page.
@@ -9597,6 +9770,32 @@ export type DealAddDealBody = Deal | null;
9597
9770
  */
9598
9771
  export type DealUpdateDealBody = Deal | null;
9599
9772
 
9773
+ /**
9774
+ * @nullable
9775
+ */
9776
+ export type SegmentAddTagToEntityBody = TagUidList | null;
9777
+
9778
+ export type SegmentGetTagsForEntityParams = {
9779
+ /**
9780
+ * Requested page size. The server caps it at 100, or 25 when requested fields expand child objects or require additional queries; metadata.limit reports the applied value. Use offset=1 for the second page.
9781
+ */
9782
+ limit?: LimitParameter;
9783
+ /**
9784
+ * Zero-based page number, not a record offset. With limit=50, the second page is offset=1; offset=50 is page index 50 (records 2501-2550).
9785
+ */
9786
+ offset?: OffsetParameter;
9787
+ };
9788
+
9789
+ export type SegmentGetTagsForEntity200 = {
9790
+ metadata?: CollectionMetadata;
9791
+ items?: Tag[];
9792
+ };
9793
+
9794
+ /**
9795
+ * @nullable
9796
+ */
9797
+ export type SegmentSetTagsForEntityBody = TagUidList | null;
9798
+
9600
9799
  export type AccountGetAllAccountsParams = {
9601
9800
  /**
9602
9801
  * Accounts are filtered based on whether they are associated with the segment
@@ -16,8 +16,12 @@ import type {
16
16
  import type {
17
17
  Article,
18
18
  ArticleAddArticleBody,
19
+ ArticleAddTagToEntityBody,
19
20
  ArticleGetAllArticles200,
20
21
  ArticleGetAllArticlesParams,
22
+ ArticleGetTagsForEntity200,
23
+ ArticleGetTagsForEntityParams,
24
+ ArticleSetTagsForEntityBody,
21
25
  Case,
22
26
  CaseAddCaseBody,
23
27
  CaseAddCaseParams,
@@ -679,6 +683,291 @@ export function useArticleGetArticle<TData = Awaited<ReturnType<typeof articleGe
679
683
 
680
684
 
681
685
  /**
686
+ * Send the uids of the tags to add. Tags that the record already carries stay on it, and
687
+ naming one of them again changes nothing, so the same request is safe to repeat. To
688
+ replace the whole set instead, use PUT on this same path.
689
+
690
+ A tag belongs to one entity type, so use tags whose EntityType matches this record.
691
+ List them with GET /attribute/tags. A uid in the list that names no tag is skipped.
692
+ * @summary Add tags to a record.
693
+ */
694
+ export const articleAddTagToEntity = (
695
+ entityUid: string | null,
696
+ articleAddTagToEntityBody: ArticleAddTagToEntityBody,
697
+ options?: SecondParameter<typeof customFetch>,signal?: AbortSignal
698
+ ) => {
699
+
700
+
701
+ return customFetch<Blob>(
702
+ {url: `/api/v1/support/articles/${entityUid}/tags`, method: 'POST',
703
+ headers: {'Content-Type': 'application/json', },
704
+ data: articleAddTagToEntityBody,
705
+ responseType: 'blob', signal
706
+ },
707
+ options);
708
+ }
709
+
710
+
711
+
712
+ export const getArticleAddTagToEntityMutationOptions = <TError = void,
713
+ TContext = unknown>(options?: { mutation?:UseMutationOptions<Awaited<ReturnType<typeof articleAddTagToEntity>>, TError,{entityUid: string | null;data: ArticleAddTagToEntityBody}, TContext>, request?: SecondParameter<typeof customFetch>}
714
+ ): UseMutationOptions<Awaited<ReturnType<typeof articleAddTagToEntity>>, TError,{entityUid: string | null;data: ArticleAddTagToEntityBody}, TContext> => {
715
+
716
+ const mutationKey = ['articleAddTagToEntity'];
717
+ const {mutation: mutationOptions, request: requestOptions} = options ?
718
+ options.mutation && 'mutationKey' in options.mutation && options.mutation.mutationKey ?
719
+ options
720
+ : {...options, mutation: {...options.mutation, mutationKey}}
721
+ : {mutation: { mutationKey, }, request: undefined};
722
+
723
+
724
+
725
+
726
+ const mutationFn: MutationFunction<Awaited<ReturnType<typeof articleAddTagToEntity>>, {entityUid: string | null;data: ArticleAddTagToEntityBody}> = (props) => {
727
+ const {entityUid,data} = props ?? {};
728
+
729
+ return articleAddTagToEntity(entityUid,data,requestOptions)
730
+ }
731
+
732
+
733
+
734
+
735
+ return { mutationFn, ...mutationOptions }}
736
+
737
+ export type ArticleAddTagToEntityMutationResult = NonNullable<Awaited<ReturnType<typeof articleAddTagToEntity>>>
738
+ export type ArticleAddTagToEntityMutationBody = ArticleAddTagToEntityBody
739
+ export type ArticleAddTagToEntityMutationError = void
740
+
741
+ /**
742
+ * @summary Add tags to a record.
743
+ */
744
+ export const useArticleAddTagToEntity = <TError = void,
745
+ TContext = unknown>(options?: { mutation?:UseMutationOptions<Awaited<ReturnType<typeof articleAddTagToEntity>>, TError,{entityUid: string | null;data: ArticleAddTagToEntityBody}, TContext>, request?: SecondParameter<typeof customFetch>}
746
+ ): UseMutationResult<
747
+ Awaited<ReturnType<typeof articleAddTagToEntity>>,
748
+ TError,
749
+ {entityUid: string | null;data: ArticleAddTagToEntityBody},
750
+ TContext
751
+ > => {
752
+
753
+ const mutationOptions = getArticleAddTagToEntityMutationOptions(options);
754
+
755
+ return useMutation(mutationOptions);
756
+ }
757
+ /**
758
+ * Returns the tags themselves, not the links that hold them. The same tags are also
759
+ available on the record: ask for them with the fields parameter, for example
760
+ fields=Uid,Tags.Uid,Tags.Name,Tags.TagColor. Tags cost an extra query, so the record
761
+ leaves them out unless fields names Tags or is a plain wildcard.
762
+ * @summary Retrieve the tags on a record.
763
+ */
764
+ export const articleGetTagsForEntity = (
765
+ entityUid: string | null,
766
+ params?: ArticleGetTagsForEntityParams,
767
+ options?: SecondParameter<typeof customFetch>,signal?: AbortSignal
768
+ ) => {
769
+
770
+
771
+ return customFetch<ArticleGetTagsForEntity200>(
772
+ {url: `/api/v1/support/articles/${entityUid}/tags`, method: 'GET',
773
+ params, signal
774
+ },
775
+ options);
776
+ }
777
+
778
+
779
+
780
+
781
+ export const getArticleGetTagsForEntityQueryKey = (entityUid?: string | null,
782
+ params?: ArticleGetTagsForEntityParams,) => {
783
+ return [
784
+ `/api/v1/support/articles/${entityUid}/tags`, ...(params ? [params]: [])
785
+ ] as const;
786
+ }
787
+
788
+
789
+ export const getArticleGetTagsForEntityQueryOptions = <TData = Awaited<ReturnType<typeof articleGetTagsForEntity>>, TError = void>(entityUid: string | null,
790
+ params?: ArticleGetTagsForEntityParams, options?: { query?:UseQueryOptions<Awaited<ReturnType<typeof articleGetTagsForEntity>>, TError, TData>, request?: SecondParameter<typeof customFetch>}
791
+ ) => {
792
+
793
+ const {query: queryOptions, request: requestOptions} = options ?? {};
794
+
795
+ const queryKey = queryOptions?.queryKey ?? getArticleGetTagsForEntityQueryKey(entityUid,params);
796
+
797
+
798
+
799
+ const queryFn: QueryFunction<Awaited<ReturnType<typeof articleGetTagsForEntity>>> = ({ signal }) => articleGetTagsForEntity(entityUid,params, requestOptions, signal);
800
+
801
+
802
+
803
+
804
+
805
+ return { queryKey, queryFn, enabled: !!(entityUid), ...queryOptions} as UseQueryOptions<Awaited<ReturnType<typeof articleGetTagsForEntity>>, TError, TData> & { queryKey: QueryKey }
806
+ }
807
+
808
+ export type ArticleGetTagsForEntityQueryResult = NonNullable<Awaited<ReturnType<typeof articleGetTagsForEntity>>>
809
+ export type ArticleGetTagsForEntityQueryError = void
810
+
811
+
812
+ /**
813
+ * @summary Retrieve the tags on a record.
814
+ */
815
+
816
+ export function useArticleGetTagsForEntity<TData = Awaited<ReturnType<typeof articleGetTagsForEntity>>, TError = void>(
817
+ entityUid: string | null,
818
+ params?: ArticleGetTagsForEntityParams, options?: { query?:UseQueryOptions<Awaited<ReturnType<typeof articleGetTagsForEntity>>, TError, TData>, request?: SecondParameter<typeof customFetch>}
819
+
820
+ ): UseQueryResult<TData, TError> & { queryKey: QueryKey } {
821
+
822
+ const queryOptions = getArticleGetTagsForEntityQueryOptions(entityUid,params,options)
823
+
824
+ const query = useQuery(queryOptions) as UseQueryResult<TData, TError> & { queryKey: QueryKey };
825
+
826
+ query.queryKey = queryOptions.queryKey ;
827
+
828
+ return query;
829
+ }
830
+
831
+
832
+
833
+
834
+ /**
835
+ * Send the full set of tags the record must end with. A tag that the list leaves out is
836
+ taken off the record, and one that the list names is added. Send an empty list to take
837
+ every tag off. To add tags without disturbing the others, use POST on this same path.
838
+
839
+ A tag belongs to one entity type, so use tags whose EntityType matches this record.
840
+ List them with GET /attribute/tags. A uid in the list that names no tag is skipped.
841
+ * @summary Replace the tags on a record.
842
+ */
843
+ export const articleSetTagsForEntity = (
844
+ entityUid: string | null,
845
+ articleSetTagsForEntityBody: ArticleSetTagsForEntityBody,
846
+ options?: SecondParameter<typeof customFetch>,) => {
847
+
848
+
849
+ return customFetch<Blob>(
850
+ {url: `/api/v1/support/articles/${entityUid}/tags`, method: 'PUT',
851
+ headers: {'Content-Type': 'application/json', },
852
+ data: articleSetTagsForEntityBody,
853
+ responseType: 'blob'
854
+ },
855
+ options);
856
+ }
857
+
858
+
859
+
860
+ export const getArticleSetTagsForEntityMutationOptions = <TError = void,
861
+ TContext = unknown>(options?: { mutation?:UseMutationOptions<Awaited<ReturnType<typeof articleSetTagsForEntity>>, TError,{entityUid: string | null;data: ArticleSetTagsForEntityBody}, TContext>, request?: SecondParameter<typeof customFetch>}
862
+ ): UseMutationOptions<Awaited<ReturnType<typeof articleSetTagsForEntity>>, TError,{entityUid: string | null;data: ArticleSetTagsForEntityBody}, TContext> => {
863
+
864
+ const mutationKey = ['articleSetTagsForEntity'];
865
+ const {mutation: mutationOptions, request: requestOptions} = options ?
866
+ options.mutation && 'mutationKey' in options.mutation && options.mutation.mutationKey ?
867
+ options
868
+ : {...options, mutation: {...options.mutation, mutationKey}}
869
+ : {mutation: { mutationKey, }, request: undefined};
870
+
871
+
872
+
873
+
874
+ const mutationFn: MutationFunction<Awaited<ReturnType<typeof articleSetTagsForEntity>>, {entityUid: string | null;data: ArticleSetTagsForEntityBody}> = (props) => {
875
+ const {entityUid,data} = props ?? {};
876
+
877
+ return articleSetTagsForEntity(entityUid,data,requestOptions)
878
+ }
879
+
880
+
881
+
882
+
883
+ return { mutationFn, ...mutationOptions }}
884
+
885
+ export type ArticleSetTagsForEntityMutationResult = NonNullable<Awaited<ReturnType<typeof articleSetTagsForEntity>>>
886
+ export type ArticleSetTagsForEntityMutationBody = ArticleSetTagsForEntityBody
887
+ export type ArticleSetTagsForEntityMutationError = void
888
+
889
+ /**
890
+ * @summary Replace the tags on a record.
891
+ */
892
+ export const useArticleSetTagsForEntity = <TError = void,
893
+ TContext = unknown>(options?: { mutation?:UseMutationOptions<Awaited<ReturnType<typeof articleSetTagsForEntity>>, TError,{entityUid: string | null;data: ArticleSetTagsForEntityBody}, TContext>, request?: SecondParameter<typeof customFetch>}
894
+ ): UseMutationResult<
895
+ Awaited<ReturnType<typeof articleSetTagsForEntity>>,
896
+ TError,
897
+ {entityUid: string | null;data: ArticleSetTagsForEntityBody},
898
+ TContext
899
+ > => {
900
+
901
+ const mutationOptions = getArticleSetTagsForEntityMutationOptions(options);
902
+
903
+ return useMutation(mutationOptions);
904
+ }
905
+ /**
906
+ * The tag itself is kept and stays available for other records. If the record does not
907
+ carry the tag, nothing changes and the call still succeeds.
908
+ * @summary Remove one tag from a record.
909
+ */
910
+ export const articleRemoveTagFromEntity = (
911
+ entityUid: string | null,
912
+ tagUid: string | null,
913
+ options?: SecondParameter<typeof customFetch>,) => {
914
+
915
+
916
+ return customFetch<Blob>(
917
+ {url: `/api/v1/support/articles/${entityUid}/tags/${tagUid}`, method: 'DELETE',
918
+ responseType: 'blob'
919
+ },
920
+ options);
921
+ }
922
+
923
+
924
+
925
+ export const getArticleRemoveTagFromEntityMutationOptions = <TError = void,
926
+ TContext = unknown>(options?: { mutation?:UseMutationOptions<Awaited<ReturnType<typeof articleRemoveTagFromEntity>>, TError,{entityUid: string | null;tagUid: string | null}, TContext>, request?: SecondParameter<typeof customFetch>}
927
+ ): UseMutationOptions<Awaited<ReturnType<typeof articleRemoveTagFromEntity>>, TError,{entityUid: string | null;tagUid: string | null}, TContext> => {
928
+
929
+ const mutationKey = ['articleRemoveTagFromEntity'];
930
+ const {mutation: mutationOptions, request: requestOptions} = options ?
931
+ options.mutation && 'mutationKey' in options.mutation && options.mutation.mutationKey ?
932
+ options
933
+ : {...options, mutation: {...options.mutation, mutationKey}}
934
+ : {mutation: { mutationKey, }, request: undefined};
935
+
936
+
937
+
938
+
939
+ const mutationFn: MutationFunction<Awaited<ReturnType<typeof articleRemoveTagFromEntity>>, {entityUid: string | null;tagUid: string | null}> = (props) => {
940
+ const {entityUid,tagUid} = props ?? {};
941
+
942
+ return articleRemoveTagFromEntity(entityUid,tagUid,requestOptions)
943
+ }
944
+
945
+
946
+
947
+
948
+ return { mutationFn, ...mutationOptions }}
949
+
950
+ export type ArticleRemoveTagFromEntityMutationResult = NonNullable<Awaited<ReturnType<typeof articleRemoveTagFromEntity>>>
951
+
952
+ export type ArticleRemoveTagFromEntityMutationError = void
953
+
954
+ /**
955
+ * @summary Remove one tag from a record.
956
+ */
957
+ export const useArticleRemoveTagFromEntity = <TError = void,
958
+ TContext = unknown>(options?: { mutation?:UseMutationOptions<Awaited<ReturnType<typeof articleRemoveTagFromEntity>>, TError,{entityUid: string | null;tagUid: string | null}, TContext>, request?: SecondParameter<typeof customFetch>}
959
+ ): UseMutationResult<
960
+ Awaited<ReturnType<typeof articleRemoveTagFromEntity>>,
961
+ TError,
962
+ {entityUid: string | null;tagUid: string | null},
963
+ TContext
964
+ > => {
965
+
966
+ const mutationOptions = getArticleRemoveTagFromEntityMutationOptions(options);
967
+
968
+ return useMutation(mutationOptions);
969
+ }
970
+ /**
682
971
  * @summary Retrieve all knowledge base categories.
683
972
  */
684
973
  export const categoryGetAllCategories = (