@outseta/api-client 0.3.39 → 0.3.41

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.
Files changed (30) hide show
  1. package/dist/index.js +173 -1
  2. package/package.json +1 -1
  3. package/src/generated/attribute/attribute.ts +17 -8
  4. package/src/generated/crm/crm.ts +241 -1
  5. package/src/generated/email/email.ts +240 -0
  6. package/src/generated/models/accountAllOf.ts +3 -0
  7. package/src/generated/models/accountWebhookEntity.ts +3 -0
  8. package/src/generated/models/accountWebhookEntityCurrentStripeProductInstancesItem.ts +85 -0
  9. package/src/generated/models/accountWebhookEntityCurrentStripeProductInstancesItemAccountRegistrationMode.ts +13 -0
  10. package/src/generated/models/articleAddTagToEntityBody.ts +7 -0
  11. package/src/generated/models/articleAllOf.ts +3 -0
  12. package/src/generated/models/articleGetAllArticlesParams.ts +8 -0
  13. package/src/generated/models/articleGetTagsForEntity200.ts +8 -0
  14. package/src/generated/models/articleGetTagsForEntityParams.ts +14 -0
  15. package/src/generated/models/articleSetTagsForEntityBody.ts +7 -0
  16. package/src/generated/models/campaignAddTagToEntityBody.ts +7 -0
  17. package/src/generated/models/campaignGetAllBroadcastEmailsParams.ts +8 -0
  18. package/src/generated/models/campaignGetTagsForEntity200.ts +8 -0
  19. package/src/generated/models/campaignGetTagsForEntityParams.ts +14 -0
  20. package/src/generated/models/campaignSetTagsForEntityBody.ts +7 -0
  21. package/src/generated/models/crmSettingsAllOf.ts +0 -1
  22. package/src/generated/models/entityType.ts +2 -1
  23. package/src/generated/models/index.ts +14 -0
  24. package/src/generated/models/segmentAddTagToEntityBody.ts +7 -0
  25. package/src/generated/models/segmentGetTagsForEntity200.ts +8 -0
  26. package/src/generated/models/segmentGetTagsForEntityParams.ts +14 -0
  27. package/src/generated/models/segmentSetTagsForEntityBody.ts +7 -0
  28. package/src/generated/models/stripeProductAllOf.ts +2 -0
  29. package/src/generated/models/supportSettingsAllOf.ts +2 -0
  30. package/src/generated/support/support.ts +240 -0
@@ -2,8 +2,12 @@
2
2
  import type {
3
3
  Article,
4
4
  ArticleAddArticleBody,
5
+ ArticleAddTagToEntityBody,
5
6
  ArticleGetAllArticles200,
6
7
  ArticleGetAllArticlesParams,
8
+ ArticleGetTagsForEntity200,
9
+ ArticleGetTagsForEntityParams,
10
+ ArticleSetTagsForEntityBody,
7
11
  Case,
8
12
  CaseAddCaseBody,
9
13
  CaseAddCaseParams,
@@ -514,6 +518,242 @@ export const articleGetArticle = async (articleUid: string | null, options?: Req
514
518
  );}
515
519
 
516
520
 
521
+ /**
522
+ * Send the uids of the tags to add. Tags that the record already carries stay on it, and
523
+ naming one of them again changes nothing, so the same request is safe to repeat. To
524
+ replace the whole set instead, use PUT on this same path.
525
+
526
+ A tag belongs to one entity type, so use tags whose EntityType matches this record.
527
+ List them with GET /attribute/tags. A uid in the list that names no tag is skipped.
528
+ * @summary Add tags to a record.
529
+ */
530
+ export type articleAddTagToEntityResponse200 = {
531
+ data: Blob
532
+ status: 200
533
+ }
534
+
535
+ export type articleAddTagToEntityResponse400 = {
536
+ data: void
537
+ status: 400
538
+ }
539
+
540
+ export type articleAddTagToEntityResponse401 = {
541
+ data: void
542
+ status: 401
543
+ }
544
+
545
+ export type articleAddTagToEntityResponse404 = {
546
+ data: void
547
+ status: 404
548
+ }
549
+
550
+ export type articleAddTagToEntityResponseSuccess = (articleAddTagToEntityResponse200) & {
551
+ headers: Headers;
552
+ };
553
+ export type articleAddTagToEntityResponseError = (articleAddTagToEntityResponse400 | articleAddTagToEntityResponse401 | articleAddTagToEntityResponse404) & {
554
+ headers: Headers;
555
+ };
556
+
557
+ export type articleAddTagToEntityResponse = (articleAddTagToEntityResponseSuccess | articleAddTagToEntityResponseError)
558
+
559
+ export const getArticleAddTagToEntityUrl = (entityUid: string | null,) => {
560
+
561
+
562
+
563
+
564
+ return `/api/v1/support/articles/${entityUid}/tags`
565
+ }
566
+
567
+ export const articleAddTagToEntity = async (entityUid: string | null,
568
+ articleAddTagToEntityBody: ArticleAddTagToEntityBody, options?: RequestInit): Promise<articleAddTagToEntityResponse> => {
569
+
570
+ return customFetch<articleAddTagToEntityResponse>(getArticleAddTagToEntityUrl(entityUid),
571
+ {
572
+ ...options,
573
+ method: 'POST',
574
+ headers: { 'Content-Type': 'application/json', ...options?.headers },
575
+ body: JSON.stringify(
576
+ articleAddTagToEntityBody,)
577
+ }
578
+ );}
579
+
580
+
581
+ /**
582
+ * Returns the tags themselves, not the links that hold them. The same tags are also
583
+ available on the record: ask for them with the fields parameter, for example
584
+ fields=Uid,Tags.Uid,Tags.Name,Tags.TagColor. Tags cost an extra query, so the record
585
+ leaves them out unless fields names Tags or is a plain wildcard.
586
+ * @summary Retrieve the tags on a record.
587
+ */
588
+ export type articleGetTagsForEntityResponse200 = {
589
+ data: ArticleGetTagsForEntity200
590
+ status: 200
591
+ }
592
+
593
+ export type articleGetTagsForEntityResponse400 = {
594
+ data: void
595
+ status: 400
596
+ }
597
+
598
+ export type articleGetTagsForEntityResponse401 = {
599
+ data: void
600
+ status: 401
601
+ }
602
+
603
+ export type articleGetTagsForEntityResponseSuccess = (articleGetTagsForEntityResponse200) & {
604
+ headers: Headers;
605
+ };
606
+ export type articleGetTagsForEntityResponseError = (articleGetTagsForEntityResponse400 | articleGetTagsForEntityResponse401) & {
607
+ headers: Headers;
608
+ };
609
+
610
+ export type articleGetTagsForEntityResponse = (articleGetTagsForEntityResponseSuccess | articleGetTagsForEntityResponseError)
611
+
612
+ export const getArticleGetTagsForEntityUrl = (entityUid: string | null,
613
+ params?: ArticleGetTagsForEntityParams,) => {
614
+ const normalizedParams = new URLSearchParams();
615
+
616
+ Object.entries(params || {}).forEach(([key, value]) => {
617
+
618
+ if (value !== undefined) {
619
+ normalizedParams.append(key, value === null ? 'null' : value.toString())
620
+ }
621
+ });
622
+
623
+ const stringifiedParams = normalizedParams.toString();
624
+
625
+ return stringifiedParams.length > 0 ? `/api/v1/support/articles/${entityUid}/tags?${stringifiedParams}` : `/api/v1/support/articles/${entityUid}/tags`
626
+ }
627
+
628
+ export const articleGetTagsForEntity = async (entityUid: string | null,
629
+ params?: ArticleGetTagsForEntityParams, options?: RequestInit): Promise<articleGetTagsForEntityResponse> => {
630
+
631
+ return customFetch<articleGetTagsForEntityResponse>(getArticleGetTagsForEntityUrl(entityUid,params),
632
+ {
633
+ ...options,
634
+ method: 'GET'
635
+
636
+
637
+ }
638
+ );}
639
+
640
+
641
+ /**
642
+ * Send the full set of tags the record must end with. A tag that the list leaves out is
643
+ taken off the record, and one that the list names is added. Send an empty list to take
644
+ every tag off. To add tags without disturbing the others, use POST on this same path.
645
+
646
+ A tag belongs to one entity type, so use tags whose EntityType matches this record.
647
+ List them with GET /attribute/tags. A uid in the list that names no tag is skipped.
648
+ * @summary Replace the tags on a record.
649
+ */
650
+ export type articleSetTagsForEntityResponse200 = {
651
+ data: Blob
652
+ status: 200
653
+ }
654
+
655
+ export type articleSetTagsForEntityResponse400 = {
656
+ data: void
657
+ status: 400
658
+ }
659
+
660
+ export type articleSetTagsForEntityResponse401 = {
661
+ data: void
662
+ status: 401
663
+ }
664
+
665
+ export type articleSetTagsForEntityResponse404 = {
666
+ data: void
667
+ status: 404
668
+ }
669
+
670
+ export type articleSetTagsForEntityResponseSuccess = (articleSetTagsForEntityResponse200) & {
671
+ headers: Headers;
672
+ };
673
+ export type articleSetTagsForEntityResponseError = (articleSetTagsForEntityResponse400 | articleSetTagsForEntityResponse401 | articleSetTagsForEntityResponse404) & {
674
+ headers: Headers;
675
+ };
676
+
677
+ export type articleSetTagsForEntityResponse = (articleSetTagsForEntityResponseSuccess | articleSetTagsForEntityResponseError)
678
+
679
+ export const getArticleSetTagsForEntityUrl = (entityUid: string | null,) => {
680
+
681
+
682
+
683
+
684
+ return `/api/v1/support/articles/${entityUid}/tags`
685
+ }
686
+
687
+ export const articleSetTagsForEntity = async (entityUid: string | null,
688
+ articleSetTagsForEntityBody: ArticleSetTagsForEntityBody, options?: RequestInit): Promise<articleSetTagsForEntityResponse> => {
689
+
690
+ return customFetch<articleSetTagsForEntityResponse>(getArticleSetTagsForEntityUrl(entityUid),
691
+ {
692
+ ...options,
693
+ method: 'PUT',
694
+ headers: { 'Content-Type': 'application/json', ...options?.headers },
695
+ body: JSON.stringify(
696
+ articleSetTagsForEntityBody,)
697
+ }
698
+ );}
699
+
700
+
701
+ /**
702
+ * The tag itself is kept and stays available for other records. If the record does not
703
+ carry the tag, nothing changes and the call still succeeds.
704
+ * @summary Remove one tag from a record.
705
+ */
706
+ export type articleRemoveTagFromEntityResponse200 = {
707
+ data: Blob
708
+ status: 200
709
+ }
710
+
711
+ export type articleRemoveTagFromEntityResponse400 = {
712
+ data: void
713
+ status: 400
714
+ }
715
+
716
+ export type articleRemoveTagFromEntityResponse401 = {
717
+ data: void
718
+ status: 401
719
+ }
720
+
721
+ export type articleRemoveTagFromEntityResponse404 = {
722
+ data: void
723
+ status: 404
724
+ }
725
+
726
+ export type articleRemoveTagFromEntityResponseSuccess = (articleRemoveTagFromEntityResponse200) & {
727
+ headers: Headers;
728
+ };
729
+ export type articleRemoveTagFromEntityResponseError = (articleRemoveTagFromEntityResponse400 | articleRemoveTagFromEntityResponse401 | articleRemoveTagFromEntityResponse404) & {
730
+ headers: Headers;
731
+ };
732
+
733
+ export type articleRemoveTagFromEntityResponse = (articleRemoveTagFromEntityResponseSuccess | articleRemoveTagFromEntityResponseError)
734
+
735
+ export const getArticleRemoveTagFromEntityUrl = (entityUid: string | null,
736
+ tagUid: string | null,) => {
737
+
738
+
739
+
740
+
741
+ return `/api/v1/support/articles/${entityUid}/tags/${tagUid}`
742
+ }
743
+
744
+ export const articleRemoveTagFromEntity = async (entityUid: string | null,
745
+ tagUid: string | null, options?: RequestInit): Promise<articleRemoveTagFromEntityResponse> => {
746
+
747
+ return customFetch<articleRemoveTagFromEntityResponse>(getArticleRemoveTagFromEntityUrl(entityUid,tagUid),
748
+ {
749
+ ...options,
750
+ method: 'DELETE'
751
+
752
+
753
+ }
754
+ );}
755
+
756
+
517
757
  /**
518
758
  * @summary Retrieve all knowledge base categories.
519
759
  */