Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
## [Unreleased]

### Added
- Add Workspaces API support via `nylas.workspaces` — list, find, create, update (PATCH), destroy, plus `autoGroup()` and `manualAssign()` for grouping grants by domain, `default`, `policyId`, and `ruleIds`
- Add Workspaces API support via `nylas.workspaces` — list, find, create, update (PATCH), destroy, plus `autoGroup()` and `manualAssign()` for grouping grants by domain, `invalidAlso`, `default`, `policyId`, and `ruleIds`
- Add Agent Account Lists API support via `nylas.lists` — create lists with `name`, optional `description`, and immutable `type`, plus list, find, update, destroy, `listItems()`, `addItems()`, and `removeItems()` for managing `/v3/lists`
- Add Manage Domains API support via `nylas.domains` — list, find, create, update, destroy, plus `info()` and `verify()` for domain verification (`/v3/admin/domains`). Includes `ServiceAccountSigner` support for Nylas Service Account request signing, bearer-auth suppression, and canonical signed wire bodies.

Expand All @@ -18,6 +18,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
- Correct `Rules` list (`GET /v3/rules`) to normalize its nested `{ data: { items, nextCursor } }` envelope back to the flat `{ data, nextCursor }` shape the list machinery expects
- Correct `Applications` `ApplicationDetails` field `redirectUris` → `callbackUris` (V3 wire contract), widen `region`/`environment` to `string`, add hosted-auth/IdP public fields, and add `applications.update()` (PATCH)
- Correct `Applications` `applications.update()` to accept write-only `additionalSettings` (forwarded in the request body, stripped from the response)
- Correct `Applications` `applications.update()` to accept `callbackUris` with callback URI IDs for preserving existing callback URIs
- Correct `RedirectUris` `update()` to use PATCH (was PUT), fix `destroy()` return type, make `platform` optional with a typed `RedirectUriPlatform` enum, and surface `deletedAt` on `RedirectUri`

## [8.2.0] - 2026-06-11
Expand Down
35 changes: 32 additions & 3 deletions src/models/applicationDetails.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,8 @@
import { RedirectUri } from './redirectUri.js';
import {
RedirectUri,
RedirectUriPlatform,
RedirectUriSettings,
} from './redirectUri.js';

/**
* Interface for a Nylas application details object
Expand Down Expand Up @@ -181,12 +185,33 @@ export interface AdditionalSettings {
*/
export type UpdateBranding = Partial<Branding>;

/**
* Callback URI shape accepted by application updates.
*/
export interface UpdateApplicationRedirectUriRequest {
/**
* Existing callback URI ID. Include this when preserving or updating an existing URI.
*/
id?: string;
/**
* Redirect URL.
*/
url: string;
/**
* Platform identifier. One of `web`, `js`, `ios`, `android`, `desktop`.
* Defaults to `web` when omitted.
*/
platform?: RedirectUriPlatform;
/**
* Optional settings for the redirect URI.
*/
settings?: RedirectUriSettings;
}

/**
* Interface representing a request to update application details.
*
* All fields are optional; each supplied nested object is a full replace, not a deep merge.
* Note: `callbackUris`/`redirectUris` are ignored by this endpoint — manage callback URIs
* via the dedicated redirect-uris endpoints.
*/
export interface UpdateApplicationRequest {
/**
Expand All @@ -201,6 +226,10 @@ export interface UpdateApplicationRequest {
* Identity provider (IdP) settings for the application.
*/
idpSettings?: IdpSettings;
/**
* List of callback URIs for the application.
*/
callbackUris?: UpdateApplicationRedirectUriRequest[];
/**
* White-label domain for the application.
*/
Expand Down
3 changes: 1 addition & 2 deletions src/resources/applications.ts
Original file line number Diff line number Diff line change
Expand Up @@ -51,8 +51,7 @@ export class Applications extends Resource {
/**
* Update application details.
*
* Each supplied nested object is a full replace, not a deep merge. Callback URIs cannot
* be updated here — manage them via {@link redirectUris}.
* Each supplied nested object is a full replace, not a deep merge.
* @returns The updated application details
*/
public update({
Expand Down
14 changes: 14 additions & 0 deletions tests/resources/applications.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,13 @@ describe('Applications', () => {
origins: 'https://example.com',
issuers: 'https://issuer.example.com',
},
callbackUris: [
{
id: '0556d035-6cb6-4262-a035-6b77e11cf8fc',
url: 'https://example.com/callback',
platform: 'web',
},
],
domain: 'auth.example.com',
},
overrides: {
Expand All @@ -91,6 +98,13 @@ describe('Applications', () => {
origins: 'https://example.com',
issuers: 'https://issuer.example.com',
},
callbackUris: [
{
id: '0556d035-6cb6-4262-a035-6b77e11cf8fc',
url: 'https://example.com/callback',
platform: 'web',
},
],
domain: 'auth.example.com',
},
overrides: {
Expand Down
Loading