Skip to content

Commit 2baa76d

Browse files
authored
chore(openAPI): enable stripe for schema generation DEV-1183 (#6393)
### 👀 Preview steps 1. ℹ️ disable stripe in your environment and do a fresh install 4. 🔴 [on main] run `./scripts/generate_api.sh` and notice that the stripe schema removed 5. 🟢 [on PR] run `./scripts/generate_api.sh` and notice that the stripe schema remains 🎉
1 parent e8b7e00 commit 2baa76d

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

50 files changed

+4267
-44
lines changed

jsapp/js/api/models/baseProduct.ts

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
import type { BaseProductMetadata } from './baseProductMetadata'
2+
/**
3+
* Generated by orval v7.10.0 🍺
4+
* Do not edit manually.
5+
* KoboToolbox Primary API
6+
* This page documents all KoboToolbox API endpoints, except for those implementing the OpenRosa protocol, which are [documented separately](/api/openrosa/docs/).
7+
8+
The endpoints are grouped by area of intended use. Each category contains related endpoints, with detailed documentation on usage and configuration. Use this as a reference to quickly find the right endpoint for managing projects, forms, data, permissions, integrations, logs, and organizational resources.
9+
10+
**General note**: All projects (whether deployed or draft), as well as all library content (questions, blocks, templates, and collections) in the user-facing application are represented in the API as "assets".
11+
* OpenAPI spec version: 2.0.0 (api_v2)
12+
*/
13+
import type { StripeProductType } from './stripeProductType'
14+
15+
export interface BaseProduct {
16+
/** @maxLength 255 */
17+
id: string
18+
/**
19+
* The product's name, meant to be displayable to the customer. Applicable to both `service` and `good` types.
20+
* @maxLength 5000
21+
*/
22+
name: string
23+
/**
24+
* A description of this object.
25+
* @nullable
26+
*/
27+
description?: string | null
28+
/** The type of the product. The product is either of type `good`, which is eligible for use with Orders and SKUs, or `service`, which is eligible for use with Subscriptions and Plans.
29+
30+
* `good` - Good
31+
* `service` - Service */
32+
type: StripeProductType
33+
readonly metadata: BaseProductMetadata
34+
}
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
/**
2+
* Generated by orval v7.10.0 🍺
3+
* Do not edit manually.
4+
* KoboToolbox Primary API
5+
* This page documents all KoboToolbox API endpoints, except for those implementing the OpenRosa protocol, which are [documented separately](/api/openrosa/docs/).
6+
7+
The endpoints are grouped by area of intended use. Each category contains related endpoints, with detailed documentation on usage and configuration. Use this as a reference to quickly find the right endpoint for managing projects, forms, data, permissions, integrations, logs, and organizational resources.
8+
9+
**General note**: All projects (whether deployed or draft), as well as all library content (questions, blocks, templates, and collections) in the user-facing application are represented in the API as "assets".
10+
* OpenAPI spec version: 2.0.0 (api_v2)
11+
*/
12+
13+
export type BaseProductMetadata = { [key: string]: string }

jsapp/js/api/models/blankEnum.ts

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
/**
2+
* Generated by orval v7.10.0 🍺
3+
* Do not edit manually.
4+
* KoboToolbox Primary API
5+
* This page documents all KoboToolbox API endpoints, except for those implementing the OpenRosa protocol, which are [documented separately](/api/openrosa/docs/).
6+
7+
The endpoints are grouped by area of intended use. Each category contains related endpoints, with detailed documentation on usage and configuration. Use this as a reference to quickly find the right endpoint for managing projects, forms, data, permissions, integrations, logs, and organizational resources.
8+
9+
**General note**: All projects (whether deployed or draft), as well as all library content (questions, blocks, templates, and collections) in the user-facing application are represented in the API as "assets".
10+
* OpenAPI spec version: 2.0.0 (api_v2)
11+
*/
12+
13+
export type BlankEnum = (typeof BlankEnum)[keyof typeof BlankEnum]
14+
15+
// eslint-disable-next-line @typescript-eslint/no-redeclare
16+
export const BlankEnum = {
17+
'': '',
18+
} as const

jsapp/js/api/models/changePlan.ts

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
/**
2+
* Generated by orval v7.10.0 🍺
3+
* Do not edit manually.
4+
* KoboToolbox Primary API
5+
* This page documents all KoboToolbox API endpoints, except for those implementing the OpenRosa protocol, which are [documented separately](/api/openrosa/docs/).
6+
7+
The endpoints are grouped by area of intended use. Each category contains related endpoints, with detailed documentation on usage and configuration. Use this as a reference to quickly find the right endpoint for managing projects, forms, data, permissions, integrations, logs, and organizational resources.
8+
9+
**General note**: All projects (whether deployed or draft), as well as all library content (questions, blocks, templates, and collections) in the user-facing application are represented in the API as "assets".
10+
* OpenAPI spec version: 2.0.0 (api_v2)
11+
*/
12+
13+
export interface ChangePlan {
14+
price_id: string
15+
subscription_id: string
16+
/** @minimum 1 */
17+
quantity?: number
18+
}
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
/**
2+
* Generated by orval v7.10.0 🍺
3+
* Do not edit manually.
4+
* KoboToolbox Primary API
5+
* This page documents all KoboToolbox API endpoints, except for those implementing the OpenRosa protocol, which are [documented separately](/api/openrosa/docs/).
6+
7+
The endpoints are grouped by area of intended use. Each category contains related endpoints, with detailed documentation on usage and configuration. Use this as a reference to quickly find the right endpoint for managing projects, forms, data, permissions, integrations, logs, and organizational resources.
8+
9+
**General note**: All projects (whether deployed or draft), as well as all library content (questions, blocks, templates, and collections) in the user-facing application are represented in the API as "assets".
10+
* OpenAPI spec version: 2.0.0 (api_v2)
11+
*/
12+
13+
export interface CheckoutLink {
14+
price_id: string
15+
organization_id?: string
16+
/** @minimum 1 */
17+
quantity?: number
18+
}
Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
/**
2+
* Generated by orval v7.10.0 🍺
3+
* Do not edit manually.
4+
* KoboToolbox Primary API
5+
* This page documents all KoboToolbox API endpoints, except for those implementing the OpenRosa protocol, which are [documented separately](/api/openrosa/docs/).
6+
7+
The endpoints are grouped by area of intended use. Each category contains related endpoints, with detailed documentation on usage and configuration. Use this as a reference to quickly find the right endpoint for managing projects, forms, data, permissions, integrations, logs, and organizational resources.
8+
9+
**General note**: All projects (whether deployed or draft), as well as all library content (questions, blocks, templates, and collections) in the user-facing application are represented in the API as "assets".
10+
* OpenAPI spec version: 2.0.0 (api_v2)
11+
*/
12+
13+
/**
14+
* * `charge_automatically` - Charge automatically
15+
* `send_invoice` - Send invoice
16+
*/
17+
export type CollectionMethodEnum = (typeof CollectionMethodEnum)[keyof typeof CollectionMethodEnum]
18+
19+
// eslint-disable-next-line @typescript-eslint/no-redeclare
20+
export const CollectionMethodEnum = {
21+
charge_automatically: 'charge_automatically',
22+
send_invoice: 'send_invoice',
23+
} as const
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
/**
2+
* Generated by orval v7.10.0 🍺
3+
* Do not edit manually.
4+
* KoboToolbox Primary API
5+
* This page documents all KoboToolbox API endpoints, except for those implementing the OpenRosa protocol, which are [documented separately](/api/openrosa/docs/).
6+
7+
The endpoints are grouped by area of intended use. Each category contains related endpoints, with detailed documentation on usage and configuration. Use this as a reference to quickly find the right endpoint for managing projects, forms, data, permissions, integrations, logs, and organizational resources.
8+
9+
**General note**: All projects (whether deployed or draft), as well as all library content (questions, blocks, templates, and collections) in the user-facing application are represented in the API as "assets".
10+
* OpenAPI spec version: 2.0.0 (api_v2)
11+
*/
12+
13+
export interface CustomerPortal {
14+
organization_id: string
15+
price_id?: string
16+
/** @minimum 1 */
17+
quantity?: number
18+
}
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
/**
2+
* Generated by orval v7.10.0 🍺
3+
* Do not edit manually.
4+
* KoboToolbox Primary API
5+
* This page documents all KoboToolbox API endpoints, except for those implementing the OpenRosa protocol, which are [documented separately](/api/openrosa/docs/).
6+
7+
The endpoints are grouped by area of intended use. Each category contains related endpoints, with detailed documentation on usage and configuration. Use this as a reference to quickly find the right endpoint for managing projects, forms, data, permissions, integrations, logs, and organizational resources.
8+
9+
**General note**: All projects (whether deployed or draft), as well as all library content (questions, blocks, templates, and collections) in the user-facing application are represented in the API as "assets".
10+
* OpenAPI spec version: 2.0.0 (api_v2)
11+
*/
12+
13+
export interface CustomerPortalPostResponse {
14+
url: string
15+
}
Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
/**
2+
* Generated by orval v7.10.0 🍺
3+
* Do not edit manually.
4+
* KoboToolbox Primary API
5+
* This page documents all KoboToolbox API endpoints, except for those implementing the OpenRosa protocol, which are [documented separately](/api/openrosa/docs/).
6+
7+
The endpoints are grouped by area of intended use. Each category contains related endpoints, with detailed documentation on usage and configuration. Use this as a reference to quickly find the right endpoint for managing projects, forms, data, permissions, integrations, logs, and organizational resources.
8+
9+
**General note**: All projects (whether deployed or draft), as well as all library content (questions, blocks, templates, and collections) in the user-facing application are represented in the API as "assets".
10+
* OpenAPI spec version: 2.0.0 (api_v2)
11+
*/
12+
import type { OneTimeAddOnTotalUsageLimits } from './oneTimeAddOnTotalUsageLimits'
13+
14+
export interface OneTimeAddOn {
15+
/** @maxLength 27 */
16+
id: string
17+
/** The time when the add-on purchased. */
18+
created: string
19+
readonly is_available: boolean
20+
/** The historical usage limits when the add-on was purchased.
21+
Possible keys:
22+
"submission_limit", "asr_seconds_limit", and/or "mt_characters_limit" */
23+
usage_limits?: unknown
24+
/** The total usage limits for this add-on, based on the usage_limits for a single
25+
add-on. */
26+
readonly total_usage_limits: OneTimeAddOnTotalUsageLimits
27+
/** The amount of each of the add-on's individual limits left to use. */
28+
limits_remaining?: unknown
29+
/** @nullable */
30+
organization?: string | null
31+
/** @nullable */
32+
product?: string | null
33+
}
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
/**
2+
* Generated by orval v7.10.0 🍺
3+
* Do not edit manually.
4+
* KoboToolbox Primary API
5+
* This page documents all KoboToolbox API endpoints, except for those implementing the OpenRosa protocol, which are [documented separately](/api/openrosa/docs/).
6+
7+
The endpoints are grouped by area of intended use. Each category contains related endpoints, with detailed documentation on usage and configuration. Use this as a reference to quickly find the right endpoint for managing projects, forms, data, permissions, integrations, logs, and organizational resources.
8+
9+
**General note**: All projects (whether deployed or draft), as well as all library content (questions, blocks, templates, and collections) in the user-facing application are represented in the API as "assets".
10+
* OpenAPI spec version: 2.0.0 (api_v2)
11+
*/
12+
13+
/**
14+
* The total usage limits for this add-on, based on the usage_limits for a single
15+
add-on.
16+
*/
17+
export type OneTimeAddOnTotalUsageLimits = { [key: string]: unknown }

0 commit comments

Comments
 (0)