@adobe/spacecat-shared-project-engine-client 1.15.0 → 1.17.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/package.json +2 -2
- package/src/generated/types.ts +517 -1
- package/src/index.d.ts +41 -1
- package/src/rest-transport.js +29 -1
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@adobe/spacecat-shared-project-engine-client",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.17.0",
|
|
4
4
|
"description": "Shared modules of the Spacecat Services - Semrush Project Engine client and generated types",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "src/index.js",
|
|
@@ -63,7 +63,7 @@
|
|
|
63
63
|
"c8": "11.0.0",
|
|
64
64
|
"chai": "6.2.2",
|
|
65
65
|
"counterfact": "2.14.0",
|
|
66
|
-
"js-yaml": "4.
|
|
66
|
+
"js-yaml": "4.3.0",
|
|
67
67
|
"mocha": "11.7.6",
|
|
68
68
|
"mocha-multi-reporters": "1.5.1",
|
|
69
69
|
"openapi-typescript": "7.13.0",
|
package/src/generated/types.ts
CHANGED
|
@@ -1623,6 +1623,106 @@ export interface paths {
|
|
|
1623
1623
|
patch?: never;
|
|
1624
1624
|
trace?: never;
|
|
1625
1625
|
};
|
|
1626
|
+
"/v3/workspaces/{id}/projects/{project_id}/aio/prompts": {
|
|
1627
|
+
parameters: {
|
|
1628
|
+
query?: never;
|
|
1629
|
+
header?: never;
|
|
1630
|
+
path?: never;
|
|
1631
|
+
cookie?: never;
|
|
1632
|
+
};
|
|
1633
|
+
get?: never;
|
|
1634
|
+
put?: never;
|
|
1635
|
+
/**
|
|
1636
|
+
* Create prompts
|
|
1637
|
+
* @description Create prompts. Response returns per-item `{id, name, is_new, metadata}`. Dedupe hits preserve the previously stored metadata and report `is_new = false`.
|
|
1638
|
+
*/
|
|
1639
|
+
post: operations["aio-create-prompts"];
|
|
1640
|
+
delete?: never;
|
|
1641
|
+
options?: never;
|
|
1642
|
+
head?: never;
|
|
1643
|
+
patch?: never;
|
|
1644
|
+
trace?: never;
|
|
1645
|
+
};
|
|
1646
|
+
"/v3/workspaces/{id}/projects/{project_id}/aio/prompts/{prompt_id}": {
|
|
1647
|
+
parameters: {
|
|
1648
|
+
query?: never;
|
|
1649
|
+
header?: never;
|
|
1650
|
+
path?: never;
|
|
1651
|
+
cookie?: never;
|
|
1652
|
+
};
|
|
1653
|
+
get?: never;
|
|
1654
|
+
put?: never;
|
|
1655
|
+
post?: never;
|
|
1656
|
+
delete?: never;
|
|
1657
|
+
options?: never;
|
|
1658
|
+
head?: never;
|
|
1659
|
+
/**
|
|
1660
|
+
* Update a single prompt
|
|
1661
|
+
* @description RFC 7396 JSON Merge Patch. Both `name` and `metadata` are optional; the request must include at least one. `name: null` is rejected (400). `metadata: null` wipes the entire metadata block (row.metadata → NULL). `metadata: {...}` applies an RFC 7396 merge to the four metadata keys (absent = keep, string = set, null = delete). When a merge removes the last surviving metadata key, the row's metadata collapses to `null`.
|
|
1662
|
+
*/
|
|
1663
|
+
patch: operations["aio-patch-prompt"];
|
|
1664
|
+
trace?: never;
|
|
1665
|
+
};
|
|
1666
|
+
"/v3/workspaces/{id}/projects/{project_id}/aio/prompts/{prompt_id}/metadata": {
|
|
1667
|
+
parameters: {
|
|
1668
|
+
query?: never;
|
|
1669
|
+
header?: never;
|
|
1670
|
+
path?: never;
|
|
1671
|
+
cookie?: never;
|
|
1672
|
+
};
|
|
1673
|
+
get?: never;
|
|
1674
|
+
put?: never;
|
|
1675
|
+
post?: never;
|
|
1676
|
+
delete?: never;
|
|
1677
|
+
options?: never;
|
|
1678
|
+
head?: never;
|
|
1679
|
+
/**
|
|
1680
|
+
* Update single prompt metadata (merge)
|
|
1681
|
+
* @description RFC 7396 JSON Merge Patch for a single prompt: string values set/overwrite the stored key, absent keys keep the stored value, explicit JSON `null` deletes the key. When a patch removes the last surviving key, the row's metadata collapses to `null`. Thin adapter over the batch service method.
|
|
1682
|
+
*/
|
|
1683
|
+
patch: operations["aio-patch-prompt-metadata"];
|
|
1684
|
+
trace?: never;
|
|
1685
|
+
};
|
|
1686
|
+
"/v3/workspaces/{id}/projects/{project_id}/aio/prompts/metadata": {
|
|
1687
|
+
parameters: {
|
|
1688
|
+
query?: never;
|
|
1689
|
+
header?: never;
|
|
1690
|
+
path?: never;
|
|
1691
|
+
cookie?: never;
|
|
1692
|
+
};
|
|
1693
|
+
get?: never;
|
|
1694
|
+
put?: never;
|
|
1695
|
+
post?: never;
|
|
1696
|
+
delete?: never;
|
|
1697
|
+
options?: never;
|
|
1698
|
+
head?: never;
|
|
1699
|
+
/**
|
|
1700
|
+
* Batch update prompt metadata (merge)
|
|
1701
|
+
* @description RFC 7396 JSON Merge Patch: for each item, string values set/overwrite the stored key, absent keys keep the stored value, and explicit JSON `null` deletes the key from stored metadata. When a patch removes the last surviving key, the row's metadata collapses to `null`. The whole batch runs in one transaction — a CHECK-constraint violation on any item rolls the batch back and returns 400.
|
|
1702
|
+
*/
|
|
1703
|
+
patch: operations["aio-patch-prompts-metadata-batch"];
|
|
1704
|
+
trace?: never;
|
|
1705
|
+
};
|
|
1706
|
+
"/v3/workspaces/{id}/projects/{project_id}/aio/prompts/tagged": {
|
|
1707
|
+
parameters: {
|
|
1708
|
+
query?: never;
|
|
1709
|
+
header?: never;
|
|
1710
|
+
path?: never;
|
|
1711
|
+
cookie?: never;
|
|
1712
|
+
};
|
|
1713
|
+
get?: never;
|
|
1714
|
+
put?: never;
|
|
1715
|
+
/**
|
|
1716
|
+
* Create tagged AIO prompts
|
|
1717
|
+
* @description Create prompts with per-item tags and metadata. Response returns per-item `{id, name, is_new, metadata}`.
|
|
1718
|
+
*/
|
|
1719
|
+
post: operations["aio-create-tagged-prompts"];
|
|
1720
|
+
delete?: never;
|
|
1721
|
+
options?: never;
|
|
1722
|
+
head?: never;
|
|
1723
|
+
patch?: never;
|
|
1724
|
+
trace?: never;
|
|
1725
|
+
};
|
|
1626
1726
|
"/v1/ai_models": {
|
|
1627
1727
|
parameters: {
|
|
1628
1728
|
query?: never;
|
|
@@ -1722,11 +1822,38 @@ export interface components {
|
|
|
1722
1822
|
"model.AIOProjectInitializedResponse": {
|
|
1723
1823
|
initialized?: boolean;
|
|
1724
1824
|
};
|
|
1825
|
+
"model.AIOPromptCreateItem": {
|
|
1826
|
+
metadata?: components["schemas"]["model.AIOPromptMetadata"];
|
|
1827
|
+
name: string;
|
|
1828
|
+
};
|
|
1829
|
+
"model.AIOPromptCreateResult": {
|
|
1830
|
+
id: string;
|
|
1831
|
+
is_new: boolean;
|
|
1832
|
+
metadata?: components["schemas"]["model.AIOPromptMetadata"];
|
|
1833
|
+
name: string;
|
|
1834
|
+
};
|
|
1835
|
+
"model.AIOPromptCreateWithMetadataResponse": {
|
|
1836
|
+
existing_count?: number;
|
|
1837
|
+
items?: components["schemas"]["model.AIOPromptCreateResult"][];
|
|
1838
|
+
};
|
|
1839
|
+
"model.AIOPromptMetadata": {
|
|
1840
|
+
created_at?: string;
|
|
1841
|
+
created_by?: string;
|
|
1842
|
+
updated_at?: string;
|
|
1843
|
+
updated_by?: string;
|
|
1844
|
+
};
|
|
1845
|
+
"model.AIOPromptMetadataPatch": {
|
|
1846
|
+
created_at?: string | null;
|
|
1847
|
+
created_by?: string | null;
|
|
1848
|
+
updated_at?: string | null;
|
|
1849
|
+
updated_by?: string | null;
|
|
1850
|
+
};
|
|
1725
1851
|
"model.AIOPromptWithStatus": {
|
|
1726
1852
|
id: string;
|
|
1727
1853
|
is_new?: boolean;
|
|
1854
|
+
metadata?: components["schemas"]["model.AIOPromptMetadata"];
|
|
1728
1855
|
name: string;
|
|
1729
|
-
tags
|
|
1856
|
+
tags?: components["schemas"]["model.AIOTag"][];
|
|
1730
1857
|
};
|
|
1731
1858
|
"model.AIOPromptsListRequest": {
|
|
1732
1859
|
limit?: number;
|
|
@@ -2035,9 +2162,16 @@ export interface components {
|
|
|
2035
2162
|
"model.CreateAIOProductsResponse": {
|
|
2036
2163
|
products?: components["schemas"]["model.AIOProductEntity"][];
|
|
2037
2164
|
};
|
|
2165
|
+
"model.CreateAIOPromptsRequest": {
|
|
2166
|
+
items: components["schemas"]["model.AIOPromptCreateItem"][];
|
|
2167
|
+
tag_ids?: string[];
|
|
2168
|
+
};
|
|
2038
2169
|
"model.CreateProjectAIModelRequest": {
|
|
2039
2170
|
model_id: string;
|
|
2040
2171
|
};
|
|
2172
|
+
"model.CreateTaggedAIOPromptsRequest": {
|
|
2173
|
+
prompts: components["schemas"]["model.TaggedAIOPromptCreateItem"][];
|
|
2174
|
+
};
|
|
2041
2175
|
"model.CustomExtractionRequest": {
|
|
2042
2176
|
additional_info?: string;
|
|
2043
2177
|
id?: string;
|
|
@@ -2170,6 +2304,17 @@ export interface components {
|
|
|
2170
2304
|
[key: string]: boolean;
|
|
2171
2305
|
};
|
|
2172
2306
|
};
|
|
2307
|
+
"model.PatchAIOPromptRequest": {
|
|
2308
|
+
metadata?: null | components["schemas"]["model.AIOPromptMetadataPatch"];
|
|
2309
|
+
name?: string;
|
|
2310
|
+
};
|
|
2311
|
+
"model.PatchAIOPromptsBatchItem": {
|
|
2312
|
+
metadata: components["schemas"]["model.AIOPromptMetadataPatch"];
|
|
2313
|
+
prompt_id: string;
|
|
2314
|
+
};
|
|
2315
|
+
"model.PatchAIOPromptsBatchRequest": {
|
|
2316
|
+
items: components["schemas"]["model.PatchAIOPromptsBatchItem"][];
|
|
2317
|
+
};
|
|
2173
2318
|
"model.ProjectAIModelListResponse": {
|
|
2174
2319
|
items?: components["schemas"]["model.ProjectAIModelResponse"][];
|
|
2175
2320
|
page?: number;
|
|
@@ -2378,6 +2523,11 @@ export interface components {
|
|
|
2378
2523
|
total?: number;
|
|
2379
2524
|
existing_count?: number;
|
|
2380
2525
|
};
|
|
2526
|
+
"model.TaggedAIOPromptCreateItem": {
|
|
2527
|
+
metadata?: components["schemas"]["model.AIOPromptMetadata"];
|
|
2528
|
+
name: string;
|
|
2529
|
+
tags?: string[];
|
|
2530
|
+
};
|
|
2381
2531
|
"model.TreeNodeListRequest": {
|
|
2382
2532
|
names: string[];
|
|
2383
2533
|
parent_id?: string;
|
|
@@ -7798,6 +7948,8 @@ export interface operations {
|
|
|
7798
7948
|
query?: {
|
|
7799
7949
|
/** @description Get draft project data */
|
|
7800
7950
|
draft?: boolean;
|
|
7951
|
+
/** @description Include prompt metadata into response */
|
|
7952
|
+
include_metadata?: boolean;
|
|
7801
7953
|
};
|
|
7802
7954
|
header?: never;
|
|
7803
7955
|
path: {
|
|
@@ -8567,6 +8719,370 @@ export interface operations {
|
|
|
8567
8719
|
};
|
|
8568
8720
|
};
|
|
8569
8721
|
};
|
|
8722
|
+
"aio-create-prompts": {
|
|
8723
|
+
parameters: {
|
|
8724
|
+
query?: never;
|
|
8725
|
+
header?: never;
|
|
8726
|
+
path: {
|
|
8727
|
+
/** @description Workspace UUID */
|
|
8728
|
+
id: string;
|
|
8729
|
+
/** @description Project UUID */
|
|
8730
|
+
project_id: string;
|
|
8731
|
+
};
|
|
8732
|
+
cookie?: never;
|
|
8733
|
+
};
|
|
8734
|
+
/** @description Prompt items with optional metadata + optional shared tag_ids */
|
|
8735
|
+
requestBody: {
|
|
8736
|
+
content: {
|
|
8737
|
+
"application/json": components["schemas"]["model.CreateAIOPromptsRequest"];
|
|
8738
|
+
};
|
|
8739
|
+
};
|
|
8740
|
+
responses: {
|
|
8741
|
+
/** @description Created */
|
|
8742
|
+
201: {
|
|
8743
|
+
headers: {
|
|
8744
|
+
[name: string]: unknown;
|
|
8745
|
+
};
|
|
8746
|
+
content: {
|
|
8747
|
+
"application/json": components["schemas"]["model.AIOPromptCreateWithMetadataResponse"];
|
|
8748
|
+
};
|
|
8749
|
+
};
|
|
8750
|
+
/** @description Bad Request */
|
|
8751
|
+
400: {
|
|
8752
|
+
headers: {
|
|
8753
|
+
[name: string]: unknown;
|
|
8754
|
+
};
|
|
8755
|
+
content: {
|
|
8756
|
+
"application/json": components["schemas"]["http_server.BasicResponse"];
|
|
8757
|
+
};
|
|
8758
|
+
};
|
|
8759
|
+
/** @description Unauthorized */
|
|
8760
|
+
401: {
|
|
8761
|
+
headers: {
|
|
8762
|
+
[name: string]: unknown;
|
|
8763
|
+
};
|
|
8764
|
+
content: {
|
|
8765
|
+
"application/json": components["schemas"]["http_server.BasicResponse"];
|
|
8766
|
+
};
|
|
8767
|
+
};
|
|
8768
|
+
/** @description Forbidden */
|
|
8769
|
+
403: {
|
|
8770
|
+
headers: {
|
|
8771
|
+
[name: string]: unknown;
|
|
8772
|
+
};
|
|
8773
|
+
content: {
|
|
8774
|
+
"application/json": components["schemas"]["http_server.BasicResponse"];
|
|
8775
|
+
};
|
|
8776
|
+
};
|
|
8777
|
+
/** @description Internal Server Error */
|
|
8778
|
+
500: {
|
|
8779
|
+
headers: {
|
|
8780
|
+
[name: string]: unknown;
|
|
8781
|
+
};
|
|
8782
|
+
content: {
|
|
8783
|
+
"application/json": components["schemas"]["http_server.BasicResponse"];
|
|
8784
|
+
};
|
|
8785
|
+
};
|
|
8786
|
+
};
|
|
8787
|
+
};
|
|
8788
|
+
"aio-patch-prompt": {
|
|
8789
|
+
parameters: {
|
|
8790
|
+
query?: never;
|
|
8791
|
+
header?: never;
|
|
8792
|
+
path: {
|
|
8793
|
+
/** @description Workspace UUID */
|
|
8794
|
+
id: string;
|
|
8795
|
+
/** @description Project UUID */
|
|
8796
|
+
project_id: string;
|
|
8797
|
+
/** @description Prompt UUID */
|
|
8798
|
+
prompt_id: string;
|
|
8799
|
+
};
|
|
8800
|
+
cookie?: never;
|
|
8801
|
+
};
|
|
8802
|
+
/** @description Optional name and/or metadata merge patch */
|
|
8803
|
+
requestBody: {
|
|
8804
|
+
content: {
|
|
8805
|
+
"application/json": components["schemas"]["model.PatchAIOPromptRequest"];
|
|
8806
|
+
};
|
|
8807
|
+
};
|
|
8808
|
+
responses: {
|
|
8809
|
+
/** @description No Content */
|
|
8810
|
+
204: {
|
|
8811
|
+
headers: {
|
|
8812
|
+
[name: string]: unknown;
|
|
8813
|
+
};
|
|
8814
|
+
content?: never;
|
|
8815
|
+
};
|
|
8816
|
+
/** @description Bad Request */
|
|
8817
|
+
400: {
|
|
8818
|
+
headers: {
|
|
8819
|
+
[name: string]: unknown;
|
|
8820
|
+
};
|
|
8821
|
+
content: {
|
|
8822
|
+
"application/json": components["schemas"]["http_server.BasicResponse"];
|
|
8823
|
+
};
|
|
8824
|
+
};
|
|
8825
|
+
/** @description Unauthorized */
|
|
8826
|
+
401: {
|
|
8827
|
+
headers: {
|
|
8828
|
+
[name: string]: unknown;
|
|
8829
|
+
};
|
|
8830
|
+
content: {
|
|
8831
|
+
"application/json": components["schemas"]["http_server.BasicResponse"];
|
|
8832
|
+
};
|
|
8833
|
+
};
|
|
8834
|
+
/** @description Forbidden */
|
|
8835
|
+
403: {
|
|
8836
|
+
headers: {
|
|
8837
|
+
[name: string]: unknown;
|
|
8838
|
+
};
|
|
8839
|
+
content: {
|
|
8840
|
+
"application/json": components["schemas"]["http_server.BasicResponse"];
|
|
8841
|
+
};
|
|
8842
|
+
};
|
|
8843
|
+
/** @description Not Found */
|
|
8844
|
+
404: {
|
|
8845
|
+
headers: {
|
|
8846
|
+
[name: string]: unknown;
|
|
8847
|
+
};
|
|
8848
|
+
content: {
|
|
8849
|
+
"application/json": components["schemas"]["http_server.BasicResponse"];
|
|
8850
|
+
};
|
|
8851
|
+
};
|
|
8852
|
+
/** @description Conflict */
|
|
8853
|
+
409: {
|
|
8854
|
+
headers: {
|
|
8855
|
+
[name: string]: unknown;
|
|
8856
|
+
};
|
|
8857
|
+
content: {
|
|
8858
|
+
"application/json": components["schemas"]["http_server.BasicResponse"];
|
|
8859
|
+
};
|
|
8860
|
+
};
|
|
8861
|
+
/** @description Internal Server Error */
|
|
8862
|
+
500: {
|
|
8863
|
+
headers: {
|
|
8864
|
+
[name: string]: unknown;
|
|
8865
|
+
};
|
|
8866
|
+
content: {
|
|
8867
|
+
"application/json": components["schemas"]["http_server.BasicResponse"];
|
|
8868
|
+
};
|
|
8869
|
+
};
|
|
8870
|
+
};
|
|
8871
|
+
};
|
|
8872
|
+
"aio-patch-prompt-metadata": {
|
|
8873
|
+
parameters: {
|
|
8874
|
+
query?: never;
|
|
8875
|
+
header?: never;
|
|
8876
|
+
path: {
|
|
8877
|
+
/** @description Workspace UUID */
|
|
8878
|
+
id: string;
|
|
8879
|
+
/** @description Project UUID */
|
|
8880
|
+
project_id: string;
|
|
8881
|
+
/** @description Prompt UUID */
|
|
8882
|
+
prompt_id: string;
|
|
8883
|
+
};
|
|
8884
|
+
cookie?: never;
|
|
8885
|
+
};
|
|
8886
|
+
/** @description Metadata merge patch */
|
|
8887
|
+
requestBody: {
|
|
8888
|
+
content: {
|
|
8889
|
+
"application/json": components["schemas"]["model.AIOPromptMetadataPatch"];
|
|
8890
|
+
};
|
|
8891
|
+
};
|
|
8892
|
+
responses: {
|
|
8893
|
+
/** @description No Content */
|
|
8894
|
+
204: {
|
|
8895
|
+
headers: {
|
|
8896
|
+
[name: string]: unknown;
|
|
8897
|
+
};
|
|
8898
|
+
content?: never;
|
|
8899
|
+
};
|
|
8900
|
+
/** @description Bad Request */
|
|
8901
|
+
400: {
|
|
8902
|
+
headers: {
|
|
8903
|
+
[name: string]: unknown;
|
|
8904
|
+
};
|
|
8905
|
+
content: {
|
|
8906
|
+
"application/json": components["schemas"]["http_server.BasicResponse"];
|
|
8907
|
+
};
|
|
8908
|
+
};
|
|
8909
|
+
/** @description Unauthorized */
|
|
8910
|
+
401: {
|
|
8911
|
+
headers: {
|
|
8912
|
+
[name: string]: unknown;
|
|
8913
|
+
};
|
|
8914
|
+
content: {
|
|
8915
|
+
"application/json": components["schemas"]["http_server.BasicResponse"];
|
|
8916
|
+
};
|
|
8917
|
+
};
|
|
8918
|
+
/** @description Forbidden */
|
|
8919
|
+
403: {
|
|
8920
|
+
headers: {
|
|
8921
|
+
[name: string]: unknown;
|
|
8922
|
+
};
|
|
8923
|
+
content: {
|
|
8924
|
+
"application/json": components["schemas"]["http_server.BasicResponse"];
|
|
8925
|
+
};
|
|
8926
|
+
};
|
|
8927
|
+
/** @description Not Found */
|
|
8928
|
+
404: {
|
|
8929
|
+
headers: {
|
|
8930
|
+
[name: string]: unknown;
|
|
8931
|
+
};
|
|
8932
|
+
content: {
|
|
8933
|
+
"application/json": components["schemas"]["http_server.BasicResponse"];
|
|
8934
|
+
};
|
|
8935
|
+
};
|
|
8936
|
+
/** @description Internal Server Error */
|
|
8937
|
+
500: {
|
|
8938
|
+
headers: {
|
|
8939
|
+
[name: string]: unknown;
|
|
8940
|
+
};
|
|
8941
|
+
content: {
|
|
8942
|
+
"application/json": components["schemas"]["http_server.BasicResponse"];
|
|
8943
|
+
};
|
|
8944
|
+
};
|
|
8945
|
+
};
|
|
8946
|
+
};
|
|
8947
|
+
"aio-patch-prompts-metadata-batch": {
|
|
8948
|
+
parameters: {
|
|
8949
|
+
query?: never;
|
|
8950
|
+
header?: never;
|
|
8951
|
+
path: {
|
|
8952
|
+
/** @description Workspace UUID */
|
|
8953
|
+
id: string;
|
|
8954
|
+
/** @description Project UUID */
|
|
8955
|
+
project_id: string;
|
|
8956
|
+
};
|
|
8957
|
+
cookie?: never;
|
|
8958
|
+
};
|
|
8959
|
+
/** @description Batch of {prompt_id, metadata} patches */
|
|
8960
|
+
requestBody: {
|
|
8961
|
+
content: {
|
|
8962
|
+
"application/json": components["schemas"]["model.PatchAIOPromptsBatchRequest"];
|
|
8963
|
+
};
|
|
8964
|
+
};
|
|
8965
|
+
responses: {
|
|
8966
|
+
/** @description No Content */
|
|
8967
|
+
204: {
|
|
8968
|
+
headers: {
|
|
8969
|
+
[name: string]: unknown;
|
|
8970
|
+
};
|
|
8971
|
+
content?: never;
|
|
8972
|
+
};
|
|
8973
|
+
/** @description Bad Request */
|
|
8974
|
+
400: {
|
|
8975
|
+
headers: {
|
|
8976
|
+
[name: string]: unknown;
|
|
8977
|
+
};
|
|
8978
|
+
content: {
|
|
8979
|
+
"application/json": components["schemas"]["http_server.BasicResponse"];
|
|
8980
|
+
};
|
|
8981
|
+
};
|
|
8982
|
+
/** @description Unauthorized */
|
|
8983
|
+
401: {
|
|
8984
|
+
headers: {
|
|
8985
|
+
[name: string]: unknown;
|
|
8986
|
+
};
|
|
8987
|
+
content: {
|
|
8988
|
+
"application/json": components["schemas"]["http_server.BasicResponse"];
|
|
8989
|
+
};
|
|
8990
|
+
};
|
|
8991
|
+
/** @description Forbidden */
|
|
8992
|
+
403: {
|
|
8993
|
+
headers: {
|
|
8994
|
+
[name: string]: unknown;
|
|
8995
|
+
};
|
|
8996
|
+
content: {
|
|
8997
|
+
"application/json": components["schemas"]["http_server.BasicResponse"];
|
|
8998
|
+
};
|
|
8999
|
+
};
|
|
9000
|
+
/** @description Not Found */
|
|
9001
|
+
404: {
|
|
9002
|
+
headers: {
|
|
9003
|
+
[name: string]: unknown;
|
|
9004
|
+
};
|
|
9005
|
+
content: {
|
|
9006
|
+
"application/json": components["schemas"]["http_server.BasicResponse"];
|
|
9007
|
+
};
|
|
9008
|
+
};
|
|
9009
|
+
/** @description Internal Server Error */
|
|
9010
|
+
500: {
|
|
9011
|
+
headers: {
|
|
9012
|
+
[name: string]: unknown;
|
|
9013
|
+
};
|
|
9014
|
+
content: {
|
|
9015
|
+
"application/json": components["schemas"]["http_server.BasicResponse"];
|
|
9016
|
+
};
|
|
9017
|
+
};
|
|
9018
|
+
};
|
|
9019
|
+
};
|
|
9020
|
+
"aio-create-tagged-prompts": {
|
|
9021
|
+
parameters: {
|
|
9022
|
+
query?: never;
|
|
9023
|
+
header?: never;
|
|
9024
|
+
path: {
|
|
9025
|
+
/** @description Workspace UUID */
|
|
9026
|
+
id: string;
|
|
9027
|
+
/** @description Project UUID */
|
|
9028
|
+
project_id: string;
|
|
9029
|
+
};
|
|
9030
|
+
cookie?: never;
|
|
9031
|
+
};
|
|
9032
|
+
/** @description Prompts with per-item tags and metadata */
|
|
9033
|
+
requestBody: {
|
|
9034
|
+
content: {
|
|
9035
|
+
"application/json": components["schemas"]["model.CreateTaggedAIOPromptsRequest"];
|
|
9036
|
+
};
|
|
9037
|
+
};
|
|
9038
|
+
responses: {
|
|
9039
|
+
/** @description Created */
|
|
9040
|
+
201: {
|
|
9041
|
+
headers: {
|
|
9042
|
+
[name: string]: unknown;
|
|
9043
|
+
};
|
|
9044
|
+
content: {
|
|
9045
|
+
"application/json": components["schemas"]["model.AIOPromptCreateWithMetadataResponse"];
|
|
9046
|
+
};
|
|
9047
|
+
};
|
|
9048
|
+
/** @description Bad Request */
|
|
9049
|
+
400: {
|
|
9050
|
+
headers: {
|
|
9051
|
+
[name: string]: unknown;
|
|
9052
|
+
};
|
|
9053
|
+
content: {
|
|
9054
|
+
"application/json": components["schemas"]["http_server.BasicResponse"];
|
|
9055
|
+
};
|
|
9056
|
+
};
|
|
9057
|
+
/** @description Unauthorized */
|
|
9058
|
+
401: {
|
|
9059
|
+
headers: {
|
|
9060
|
+
[name: string]: unknown;
|
|
9061
|
+
};
|
|
9062
|
+
content: {
|
|
9063
|
+
"application/json": components["schemas"]["http_server.BasicResponse"];
|
|
9064
|
+
};
|
|
9065
|
+
};
|
|
9066
|
+
/** @description Forbidden */
|
|
9067
|
+
403: {
|
|
9068
|
+
headers: {
|
|
9069
|
+
[name: string]: unknown;
|
|
9070
|
+
};
|
|
9071
|
+
content: {
|
|
9072
|
+
"application/json": components["schemas"]["http_server.BasicResponse"];
|
|
9073
|
+
};
|
|
9074
|
+
};
|
|
9075
|
+
/** @description Internal Server Error */
|
|
9076
|
+
500: {
|
|
9077
|
+
headers: {
|
|
9078
|
+
[name: string]: unknown;
|
|
9079
|
+
};
|
|
9080
|
+
content: {
|
|
9081
|
+
"application/json": components["schemas"]["http_server.BasicResponse"];
|
|
9082
|
+
};
|
|
9083
|
+
};
|
|
9084
|
+
};
|
|
9085
|
+
};
|
|
8570
9086
|
"ai-list-global-models": {
|
|
8571
9087
|
parameters: {
|
|
8572
9088
|
query?: {
|
package/src/index.d.ts
CHANGED
|
@@ -111,7 +111,7 @@ type TransportData<P extends keyof paths, M extends keyof paths[P]> =
|
|
|
111
111
|
| null;
|
|
112
112
|
|
|
113
113
|
/**
|
|
114
|
-
* Intent-named facade over {@link SerenityProjectEngineApiClient}. Wraps the
|
|
114
|
+
* Intent-named facade over {@link SerenityProjectEngineApiClient}. Wraps the 32 in-spec
|
|
115
115
|
* Project Engine operations spacecat-api-service consumes behind verb+resource methods, so
|
|
116
116
|
* consumers depend on this seam rather than the raw client's literal path strings. Each method
|
|
117
117
|
* is THIN: it forwards the caller's openapi-fetch `init` to the underlying client and resolves
|
|
@@ -324,6 +324,46 @@ export interface SerenityProjectEngineTransport {
|
|
|
324
324
|
): Promise<
|
|
325
325
|
TransportData<'/v2/workspaces/{id}/projects/{project_id}/aio/prompts/{prompt_id}/rename', 'post'>
|
|
326
326
|
>;
|
|
327
|
+
/**
|
|
328
|
+
* POST /v3/workspaces/{id}/projects/{project_id}/aio/prompts — aio-create-prompts
|
|
329
|
+
* (metadata-carrying create, LLMO-6289)
|
|
330
|
+
*/
|
|
331
|
+
createPromptsWithMetadata(
|
|
332
|
+
...init: TransportInitParam<
|
|
333
|
+
TransportInit<'/v3/workspaces/{id}/projects/{project_id}/aio/prompts', 'post'>
|
|
334
|
+
>
|
|
335
|
+
): Promise<TransportData<'/v3/workspaces/{id}/projects/{project_id}/aio/prompts', 'post'>>;
|
|
336
|
+
/**
|
|
337
|
+
* PATCH /v3/workspaces/{id}/projects/{project_id}/aio/prompts/{prompt_id}
|
|
338
|
+
* — aio-patch-prompt (combined name + metadata merge-patch, LLMO-6289)
|
|
339
|
+
*/
|
|
340
|
+
patchPrompt(
|
|
341
|
+
...init: TransportInitParam<
|
|
342
|
+
TransportInit<'/v3/workspaces/{id}/projects/{project_id}/aio/prompts/{prompt_id}', 'patch'>
|
|
343
|
+
>
|
|
344
|
+
): Promise<
|
|
345
|
+
TransportData<'/v3/workspaces/{id}/projects/{project_id}/aio/prompts/{prompt_id}', 'patch'>
|
|
346
|
+
>;
|
|
347
|
+
/**
|
|
348
|
+
* PATCH /v3/workspaces/{id}/projects/{project_id}/aio/prompts/{prompt_id}/metadata
|
|
349
|
+
* — aio-patch-prompt-metadata (metadata-only merge-patch, LLMO-6289)
|
|
350
|
+
*/
|
|
351
|
+
patchPromptMetadata(
|
|
352
|
+
...init: TransportInitParam<
|
|
353
|
+
TransportInit<'/v3/workspaces/{id}/projects/{project_id}/aio/prompts/{prompt_id}/metadata', 'patch'>
|
|
354
|
+
>
|
|
355
|
+
): Promise<
|
|
356
|
+
TransportData<'/v3/workspaces/{id}/projects/{project_id}/aio/prompts/{prompt_id}/metadata', 'patch'>
|
|
357
|
+
>;
|
|
358
|
+
/**
|
|
359
|
+
* PATCH /v3/workspaces/{id}/projects/{project_id}/aio/prompts/metadata
|
|
360
|
+
* — aio-patch-prompts-metadata-batch (atomic batch metadata merge-patch, LLMO-6289)
|
|
361
|
+
*/
|
|
362
|
+
patchPromptsMetadataBatch(
|
|
363
|
+
...init: TransportInitParam<
|
|
364
|
+
TransportInit<'/v3/workspaces/{id}/projects/{project_id}/aio/prompts/metadata', 'patch'>
|
|
365
|
+
>
|
|
366
|
+
): Promise<TransportData<'/v3/workspaces/{id}/projects/{project_id}/aio/prompts/metadata', 'patch'>>;
|
|
327
367
|
/** GET /v2/workspaces/{id}/projects/{project_id}/aio/tags — aio-get-project-tags */
|
|
328
368
|
listProjectTags(
|
|
329
369
|
...init: TransportInitParam<
|
package/src/rest-transport.js
CHANGED
|
@@ -22,7 +22,7 @@ import { ProjectEngineApiError } from './errors.js';
|
|
|
22
22
|
|
|
23
23
|
/**
|
|
24
24
|
* Intent-named facade over the raw {@link createSerenityProjectEngineApiClient} openapi-fetch
|
|
25
|
-
* client. It wraps ONLY the
|
|
25
|
+
* client. It wraps ONLY the 32 in-spec Project Engine operations that spacecat-api-service
|
|
26
26
|
* consumes, behind verb+resource method names, so consumers depend on this seam rather than the
|
|
27
27
|
* raw client and its literal path strings. Each method is THIN: it forwards the caller's
|
|
28
28
|
* openapi-fetch `init` (params.path/query, body) to `client.<METHOD>('<literal path>', init)` and
|
|
@@ -222,6 +222,34 @@ export function createSerenityProjectEngineTransport(options) {
|
|
|
222
222
|
renamePrompt(init) {
|
|
223
223
|
return unwrap('POST', client.POST('/v2/workspaces/{id}/projects/{project_id}/aio/prompts/{prompt_id}/rename', init));
|
|
224
224
|
},
|
|
225
|
+
/**
|
|
226
|
+
* POST /v3/workspaces/{id}/projects/{project_id}/aio/prompts — aio-create-prompts
|
|
227
|
+
* (metadata-carrying create; each item is `{ name, metadata }`, LLMO-6289)
|
|
228
|
+
*/
|
|
229
|
+
createPromptsWithMetadata(init) {
|
|
230
|
+
return unwrap('POST', client.POST('/v3/workspaces/{id}/projects/{project_id}/aio/prompts', init));
|
|
231
|
+
},
|
|
232
|
+
/**
|
|
233
|
+
* PATCH /v3/workspaces/{id}/projects/{project_id}/aio/prompts/{prompt_id}
|
|
234
|
+
* — aio-patch-prompt (combined name + metadata merge-patch, RFC 7396, LLMO-6289)
|
|
235
|
+
*/
|
|
236
|
+
patchPrompt(init) {
|
|
237
|
+
return unwrap('PATCH', client.PATCH('/v3/workspaces/{id}/projects/{project_id}/aio/prompts/{prompt_id}', init));
|
|
238
|
+
},
|
|
239
|
+
/**
|
|
240
|
+
* PATCH /v3/workspaces/{id}/projects/{project_id}/aio/prompts/{prompt_id}/metadata
|
|
241
|
+
* — aio-patch-prompt-metadata (metadata-only merge-patch, RFC 7396, LLMO-6289)
|
|
242
|
+
*/
|
|
243
|
+
patchPromptMetadata(init) {
|
|
244
|
+
return unwrap('PATCH', client.PATCH('/v3/workspaces/{id}/projects/{project_id}/aio/prompts/{prompt_id}/metadata', init));
|
|
245
|
+
},
|
|
246
|
+
/**
|
|
247
|
+
* PATCH /v3/workspaces/{id}/projects/{project_id}/aio/prompts/metadata
|
|
248
|
+
* — aio-patch-prompts-metadata-batch (atomic batch metadata merge-patch, LLMO-6289)
|
|
249
|
+
*/
|
|
250
|
+
patchPromptsMetadataBatch(init) {
|
|
251
|
+
return unwrap('PATCH', client.PATCH('/v3/workspaces/{id}/projects/{project_id}/aio/prompts/metadata', init));
|
|
252
|
+
},
|
|
225
253
|
/** GET /v2/workspaces/{id}/projects/{project_id}/aio/tags — aio-get-project-tags */
|
|
226
254
|
listProjectTags(init) {
|
|
227
255
|
return unwrap('GET', client.GET('/v2/workspaces/{id}/projects/{project_id}/aio/tags', init));
|