Skip to content

Commit

Permalink
feat(app): set stripe as default billing profile (#1998)
Browse files Browse the repository at this point in the history
  • Loading branch information
hekike authored Dec 30, 2024
1 parent a3e2ab1 commit 6c2ddc9
Show file tree
Hide file tree
Showing 34 changed files with 1,971 additions and 1,757 deletions.
1,491 changes: 733 additions & 758 deletions api/api.gen.go

Large diffs are not rendered by default.

1,514 changes: 744 additions & 770 deletions api/client/go/client.gen.go

Large diffs are not rendered by default.

60 changes: 7 additions & 53 deletions api/client/node/schemas/openapi.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1732,58 +1732,6 @@ export interface components {
App:
| components['schemas']['StripeApp']
| components['schemas']['SandboxApp']
/** @description Abstract base model for installed apps.
*
* Represent an app installed to the organization.
* This is an actual instance, with its own configuration and credentials. */
AppBase: {
/**
* ID
* @description A unique identifier for the resource.
* @example 01G65Z755AFWAKHE12NY0CQ9FH
*/
readonly id: string
/**
* Display name
* @description Human-readable name for the resource. Between 1 and 256 characters.
*/
name: string
/**
* Description
* @description Optional description of the resource. Maximum 1024 characters.
*/
description?: string
/**
* Metadata
* @description Additional metadata for the resource.
*/
metadata?: components['schemas']['Metadata'] | null
/**
* Creation Time
* Format: date-time
* @description Timestamp of when the resource was created.
* @example 2024-01-01T01:01:01.001Z
*/
readonly createdAt: string
/**
* Last Update Time
* Format: date-time
* @description Timestamp of when the resource was last updated.
* @example 2024-01-01T01:01:01.001Z
*/
readonly updatedAt: string
/**
* Deletion Time
* Format: date-time
* @description Timestamp of when the resource was permanently deleted.
* @example 2024-01-01T01:01:01.001Z
*/
readonly deletedAt?: string
/** @description The marketplace listing that this installed app is based on. */
readonly listing: components['schemas']['MarketplaceListing']
/** @description Status of the app connection. */
readonly status: components['schemas']['AppStatus']
}
/**
* @description App capability.
*
Expand Down Expand Up @@ -4553,6 +4501,12 @@ export interface components {
ListFeaturesResult:
| components['schemas']['Feature'][]
| components['schemas']['FeaturePaginatedResponse']
/** @description Marketplace install response. */
MarketplaceInstallResponse: {
app: components['schemas']['App']
/** @description Default for capabilities */
defaultForCapabilityTypes: components['schemas']['AppCapabilityType'][]
}
/**
* @description A marketplace listing.
* Represent an available app in the app marketplace that can be installed to the organization.
Expand Down Expand Up @@ -11441,7 +11395,7 @@ export interface operations {
[name: string]: unknown
}
content: {
'application/json': components['schemas']['AppBase']
'application/json': components['schemas']['MarketplaceInstallResponse']
}
}
/** @description The server cannot or will not process the request due to something that is perceived to be a client error (e.g., malformed request syntax, invalid request message framing, or deceptive request routing). */
Expand Down
60 changes: 7 additions & 53 deletions api/client/web/src/client/openapi.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1732,58 +1732,6 @@ export interface components {
App:
| components['schemas']['StripeApp']
| components['schemas']['SandboxApp']
/** @description Abstract base model for installed apps.
*
* Represent an app installed to the organization.
* This is an actual instance, with its own configuration and credentials. */
AppBase: {
/**
* ID
* @description A unique identifier for the resource.
* @example 01G65Z755AFWAKHE12NY0CQ9FH
*/
readonly id: string
/**
* Display name
* @description Human-readable name for the resource. Between 1 and 256 characters.
*/
name: string
/**
* Description
* @description Optional description of the resource. Maximum 1024 characters.
*/
description?: string
/**
* Metadata
* @description Additional metadata for the resource.
*/
metadata?: components['schemas']['Metadata'] | null
/**
* Creation Time
* Format: date-time
* @description Timestamp of when the resource was created.
* @example 2024-01-01T01:01:01.001Z
*/
readonly createdAt: string
/**
* Last Update Time
* Format: date-time
* @description Timestamp of when the resource was last updated.
* @example 2024-01-01T01:01:01.001Z
*/
readonly updatedAt: string
/**
* Deletion Time
* Format: date-time
* @description Timestamp of when the resource was permanently deleted.
* @example 2024-01-01T01:01:01.001Z
*/
readonly deletedAt?: string
/** @description The marketplace listing that this installed app is based on. */
readonly listing: components['schemas']['MarketplaceListing']
/** @description Status of the app connection. */
readonly status: components['schemas']['AppStatus']
}
/**
* @description App capability.
*
Expand Down Expand Up @@ -4553,6 +4501,12 @@ export interface components {
ListFeaturesResult:
| components['schemas']['Feature'][]
| components['schemas']['FeaturePaginatedResponse']
/** @description Marketplace install response. */
MarketplaceInstallResponse: {
app: components['schemas']['App']
/** @description Default for capabilities */
defaultForCapabilityTypes: components['schemas']['AppCapabilityType'][]
}
/**
* @description A marketplace listing.
* Represent an available app in the app marketplace that can be installed to the organization.
Expand Down Expand Up @@ -11441,7 +11395,7 @@ export interface operations {
[name: string]: unknown
}
content: {
'application/json': components['schemas']['AppBase']
'application/json': components['schemas']['MarketplaceInstallResponse']
}
}
/** @description The server cannot or will not process the request due to something that is perceived to be a client error (e.g., malformed request syntax, invalid request message framing, or deceptive request routing). */
Expand Down
87 changes: 15 additions & 72 deletions api/openapi.cloud.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3333,7 +3333,7 @@ paths:
content:
application/json:
schema:
$ref: '#/components/schemas/AppBase'
$ref: '#/components/schemas/MarketplaceInstallResponse'
'400':
description: The server cannot or will not process the request due to something that is perceived to be a client error (e.g., malformed request syntax, invalid request message framing, or deceptive request routing).
content:
Expand Down Expand Up @@ -8214,77 +8214,6 @@ components:
description: |-
App.
One of: stripe
AppBase:
type: object
required:
- id
- name
- createdAt
- updatedAt
- listing
- status
properties:
id:
type: string
example: 01G65Z755AFWAKHE12NY0CQ9FH
pattern: ^[0-7][0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{25}$
description: A unique identifier for the resource.
title: ID
readOnly: true
name:
type: string
minLength: 1
maxLength: 256
description: Human-readable name for the resource. Between 1 and 256 characters.
title: Display name
description:
type: string
maxLength: 1024
description: Optional description of the resource. Maximum 1024 characters.
title: Description
metadata:
type: object
allOf:
- $ref: '#/components/schemas/Metadata'
nullable: true
description: Additional metadata for the resource.
title: Metadata
createdAt:
type: string
format: date-time
example: 2024-01-01T01:01:01.001Z
description: Timestamp of when the resource was created.
title: Creation Time
readOnly: true
updatedAt:
type: string
format: date-time
example: 2024-01-01T01:01:01.001Z
description: Timestamp of when the resource was last updated.
title: Last Update Time
readOnly: true
deletedAt:
type: string
format: date-time
example: 2024-01-01T01:01:01.001Z
description: Timestamp of when the resource was permanently deleted.
title: Deletion Time
readOnly: true
listing:
allOf:
- $ref: '#/components/schemas/MarketplaceListing'
description: The marketplace listing that this installed app is based on.
readOnly: true
status:
allOf:
- $ref: '#/components/schemas/AppStatus'
description: Status of the app connection.
readOnly: true
description: |-
Abstract base model for installed apps.

Represent an app installed to the organization.
This is an actual instance, with its own configuration and credentials.
AppCapability:
type: object
required:
Expand Down Expand Up @@ -12288,6 +12217,20 @@ components:
$ref: '#/components/schemas/Feature'
- $ref: '#/components/schemas/FeaturePaginatedResponse'
description: List features result
MarketplaceInstallResponse:
type: object
required:
- app
- defaultForCapabilityTypes
properties:
app:
$ref: '#/components/schemas/App'
defaultForCapabilityTypes:
type: array
items:
$ref: '#/components/schemas/AppCapabilityType'
description: Default for capabilities
description: Marketplace install response.
MarketplaceListing:
type: object
required:
Expand Down
16 changes: 15 additions & 1 deletion api/openapi.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3333,7 +3333,7 @@ paths:
content:
application/json:
schema:
$ref: '#/components/schemas/AppBase'
$ref: '#/components/schemas/MarketplaceInstallResponse'
'400':
description: The server cannot or will not process the request due to something that is perceived to be a client error (e.g., malformed request syntax, invalid request message framing, or deceptive request routing).
content:
Expand Down Expand Up @@ -11990,6 +11990,20 @@ components:
$ref: '#/components/schemas/Feature'
- $ref: '#/components/schemas/FeaturePaginatedResponse'
description: List features result
MarketplaceInstallResponse:
type: object
required:
- app
- defaultForCapabilityTypes
properties:
app:
$ref: '#/components/schemas/App'
defaultForCapabilityTypes:
type: array
items:
$ref: '#/components/schemas/AppCapabilityType'
description: Default for capabilities
description: Marketplace install response.
MarketplaceListing:
type: object
required:
Expand Down
17 changes: 16 additions & 1 deletion api/spec/src/app/marketplace.tsp
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,22 @@ interface Marketplace {
@operationId("marketplaceAppAPIKeyInstall")
@summary("Install app via API key")
@extension("x-internal", true)
installWithAPIKey(...MarketplaceApiKeyInstallRequest): AppBase | CommonErrors;
installWithAPIKey(
...MarketplaceApiKeyInstallRequest,
): MarketplaceInstallResponse | CommonErrors;
}

/**
* Marketplace install response.
*/
@friendlyName("MarketplaceInstallResponse")
model MarketplaceInstallResponse {
app: App;

/**
* Default for capabilities
*/
defaultForCapabilityTypes: CapabilityType[];
}

/**
Expand Down
Loading

0 comments on commit 6c2ddc9

Please sign in to comment.