Skip to content

Commit 1d1f773

Browse files
Bill LeoutsakosBill Leoutsakos
authored andcommitted
chore(oci): minimize shared integration churn
1 parent 05c4a4e commit 1d1f773

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
@@ -9394,7 +9394,7 @@ export function NewRelicIcon(props: SVGProps<SVGSVGElement>) {
93949394
)
93959395
}
93969396

9397-
export function OracleIcon(props: SVGProps<SVGSVGElement>) {
9397+
export function NetSuiteIcon(props: SVGProps<SVGSVGElement>) {
93989398
return (
93999399
<svg {...props} viewBox='0 0 93.9 59.4' xmlns='http://www.w3.org/2000/svg'>
94009400
<path
@@ -9405,7 +9405,7 @@ export function OracleIcon(props: SVGProps<SVGSVGElement>) {
94059405
)
94069406
}
94079407

9408-
export const NetSuiteIcon = OracleIcon
9408+
export const OracleIcon = NetSuiteIcon
94099409

94109410
export function WizaIcon(props: SVGProps<SVGSVGElement>) {
94119411
return (

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9386,7 +9386,7 @@
93869386
"writeOnly": true,
93879387
"type": "string",
93889388
"minLength": 1,
9389-
"maxLength": 65536
9389+
"maxLength": 8192
93909390
},
93919391
"username": {
93929392
"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
@@ -9394,7 +9394,7 @@ export function NewRelicIcon(props: SVGProps<SVGSVGElement>) {
93949394
)
93959395
}
93969396

9397-
export function OracleIcon(props: SVGProps<SVGSVGElement>) {
9397+
export function NetSuiteIcon(props: SVGProps<SVGSVGElement>) {
93989398
return (
93999399
<svg {...props} viewBox='0 0 93.9 59.4' xmlns='http://www.w3.org/2000/svg'>
94009400
<path
@@ -9405,7 +9405,7 @@ export function OracleIcon(props: SVGProps<SVGSVGElement>) {
94059405
)
94069406
}
94079407

9408-
export const NetSuiteIcon = OracleIcon
9408+
export const OracleIcon = NetSuiteIcon
94099409

94109410
export function WizaIcon(props: SVGProps<SVGSVGElement>) {
94119411
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
@@ -458,7 +458,7 @@ const v2ServiceAccountCredentialFieldsSchema = z
458458
.string()
459459
.trim()
460460
.min(1)
461-
.max(65_536)
461+
.max(8192)
462462
.optional()
463463
.describe('Write-only PEM private key.')
464464
.meta({ writeOnly: true }),
@@ -717,7 +717,7 @@ const v2ServiceAccountSecretFieldsShape = {
717717
.string()
718718
.trim()
719719
.min(1)
720-
.max(65_536)
720+
.max(8192)
721721
.optional()
722722
.describe('Write-only PEM private key.')
723723
.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)