@50heads/mcp 2026.1009.1 → 2026.1013.2
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/CHANGELOG.md +31 -0
- package/README.md +137 -27
- package/dist/cli.js +6807 -2723
- package/dist/index.js +6755 -2664
- package/dist/snippets.js +1 -1
- package/dist/types/account.d.ts +1 -1
- package/dist/types/actions.d.ts +1 -1
- package/dist/types/approvals.d.ts +14 -0
- package/dist/types/apps.d.ts +9 -4
- package/dist/types/cli/stdio.d.ts +1142 -30
- package/dist/types/constants.d.ts +93 -24
- package/dist/types/draft.d.ts +10 -1
- package/dist/types/errors.d.ts +1 -1
- package/dist/types/generated/skill.d.ts +2 -2
- package/dist/types/manifest.d.ts +26 -6
- package/dist/types/organization.d.ts +47 -0
- package/dist/types/pricing.d.ts +3 -5
- package/dist/types/public.d.ts +1 -1
- package/dist/types/results.d.ts +8 -1
- package/dist/types/schemas.d.ts +968 -6
- package/dist/types/server.d.ts +5 -3
- package/dist/types/tasks.d.ts +2 -2
- package/dist/types/tool-schema.d.ts +64 -0
- package/dist/types/webhooks.d.ts +35 -0
- package/dist/types/workspace-apps.d.ts +13 -0
- package/package.json +4 -3
- package/server.json +19 -5
- package/skills/50heads/SKILL.md +20 -15
- package/skills/50heads/references/pricing.md +2 -2
- package/skills/50heads/references/question-types.md +14 -10
- package/skills/50heads/references/tools.md +76 -15
- package/skills/50heads/scripts/estimate.py +1 -1
- package/skills/50heads.zip +0 -0
|
@@ -287,6 +287,60 @@ export declare function makeApi(opts: StdioOptions): (tool: string, client?: str
|
|
|
287
287
|
reauthEmail: () => Promise<{
|
|
288
288
|
ok: true;
|
|
289
289
|
}>;
|
|
290
|
+
sso: {
|
|
291
|
+
discover: (input: import("@50heads/shared").SsoDiscoverInput) => Promise<{
|
|
292
|
+
sso: false;
|
|
293
|
+
} | {
|
|
294
|
+
sso: true;
|
|
295
|
+
url: string;
|
|
296
|
+
required: boolean;
|
|
297
|
+
}>;
|
|
298
|
+
startUrl: (organizationId: string, returnPath?: string) => string;
|
|
299
|
+
complete: <T extends import("@50heads/shared").SsoSession | import("@50heads/shared").AppSession = {
|
|
300
|
+
token: string;
|
|
301
|
+
expiresAt: string;
|
|
302
|
+
user: {
|
|
303
|
+
id: string;
|
|
304
|
+
email: string;
|
|
305
|
+
name: string | null;
|
|
306
|
+
tier: 0 | 1 | 2 | 3;
|
|
307
|
+
country: string | null;
|
|
308
|
+
phone: string | null;
|
|
309
|
+
displayCurrency: "GBP" | "USD" | "EUR" | "CAD" | "JPY" | "KRW" | "SEK" | "DKK" | "NOK" | "PLN" | "BRL" | "CZK" | "RON" | "TRY" | null;
|
|
310
|
+
languages: ("en" | "fr" | "es" | "pt" | "it" | "de" | "nl" | "pl" | "ja" | "ko" | "sv" | "da" | "nb" | "cs" | "ro" | "fi" | "tr")[];
|
|
311
|
+
locale: string | null;
|
|
312
|
+
creditsPence: number;
|
|
313
|
+
earningsPence: number;
|
|
314
|
+
pendingPence: number;
|
|
315
|
+
providers: ("apple" | "google" | "email")[];
|
|
316
|
+
createdAt: string;
|
|
317
|
+
};
|
|
318
|
+
isNew: boolean;
|
|
319
|
+
next: string;
|
|
320
|
+
}>(input: import("@50heads/shared").SsoCompleteInput) => Promise<T>;
|
|
321
|
+
link: <T extends import("@50heads/shared").SsoSession | import("@50heads/shared").AppSession = {
|
|
322
|
+
token: string;
|
|
323
|
+
expiresAt: string;
|
|
324
|
+
user: {
|
|
325
|
+
id: string;
|
|
326
|
+
email: string;
|
|
327
|
+
name: string | null;
|
|
328
|
+
tier: 0 | 1 | 2 | 3;
|
|
329
|
+
country: string | null;
|
|
330
|
+
phone: string | null;
|
|
331
|
+
displayCurrency: "GBP" | "USD" | "EUR" | "CAD" | "JPY" | "KRW" | "SEK" | "DKK" | "NOK" | "PLN" | "BRL" | "CZK" | "RON" | "TRY" | null;
|
|
332
|
+
languages: ("en" | "fr" | "es" | "pt" | "it" | "de" | "nl" | "pl" | "ja" | "ko" | "sv" | "da" | "nb" | "cs" | "ro" | "fi" | "tr")[];
|
|
333
|
+
locale: string | null;
|
|
334
|
+
creditsPence: number;
|
|
335
|
+
earningsPence: number;
|
|
336
|
+
pendingPence: number;
|
|
337
|
+
providers: ("apple" | "google" | "email")[];
|
|
338
|
+
createdAt: string;
|
|
339
|
+
};
|
|
340
|
+
isNew: boolean;
|
|
341
|
+
next: string;
|
|
342
|
+
}>(input: import("@50heads/shared").SsoLinkInput) => Promise<T>;
|
|
343
|
+
};
|
|
290
344
|
passkey: {
|
|
291
345
|
options: () => Promise<{
|
|
292
346
|
challengeId: string;
|
|
@@ -489,7 +543,58 @@ export declare function makeApi(opts: StdioOptions): (tool: string, client?: str
|
|
|
489
543
|
me: () => Promise<{
|
|
490
544
|
user: import("@50heads/shared").User;
|
|
491
545
|
}>;
|
|
492
|
-
|
|
546
|
+
whoami: () => Promise<{
|
|
547
|
+
principal: {
|
|
548
|
+
type: "person" | "service_account";
|
|
549
|
+
id: string;
|
|
550
|
+
email: string | null;
|
|
551
|
+
};
|
|
552
|
+
auth: "device" | "oauth" | "session" | "api_key";
|
|
553
|
+
scopes: string[] | null;
|
|
554
|
+
connection: {
|
|
555
|
+
id: string;
|
|
556
|
+
kind: "key" | "app" | "oauth";
|
|
557
|
+
clientId: string | null;
|
|
558
|
+
clientName: string;
|
|
559
|
+
host: string | null;
|
|
560
|
+
scopes: ("questions:read" | "questions:write" | "templates:read" | "account:read" | "webhooks:read" | "webhooks:write" | "apps:read" | "apps:write" | "organization:read" | "organization:write" | "members:read" | "members:write" | "audit:read")[];
|
|
561
|
+
capDailyPence: number;
|
|
562
|
+
spentTodayPence: number;
|
|
563
|
+
spentMonthPence: number;
|
|
564
|
+
protocolVersion: string | null;
|
|
565
|
+
validatesIss: boolean | null;
|
|
566
|
+
createdAt: string;
|
|
567
|
+
lastUsedAt: string | null;
|
|
568
|
+
capMonthlyPence?: number | null | undefined;
|
|
569
|
+
capQuestionPence?: number | null | undefined;
|
|
570
|
+
teamId?: string | null | undefined;
|
|
571
|
+
} | null;
|
|
572
|
+
account: {
|
|
573
|
+
kind: "personal" | "team";
|
|
574
|
+
teamId: string | null;
|
|
575
|
+
teamName: string | null;
|
|
576
|
+
role: "owner" | "admin" | "member" | "viewer" | "billing" | null;
|
|
577
|
+
};
|
|
578
|
+
organization: {
|
|
579
|
+
id: string;
|
|
580
|
+
name: string;
|
|
581
|
+
admin: boolean;
|
|
582
|
+
} | null;
|
|
583
|
+
}>;
|
|
584
|
+
limits: () => Promise<{
|
|
585
|
+
policies: {
|
|
586
|
+
id: string;
|
|
587
|
+
appliesTo: string;
|
|
588
|
+
per: "account" | "connection";
|
|
589
|
+
limit: number;
|
|
590
|
+
windowSeconds: number;
|
|
591
|
+
used: number | null;
|
|
592
|
+
remaining: number | null;
|
|
593
|
+
resetSeconds: number;
|
|
594
|
+
}[];
|
|
595
|
+
note: string;
|
|
596
|
+
}>;
|
|
597
|
+
deleteAccount: (reauth: import("@50heads/shared").Reauth | null, reauthToken?: string) => Promise<{
|
|
493
598
|
ok: true;
|
|
494
599
|
erasesAt: string;
|
|
495
600
|
}>;
|
|
@@ -610,10 +715,6 @@ export declare function makeApi(opts: StdioOptions): (tool: string, client?: str
|
|
|
610
715
|
list: () => Promise<{
|
|
611
716
|
keys: import("@50heads/shared").ApiKey[];
|
|
612
717
|
}>;
|
|
613
|
-
create: (name: string) => Promise<{
|
|
614
|
-
key: import("@50heads/shared").ApiKey;
|
|
615
|
-
secret: string;
|
|
616
|
-
}>;
|
|
617
718
|
revoke: (id: string) => Promise<{
|
|
618
719
|
ok: true;
|
|
619
720
|
}>;
|
|
@@ -629,13 +730,57 @@ export declare function makeApi(opts: StdioOptions): (tool: string, client?: str
|
|
|
629
730
|
};
|
|
630
731
|
updatedAt: string;
|
|
631
732
|
}>;
|
|
733
|
+
status: () => Promise<{
|
|
734
|
+
status: "paused" | "operational" | "degraded" | "outage";
|
|
735
|
+
components: {
|
|
736
|
+
id: "answering" | "api" | "database" | "asking" | "mcp_asking" | "top_ups";
|
|
737
|
+
status: "paused" | "operational" | "degraded" | "outage";
|
|
738
|
+
note: string | null;
|
|
739
|
+
}[];
|
|
740
|
+
message: string | null;
|
|
741
|
+
until: string | null;
|
|
742
|
+
checkedAt: string;
|
|
743
|
+
page: string;
|
|
744
|
+
}>;
|
|
745
|
+
subprocessors: () => Promise<{
|
|
746
|
+
upcoming: {
|
|
747
|
+
id: string;
|
|
748
|
+
kind: "add" | "remove" | "change";
|
|
749
|
+
name: string;
|
|
750
|
+
purpose: string;
|
|
751
|
+
dataCategories: string;
|
|
752
|
+
location: string;
|
|
753
|
+
transferMechanism: string;
|
|
754
|
+
link: string | null;
|
|
755
|
+
status: "announced" | "effective" | "withdrawn";
|
|
756
|
+
announcedAt: string;
|
|
757
|
+
effectiveAt: string;
|
|
758
|
+
withdrawnAt: string | null;
|
|
759
|
+
}[];
|
|
760
|
+
history: {
|
|
761
|
+
id: string;
|
|
762
|
+
kind: "add" | "remove" | "change";
|
|
763
|
+
name: string;
|
|
764
|
+
purpose: string;
|
|
765
|
+
dataCategories: string;
|
|
766
|
+
location: string;
|
|
767
|
+
transferMechanism: string;
|
|
768
|
+
link: string | null;
|
|
769
|
+
status: "announced" | "effective" | "withdrawn";
|
|
770
|
+
announcedAt: string;
|
|
771
|
+
effectiveAt: string;
|
|
772
|
+
withdrawnAt: string | null;
|
|
773
|
+
}[];
|
|
774
|
+
noticeDays: number;
|
|
775
|
+
updatedAt: string;
|
|
776
|
+
}>;
|
|
632
777
|
results: (code: string) => Promise<{
|
|
633
778
|
question: import("@50heads/shared").QuestionV2;
|
|
634
779
|
result: import("@50heads/shared").ResultV2;
|
|
635
780
|
}>;
|
|
636
781
|
shared: (token: string) => Promise<{
|
|
637
782
|
question: {
|
|
638
|
-
type: "single_choice" | "multi_choice" | "ab_image" | "pairwise" | "scale_1_5" | "ranking" | "yes_no" | "yes_mostly_no" | "
|
|
783
|
+
type: "single_choice" | "multi_choice" | "ab_image" | "pairwise" | "scale_1_5" | "ranking" | "yes_no" | "yes_mostly_no" | "free_text" | "click_test" | "reaction";
|
|
639
784
|
text: string;
|
|
640
785
|
language: string;
|
|
641
786
|
options: {
|
|
@@ -651,8 +796,8 @@ export declare function makeApi(opts: StdioOptions): (tool: string, client?: str
|
|
|
651
796
|
answeredBy: "heads" | "private";
|
|
652
797
|
openForDays: 1 | 14 | 7 | 30;
|
|
653
798
|
id: string;
|
|
654
|
-
status: "
|
|
655
|
-
source: "app" | "
|
|
799
|
+
status: "canceled" | "closed" | "live" | "scheduled" | "draft" | "complete" | "underfilled" | "refused" | "pending_approval";
|
|
800
|
+
source: "app" | "api" | "portal" | "mcp";
|
|
656
801
|
answered: number;
|
|
657
802
|
creditsPerAnswer: number;
|
|
658
803
|
creditsReserved: number;
|
|
@@ -682,6 +827,10 @@ export declare function makeApi(opts: StdioOptions): (tool: string, client?: str
|
|
|
682
827
|
maxTaps: number;
|
|
683
828
|
} | undefined;
|
|
684
829
|
scheduledFor?: string | undefined;
|
|
830
|
+
goRule?: {
|
|
831
|
+
goAbove: number;
|
|
832
|
+
minAnswers: number;
|
|
833
|
+
} | undefined;
|
|
685
834
|
contentFlag?: "medical" | "violence" | "distressing" | "alcohol_gambling" | "political" | "none" | undefined;
|
|
686
835
|
interestAudienceId?: string | undefined;
|
|
687
836
|
minGrade?: 1 | 2 | 3 | undefined;
|
|
@@ -714,7 +863,7 @@ export declare function makeApi(opts: StdioOptions): (tool: string, client?: str
|
|
|
714
863
|
};
|
|
715
864
|
result: {
|
|
716
865
|
questionId: string;
|
|
717
|
-
status: "
|
|
866
|
+
status: "canceled" | "complete" | "underfilled" | "in_progress";
|
|
718
867
|
nRequested: number;
|
|
719
868
|
nAccepted: number;
|
|
720
869
|
distribution: {
|
|
@@ -725,6 +874,8 @@ export declare function makeApi(opts: StdioOptions): (tool: string, client?: str
|
|
|
725
874
|
appearances?: number | undefined;
|
|
726
875
|
strength?: number | undefined;
|
|
727
876
|
rank?: number | undefined;
|
|
877
|
+
low?: number | undefined;
|
|
878
|
+
high?: number | undefined;
|
|
728
879
|
}[];
|
|
729
880
|
mean: number | null;
|
|
730
881
|
summary: {
|
|
@@ -760,6 +911,12 @@ export declare function makeApi(opts: StdioOptions): (tool: string, client?: str
|
|
|
760
911
|
x: number;
|
|
761
912
|
y: number;
|
|
762
913
|
}[] | undefined;
|
|
914
|
+
choice?: {
|
|
915
|
+
index?: number | undefined;
|
|
916
|
+
indexes?: number[] | undefined;
|
|
917
|
+
order?: number[] | undefined;
|
|
918
|
+
pair?: [number, number] | undefined;
|
|
919
|
+
} | undefined;
|
|
763
920
|
}[];
|
|
764
921
|
refundCredits: number;
|
|
765
922
|
provenance?: {
|
|
@@ -782,6 +939,8 @@ export declare function makeApi(opts: StdioOptions): (tool: string, client?: str
|
|
|
782
939
|
appearances?: number | undefined;
|
|
783
940
|
strength?: number | undefined;
|
|
784
941
|
rank?: number | undefined;
|
|
942
|
+
low?: number | undefined;
|
|
943
|
+
high?: number | undefined;
|
|
785
944
|
}[];
|
|
786
945
|
}[] | undefined;
|
|
787
946
|
breakdowns?: {
|
|
@@ -797,6 +956,8 @@ export declare function makeApi(opts: StdioOptions): (tool: string, client?: str
|
|
|
797
956
|
appearances?: number | undefined;
|
|
798
957
|
strength?: number | undefined;
|
|
799
958
|
rank?: number | undefined;
|
|
959
|
+
low?: number | undefined;
|
|
960
|
+
high?: number | undefined;
|
|
800
961
|
}[];
|
|
801
962
|
}[];
|
|
802
963
|
}[] | undefined;
|
|
@@ -886,6 +1047,22 @@ export declare function makeApi(opts: StdioOptions): (tool: string, client?: str
|
|
|
886
1047
|
n: number;
|
|
887
1048
|
}[] | undefined;
|
|
888
1049
|
} | undefined;
|
|
1050
|
+
verdict?: {
|
|
1051
|
+
verdict: "go" | "no_go" | "unclear";
|
|
1052
|
+
reason: "too_few" | "too_close" | null;
|
|
1053
|
+
yesShare: number;
|
|
1054
|
+
low: number;
|
|
1055
|
+
high: number;
|
|
1056
|
+
goAbove: number;
|
|
1057
|
+
minAnswers: number;
|
|
1058
|
+
n: number;
|
|
1059
|
+
} | undefined;
|
|
1060
|
+
headToHead?: {
|
|
1061
|
+
options: string[];
|
|
1062
|
+
share: (number | null)[][];
|
|
1063
|
+
n: number[][];
|
|
1064
|
+
} | undefined;
|
|
1065
|
+
cohortHash?: string | undefined;
|
|
889
1066
|
};
|
|
890
1067
|
expiresAt: string;
|
|
891
1068
|
}>;
|
|
@@ -1159,7 +1336,7 @@ export declare function makeApi(opts: StdioOptions): (tool: string, client?: str
|
|
|
1159
1336
|
} | undefined;
|
|
1160
1337
|
suggestions?: {
|
|
1161
1338
|
id: string;
|
|
1162
|
-
code:
|
|
1339
|
+
code: "length" | "neither" | "tidy" | "spelling" | "clarity" | "single_idea" | "leading" | "overlap" | "jargon" | "not_a_preference" | "show_the_thing" | "parallel" | "policy";
|
|
1163
1340
|
severity: "info" | "suggest" | "strong";
|
|
1164
1341
|
field: string;
|
|
1165
1342
|
reason: string;
|
|
@@ -1191,7 +1368,7 @@ export declare function makeApi(opts: StdioOptions): (tool: string, client?: str
|
|
|
1191
1368
|
neither: boolean;
|
|
1192
1369
|
} | {
|
|
1193
1370
|
type: "set_type";
|
|
1194
|
-
questionType: "single_choice" | "multi_choice" | "ab_image" | "pairwise" | "scale_1_5" | "ranking" | "yes_no" | "yes_mostly_no" | "
|
|
1371
|
+
questionType: "single_choice" | "multi_choice" | "ab_image" | "pairwise" | "scale_1_5" | "ranking" | "yes_no" | "yes_mostly_no" | "free_text" | "click_test" | "reaction";
|
|
1195
1372
|
} | {
|
|
1196
1373
|
type: "tidy";
|
|
1197
1374
|
text?: string | undefined;
|
|
@@ -1223,7 +1400,7 @@ export declare function makeApi(opts: StdioOptions): (tool: string, client?: str
|
|
|
1223
1400
|
} | undefined;
|
|
1224
1401
|
suggestions?: {
|
|
1225
1402
|
id: string;
|
|
1226
|
-
code:
|
|
1403
|
+
code: "length" | "neither" | "tidy" | "spelling" | "clarity" | "single_idea" | "leading" | "overlap" | "jargon" | "not_a_preference" | "show_the_thing" | "parallel" | "policy";
|
|
1227
1404
|
severity: "info" | "suggest" | "strong";
|
|
1228
1405
|
field: string;
|
|
1229
1406
|
reason: string;
|
|
@@ -1255,7 +1432,7 @@ export declare function makeApi(opts: StdioOptions): (tool: string, client?: str
|
|
|
1255
1432
|
neither: boolean;
|
|
1256
1433
|
} | {
|
|
1257
1434
|
type: "set_type";
|
|
1258
|
-
questionType: "single_choice" | "multi_choice" | "ab_image" | "pairwise" | "scale_1_5" | "ranking" | "yes_no" | "yes_mostly_no" | "
|
|
1435
|
+
questionType: "single_choice" | "multi_choice" | "ab_image" | "pairwise" | "scale_1_5" | "ranking" | "yes_no" | "yes_mostly_no" | "free_text" | "click_test" | "reaction";
|
|
1259
1436
|
} | {
|
|
1260
1437
|
type: "tidy";
|
|
1261
1438
|
text?: string | undefined;
|
|
@@ -1278,7 +1455,7 @@ export declare function makeApi(opts: StdioOptions): (tool: string, client?: str
|
|
|
1278
1455
|
}, id?: string) => Promise<{
|
|
1279
1456
|
id: string;
|
|
1280
1457
|
draft: {
|
|
1281
|
-
type: "single_choice" | "multi_choice" | "ab_image" | "pairwise" | "scale_1_5" | "ranking" | "yes_no" | "yes_mostly_no" | "
|
|
1458
|
+
type: "single_choice" | "multi_choice" | "ab_image" | "pairwise" | "scale_1_5" | "ranking" | "yes_no" | "yes_mostly_no" | "free_text" | "click_test" | "reaction";
|
|
1282
1459
|
text?: string | undefined;
|
|
1283
1460
|
context?: string | undefined;
|
|
1284
1461
|
language?: string | undefined;
|
|
@@ -1309,6 +1486,10 @@ export declare function makeApi(opts: StdioOptions): (tool: string, client?: str
|
|
|
1309
1486
|
scheduledFor?: string | undefined;
|
|
1310
1487
|
publicResults?: boolean | undefined;
|
|
1311
1488
|
reason?: "off" | "optional" | "required" | undefined;
|
|
1489
|
+
goRule?: {
|
|
1490
|
+
goAbove: number;
|
|
1491
|
+
minAnswers: number;
|
|
1492
|
+
} | undefined;
|
|
1312
1493
|
contentFlag?: "medical" | "violence" | "distressing" | "alcohol_gambling" | "political" | "none" | undefined;
|
|
1313
1494
|
interestAudienceId?: string | undefined;
|
|
1314
1495
|
minGrade?: 1 | 2 | 3 | undefined;
|
|
@@ -1353,7 +1534,7 @@ export declare function makeApi(opts: StdioOptions): (tool: string, client?: str
|
|
|
1353
1534
|
closedAt: string | null;
|
|
1354
1535
|
};
|
|
1355
1536
|
questions: {
|
|
1356
|
-
type: "single_choice" | "multi_choice" | "ab_image" | "pairwise" | "scale_1_5" | "ranking" | "yes_no" | "yes_mostly_no" | "
|
|
1537
|
+
type: "single_choice" | "multi_choice" | "ab_image" | "pairwise" | "scale_1_5" | "ranking" | "yes_no" | "yes_mostly_no" | "free_text" | "click_test" | "reaction";
|
|
1357
1538
|
text: string;
|
|
1358
1539
|
language: string;
|
|
1359
1540
|
options: {
|
|
@@ -1369,8 +1550,8 @@ export declare function makeApi(opts: StdioOptions): (tool: string, client?: str
|
|
|
1369
1550
|
answeredBy: "heads" | "private";
|
|
1370
1551
|
openForDays: 1 | 14 | 7 | 30;
|
|
1371
1552
|
id: string;
|
|
1372
|
-
status: "
|
|
1373
|
-
source: "app" | "
|
|
1553
|
+
status: "canceled" | "closed" | "live" | "scheduled" | "draft" | "complete" | "underfilled" | "refused" | "pending_approval";
|
|
1554
|
+
source: "app" | "api" | "portal" | "mcp";
|
|
1374
1555
|
answered: number;
|
|
1375
1556
|
creditsPerAnswer: number;
|
|
1376
1557
|
creditsReserved: number;
|
|
@@ -1400,6 +1581,10 @@ export declare function makeApi(opts: StdioOptions): (tool: string, client?: str
|
|
|
1400
1581
|
maxTaps: number;
|
|
1401
1582
|
} | undefined;
|
|
1402
1583
|
scheduledFor?: string | undefined;
|
|
1584
|
+
goRule?: {
|
|
1585
|
+
goAbove: number;
|
|
1586
|
+
minAnswers: number;
|
|
1587
|
+
} | undefined;
|
|
1403
1588
|
contentFlag?: "medical" | "violence" | "distressing" | "alcohol_gambling" | "political" | "none" | undefined;
|
|
1404
1589
|
interestAudienceId?: string | undefined;
|
|
1405
1590
|
minGrade?: 1 | 2 | 3 | undefined;
|
|
@@ -1465,7 +1650,7 @@ export declare function makeApi(opts: StdioOptions): (tool: string, client?: str
|
|
|
1465
1650
|
closedAt: string | null;
|
|
1466
1651
|
};
|
|
1467
1652
|
questions: {
|
|
1468
|
-
type: "single_choice" | "multi_choice" | "ab_image" | "pairwise" | "scale_1_5" | "ranking" | "yes_no" | "yes_mostly_no" | "
|
|
1653
|
+
type: "single_choice" | "multi_choice" | "ab_image" | "pairwise" | "scale_1_5" | "ranking" | "yes_no" | "yes_mostly_no" | "free_text" | "click_test" | "reaction";
|
|
1469
1654
|
text: string;
|
|
1470
1655
|
language: string;
|
|
1471
1656
|
options: {
|
|
@@ -1481,8 +1666,8 @@ export declare function makeApi(opts: StdioOptions): (tool: string, client?: str
|
|
|
1481
1666
|
answeredBy: "heads" | "private";
|
|
1482
1667
|
openForDays: 1 | 14 | 7 | 30;
|
|
1483
1668
|
id: string;
|
|
1484
|
-
status: "
|
|
1485
|
-
source: "app" | "
|
|
1669
|
+
status: "canceled" | "closed" | "live" | "scheduled" | "draft" | "complete" | "underfilled" | "refused" | "pending_approval";
|
|
1670
|
+
source: "app" | "api" | "portal" | "mcp";
|
|
1486
1671
|
answered: number;
|
|
1487
1672
|
creditsPerAnswer: number;
|
|
1488
1673
|
creditsReserved: number;
|
|
@@ -1512,6 +1697,10 @@ export declare function makeApi(opts: StdioOptions): (tool: string, client?: str
|
|
|
1512
1697
|
maxTaps: number;
|
|
1513
1698
|
} | undefined;
|
|
1514
1699
|
scheduledFor?: string | undefined;
|
|
1700
|
+
goRule?: {
|
|
1701
|
+
goAbove: number;
|
|
1702
|
+
minAnswers: number;
|
|
1703
|
+
} | undefined;
|
|
1515
1704
|
contentFlag?: "medical" | "violence" | "distressing" | "alcohol_gambling" | "political" | "none" | undefined;
|
|
1516
1705
|
interestAudienceId?: string | undefined;
|
|
1517
1706
|
minGrade?: 1 | 2 | 3 | undefined;
|
|
@@ -1569,7 +1758,7 @@ export declare function makeApi(opts: StdioOptions): (tool: string, client?: str
|
|
|
1569
1758
|
closedAt: string | null;
|
|
1570
1759
|
};
|
|
1571
1760
|
questions: {
|
|
1572
|
-
type: "single_choice" | "multi_choice" | "ab_image" | "pairwise" | "scale_1_5" | "ranking" | "yes_no" | "yes_mostly_no" | "
|
|
1761
|
+
type: "single_choice" | "multi_choice" | "ab_image" | "pairwise" | "scale_1_5" | "ranking" | "yes_no" | "yes_mostly_no" | "free_text" | "click_test" | "reaction";
|
|
1573
1762
|
text: string;
|
|
1574
1763
|
language: string;
|
|
1575
1764
|
options: {
|
|
@@ -1585,8 +1774,8 @@ export declare function makeApi(opts: StdioOptions): (tool: string, client?: str
|
|
|
1585
1774
|
answeredBy: "heads" | "private";
|
|
1586
1775
|
openForDays: 1 | 14 | 7 | 30;
|
|
1587
1776
|
id: string;
|
|
1588
|
-
status: "
|
|
1589
|
-
source: "app" | "
|
|
1777
|
+
status: "canceled" | "closed" | "live" | "scheduled" | "draft" | "complete" | "underfilled" | "refused" | "pending_approval";
|
|
1778
|
+
source: "app" | "api" | "portal" | "mcp";
|
|
1590
1779
|
answered: number;
|
|
1591
1780
|
creditsPerAnswer: number;
|
|
1592
1781
|
creditsReserved: number;
|
|
@@ -1616,6 +1805,10 @@ export declare function makeApi(opts: StdioOptions): (tool: string, client?: str
|
|
|
1616
1805
|
maxTaps: number;
|
|
1617
1806
|
} | undefined;
|
|
1618
1807
|
scheduledFor?: string | undefined;
|
|
1808
|
+
goRule?: {
|
|
1809
|
+
goAbove: number;
|
|
1810
|
+
minAnswers: number;
|
|
1811
|
+
} | undefined;
|
|
1619
1812
|
contentFlag?: "medical" | "violence" | "distressing" | "alcohol_gambling" | "political" | "none" | undefined;
|
|
1620
1813
|
interestAudienceId?: string | undefined;
|
|
1621
1814
|
minGrade?: 1 | 2 | 3 | undefined;
|
|
@@ -1651,6 +1844,7 @@ export declare function makeApi(opts: StdioOptions): (tool: string, client?: str
|
|
|
1651
1844
|
}>;
|
|
1652
1845
|
linkQrUrl: (id: string, format: "svg" | "png") => string;
|
|
1653
1846
|
exportCsvUrl: (id: string) => string;
|
|
1847
|
+
exportJsonlUrl: (id: string) => string;
|
|
1654
1848
|
};
|
|
1655
1849
|
asks: {
|
|
1656
1850
|
create: (draft: import("@50heads/shared").QuestionDraftInput, idempotencyKey: string, fromDraftId?: string) => Promise<{
|
|
@@ -1708,6 +1902,12 @@ export declare function makeApi(opts: StdioOptions): (tool: string, client?: str
|
|
|
1708
1902
|
x: number;
|
|
1709
1903
|
y: number;
|
|
1710
1904
|
}[] | undefined;
|
|
1905
|
+
choice?: {
|
|
1906
|
+
index?: number | undefined;
|
|
1907
|
+
indexes?: number[] | undefined;
|
|
1908
|
+
order?: number[] | undefined;
|
|
1909
|
+
pair?: [number, number] | undefined;
|
|
1910
|
+
} | undefined;
|
|
1711
1911
|
}[];
|
|
1712
1912
|
translationLanguage: string | null;
|
|
1713
1913
|
nextCursor: string | null;
|
|
@@ -1715,7 +1915,7 @@ export declare function makeApi(opts: StdioOptions): (tool: string, client?: str
|
|
|
1715
1915
|
insights: (id: string) => Promise<{
|
|
1716
1916
|
insights: import("@50heads/shared").ResultInsights | null;
|
|
1717
1917
|
}>;
|
|
1718
|
-
|
|
1918
|
+
summarize: (id: string) => Promise<{
|
|
1719
1919
|
insights: import("@50heads/shared").ResultInsights | null;
|
|
1720
1920
|
}>;
|
|
1721
1921
|
wait: (id: string, seconds?: number, minAnswers?: number) => Promise<{
|
|
@@ -1734,6 +1934,8 @@ export declare function makeApi(opts: StdioOptions): (tool: string, client?: str
|
|
|
1734
1934
|
url: string | null;
|
|
1735
1935
|
}>;
|
|
1736
1936
|
exportCsvUrl: (id: string, filter?: import("@50heads/shared").ResultFilterInput) => string;
|
|
1937
|
+
exportJsonlUrl: (id: string, filter?: import("@50heads/shared").ResultFilterInput) => string;
|
|
1938
|
+
exportJsonl: (id: string, filter?: import("@50heads/shared").ResultFilterInput) => Promise<string>;
|
|
1737
1939
|
heatmapUrl: (id: string) => string;
|
|
1738
1940
|
linkQrUrl: (id: string, format: "svg" | "png") => string;
|
|
1739
1941
|
rate: (id: string, usefulness: number) => Promise<{
|
|
@@ -1877,12 +2079,12 @@ export declare function makeApi(opts: StdioOptions): (tool: string, client?: str
|
|
|
1877
2079
|
transfers: import("@50heads/shared").BankTransfer[];
|
|
1878
2080
|
}>;
|
|
1879
2081
|
invoiceTerms: () => Promise<{
|
|
1880
|
-
status: "none" | "
|
|
2082
|
+
status: "none" | "approved" | "pending" | "declined";
|
|
1881
2083
|
termsDays: number | null;
|
|
1882
2084
|
decidedAt: string | null;
|
|
1883
2085
|
}>;
|
|
1884
2086
|
requestInvoiceTerms: (input: import("zod").infer<typeof import("@50heads/shared").InvoiceTermsInput>) => Promise<{
|
|
1885
|
-
status: "none" | "
|
|
2087
|
+
status: "none" | "approved" | "pending" | "declined";
|
|
1886
2088
|
termsDays: number | null;
|
|
1887
2089
|
decidedAt: string | null;
|
|
1888
2090
|
}>;
|
|
@@ -2255,7 +2457,7 @@ export declare function makeApi(opts: StdioOptions): (tool: string, client?: str
|
|
|
2255
2457
|
key: import("@50heads/shared").ApiKeyV2;
|
|
2256
2458
|
secret: string;
|
|
2257
2459
|
}>;
|
|
2258
|
-
updateKey: (id: string, input: import("zod").infer<typeof import("@50heads/shared").UpdateApiKeyInput
|
|
2460
|
+
updateKey: (id: string, input: import("zod").infer<typeof import("@50heads/shared").UpdateApiKeyInput>, reauthToken?: string) => Promise<{
|
|
2259
2461
|
key: import("@50heads/shared").ApiKeyV2;
|
|
2260
2462
|
}>;
|
|
2261
2463
|
rotateKey: (id: string, reauthToken: string) => Promise<{
|
|
@@ -2318,7 +2520,7 @@ export declare function makeApi(opts: StdioOptions): (tool: string, client?: str
|
|
|
2318
2520
|
updateWebhook: (id: string, input: import("zod").infer<typeof import("@50heads/shared").UpdateWebhookInput>) => Promise<{
|
|
2319
2521
|
endpoint: import("zod").infer<typeof import("@50heads/shared").WebhookEndpoint>;
|
|
2320
2522
|
}>;
|
|
2321
|
-
rotateWebhookSecret: (id: string) => Promise<{
|
|
2523
|
+
rotateWebhookSecret: (id: string, input?: import("zod").input<typeof import("@50heads/shared").RotateWebhookSecretInput>) => Promise<{
|
|
2322
2524
|
endpoint: import("zod").infer<typeof import("@50heads/shared").WebhookEndpoint>;
|
|
2323
2525
|
}>;
|
|
2324
2526
|
deliveryAttempts: (deliveryId: string) => Promise<{
|
|
@@ -2346,6 +2548,105 @@ export declare function makeApi(opts: StdioOptions): (tool: string, client?: str
|
|
|
2346
2548
|
connection: import("@50heads/shared").Connection;
|
|
2347
2549
|
}>;
|
|
2348
2550
|
};
|
|
2551
|
+
webhooks: {
|
|
2552
|
+
list: () => Promise<{
|
|
2553
|
+
endpoints: import("zod").infer<typeof import("@50heads/shared").WebhookEndpoint>[];
|
|
2554
|
+
}>;
|
|
2555
|
+
create: (input: import("zod").input<typeof import("@50heads/shared").CreateWebhookInput>) => Promise<{
|
|
2556
|
+
endpoint: import("zod").infer<typeof import("@50heads/shared").WebhookEndpoint>;
|
|
2557
|
+
}>;
|
|
2558
|
+
update: (id: string, input: import("zod").input<typeof import("@50heads/shared").UpdateWebhookInput>) => Promise<{
|
|
2559
|
+
endpoint: import("zod").infer<typeof import("@50heads/shared").WebhookEndpoint>;
|
|
2560
|
+
}>;
|
|
2561
|
+
remove: (id: string) => Promise<{
|
|
2562
|
+
ok: true;
|
|
2563
|
+
}>;
|
|
2564
|
+
rotateSecret: (id: string, input?: import("zod").input<typeof import("@50heads/shared").RotateWebhookSecretInput>) => Promise<{
|
|
2565
|
+
endpoint: import("zod").infer<typeof import("@50heads/shared").WebhookEndpoint>;
|
|
2566
|
+
}>;
|
|
2567
|
+
test: (id: string) => Promise<{
|
|
2568
|
+
outcome: "succeeded" | "retrying" | "failed" | "skipped";
|
|
2569
|
+
delivery: import("zod").infer<typeof import("@50heads/shared").WebhookDelivery>;
|
|
2570
|
+
}>;
|
|
2571
|
+
deliveries: (filter?: {
|
|
2572
|
+
endpointId?: string;
|
|
2573
|
+
state?: import("@50heads/shared/client").WebhookDeliveryState;
|
|
2574
|
+
}) => Promise<{
|
|
2575
|
+
deliveries: import("zod").infer<typeof import("@50heads/shared").WebhookDelivery>[];
|
|
2576
|
+
}>;
|
|
2577
|
+
attempts: (deliveryId: string) => Promise<{
|
|
2578
|
+
attempts: import("zod").infer<typeof import("@50heads/shared").WebhookAttempt>[];
|
|
2579
|
+
}>;
|
|
2580
|
+
replay: (deliveryId: string) => Promise<{
|
|
2581
|
+
ok: true;
|
|
2582
|
+
deliveryId: string;
|
|
2583
|
+
}>;
|
|
2584
|
+
recentEvents: (query: {
|
|
2585
|
+
type: import("@50heads/shared").RecentEventsQuery["type"];
|
|
2586
|
+
limit?: number;
|
|
2587
|
+
}) => Promise<{
|
|
2588
|
+
events: {
|
|
2589
|
+
id: string;
|
|
2590
|
+
type: string;
|
|
2591
|
+
createdAt: string;
|
|
2592
|
+
data: Record<string, unknown>;
|
|
2593
|
+
apiVersion?: "2026-10-10" | undefined;
|
|
2594
|
+
}[];
|
|
2595
|
+
}>;
|
|
2596
|
+
schemas: () => Promise<{
|
|
2597
|
+
apiVersions: import("@50heads/shared").WebhookApiVersion[];
|
|
2598
|
+
latest: import("@50heads/shared").WebhookApiVersion;
|
|
2599
|
+
events: Record<import("@50heads/shared").EventType, Record<string, unknown>>;
|
|
2600
|
+
}>;
|
|
2601
|
+
};
|
|
2602
|
+
apps: {
|
|
2603
|
+
list: () => Promise<{
|
|
2604
|
+
apps: {
|
|
2605
|
+
id: string;
|
|
2606
|
+
provider: "teams" | "slack";
|
|
2607
|
+
workspaceId: string;
|
|
2608
|
+
workspaceName: string;
|
|
2609
|
+
defaultChannelName: string | null;
|
|
2610
|
+
capDailyPence: number;
|
|
2611
|
+
spentTodayPence: number;
|
|
2612
|
+
installedAt: string;
|
|
2613
|
+
installedBy: {
|
|
2614
|
+
name: string | null;
|
|
2615
|
+
email: string | null;
|
|
2616
|
+
};
|
|
2617
|
+
status: "active" | "revoked";
|
|
2618
|
+
}[];
|
|
2619
|
+
zapier: {
|
|
2620
|
+
connectionId: string;
|
|
2621
|
+
connectedAt: string;
|
|
2622
|
+
lastUsedAt: string | null;
|
|
2623
|
+
capDailyPence: number;
|
|
2624
|
+
spentTodayPence: number;
|
|
2625
|
+
hooks: number;
|
|
2626
|
+
connectedBy: {
|
|
2627
|
+
name: string | null;
|
|
2628
|
+
email: string | null;
|
|
2629
|
+
};
|
|
2630
|
+
}[];
|
|
2631
|
+
teamsAvailable: boolean;
|
|
2632
|
+
}>;
|
|
2633
|
+
slackInstallUrl: () => Promise<{
|
|
2634
|
+
url: string;
|
|
2635
|
+
}>;
|
|
2636
|
+
teamsLinkPreview: (state: string) => Promise<{
|
|
2637
|
+
workspaceName: string;
|
|
2638
|
+
expiresAt: string;
|
|
2639
|
+
}>;
|
|
2640
|
+
teamsLink: (input: import("@50heads/shared").TeamsLinkInput) => Promise<{
|
|
2641
|
+
app: import("@50heads/shared").WorkspaceApp;
|
|
2642
|
+
}>;
|
|
2643
|
+
update: (id: string, input: import("@50heads/shared").UpdateWorkspaceAppInput) => Promise<{
|
|
2644
|
+
app: import("@50heads/shared").WorkspaceApp;
|
|
2645
|
+
}>;
|
|
2646
|
+
remove: (id: string) => Promise<{
|
|
2647
|
+
ok: true;
|
|
2648
|
+
}>;
|
|
2649
|
+
};
|
|
2349
2650
|
mcp: {
|
|
2350
2651
|
logCalls: (input: import("zod").infer<typeof import("@50heads/shared").McpCallsInput>) => Promise<{
|
|
2351
2652
|
ok: true;
|
|
@@ -2405,6 +2706,18 @@ export declare function makeApi(opts: StdioOptions): (tool: string, client?: str
|
|
|
2405
2706
|
remove: (memberId: string) => Promise<{
|
|
2406
2707
|
team: import("@50heads/shared").Team | null;
|
|
2407
2708
|
}>;
|
|
2709
|
+
transferOwner: (input: import("zod").infer<typeof import("@50heads/shared").TransferTeamOwnerInput>, reauthToken: string) => Promise<{
|
|
2710
|
+
team: import("@50heads/shared").Team;
|
|
2711
|
+
}>;
|
|
2712
|
+
connections: () => Promise<{
|
|
2713
|
+
connections: import("@50heads/shared").TeamConnection[];
|
|
2714
|
+
}>;
|
|
2715
|
+
updateConnection: (id: string, input: import("zod").infer<typeof import("@50heads/shared").UpdateTeamConnectionInput>) => Promise<{
|
|
2716
|
+
connection: import("@50heads/shared").TeamConnection;
|
|
2717
|
+
}>;
|
|
2718
|
+
revokeConnection: (id: string) => Promise<{
|
|
2719
|
+
ok: true;
|
|
2720
|
+
}>;
|
|
2408
2721
|
accounts: () => Promise<{
|
|
2409
2722
|
accounts: import("@50heads/shared").WorkspaceAccount[];
|
|
2410
2723
|
}>;
|
|
@@ -2432,6 +2745,805 @@ export declare function makeApi(opts: StdioOptions): (tool: string, client?: str
|
|
|
2432
2745
|
nextCursor: string | null;
|
|
2433
2746
|
}>;
|
|
2434
2747
|
};
|
|
2748
|
+
organizations: {
|
|
2749
|
+
current: () => Promise<{
|
|
2750
|
+
organization: import("@50heads/shared").Organization;
|
|
2751
|
+
}>;
|
|
2752
|
+
rename: (input: import("@50heads/shared").RenameOrganizationInput, reauthToken: string) => Promise<{
|
|
2753
|
+
organization: import("@50heads/shared").Organization;
|
|
2754
|
+
}>;
|
|
2755
|
+
domains: () => Promise<{
|
|
2756
|
+
domains: import("@50heads/shared").OrganizationDomain[];
|
|
2757
|
+
}>;
|
|
2758
|
+
addDomain: (input: import("@50heads/shared").AddDomainInput, reauthToken: string) => Promise<{
|
|
2759
|
+
domain: import("@50heads/shared").OrganizationDomain;
|
|
2760
|
+
}>;
|
|
2761
|
+
verifyDomain: (id: string, reauthToken: string) => Promise<{
|
|
2762
|
+
outcome: "verified" | "already_verified" | "record_missing" | "value_mismatch" | "lookup_failed" | "held_elsewhere";
|
|
2763
|
+
domain: {
|
|
2764
|
+
id: string;
|
|
2765
|
+
domain: string;
|
|
2766
|
+
state: "verified" | "pending" | "failed" | "warning" | "revoked";
|
|
2767
|
+
challenge: {
|
|
2768
|
+
recordName: string;
|
|
2769
|
+
recordType: "TXT";
|
|
2770
|
+
value: string;
|
|
2771
|
+
};
|
|
2772
|
+
createdAt: string;
|
|
2773
|
+
verifiedAt: string | null;
|
|
2774
|
+
checkedAt: string | null;
|
|
2775
|
+
lastError: string | null;
|
|
2776
|
+
warningSince: string | null;
|
|
2777
|
+
graceEndsAt: string | null;
|
|
2778
|
+
};
|
|
2779
|
+
}>;
|
|
2780
|
+
removeDomain: (id: string, reauthToken: string) => Promise<{
|
|
2781
|
+
ok: true;
|
|
2782
|
+
}>;
|
|
2783
|
+
policies: () => Promise<{
|
|
2784
|
+
policies: import("@50heads/shared").OrganizationPolicies;
|
|
2785
|
+
}>;
|
|
2786
|
+
updatePolicies: (input: import("@50heads/shared").UpdatePoliciesInput, reauthToken: string) => Promise<{
|
|
2787
|
+
policies: import("@50heads/shared").OrganizationPolicies;
|
|
2788
|
+
}>;
|
|
2789
|
+
audit: (cursor?: string) => Promise<{
|
|
2790
|
+
events: {
|
|
2791
|
+
id: string;
|
|
2792
|
+
at: string;
|
|
2793
|
+
actor: {
|
|
2794
|
+
id: string | null;
|
|
2795
|
+
name: string | null;
|
|
2796
|
+
};
|
|
2797
|
+
action: "member.provisioned" | "member.deprovisioned" | "policy.changed" | "approval.requested" | "approval.decided" | "approval.expired" | "approval.refused" | "member.removed" | "member.role_changed" | "member.joined" | "approval.viewed" | "approval.reauthenticated" | "approval.canceled" | "approval.policy_changed" | "organization.created" | "organization.renamed" | "domain.added" | "domain.removed" | "domain.verified" | "domain.check_failed" | "domain.warning" | "domain.restored" | "domain.failed" | "sso.configured" | "sso.updated" | "sso.test_started" | "sso.tested" | "sso.enabled" | "sso.disabled" | "sso.enforced" | "sso.unenforced" | "sso.enforcement_suspended" | "sso.linked" | "sso.unlinked" | "break_glass.added" | "break_glass.removed" | "break_glass.used" | "scim.token_created" | "scim.token_rotated" | "scim.token_revoked" | "scim.settings_changed" | "scim.mapping_created" | "scim.mapping_changed" | "scim.mapping_removed" | "group.created" | "group.renamed" | "group.members_changed" | "group.deleted" | "member.linked" | "member.updated" | "member.reactivated" | "member.deleted" | "member.sessions_revoked" | "member.credentials_revoked" | "member.webhooks_stopped" | "deprovision.failing" | "workspace.owner_changed" | "sso.sessions_ended" | "service_account.created" | "service_account.updated" | "service_account.disabled" | "service_account.enabled" | "service_account.deleted" | "service_account.secret_rotated" | "service_account.secret_revoked" | "service_account.keys_changed";
|
|
2798
|
+
subject: string;
|
|
2799
|
+
data: Record<string, unknown>;
|
|
2800
|
+
}[];
|
|
2801
|
+
nextCursor: string | null;
|
|
2802
|
+
}>;
|
|
2803
|
+
auditEvents: (query?: import("@50heads/shared").AuditEventsQuery) => Promise<{
|
|
2804
|
+
events: {
|
|
2805
|
+
id: string;
|
|
2806
|
+
at: string;
|
|
2807
|
+
organizationId: string;
|
|
2808
|
+
workspaceId: string | null;
|
|
2809
|
+
source: "organization" | "workspace";
|
|
2810
|
+
actor: {
|
|
2811
|
+
type: "scim" | "system" | "oauth" | "person" | "service_account" | "api_key";
|
|
2812
|
+
id: string | null;
|
|
2813
|
+
name: string | null;
|
|
2814
|
+
};
|
|
2815
|
+
action: "question.canceled" | "credits.purchased" | "member.provisioned" | "member.deprovisioned" | "policy.changed" | "approval.requested" | "approval.decided" | "approval.expired" | "approval.refused" | "question.asked" | "key.created" | "key.revoked" | "key.updated" | "member.invited" | "member.removed" | "member.role_changed" | "member.joined" | "member.cap_changed" | "connection.created" | "connection.revoked" | "connection.cap_changed" | "approval.viewed" | "approval.reauthenticated" | "approval.canceled" | "approval.policy_changed" | "organization.created" | "organization.renamed" | "domain.added" | "domain.removed" | "domain.verified" | "domain.check_failed" | "domain.warning" | "domain.restored" | "domain.failed" | "sso.configured" | "sso.updated" | "sso.test_started" | "sso.tested" | "sso.enabled" | "sso.disabled" | "sso.enforced" | "sso.unenforced" | "sso.enforcement_suspended" | "sso.linked" | "sso.unlinked" | "break_glass.added" | "break_glass.removed" | "break_glass.used" | "scim.token_created" | "scim.token_rotated" | "scim.token_revoked" | "scim.settings_changed" | "scim.mapping_created" | "scim.mapping_changed" | "scim.mapping_removed" | "group.created" | "group.renamed" | "group.members_changed" | "group.deleted" | "member.linked" | "member.updated" | "member.reactivated" | "member.deleted" | "member.sessions_revoked" | "member.credentials_revoked" | "member.webhooks_stopped" | "deprovision.failing" | "workspace.owner_changed" | "sso.sessions_ended" | "service_account.created" | "service_account.updated" | "service_account.disabled" | "service_account.enabled" | "service_account.deleted" | "service_account.secret_rotated" | "service_account.secret_revoked" | "service_account.keys_changed" | "audit.retention_changed" | "audit.retention_applied" | "audit.hold_created" | "audit.hold_released" | "audit.exported";
|
|
2816
|
+
subject: string;
|
|
2817
|
+
data: Record<string, unknown>;
|
|
2818
|
+
ip: string | null;
|
|
2819
|
+
}[];
|
|
2820
|
+
nextCursor: string | null;
|
|
2821
|
+
}>;
|
|
2822
|
+
auditExportUrl: (format: "jsonl" | "csv", query?: Omit<import("@50heads/shared").AuditEventsQuery, "limit">) => string;
|
|
2823
|
+
auditExport: (format: "jsonl" | "csv", query?: Omit<import("@50heads/shared").AuditEventsQuery, "limit">) => Promise<string>;
|
|
2824
|
+
auditRetention: () => Promise<{
|
|
2825
|
+
retention: import("@50heads/shared").AuditRetention;
|
|
2826
|
+
}>;
|
|
2827
|
+
setAuditRetention: (input: import("@50heads/shared").UpdateAuditRetentionInput, reauthToken: string) => Promise<{
|
|
2828
|
+
retention: import("@50heads/shared").AuditRetention;
|
|
2829
|
+
}>;
|
|
2830
|
+
legalHolds: () => Promise<{
|
|
2831
|
+
holds: import("@50heads/shared").LegalHold[];
|
|
2832
|
+
}>;
|
|
2833
|
+
createLegalHold: (input: import("@50heads/shared").CreateLegalHoldInput, reauthToken: string) => Promise<{
|
|
2834
|
+
hold: import("@50heads/shared").LegalHold;
|
|
2835
|
+
}>;
|
|
2836
|
+
releaseLegalHold: (id: string, reauthToken: string) => Promise<{
|
|
2837
|
+
hold: import("@50heads/shared").LegalHold;
|
|
2838
|
+
}>;
|
|
2839
|
+
joinable: () => Promise<{
|
|
2840
|
+
organizations: import("@50heads/shared").JoinableOrganization[];
|
|
2841
|
+
}>;
|
|
2842
|
+
join: (input: import("@50heads/shared").JoinOrganizationInput) => Promise<{
|
|
2843
|
+
organizationId: string;
|
|
2844
|
+
workspaceId: string;
|
|
2845
|
+
role: "viewer";
|
|
2846
|
+
}>;
|
|
2847
|
+
securityPolicies: () => Promise<{
|
|
2848
|
+
policies: import("@50heads/shared").SecurityPolicies;
|
|
2849
|
+
}>;
|
|
2850
|
+
updateSecurityPolicies: (input: import("@50heads/shared").UpdateSecurityPoliciesInput, reauthToken: string) => Promise<{
|
|
2851
|
+
policies: import("@50heads/shared").SecurityPolicies;
|
|
2852
|
+
}>;
|
|
2853
|
+
requirements: () => Promise<{
|
|
2854
|
+
requirements: import("@50heads/shared").SecurityRequirements;
|
|
2855
|
+
}>;
|
|
2856
|
+
people: (query?: import("@50heads/shared").OrganizationPeopleQuery) => Promise<{
|
|
2857
|
+
people: {
|
|
2858
|
+
userId: string;
|
|
2859
|
+
name: string | null;
|
|
2860
|
+
email: string;
|
|
2861
|
+
teams: {
|
|
2862
|
+
workspaceId: string;
|
|
2863
|
+
workspaceName: string;
|
|
2864
|
+
role: "owner" | "admin" | "member" | "viewer" | "billing";
|
|
2865
|
+
scimManaged: boolean;
|
|
2866
|
+
}[];
|
|
2867
|
+
scim: {
|
|
2868
|
+
active: boolean;
|
|
2869
|
+
} | null;
|
|
2870
|
+
ssoLinked: boolean;
|
|
2871
|
+
lastSignInAt: string | null;
|
|
2872
|
+
activeSessions: number;
|
|
2873
|
+
}[];
|
|
2874
|
+
nextCursor: string | null;
|
|
2875
|
+
}>;
|
|
2876
|
+
memberSessions: (userId: string) => Promise<{
|
|
2877
|
+
userId: string;
|
|
2878
|
+
sessions: {
|
|
2879
|
+
id: string;
|
|
2880
|
+
kind: "app" | "web";
|
|
2881
|
+
label: string;
|
|
2882
|
+
country: string | null;
|
|
2883
|
+
authMethod: "apple" | "google" | "email" | "sso" | "passkey" | "break_glass" | null;
|
|
2884
|
+
createdAt: string;
|
|
2885
|
+
lastSeenAt: string | null;
|
|
2886
|
+
}[];
|
|
2887
|
+
}>;
|
|
2888
|
+
revokeMemberSessions: (userId: string, reauthToken: string) => Promise<{
|
|
2889
|
+
ok: true;
|
|
2890
|
+
revoked: number;
|
|
2891
|
+
}>;
|
|
2892
|
+
transferWorkspaceOwner: (workspaceId: string, input: import("@50heads/shared").TransferWorkspaceOwnerInput, reauthToken: string) => Promise<{
|
|
2893
|
+
workspaceId: string;
|
|
2894
|
+
ownerId: string;
|
|
2895
|
+
previousOwnerId: string;
|
|
2896
|
+
}>;
|
|
2897
|
+
scim: {
|
|
2898
|
+
settings: () => Promise<{
|
|
2899
|
+
settings: import("@50heads/shared").ScimSettings;
|
|
2900
|
+
}>;
|
|
2901
|
+
updateSettings: (input: import("@50heads/shared").UpdateScimSettingsInput, reauthToken: string) => Promise<{
|
|
2902
|
+
defaultRole: "admin" | "member" | "viewer" | "billing";
|
|
2903
|
+
}>;
|
|
2904
|
+
tokens: () => Promise<{
|
|
2905
|
+
tokens: import("@50heads/shared").ScimToken[];
|
|
2906
|
+
}>;
|
|
2907
|
+
createToken: (input: import("@50heads/shared").CreateScimTokenInput, reauthToken: string) => Promise<{
|
|
2908
|
+
token: {
|
|
2909
|
+
id: string;
|
|
2910
|
+
label: string;
|
|
2911
|
+
prefix: string;
|
|
2912
|
+
createdAt: string;
|
|
2913
|
+
createdBy: string | null;
|
|
2914
|
+
expiresAt: string | null;
|
|
2915
|
+
lastUsedAt: string | null;
|
|
2916
|
+
};
|
|
2917
|
+
secret: string;
|
|
2918
|
+
baseUrl: string;
|
|
2919
|
+
}>;
|
|
2920
|
+
rotateToken: (id: string, input: import("@50heads/shared").RotateScimTokenInput, reauthToken: string) => Promise<{
|
|
2921
|
+
token: {
|
|
2922
|
+
id: string;
|
|
2923
|
+
label: string;
|
|
2924
|
+
prefix: string;
|
|
2925
|
+
createdAt: string;
|
|
2926
|
+
createdBy: string | null;
|
|
2927
|
+
expiresAt: string | null;
|
|
2928
|
+
lastUsedAt: string | null;
|
|
2929
|
+
};
|
|
2930
|
+
secret: string;
|
|
2931
|
+
baseUrl: string;
|
|
2932
|
+
}>;
|
|
2933
|
+
revokeToken: (id: string, reauthToken: string) => Promise<{
|
|
2934
|
+
ok: true;
|
|
2935
|
+
}>;
|
|
2936
|
+
groups: () => Promise<{
|
|
2937
|
+
groups: import("@50heads/shared").ScimGroupSummary[];
|
|
2938
|
+
}>;
|
|
2939
|
+
mappings: () => Promise<{
|
|
2940
|
+
mappings: import("@50heads/shared").ScimGroupMapping[];
|
|
2941
|
+
}>;
|
|
2942
|
+
createMapping: (input: import("@50heads/shared").CreateScimGroupMappingInput, reauthToken: string) => Promise<{
|
|
2943
|
+
mapping: import("@50heads/shared").ScimGroupMapping;
|
|
2944
|
+
}>;
|
|
2945
|
+
updateMapping: (id: string, input: import("@50heads/shared").UpdateScimGroupMappingInput, reauthToken: string) => Promise<{
|
|
2946
|
+
mapping: import("@50heads/shared").ScimGroupMapping;
|
|
2947
|
+
}>;
|
|
2948
|
+
removeMapping: (id: string, reauthToken: string) => Promise<{
|
|
2949
|
+
ok: true;
|
|
2950
|
+
}>;
|
|
2951
|
+
log: (limit?: number) => Promise<{
|
|
2952
|
+
entries: {
|
|
2953
|
+
id: string;
|
|
2954
|
+
at: string;
|
|
2955
|
+
method: string;
|
|
2956
|
+
path: string;
|
|
2957
|
+
status: number;
|
|
2958
|
+
outcome: string;
|
|
2959
|
+
scimType: string | null;
|
|
2960
|
+
resourceId: string | null;
|
|
2961
|
+
tokenId: string | null;
|
|
2962
|
+
}[];
|
|
2963
|
+
}>;
|
|
2964
|
+
};
|
|
2965
|
+
sso: {
|
|
2966
|
+
get: () => Promise<{
|
|
2967
|
+
connection: {
|
|
2968
|
+
id: string;
|
|
2969
|
+
protocol: "oidc" | "saml";
|
|
2970
|
+
issuer: string;
|
|
2971
|
+
clientId: string;
|
|
2972
|
+
clientSecretSet: boolean;
|
|
2973
|
+
clientSecretHint: string | null;
|
|
2974
|
+
tokenAuthMethod: "client_secret_basic" | "client_secret_post";
|
|
2975
|
+
defaultWorkspaceId: string | null;
|
|
2976
|
+
defaultRole: "admin" | "member" | "viewer";
|
|
2977
|
+
state: "enabled" | "draft" | "tested";
|
|
2978
|
+
enforce: boolean;
|
|
2979
|
+
enforceEnabledAt: string | null;
|
|
2980
|
+
configChangedAt: string;
|
|
2981
|
+
lastTest: {
|
|
2982
|
+
at: string;
|
|
2983
|
+
by: {
|
|
2984
|
+
id: string;
|
|
2985
|
+
name: string | null;
|
|
2986
|
+
};
|
|
2987
|
+
result: string;
|
|
2988
|
+
matchedTester: boolean;
|
|
2989
|
+
current: boolean;
|
|
2990
|
+
} | null;
|
|
2991
|
+
lastSignInAt: string | null;
|
|
2992
|
+
createdAt: string;
|
|
2993
|
+
updatedAt: string | null;
|
|
2994
|
+
saml: {
|
|
2995
|
+
idpEntityId: string;
|
|
2996
|
+
ssoUrl: string;
|
|
2997
|
+
metadataUrl: string | null;
|
|
2998
|
+
certificates: {
|
|
2999
|
+
fingerprint: string;
|
|
3000
|
+
notBefore: string;
|
|
3001
|
+
notAfter: string;
|
|
3002
|
+
subject: string | null;
|
|
3003
|
+
keyType: "rsa" | "ec-p256";
|
|
3004
|
+
}[];
|
|
3005
|
+
allowIdpInitiated: boolean;
|
|
3006
|
+
} | null;
|
|
3007
|
+
} | null;
|
|
3008
|
+
redirectUri: string;
|
|
3009
|
+
scopes: string[];
|
|
3010
|
+
saml: {
|
|
3011
|
+
entityId: string;
|
|
3012
|
+
acsUrl: string;
|
|
3013
|
+
metadataUrl: string;
|
|
3014
|
+
nameIdFormat: string;
|
|
3015
|
+
};
|
|
3016
|
+
}>;
|
|
3017
|
+
save: (input: import("@50heads/shared").SsoConnectionInput, reauthToken: string) => Promise<{
|
|
3018
|
+
connection: {
|
|
3019
|
+
id: string;
|
|
3020
|
+
protocol: "oidc" | "saml";
|
|
3021
|
+
issuer: string;
|
|
3022
|
+
clientId: string;
|
|
3023
|
+
clientSecretSet: boolean;
|
|
3024
|
+
clientSecretHint: string | null;
|
|
3025
|
+
tokenAuthMethod: "client_secret_basic" | "client_secret_post";
|
|
3026
|
+
defaultWorkspaceId: string | null;
|
|
3027
|
+
defaultRole: "admin" | "member" | "viewer";
|
|
3028
|
+
state: "enabled" | "draft" | "tested";
|
|
3029
|
+
enforce: boolean;
|
|
3030
|
+
enforceEnabledAt: string | null;
|
|
3031
|
+
configChangedAt: string;
|
|
3032
|
+
lastTest: {
|
|
3033
|
+
at: string;
|
|
3034
|
+
by: {
|
|
3035
|
+
id: string;
|
|
3036
|
+
name: string | null;
|
|
3037
|
+
};
|
|
3038
|
+
result: string;
|
|
3039
|
+
matchedTester: boolean;
|
|
3040
|
+
current: boolean;
|
|
3041
|
+
} | null;
|
|
3042
|
+
lastSignInAt: string | null;
|
|
3043
|
+
createdAt: string;
|
|
3044
|
+
updatedAt: string | null;
|
|
3045
|
+
saml: {
|
|
3046
|
+
idpEntityId: string;
|
|
3047
|
+
ssoUrl: string;
|
|
3048
|
+
metadataUrl: string | null;
|
|
3049
|
+
certificates: {
|
|
3050
|
+
fingerprint: string;
|
|
3051
|
+
notBefore: string;
|
|
3052
|
+
notAfter: string;
|
|
3053
|
+
subject: string | null;
|
|
3054
|
+
keyType: "rsa" | "ec-p256";
|
|
3055
|
+
}[];
|
|
3056
|
+
allowIdpInitiated: boolean;
|
|
3057
|
+
} | null;
|
|
3058
|
+
} | null;
|
|
3059
|
+
redirectUri: string;
|
|
3060
|
+
scopes: string[];
|
|
3061
|
+
saml: {
|
|
3062
|
+
entityId: string;
|
|
3063
|
+
acsUrl: string;
|
|
3064
|
+
metadataUrl: string;
|
|
3065
|
+
nameIdFormat: string;
|
|
3066
|
+
};
|
|
3067
|
+
}>;
|
|
3068
|
+
update: (input: import("@50heads/shared").SsoConnectionPatch, reauthToken: string) => Promise<{
|
|
3069
|
+
connection: {
|
|
3070
|
+
id: string;
|
|
3071
|
+
protocol: "oidc" | "saml";
|
|
3072
|
+
issuer: string;
|
|
3073
|
+
clientId: string;
|
|
3074
|
+
clientSecretSet: boolean;
|
|
3075
|
+
clientSecretHint: string | null;
|
|
3076
|
+
tokenAuthMethod: "client_secret_basic" | "client_secret_post";
|
|
3077
|
+
defaultWorkspaceId: string | null;
|
|
3078
|
+
defaultRole: "admin" | "member" | "viewer";
|
|
3079
|
+
state: "enabled" | "draft" | "tested";
|
|
3080
|
+
enforce: boolean;
|
|
3081
|
+
enforceEnabledAt: string | null;
|
|
3082
|
+
configChangedAt: string;
|
|
3083
|
+
lastTest: {
|
|
3084
|
+
at: string;
|
|
3085
|
+
by: {
|
|
3086
|
+
id: string;
|
|
3087
|
+
name: string | null;
|
|
3088
|
+
};
|
|
3089
|
+
result: string;
|
|
3090
|
+
matchedTester: boolean;
|
|
3091
|
+
current: boolean;
|
|
3092
|
+
} | null;
|
|
3093
|
+
lastSignInAt: string | null;
|
|
3094
|
+
createdAt: string;
|
|
3095
|
+
updatedAt: string | null;
|
|
3096
|
+
saml: {
|
|
3097
|
+
idpEntityId: string;
|
|
3098
|
+
ssoUrl: string;
|
|
3099
|
+
metadataUrl: string | null;
|
|
3100
|
+
certificates: {
|
|
3101
|
+
fingerprint: string;
|
|
3102
|
+
notBefore: string;
|
|
3103
|
+
notAfter: string;
|
|
3104
|
+
subject: string | null;
|
|
3105
|
+
keyType: "rsa" | "ec-p256";
|
|
3106
|
+
}[];
|
|
3107
|
+
allowIdpInitiated: boolean;
|
|
3108
|
+
} | null;
|
|
3109
|
+
} | null;
|
|
3110
|
+
redirectUri: string;
|
|
3111
|
+
scopes: string[];
|
|
3112
|
+
saml: {
|
|
3113
|
+
entityId: string;
|
|
3114
|
+
acsUrl: string;
|
|
3115
|
+
metadataUrl: string;
|
|
3116
|
+
nameIdFormat: string;
|
|
3117
|
+
};
|
|
3118
|
+
}>;
|
|
3119
|
+
test: (reauthToken: string) => Promise<{
|
|
3120
|
+
url: string;
|
|
3121
|
+
expiresAt: string;
|
|
3122
|
+
}>;
|
|
3123
|
+
events: (cursor?: string) => Promise<{
|
|
3124
|
+
events: {
|
|
3125
|
+
id: string;
|
|
3126
|
+
at: string;
|
|
3127
|
+
kind: "link" | "test" | "sign_in";
|
|
3128
|
+
outcome: "error" | "ok";
|
|
3129
|
+
code: string | null;
|
|
3130
|
+
message: string | null;
|
|
3131
|
+
email: string | null;
|
|
3132
|
+
}[];
|
|
3133
|
+
nextCursor: string | null;
|
|
3134
|
+
}>;
|
|
3135
|
+
enforce: (input: import("@50heads/shared").SsoEnforceInput, reauthToken: string) => Promise<{
|
|
3136
|
+
connection: {
|
|
3137
|
+
id: string;
|
|
3138
|
+
protocol: "oidc" | "saml";
|
|
3139
|
+
issuer: string;
|
|
3140
|
+
clientId: string;
|
|
3141
|
+
clientSecretSet: boolean;
|
|
3142
|
+
clientSecretHint: string | null;
|
|
3143
|
+
tokenAuthMethod: "client_secret_basic" | "client_secret_post";
|
|
3144
|
+
defaultWorkspaceId: string | null;
|
|
3145
|
+
defaultRole: "admin" | "member" | "viewer";
|
|
3146
|
+
state: "enabled" | "draft" | "tested";
|
|
3147
|
+
enforce: boolean;
|
|
3148
|
+
enforceEnabledAt: string | null;
|
|
3149
|
+
configChangedAt: string;
|
|
3150
|
+
lastTest: {
|
|
3151
|
+
at: string;
|
|
3152
|
+
by: {
|
|
3153
|
+
id: string;
|
|
3154
|
+
name: string | null;
|
|
3155
|
+
};
|
|
3156
|
+
result: string;
|
|
3157
|
+
matchedTester: boolean;
|
|
3158
|
+
current: boolean;
|
|
3159
|
+
} | null;
|
|
3160
|
+
lastSignInAt: string | null;
|
|
3161
|
+
createdAt: string;
|
|
3162
|
+
updatedAt: string | null;
|
|
3163
|
+
saml: {
|
|
3164
|
+
idpEntityId: string;
|
|
3165
|
+
ssoUrl: string;
|
|
3166
|
+
metadataUrl: string | null;
|
|
3167
|
+
certificates: {
|
|
3168
|
+
fingerprint: string;
|
|
3169
|
+
notBefore: string;
|
|
3170
|
+
notAfter: string;
|
|
3171
|
+
subject: string | null;
|
|
3172
|
+
keyType: "rsa" | "ec-p256";
|
|
3173
|
+
}[];
|
|
3174
|
+
allowIdpInitiated: boolean;
|
|
3175
|
+
} | null;
|
|
3176
|
+
} | null;
|
|
3177
|
+
redirectUri: string;
|
|
3178
|
+
scopes: string[];
|
|
3179
|
+
saml: {
|
|
3180
|
+
entityId: string;
|
|
3181
|
+
acsUrl: string;
|
|
3182
|
+
metadataUrl: string;
|
|
3183
|
+
nameIdFormat: string;
|
|
3184
|
+
};
|
|
3185
|
+
}>;
|
|
3186
|
+
breakGlass: {
|
|
3187
|
+
list: () => Promise<{
|
|
3188
|
+
members: {
|
|
3189
|
+
userId: string;
|
|
3190
|
+
email: string;
|
|
3191
|
+
name: string | null;
|
|
3192
|
+
addedAt: string;
|
|
3193
|
+
hasPasskey: boolean;
|
|
3194
|
+
}[];
|
|
3195
|
+
max: number;
|
|
3196
|
+
}>;
|
|
3197
|
+
add: (input: import("@50heads/shared").BreakGlassAddInput, reauthToken: string) => Promise<{
|
|
3198
|
+
members: {
|
|
3199
|
+
userId: string;
|
|
3200
|
+
email: string;
|
|
3201
|
+
name: string | null;
|
|
3202
|
+
addedAt: string;
|
|
3203
|
+
hasPasskey: boolean;
|
|
3204
|
+
}[];
|
|
3205
|
+
max: number;
|
|
3206
|
+
}>;
|
|
3207
|
+
remove: (userId: string, reauthToken: string) => Promise<{
|
|
3208
|
+
members: {
|
|
3209
|
+
userId: string;
|
|
3210
|
+
email: string;
|
|
3211
|
+
name: string | null;
|
|
3212
|
+
addedAt: string;
|
|
3213
|
+
hasPasskey: boolean;
|
|
3214
|
+
}[];
|
|
3215
|
+
max: number;
|
|
3216
|
+
}>;
|
|
3217
|
+
};
|
|
3218
|
+
};
|
|
3219
|
+
serviceAccounts: {
|
|
3220
|
+
list: () => Promise<{
|
|
3221
|
+
serviceAccounts: {
|
|
3222
|
+
id: string;
|
|
3223
|
+
name: string;
|
|
3224
|
+
organizationId: string;
|
|
3225
|
+
workspaceId: string;
|
|
3226
|
+
workspaceName: string;
|
|
3227
|
+
status: "active" | "disabled";
|
|
3228
|
+
scopes: ("questions:read" | "questions:write" | "templates:read" | "account:read" | "webhooks:read" | "webhooks:write" | "apps:read" | "apps:write" | "organization:read" | "organization:write" | "members:read" | "members:write" | "audit:read")[];
|
|
3229
|
+
capDailyPence: number;
|
|
3230
|
+
capPerQuestionPence: number | null;
|
|
3231
|
+
spentTodayPence: number;
|
|
3232
|
+
clientId: string;
|
|
3233
|
+
authMethod: "client_secret" | "private_key_jwt";
|
|
3234
|
+
secrets: {
|
|
3235
|
+
id: string;
|
|
3236
|
+
hint: string;
|
|
3237
|
+
createdAt: string;
|
|
3238
|
+
expiresAt: string | null;
|
|
3239
|
+
lastUsedAt: string | null;
|
|
3240
|
+
}[];
|
|
3241
|
+
jwks: {
|
|
3242
|
+
keys: {
|
|
3243
|
+
[x: string]: unknown;
|
|
3244
|
+
kty: "EC" | "RSA";
|
|
3245
|
+
kid?: string | undefined;
|
|
3246
|
+
alg?: "ES256" | "RS256" | undefined;
|
|
3247
|
+
use?: "sig" | undefined;
|
|
3248
|
+
crv?: string | undefined;
|
|
3249
|
+
x?: string | undefined;
|
|
3250
|
+
y?: string | undefined;
|
|
3251
|
+
n?: string | undefined;
|
|
3252
|
+
e?: string | undefined;
|
|
3253
|
+
}[];
|
|
3254
|
+
} | null;
|
|
3255
|
+
createdAt: string;
|
|
3256
|
+
createdBy: {
|
|
3257
|
+
id: string;
|
|
3258
|
+
name: string | null;
|
|
3259
|
+
} | null;
|
|
3260
|
+
lastUsedAt: string | null;
|
|
3261
|
+
disabledAt: string | null;
|
|
3262
|
+
}[];
|
|
3263
|
+
}>;
|
|
3264
|
+
get: (id: string) => Promise<{
|
|
3265
|
+
serviceAccount: import("@50heads/shared").ServiceAccount;
|
|
3266
|
+
}>;
|
|
3267
|
+
create: (input: import("@50heads/shared").CreateServiceAccountInput, reauthToken: string) => Promise<{
|
|
3268
|
+
serviceAccount: {
|
|
3269
|
+
id: string;
|
|
3270
|
+
name: string;
|
|
3271
|
+
organizationId: string;
|
|
3272
|
+
workspaceId: string;
|
|
3273
|
+
workspaceName: string;
|
|
3274
|
+
status: "active" | "disabled";
|
|
3275
|
+
scopes: ("questions:read" | "questions:write" | "templates:read" | "account:read" | "webhooks:read" | "webhooks:write" | "apps:read" | "apps:write" | "organization:read" | "organization:write" | "members:read" | "members:write" | "audit:read")[];
|
|
3276
|
+
capDailyPence: number;
|
|
3277
|
+
capPerQuestionPence: number | null;
|
|
3278
|
+
spentTodayPence: number;
|
|
3279
|
+
clientId: string;
|
|
3280
|
+
authMethod: "client_secret" | "private_key_jwt";
|
|
3281
|
+
secrets: {
|
|
3282
|
+
id: string;
|
|
3283
|
+
hint: string;
|
|
3284
|
+
createdAt: string;
|
|
3285
|
+
expiresAt: string | null;
|
|
3286
|
+
lastUsedAt: string | null;
|
|
3287
|
+
}[];
|
|
3288
|
+
jwks: {
|
|
3289
|
+
keys: {
|
|
3290
|
+
[x: string]: unknown;
|
|
3291
|
+
kty: "EC" | "RSA";
|
|
3292
|
+
kid?: string | undefined;
|
|
3293
|
+
alg?: "ES256" | "RS256" | undefined;
|
|
3294
|
+
use?: "sig" | undefined;
|
|
3295
|
+
crv?: string | undefined;
|
|
3296
|
+
x?: string | undefined;
|
|
3297
|
+
y?: string | undefined;
|
|
3298
|
+
n?: string | undefined;
|
|
3299
|
+
e?: string | undefined;
|
|
3300
|
+
}[];
|
|
3301
|
+
} | null;
|
|
3302
|
+
createdAt: string;
|
|
3303
|
+
createdBy: {
|
|
3304
|
+
id: string;
|
|
3305
|
+
name: string | null;
|
|
3306
|
+
} | null;
|
|
3307
|
+
lastUsedAt: string | null;
|
|
3308
|
+
disabledAt: string | null;
|
|
3309
|
+
};
|
|
3310
|
+
clientSecret: string | null;
|
|
3311
|
+
tokenEndpoint: string;
|
|
3312
|
+
}>;
|
|
3313
|
+
update: (id: string, input: import("@50heads/shared").UpdateServiceAccountInput, reauthToken: string) => Promise<{
|
|
3314
|
+
serviceAccount: import("@50heads/shared").ServiceAccount;
|
|
3315
|
+
}>;
|
|
3316
|
+
disable: (id: string, reauthToken: string) => Promise<{
|
|
3317
|
+
serviceAccount: import("@50heads/shared").ServiceAccount;
|
|
3318
|
+
}>;
|
|
3319
|
+
enable: (id: string, reauthToken: string) => Promise<{
|
|
3320
|
+
serviceAccount: import("@50heads/shared").ServiceAccount;
|
|
3321
|
+
}>;
|
|
3322
|
+
remove: (id: string, reauthToken: string) => Promise<{
|
|
3323
|
+
ok: true;
|
|
3324
|
+
}>;
|
|
3325
|
+
rotateSecret: (id: string, input: import("@50heads/shared").RotateServiceAccountSecretInput, reauthToken: string) => Promise<{
|
|
3326
|
+
serviceAccount: {
|
|
3327
|
+
id: string;
|
|
3328
|
+
name: string;
|
|
3329
|
+
organizationId: string;
|
|
3330
|
+
workspaceId: string;
|
|
3331
|
+
workspaceName: string;
|
|
3332
|
+
status: "active" | "disabled";
|
|
3333
|
+
scopes: ("questions:read" | "questions:write" | "templates:read" | "account:read" | "webhooks:read" | "webhooks:write" | "apps:read" | "apps:write" | "organization:read" | "organization:write" | "members:read" | "members:write" | "audit:read")[];
|
|
3334
|
+
capDailyPence: number;
|
|
3335
|
+
capPerQuestionPence: number | null;
|
|
3336
|
+
spentTodayPence: number;
|
|
3337
|
+
clientId: string;
|
|
3338
|
+
authMethod: "client_secret" | "private_key_jwt";
|
|
3339
|
+
secrets: {
|
|
3340
|
+
id: string;
|
|
3341
|
+
hint: string;
|
|
3342
|
+
createdAt: string;
|
|
3343
|
+
expiresAt: string | null;
|
|
3344
|
+
lastUsedAt: string | null;
|
|
3345
|
+
}[];
|
|
3346
|
+
jwks: {
|
|
3347
|
+
keys: {
|
|
3348
|
+
[x: string]: unknown;
|
|
3349
|
+
kty: "EC" | "RSA";
|
|
3350
|
+
kid?: string | undefined;
|
|
3351
|
+
alg?: "ES256" | "RS256" | undefined;
|
|
3352
|
+
use?: "sig" | undefined;
|
|
3353
|
+
crv?: string | undefined;
|
|
3354
|
+
x?: string | undefined;
|
|
3355
|
+
y?: string | undefined;
|
|
3356
|
+
n?: string | undefined;
|
|
3357
|
+
e?: string | undefined;
|
|
3358
|
+
}[];
|
|
3359
|
+
} | null;
|
|
3360
|
+
createdAt: string;
|
|
3361
|
+
createdBy: {
|
|
3362
|
+
id: string;
|
|
3363
|
+
name: string | null;
|
|
3364
|
+
} | null;
|
|
3365
|
+
lastUsedAt: string | null;
|
|
3366
|
+
disabledAt: string | null;
|
|
3367
|
+
};
|
|
3368
|
+
clientSecret: string | null;
|
|
3369
|
+
tokenEndpoint: string;
|
|
3370
|
+
}>;
|
|
3371
|
+
revokeSecret: (id: string, secretId: string, reauthToken: string) => Promise<{
|
|
3372
|
+
serviceAccount: import("@50heads/shared").ServiceAccount;
|
|
3373
|
+
}>;
|
|
3374
|
+
setJwks: (id: string, input: import("@50heads/shared").SetServiceAccountJwksInput, reauthToken: string) => Promise<{
|
|
3375
|
+
serviceAccount: import("@50heads/shared").ServiceAccount;
|
|
3376
|
+
}>;
|
|
3377
|
+
};
|
|
3378
|
+
};
|
|
3379
|
+
approvals: {
|
|
3380
|
+
list: (query?: import("@50heads/shared").ApprovalListQuery) => Promise<{
|
|
3381
|
+
approvals: {
|
|
3382
|
+
id: string;
|
|
3383
|
+
state: "canceled" | "approved" | "denied" | "pending" | "expired";
|
|
3384
|
+
organizationId: string;
|
|
3385
|
+
organizationName: string;
|
|
3386
|
+
workspaceId: string;
|
|
3387
|
+
workspaceName: string;
|
|
3388
|
+
questionId: string;
|
|
3389
|
+
question: {
|
|
3390
|
+
text: string;
|
|
3391
|
+
type: string;
|
|
3392
|
+
options: {
|
|
3393
|
+
label: string;
|
|
3394
|
+
imageUrl: string | null;
|
|
3395
|
+
}[];
|
|
3396
|
+
context: string | null;
|
|
3397
|
+
};
|
|
3398
|
+
amountPence: number;
|
|
3399
|
+
heads: number;
|
|
3400
|
+
tier: number;
|
|
3401
|
+
etaMinutes: number | null;
|
|
3402
|
+
reasons: ("tier" | "images" | "per_ask" | "per_day" | "per_month" | "always")[];
|
|
3403
|
+
requester: {
|
|
3404
|
+
kind: "key" | "app" | "person" | "service_account";
|
|
3405
|
+
name: string;
|
|
3406
|
+
keyTail: string | null;
|
|
3407
|
+
};
|
|
3408
|
+
projectId: string | null;
|
|
3409
|
+
projectName: string | null;
|
|
3410
|
+
quorum: 1 | 2;
|
|
3411
|
+
approvedCount: number;
|
|
3412
|
+
approverRoles: ("owner" | "admin" | "billing")[];
|
|
3413
|
+
approverCount: number;
|
|
3414
|
+
votes: {
|
|
3415
|
+
userId: string | null;
|
|
3416
|
+
name: string | null;
|
|
3417
|
+
role: string;
|
|
3418
|
+
decision: "approve" | "deny";
|
|
3419
|
+
reason: string | null;
|
|
3420
|
+
channel: "app" | "web";
|
|
3421
|
+
at: string;
|
|
3422
|
+
}[];
|
|
3423
|
+
expiresAt: string;
|
|
3424
|
+
createdAt: string;
|
|
3425
|
+
decidedAt: string | null;
|
|
3426
|
+
canDecide: boolean;
|
|
3427
|
+
blocked: "expired" | "own_ask" | "not_approver" | "already_voted" | "decided" | null;
|
|
3428
|
+
heldPence: number;
|
|
3429
|
+
confirmRequired: boolean;
|
|
3430
|
+
approveUrl: string;
|
|
3431
|
+
}[];
|
|
3432
|
+
pendingForYou: number;
|
|
3433
|
+
nextCursor: string | null;
|
|
3434
|
+
stats?: {
|
|
3435
|
+
decided: number;
|
|
3436
|
+
approved: number;
|
|
3437
|
+
denied: number;
|
|
3438
|
+
expired: number;
|
|
3439
|
+
approvedPence: number;
|
|
3440
|
+
releasedPence: number;
|
|
3441
|
+
medianMinutes: number | null;
|
|
3442
|
+
slowestMinutes: number | null;
|
|
3443
|
+
monthlyLimitPence: number | null;
|
|
3444
|
+
} | null | undefined;
|
|
3445
|
+
enabled?: boolean | undefined;
|
|
3446
|
+
}>;
|
|
3447
|
+
review: (id: string) => Promise<{
|
|
3448
|
+
approval: import("@50heads/shared").Approval;
|
|
3449
|
+
}>;
|
|
3450
|
+
status: (id: string) => Promise<{
|
|
3451
|
+
approvalId: string;
|
|
3452
|
+
questionId: string;
|
|
3453
|
+
status: "canceled" | "approved" | "denied" | "pending" | "expired";
|
|
3454
|
+
amountPence: number;
|
|
3455
|
+
approveUrl: string;
|
|
3456
|
+
expiresAt: string;
|
|
3457
|
+
quorum: 1 | 2;
|
|
3458
|
+
approvedCount: number;
|
|
3459
|
+
code: "refused_by_policy" | "approval_expired" | null;
|
|
3460
|
+
decision: {
|
|
3461
|
+
outcome: "canceled" | "approved" | "denied" | "expired";
|
|
3462
|
+
reason: string | null;
|
|
3463
|
+
decidedByRole: string | null;
|
|
3464
|
+
decidedAt: string;
|
|
3465
|
+
} | null;
|
|
3466
|
+
}>;
|
|
3467
|
+
confirm: (id: string, input: import("@50heads/shared").ApprovalConfirmInput) => Promise<{
|
|
3468
|
+
confirmationId: string;
|
|
3469
|
+
expiresAt: string;
|
|
3470
|
+
windowEndsAt: string;
|
|
3471
|
+
}>;
|
|
3472
|
+
decide: (id: string, input: import("@50heads/shared").ApprovalDecisionInput, options?: {
|
|
3473
|
+
reauthToken?: string;
|
|
3474
|
+
}) => Promise<import("@50heads/shared").ApprovalDecisionResult>;
|
|
3475
|
+
notifications: {
|
|
3476
|
+
get: () => Promise<{
|
|
3477
|
+
settings: import("@50heads/shared").ApprovalNotifySettings;
|
|
3478
|
+
}>;
|
|
3479
|
+
update: (input: import("@50heads/shared").ApprovalNotifySettingsInput) => Promise<{
|
|
3480
|
+
settings: import("@50heads/shared").ApprovalNotifySettings;
|
|
3481
|
+
}>;
|
|
3482
|
+
};
|
|
3483
|
+
policies: {
|
|
3484
|
+
list: () => Promise<{
|
|
3485
|
+
policies: {
|
|
3486
|
+
id: string;
|
|
3487
|
+
organizationId: string;
|
|
3488
|
+
scope: "key" | "organization" | "workspace" | "project";
|
|
3489
|
+
scopeId: string | null;
|
|
3490
|
+
scopeName: string | null;
|
|
3491
|
+
enabled: boolean;
|
|
3492
|
+
always: boolean;
|
|
3493
|
+
perAskPence: number | null;
|
|
3494
|
+
perDayPence: number | null;
|
|
3495
|
+
perMonthPence: number | null;
|
|
3496
|
+
requireForTiers: number[];
|
|
3497
|
+
requireForImages: boolean;
|
|
3498
|
+
approvers: {
|
|
3499
|
+
roles: ("owner" | "admin" | "billing")[];
|
|
3500
|
+
people: {
|
|
3501
|
+
userId: string;
|
|
3502
|
+
name: string | null;
|
|
3503
|
+
email: string | null;
|
|
3504
|
+
}[];
|
|
3505
|
+
};
|
|
3506
|
+
quorum: 1 | 2;
|
|
3507
|
+
expiresInMinutes: number;
|
|
3508
|
+
onExpiry: "deny";
|
|
3509
|
+
allowSelfApprovalUnderPence: number | null;
|
|
3510
|
+
notify: ("email" | "app")[];
|
|
3511
|
+
createdAt: string;
|
|
3512
|
+
updatedAt: string | null;
|
|
3513
|
+
}[];
|
|
3514
|
+
targets: {
|
|
3515
|
+
workspaces: {
|
|
3516
|
+
id: string;
|
|
3517
|
+
name: string;
|
|
3518
|
+
}[];
|
|
3519
|
+
projects: {
|
|
3520
|
+
id: string;
|
|
3521
|
+
name: string;
|
|
3522
|
+
workspaceId: string | null;
|
|
3523
|
+
}[];
|
|
3524
|
+
keys: {
|
|
3525
|
+
id: string;
|
|
3526
|
+
name: string;
|
|
3527
|
+
workspaceId: string | null;
|
|
3528
|
+
}[];
|
|
3529
|
+
people: {
|
|
3530
|
+
userId: string;
|
|
3531
|
+
name: string | null;
|
|
3532
|
+
email: string | null;
|
|
3533
|
+
}[];
|
|
3534
|
+
};
|
|
3535
|
+
}>;
|
|
3536
|
+
create: (input: import("@50heads/shared").ApprovalPolicyInput, reauthToken: string) => Promise<{
|
|
3537
|
+
policy: import("@50heads/shared").ApprovalPolicy;
|
|
3538
|
+
}>;
|
|
3539
|
+
update: (id: string, input: import("@50heads/shared").ApprovalPolicyPatch, reauthToken: string) => Promise<{
|
|
3540
|
+
policy: import("@50heads/shared").ApprovalPolicy;
|
|
3541
|
+
}>;
|
|
3542
|
+
remove: (id: string, reauthToken: string) => Promise<{
|
|
3543
|
+
ok: true;
|
|
3544
|
+
}>;
|
|
3545
|
+
};
|
|
3546
|
+
};
|
|
2435
3547
|
oauth: {
|
|
2436
3548
|
request: (id: string) => Promise<{
|
|
2437
3549
|
id: string;
|
|
@@ -2440,10 +3552,10 @@ export declare function makeApi(opts: StdioOptions): (tool: string, client?: str
|
|
|
2440
3552
|
clientUri: string | null;
|
|
2441
3553
|
logoUri: string | null;
|
|
2442
3554
|
redirectHost: string;
|
|
2443
|
-
scopes: ("questions:read" | "questions:write" | "templates:read" | "account:read")[];
|
|
3555
|
+
scopes: ("questions:read" | "questions:write" | "templates:read" | "account:read" | "webhooks:read" | "webhooks:write" | "apps:read" | "apps:write" | "organization:read" | "organization:write" | "members:read" | "members:write" | "audit:read")[];
|
|
2444
3556
|
scopeLines: string[];
|
|
2445
3557
|
defaultCapDailyPence: number;
|
|
2446
|
-
grantedScopes?: ("questions:read" | "questions:write" | "templates:read" | "account:read")[] | undefined;
|
|
3558
|
+
grantedScopes?: ("questions:read" | "questions:write" | "templates:read" | "account:read" | "webhooks:read" | "webhooks:write" | "apps:read" | "apps:write" | "organization:read" | "organization:write" | "members:read" | "members:write" | "audit:read")[] | undefined;
|
|
2447
3559
|
teams?: {
|
|
2448
3560
|
id: string;
|
|
2449
3561
|
name: string;
|