@lessly/sdk-app 33.0.0 → 35.0.0

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 (44) hide show
  1. package/dist/analytics/index.d.cts +1 -1
  2. package/dist/analytics/index.d.ts +1 -1
  3. package/dist/brain/index.d.cts +1 -1
  4. package/dist/brain/index.d.ts +1 -1
  5. package/dist/{client.gen-B81KzIal.d.cts → client.gen-CvgJUdcU.d.cts} +1378 -90
  6. package/dist/{client.gen-B81KzIal.d.ts → client.gen-CvgJUdcU.d.ts} +1378 -90
  7. package/dist/consent/index.d.cts +1 -1
  8. package/dist/consent/index.d.ts +1 -1
  9. package/dist/deployment/index.d.cts +1 -1
  10. package/dist/deployment/index.d.ts +1 -1
  11. package/dist/index.cjs +181 -0
  12. package/dist/index.cjs.map +1 -1
  13. package/dist/index.d.cts +1 -1
  14. package/dist/index.d.ts +1 -1
  15. package/dist/index.js +181 -0
  16. package/dist/index.js.map +1 -1
  17. package/dist/mail/index.d.cts +2 -2
  18. package/dist/mail/index.d.ts +2 -2
  19. package/dist/observe/index.d.cts +1 -1
  20. package/dist/observe/index.d.ts +1 -1
  21. package/dist/organization/index.d.cts +1 -1
  22. package/dist/organization/index.d.ts +1 -1
  23. package/dist/playground/index.d.cts +1 -1
  24. package/dist/playground/index.d.ts +1 -1
  25. package/dist/realtime/index.d.cts +1 -1
  26. package/dist/realtime/index.d.ts +1 -1
  27. package/dist/support/index.cjs +55 -0
  28. package/dist/support/index.cjs.map +1 -1
  29. package/dist/support/index.d.cts +46 -2
  30. package/dist/support/index.d.ts +46 -2
  31. package/dist/support/index.js +45 -1
  32. package/dist/support/index.js.map +1 -1
  33. package/dist/tracking/index.d.cts +1 -1
  34. package/dist/tracking/index.d.ts +1 -1
  35. package/dist/users/index.d.cts +1 -1
  36. package/dist/users/index.d.ts +1 -1
  37. package/dist/waitlist/index.d.cts +1 -1
  38. package/dist/waitlist/index.d.ts +1 -1
  39. package/package.json +2 -2
  40. package/src/gen/bindings.gen.ts +181 -0
  41. package/src/gen/client.gen.ts +37 -0
  42. package/src/gen/support/index.ts +1 -1
  43. package/src/gen/support/queryOptions.gen.ts +71 -0
  44. package/src/gen/types.gen.ts +1273 -5
@@ -16170,6 +16170,323 @@ authorExternalId: (string | null)
16170
16170
  nextCursor: (string | null)
16171
16171
  }
16172
16172
 
16173
+ export interface SupportResponseEscalateInput {
16174
+ /**
16175
+ * Response id
16176
+ */
16177
+ id: string
16178
+ }
16179
+
16180
+ export interface SupportResponseEscalateOutput {
16181
+ /**
16182
+ * The feedback thread that was opened
16183
+ */
16184
+ thread: {
16185
+ /**
16186
+ * Thread id
16187
+ */
16188
+ id: string
16189
+ /**
16190
+ * ticket: the end user wants something fixed. feedback: unsolicited input
16191
+ */
16192
+ type: ("ticket" | "feedback")
16193
+ /**
16194
+ * Thread subject
16195
+ */
16196
+ title: string
16197
+ /**
16198
+ * Every label on the thread, by name
16199
+ */
16200
+ labels: {
16201
+ /**
16202
+ * Label id
16203
+ */
16204
+ id: string
16205
+ /**
16206
+ * Label name, unique within the product
16207
+ */
16208
+ name: string
16209
+ /**
16210
+ * Display colour as a hex string, or null if uncoloured
16211
+ */
16212
+ color: (string | null)
16213
+ /**
16214
+ * ISO-8601 creation timestamp
16215
+ */
16216
+ createdAt: string
16217
+ }[]
16218
+ /**
16219
+ * The score the client supplied at creation, or null while the thread is unrated
16220
+ */
16221
+ rating: (number | null)
16222
+ /**
16223
+ * The status itself, joined in at read time
16224
+ */
16225
+ status: {
16226
+ /**
16227
+ * Status id
16228
+ */
16229
+ id: string
16230
+ /**
16231
+ * Status name, unique within the product
16232
+ */
16233
+ name: string
16234
+ /**
16235
+ * Display colour as a hex string
16236
+ */
16237
+ color: string
16238
+ /**
16239
+ * Sort order within the status dictionary
16240
+ */
16241
+ order: number
16242
+ /**
16243
+ * Archived statuses stay readable but are not offered as targets
16244
+ */
16245
+ archived: boolean
16246
+ /**
16247
+ * Lifecycle bucket the status belongs to
16248
+ */
16249
+ category: ("open" | "pending" | "resolved" | "closed")
16250
+ }
16251
+ /**
16252
+ * Free-form client-owned JSON
16253
+ */
16254
+ metadata: {
16255
+ [k: string]: unknown
16256
+ }
16257
+ /**
16258
+ * Thread priority
16259
+ */
16260
+ priority: ("low" | "normal" | "high" | "urgent")
16261
+ /**
16262
+ * Id of the status the thread sits on
16263
+ */
16264
+ statusId: string
16265
+ /**
16266
+ * ISO-8601 creation timestamp
16267
+ */
16268
+ createdAt: string
16269
+ /**
16270
+ * ISO-8601 last-modification timestamp
16271
+ */
16272
+ updatedAt: string
16273
+ /**
16274
+ * ISO-8601 timestamp of the last reply, or null while there are none
16275
+ */
16276
+ lastReplyAt: (string | null)
16277
+ /**
16278
+ * Display name for the external author, if given
16279
+ */
16280
+ authorDisplay: (string | null)
16281
+ /**
16282
+ * Assigned agent, or null while unassigned
16283
+ */
16284
+ assignedAgentId: (string | null)
16285
+ /**
16286
+ * The external author, byte-identical to what was stored
16287
+ */
16288
+ authorExternalId: string
16289
+ }
16290
+ /**
16291
+ * The response, with escalatedThreadId now set
16292
+ */
16293
+ response: {
16294
+ /**
16295
+ * Response id
16296
+ */
16297
+ id: string
16298
+ /**
16299
+ * The answer of the first nps or rating question, raw and never rescaled, or null when neither was answered. Null is not zero — 0 is a real score at the bottom of an NPS scale
16300
+ */
16301
+ score: (number | null)
16302
+ /**
16303
+ * Answers keyed by question id, exactly as stored
16304
+ */
16305
+ answers: {
16306
+ [k: string]: unknown
16307
+ }
16308
+ /**
16309
+ * Free-form client-owned JSON
16310
+ */
16311
+ metadata: {
16312
+ [k: string]: unknown
16313
+ }
16314
+ /**
16315
+ * The survey that was answered
16316
+ */
16317
+ surveyId: string
16318
+ /**
16319
+ * Whether the respondent reached the end
16320
+ */
16321
+ completed: boolean
16322
+ /**
16323
+ * ISO-8601 creation timestamp
16324
+ */
16325
+ createdAt: string
16326
+ /**
16327
+ * ISO-8601 last-modification timestamp
16328
+ */
16329
+ updatedAt: string
16330
+ /**
16331
+ * The respondent, byte-identical to what was stored
16332
+ */
16333
+ authorExternalId: string
16334
+ /**
16335
+ * The feedback thread this response was escalated into, or null while it has not been
16336
+ */
16337
+ escalatedThreadId: (string | null)
16338
+ }
16339
+ }
16340
+
16341
+ export interface SupportResponseGetInput {
16342
+ /**
16343
+ * Response id
16344
+ */
16345
+ id: string
16346
+ }
16347
+
16348
+ export interface SupportResponseGetOutput {
16349
+ /**
16350
+ * Response id
16351
+ */
16352
+ id: string
16353
+ /**
16354
+ * The answer of the first nps or rating question, raw and never rescaled, or null when neither was answered. Null is not zero — 0 is a real score at the bottom of an NPS scale
16355
+ */
16356
+ score: (number | null)
16357
+ /**
16358
+ * Answers keyed by question id, exactly as stored
16359
+ */
16360
+ answers: {
16361
+ [k: string]: unknown
16362
+ }
16363
+ /**
16364
+ * Free-form client-owned JSON
16365
+ */
16366
+ metadata: {
16367
+ [k: string]: unknown
16368
+ }
16369
+ /**
16370
+ * The survey that was answered
16371
+ */
16372
+ surveyId: string
16373
+ /**
16374
+ * Whether the respondent reached the end
16375
+ */
16376
+ completed: boolean
16377
+ /**
16378
+ * ISO-8601 creation timestamp
16379
+ */
16380
+ createdAt: string
16381
+ /**
16382
+ * ISO-8601 last-modification timestamp
16383
+ */
16384
+ updatedAt: string
16385
+ /**
16386
+ * The respondent, byte-identical to what was stored
16387
+ */
16388
+ authorExternalId: string
16389
+ /**
16390
+ * The feedback thread this response was escalated into, or null while it has not been
16391
+ */
16392
+ escalatedThreadId: (string | null)
16393
+ }
16394
+
16395
+ export interface SupportResponseListInput {
16396
+ /**
16397
+ * Only responses created at or before this ISO-8601 timestamp
16398
+ */
16399
+ to?: string
16400
+ /**
16401
+ * Only responses created at or after this ISO-8601 timestamp
16402
+ */
16403
+ from?: string
16404
+ /**
16405
+ * Page size, 1..100 (default 25)
16406
+ */
16407
+ limit?: number
16408
+ /**
16409
+ * Number of responses to skip
16410
+ */
16411
+ offset?: number
16412
+ /**
16413
+ * Only responses scored at or below this value (inclusive). A response with no score matches neither bound — not even at the bottom of the scale
16414
+ */
16415
+ scoreMax?: number
16416
+ /**
16417
+ * Only responses scored at or above this value (inclusive). A response with no score matches neither bound — not even at the bottom of the scale
16418
+ */
16419
+ scoreMin?: number
16420
+ /**
16421
+ * Required: responses are always read one survey at a time
16422
+ */
16423
+ surveyId: string
16424
+ /**
16425
+ * true: only responses that reached the end. false: only partial ones
16426
+ */
16427
+ completed?: (boolean | ("true" | "false"))
16428
+ }
16429
+
16430
+ export interface SupportResponseListOutput {
16431
+ /**
16432
+ * Page size that was applied
16433
+ */
16434
+ limit: number
16435
+ /**
16436
+ * Offset that was applied
16437
+ */
16438
+ offset: number
16439
+ /**
16440
+ * The requested page of responses, newest first
16441
+ */
16442
+ responses: {
16443
+ /**
16444
+ * Response id
16445
+ */
16446
+ id: string
16447
+ /**
16448
+ * The answer of the first nps or rating question, raw and never rescaled, or null when neither was answered. Null is not zero — 0 is a real score at the bottom of an NPS scale
16449
+ */
16450
+ score: (number | null)
16451
+ /**
16452
+ * Answers keyed by question id, exactly as stored
16453
+ */
16454
+ answers: {
16455
+ [k: string]: unknown
16456
+ }
16457
+ /**
16458
+ * Free-form client-owned JSON
16459
+ */
16460
+ metadata: {
16461
+ [k: string]: unknown
16462
+ }
16463
+ /**
16464
+ * The survey that was answered
16465
+ */
16466
+ surveyId: string
16467
+ /**
16468
+ * Whether the respondent reached the end
16469
+ */
16470
+ completed: boolean
16471
+ /**
16472
+ * ISO-8601 creation timestamp
16473
+ */
16474
+ createdAt: string
16475
+ /**
16476
+ * ISO-8601 last-modification timestamp
16477
+ */
16478
+ updatedAt: string
16479
+ /**
16480
+ * The respondent, byte-identical to what was stored
16481
+ */
16482
+ authorExternalId: string
16483
+ /**
16484
+ * The feedback thread this response was escalated into, or null while it has not been
16485
+ */
16486
+ escalatedThreadId: (string | null)
16487
+ }[]
16488
+ }
16489
+
16173
16490
  export interface SupportStatusArchiveInput {
16174
16491
  /**
16175
16492
  * Status id
@@ -16343,6 +16660,957 @@ archived: boolean
16343
16660
  category: ("open" | "pending" | "resolved" | "closed")
16344
16661
  }
16345
16662
 
16663
+ export interface SupportSurveyArchiveInput {
16664
+ /**
16665
+ * Survey id
16666
+ */
16667
+ id: string
16668
+ }
16669
+
16670
+ export interface SupportSurveyArchiveOutput {
16671
+ /**
16672
+ * Survey id
16673
+ */
16674
+ id: string
16675
+ /**
16676
+ * What this survey is called
16677
+ */
16678
+ name: string
16679
+ /**
16680
+ * draft: editable, not answerable. published: answerable, frozen. archived: terminal, neither editable nor answerable, and there is no way back
16681
+ */
16682
+ status: ("draft" | "published" | "archived")
16683
+ /**
16684
+ * ISO-8601 creation timestamp
16685
+ */
16686
+ createdAt: string
16687
+ /**
16688
+ * The ordered question set, exactly as stored
16689
+ */
16690
+ questions: {
16691
+ /**
16692
+ * Client-owned id of the question, unique within the survey. Answers are keyed by it
16693
+ */
16694
+ id: string
16695
+ /**
16696
+ * Branching, radio only: option id -> the question id to jump to, or 'end' to finish. Targets must be later questions; publish refuses anything else
16697
+ */
16698
+ skip?: {
16699
+ [k: string]: string
16700
+ }
16701
+ /**
16702
+ * reaction: a free string the client owns (an emoji). text: free prose. radio: one option. checkbox: any number of options. rating: an integer on a declared scale. nps: an integer 0..10. statement: displayed, never answered
16703
+ */
16704
+ type: ("reaction" | "text" | "radio" | "checkbox" | "rating" | "nps" | "statement")
16705
+ /**
16706
+ * The question as the respondent reads it
16707
+ */
16708
+ label: string
16709
+ /**
16710
+ * The rating scale. rating only — nps is fixed 0..10
16711
+ */
16712
+ scale?: {
16713
+ /**
16714
+ * Top of the scale, at most 10
16715
+ */
16716
+ max: number
16717
+ /**
16718
+ * Bottom of the scale: 0 or 1
16719
+ */
16720
+ min: (0 | 1)
16721
+ }
16722
+ /**
16723
+ * The choices. radio and checkbox only
16724
+ *
16725
+ * @minItems 1
16726
+ * @maxItems 50
16727
+ */
16728
+ options?: [{
16729
+ /**
16730
+ * Client-owned id of the option, unique within the question
16731
+ */
16732
+ id: string
16733
+ /**
16734
+ * What the respondent reads
16735
+ */
16736
+ label: string
16737
+ }, ...({
16738
+ /**
16739
+ * Client-owned id of the option, unique within the question
16740
+ */
16741
+ id: string
16742
+ /**
16743
+ * What the respondent reads
16744
+ */
16745
+ label: string
16746
+ })[]]
16747
+ /**
16748
+ * When true, a response marked completed must answer it. Never valid on a statement
16749
+ */
16750
+ required?: boolean
16751
+ }[]
16752
+ /**
16753
+ * ISO-8601 last-modification timestamp
16754
+ */
16755
+ updatedAt: string
16756
+ }
16757
+
16758
+ export interface SupportSurveyCreateInput {
16759
+ /**
16760
+ * What this survey is called. It becomes the title of an escalated feedback thread
16761
+ */
16762
+ name: string
16763
+ /**
16764
+ * The initial question set. Omit it to open an empty draft and fill it in later
16765
+ *
16766
+ * @maxItems 100
16767
+ */
16768
+ questions?: {
16769
+ /**
16770
+ * Client-owned id of the question, unique within the survey. Answers are keyed by it
16771
+ */
16772
+ id: string
16773
+ /**
16774
+ * Branching, radio only: option id -> the question id to jump to, or 'end' to finish. Targets must be later questions; publish refuses anything else
16775
+ */
16776
+ skip?: {
16777
+ [k: string]: string
16778
+ }
16779
+ /**
16780
+ * reaction: a free string the client owns (an emoji). text: free prose. radio: one option. checkbox: any number of options. rating: an integer on a declared scale. nps: an integer 0..10. statement: displayed, never answered
16781
+ */
16782
+ type: ("reaction" | "text" | "radio" | "checkbox" | "rating" | "nps" | "statement")
16783
+ /**
16784
+ * The question as the respondent reads it
16785
+ */
16786
+ label: string
16787
+ /**
16788
+ * The rating scale. rating only — nps is fixed 0..10
16789
+ */
16790
+ scale?: {
16791
+ /**
16792
+ * Top of the scale, at most 10
16793
+ */
16794
+ max: number
16795
+ /**
16796
+ * Bottom of the scale: 0 or 1
16797
+ */
16798
+ min: (0 | 1)
16799
+ }
16800
+ /**
16801
+ * The choices. radio and checkbox only
16802
+ *
16803
+ * @minItems 1
16804
+ * @maxItems 50
16805
+ */
16806
+ options?: [{
16807
+ /**
16808
+ * Client-owned id of the option, unique within the question
16809
+ */
16810
+ id: string
16811
+ /**
16812
+ * What the respondent reads
16813
+ */
16814
+ label: string
16815
+ }, ...({
16816
+ /**
16817
+ * Client-owned id of the option, unique within the question
16818
+ */
16819
+ id: string
16820
+ /**
16821
+ * What the respondent reads
16822
+ */
16823
+ label: string
16824
+ })[]]
16825
+ /**
16826
+ * When true, a response marked completed must answer it. Never valid on a statement
16827
+ */
16828
+ required?: boolean
16829
+ }[]
16830
+ }
16831
+
16832
+ export interface SupportSurveyCreateOutput {
16833
+ /**
16834
+ * Survey id
16835
+ */
16836
+ id: string
16837
+ /**
16838
+ * What this survey is called
16839
+ */
16840
+ name: string
16841
+ /**
16842
+ * draft: editable, not answerable. published: answerable, frozen. archived: terminal, neither editable nor answerable, and there is no way back
16843
+ */
16844
+ status: ("draft" | "published" | "archived")
16845
+ /**
16846
+ * ISO-8601 creation timestamp
16847
+ */
16848
+ createdAt: string
16849
+ /**
16850
+ * The ordered question set, exactly as stored
16851
+ */
16852
+ questions: {
16853
+ /**
16854
+ * Client-owned id of the question, unique within the survey. Answers are keyed by it
16855
+ */
16856
+ id: string
16857
+ /**
16858
+ * Branching, radio only: option id -> the question id to jump to, or 'end' to finish. Targets must be later questions; publish refuses anything else
16859
+ */
16860
+ skip?: {
16861
+ [k: string]: string
16862
+ }
16863
+ /**
16864
+ * reaction: a free string the client owns (an emoji). text: free prose. radio: one option. checkbox: any number of options. rating: an integer on a declared scale. nps: an integer 0..10. statement: displayed, never answered
16865
+ */
16866
+ type: ("reaction" | "text" | "radio" | "checkbox" | "rating" | "nps" | "statement")
16867
+ /**
16868
+ * The question as the respondent reads it
16869
+ */
16870
+ label: string
16871
+ /**
16872
+ * The rating scale. rating only — nps is fixed 0..10
16873
+ */
16874
+ scale?: {
16875
+ /**
16876
+ * Top of the scale, at most 10
16877
+ */
16878
+ max: number
16879
+ /**
16880
+ * Bottom of the scale: 0 or 1
16881
+ */
16882
+ min: (0 | 1)
16883
+ }
16884
+ /**
16885
+ * The choices. radio and checkbox only
16886
+ *
16887
+ * @minItems 1
16888
+ * @maxItems 50
16889
+ */
16890
+ options?: [{
16891
+ /**
16892
+ * Client-owned id of the option, unique within the question
16893
+ */
16894
+ id: string
16895
+ /**
16896
+ * What the respondent reads
16897
+ */
16898
+ label: string
16899
+ }, ...({
16900
+ /**
16901
+ * Client-owned id of the option, unique within the question
16902
+ */
16903
+ id: string
16904
+ /**
16905
+ * What the respondent reads
16906
+ */
16907
+ label: string
16908
+ })[]]
16909
+ /**
16910
+ * When true, a response marked completed must answer it. Never valid on a statement
16911
+ */
16912
+ required?: boolean
16913
+ }[]
16914
+ /**
16915
+ * ISO-8601 last-modification timestamp
16916
+ */
16917
+ updatedAt: string
16918
+ }
16919
+
16920
+ export interface SupportSurveyGetInput {
16921
+ /**
16922
+ * Survey id
16923
+ */
16924
+ id: string
16925
+ }
16926
+
16927
+ export interface SupportSurveyGetOutput {
16928
+ /**
16929
+ * Survey id
16930
+ */
16931
+ id: string
16932
+ /**
16933
+ * What this survey is called
16934
+ */
16935
+ name: string
16936
+ /**
16937
+ * draft: editable, not answerable. published: answerable, frozen. archived: terminal, neither editable nor answerable, and there is no way back
16938
+ */
16939
+ status: ("draft" | "published" | "archived")
16940
+ /**
16941
+ * ISO-8601 creation timestamp
16942
+ */
16943
+ createdAt: string
16944
+ /**
16945
+ * The ordered question set, exactly as stored
16946
+ */
16947
+ questions: {
16948
+ /**
16949
+ * Client-owned id of the question, unique within the survey. Answers are keyed by it
16950
+ */
16951
+ id: string
16952
+ /**
16953
+ * Branching, radio only: option id -> the question id to jump to, or 'end' to finish. Targets must be later questions; publish refuses anything else
16954
+ */
16955
+ skip?: {
16956
+ [k: string]: string
16957
+ }
16958
+ /**
16959
+ * reaction: a free string the client owns (an emoji). text: free prose. radio: one option. checkbox: any number of options. rating: an integer on a declared scale. nps: an integer 0..10. statement: displayed, never answered
16960
+ */
16961
+ type: ("reaction" | "text" | "radio" | "checkbox" | "rating" | "nps" | "statement")
16962
+ /**
16963
+ * The question as the respondent reads it
16964
+ */
16965
+ label: string
16966
+ /**
16967
+ * The rating scale. rating only — nps is fixed 0..10
16968
+ */
16969
+ scale?: {
16970
+ /**
16971
+ * Top of the scale, at most 10
16972
+ */
16973
+ max: number
16974
+ /**
16975
+ * Bottom of the scale: 0 or 1
16976
+ */
16977
+ min: (0 | 1)
16978
+ }
16979
+ /**
16980
+ * The choices. radio and checkbox only
16981
+ *
16982
+ * @minItems 1
16983
+ * @maxItems 50
16984
+ */
16985
+ options?: [{
16986
+ /**
16987
+ * Client-owned id of the option, unique within the question
16988
+ */
16989
+ id: string
16990
+ /**
16991
+ * What the respondent reads
16992
+ */
16993
+ label: string
16994
+ }, ...({
16995
+ /**
16996
+ * Client-owned id of the option, unique within the question
16997
+ */
16998
+ id: string
16999
+ /**
17000
+ * What the respondent reads
17001
+ */
17002
+ label: string
17003
+ })[]]
17004
+ /**
17005
+ * When true, a response marked completed must answer it. Never valid on a statement
17006
+ */
17007
+ required?: boolean
17008
+ }[]
17009
+ /**
17010
+ * ISO-8601 last-modification timestamp
17011
+ */
17012
+ updatedAt: string
17013
+ }
17014
+
17015
+ export interface SupportSurveyListInput {
17016
+ /**
17017
+ * Page size, 1..100 (default 25)
17018
+ */
17019
+ limit?: number
17020
+ /**
17021
+ * Number of surveys to skip
17022
+ */
17023
+ offset?: number
17024
+ /**
17025
+ * Only surveys in this lifecycle state
17026
+ */
17027
+ status?: ("draft" | "published" | "archived")
17028
+ }
17029
+
17030
+ export interface SupportSurveyListOutput {
17031
+ /**
17032
+ * Page size that was applied
17033
+ */
17034
+ limit: number
17035
+ /**
17036
+ * Offset that was applied
17037
+ */
17038
+ offset: number
17039
+ /**
17040
+ * The requested page of surveys, newest first
17041
+ */
17042
+ surveys: {
17043
+ /**
17044
+ * Survey id
17045
+ */
17046
+ id: string
17047
+ /**
17048
+ * What this survey is called
17049
+ */
17050
+ name: string
17051
+ /**
17052
+ * draft: editable, not answerable. published: answerable, frozen. archived: terminal, neither editable nor answerable, and there is no way back
17053
+ */
17054
+ status: ("draft" | "published" | "archived")
17055
+ /**
17056
+ * ISO-8601 creation timestamp
17057
+ */
17058
+ createdAt: string
17059
+ /**
17060
+ * The ordered question set, exactly as stored
17061
+ */
17062
+ questions: {
17063
+ /**
17064
+ * Client-owned id of the question, unique within the survey. Answers are keyed by it
17065
+ */
17066
+ id: string
17067
+ /**
17068
+ * Branching, radio only: option id -> the question id to jump to, or 'end' to finish. Targets must be later questions; publish refuses anything else
17069
+ */
17070
+ skip?: {
17071
+ [k: string]: string
17072
+ }
17073
+ /**
17074
+ * reaction: a free string the client owns (an emoji). text: free prose. radio: one option. checkbox: any number of options. rating: an integer on a declared scale. nps: an integer 0..10. statement: displayed, never answered
17075
+ */
17076
+ type: ("reaction" | "text" | "radio" | "checkbox" | "rating" | "nps" | "statement")
17077
+ /**
17078
+ * The question as the respondent reads it
17079
+ */
17080
+ label: string
17081
+ /**
17082
+ * The rating scale. rating only — nps is fixed 0..10
17083
+ */
17084
+ scale?: {
17085
+ /**
17086
+ * Top of the scale, at most 10
17087
+ */
17088
+ max: number
17089
+ /**
17090
+ * Bottom of the scale: 0 or 1
17091
+ */
17092
+ min: (0 | 1)
17093
+ }
17094
+ /**
17095
+ * The choices. radio and checkbox only
17096
+ *
17097
+ * @minItems 1
17098
+ * @maxItems 50
17099
+ */
17100
+ options?: [{
17101
+ /**
17102
+ * Client-owned id of the option, unique within the question
17103
+ */
17104
+ id: string
17105
+ /**
17106
+ * What the respondent reads
17107
+ */
17108
+ label: string
17109
+ }, ...({
17110
+ /**
17111
+ * Client-owned id of the option, unique within the question
17112
+ */
17113
+ id: string
17114
+ /**
17115
+ * What the respondent reads
17116
+ */
17117
+ label: string
17118
+ })[]]
17119
+ /**
17120
+ * When true, a response marked completed must answer it. Never valid on a statement
17121
+ */
17122
+ required?: boolean
17123
+ }[]
17124
+ /**
17125
+ * ISO-8601 last-modification timestamp
17126
+ */
17127
+ updatedAt: string
17128
+ }[]
17129
+ }
17130
+
17131
+ export interface SupportSurveyPublishInput {
17132
+ /**
17133
+ * Survey id
17134
+ */
17135
+ id: string
17136
+ }
17137
+
17138
+ export interface SupportSurveyPublishOutput {
17139
+ /**
17140
+ * Survey id
17141
+ */
17142
+ id: string
17143
+ /**
17144
+ * What this survey is called
17145
+ */
17146
+ name: string
17147
+ /**
17148
+ * draft: editable, not answerable. published: answerable, frozen. archived: terminal, neither editable nor answerable, and there is no way back
17149
+ */
17150
+ status: ("draft" | "published" | "archived")
17151
+ /**
17152
+ * ISO-8601 creation timestamp
17153
+ */
17154
+ createdAt: string
17155
+ /**
17156
+ * The ordered question set, exactly as stored
17157
+ */
17158
+ questions: {
17159
+ /**
17160
+ * Client-owned id of the question, unique within the survey. Answers are keyed by it
17161
+ */
17162
+ id: string
17163
+ /**
17164
+ * Branching, radio only: option id -> the question id to jump to, or 'end' to finish. Targets must be later questions; publish refuses anything else
17165
+ */
17166
+ skip?: {
17167
+ [k: string]: string
17168
+ }
17169
+ /**
17170
+ * reaction: a free string the client owns (an emoji). text: free prose. radio: one option. checkbox: any number of options. rating: an integer on a declared scale. nps: an integer 0..10. statement: displayed, never answered
17171
+ */
17172
+ type: ("reaction" | "text" | "radio" | "checkbox" | "rating" | "nps" | "statement")
17173
+ /**
17174
+ * The question as the respondent reads it
17175
+ */
17176
+ label: string
17177
+ /**
17178
+ * The rating scale. rating only — nps is fixed 0..10
17179
+ */
17180
+ scale?: {
17181
+ /**
17182
+ * Top of the scale, at most 10
17183
+ */
17184
+ max: number
17185
+ /**
17186
+ * Bottom of the scale: 0 or 1
17187
+ */
17188
+ min: (0 | 1)
17189
+ }
17190
+ /**
17191
+ * The choices. radio and checkbox only
17192
+ *
17193
+ * @minItems 1
17194
+ * @maxItems 50
17195
+ */
17196
+ options?: [{
17197
+ /**
17198
+ * Client-owned id of the option, unique within the question
17199
+ */
17200
+ id: string
17201
+ /**
17202
+ * What the respondent reads
17203
+ */
17204
+ label: string
17205
+ }, ...({
17206
+ /**
17207
+ * Client-owned id of the option, unique within the question
17208
+ */
17209
+ id: string
17210
+ /**
17211
+ * What the respondent reads
17212
+ */
17213
+ label: string
17214
+ })[]]
17215
+ /**
17216
+ * When true, a response marked completed must answer it. Never valid on a statement
17217
+ */
17218
+ required?: boolean
17219
+ }[]
17220
+ /**
17221
+ * ISO-8601 last-modification timestamp
17222
+ */
17223
+ updatedAt: string
17224
+ }
17225
+
17226
+ export interface SupportSurveyStatsInput {
17227
+ /**
17228
+ * Survey id
17229
+ */
17230
+ id: string
17231
+ /**
17232
+ * End of the window, ISO-8601, inclusive. Defaults to now
17233
+ */
17234
+ to?: string
17235
+ /**
17236
+ * Start of the window, ISO-8601, inclusive. Defaults to 30 days ago — omitting it means "recently", never "since the beginning"
17237
+ */
17238
+ from?: string
17239
+ }
17240
+
17241
+ export interface SupportSurveyStatsOutput {
17242
+ /**
17243
+ * ISO-8601 end of the window that was actually applied
17244
+ */
17245
+ to: string
17246
+ /**
17247
+ * The NPS block, or null when the survey asks no nps question
17248
+ */
17249
+ nps: ({
17250
+ /**
17251
+ * Percentage of promoters minus percentage of detractors, over everyone who answered — passives dilute rather than vanish — rounded once on the difference. Null when nobody answered, which is not the same as zero
17252
+ */
17253
+ score: (number | null)
17254
+ /**
17255
+ * How many responses gave a value in 0..10
17256
+ */
17257
+ answered: number
17258
+ /**
17259
+ * Answers of 7 or 8
17260
+ */
17261
+ passives: number
17262
+ /**
17263
+ * Answers of 9 or 10
17264
+ */
17265
+ promoters: number
17266
+ /**
17267
+ * Answers of 6 or below
17268
+ */
17269
+ detractors: number
17270
+ /**
17271
+ * The first nps question of the survey — the one this scores
17272
+ */
17273
+ questionId: string
17274
+ } | null)
17275
+ /**
17276
+ * ISO-8601 start of the window that was actually applied
17277
+ */
17278
+ from: string
17279
+ /**
17280
+ * The survey these numbers describe
17281
+ */
17282
+ surveyId: string
17283
+ /**
17284
+ * Every question of the survey, answered or not
17285
+ */
17286
+ questions: {
17287
+ /**
17288
+ * reaction: a free string the client owns (an emoji). text: free prose. radio: one option. checkbox: any number of options. rating: an integer on a declared scale. nps: an integer 0..10. statement: displayed, never answered
17289
+ */
17290
+ type: ("reaction" | "text" | "radio" | "checkbox" | "rating" | "nps" | "statement")
17291
+ /**
17292
+ * The question as the respondent read it
17293
+ */
17294
+ label: string
17295
+ /**
17296
+ * rating and nps: the mean to two decimals, or null when nothing was answered. Null for every other type
17297
+ */
17298
+ average: (number | null)
17299
+ /**
17300
+ * radio and checkbox: every option the question declares, in its declared order, including the ones nobody picked. Null for every other type
17301
+ */
17302
+ options: ({
17303
+ /**
17304
+ * How many responses picked it
17305
+ */
17306
+ count: number
17307
+ /**
17308
+ * The option label, as the survey declares it
17309
+ */
17310
+ label: string
17311
+ /**
17312
+ * The option this count belongs to
17313
+ */
17314
+ optionId: string
17315
+ }[] | null)
17316
+ /**
17317
+ * How many responses answered it. An empty checkbox selection is not an answer
17318
+ */
17319
+ answered: number
17320
+ /**
17321
+ * The question this aggregate belongs to
17322
+ */
17323
+ questionId: string
17324
+ /**
17325
+ * rating and nps: how many responses gave each value, ascending. Null for every other type
17326
+ */
17327
+ distribution: ({
17328
+ /**
17329
+ * How many responses gave it
17330
+ */
17331
+ count: number
17332
+ /**
17333
+ * The value that was given
17334
+ */
17335
+ score: number
17336
+ }[] | null)
17337
+ }[]
17338
+ /**
17339
+ * The response counts over the window
17340
+ */
17341
+ responses: {
17342
+ /**
17343
+ * Responses submitted in the window
17344
+ */
17345
+ total: number
17346
+ /**
17347
+ * How many of them reached the end
17348
+ */
17349
+ completed: number
17350
+ }
17351
+ }
17352
+
17353
+ export interface SupportSurveyUnpublishInput {
17354
+ /**
17355
+ * Survey id
17356
+ */
17357
+ id: string
17358
+ }
17359
+
17360
+ export interface SupportSurveyUnpublishOutput {
17361
+ /**
17362
+ * Survey id
17363
+ */
17364
+ id: string
17365
+ /**
17366
+ * What this survey is called
17367
+ */
17368
+ name: string
17369
+ /**
17370
+ * draft: editable, not answerable. published: answerable, frozen. archived: terminal, neither editable nor answerable, and there is no way back
17371
+ */
17372
+ status: ("draft" | "published" | "archived")
17373
+ /**
17374
+ * ISO-8601 creation timestamp
17375
+ */
17376
+ createdAt: string
17377
+ /**
17378
+ * The ordered question set, exactly as stored
17379
+ */
17380
+ questions: {
17381
+ /**
17382
+ * Client-owned id of the question, unique within the survey. Answers are keyed by it
17383
+ */
17384
+ id: string
17385
+ /**
17386
+ * Branching, radio only: option id -> the question id to jump to, or 'end' to finish. Targets must be later questions; publish refuses anything else
17387
+ */
17388
+ skip?: {
17389
+ [k: string]: string
17390
+ }
17391
+ /**
17392
+ * reaction: a free string the client owns (an emoji). text: free prose. radio: one option. checkbox: any number of options. rating: an integer on a declared scale. nps: an integer 0..10. statement: displayed, never answered
17393
+ */
17394
+ type: ("reaction" | "text" | "radio" | "checkbox" | "rating" | "nps" | "statement")
17395
+ /**
17396
+ * The question as the respondent reads it
17397
+ */
17398
+ label: string
17399
+ /**
17400
+ * The rating scale. rating only — nps is fixed 0..10
17401
+ */
17402
+ scale?: {
17403
+ /**
17404
+ * Top of the scale, at most 10
17405
+ */
17406
+ max: number
17407
+ /**
17408
+ * Bottom of the scale: 0 or 1
17409
+ */
17410
+ min: (0 | 1)
17411
+ }
17412
+ /**
17413
+ * The choices. radio and checkbox only
17414
+ *
17415
+ * @minItems 1
17416
+ * @maxItems 50
17417
+ */
17418
+ options?: [{
17419
+ /**
17420
+ * Client-owned id of the option, unique within the question
17421
+ */
17422
+ id: string
17423
+ /**
17424
+ * What the respondent reads
17425
+ */
17426
+ label: string
17427
+ }, ...({
17428
+ /**
17429
+ * Client-owned id of the option, unique within the question
17430
+ */
17431
+ id: string
17432
+ /**
17433
+ * What the respondent reads
17434
+ */
17435
+ label: string
17436
+ })[]]
17437
+ /**
17438
+ * When true, a response marked completed must answer it. Never valid on a statement
17439
+ */
17440
+ required?: boolean
17441
+ }[]
17442
+ /**
17443
+ * ISO-8601 last-modification timestamp
17444
+ */
17445
+ updatedAt: string
17446
+ }
17447
+
17448
+ export interface SupportSurveyUpdateInput {
17449
+ /**
17450
+ * Survey id
17451
+ */
17452
+ id: string
17453
+ /**
17454
+ * New name
17455
+ */
17456
+ name?: string
17457
+ /**
17458
+ * The complete new question set, replacing the old one. Pass [] to empty the draft
17459
+ *
17460
+ * @maxItems 100
17461
+ */
17462
+ questions?: {
17463
+ /**
17464
+ * Client-owned id of the question, unique within the survey. Answers are keyed by it
17465
+ */
17466
+ id: string
17467
+ /**
17468
+ * Branching, radio only: option id -> the question id to jump to, or 'end' to finish. Targets must be later questions; publish refuses anything else
17469
+ */
17470
+ skip?: {
17471
+ [k: string]: string
17472
+ }
17473
+ /**
17474
+ * reaction: a free string the client owns (an emoji). text: free prose. radio: one option. checkbox: any number of options. rating: an integer on a declared scale. nps: an integer 0..10. statement: displayed, never answered
17475
+ */
17476
+ type: ("reaction" | "text" | "radio" | "checkbox" | "rating" | "nps" | "statement")
17477
+ /**
17478
+ * The question as the respondent reads it
17479
+ */
17480
+ label: string
17481
+ /**
17482
+ * The rating scale. rating only — nps is fixed 0..10
17483
+ */
17484
+ scale?: {
17485
+ /**
17486
+ * Top of the scale, at most 10
17487
+ */
17488
+ max: number
17489
+ /**
17490
+ * Bottom of the scale: 0 or 1
17491
+ */
17492
+ min: (0 | 1)
17493
+ }
17494
+ /**
17495
+ * The choices. radio and checkbox only
17496
+ *
17497
+ * @minItems 1
17498
+ * @maxItems 50
17499
+ */
17500
+ options?: [{
17501
+ /**
17502
+ * Client-owned id of the option, unique within the question
17503
+ */
17504
+ id: string
17505
+ /**
17506
+ * What the respondent reads
17507
+ */
17508
+ label: string
17509
+ }, ...({
17510
+ /**
17511
+ * Client-owned id of the option, unique within the question
17512
+ */
17513
+ id: string
17514
+ /**
17515
+ * What the respondent reads
17516
+ */
17517
+ label: string
17518
+ })[]]
17519
+ /**
17520
+ * When true, a response marked completed must answer it. Never valid on a statement
17521
+ */
17522
+ required?: boolean
17523
+ }[]
17524
+ }
17525
+
17526
+ export interface SupportSurveyUpdateOutput {
17527
+ /**
17528
+ * Survey id
17529
+ */
17530
+ id: string
17531
+ /**
17532
+ * What this survey is called
17533
+ */
17534
+ name: string
17535
+ /**
17536
+ * draft: editable, not answerable. published: answerable, frozen. archived: terminal, neither editable nor answerable, and there is no way back
17537
+ */
17538
+ status: ("draft" | "published" | "archived")
17539
+ /**
17540
+ * ISO-8601 creation timestamp
17541
+ */
17542
+ createdAt: string
17543
+ /**
17544
+ * The ordered question set, exactly as stored
17545
+ */
17546
+ questions: {
17547
+ /**
17548
+ * Client-owned id of the question, unique within the survey. Answers are keyed by it
17549
+ */
17550
+ id: string
17551
+ /**
17552
+ * Branching, radio only: option id -> the question id to jump to, or 'end' to finish. Targets must be later questions; publish refuses anything else
17553
+ */
17554
+ skip?: {
17555
+ [k: string]: string
17556
+ }
17557
+ /**
17558
+ * reaction: a free string the client owns (an emoji). text: free prose. radio: one option. checkbox: any number of options. rating: an integer on a declared scale. nps: an integer 0..10. statement: displayed, never answered
17559
+ */
17560
+ type: ("reaction" | "text" | "radio" | "checkbox" | "rating" | "nps" | "statement")
17561
+ /**
17562
+ * The question as the respondent reads it
17563
+ */
17564
+ label: string
17565
+ /**
17566
+ * The rating scale. rating only — nps is fixed 0..10
17567
+ */
17568
+ scale?: {
17569
+ /**
17570
+ * Top of the scale, at most 10
17571
+ */
17572
+ max: number
17573
+ /**
17574
+ * Bottom of the scale: 0 or 1
17575
+ */
17576
+ min: (0 | 1)
17577
+ }
17578
+ /**
17579
+ * The choices. radio and checkbox only
17580
+ *
17581
+ * @minItems 1
17582
+ * @maxItems 50
17583
+ */
17584
+ options?: [{
17585
+ /**
17586
+ * Client-owned id of the option, unique within the question
17587
+ */
17588
+ id: string
17589
+ /**
17590
+ * What the respondent reads
17591
+ */
17592
+ label: string
17593
+ }, ...({
17594
+ /**
17595
+ * Client-owned id of the option, unique within the question
17596
+ */
17597
+ id: string
17598
+ /**
17599
+ * What the respondent reads
17600
+ */
17601
+ label: string
17602
+ })[]]
17603
+ /**
17604
+ * When true, a response marked completed must answer it. Never valid on a statement
17605
+ */
17606
+ required?: boolean
17607
+ }[]
17608
+ /**
17609
+ * ISO-8601 last-modification timestamp
17610
+ */
17611
+ updatedAt: string
17612
+ }
17613
+
16346
17614
  export interface SupportThreadAssignInput {
16347
17615
  /**
16348
17616
  * Thread id
@@ -17150,11 +18418,11 @@ export interface SupportWebhookCreateInput {
17150
18418
  */
17151
18419
  url: string
17152
18420
  /**
17153
- * Event types this endpoint subscribes to. One or more of support.message.created, support.thread.status-changed, support.thread.assigned
18421
+ * Event types this endpoint subscribes to. One or more of support.message.created, support.thread.status-changed, support.thread.assigned, support.survey.published, support.response.created
17154
18422
  *
17155
18423
  * @minItems 1
17156
18424
  */
17157
- eventTypes: [("support.message.created" | "support.thread.status-changed" | "support.thread.assigned"), ...(("support.message.created" | "support.thread.status-changed" | "support.thread.assigned"))[]]
18425
+ eventTypes: [("support.message.created" | "support.thread.status-changed" | "support.thread.assigned" | "support.survey.published" | "support.response.created"), ...(("support.message.created" | "support.thread.status-changed" | "support.thread.assigned" | "support.survey.published" | "support.response.created"))[]]
17158
18426
  /**
17159
18427
  * Free-form note about what this endpoint is for, up to 1000 characters
17160
18428
  */
@@ -17238,7 +18506,7 @@ createdTo?: string
17238
18506
  /**
17239
18507
  * Only deliveries of this event type
17240
18508
  */
17241
- eventType?: ("support.message.created" | "support.thread.status-changed" | "support.thread.assigned")
18509
+ eventType?: ("support.message.created" | "support.thread.status-changed" | "support.thread.assigned" | "support.survey.published" | "support.response.created")
17242
18510
  /**
17243
18511
  * Only deliveries for this endpoint
17244
18512
  */
@@ -17526,11 +18794,11 @@ url?: string
17526
18794
  */
17527
18795
  status?: ("active" | "disabled")
17528
18796
  /**
17529
- * Event types this endpoint subscribes to. One or more of support.message.created, support.thread.status-changed, support.thread.assigned
18797
+ * Event types this endpoint subscribes to. One or more of support.message.created, support.thread.status-changed, support.thread.assigned, support.survey.published, support.response.created
17530
18798
  *
17531
18799
  * @minItems 1
17532
18800
  */
17533
- eventTypes?: [("support.message.created" | "support.thread.status-changed" | "support.thread.assigned"), ...(("support.message.created" | "support.thread.status-changed" | "support.thread.assigned"))[]]
18801
+ eventTypes?: [("support.message.created" | "support.thread.status-changed" | "support.thread.assigned" | "support.survey.published" | "support.response.created"), ...(("support.message.created" | "support.thread.status-changed" | "support.thread.assigned" | "support.survey.published" | "support.response.created"))[]]
17534
18802
  /**
17535
18803
  * Free-form note about what this endpoint is for, up to 1000 characters
17536
18804
  */