Skip to content

Commit b841dae

Browse files
chore: generate Open API types
1 parent eec712a commit b841dae

File tree

4 files changed

+184
-21
lines changed

4 files changed

+184
-21
lines changed

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

Lines changed: 87 additions & 6 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.
@@ -1489,7 +1503,6 @@ export interface components {
14891503
active_enterprise_customer?: components["schemas"]["EnterpriseCustomer"] | null;
14901504
staff_enterprise_customer?: components["schemas"]["EnterpriseCustomer"] | null;
14911505
should_update_active_enterprise_customer_user: boolean;
1492-
secured_algolia_api_key?: string | null;
14931506
/** @description Mapping of catalog UUIDs to catalog query UUIDs. */
14941507
catalog_uuids_to_catalog_query_uuids: {
14951508
[key: string]: string;
@@ -1835,6 +1848,37 @@ export interface components {
18351848
course_price?: number | null;
18361849
latest_action: string;
18371850
};
1851+
/**
1852+
* @description Request Serializer to validate subsidy-request ``approve`` endpoint POST data.
1853+
*
1854+
* For view: LearnerCreditRequestViewSet.approve
1855+
*/
1856+
LearnerCreditRequestApproveRequest: {
1857+
/**
1858+
* Format: uuid
1859+
* @description The UUID of the policy to which the request belongs.
1860+
*/
1861+
policy_uuid: string;
1862+
/**
1863+
* Format: uuid
1864+
* @description The UUID of the Enterprise Customer.
1865+
*/
1866+
enterprise_customer_uuid: string;
1867+
/**
1868+
* Format: uuid
1869+
* @description The UUID of the LearnerCreditRequest to be approved.
1870+
*/
1871+
learner_credit_request_uuid: string;
1872+
};
1873+
/**
1874+
* @description Request serializer to validate cancel endpoint query params.
1875+
*
1876+
* For view: LearnerCreditRequestViewSet.cancel
1877+
*/
1878+
LearnerCreditRequestCancel: {
1879+
/** Format: uuid */
1880+
request_uuid: string;
1881+
};
18381882
/** @description Serializer for declining a learner credit request. */
18391883
LearnerCreditRequestDecline: {
18401884
/**
@@ -1872,7 +1916,6 @@ export interface components {
18721916
active_enterprise_customer?: components["schemas"]["EnterpriseCustomer"] | null;
18731917
staff_enterprise_customer?: components["schemas"]["EnterpriseCustomer"] | null;
18741918
should_update_active_enterprise_customer_user: boolean;
1875-
secured_algolia_api_key?: string | null;
18761919
/** @description Mapping of catalog UUIDs to catalog query UUIDs. */
18771920
catalog_uuids_to_catalog_query_uuids: {
18781921
[key: string]: string;
@@ -1912,7 +1955,6 @@ export interface components {
19121955
active_enterprise_customer?: components["schemas"]["EnterpriseCustomer"] | null;
19131956
staff_enterprise_customer?: components["schemas"]["EnterpriseCustomer"] | null;
19141957
should_update_active_enterprise_customer_user: boolean;
1915-
secured_algolia_api_key?: string | null;
19161958
/** @description Mapping of catalog UUIDs to catalog query UUIDs. */
19171959
catalog_uuids_to_catalog_query_uuids: {
19181960
[key: string]: string;
@@ -1942,7 +1984,6 @@ export interface components {
19421984
active_enterprise_customer?: components["schemas"]["EnterpriseCustomer"] | null;
19431985
staff_enterprise_customer?: components["schemas"]["EnterpriseCustomer"] | null;
19441986
should_update_active_enterprise_customer_user: boolean;
1945-
secured_algolia_api_key?: string | null;
19461987
/** @description Mapping of catalog UUIDs to catalog query UUIDs. */
19471988
catalog_uuids_to_catalog_query_uuids: {
19481989
[key: string]: string;
@@ -2551,11 +2592,11 @@ export interface components {
25512592
* @description Total Amount redeemed for policy, in USD.
25522593
*/
25532594
amount_redeemed_usd: number;
2554-
/** @description Total amount allocated for policies of type AssignedLearnerCreditAccessPolicy (0 otherwise), in positive USD cents. */
2595+
/** @description Total amount allocated for policies of type AssignedLearnerCreditAccessPolicy or {PolicyTypes.PER_LEARNER_SPEND_CREDIT} (0 otherwise), in positive USD cents. */
25552596
amount_allocated_usd_cents: number;
25562597
/**
25572598
* Format: double
2558-
* @description ('Total amount allocated for policies of type AssignedLearnerCreditAccessPolicy (0 otherwise), in USD.',)
2599+
* @description ('Total amount allocated for policies of type AssignedLearnerCreditAccessPolicy or ', '{PolicyTypes.PER_LEARNER_SPEND_CREDIT} (0 otherwise), in USD.')
25592600
*/
25602601
amount_allocated_usd: number;
25612602
/** @description Total Amount of available spend for policy, in positive USD cents. */
@@ -4105,6 +4146,46 @@ export interface operations {
41054146
};
41064147
};
41074148
};
4149+
/**
4150+
* Approve a learner credit request.
4151+
* @description Approve a learner credit request.
4152+
*/
4153+
api_v1_learner_credit_requests_approve_create: {
4154+
requestBody: {
4155+
content: {
4156+
"application/json": components["schemas"]["LearnerCreditRequestApproveRequest"];
4157+
"application/x-www-form-urlencoded": components["schemas"]["LearnerCreditRequestApproveRequest"];
4158+
"multipart/form-data": components["schemas"]["LearnerCreditRequestApproveRequest"];
4159+
};
4160+
};
4161+
responses: {
4162+
200: {
4163+
content: {
4164+
"application/json": components["schemas"]["LearnerCreditRequest"];
4165+
};
4166+
};
4167+
};
4168+
};
4169+
/**
4170+
* Learner credit request cancel endpoint.
4171+
* @description Cancel a learner credit request.
4172+
*/
4173+
api_v1_learner_credit_requests_cancel_create: {
4174+
requestBody: {
4175+
content: {
4176+
"application/json": components["schemas"]["LearnerCreditRequestCancel"];
4177+
"application/x-www-form-urlencoded": components["schemas"]["LearnerCreditRequestCancel"];
4178+
"multipart/form-data": components["schemas"]["LearnerCreditRequestCancel"];
4179+
};
4180+
};
4181+
responses: {
4182+
200: {
4183+
content: {
4184+
"application/json": components["schemas"]["LearnerCreditRequestCancel"];
4185+
};
4186+
};
4187+
};
4188+
};
41084189
/**
41094190
* Decline a learner credit request.
41104191
* @description Action of declining a Learner Credit Subsidy Request

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

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -954,6 +954,7 @@ export interface operations {
954954
subsidy_access_policy_uuid?: string;
955955
};
956956
path: {
957+
/** @description A UUID string identifying this Subsidy. */
957958
uuid: string;
958959
};
959960
};

src/types/openapi-schemas/enterprise-access.yaml

Lines changed: 94 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1683,6 +1683,58 @@ paths:
16831683
schema:
16841684
$ref: '#/components/schemas/LearnerCreditRequest'
16851685
description: ''
1686+
/api/v1/learner-credit-requests/approve/:
1687+
post:
1688+
operationId: api_v1_learner_credit_requests_approve_create
1689+
description: Approve a learner credit request.
1690+
summary: Approve a learner credit request.
1691+
tags:
1692+
- Learner Credit Requests
1693+
requestBody:
1694+
content:
1695+
application/json:
1696+
schema:
1697+
$ref: '#/components/schemas/LearnerCreditRequestApproveRequest'
1698+
application/x-www-form-urlencoded:
1699+
schema:
1700+
$ref: '#/components/schemas/LearnerCreditRequestApproveRequest'
1701+
multipart/form-data:
1702+
schema:
1703+
$ref: '#/components/schemas/LearnerCreditRequestApproveRequest'
1704+
required: true
1705+
responses:
1706+
'200':
1707+
content:
1708+
application/json:
1709+
schema:
1710+
$ref: '#/components/schemas/LearnerCreditRequest'
1711+
description: ''
1712+
/api/v1/learner-credit-requests/cancel/:
1713+
post:
1714+
operationId: api_v1_learner_credit_requests_cancel_create
1715+
description: Cancel a learner credit request.
1716+
summary: Learner credit request cancel endpoint.
1717+
tags:
1718+
- Learner Credit Requests
1719+
requestBody:
1720+
content:
1721+
application/json:
1722+
schema:
1723+
$ref: '#/components/schemas/LearnerCreditRequestCancel'
1724+
application/x-www-form-urlencoded:
1725+
schema:
1726+
$ref: '#/components/schemas/LearnerCreditRequestCancel'
1727+
multipart/form-data:
1728+
schema:
1729+
$ref: '#/components/schemas/LearnerCreditRequestCancel'
1730+
required: true
1731+
responses:
1732+
'200':
1733+
content:
1734+
application/json:
1735+
schema:
1736+
$ref: '#/components/schemas/LearnerCreditRequestCancel'
1737+
description: ''
16861738
/api/v1/learner-credit-requests/decline/:
16871739
post:
16881740
operationId: api_v1_learner_credit_requests_decline_create
@@ -4510,9 +4562,6 @@ components:
45104562
nullable: true
45114563
should_update_active_enterprise_customer_user:
45124564
type: boolean
4513-
secured_algolia_api_key:
4514-
type: string
4515-
nullable: true
45164565
catalog_uuids_to_catalog_query_uuids:
45174566
type: object
45184567
additionalProperties:
@@ -5280,6 +5329,43 @@ components:
52805329
- state
52815330
- user
52825331
- uuid
5332+
LearnerCreditRequestApproveRequest:
5333+
type: object
5334+
description: >-
5335+
Request Serializer to validate subsidy-request ``approve`` endpoint POST
5336+
data.
5337+
5338+
5339+
For view: LearnerCreditRequestViewSet.approve
5340+
properties:
5341+
policy_uuid:
5342+
type: string
5343+
format: uuid
5344+
description: The UUID of the policy to which the request belongs.
5345+
enterprise_customer_uuid:
5346+
type: string
5347+
format: uuid
5348+
description: The UUID of the Enterprise Customer.
5349+
learner_credit_request_uuid:
5350+
type: string
5351+
format: uuid
5352+
description: The UUID of the LearnerCreditRequest to be approved.
5353+
required:
5354+
- enterprise_customer_uuid
5355+
- learner_credit_request_uuid
5356+
- policy_uuid
5357+
LearnerCreditRequestCancel:
5358+
type: object
5359+
description: |-
5360+
Request serializer to validate cancel endpoint query params.
5361+
5362+
For view: LearnerCreditRequestViewSet.cancel
5363+
properties:
5364+
request_uuid:
5365+
type: string
5366+
format: uuid
5367+
required:
5368+
- request_uuid
52835369
LearnerCreditRequestDecline:
52845370
type: object
52855371
description: Serializer for declining a learner credit request.
@@ -5339,9 +5425,6 @@ components:
53395425
nullable: true
53405426
should_update_active_enterprise_customer_user:
53415427
type: boolean
5342-
secured_algolia_api_key:
5343-
type: string
5344-
nullable: true
53455428
catalog_uuids_to_catalog_query_uuids:
53465429
type: object
53475430
additionalProperties:
@@ -5433,9 +5516,6 @@ components:
54335516
nullable: true
54345517
should_update_active_enterprise_customer_user:
54355518
type: boolean
5436-
secured_algolia_api_key:
5437-
type: string
5438-
nullable: true
54395519
catalog_uuids_to_catalog_query_uuids:
54405520
type: object
54415521
additionalProperties:
@@ -5496,9 +5576,6 @@ components:
54965576
nullable: true
54975577
should_update_active_enterprise_customer_user:
54985578
type: boolean
5499-
secured_algolia_api_key:
5500-
type: string
5501-
nullable: true
55025579
catalog_uuids_to_catalog_query_uuids:
55035580
type: object
55045581
additionalProperties:
@@ -6438,15 +6515,17 @@ components:
64386515
readOnly: true
64396516
description: >-
64406517
Total amount allocated for policies of type
6441-
AssignedLearnerCreditAccessPolicy (0 otherwise), in positive USD
6442-
cents.
6518+
AssignedLearnerCreditAccessPolicy or
6519+
{PolicyTypes.PER_LEARNER_SPEND_CREDIT} (0 otherwise), in positive
6520+
USD cents.
64436521
amount_allocated_usd:
64446522
type: number
64456523
format: double
64466524
readOnly: true
64476525
description: >-
64486526
('Total amount allocated for policies of type
6449-
AssignedLearnerCreditAccessPolicy (0 otherwise), in USD.',)
6527+
AssignedLearnerCreditAccessPolicy or ',
6528+
'{PolicyTypes.PER_LEARNER_SPEND_CREDIT} (0 otherwise), in USD.')
64506529
spend_available_usd_cents:
64516530
type: integer
64526531
readOnly: true

src/types/openapi-schemas/enterprise-subsidy.yaml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -370,6 +370,8 @@ paths:
370370
name: uuid
371371
schema:
372372
type: string
373+
format: uuid
374+
description: A UUID string identifying this Subsidy.
373375
required: true
374376
tags:
375377
- subsidy

0 commit comments

Comments
 (0)