Skip to content

Commit 4716ac5

Browse files
Bill LeoutsakosBill Leoutsakos
authored andcommitted
chore(oci): minimize shared integration churn
1 parent b34b81d commit 4716ac5

7 files changed

Lines changed: 25 additions & 10 deletions

File tree

‎apps/docs/components/icons.tsx‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9322,7 +9322,7 @@ export function NewRelicIcon(props: SVGProps<SVGSVGElement>) {
93229322
)
93239323
}
93249324

9325-
export function OracleIcon(props: SVGProps<SVGSVGElement>) {
9325+
export function NetSuiteIcon(props: SVGProps<SVGSVGElement>) {
93269326
return (
93279327
<svg {...props} viewBox='0 0 93.9 59.4' xmlns='http://www.w3.org/2000/svg'>
93289328
<path
@@ -9333,7 +9333,7 @@ export function OracleIcon(props: SVGProps<SVGSVGElement>) {
93339333
)
93349334
}
93359335

9336-
export const NetSuiteIcon = OracleIcon
9336+
export const OracleIcon = NetSuiteIcon
93379337

93389338
export function WizaIcon(props: SVGProps<SVGSVGElement>) {
93399339
return (

‎apps/docs/openapi-v2-resources.json‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8203,7 +8203,7 @@
82038203
"writeOnly": true,
82048204
"type": "string",
82058205
"minLength": 1,
8206-
"maxLength": 65536
8206+
"maxLength": 8192
82078207
},
82088208
"username": {
82098209
"description": "Provider run-as username.",

‎apps/sim/app/workspace/[workspaceId]/integrations/components/connect-service-account-modal/connect-service-account-modal.tsx‎

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,7 @@ export type ServiceAccountProviderId =
4949
| TokenServiceAccountProviderId
5050
| ClientCredentialAccountProviderId
5151

52+
/** Sim setup guides for each provider, docked bottom-left of each modal. */
5253
const GOOGLE_SERVICE_ACCOUNT_DOCS_URL = 'https://docs.sim.ai/integrations/google-service-account'
5354
const ATLASSIAN_SERVICE_ACCOUNT_DOCS_URL =
5455
'https://docs.sim.ai/integrations/atlassian-service-account'
@@ -128,6 +129,20 @@ interface ConnectServiceAccountModalProps {
128129
onCreated?: (credentialId: string) => void
129130
}
130131

132+
/**
133+
* Connect-service-account modal mounted from the per-integration detail page.
134+
* Self-contained: takes the resolved SA provider + service metadata from the
135+
* caller and submits via `useCreateWorkspaceCredential`. Branches the body
136+
* based on `serviceAccountProviderId`:
137+
*
138+
* - `google-service-account`: JSON-paste + drag/drop. Validated client-side
139+
* against {@link serviceAccountJsonSchema} before submitting.
140+
* - `atlassian-service-account`: API token + site domain. Validated by the
141+
* server against the Atlassian API; user-facing errors are mapped from the
142+
* route's `error.code`.
143+
* - `oci-api-key-service-account`: API signing-key fields. Validated locally
144+
* and with a bounded OCI request before encrypted storage.
145+
*/
131146
export function ConnectServiceAccountModal({
132147
open,
133148
onOpenChange,

‎apps/sim/components/icons.tsx‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9322,7 +9322,7 @@ export function NewRelicIcon(props: SVGProps<SVGSVGElement>) {
93229322
)
93239323
}
93249324

9325-
export function OracleIcon(props: SVGProps<SVGSVGElement>) {
9325+
export function NetSuiteIcon(props: SVGProps<SVGSVGElement>) {
93269326
return (
93279327
<svg {...props} viewBox='0 0 93.9 59.4' xmlns='http://www.w3.org/2000/svg'>
93289328
<path
@@ -9333,7 +9333,7 @@ export function OracleIcon(props: SVGProps<SVGSVGElement>) {
93339333
)
93349334
}
93359335

9336-
export const NetSuiteIcon = OracleIcon
9336+
export const OracleIcon = NetSuiteIcon
93379337

93389338
export function WizaIcon(props: SVGProps<SVGSVGElement>) {
93399339
return (

‎apps/sim/lib/api/contracts/credentials.ts‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -158,7 +158,7 @@ export const createCredentialBodySchema = z
158158
*/
159159
authMethod: z.string().trim().min(1).max(64).optional(),
160160
/** PEM private key for certificate/JWT-based grants (for example Salesforce or NetSuite). */
161-
privateKey: z.string().trim().min(1).max(65_536).optional(),
161+
privateKey: z.string().trim().min(1).max(8192).optional(),
162162
/** Run-as username for key-based grants (Salesforce JWT `sub`). */
163163
username: z.string().trim().min(1).max(255).optional(),
164164
tenancyOcid: z.string().trim().min(1).max(255).optional(),
@@ -245,7 +245,7 @@ export const updateCredentialByIdBodySchema = z
245245
orgId: z.string().trim().min(1).max(255).optional(),
246246
dataCenter: z.string().trim().min(1).max(32).optional(),
247247
authMethod: z.string().trim().min(1).max(64).optional(),
248-
privateKey: z.string().trim().min(1).max(65_536).optional(),
248+
privateKey: z.string().trim().min(1).max(8192).optional(),
249249
username: z.string().trim().min(1).max(255).optional(),
250250
tenancyOcid: z.string().trim().min(1).max(255).optional(),
251251
userOcid: z.string().trim().min(1).max(255).optional(),

‎apps/sim/lib/api/contracts/v2/credentials.ts‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -353,7 +353,7 @@ const v2ServiceAccountCredentialFieldsSchema = z
353353
.string()
354354
.trim()
355355
.min(1)
356-
.max(65_536)
356+
.max(8192)
357357
.optional()
358358
.describe('Write-only PEM private key.')
359359
.meta({ writeOnly: true }),
@@ -602,7 +602,7 @@ const v2ServiceAccountSecretFieldsShape = {
602602
.string()
603603
.trim()
604604
.min(1)
605-
.max(65_536)
605+
.max(8192)
606606
.optional()
607607
.describe('Write-only PEM private key.')
608608
.meta({ writeOnly: true }),

‎apps/sim/lib/credentials/service-account-fields.ts‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ export type ServiceAccountFieldId =
3535
* providers from descriptor fields, bespoke providers inline.) Token-paste
3636
* providers contribute their entries from
3737
* `TOKEN_SERVICE_ACCOUNT_REQUIRED_FIELDS`, client-credential providers from
38-
* `CLIENT_CREDENTIAL_ACCOUNT_REQUIRED_FIELDS`; the three bespoke providers are
38+
* `CLIENT_CREDENTIAL_ACCOUNT_REQUIRED_FIELDS`; the four bespoke providers are
3939
* declared here.
4040
*/
4141
export const SERVICE_ACCOUNT_REQUIRED_FIELDS: Record<string, readonly ServiceAccountFieldId[]> = {

0 commit comments

Comments
 (0)