Skip to content

Release: v1.1.0

Latest
Compare
Choose a tag to compare
@taylorjdawson taylorjdawson released this 13 Nov 00:22
· 4 commits to main since this release
bd8993b

Version: 1.1.0

What's Changed

Oauth

Support for OAuth endpoints has been added:

  • getOauthProviders()
  • createOauthProviders()
  • deleteOauthProviders()

Sessions

Support for Session endpoints has been added:

  • createReadOnlySession()
  • createReadWriteSession()

Non-breaking

  • emailAuth(): Added an optional invalidateExisting parameter to emailAuth for API key invalidation.
  • updateUser(): updateUser now supports updating the userPhoneNumber field.

⚠️ Breaking

  • createApiKeys():
  • createSubOrganization:
    • Now uses RootUserParamsV4, which introduces the following changes:
      • New required oauthProviders field: Must be provided as a list of OAuth provider parameters.
      • New optional userPhoneNumber field: Represents the user's phone number in E.164 format.
      • Updated apiKeys type: Now requires ApiKeyParamsV2 instead of ApiKeyParams.

Migration Guide: createSubOrganization()

let rootUsers: [Components.Schemas.RootUserParamsV4] = [
  .init(
    userName: "user1",
    userEmail: "user1@example.com",
    apiKeys: [
      .init(
        apiKeyName: "turnkey-demo",
        publicKey: apiPublicKey!,
        curveType: .API_KEY_CURVE_P256 // New required field
      )
    ],
    authenticators: [],
    oauthProviders: [] // New required field
  )
]

let output = try await client.createSubOrganization(
  organizationId: organizationId!,
  subOrganizationName: subOrganizationName,
  rootUsers: rootUsers,
  rootQuorumThreshold: rootQuorumThreshold,
  wallet: wallet,
  disableEmailRecovery: disableEmailRecovery,
  disableEmailAuth: disableEmailAuth,
  disableSmsAuth: false, // New optional parameter
  disableOtpEmailAuth: false // New optional parameter
)

Full Changelog: 1.0.0...1.1.0