Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
149 changes: 149 additions & 0 deletions frontends/api/src/generated/v1/api.ts

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

50 changes: 50 additions & 0 deletions openapi/specs/v1.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9917,6 +9917,38 @@ paths:
schema:
$ref: '#/components/schemas/ContentFileWebHookRequest'
description: ''
/api/v1/webhooks/learning_resources/:
post:
operationId: webhooks_learning_resources_create
description: |-
Generic webhook handler for pre-computed LearningResource batches delivered
by the OL Data Platform (Dagster).

The request body is ``{"resources": [ ... ]}`` where each resource is a
canonical LearningResource dict carrying at minimum ``readable_id``,
``etl_source`` and ``resource_type``. Resources are grouped by
``(etl_source, resource_type)`` and routed to the matching loader
(``load_courses`` / ``load_programs`` / ``load_documents`` / ``load_videos``
/ ``load_podcasts``).
Each loader performs a full sync for that source and upserts the OpenSearch
index, so a batch must contain the authoritative set of resources for the
(etl_source, resource_type) it represents. Resource types without a loader
are logged and skipped rather than failing the whole batch.
tags:
- webhooks
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/LearningResourceWebhookRequestRequest'
required: true
responses:
'200':
content:
application/json:
schema:
$ref: '#/components/schemas/WebhookResponse'
description: ''
/api/v1/webhooks/ovs_videos/:
post:
operationId: webhooks_ovs_videos_create
Expand Down Expand Up @@ -13507,6 +13539,24 @@ components:
- channel_url
- id
- name
LearningResourceWebhookRequestRequest:
type: object
description: |-
Serializer for the generic ``/api/v1/webhooks/learning_resources/`` endpoint.

Accepts a batch of pre-computed canonical LearningResource payloads pushed
from the OL Data Platform (Dagster). Each resource must carry at minimum
``readable_id``, ``etl_source`` and ``resource_type`` so the handler can
route it to the correct loader; all other keys are preserved and passed
through to the loaders unchanged.
properties:
resources:
type: array
items:
type: object
additionalProperties: {}
required:
- resources
LearningResourcesSearchResponse:
type: object
description: |-
Expand Down
Loading
Loading