@opens/gateways 1.16.8 → 1.16.10
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/customer-service/contracts/index.d.mts +304 -9
- package/dist/customer-service/contracts/index.d.ts +304 -9
- package/dist/customer-service/contracts/index.js.map +1 -1
- package/dist/index.d.mts +17 -64
- package/dist/index.d.ts +17 -64
- package/dist/index.js +29 -94
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +29 -94
- package/dist/index.mjs.map +1 -1
- package/package.json +2 -2
- package/dist/notifications/contracts/index.d.mts +0 -160
- package/dist/notifications/contracts/index.d.ts +0 -160
- package/dist/notifications/contracts/index.js +0 -19
- package/dist/notifications/contracts/index.js.map +0 -1
- package/dist/notifications/contracts/index.mjs +0 -1
- package/dist/notifications/contracts/index.mjs.map +0 -1
|
@@ -394,8 +394,8 @@ interface AnnouncementAppearance {
|
|
|
394
394
|
*/
|
|
395
395
|
position?: 'top' | 'bottom';
|
|
396
396
|
}
|
|
397
|
-
/** Payload rendered by
|
|
398
|
-
interface
|
|
397
|
+
/** Payload rendered by a banner announcement. */
|
|
398
|
+
interface BannerAnnouncementPayload {
|
|
399
399
|
/** Main announcement message. */
|
|
400
400
|
message: string;
|
|
401
401
|
/** Visual style applied to the announcement. */
|
|
@@ -405,6 +405,168 @@ interface AnnouncementPayload {
|
|
|
405
405
|
/** Optional appearance configuration for DOM anchoring. */
|
|
406
406
|
appearance?: AnnouncementAppearance;
|
|
407
407
|
}
|
|
408
|
+
/** A selectable option in a survey question. */
|
|
409
|
+
interface SurveyQuestionOption {
|
|
410
|
+
/** Stable identifier for the option. */
|
|
411
|
+
id: string;
|
|
412
|
+
/** Label displayed to the respondent. */
|
|
413
|
+
label: string;
|
|
414
|
+
/** Value stored in the survey response. */
|
|
415
|
+
value: string;
|
|
416
|
+
}
|
|
417
|
+
/** Configuration for a numeric rating question. */
|
|
418
|
+
interface SurveyRatingQuestionConfig {
|
|
419
|
+
/** Lowest selectable value. */
|
|
420
|
+
min: number;
|
|
421
|
+
/** Highest selectable value. */
|
|
422
|
+
max: number;
|
|
423
|
+
/** Increment between selectable values. */
|
|
424
|
+
step: number;
|
|
425
|
+
/** Optional label displayed near the lowest value. */
|
|
426
|
+
lowLabel?: string;
|
|
427
|
+
/** Optional label displayed near the highest value. */
|
|
428
|
+
highLabel?: string;
|
|
429
|
+
}
|
|
430
|
+
/** Configuration for an emoji reaction question. */
|
|
431
|
+
interface SurveyReactionQuestionConfig {
|
|
432
|
+
/** Optional label displayed near the negative reaction. */
|
|
433
|
+
lowLabel?: string;
|
|
434
|
+
/** Optional label displayed near the positive reaction. */
|
|
435
|
+
highLabel?: string;
|
|
436
|
+
}
|
|
437
|
+
/** Configuration for a free-text question. */
|
|
438
|
+
interface SurveyTextQuestionConfig {
|
|
439
|
+
/** Whether the input is rendered as a multiline field. */
|
|
440
|
+
multiline: boolean;
|
|
441
|
+
/** Optional input placeholder. */
|
|
442
|
+
placeholder?: string;
|
|
443
|
+
/** Optional minimum response length. */
|
|
444
|
+
minLength?: number;
|
|
445
|
+
/** Maximum response length. */
|
|
446
|
+
maxLength: number;
|
|
447
|
+
}
|
|
448
|
+
/** Configuration for a single-choice question. */
|
|
449
|
+
interface SurveySingleChoiceQuestionConfig {
|
|
450
|
+
/** Options presented to the respondent. */
|
|
451
|
+
options: SurveyQuestionOption[];
|
|
452
|
+
}
|
|
453
|
+
/** Configuration for a multiple-choice question. */
|
|
454
|
+
interface SurveyMultipleChoiceQuestionConfig {
|
|
455
|
+
/** Minimum number of options that can be selected. */
|
|
456
|
+
minSelections: number;
|
|
457
|
+
/** Maximum number of options that can be selected. */
|
|
458
|
+
maxSelections: number;
|
|
459
|
+
/** Options presented to the respondent. */
|
|
460
|
+
options: SurveyQuestionOption[];
|
|
461
|
+
}
|
|
462
|
+
/** A numeric rating question. */
|
|
463
|
+
interface SurveyRatingQuestion {
|
|
464
|
+
/** Stable identifier for the question. */
|
|
465
|
+
id: string;
|
|
466
|
+
/** Text displayed to the respondent. */
|
|
467
|
+
text: string;
|
|
468
|
+
/** Optional supporting text. */
|
|
469
|
+
description?: string;
|
|
470
|
+
/** Whether an answer is required. */
|
|
471
|
+
required: boolean;
|
|
472
|
+
/** Question input type. */
|
|
473
|
+
type: 'rating';
|
|
474
|
+
/** Input configuration. */
|
|
475
|
+
config: SurveyRatingQuestionConfig;
|
|
476
|
+
}
|
|
477
|
+
/** An emoji reaction question. */
|
|
478
|
+
interface SurveyReactionQuestion {
|
|
479
|
+
/** Stable identifier for the question. */
|
|
480
|
+
id: string;
|
|
481
|
+
/** Text displayed to the respondent. */
|
|
482
|
+
text: string;
|
|
483
|
+
/** Optional supporting text. */
|
|
484
|
+
description?: string;
|
|
485
|
+
/** Whether an answer is required. */
|
|
486
|
+
required: boolean;
|
|
487
|
+
/** Question input type. */
|
|
488
|
+
type: 'reaction';
|
|
489
|
+
/** Input configuration. */
|
|
490
|
+
config: SurveyReactionQuestionConfig;
|
|
491
|
+
}
|
|
492
|
+
/** A free-text question. */
|
|
493
|
+
interface SurveyTextQuestion {
|
|
494
|
+
/** Stable identifier for the question. */
|
|
495
|
+
id: string;
|
|
496
|
+
/** Text displayed to the respondent. */
|
|
497
|
+
text: string;
|
|
498
|
+
/** Optional supporting text. */
|
|
499
|
+
description?: string;
|
|
500
|
+
/** Whether an answer is required. */
|
|
501
|
+
required: boolean;
|
|
502
|
+
/** Question input type. */
|
|
503
|
+
type: 'text';
|
|
504
|
+
/** Input configuration. */
|
|
505
|
+
config: SurveyTextQuestionConfig;
|
|
506
|
+
}
|
|
507
|
+
/** A question that accepts one option. */
|
|
508
|
+
interface SurveySingleChoiceQuestion {
|
|
509
|
+
/** Stable identifier for the question. */
|
|
510
|
+
id: string;
|
|
511
|
+
/** Text displayed to the respondent. */
|
|
512
|
+
text: string;
|
|
513
|
+
/** Optional supporting text. */
|
|
514
|
+
description?: string;
|
|
515
|
+
/** Whether an answer is required. */
|
|
516
|
+
required: boolean;
|
|
517
|
+
/** Question input type. */
|
|
518
|
+
type: 'single_choice';
|
|
519
|
+
/** Input configuration. */
|
|
520
|
+
config: SurveySingleChoiceQuestionConfig;
|
|
521
|
+
}
|
|
522
|
+
/** A question that accepts multiple options. */
|
|
523
|
+
interface SurveyMultipleChoiceQuestion {
|
|
524
|
+
/** Stable identifier for the question. */
|
|
525
|
+
id: string;
|
|
526
|
+
/** Text displayed to the respondent. */
|
|
527
|
+
text: string;
|
|
528
|
+
/** Optional supporting text. */
|
|
529
|
+
description?: string;
|
|
530
|
+
/** Whether an answer is required. */
|
|
531
|
+
required: boolean;
|
|
532
|
+
/** Question input type. */
|
|
533
|
+
type: 'multiple_choice';
|
|
534
|
+
/** Input configuration. */
|
|
535
|
+
config: SurveyMultipleChoiceQuestionConfig;
|
|
536
|
+
}
|
|
537
|
+
/** A question supported by the generic survey payload. */
|
|
538
|
+
type SurveyQuestion = SurveyRatingQuestion | SurveyReactionQuestion | SurveyTextQuestion | SurveySingleChoiceQuestion | SurveyMultipleChoiceQuestion;
|
|
539
|
+
/** Completion content displayed after submitting a survey. */
|
|
540
|
+
interface SurveyCompletion {
|
|
541
|
+
/** Optional message shown after submission. */
|
|
542
|
+
message?: string;
|
|
543
|
+
}
|
|
544
|
+
/** Supported viewport placements for a survey. */
|
|
545
|
+
type SurveyPlacement = 'top-left' | 'top-right' | 'bottom-left' | 'bottom-right';
|
|
546
|
+
/** Rendering options for a survey. */
|
|
547
|
+
interface SurveyAppearance {
|
|
548
|
+
/** Display mode supported by the widget. */
|
|
549
|
+
mode: 'popover';
|
|
550
|
+
/** Viewport corner where the survey is displayed. */
|
|
551
|
+
placement?: SurveyPlacement;
|
|
552
|
+
}
|
|
553
|
+
/** Payload rendered by a survey announcement. */
|
|
554
|
+
interface SurveyAnnouncementPayload {
|
|
555
|
+
/** Schema version used to validate the survey. */
|
|
556
|
+
formatVersion: 1;
|
|
557
|
+
/** Survey title. */
|
|
558
|
+
title: string;
|
|
559
|
+
/** Optional supporting description. */
|
|
560
|
+
description?: string;
|
|
561
|
+
/** Ordered questions displayed to the respondent. */
|
|
562
|
+
questions: SurveyQuestion[];
|
|
563
|
+
/** Optional completion content. */
|
|
564
|
+
completion?: SurveyCompletion;
|
|
565
|
+
/** Survey rendering options. */
|
|
566
|
+
appearance: SurveyAppearance;
|
|
567
|
+
}
|
|
568
|
+
/** Payload rendered by the announcement widget. */
|
|
569
|
+
type AnnouncementPayload = BannerAnnouncementPayload | SurveyAnnouncementPayload;
|
|
408
570
|
/** URL targeting rule for an announcement. */
|
|
409
571
|
interface AnnouncementTargetingRuleUrl {
|
|
410
572
|
/** Matching strategy. */
|
|
@@ -455,6 +617,8 @@ interface Announcement {
|
|
|
455
617
|
payload: AnnouncementPayload;
|
|
456
618
|
/** Optional expiration ISO date. */
|
|
457
619
|
expiresAt?: string | null;
|
|
620
|
+
/** Optional ISO date when the announcement becomes active. */
|
|
621
|
+
startsAt?: string | null;
|
|
458
622
|
/** Creation ISO date. */
|
|
459
623
|
createdAt: string;
|
|
460
624
|
/** Last update ISO date. */
|
|
@@ -504,6 +668,8 @@ interface CreateAnnouncementRequest {
|
|
|
504
668
|
allCompanies: boolean;
|
|
505
669
|
/** Optional expiration ISO date. */
|
|
506
670
|
expiresAt?: string | null;
|
|
671
|
+
/** Optional ISO date when the announcement becomes active. */
|
|
672
|
+
startsAt?: string | null;
|
|
507
673
|
/** Renderable payload. */
|
|
508
674
|
payload: AnnouncementPayload;
|
|
509
675
|
/** Company UUIDs allowed to see the announcement when allCompanies is false. */
|
|
@@ -523,6 +689,8 @@ interface UpdateAnnouncementRequest {
|
|
|
523
689
|
allCompanies: boolean;
|
|
524
690
|
/** Optional expiration ISO date. */
|
|
525
691
|
expiresAt?: string | null;
|
|
692
|
+
/** Optional ISO date when the announcement becomes active. */
|
|
693
|
+
startsAt?: string | null;
|
|
526
694
|
/** Renderable payload. */
|
|
527
695
|
payload: AnnouncementPayload;
|
|
528
696
|
/** Company UUIDs allowed to see the announcement when allCompanies is false. */
|
|
@@ -537,19 +705,146 @@ interface UpdateAnnouncementStatusRequest {
|
|
|
537
705
|
}
|
|
538
706
|
/** Query parameters for the active announcements widget endpoint. */
|
|
539
707
|
interface ActiveAnnouncementQuery {
|
|
708
|
+
/** Stable subject UUID used to return only unanswered surveys. */
|
|
709
|
+
id?: string;
|
|
710
|
+
/** Optional subject name received from identify. */
|
|
711
|
+
name?: string;
|
|
712
|
+
/** Optional subject email received from identify. */
|
|
713
|
+
email?: string;
|
|
714
|
+
/** Optional subject phone received from identify. */
|
|
715
|
+
phone?: string;
|
|
540
716
|
/** Current page URL used for URL targeting rules. */
|
|
541
717
|
url?: string;
|
|
542
718
|
/** User profile slug used for profile targeting rules. */
|
|
543
719
|
profile?: string;
|
|
544
720
|
}
|
|
545
|
-
/**
|
|
546
|
-
interface
|
|
721
|
+
/** Active banner returned by the widget endpoint. */
|
|
722
|
+
interface ActiveBannerAnnouncement {
|
|
547
723
|
/** Unique identifier. */
|
|
548
724
|
id: string;
|
|
549
|
-
/**
|
|
550
|
-
type
|
|
551
|
-
/**
|
|
552
|
-
payload:
|
|
725
|
+
/** Banner announcement discriminator. */
|
|
726
|
+
type: 'banner';
|
|
727
|
+
/** Banner payload rendered by the widget. */
|
|
728
|
+
payload: BannerAnnouncementPayload;
|
|
729
|
+
}
|
|
730
|
+
/** Active survey returned by the widget endpoint. */
|
|
731
|
+
interface ActiveSurveyAnnouncement {
|
|
732
|
+
/** Unique identifier. */
|
|
733
|
+
id: string;
|
|
734
|
+
/** Survey announcement discriminator. */
|
|
735
|
+
type: 'survey';
|
|
736
|
+
/** Survey payload rendered by the widget. */
|
|
737
|
+
payload: SurveyAnnouncementPayload;
|
|
738
|
+
}
|
|
739
|
+
/** Announcement returned by the active widget endpoint. */
|
|
740
|
+
type ActiveAnnouncement = ActiveBannerAnnouncement | ActiveSurveyAnnouncement;
|
|
741
|
+
|
|
742
|
+
/** A value submitted for a survey question. */
|
|
743
|
+
type SurveyAnswerValue = number | string | string[];
|
|
744
|
+
/** An answer submitted for one survey question. */
|
|
745
|
+
interface SurveyAnswer {
|
|
746
|
+
/** Identifier of the answered question. */
|
|
747
|
+
questionId: string;
|
|
748
|
+
/** Value submitted for the question. */
|
|
749
|
+
value: SurveyAnswerValue;
|
|
750
|
+
}
|
|
751
|
+
/** Request payload for submitting a survey response. */
|
|
752
|
+
interface CreateSurveyResponseRequest {
|
|
753
|
+
/** Stable identifier of the subject answering the survey. */
|
|
754
|
+
subjectId: string;
|
|
755
|
+
/** Optional subject name captured at submission time. */
|
|
756
|
+
subjectName?: string;
|
|
757
|
+
/** Optional subject profile captured at submission time. */
|
|
758
|
+
subjectProfile?: string;
|
|
759
|
+
/** Answers submitted by the subject. */
|
|
760
|
+
answers: SurveyAnswer[];
|
|
761
|
+
}
|
|
762
|
+
/** A selected choice persisted for a survey response answer. */
|
|
763
|
+
interface SurveyResponseAnswerOption {
|
|
764
|
+
/** Unique selected-option record identifier. */
|
|
765
|
+
id: string;
|
|
766
|
+
/** Identifier of the owning answer record. */
|
|
767
|
+
answerId: string;
|
|
768
|
+
/** Stable identifier of the option from the survey payload. */
|
|
769
|
+
optionId: string;
|
|
770
|
+
/** Machine-readable option value captured at submission time. */
|
|
771
|
+
optionValue: string;
|
|
772
|
+
/** Display label captured at submission time. */
|
|
773
|
+
optionLabel: string;
|
|
774
|
+
/** One-based option position in the survey payload. */
|
|
775
|
+
optionPosition: number;
|
|
776
|
+
/** ISO date when the selected option was created. */
|
|
777
|
+
createdAt: string;
|
|
778
|
+
/** ISO date when the selected option was last updated. */
|
|
779
|
+
updatedAt: string;
|
|
780
|
+
}
|
|
781
|
+
/** Normalized answer persisted for one survey question. */
|
|
782
|
+
interface SurveyResponseAnswer {
|
|
783
|
+
/** Unique answer record identifier. */
|
|
784
|
+
id: string;
|
|
785
|
+
/** Identifier of the owning survey response. */
|
|
786
|
+
responseId: string;
|
|
787
|
+
/** Stable identifier of the question from the survey payload. */
|
|
788
|
+
questionId: string;
|
|
789
|
+
/** Question type captured at submission time. */
|
|
790
|
+
questionType: SurveyQuestion['type'];
|
|
791
|
+
/** One-based question position in the survey payload. */
|
|
792
|
+
questionPosition: number;
|
|
793
|
+
/** Question text captured at submission time. */
|
|
794
|
+
questionText: string;
|
|
795
|
+
/** Whether the question was required at submission time. */
|
|
796
|
+
questionRequired: boolean;
|
|
797
|
+
/** Whether the subject supplied a meaningful answer. */
|
|
798
|
+
answered: boolean;
|
|
799
|
+
/** Original answer value, or null when the question was skipped. */
|
|
800
|
+
rawValue: SurveyAnswerValue | null;
|
|
801
|
+
/** Numeric projection used by rating and reaction reports. */
|
|
802
|
+
numericValue: number | null;
|
|
803
|
+
/** Text projection used by free-text reports. */
|
|
804
|
+
textValue: string | null;
|
|
805
|
+
/** Options selected for single-choice or multiple-choice questions. */
|
|
806
|
+
selectedOptions: SurveyResponseAnswerOption[];
|
|
807
|
+
/** ISO date when the normalized answer was created. */
|
|
808
|
+
createdAt: string;
|
|
809
|
+
/** ISO date when the normalized answer was last updated. */
|
|
810
|
+
updatedAt: string;
|
|
811
|
+
}
|
|
812
|
+
/** A persisted response to a survey announcement. */
|
|
813
|
+
interface SurveyResponse {
|
|
814
|
+
/** Unique response identifier. */
|
|
815
|
+
id: string;
|
|
816
|
+
/** Identifier of the answered survey announcement. */
|
|
817
|
+
announcementId: string;
|
|
818
|
+
/** Identifier of the authenticated company. */
|
|
819
|
+
companyId: string;
|
|
820
|
+
/** Stable identifier of the responding subject. */
|
|
821
|
+
subjectId: string;
|
|
822
|
+
/** Subject name captured at submission time. */
|
|
823
|
+
subjectName: string | null;
|
|
824
|
+
/** Subject profile captured at submission time. */
|
|
825
|
+
subjectProfile: string | null;
|
|
826
|
+
/** Normalized records for every survey question. */
|
|
827
|
+
answers: SurveyResponseAnswer[];
|
|
828
|
+
/** ISO date when the response was submitted. */
|
|
829
|
+
submittedAt: string;
|
|
830
|
+
/** ISO date when the response was created. */
|
|
831
|
+
createdAt: string;
|
|
832
|
+
/** ISO date when the response was last updated. */
|
|
833
|
+
updatedAt: string;
|
|
834
|
+
}
|
|
835
|
+
/** Query parameters for the administrative survey-response list. */
|
|
836
|
+
interface SurveyResponseListFilters {
|
|
837
|
+
/** One-based page number. */
|
|
838
|
+
page?: number;
|
|
839
|
+
/** Maximum number of responses per page. */
|
|
840
|
+
limit?: number;
|
|
841
|
+
}
|
|
842
|
+
/** Paginated responses returned for a survey announcement. */
|
|
843
|
+
interface SurveyResponseListResponse {
|
|
844
|
+
/** Total matching responses. */
|
|
845
|
+
count: number;
|
|
846
|
+
/** Responses for the requested page. */
|
|
847
|
+
rows: SurveyResponse[];
|
|
553
848
|
}
|
|
554
849
|
|
|
555
850
|
/** Request payload for generating a two-factor OTP secret URL. */
|
|
@@ -570,4 +865,4 @@ interface ValidateTwoFactorOtpResponse {
|
|
|
570
865
|
validate: boolean;
|
|
571
866
|
}
|
|
572
867
|
|
|
573
|
-
export type { ActiveAnnouncement, ActiveAnnouncementQuery, Announcement, AnnouncementAppearance, AnnouncementButton, AnnouncementCompany, AnnouncementListFilters, AnnouncementListResponse, AnnouncementPayload, AnnouncementTargetingRuleUrl, AnnouncementTargetingRules, AnnouncementType, AnnouncementVisualStatus, CompanyBooleanConfigKey, CompanyConfigKey, CompanyConfigResponse, CompanyData, CompanyJsonConfigKey, CompanyQueue, CompanyResponse, CompanyStringConfigKey, CompanyWithConfigsResponse, CreateAnnouncementRequest, GenerateTwoFactorOtpRequest, GenerateTwoFactorOtpResponse, GetAllUsersParams, GetAllUsersResponse, GetManagedUsersResponse, GetSupportWidgetIdResponse, GetUserByIdResponse, ListUsersInclude, ListUsersProfile, ListUsersRequest, ListUsersResponse, ListUsersStatus, ListUsersType, ManagedUser, StrongPasswordOptions, StrongPasswordOptionsResponse, UpdateAnnouncementRequest, UpdateAnnouncementStatusRequest, UpdateCompanyBooleanConfigRequest, UpdateCompanyJsonConfigRequest, UpdateCompanyRequest, UpdateCompanyStringConfigRequest, UpdateCompanyUserAvatarResponse, UpdateCompanyUserRequest, UpdateSupportWidgetIdRequest, UpdateSupportWidgetIdResponse, UpdateUserPasswordRequest, UpdateUserPasswordResponse, User, UserBond, UserProfile, ValidateTwoFactorOtpRequest, ValidateTwoFactorOtpResponse, WorkGroup, WorkGroupListResponse, WorkGroupMember, WorkGroupMembersResponse, WorkGroupResponse };
|
|
868
|
+
export type { ActiveAnnouncement, ActiveAnnouncementQuery, ActiveBannerAnnouncement, ActiveSurveyAnnouncement, Announcement, AnnouncementAppearance, AnnouncementButton, AnnouncementCompany, AnnouncementListFilters, AnnouncementListResponse, AnnouncementPayload, AnnouncementTargetingRuleUrl, AnnouncementTargetingRules, AnnouncementType, AnnouncementVisualStatus, BannerAnnouncementPayload, CompanyBooleanConfigKey, CompanyConfigKey, CompanyConfigResponse, CompanyData, CompanyJsonConfigKey, CompanyQueue, CompanyResponse, CompanyStringConfigKey, CompanyWithConfigsResponse, CreateAnnouncementRequest, CreateSurveyResponseRequest, GenerateTwoFactorOtpRequest, GenerateTwoFactorOtpResponse, GetAllUsersParams, GetAllUsersResponse, GetManagedUsersResponse, GetSupportWidgetIdResponse, GetUserByIdResponse, ListUsersInclude, ListUsersProfile, ListUsersRequest, ListUsersResponse, ListUsersStatus, ListUsersType, ManagedUser, StrongPasswordOptions, StrongPasswordOptionsResponse, SurveyAnnouncementPayload, SurveyAnswer, SurveyAnswerValue, SurveyAppearance, SurveyCompletion, SurveyMultipleChoiceQuestion, SurveyMultipleChoiceQuestionConfig, SurveyPlacement, SurveyQuestion, SurveyQuestionOption, SurveyRatingQuestion, SurveyRatingQuestionConfig, SurveyReactionQuestion, SurveyReactionQuestionConfig, SurveyResponse, SurveyResponseAnswer, SurveyResponseAnswerOption, SurveyResponseListFilters, SurveyResponseListResponse, SurveySingleChoiceQuestion, SurveySingleChoiceQuestionConfig, SurveyTextQuestion, SurveyTextQuestionConfig, UpdateAnnouncementRequest, UpdateAnnouncementStatusRequest, UpdateCompanyBooleanConfigRequest, UpdateCompanyJsonConfigRequest, UpdateCompanyRequest, UpdateCompanyStringConfigRequest, UpdateCompanyUserAvatarResponse, UpdateCompanyUserRequest, UpdateSupportWidgetIdRequest, UpdateSupportWidgetIdResponse, UpdateUserPasswordRequest, UpdateUserPasswordResponse, User, UserBond, UserProfile, ValidateTwoFactorOtpRequest, ValidateTwoFactorOtpResponse, WorkGroup, WorkGroupListResponse, WorkGroupMember, WorkGroupMembersResponse, WorkGroupResponse };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../src/customer-service/contracts/index.ts"],"sourcesContent":["export * from './work-group';\nexport * from './company';\nexport * from './company-config';\nexport * from './company-queue';\nexport * from './user';\nexport * from './announcement';\nexport * from './authenticate';\n"],"mappings":";;;;;;;;;;;;;;;;AAAA;AAAA;","names":[]}
|
|
1
|
+
{"version":3,"sources":["../../../src/customer-service/contracts/index.ts"],"sourcesContent":["export * from './work-group';\nexport * from './company';\nexport * from './company-config';\nexport * from './company-queue';\nexport * from './user';\nexport * from './announcement';\nexport * from './survey-response';\nexport * from './authenticate';\n"],"mappings":";;;;;;;;;;;;;;;;AAAA;AAAA;","names":[]}
|
package/dist/index.d.mts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { AxiosInstance } from 'axios';
|
|
2
|
-
import { CompanyResponse, UpdateCompanyRequest, GetSupportWidgetIdResponse, UpdateSupportWidgetIdRequest, UpdateSupportWidgetIdResponse, CompanyQueue, CompanyWithConfigsResponse, StrongPasswordOptionsResponse, CompanyConfigKey, CompanyConfigResponse, CompanyJsonConfigKey, UpdateCompanyJsonConfigRequest, CompanyBooleanConfigKey, UpdateCompanyBooleanConfigRequest, CompanyStringConfigKey, UpdateCompanyStringConfigRequest, User, ListUsersRequest, ListUsersResponse, WorkGroupListResponse, WorkGroupResponse, UserProfile, WorkGroupMembersResponse, GetAllUsersParams, GetAllUsersResponse, GetManagedUsersResponse, GetUserByIdResponse, UpdateCompanyUserRequest, UpdateUserPasswordRequest, UpdateUserPasswordResponse, UpdateCompanyUserAvatarResponse, GenerateTwoFactorOtpRequest, GenerateTwoFactorOtpResponse, ValidateTwoFactorOtpRequest, ValidateTwoFactorOtpResponse, AnnouncementListFilters, AnnouncementListResponse, Announcement, CreateAnnouncementRequest, UpdateAnnouncementRequest, UpdateAnnouncementStatusRequest, AnnouncementType, ActiveAnnouncementQuery, ActiveAnnouncement } from './customer-service/contracts/index.mjs';
|
|
3
|
-
export { AnnouncementAppearance, AnnouncementButton, AnnouncementCompany, AnnouncementPayload, AnnouncementTargetingRuleUrl, AnnouncementTargetingRules, AnnouncementVisualStatus, CompanyData, ListUsersInclude, ListUsersProfile, ListUsersStatus, ListUsersType, ManagedUser, StrongPasswordOptions, UserBond, WorkGroup, WorkGroupMember } from './customer-service/contracts/index.mjs';
|
|
2
|
+
import { CompanyResponse, UpdateCompanyRequest, GetSupportWidgetIdResponse, UpdateSupportWidgetIdRequest, UpdateSupportWidgetIdResponse, CompanyQueue, CompanyWithConfigsResponse, StrongPasswordOptionsResponse, CompanyConfigKey, CompanyConfigResponse, CompanyJsonConfigKey, UpdateCompanyJsonConfigRequest, CompanyBooleanConfigKey, UpdateCompanyBooleanConfigRequest, CompanyStringConfigKey, UpdateCompanyStringConfigRequest, User, ListUsersRequest, ListUsersResponse, WorkGroupListResponse, WorkGroupResponse, UserProfile, WorkGroupMembersResponse, GetAllUsersParams, GetAllUsersResponse, GetManagedUsersResponse, GetUserByIdResponse, UpdateCompanyUserRequest, UpdateUserPasswordRequest, UpdateUserPasswordResponse, UpdateCompanyUserAvatarResponse, GenerateTwoFactorOtpRequest, GenerateTwoFactorOtpResponse, ValidateTwoFactorOtpRequest, ValidateTwoFactorOtpResponse, AnnouncementListFilters, AnnouncementListResponse, Announcement, CreateAnnouncementRequest, UpdateAnnouncementRequest, UpdateAnnouncementStatusRequest, AnnouncementType, ActiveAnnouncementQuery, ActiveAnnouncement, CreateSurveyResponseRequest, SurveyResponse, SurveyResponseListFilters, SurveyResponseListResponse } from './customer-service/contracts/index.mjs';
|
|
3
|
+
export { ActiveBannerAnnouncement, ActiveSurveyAnnouncement, AnnouncementAppearance, AnnouncementButton, AnnouncementCompany, AnnouncementPayload, AnnouncementTargetingRuleUrl, AnnouncementTargetingRules, AnnouncementVisualStatus, BannerAnnouncementPayload, CompanyData, ListUsersInclude, ListUsersProfile, ListUsersStatus, ListUsersType, ManagedUser, StrongPasswordOptions, SurveyAnnouncementPayload, SurveyAnswer, SurveyAnswerValue, SurveyAppearance, SurveyCompletion, SurveyMultipleChoiceQuestion, SurveyMultipleChoiceQuestionConfig, SurveyPlacement, SurveyQuestion, SurveyQuestionOption, SurveyRatingQuestion, SurveyRatingQuestionConfig, SurveyReactionQuestion, SurveyReactionQuestionConfig, SurveyResponseAnswer, SurveyResponseAnswerOption, SurveySingleChoiceQuestion, SurveySingleChoiceQuestionConfig, SurveyTextQuestion, SurveyTextQuestionConfig, UserBond, WorkGroup, WorkGroupMember } from './customer-service/contracts/index.mjs';
|
|
4
4
|
import { ProviderListResponse, Config, GetProviderConfigurationsParams, ProviderConfigurationsResponse, GetProviderDisplayInfoParams, ProviderDisplayInfoResponse, GetConfigsByProviderParams, ConfigListByProviderResponse, Queue, GetMemberQueuesRequest, QueueMember, GetServiceGroupsParams, ServiceGroupsResponse, MetaTemplateConfigResponse, MetaTemplateConfigsResponse, FindOrCreateQueueRuleRequest, QueueRule, GetRootRulesRequest, RootRulesResponse } from './chat-config/contracts/index.mjs';
|
|
5
5
|
export { ConfigProvider, DistributionType, MetaTemplateButton, Provider, ProviderConfiguration, ProviderName, QueueListResponse, Rule, ServiceGroup, WhatsAppProviderSettings, WidgetProviderSettings } from './chat-config/contracts/index.mjs';
|
|
6
6
|
import { CampaignQueryParams, CampaignPaginatedResponse, Campaign, CreateCampaignRequest, PatchCampaignRequest, CampaignContactQueryParams, CampaignContactPaginatedResponse, CampaignContactResponse, CreateCampaignContactRequest, PatchCampaignContactRequest, CampaignContactsDashboardQueryParams, CampaignContactsDashboardData, CampaignUser, CampaignWorkGroupQueryParams, CampaignWorkGroupPaginatedResponse, CreateCampaignWorkGroupRequest, CampaignWorkGroup, CampaignCompanyQueryParams, CampaignCompanyPaginatedResponse, CampaignCompanyResponse, EnableCampaignCompanyRequest, CampaignAccessResponse } from './campaigns/contracts/index.mjs';
|
|
@@ -23,8 +23,6 @@ import { GetCommentHistoryRequest, CommentHistoryPage, CasePermissions, UpdateCa
|
|
|
23
23
|
export { CaseListItem, CasePermissionsValue, CommentHistoryChangeType, CommentHistoryCursor, CommentHistoryEntry, ListCasesCursor, TimeEntryCursor } from './cases/contracts/index.mjs';
|
|
24
24
|
import { GetAccessPackagesParams, PaginatedResult, AccessPackage, GetCompanyAccessPackagesParams, CompanyAccessPackageItem, CreateCompanyAccessPackagePayload, UpdateCompanyAccessPackagePayload, GetCompanyResourcesParams, CompanyResource } from './access-hub/contracts/index.mjs';
|
|
25
25
|
export { AccessGroup, AccessPackageGroup } from './access-hub/contracts/index.mjs';
|
|
26
|
-
import { GetSystemNotificationsParams, GetSystemNotificationsResponse, GetUserDevicesParams, GetUserDevicesResponse, RegisterUserDeviceRequest, RegisterUserDeviceResponse, DeleteUserDeviceResponse, GetUserPreferencesParams, UserPreference, CreateUserPreferenceRequest, DeleteUserPreferenceParams, DeleteUserPreferenceResponse } from './notifications/contracts/index.mjs';
|
|
27
|
-
export { DeviceType, SystemNotification, SystemNotificationType, UserDevice, UserPreferenceDevice, UserPreferenceSystemNotification } from './notifications/contracts/index.mjs';
|
|
28
26
|
export { Event } from './rh/contracts/index.mjs';
|
|
29
27
|
|
|
30
28
|
/**
|
|
@@ -227,6 +225,20 @@ declare class CustomerServiceGateway {
|
|
|
227
225
|
* @returns The active announcements for the widget.
|
|
228
226
|
*/
|
|
229
227
|
findActiveAnnouncements(query: ActiveAnnouncementQuery): Promise<ActiveAnnouncement[]>;
|
|
228
|
+
/**
|
|
229
|
+
* Submits one response to a survey announcement.
|
|
230
|
+
* @param announcementId - The unique identifier of the survey announcement.
|
|
231
|
+
* @param payload - The subject identifier and validated survey answers.
|
|
232
|
+
* @returns The persisted survey response.
|
|
233
|
+
*/
|
|
234
|
+
submitSurveyResponse(announcementId: string, payload: CreateSurveyResponseRequest): Promise<SurveyResponse>;
|
|
235
|
+
/**
|
|
236
|
+
* Retrieves paginated responses for a survey announcement.
|
|
237
|
+
* @param announcementId - The unique identifier of the survey announcement.
|
|
238
|
+
* @param query - Pagination options for the administrative list.
|
|
239
|
+
* @returns Paginated survey responses.
|
|
240
|
+
*/
|
|
241
|
+
findSurveyResponses(announcementId: string, query?: SurveyResponseListFilters): Promise<SurveyResponseListResponse>;
|
|
230
242
|
}
|
|
231
243
|
|
|
232
244
|
/**
|
|
@@ -816,60 +828,6 @@ declare class AccessHubGateway {
|
|
|
816
828
|
getCompanyResources(params: GetCompanyResourcesParams): Promise<CompanyResource[]>;
|
|
817
829
|
}
|
|
818
830
|
|
|
819
|
-
/**
|
|
820
|
-
* Gateway for interacting with the Notifications API.
|
|
821
|
-
*/
|
|
822
|
-
declare class NotificationsGateway {
|
|
823
|
-
private readonly httpClient;
|
|
824
|
-
private readonly baseUrl;
|
|
825
|
-
constructor(httpClient: AxiosInstance, baseUrl: string);
|
|
826
|
-
/**
|
|
827
|
-
* Returns the catalog of available system notifications with their types and metadata.
|
|
828
|
-
* @param params - Optional filters by type slug or type ID.
|
|
829
|
-
* @returns A list of system notifications and the total count.
|
|
830
|
-
*/
|
|
831
|
-
getSystemNotifications(params?: GetSystemNotificationsParams): Promise<GetSystemNotificationsResponse>;
|
|
832
|
-
/**
|
|
833
|
-
* Lists push notification devices registered for the authenticated user.
|
|
834
|
-
* @param params - Optional filters, pagination and service-token context.
|
|
835
|
-
* @returns A list of user devices and the total count.
|
|
836
|
-
*/
|
|
837
|
-
getUserDevices(params?: GetUserDevicesParams): Promise<GetUserDevicesResponse>;
|
|
838
|
-
/**
|
|
839
|
-
* Registers or updates a push notification token for a user device.
|
|
840
|
-
* Idempotent via findOrCreate on deviceToken.
|
|
841
|
-
* @param payload - Device token and either deviceSlug or deviceId.
|
|
842
|
-
* @returns The registered device summary.
|
|
843
|
-
*/
|
|
844
|
-
registerUserDevice(payload: RegisterUserDeviceRequest): Promise<RegisterUserDeviceResponse>;
|
|
845
|
-
/**
|
|
846
|
-
* Deletes a registered user device and its notification token.
|
|
847
|
-
* @param id - UUID of the user device record.
|
|
848
|
-
* @returns Confirmation of deletion.
|
|
849
|
-
*/
|
|
850
|
-
deleteUserDevice(id: string): Promise<DeleteUserDeviceResponse>;
|
|
851
|
-
/**
|
|
852
|
-
* Lists active notification preferences for the user, optionally filtered by device.
|
|
853
|
-
* @param params - Optional filters and service-token context.
|
|
854
|
-
* @returns A list of user preferences.
|
|
855
|
-
*/
|
|
856
|
-
getUserPreferences(params?: GetUserPreferencesParams): Promise<UserPreference[]>;
|
|
857
|
-
/**
|
|
858
|
-
* Creates or activates a notification preference for a user device.
|
|
859
|
-
* Idempotent via findOrCreate on the user/device/notification combination.
|
|
860
|
-
* @param payload - Device ID and either systemNotificationSlug or systemNotificationId.
|
|
861
|
-
* @returns The created or existing preference.
|
|
862
|
-
*/
|
|
863
|
-
createUserPreference(payload: CreateUserPreferenceRequest): Promise<UserPreference>;
|
|
864
|
-
/**
|
|
865
|
-
* Deletes a notification preference by its ID.
|
|
866
|
-
* @param id - UUID of the preference in `user_notification_preferences`.
|
|
867
|
-
* @param params - Optional companyId/userId for Service Token context.
|
|
868
|
-
* @returns Confirmation of deletion.
|
|
869
|
-
*/
|
|
870
|
-
deleteUserPreference(id: string, params?: DeleteUserPreferenceParams): Promise<DeleteUserPreferenceResponse>;
|
|
871
|
-
}
|
|
872
|
-
|
|
873
831
|
/**
|
|
874
832
|
* Maps service identifiers to their corresponding gateway types.
|
|
875
833
|
* Used by the `gateway()` function to infer the correct return type
|
|
@@ -892,7 +850,6 @@ type GatewayMap = {
|
|
|
892
850
|
cases: CasesGateway;
|
|
893
851
|
rh: RhGateway;
|
|
894
852
|
'access-hub': AccessHubGateway;
|
|
895
|
-
notifications: NotificationsGateway;
|
|
896
853
|
};
|
|
897
854
|
/**
|
|
898
855
|
* Parameters required to configure the SDK client.
|
|
@@ -944,9 +901,6 @@ interface GatewayClientParams {
|
|
|
944
901
|
accessHub?: {
|
|
945
902
|
baseUrl: string;
|
|
946
903
|
};
|
|
947
|
-
notifications?: {
|
|
948
|
-
baseUrl: string;
|
|
949
|
-
};
|
|
950
904
|
};
|
|
951
905
|
}
|
|
952
906
|
|
|
@@ -964,7 +918,6 @@ declare const SERVICE_GATEWAYS: {
|
|
|
964
918
|
readonly CASES: "cases";
|
|
965
919
|
readonly RH: "rh";
|
|
966
920
|
readonly ACCESS_HUB: "access-hub";
|
|
967
|
-
readonly NOTIFICATIONS: "notifications";
|
|
968
921
|
};
|
|
969
922
|
type SERVICE_GATEWAYS = (typeof SERVICE_GATEWAYS)[keyof typeof SERVICE_GATEWAYS];
|
|
970
923
|
|
|
@@ -991,4 +944,4 @@ declare const configure: (params: GatewayClientParams) => void;
|
|
|
991
944
|
*/
|
|
992
945
|
declare function gateway<T extends keyof GatewayMap>(service: T): GatewayMap[T];
|
|
993
946
|
|
|
994
|
-
export { AccessPackage, ActiveAnnouncement, ActiveAnnouncementQuery, Announcement, AnnouncementListFilters, AnnouncementListResponse, AnnouncementType, AttachmentByIdResponse, AudioConvertResponse, AutomationPartner, AutomationPartnerAction, CallEndpoint, CallReportCompanyUsageRequest, CallReportCompanyUsageResponse, Campaign, CampaignAccessResponse, CampaignCompanyPaginatedResponse, CampaignCompanyQueryParams, CampaignCompanyResponse, CampaignContactPaginatedResponse, CampaignContactQueryParams, CampaignContactResponse, CampaignContactsDashboardData, CampaignContactsDashboardQueryParams, CampaignPaginatedResponse, CampaignQueryParams, CampaignUser, CampaignWorkGroup, CampaignWorkGroupPaginatedResponse, CampaignWorkGroupQueryParams, CancelInvitationRequest, CaseFeedByActionItem, CasePermissions, CaseTimeEntry, ChatWebserviceCompanyUsageRequest, ChatWebserviceCompanyUsageResponse, CloneCaseRequest, ClonedCase, CommentHistoryPage, CompanyAccessPackageItem, CompanyBooleanConfigKey, CompanyConfigKey, CompanyConfigResponse, CompanyJsonConfigKey, CompanyQueue, CompanyResource, CompanyResponse, CompanyStringConfigKey, CompanyWithConfigsResponse, Config, ConfigListByProviderResponse, ContactCategoryResponse, ContactHistoryResponse, ContactPhoneSearchResponse, ContactResponse, CreateAnnouncementRequest, CreateAutomationPartnerRequest, CreateCampaignContactRequest, CreateCampaignRequest, CreateCampaignWorkGroupRequest, CreateCompanyAccessPackagePayload, CreateIntegrationActionRequest, CreateIntegrationFieldRequest, CreateIntegrationPartnerRequest,
|
|
947
|
+
export { AccessPackage, ActiveAnnouncement, ActiveAnnouncementQuery, Announcement, AnnouncementListFilters, AnnouncementListResponse, AnnouncementType, AttachmentByIdResponse, AudioConvertResponse, AutomationPartner, AutomationPartnerAction, CallEndpoint, CallReportCompanyUsageRequest, CallReportCompanyUsageResponse, Campaign, CampaignAccessResponse, CampaignCompanyPaginatedResponse, CampaignCompanyQueryParams, CampaignCompanyResponse, CampaignContactPaginatedResponse, CampaignContactQueryParams, CampaignContactResponse, CampaignContactsDashboardData, CampaignContactsDashboardQueryParams, CampaignPaginatedResponse, CampaignQueryParams, CampaignUser, CampaignWorkGroup, CampaignWorkGroupPaginatedResponse, CampaignWorkGroupQueryParams, CancelInvitationRequest, CaseFeedByActionItem, CasePermissions, CaseTimeEntry, ChatWebserviceCompanyUsageRequest, ChatWebserviceCompanyUsageResponse, CloneCaseRequest, ClonedCase, CommentHistoryPage, CompanyAccessPackageItem, CompanyBooleanConfigKey, CompanyConfigKey, CompanyConfigResponse, CompanyJsonConfigKey, CompanyQueue, CompanyResource, CompanyResponse, CompanyStringConfigKey, CompanyWithConfigsResponse, Config, ConfigListByProviderResponse, ContactCategoryResponse, ContactHistoryResponse, ContactPhoneSearchResponse, ContactResponse, CreateAnnouncementRequest, CreateAutomationPartnerRequest, CreateCampaignContactRequest, CreateCampaignRequest, CreateCampaignWorkGroupRequest, CreateCompanyAccessPackagePayload, CreateIntegrationActionRequest, CreateIntegrationFieldRequest, CreateIntegrationPartnerRequest, CreateSurveyResponseRequest, CreateTimeEntryRequest, CreateWebhookRequest$1 as CreateWebhookRequest, DeleteIntegrationActionParams, DeleteIntegrationFieldParams, DeleteIntegrationPartnerParams, DeleteTimeEntryRequest, EnableCampaignCompanyRequest, FindOrCreateContactRequest, FindOrCreateQueueRuleRequest, FlowCatalogParams, FlowCatalogResponse, FlowDefinition, FlowReadiness, ForwardMessageRequest, GenerateTwoFactorOtpRequest, GenerateTwoFactorOtpResponse, GetAccessPackagesParams, GetAllUsersParams, GetAllUsersResponse, GetAttachmentByIdRequest, GetAutomationPartnerRequest, GetCaseFeedByActionsRequest, GetCommentHistoryRequest, GetCompanyAccessPackagesParams, GetCompanyResourcesParams, GetConfigTemplatesParams, GetConfigTemplatesResponse, GetConfigsByProviderParams, GetContactPhonesParams, GetInitialContextRequest, GetInitialContextResponse, GetIntegrationHooksCatalogRequest, GetIntegrationPartnersByCompanyRequest, GetManagedUsersResponse, GetMemberQueuesRequest, GetMessagesByCursorRequest, GetMessagesByCursorResponse, GetPresignedUrlRequest, GetProviderConfigurationsParams, GetProviderDisplayInfoParams, GetRoomByIdRequest, GetRootRulesRequest, GetServiceGroupsParams, GetSupportWidgetIdResponse, GetUserByIdResponse, GetWebhooksByCompanyRequest$1 as GetWebhooksByCompanyRequest, HookCatalogItem, IntegrationAction, IntegrationField, IntegrationPartner, InvitationResponse, ListAutomationActionsRequest, ListAutomationPartnersRequest, ListCasesRequest, ListCasesResponse, ListContactHistoryRequest, ListInvitationsRequest, ListLiveUserRoomsRequest, ListTimeEntriesPage, ListTimeEntriesRequest, ListUsersRequest, ListUsersResponse, LiveUserRoomResponse, MarkMessagesAsReadRequest, MarkMessagesAsReadResponse, MessageResponse, MetaTemplateConfigResponse, MetaTemplateConfigsResponse, PaginatedResult, PatchCampaignContactRequest, PatchCampaignRequest, ProviderConfigurationsResponse, ProviderDisplayInfoResponse, ProviderListResponse, Queue, QueueMember, QueueRule, ReplyInvitationRequest, RoomMemberResponse, RoomResponse, RootRulesResponse, SERVICE_GATEWAYS, SERVICE_GATEWAYS as SERVICE_GATEWAYS_TYPE, SendAttachmentMessageResponse, SendMessageRequest, ServiceGroupsResponse, StrongPasswordOptionsResponse, SurveyResponse, SurveyResponseListFilters, SurveyResponseListResponse, UpdateAnnouncementRequest, UpdateAnnouncementStatusRequest, UpdateCasePermissionsRequest, UpdateCompanyAccessPackagePayload, UpdateCompanyBooleanConfigRequest, UpdateCompanyJsonConfigRequest, UpdateCompanyRequest, UpdateCompanyStringConfigRequest, UpdateCompanyUserAvatarResponse, UpdateCompanyUserRequest, UpdateIntegrationActionParams, UpdateIntegrationFieldParams, UpdateMemberInRoomRequest, UpdateSupportWidgetIdRequest, UpdateSupportWidgetIdResponse, UpdateTimeEntryRequest, UpdateUserPasswordRequest, UpdateUserPasswordResponse, UploadPresignedUrlResponse, User, UserProfile, ValidateTwoFactorOtpRequest, ValidateTwoFactorOtpResponse, WorkGroupListResponse, WorkGroupMembersResponse, WorkGroupResponse, configure, gateway };
|