@opens/gateways 1.16.7 → 1.16.9
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 +246 -9
- package/dist/customer-service/contracts/index.d.ts +246 -9
- package/dist/customer-service/contracts/index.js.map +1 -1
- package/dist/index.d.mts +17 -3
- package/dist/index.d.ts +17 -3
- package/dist/index.js +26 -0
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +26 -0
- package/dist/index.mjs.map +1 -1
- package/package.json +2 -2
|
@@ -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,88 @@ 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
|
+
/** Answers submitted by the subject. */
|
|
756
|
+
answers: SurveyAnswer[];
|
|
757
|
+
}
|
|
758
|
+
/** A persisted response to a survey announcement. */
|
|
759
|
+
interface SurveyResponse {
|
|
760
|
+
/** Unique response identifier. */
|
|
761
|
+
id: string;
|
|
762
|
+
/** Identifier of the answered survey announcement. */
|
|
763
|
+
announcementId: string;
|
|
764
|
+
/** Identifier of the authenticated company. */
|
|
765
|
+
companyId: string;
|
|
766
|
+
/** Stable identifier of the responding subject. */
|
|
767
|
+
subjectId: string;
|
|
768
|
+
/** Validated answers submitted by the subject. */
|
|
769
|
+
answers: SurveyAnswer[];
|
|
770
|
+
/** ISO date when the response was submitted. */
|
|
771
|
+
submittedAt: string;
|
|
772
|
+
/** ISO date when the response was created. */
|
|
773
|
+
createdAt: string;
|
|
774
|
+
/** ISO date when the response was last updated. */
|
|
775
|
+
updatedAt: string;
|
|
776
|
+
}
|
|
777
|
+
/** Query parameters for the administrative survey-response list. */
|
|
778
|
+
interface SurveyResponseListFilters {
|
|
779
|
+
/** One-based page number. */
|
|
780
|
+
page?: number;
|
|
781
|
+
/** Maximum number of responses per page. */
|
|
782
|
+
limit?: number;
|
|
783
|
+
}
|
|
784
|
+
/** Paginated responses returned for a survey announcement. */
|
|
785
|
+
interface SurveyResponseListResponse {
|
|
786
|
+
/** Total matching responses. */
|
|
787
|
+
count: number;
|
|
788
|
+
/** Responses for the requested page. */
|
|
789
|
+
rows: SurveyResponse[];
|
|
553
790
|
}
|
|
554
791
|
|
|
555
792
|
/** Request payload for generating a two-factor OTP secret URL. */
|
|
@@ -570,4 +807,4 @@ interface ValidateTwoFactorOtpResponse {
|
|
|
570
807
|
validate: boolean;
|
|
571
808
|
}
|
|
572
809
|
|
|
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 };
|
|
810
|
+
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, 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 };
|
|
@@ -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,88 @@ 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
|
+
/** Answers submitted by the subject. */
|
|
756
|
+
answers: SurveyAnswer[];
|
|
757
|
+
}
|
|
758
|
+
/** A persisted response to a survey announcement. */
|
|
759
|
+
interface SurveyResponse {
|
|
760
|
+
/** Unique response identifier. */
|
|
761
|
+
id: string;
|
|
762
|
+
/** Identifier of the answered survey announcement. */
|
|
763
|
+
announcementId: string;
|
|
764
|
+
/** Identifier of the authenticated company. */
|
|
765
|
+
companyId: string;
|
|
766
|
+
/** Stable identifier of the responding subject. */
|
|
767
|
+
subjectId: string;
|
|
768
|
+
/** Validated answers submitted by the subject. */
|
|
769
|
+
answers: SurveyAnswer[];
|
|
770
|
+
/** ISO date when the response was submitted. */
|
|
771
|
+
submittedAt: string;
|
|
772
|
+
/** ISO date when the response was created. */
|
|
773
|
+
createdAt: string;
|
|
774
|
+
/** ISO date when the response was last updated. */
|
|
775
|
+
updatedAt: string;
|
|
776
|
+
}
|
|
777
|
+
/** Query parameters for the administrative survey-response list. */
|
|
778
|
+
interface SurveyResponseListFilters {
|
|
779
|
+
/** One-based page number. */
|
|
780
|
+
page?: number;
|
|
781
|
+
/** Maximum number of responses per page. */
|
|
782
|
+
limit?: number;
|
|
783
|
+
}
|
|
784
|
+
/** Paginated responses returned for a survey announcement. */
|
|
785
|
+
interface SurveyResponseListResponse {
|
|
786
|
+
/** Total matching responses. */
|
|
787
|
+
count: number;
|
|
788
|
+
/** Responses for the requested page. */
|
|
789
|
+
rows: SurveyResponse[];
|
|
553
790
|
}
|
|
554
791
|
|
|
555
792
|
/** Request payload for generating a two-factor OTP secret URL. */
|
|
@@ -570,4 +807,4 @@ interface ValidateTwoFactorOtpResponse {
|
|
|
570
807
|
validate: boolean;
|
|
571
808
|
}
|
|
572
809
|
|
|
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 };
|
|
810
|
+
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, 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":[]}
|