Skip to content

Commit 11e93ba

Browse files
committed
Merge remote-tracking branch 'origin/main' into fix-api-schema-definition
2 parents 6300e97 + 0682577 commit 11e93ba

39 files changed

+3458
-564
lines changed

.nycrc.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@
1313
],
1414
"exclude": [
1515
"src/agents/org-detector/agent.js",
16-
"src/agents/org-detector/instructions.js"
16+
"src/agents/org-detector/instructions.js",
17+
"src/controllers/demo.js"
1718
]
1819
}

CHANGELOG.md

Lines changed: 56 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,59 @@
1+
## [1.107.4](https://github.com/adobe/spacecat-api-service/compare/v1.107.3...v1.107.4) (2025-05-08)
2+
3+
4+
### Bug Fixes
5+
6+
* **deps:** update dependency @adobe/spacecat-shared-data-access to v2.17.2 ([#896](https://github.com/adobe/spacecat-api-service/issues/896)) ([37d3796](https://github.com/adobe/spacecat-api-service/commit/37d379699ef141c9aef5807e8d0a40837e0324ec))
7+
8+
## [1.107.3](https://github.com/adobe/spacecat-api-service/compare/v1.107.2...v1.107.3) (2025-05-08)
9+
10+
11+
### Bug Fixes
12+
13+
* demo preparations ([#897](https://github.com/adobe/spacecat-api-service/issues/897)) ([909766a](https://github.com/adobe/spacecat-api-service/commit/909766a5117d01b4e106c9268bcbd4ce1ab347a7))
14+
15+
## [1.107.2](https://github.com/adobe/spacecat-api-service/compare/v1.107.1...v1.107.2) (2025-05-08)
16+
17+
18+
### Bug Fixes
19+
20+
* demo preparations ([#895](https://github.com/adobe/spacecat-api-service/issues/895)) ([c35d6d5](https://github.com/adobe/spacecat-api-service/commit/c35d6d53cc83225e17cbc9d68efe71599d8f6c6c))
21+
22+
## [1.107.1](https://github.com/adobe/spacecat-api-service/compare/v1.107.0...v1.107.1) (2025-05-07)
23+
24+
25+
### Bug Fixes
26+
27+
* allow x-client-type header in Access-Control-Allow-Headers ([#888](https://github.com/adobe/spacecat-api-service/issues/888)) ([aa0a6a3](https://github.com/adobe/spacecat-api-service/commit/aa0a6a3112a210c6c47f9668b67a3212aeaf7873))
28+
29+
# [1.107.0](https://github.com/adobe/spacecat-api-service/compare/v1.106.4...v1.107.0) (2025-05-07)
30+
31+
32+
### Features
33+
34+
* introduce ims authorization ([#832](https://github.com/adobe/spacecat-api-service/issues/832)) ([a67d389](https://github.com/adobe/spacecat-api-service/commit/a67d3893801c0ef90ca7703f3ab68ccf9889b575))
35+
36+
## [1.106.4](https://github.com/adobe/spacecat-api-service/compare/v1.106.3...v1.106.4) (2025-05-06)
37+
38+
39+
### Bug Fixes
40+
41+
* **deps:** update adobe fixes ([#883](https://github.com/adobe/spacecat-api-service/issues/883)) ([376f5f2](https://github.com/adobe/spacecat-api-service/commit/376f5f2935241e79ae5794fe6829445a27158bb0))
42+
43+
## [1.106.3](https://github.com/adobe/spacecat-api-service/compare/v1.106.2...v1.106.3) (2025-05-05)
44+
45+
46+
### Bug Fixes
47+
48+
* site candidate content source override ([#886](https://github.com/adobe/spacecat-api-service/issues/886)) ([117db89](https://github.com/adobe/spacecat-api-service/commit/117db89f4a60c8b2c757a009d41c6b71cee93926))
49+
50+
## [1.106.2](https://github.com/adobe/spacecat-api-service/compare/v1.106.1...v1.106.2) (2025-05-03)
51+
52+
53+
### Bug Fixes
54+
55+
* **deps:** update external fixes ([#885](https://github.com/adobe/spacecat-api-service/issues/885)) ([e17d3bb](https://github.com/adobe/spacecat-api-service/commit/e17d3bb2ec097347eb0c3d3ca6608e89f577a2f6))
56+
157
## [1.106.1](https://github.com/adobe/spacecat-api-service/compare/v1.106.0...v1.106.1) (2025-04-28)
258

359

docs/index.html

Lines changed: 104 additions & 68 deletions
Large diffs are not rendered by default.

docs/openapi/api.yaml

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,8 @@ paths:
5555
$ref: './auth-api.yaml#/google-auth'
5656
/auth/google/{siteId}/status:
5757
$ref: './auth-api.yaml#/google-auth-status'
58+
/auth/login:
59+
$ref: './auth-api.yaml#/login'
5860
/configurations:
5961
$ref: './configurations-api.yaml#/configurations'
6062
/configurations/latest:
@@ -88,7 +90,9 @@ paths:
8890
/preflight/jobs/{jobId}:
8991
$ref: './preflight-api.yaml#/preflight-job-status'
9092
/scrape:
91-
$ref: './scrape-api.yaml#/scrape'
93+
$ref: './scrape-api.yaml#/create-scrape-job'
94+
/scrape/jobs/{jobId}:
95+
$ref: './scrape-api.yaml#/get-scrape-job-status'
9296
/sites:
9397
$ref: './sites-api.yaml#/sites'
9498
/sites/by-delivery-type/{deliveryType}:

docs/openapi/auth-api.yaml

Lines changed: 55 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51,3 +51,58 @@ google-auth-status:
5151
'500':
5252
$ref: './responses.yaml#/500'
5353
security: []
54+
login:
55+
post:
56+
summary: Authenticate with access token
57+
description: |
58+
Authenticates a user using an IMS access token and returns session information.
59+
operationId: login
60+
tags:
61+
- auth
62+
requestBody:
63+
required: true
64+
content:
65+
application/json:
66+
schema:
67+
type: object
68+
required:
69+
- accessToken
70+
properties:
71+
accessToken:
72+
type: string
73+
description: The access token to authenticate with
74+
responses:
75+
'200':
76+
description: Login successful
77+
content:
78+
application/json:
79+
schema:
80+
type: object
81+
properties:
82+
sessionToken:
83+
type: string
84+
description: A JWT token signed by the service containing the user profile and tenants.
85+
'401':
86+
description: Authentication failed
87+
content:
88+
application/json:
89+
schema:
90+
type: object
91+
properties:
92+
error:
93+
type: string
94+
description: Error message
95+
example: "Invalid access token"
96+
97+
'403':
98+
description: Forbidden
99+
content:
100+
application/json:
101+
schema:
102+
type: object
103+
properties:
104+
error:
105+
type: string
106+
description: Error message
107+
example: "Access denied"
108+
security: [] # No security required for login endpoint

docs/openapi/preflight-api.yaml

Lines changed: 2 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -31,21 +31,7 @@ preflight-jobs:
3131
content:
3232
application/json:
3333
schema:
34-
type: object
35-
properties:
36-
jobId:
37-
type: string
38-
format: uuid
39-
status:
40-
type: string
41-
enum: [ IN_PROGRESS, COMPLETED, FAILED ]
42-
createdAt:
43-
type: string
44-
format: date-time
45-
pollUrl:
46-
type: string
47-
format: uri
48-
description: URL to poll for job status
34+
$ref: './schemas.yaml#/CreateAsyncJobAcceptedResponse'
4935
'400':
5036
description: Invalid request (missing pageUrl or other required fields)
5137

@@ -61,7 +47,7 @@ preflight-job-status:
6147
summary: Get preflight job status and result
6248
description: |
6349
⚠️ **EXPERIMENTAL / PROTOTYPE**
64-
This endpoint is useful for retrieving the status of a preflight async job.
50+
This endpoint is used to retrieve the status and results of a preflight async job.
6551
The jobId must be provided in the path parameter.
6652
If the job is completed, the result will be included in the response.
6753
If the job is still in progress, a 202 response will be returned.

docs/openapi/schemas.yaml

Lines changed: 22 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1723,14 +1723,11 @@ ScrapeRequest:
17231723
description: The URLs to scrape. The URLs must be unique. Limit of 10 URLs per request.
17241724
type: array
17251725
items:
1726-
type: object
1727-
properties:
1728-
url:
1729-
description: The URL to scrape
1730-
$ref: '#/URL'
1726+
$ref: '#/URL'
17311727
example:
1732-
- url: 'https://example.com/en/page1'
1733-
- url: 'https://example.com/fr/page2'
1728+
urls:
1729+
- 'https://example.com/en/page1'
1730+
- 'https://example.com/fr/page2'
17341731
ScrapeResponse:
17351732
type: object
17361733
properties:
@@ -1741,6 +1738,7 @@ ScrapeResponse:
17411738
description: The status of the scrape job
17421739
type: string
17431740
enum:
1741+
- 'IN_PROGRESS'
17441742
- 'COMPLETE'
17451743
- 'FAILED'
17461744
startTime:
@@ -1760,9 +1758,7 @@ ScrapeResponse:
17601758
type: integer
17611759
results:
17621760
description: The scrape results
1763-
type: array
1764-
items:
1765-
$ref: '#/ScrapeResult'
1761+
$ref: '#/ScrapeResult'
17661762
example:
17671763
id: '12d6ac8e-d5e4-4788-90eb-b69e10e745fd'
17681764
status: 'COMPLETE'
@@ -2662,3 +2658,19 @@ AsyncJob:
26622658
- updatedAt
26632659
- startedAt
26642660
- metadata
2661+
2662+
CreateAsyncJobAcceptedResponse:
2663+
properties:
2664+
jobId:
2665+
type: string
2666+
format: uuid
2667+
status:
2668+
type: string
2669+
enum: [ IN_PROGRESS, COMPLETED, FAILED ]
2670+
createdAt:
2671+
type: string
2672+
format: date-time
2673+
pollUrl:
2674+
type: string
2675+
format: uri
2676+
description: URL to poll for job status

docs/openapi/scrape-api.yaml

Lines changed: 38 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,30 +1,59 @@
1-
scrape:
1+
create-scrape-job:
22
post:
33
tags:
44
- scrape
5-
summary: Scrape a set of URLs
5+
security:
6+
- api_key: [ ]
7+
- ims_key: [ ]
8+
summary: Create a new async URL Scrape job
69
description: |
7-
Warning: prototype endpoint.
8-
This endpoint allows you to scrape a set of URLs. The URLs are scraped in parallel and the results are returned in the same order as the input.
9-
The maximum number of URLs that can be scraped in a single request is 10.
10-
operationId: scrape
10+
⚠️ **EXPERIMENTAL / PROTOTYPE**
11+
This endpoint allows you to submit a new async url scrape job.
12+
The job is provided a list URLs to be scraped. The URLs are scraped in parallel.
13+
The maximum number of URLs that can be scraped in a single job is 10.
14+
The returned jobId can be used to poll for the status and the resultsof the job.
15+
operationId: createScrapeJob
1116
requestBody:
1217
content:
1318
application/json:
1419
schema:
1520
$ref: './schemas.yaml#/ScrapeRequest'
1621
responses:
17-
'200':
18-
description: A list of scrape results
22+
'202':
23+
description: Job accepted
1924
content:
2025
application/json:
2126
schema:
22-
$ref: './schemas.yaml#/ScrapeResponse'
27+
$ref: './schemas.yaml#/CreateAsyncJobAcceptedResponse'
2328
'400':
2429
$ref: './responses.yaml#/400-max-scrape-urls-exceeded'
2530
'401':
2631
$ref: './responses.yaml#/401'
2732
'500':
2833
$ref: './responses.yaml#/500'
34+
35+
get-scrape-job-status:
36+
parameters:
37+
- $ref: './parameters.yaml#/jobId'
38+
get:
39+
tags:
40+
- scrape
2941
security:
3042
- api_key: [ ]
43+
- ims_key: [ ]
44+
summary: Get scrape job status and result
45+
description: |
46+
⚠️ **EXPERIMENTAL / PROTOTYPE**
47+
This endpoint is used to retrieve the status and results of an async scrape job.
48+
The jobId must be provided in the path parameter.
49+
If the job is completed, the result will be included in the response.
50+
operationId: getScrapeJobStatus
51+
responses:
52+
'200':
53+
description: Job status and (if available) result
54+
content:
55+
application/json:
56+
schema:
57+
$ref: './schemas.yaml#/ScrapeResponse'
58+
'404':
59+
description: Job not found

0 commit comments

Comments
 (0)