@examplary/sdk 2.4.0 → 2.6.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.
- package/dist/index.d.mts +287 -2
- package/dist/index.d.ts +287 -2
- package/dist/index.js +40 -0
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +40 -0
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -992,6 +992,23 @@ interface paths {
|
|
|
992
992
|
patch: operations["org.update"];
|
|
993
993
|
trace?: never;
|
|
994
994
|
};
|
|
995
|
+
"/org/limits": {
|
|
996
|
+
parameters: {
|
|
997
|
+
query?: never;
|
|
998
|
+
header?: never;
|
|
999
|
+
path?: never;
|
|
1000
|
+
cookie?: never;
|
|
1001
|
+
};
|
|
1002
|
+
/** Get organization limits */
|
|
1003
|
+
get: operations["org.limits"];
|
|
1004
|
+
put?: never;
|
|
1005
|
+
post?: never;
|
|
1006
|
+
delete?: never;
|
|
1007
|
+
options?: never;
|
|
1008
|
+
head?: never;
|
|
1009
|
+
patch?: never;
|
|
1010
|
+
trace?: never;
|
|
1011
|
+
};
|
|
995
1012
|
"/org/custom-domain": {
|
|
996
1013
|
parameters: {
|
|
997
1014
|
query?: never;
|
|
@@ -1031,6 +1048,46 @@ interface paths {
|
|
|
1031
1048
|
patch?: never;
|
|
1032
1049
|
trace?: never;
|
|
1033
1050
|
};
|
|
1051
|
+
"/audit-logs": {
|
|
1052
|
+
parameters: {
|
|
1053
|
+
query?: never;
|
|
1054
|
+
header?: never;
|
|
1055
|
+
path?: never;
|
|
1056
|
+
cookie?: never;
|
|
1057
|
+
};
|
|
1058
|
+
/**
|
|
1059
|
+
* List audit logs
|
|
1060
|
+
* @description List the workspace's audit logs, newest first, with optional date range, actor and object filters. Paginated.
|
|
1061
|
+
*/
|
|
1062
|
+
get: operations["audit-logs.list"];
|
|
1063
|
+
put?: never;
|
|
1064
|
+
post?: never;
|
|
1065
|
+
delete?: never;
|
|
1066
|
+
options?: never;
|
|
1067
|
+
head?: never;
|
|
1068
|
+
patch?: never;
|
|
1069
|
+
trace?: never;
|
|
1070
|
+
};
|
|
1071
|
+
"/audit-logs/export": {
|
|
1072
|
+
parameters: {
|
|
1073
|
+
query?: never;
|
|
1074
|
+
header?: never;
|
|
1075
|
+
path?: never;
|
|
1076
|
+
cookie?: never;
|
|
1077
|
+
};
|
|
1078
|
+
/**
|
|
1079
|
+
* Export audit logs
|
|
1080
|
+
* @description Export audit logs for a date range (optionally filtered by actor/object) as ND-JSON. Returns a temporary download URL.
|
|
1081
|
+
*/
|
|
1082
|
+
get: operations["audit-logs.export"];
|
|
1083
|
+
put?: never;
|
|
1084
|
+
post?: never;
|
|
1085
|
+
delete?: never;
|
|
1086
|
+
options?: never;
|
|
1087
|
+
head?: never;
|
|
1088
|
+
patch?: never;
|
|
1089
|
+
trace?: never;
|
|
1090
|
+
};
|
|
1034
1091
|
"/api-keys": {
|
|
1035
1092
|
parameters: {
|
|
1036
1093
|
query?: never;
|
|
@@ -1947,6 +2004,54 @@ interface paths {
|
|
|
1947
2004
|
patch: operations["patchRubrics:id"];
|
|
1948
2005
|
trace?: never;
|
|
1949
2006
|
};
|
|
2007
|
+
"/prompts": {
|
|
2008
|
+
parameters: {
|
|
2009
|
+
query?: never;
|
|
2010
|
+
header?: never;
|
|
2011
|
+
path?: never;
|
|
2012
|
+
cookie?: never;
|
|
2013
|
+
};
|
|
2014
|
+
/**
|
|
2015
|
+
* Get prompts
|
|
2016
|
+
* @description Get a list of reusable prompts, merging the workspace's saved prompts with the defaults provided by Examplary. Optionally filter by type and language.
|
|
2017
|
+
*/
|
|
2018
|
+
get: operations["prompts.list"];
|
|
2019
|
+
put?: never;
|
|
2020
|
+
/**
|
|
2021
|
+
* Save prompt
|
|
2022
|
+
* @description Save a reusable prompt in the current workspace.
|
|
2023
|
+
*/
|
|
2024
|
+
post: operations["prompts.create"];
|
|
2025
|
+
delete?: never;
|
|
2026
|
+
options?: never;
|
|
2027
|
+
head?: never;
|
|
2028
|
+
patch?: never;
|
|
2029
|
+
trace?: never;
|
|
2030
|
+
};
|
|
2031
|
+
"/prompts/{id}": {
|
|
2032
|
+
parameters: {
|
|
2033
|
+
query?: never;
|
|
2034
|
+
header?: never;
|
|
2035
|
+
path?: never;
|
|
2036
|
+
cookie?: never;
|
|
2037
|
+
};
|
|
2038
|
+
get?: never;
|
|
2039
|
+
put?: never;
|
|
2040
|
+
post?: never;
|
|
2041
|
+
/**
|
|
2042
|
+
* Delete prompt
|
|
2043
|
+
* @description Delete a prompt from the current workspace.
|
|
2044
|
+
*/
|
|
2045
|
+
delete: operations["prompts.delete"];
|
|
2046
|
+
options?: never;
|
|
2047
|
+
head?: never;
|
|
2048
|
+
/**
|
|
2049
|
+
* Update prompt
|
|
2050
|
+
* @description Update an existing prompt in the current workspace.
|
|
2051
|
+
*/
|
|
2052
|
+
patch: operations["prompts.update"];
|
|
2053
|
+
trace?: never;
|
|
2054
|
+
};
|
|
1950
2055
|
"/jobs/{id}": {
|
|
1951
2056
|
parameters: {
|
|
1952
2057
|
query?: never;
|
|
@@ -3660,11 +3765,9 @@ interface operations {
|
|
|
3660
3765
|
content: {
|
|
3661
3766
|
"application/json": {
|
|
3662
3767
|
name?: string;
|
|
3663
|
-
/** Format: uri */
|
|
3664
3768
|
logoImageUrl?: string;
|
|
3665
3769
|
menuColor?: string;
|
|
3666
3770
|
accentColor?: string;
|
|
3667
|
-
sharingBlockPublic?: boolean;
|
|
3668
3771
|
settings?: {
|
|
3669
3772
|
/** @description Whether users can only see other users in the same groups as them. */
|
|
3670
3773
|
restrictGroupVisibility?: boolean;
|
|
@@ -3678,6 +3781,16 @@ interface operations {
|
|
|
3678
3781
|
};
|
|
3679
3782
|
responses: never;
|
|
3680
3783
|
};
|
|
3784
|
+
"org.limits": {
|
|
3785
|
+
parameters: {
|
|
3786
|
+
query?: never;
|
|
3787
|
+
header?: never;
|
|
3788
|
+
path?: never;
|
|
3789
|
+
cookie?: never;
|
|
3790
|
+
};
|
|
3791
|
+
requestBody?: never;
|
|
3792
|
+
responses: never;
|
|
3793
|
+
};
|
|
3681
3794
|
"org.customDomain.get": {
|
|
3682
3795
|
parameters: {
|
|
3683
3796
|
query?: never;
|
|
@@ -3730,6 +3843,42 @@ interface operations {
|
|
|
3730
3843
|
};
|
|
3731
3844
|
responses: never;
|
|
3732
3845
|
};
|
|
3846
|
+
"audit-logs.list": {
|
|
3847
|
+
parameters: {
|
|
3848
|
+
query?: {
|
|
3849
|
+
actor?: string;
|
|
3850
|
+
object?: string;
|
|
3851
|
+
/** @description Start date (YYYY-MM-DD), inclusive */
|
|
3852
|
+
from?: string;
|
|
3853
|
+
/** @description End date (YYYY-MM-DD), inclusive */
|
|
3854
|
+
to?: string;
|
|
3855
|
+
/** @description Base64-encoded pagination cursor */
|
|
3856
|
+
exclusiveStartKey?: string;
|
|
3857
|
+
};
|
|
3858
|
+
header?: never;
|
|
3859
|
+
path?: never;
|
|
3860
|
+
cookie?: never;
|
|
3861
|
+
};
|
|
3862
|
+
requestBody?: never;
|
|
3863
|
+
responses: never;
|
|
3864
|
+
};
|
|
3865
|
+
"audit-logs.export": {
|
|
3866
|
+
parameters: {
|
|
3867
|
+
query: {
|
|
3868
|
+
/** @description Start date (YYYY-MM-DD), inclusive */
|
|
3869
|
+
from: string;
|
|
3870
|
+
/** @description End date (YYYY-MM-DD), inclusive */
|
|
3871
|
+
to: string;
|
|
3872
|
+
actor?: string;
|
|
3873
|
+
object?: string;
|
|
3874
|
+
};
|
|
3875
|
+
header?: never;
|
|
3876
|
+
path?: never;
|
|
3877
|
+
cookie?: never;
|
|
3878
|
+
};
|
|
3879
|
+
requestBody?: never;
|
|
3880
|
+
responses: never;
|
|
3881
|
+
};
|
|
3733
3882
|
"apiKeys.get": {
|
|
3734
3883
|
parameters: {
|
|
3735
3884
|
query?: never;
|
|
@@ -5642,6 +5791,71 @@ interface operations {
|
|
|
5642
5791
|
};
|
|
5643
5792
|
responses: never;
|
|
5644
5793
|
};
|
|
5794
|
+
"prompts.list": {
|
|
5795
|
+
parameters: {
|
|
5796
|
+
query?: {
|
|
5797
|
+
/** @description Only return prompts of this type */
|
|
5798
|
+
type?: string;
|
|
5799
|
+
/** @description Language for the default prompts, falls back to the user's preference or 'en' */
|
|
5800
|
+
language?: string;
|
|
5801
|
+
};
|
|
5802
|
+
header?: never;
|
|
5803
|
+
path?: never;
|
|
5804
|
+
cookie?: never;
|
|
5805
|
+
};
|
|
5806
|
+
requestBody?: never;
|
|
5807
|
+
responses: never;
|
|
5808
|
+
};
|
|
5809
|
+
"prompts.create": {
|
|
5810
|
+
parameters: {
|
|
5811
|
+
query?: never;
|
|
5812
|
+
header?: never;
|
|
5813
|
+
path?: never;
|
|
5814
|
+
cookie?: never;
|
|
5815
|
+
};
|
|
5816
|
+
requestBody?: {
|
|
5817
|
+
content: {
|
|
5818
|
+
"application/json": {
|
|
5819
|
+
name: string;
|
|
5820
|
+
promptType: string;
|
|
5821
|
+
content: string;
|
|
5822
|
+
};
|
|
5823
|
+
};
|
|
5824
|
+
};
|
|
5825
|
+
responses: never;
|
|
5826
|
+
};
|
|
5827
|
+
"prompts.delete": {
|
|
5828
|
+
parameters: {
|
|
5829
|
+
query?: never;
|
|
5830
|
+
header?: never;
|
|
5831
|
+
path: {
|
|
5832
|
+
id: string;
|
|
5833
|
+
};
|
|
5834
|
+
cookie?: never;
|
|
5835
|
+
};
|
|
5836
|
+
requestBody?: never;
|
|
5837
|
+
responses: never;
|
|
5838
|
+
};
|
|
5839
|
+
"prompts.update": {
|
|
5840
|
+
parameters: {
|
|
5841
|
+
query?: never;
|
|
5842
|
+
header?: never;
|
|
5843
|
+
path: {
|
|
5844
|
+
id: string;
|
|
5845
|
+
};
|
|
5846
|
+
cookie?: never;
|
|
5847
|
+
};
|
|
5848
|
+
requestBody?: {
|
|
5849
|
+
content: {
|
|
5850
|
+
"application/json": {
|
|
5851
|
+
name?: string;
|
|
5852
|
+
promptType?: string;
|
|
5853
|
+
content?: string;
|
|
5854
|
+
};
|
|
5855
|
+
};
|
|
5856
|
+
};
|
|
5857
|
+
responses: never;
|
|
5858
|
+
};
|
|
5645
5859
|
"jobs.get": {
|
|
5646
5860
|
parameters: {
|
|
5647
5861
|
query?: never;
|
|
@@ -5958,6 +6172,12 @@ interface _PathOverrides {
|
|
|
5958
6172
|
"deleteRubrics:id": {
|
|
5959
6173
|
id: string;
|
|
5960
6174
|
};
|
|
6175
|
+
"prompts.update": {
|
|
6176
|
+
id: string;
|
|
6177
|
+
};
|
|
6178
|
+
"prompts.delete": {
|
|
6179
|
+
id: string;
|
|
6180
|
+
};
|
|
5961
6181
|
"jobs.get": {
|
|
5962
6182
|
id: string;
|
|
5963
6183
|
};
|
|
@@ -6595,6 +6815,12 @@ declare class Org {
|
|
|
6595
6815
|
* API endpoint: `DELETE /org`
|
|
6596
6816
|
*/
|
|
6597
6817
|
delete(args?: Args<"org.delete">, options?: ExamplaryRequestOptions): Promise<Response<"org.delete">>;
|
|
6818
|
+
/**
|
|
6819
|
+
* Get organization limits
|
|
6820
|
+
*
|
|
6821
|
+
* API endpoint: `GET /org/limits`
|
|
6822
|
+
*/
|
|
6823
|
+
limits(args?: Args<"org.limits">, options?: ExamplaryRequestOptions): Promise<Response<"org.limits">>;
|
|
6598
6824
|
}
|
|
6599
6825
|
declare class Orgs {
|
|
6600
6826
|
private readonly ctx;
|
|
@@ -6614,6 +6840,26 @@ declare class Orgs {
|
|
|
6614
6840
|
*/
|
|
6615
6841
|
create(args?: Args<"orgs.create">, options?: ExamplaryRequestOptions): Promise<Response<"orgs.create">>;
|
|
6616
6842
|
}
|
|
6843
|
+
declare class AuditLogs {
|
|
6844
|
+
private readonly ctx;
|
|
6845
|
+
constructor(ctx: ClientContext);
|
|
6846
|
+
/**
|
|
6847
|
+
* List audit logs
|
|
6848
|
+
*
|
|
6849
|
+
* List the workspace's audit logs, newest first, with optional date range, actor and object filters. Paginated.
|
|
6850
|
+
*
|
|
6851
|
+
* API endpoint: `GET /audit-logs`
|
|
6852
|
+
*/
|
|
6853
|
+
list(args?: Args<"audit-logs.list">, options?: ExamplaryRequestOptions): Promise<Response<"audit-logs.list">>;
|
|
6854
|
+
/**
|
|
6855
|
+
* Export audit logs
|
|
6856
|
+
*
|
|
6857
|
+
* Export audit logs for a date range (optionally filtered by actor/object) as ND-JSON. Returns a temporary download URL.
|
|
6858
|
+
*
|
|
6859
|
+
* API endpoint: `GET /audit-logs/export`
|
|
6860
|
+
*/
|
|
6861
|
+
export(args: Args<"audit-logs.export">, options?: ExamplaryRequestOptions): Promise<Response<"audit-logs.export">>;
|
|
6862
|
+
}
|
|
6617
6863
|
declare class ApiKeys {
|
|
6618
6864
|
private readonly ctx;
|
|
6619
6865
|
constructor(ctx: ClientContext);
|
|
@@ -7167,6 +7413,43 @@ declare class QuestionBank {
|
|
|
7167
7413
|
delete(id: string, options?: ExamplaryRequestOptions): Promise<Response<"questionBank.delete">>;
|
|
7168
7414
|
delete(args: Args<"questionBank.delete">, options?: ExamplaryRequestOptions): Promise<Response<"questionBank.delete">>;
|
|
7169
7415
|
}
|
|
7416
|
+
declare class Prompts {
|
|
7417
|
+
private readonly ctx;
|
|
7418
|
+
constructor(ctx: ClientContext);
|
|
7419
|
+
/**
|
|
7420
|
+
* Get prompts
|
|
7421
|
+
*
|
|
7422
|
+
* Get a list of reusable prompts, merging the workspace's saved prompts with the defaults provided by Examplary. Optionally filter by type and language.
|
|
7423
|
+
*
|
|
7424
|
+
* API endpoint: `GET /prompts`
|
|
7425
|
+
*/
|
|
7426
|
+
list(args?: Args<"prompts.list">, options?: ExamplaryRequestOptions): Promise<Response<"prompts.list">>;
|
|
7427
|
+
/**
|
|
7428
|
+
* Save prompt
|
|
7429
|
+
*
|
|
7430
|
+
* Save a reusable prompt in the current workspace.
|
|
7431
|
+
*
|
|
7432
|
+
* API endpoint: `POST /prompts`
|
|
7433
|
+
*/
|
|
7434
|
+
create(args?: Args<"prompts.create">, options?: ExamplaryRequestOptions): Promise<Response<"prompts.create">>;
|
|
7435
|
+
/**
|
|
7436
|
+
* Update prompt
|
|
7437
|
+
*
|
|
7438
|
+
* Update an existing prompt in the current workspace.
|
|
7439
|
+
*
|
|
7440
|
+
* API endpoint: `PATCH /prompts/{id}`
|
|
7441
|
+
*/
|
|
7442
|
+
update(args: Args<"prompts.update">, options?: ExamplaryRequestOptions): Promise<Response<"prompts.update">>;
|
|
7443
|
+
/**
|
|
7444
|
+
* Delete prompt
|
|
7445
|
+
*
|
|
7446
|
+
* Delete a prompt from the current workspace.
|
|
7447
|
+
*
|
|
7448
|
+
* API endpoint: `DELETE /prompts/{id}`
|
|
7449
|
+
*/
|
|
7450
|
+
delete(id: string, options?: ExamplaryRequestOptions): Promise<Response<"prompts.delete">>;
|
|
7451
|
+
delete(args: Args<"prompts.delete">, options?: ExamplaryRequestOptions): Promise<Response<"prompts.delete">>;
|
|
7452
|
+
}
|
|
7170
7453
|
declare class Jobs {
|
|
7171
7454
|
private readonly ctx;
|
|
7172
7455
|
constructor(ctx: ClientContext);
|
|
@@ -7200,6 +7483,7 @@ declare class Examplary {
|
|
|
7200
7483
|
readonly media: Media;
|
|
7201
7484
|
readonly org: Org;
|
|
7202
7485
|
readonly orgs: Orgs;
|
|
7486
|
+
readonly auditLogs: AuditLogs;
|
|
7203
7487
|
readonly apiKeys: ApiKeys;
|
|
7204
7488
|
readonly attributes: Attributes;
|
|
7205
7489
|
readonly taxonomies: Taxonomies;
|
|
@@ -7211,6 +7495,7 @@ declare class Examplary {
|
|
|
7211
7495
|
readonly folders: Folders;
|
|
7212
7496
|
readonly groups: Groups;
|
|
7213
7497
|
readonly questionBank: QuestionBank;
|
|
7498
|
+
readonly prompts: Prompts;
|
|
7214
7499
|
readonly jobs: Jobs;
|
|
7215
7500
|
constructor(options: ExamplaryClientOptions);
|
|
7216
7501
|
/**
|
package/dist/index.js
CHANGED
|
@@ -507,6 +507,10 @@ var Org = class {
|
|
|
507
507
|
const args = arg;
|
|
508
508
|
return request(this.ctx, "DELETE", "/org", [], [], false, args, options);
|
|
509
509
|
}
|
|
510
|
+
limits(arg, options) {
|
|
511
|
+
const args = arg;
|
|
512
|
+
return request(this.ctx, "GET", "/org/limits", [], [], false, args, options);
|
|
513
|
+
}
|
|
510
514
|
};
|
|
511
515
|
var Orgs = class {
|
|
512
516
|
constructor(ctx) {
|
|
@@ -521,6 +525,19 @@ var Orgs = class {
|
|
|
521
525
|
return request(this.ctx, "POST", "/orgs", [], [], true, args, options);
|
|
522
526
|
}
|
|
523
527
|
};
|
|
528
|
+
var AuditLogs = class {
|
|
529
|
+
constructor(ctx) {
|
|
530
|
+
this.ctx = ctx;
|
|
531
|
+
}
|
|
532
|
+
list(arg, options) {
|
|
533
|
+
const args = arg;
|
|
534
|
+
return request(this.ctx, "GET", "/audit-logs", [], ["actor", "object", "from", "to", "exclusiveStartKey"], false, args, options);
|
|
535
|
+
}
|
|
536
|
+
export(arg, options) {
|
|
537
|
+
const args = arg;
|
|
538
|
+
return request(this.ctx, "GET", "/audit-logs/export", [], ["from", "to", "actor", "object"], false, args, options);
|
|
539
|
+
}
|
|
540
|
+
};
|
|
524
541
|
var ApiKeys = class {
|
|
525
542
|
constructor(ctx) {
|
|
526
543
|
this.ctx = ctx;
|
|
@@ -828,6 +845,27 @@ var QuestionBank = class {
|
|
|
828
845
|
return request(this.ctx, "DELETE", "/question-bank/{id}", ["id"], [], false, args, options);
|
|
829
846
|
}
|
|
830
847
|
};
|
|
848
|
+
var Prompts = class {
|
|
849
|
+
constructor(ctx) {
|
|
850
|
+
this.ctx = ctx;
|
|
851
|
+
}
|
|
852
|
+
list(arg, options) {
|
|
853
|
+
const args = arg;
|
|
854
|
+
return request(this.ctx, "GET", "/prompts", [], ["type", "language"], false, args, options);
|
|
855
|
+
}
|
|
856
|
+
create(arg, options) {
|
|
857
|
+
const args = arg;
|
|
858
|
+
return request(this.ctx, "POST", "/prompts", [], [], true, args, options);
|
|
859
|
+
}
|
|
860
|
+
update(arg, options) {
|
|
861
|
+
const args = arg;
|
|
862
|
+
return request(this.ctx, "PATCH", "/prompts/{id}", ["id"], [], true, args, options);
|
|
863
|
+
}
|
|
864
|
+
delete(arg, options) {
|
|
865
|
+
const args = typeof arg === "string" ? { id: arg } : arg;
|
|
866
|
+
return request(this.ctx, "DELETE", "/prompts/{id}", ["id"], [], false, args, options);
|
|
867
|
+
}
|
|
868
|
+
};
|
|
831
869
|
var Jobs = class {
|
|
832
870
|
constructor(ctx) {
|
|
833
871
|
this.ctx = ctx;
|
|
@@ -853,6 +891,7 @@ var Examplary = class {
|
|
|
853
891
|
this.media = new Media(this.ctx);
|
|
854
892
|
this.org = new Org(this.ctx);
|
|
855
893
|
this.orgs = new Orgs(this.ctx);
|
|
894
|
+
this.auditLogs = new AuditLogs(this.ctx);
|
|
856
895
|
this.apiKeys = new ApiKeys(this.ctx);
|
|
857
896
|
this.attributes = new Attributes(this.ctx);
|
|
858
897
|
this.taxonomies = new Taxonomies(this.ctx);
|
|
@@ -864,6 +903,7 @@ var Examplary = class {
|
|
|
864
903
|
this.folders = new Folders(this.ctx);
|
|
865
904
|
this.groups = new Groups(this.ctx);
|
|
866
905
|
this.questionBank = new QuestionBank(this.ctx);
|
|
906
|
+
this.prompts = new Prompts(this.ctx);
|
|
867
907
|
this.jobs = new Jobs(this.ctx);
|
|
868
908
|
}
|
|
869
909
|
getRubrics(arg, options) {
|