Skip to content

Commit c88214a

Browse files
chore: generate Open API types
1 parent 4575e33 commit c88214a

File tree

4 files changed

+330
-45
lines changed

4 files changed

+330
-45
lines changed

src/types/enterprise-access.openapi.d.ts

Lines changed: 131 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -295,6 +295,20 @@ export interface paths {
295295
*/
296296
get: operations["api_v1_learner_credit_requests_retrieve"];
297297
};
298+
"/api/v1/learner-credit-requests/approve/": {
299+
/**
300+
* Approve a learner credit request.
301+
* @description Approve a learner credit request.
302+
*/
303+
post: operations["api_v1_learner_credit_requests_approve_create"];
304+
};
305+
"/api/v1/learner-credit-requests/cancel/": {
306+
/**
307+
* Learner credit request cancel endpoint.
308+
* @description Cancel a learner credit request.
309+
*/
310+
post: operations["api_v1_learner_credit_requests_cancel_create"];
311+
};
298312
"/api/v1/learner-credit-requests/decline/": {
299313
/**
300314
* Decline a learner credit request.
@@ -309,6 +323,10 @@ export interface paths {
309323
*/
310324
get: operations["api_v1_learner_credit_requests_overview_retrieve"];
311325
};
326+
"/api/v1/learner-credit-requests/remind/": {
327+
/** @description Remind a Learner that their LearnerCreditRequest is Approved and waiting for their action. */
328+
post: operations["api_v1_learner_credit_requests_remind_create"];
329+
};
312330
"/api/v1/license-requests/": {
313331
/**
314332
* License request list.
@@ -1484,20 +1502,19 @@ export interface components {
14841502
LearnerAcademyResponse: {
14851503
errors?: components["schemas"]["Error"][];
14861504
warnings?: components["schemas"]["Warning"][];
1505+
enterprise_features?: {
1506+
[key: string]: unknown;
1507+
};
14871508
enterprise_customer?: components["schemas"]["EnterpriseCustomer"] | null;
14881509
all_linked_enterprise_customer_users?: components["schemas"]["EnterpriseCustomerUser"][];
14891510
active_enterprise_customer?: components["schemas"]["EnterpriseCustomer"] | null;
14901511
staff_enterprise_customer?: components["schemas"]["EnterpriseCustomer"] | null;
14911512
should_update_active_enterprise_customer_user: boolean;
1492-
secured_algolia_api_key?: string | null;
14931513
/** @description Mapping of catalog UUIDs to catalog query UUIDs. */
14941514
catalog_uuids_to_catalog_query_uuids: {
14951515
[key: string]: string;
14961516
};
14971517
algolia?: components["schemas"]["SecuredAlgoliaMetadata"] | null;
1498-
enterprise_features?: {
1499-
[key: string]: unknown;
1500-
};
15011518
enterprise_customer_user_subsidies: components["schemas"]["EnterpriseCustomerUserSubsidies"];
15021519
};
15031520
/** @description A read-only Serializer for responding to requests for ``LearnerContentAssignmentAction`` records. */
@@ -1834,6 +1851,39 @@ export interface components {
18341851
/** @description Cost of the content in USD Cents. */
18351852
course_price?: number | null;
18361853
latest_action: string;
1854+
/** @description Computed state based on action status and error conditions. Returns 'waiting' for approved/reminded actions without errors, 'failed' for actions with error_reason, or the actual status otherwise */
1855+
learner_request_state: string;
1856+
};
1857+
/**
1858+
* @description Request Serializer to validate subsidy-request ``approve`` endpoint POST data.
1859+
*
1860+
* For view: LearnerCreditRequestViewSet.approve
1861+
*/
1862+
LearnerCreditRequestApproveRequest: {
1863+
/**
1864+
* Format: uuid
1865+
* @description The UUID of the policy to which the request belongs.
1866+
*/
1867+
policy_uuid: string;
1868+
/**
1869+
* Format: uuid
1870+
* @description The UUID of the Enterprise Customer.
1871+
*/
1872+
enterprise_customer_uuid: string;
1873+
/**
1874+
* Format: uuid
1875+
* @description The UUID of the LearnerCreditRequest to be approved.
1876+
*/
1877+
learner_credit_request_uuid: string;
1878+
};
1879+
/**
1880+
* @description Request serializer to validate cancel endpoint query params.
1881+
*
1882+
* For view: LearnerCreditRequestViewSet.cancel
1883+
*/
1884+
LearnerCreditRequestCancel: {
1885+
/** Format: uuid */
1886+
request_uuid: string;
18371887
};
18381888
/** @description Serializer for declining a learner credit request. */
18391889
LearnerCreditRequestDecline: {
@@ -1867,20 +1917,19 @@ export interface components {
18671917
LearnerDashboardResponse: {
18681918
errors?: components["schemas"]["Error"][];
18691919
warnings?: components["schemas"]["Warning"][];
1920+
enterprise_features?: {
1921+
[key: string]: unknown;
1922+
};
18701923
enterprise_customer?: components["schemas"]["EnterpriseCustomer"] | null;
18711924
all_linked_enterprise_customer_users?: components["schemas"]["EnterpriseCustomerUser"][];
18721925
active_enterprise_customer?: components["schemas"]["EnterpriseCustomer"] | null;
18731926
staff_enterprise_customer?: components["schemas"]["EnterpriseCustomer"] | null;
18741927
should_update_active_enterprise_customer_user: boolean;
1875-
secured_algolia_api_key?: string | null;
18761928
/** @description Mapping of catalog UUIDs to catalog query UUIDs. */
18771929
catalog_uuids_to_catalog_query_uuids: {
18781930
[key: string]: string;
18791931
};
18801932
algolia?: components["schemas"]["SecuredAlgoliaMetadata"] | null;
1881-
enterprise_features?: {
1882-
[key: string]: unknown;
1883-
};
18841933
enterprise_customer_user_subsidies: components["schemas"]["EnterpriseCustomerUserSubsidies"];
18851934
enterprise_course_enrollments: components["schemas"]["EnterpriseCourseEnrollment"][];
18861935
all_enrollments_by_status: components["schemas"]["LearnerEnrollmentsByStatus"];
@@ -1907,20 +1956,19 @@ export interface components {
19071956
LearnerSearchResponse: {
19081957
errors?: components["schemas"]["Error"][];
19091958
warnings?: components["schemas"]["Warning"][];
1959+
enterprise_features?: {
1960+
[key: string]: unknown;
1961+
};
19101962
enterprise_customer?: components["schemas"]["EnterpriseCustomer"] | null;
19111963
all_linked_enterprise_customer_users?: components["schemas"]["EnterpriseCustomerUser"][];
19121964
active_enterprise_customer?: components["schemas"]["EnterpriseCustomer"] | null;
19131965
staff_enterprise_customer?: components["schemas"]["EnterpriseCustomer"] | null;
19141966
should_update_active_enterprise_customer_user: boolean;
1915-
secured_algolia_api_key?: string | null;
19161967
/** @description Mapping of catalog UUIDs to catalog query UUIDs. */
19171968
catalog_uuids_to_catalog_query_uuids: {
19181969
[key: string]: string;
19191970
};
19201971
algolia?: components["schemas"]["SecuredAlgoliaMetadata"] | null;
1921-
enterprise_features?: {
1922-
[key: string]: unknown;
1923-
};
19241972
enterprise_customer_user_subsidies: components["schemas"]["EnterpriseCustomerUserSubsidies"];
19251973
};
19261974
/** @description Serializer for the learner skills quiz request. */
@@ -1937,20 +1985,19 @@ export interface components {
19371985
LearnerSkillsQuizResponse: {
19381986
errors?: components["schemas"]["Error"][];
19391987
warnings?: components["schemas"]["Warning"][];
1988+
enterprise_features?: {
1989+
[key: string]: unknown;
1990+
};
19401991
enterprise_customer?: components["schemas"]["EnterpriseCustomer"] | null;
19411992
all_linked_enterprise_customer_users?: components["schemas"]["EnterpriseCustomerUser"][];
19421993
active_enterprise_customer?: components["schemas"]["EnterpriseCustomer"] | null;
19431994
staff_enterprise_customer?: components["schemas"]["EnterpriseCustomer"] | null;
19441995
should_update_active_enterprise_customer_user: boolean;
1945-
secured_algolia_api_key?: string | null;
19461996
/** @description Mapping of catalog UUIDs to catalog query UUIDs. */
19471997
catalog_uuids_to_catalog_query_uuids: {
19481998
[key: string]: string;
19491999
};
19502000
algolia?: components["schemas"]["SecuredAlgoliaMetadata"] | null;
1951-
enterprise_features?: {
1952-
[key: string]: unknown;
1953-
};
19542001
enterprise_customer_user_subsidies: components["schemas"]["EnterpriseCustomerUserSubsidies"];
19552002
};
19562003
/**
@@ -2551,11 +2598,11 @@ export interface components {
25512598
* @description Total Amount redeemed for policy, in USD.
25522599
*/
25532600
amount_redeemed_usd: number;
2554-
/** @description Total amount allocated for policies of type AssignedLearnerCreditAccessPolicy (0 otherwise), in positive USD cents. */
2601+
/** @description Total amount allocated for policies of type AssignedLearnerCreditAccessPolicy or {PolicyTypes.PER_LEARNER_SPEND_CREDIT} (0 otherwise), in positive USD cents. */
25552602
amount_allocated_usd_cents: number;
25562603
/**
25572604
* Format: double
2558-
* @description ('Total amount allocated for policies of type AssignedLearnerCreditAccessPolicy (0 otherwise), in USD.',)
2605+
* @description ('Total amount allocated for policies of type AssignedLearnerCreditAccessPolicy or ', '{PolicyTypes.PER_LEARNER_SPEND_CREDIT} (0 otherwise), in USD.')
25592606
*/
25602607
amount_allocated_usd: number;
25612608
/** @description Total Amount of available spend for policy, in positive USD cents. */
@@ -4046,12 +4093,21 @@ export interface operations {
40464093
query?: {
40474094
course_id?: string;
40484095
enterprise_customer_uuid?: string;
4096+
/** @description Choose from the following valid action statuses: requested, pending, approved, declined, error, accepted, cancelled, expired, reversed, reminded */
4097+
latest_action_status?: string;
4098+
/** @description Choose from the following valid action statuses: requested, pending, approved, declined, error, accepted, cancelled, expired, reversed, reminded */
4099+
latest_action_status__in?: string[];
4100+
/** @description Choose from the following valid learner request states: requested, pending, approved, declined, accepted, cancelled, expired, reversed, reminded, waiting, failed */
4101+
learner_request_state?: string;
4102+
/** @description Choose from the following valid learner request states: requested, pending, approved, declined, accepted, cancelled, expired, reversed, reminded, waiting, failed */
4103+
learner_request_state__in?: string[];
40494104
/** @description Which field to use when ordering the results. */
40504105
ordering?: string;
40514106
/** @description A page number within the paginated result set. */
40524107
page?: number;
40534108
/** @description Number of results to return per page. */
40544109
page_size?: number;
4110+
policy_uuid?: string;
40554111
/** @description A search term. */
40564112
search?: string;
40574113
user__email?: string;
@@ -4105,6 +4161,46 @@ export interface operations {
41054161
};
41064162
};
41074163
};
4164+
/**
4165+
* Approve a learner credit request.
4166+
* @description Approve a learner credit request.
4167+
*/
4168+
api_v1_learner_credit_requests_approve_create: {
4169+
requestBody: {
4170+
content: {
4171+
"application/json": components["schemas"]["LearnerCreditRequestApproveRequest"];
4172+
"application/x-www-form-urlencoded": components["schemas"]["LearnerCreditRequestApproveRequest"];
4173+
"multipart/form-data": components["schemas"]["LearnerCreditRequestApproveRequest"];
4174+
};
4175+
};
4176+
responses: {
4177+
200: {
4178+
content: {
4179+
"application/json": components["schemas"]["LearnerCreditRequest"];
4180+
};
4181+
};
4182+
};
4183+
};
4184+
/**
4185+
* Learner credit request cancel endpoint.
4186+
* @description Cancel a learner credit request.
4187+
*/
4188+
api_v1_learner_credit_requests_cancel_create: {
4189+
requestBody: {
4190+
content: {
4191+
"application/json": components["schemas"]["LearnerCreditRequestCancel"];
4192+
"application/x-www-form-urlencoded": components["schemas"]["LearnerCreditRequestCancel"];
4193+
"multipart/form-data": components["schemas"]["LearnerCreditRequestCancel"];
4194+
};
4195+
};
4196+
responses: {
4197+
200: {
4198+
content: {
4199+
"application/json": components["schemas"]["LearnerCreditRequestCancel"];
4200+
};
4201+
};
4202+
};
4203+
};
41084204
/**
41094205
* Decline a learner credit request.
41104206
* @description Action of declining a Learner Credit Subsidy Request
@@ -4138,6 +4234,23 @@ export interface operations {
41384234
};
41394235
};
41404236
};
4237+
/** @description Remind a Learner that their LearnerCreditRequest is Approved and waiting for their action. */
4238+
api_v1_learner_credit_requests_remind_create: {
4239+
requestBody: {
4240+
content: {
4241+
"application/json": components["schemas"]["LearnerCreditRequest"];
4242+
"application/x-www-form-urlencoded": components["schemas"]["LearnerCreditRequest"];
4243+
"multipart/form-data": components["schemas"]["LearnerCreditRequest"];
4244+
};
4245+
};
4246+
responses: {
4247+
200: {
4248+
content: {
4249+
"application/json": components["schemas"]["LearnerCreditRequest"];
4250+
};
4251+
};
4252+
};
4253+
};
41414254
/**
41424255
* License request list.
41434256
* @description Viewset for license requests

src/types/enterprise-subsidy.openapi.d.ts

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -594,6 +594,11 @@ export interface components {
594594
parent_content_key?: string | null;
595595
/** @description The title of the content associated with this Transaction.The title is captured at the time the Transaction is created and may not be up to date. */
596596
content_title?: string | null;
597+
/**
598+
* Format: date-time
599+
* @description The start date of the course run associated with this Transaction.The start date is captured at the time the Transaction is created and may not be up to date.
600+
*/
601+
course_run_start_date?: string | null;
597602
/**
598603
* Format: int64
599604
* @description How many units (as defined in the associated Ledger instance) this Transaction represents.

0 commit comments

Comments
 (0)