You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: api/spec/packages/aip-client-javascript/src/models/schemas.ts
+76-24Lines changed: 76 additions & 24 deletions
Original file line number
Diff line number
Diff line change
@@ -728,16 +728,30 @@ export const appStatus = z
728
728
.enum(['ready','unauthorized'])
729
729
.describe('Connection status of an installed app.')
730
730
731
-
exportconstappOAuth2InstallResponse=z
731
+
exportconstinstallAppStripeWithApiKey=z
732
732
.object({
733
-
url: z
734
-
.string()
735
-
.describe('The URL to start the OAuth2 authorization code grant flow.'),
733
+
type: z.literal('stripe').describe('Type of the app.'),
734
+
name: z.string().describe('Name of the app.'),
735
+
createBillingProfile: z.boolean().describe('Description of the app.'),
736
+
apiKey: z.string().describe('API key for the app.'),
736
737
})
738
+
.describe('Model for installing an app from the catalog with an API key.')
737
739
738
-
.describe(
739
-
'Response from the billing app installation endpoint to initiate the OAuth2 authorization flow. This response contains the authorization URL where the user should be redirected to grant permissions to the application. The URL includes all necessary OAuth2 parameters such as client_id, redirect_uri, scope, and state.',
740
-
)
740
+
exportconstinstallAppSandbox=z
741
+
.object({
742
+
type: z.literal('sandbox').describe('Type of the app.'),
743
+
name: z.string().describe('Name of the app.'),
744
+
createBillingProfile: z.boolean().describe('Description of the app.'),
745
+
})
746
+
.describe('Base model for installing an app from the catalog.')
747
+
748
+
exportconstinstallAppExternalInvoicing=z
749
+
.object({
750
+
type: z.literal('external_invoicing').describe('Type of the app.'),
751
+
name: z.string().describe('Name of the app.'),
752
+
createBillingProfile: z.boolean().describe('Description of the app.'),
753
+
})
754
+
.describe('Base model for installing an app from the catalog.')
741
755
742
756
exportconsttaxIdentificationCode=z
743
757
.string()
@@ -2805,6 +2819,14 @@ export const appCapability = z
2805
2819
})
2806
2820
.describe('App capability describes a function that an App can perform.')
2807
2821
2822
+
exportconstinstallAppRequest=z
2823
+
.discriminatedUnion('type',[
2824
+
installAppStripeWithApiKey,
2825
+
installAppSandbox,
2826
+
installAppExternalInvoicing,
2827
+
])
2828
+
.describe('Request to install an app from the catalog.')
2829
+
2808
2830
exportconstpartyTaxIdentity=z
2809
2831
.object({
2810
2832
code: taxIdentificationCode.optional(),
@@ -5037,6 +5059,13 @@ export const appPagePaginatedResponse = z
@@ -7273,16 +7299,30 @@ export const appStatusWire = z
7273
7299
.enum(['ready','unauthorized'])
7274
7300
.describe('Connection status of an installed app.')
7275
7301
7276
-
exportconstappOAuth2InstallResponseWire=z
7302
+
exportconstinstallAppStripeWithApiKeyWire=z
7277
7303
.strictObject({
7278
-
url: z
7279
-
.string()
7280
-
.describe('The URL to start the OAuth2 authorization code grant flow.'),
7304
+
type: z.literal('stripe').describe('Type of the app.'),
7305
+
name: z.string().describe('Name of the app.'),
7306
+
create_billing_profile: z.boolean().describe('Description of the app.'),
7307
+
api_key: z.string().describe('API key for the app.'),
7281
7308
})
7309
+
.describe('Model for installing an app from the catalog with an API key.')
7282
7310
7283
-
.describe(
7284
-
'Response from the billing app installation endpoint to initiate the OAuth2 authorization flow. This response contains the authorization URL where the user should be redirected to grant permissions to the application. The URL includes all necessary OAuth2 parameters such as client_id, redirect_uri, scope, and state.',
7285
-
)
7311
+
exportconstinstallAppSandboxWire=z
7312
+
.strictObject({
7313
+
type: z.literal('sandbox').describe('Type of the app.'),
7314
+
name: z.string().describe('Name of the app.'),
7315
+
create_billing_profile: z.boolean().describe('Description of the app.'),
7316
+
})
7317
+
.describe('Base model for installing an app from the catalog.')
7318
+
7319
+
exportconstinstallAppExternalInvoicingWire=z
7320
+
.strictObject({
7321
+
type: z.literal('external_invoicing').describe('Type of the app.'),
7322
+
name: z.string().describe('Name of the app.'),
7323
+
create_billing_profile: z.boolean().describe('Description of the app.'),
7324
+
})
7325
+
.describe('Base model for installing an app from the catalog.')
7286
7326
7287
7327
exportconsttaxIdentificationCodeWire=z
7288
7328
.string()
@@ -9352,6 +9392,14 @@ export const appCapabilityWire = z
9352
9392
})
9353
9393
.describe('App capability describes a function that an App can perform.')
9354
9394
9395
+
exportconstinstallAppRequestWire=z
9396
+
.discriminatedUnion('type',[
9397
+
installAppStripeWithApiKeyWire,
9398
+
installAppSandboxWire,
9399
+
installAppExternalInvoicingWire,
9400
+
])
9401
+
.describe('Request to install an app from the catalog.')
9402
+
9355
9403
exportconstpartyTaxIdentityWire=z
9356
9404
.strictObject({
9357
9405
code: taxIdentificationCodeWire.optional(),
@@ -11602,6 +11650,13 @@ export const appPagePaginatedResponseWire = z
0 commit comments