nylas 8.1.1 → 8.2.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (57) hide show
  1. package/lib/cjs/apiClient.js +12 -5
  2. package/lib/cjs/models/domains.js +2 -0
  3. package/lib/cjs/models/index.js +3 -0
  4. package/lib/cjs/models/messages.js +1 -0
  5. package/lib/cjs/models/serviceAccount.js +99 -0
  6. package/lib/cjs/models/workspaces.js +2 -0
  7. package/lib/cjs/nylas.js +4 -0
  8. package/lib/cjs/resources/applications.js +13 -0
  9. package/lib/cjs/resources/attachments.js +26 -4
  10. package/lib/cjs/resources/domains.js +232 -0
  11. package/lib/cjs/resources/messages.js +2 -1
  12. package/lib/cjs/resources/redirectUris.js +2 -2
  13. package/lib/cjs/resources/resource.js +18 -4
  14. package/lib/cjs/resources/threads.js +2 -1
  15. package/lib/cjs/resources/workspaces.js +95 -0
  16. package/lib/cjs/version.js +1 -1
  17. package/lib/esm/apiClient.js +11 -4
  18. package/lib/esm/models/domains.js +1 -0
  19. package/lib/esm/models/index.js +3 -0
  20. package/lib/esm/models/messages.js +1 -0
  21. package/lib/esm/models/serviceAccount.js +93 -0
  22. package/lib/esm/models/workspaces.js +1 -0
  23. package/lib/esm/nylas.js +4 -0
  24. package/lib/esm/resources/applications.js +13 -0
  25. package/lib/esm/resources/attachments.js +26 -4
  26. package/lib/esm/resources/domains.js +228 -0
  27. package/lib/esm/resources/messages.js +2 -1
  28. package/lib/esm/resources/redirectUris.js +2 -2
  29. package/lib/esm/resources/resource.js +18 -4
  30. package/lib/esm/resources/threads.js +2 -1
  31. package/lib/esm/resources/workspaces.js +91 -0
  32. package/lib/esm/version.js +1 -1
  33. package/lib/types/apiClient.d.ts +1 -0
  34. package/lib/types/config.d.ts +6 -0
  35. package/lib/types/models/agentLists.d.ts +5 -0
  36. package/lib/types/models/applicationDetails.d.ts +149 -11
  37. package/lib/types/models/domains.d.ts +177 -0
  38. package/lib/types/models/events.d.ts +5 -0
  39. package/lib/types/models/index.d.ts +3 -0
  40. package/lib/types/models/messages.d.ts +10 -0
  41. package/lib/types/models/policies.d.ts +6 -2
  42. package/lib/types/models/redirectUri.d.ts +15 -4
  43. package/lib/types/models/rules.d.ts +7 -1
  44. package/lib/types/models/serviceAccount.d.ts +46 -0
  45. package/lib/types/models/threads.d.ts +7 -0
  46. package/lib/types/models/workspaces.d.ts +191 -0
  47. package/lib/types/nylas.d.ts +10 -0
  48. package/lib/types/resources/applications.d.ts +14 -1
  49. package/lib/types/resources/attachments.d.ts +17 -4
  50. package/lib/types/resources/domains.d.ts +137 -0
  51. package/lib/types/resources/messages.d.ts +4 -2
  52. package/lib/types/resources/redirectUris.d.ts +2 -2
  53. package/lib/types/resources/resource.d.ts +2 -0
  54. package/lib/types/resources/threads.d.ts +3 -2
  55. package/lib/types/resources/workspaces.d.ts +98 -0
  56. package/lib/types/version.d.ts +1 -1
  57. package/package.json +1 -1
@@ -31,13 +31,14 @@ export class Threads extends Resource {
31
31
  * Return a Thread
32
32
  * @return The thread
33
33
  */
34
- find({ identifier, threadId, overrides, }) {
34
+ find({ identifier, threadId, overrides, queryParams, }) {
35
35
  return super._find({
36
36
  path: makePathParams('/v3/grants/{identifier}/threads/{threadId}', {
37
37
  identifier,
38
38
  threadId,
39
39
  }),
40
40
  overrides,
41
+ queryParams,
41
42
  });
42
43
  }
43
44
  /**
@@ -0,0 +1,91 @@
1
+ import { makePathParams } from '../utils.js';
2
+ import { Resource } from './resource.js';
3
+ /**
4
+ * Nylas Workspaces API
5
+ *
6
+ * Workspaces group grants in a Nylas application by email domain. Grants can be
7
+ * auto-grouped by matching email domain or manually assigned and removed.
8
+ */
9
+ export class Workspaces extends Resource {
10
+ /**
11
+ * Return all workspaces for the application.
12
+ *
13
+ * The list endpoint is not paginated and returns every workspace as a flat array.
14
+ * @return The list of workspaces.
15
+ */
16
+ list({ queryParams, overrides, } = {}) {
17
+ return super._list({
18
+ queryParams,
19
+ path: makePathParams('/v3/workspaces', {}),
20
+ overrides,
21
+ });
22
+ }
23
+ /**
24
+ * Return a workspace.
25
+ * @return The workspace.
26
+ */
27
+ find({ workspaceId, overrides, }) {
28
+ return super._find({
29
+ path: makePathParams('/v3/workspaces/{workspaceId}', { workspaceId }),
30
+ overrides,
31
+ });
32
+ }
33
+ /**
34
+ * Create a workspace.
35
+ * @return The created workspace.
36
+ */
37
+ create({ requestBody, overrides, }) {
38
+ return super._create({
39
+ path: makePathParams('/v3/workspaces', {}),
40
+ requestBody,
41
+ overrides,
42
+ });
43
+ }
44
+ /**
45
+ * Update a workspace.
46
+ *
47
+ * Issued as PATCH; the workspace must be addressed by its UUID.
48
+ * @return The updated workspace.
49
+ */
50
+ update({ workspaceId, requestBody, overrides, }) {
51
+ return super._updatePatch({
52
+ path: makePathParams('/v3/workspaces/{workspaceId}', { workspaceId }),
53
+ requestBody,
54
+ overrides,
55
+ });
56
+ }
57
+ /**
58
+ * Delete a workspace.
59
+ * @return The deletion response.
60
+ */
61
+ destroy({ workspaceId, overrides, }) {
62
+ return super._destroy({
63
+ path: makePathParams('/v3/workspaces/{workspaceId}', { workspaceId }),
64
+ overrides,
65
+ });
66
+ }
67
+ /**
68
+ * Start a background job that auto-groups grants into workspaces by email domain.
69
+ * @return The auto-group job response.
70
+ */
71
+ autoGroup({ requestBody, overrides, } = {}) {
72
+ return super._create({
73
+ path: makePathParams('/v3/workspaces/auto-group', {}),
74
+ requestBody: requestBody ?? {},
75
+ overrides,
76
+ });
77
+ }
78
+ /**
79
+ * Manually assign grants to and/or remove grants from a workspace.
80
+ * @return The assignment response.
81
+ */
82
+ manualAssign({ workspaceId, requestBody, overrides, }) {
83
+ return super._create({
84
+ path: makePathParams('/v3/workspaces/{workspaceId}/manual-assign', {
85
+ workspaceId,
86
+ }),
87
+ requestBody,
88
+ overrides,
89
+ });
90
+ }
91
+ }
@@ -1,2 +1,2 @@
1
1
  // This file is generated by scripts/exportVersion.js
2
- export const SDK_VERSION = '8.1.1';
2
+ export const SDK_VERSION = '8.2.0';
@@ -24,6 +24,7 @@ export interface RequestOptionsParams {
24
24
  headers?: Record<string, string>;
25
25
  queryParams?: Record<string, any>;
26
26
  body?: any;
27
+ serializedBody?: string | Buffer;
27
28
  form?: FormData;
28
29
  overrides?: OverridableNylasConfig;
29
30
  }
@@ -17,6 +17,12 @@ export type NylasConfig = {
17
17
  export type OverridableNylasConfig = {
18
18
  apiKey?: string;
19
19
  apiUri?: string;
20
+ /**
21
+ * Suppress the default bearer Authorization header for endpoints that use a
22
+ * different authentication mechanism.
23
+ * @ignore Not for public use
24
+ */
25
+ skipAuth?: boolean;
20
26
  /**
21
27
  * @deprecated Providing timeout in milliseconds is deprecated and will be removed in the next major release. Please use seconds instead.
22
28
  */
@@ -67,6 +67,9 @@ export interface AgentListItem {
67
67
  }
68
68
  /**
69
69
  * Interface representing a request to create a Nylas Agent Account list.
70
+ *
71
+ * The server derives `id`, `itemsCount`, `applicationId`, `organizationId`,
72
+ * `createdAt`, and `updatedAt`; they are intentionally not accepted here.
70
73
  */
71
74
  export interface CreateAgentListRequest {
72
75
  /**
@@ -84,6 +87,8 @@ export interface CreateAgentListRequest {
84
87
  }
85
88
  /**
86
89
  * Interface representing a request to update a Nylas Agent Account list.
90
+ *
91
+ * List `type` is immutable after creation.
87
92
  */
88
93
  export interface UpdateAgentListRequest {
89
94
  /**
@@ -1,4 +1,4 @@
1
- import { RedirectUri } from './redirectUri.js';
1
+ import { RedirectUri, RedirectUriPlatform, RedirectUriSettings } from './redirectUri.js';
2
2
  /**
3
3
  * Interface for a Nylas application details object
4
4
  */
@@ -12,13 +12,17 @@ export interface ApplicationDetails {
12
12
  */
13
13
  organizationId: string;
14
14
  /**
15
- * Region identifier
15
+ * Region identifier (e.g. `us`, `eu`). Free-form string, not a closed enum.
16
16
  */
17
- region: 'us' | 'eu';
17
+ region: string;
18
18
  /**
19
- * Environment identifier
19
+ * Environment identifier (e.g. `sandbox`). Free-form string, not a closed enum.
20
20
  */
21
- environment: 'production' | 'staging';
21
+ environment: string;
22
+ /**
23
+ * White-label domain. Omitted when empty.
24
+ */
25
+ domain?: string;
22
26
  /**
23
27
  * Branding details for the application
24
28
  */
@@ -28,14 +32,33 @@ export interface ApplicationDetails {
28
32
  */
29
33
  hostedAuthentication?: HostedAuthentication;
30
34
  /**
31
- * List of redirect URIs
35
+ * Identity provider (IdP) settings for the application
32
36
  */
33
- redirectUris?: RedirectUri[];
37
+ idpSettings?: IdpSettings;
38
+ /**
39
+ * List of callback (redirect) URIs.
40
+ *
41
+ * Read-only on the application object; manage entries via the dedicated
42
+ * redirect-uris endpoints (`Nylas.applications.redirectUris`).
43
+ */
44
+ callbackUris?: RedirectUri[];
45
+ /**
46
+ * Unix timestamp (seconds) when the application was created. Omitted when empty.
47
+ */
48
+ createdAt?: number;
49
+ /**
50
+ * Unix timestamp (seconds) when the application was last updated. Omitted when empty.
51
+ */
52
+ updatedAt?: number;
53
+ /**
54
+ * Whether the application is blocked. Omitted when empty.
55
+ */
56
+ blocked?: boolean;
34
57
  }
35
58
  /**
36
59
  * Interface for branding details for the application
37
60
  */
38
- interface Branding {
61
+ export interface Branding {
39
62
  /**
40
63
  * Name of the application
41
64
  */
@@ -49,14 +72,14 @@ interface Branding {
49
72
  */
50
73
  websiteUrl?: string;
51
74
  /**
52
- * Description of the appli∏cati∏on
75
+ * Description of the application
53
76
  */
54
77
  description?: string;
55
78
  }
56
79
  /**
57
80
  * Interface for hosted authentication branding details
58
81
  */
59
- interface HostedAuthentication {
82
+ export interface HostedAuthentication {
60
83
  /**
61
84
  * URL of the background image
62
85
  */
@@ -89,5 +112,120 @@ interface HostedAuthentication {
89
112
  * CSS spacing attribute in px
90
113
  */
91
114
  spacing?: number;
115
+ /**
116
+ * URL of the terms of service
117
+ */
118
+ termsOfServiceUrl?: string;
119
+ /**
120
+ * URL of the privacy policy
121
+ */
122
+ privacyPolicyUrl?: string;
123
+ }
124
+ /**
125
+ * Interface for identity provider (IdP) settings for the application
126
+ */
127
+ export interface IdpSettings {
128
+ /**
129
+ * Comma-separated list of allowed origins. Each must be an absolute HTTPS URL
130
+ * (HTTP allowed for `localhost`/`127.0.0.1`) with no path, query, fragment, or userinfo.
131
+ */
132
+ origins?: string;
133
+ /**
134
+ * Comma-separated list of allowed issuers.
135
+ */
136
+ issuers?: string;
137
+ }
138
+ /**
139
+ * Interface for additional settings for the application.
140
+ *
141
+ * Write-only on update: these values can be set via `PATCH /v3/applications` but are
142
+ * stripped from every response, so they are not exposed on {@link ApplicationDetails}.
143
+ */
144
+ export interface AdditionalSettings {
145
+ /**
146
+ * Login URL.
147
+ */
148
+ loginUrl?: string;
149
+ /**
150
+ * Logout URL.
151
+ */
152
+ logoutUrl?: string;
153
+ /**
154
+ * Absolute refresh-token expiration, in seconds.
155
+ */
156
+ refreshTokenExpirationAbsolute?: number;
157
+ /**
158
+ * Idle refresh-token expiration, in seconds.
159
+ */
160
+ refreshTokenExpirationIdle?: number;
161
+ /**
162
+ * Whether to rotate the refresh token on use.
163
+ */
164
+ rotateRefreshToken?: boolean;
165
+ /**
166
+ * Whether to allow query parameters in redirect URIs.
167
+ */
168
+ allowQueryParamInRedirectUri?: boolean;
169
+ }
170
+ /**
171
+ * Branding details accepted on the application update path.
172
+ *
173
+ * Unlike the response {@link Branding} type, `name` is optional here — the source does
174
+ * not require `branding.name` on `PATCH /v3/applications`.
175
+ */
176
+ export type UpdateBranding = Partial<Branding>;
177
+ /**
178
+ * Callback URI shape accepted by application updates.
179
+ */
180
+ export interface UpdateApplicationRedirectUriRequest {
181
+ /**
182
+ * Existing callback URI ID. Include this when preserving or updating an existing URI.
183
+ */
184
+ id?: string;
185
+ /**
186
+ * Redirect URL.
187
+ */
188
+ url: string;
189
+ /**
190
+ * Platform identifier. One of `web`, `js`, `ios`, `android`, `desktop`.
191
+ * Defaults to `web` when omitted.
192
+ */
193
+ platform?: RedirectUriPlatform;
194
+ /**
195
+ * Optional settings for the redirect URI.
196
+ */
197
+ settings?: RedirectUriSettings;
198
+ }
199
+ /**
200
+ * Interface representing a request to update application details.
201
+ *
202
+ * All fields are optional; each supplied nested object is a full replace, not a deep merge.
203
+ */
204
+ export interface UpdateApplicationRequest {
205
+ /**
206
+ * Branding details for the application.
207
+ */
208
+ branding?: UpdateBranding;
209
+ /**
210
+ * Hosted authentication branding details.
211
+ */
212
+ hostedAuthentication?: HostedAuthentication;
213
+ /**
214
+ * Identity provider (IdP) settings for the application.
215
+ */
216
+ idpSettings?: IdpSettings;
217
+ /**
218
+ * List of callback URIs for the application.
219
+ */
220
+ callbackUris?: UpdateApplicationRedirectUriRequest[];
221
+ /**
222
+ * White-label domain for the application.
223
+ */
224
+ domain?: string;
225
+ /**
226
+ * Additional settings for the application.
227
+ *
228
+ * Write-only: persisted on update but stripped from the response.
229
+ */
230
+ additionalSettings?: AdditionalSettings;
92
231
  }
93
- export {};
@@ -0,0 +1,177 @@
1
+ import { ListQueryParams } from './listQueryParams.js';
2
+ /**
3
+ * Type for the DNS verification types supported by the Manage Domains API.
4
+ */
5
+ export type DomainVerificationType = 'ownership' | 'mx' | 'spf' | 'dkim' | 'feedback' | 'dmarc' | 'arc';
6
+ /**
7
+ * Type for the DNS verification types accepted by Manage Domains info and
8
+ * verify request bodies.
9
+ */
10
+ export type DomainVerificationRequestType = 'ownership' | 'mx' | 'spf' | 'dkim' | 'feedback';
11
+ /**
12
+ * Type for the status of a domain DNS verification attempt.
13
+ */
14
+ export type DomainVerificationStatus = 'pending' | 'done' | 'failed';
15
+ /**
16
+ * Interface representing a registered email domain.
17
+ *
18
+ * Every field is optional: the API only emits fields it has populated.
19
+ */
20
+ export interface Domain {
21
+ /**
22
+ * Server-generated domain ID.
23
+ */
24
+ id?: string;
25
+ /**
26
+ * Human-readable label.
27
+ */
28
+ name?: string;
29
+ /**
30
+ * The registered domain (for example, mail.example.com). Stored lowercased.
31
+ */
32
+ domainAddress?: string;
33
+ /**
34
+ * The ID of the organization that owns the domain. Derived from auth, never client-set.
35
+ */
36
+ organizationId?: string;
37
+ /**
38
+ * Whether the domain is a subdomain of a Nylas branded domain. Server-determined at create.
39
+ */
40
+ branded?: boolean;
41
+ /**
42
+ * Cluster region. Server-set from config at create.
43
+ */
44
+ region?: string;
45
+ /**
46
+ * Ownership (TXT) verification flag.
47
+ */
48
+ verifiedOwnership?: boolean;
49
+ /**
50
+ * MX verification flag.
51
+ */
52
+ verifiedMx?: boolean;
53
+ /**
54
+ * SPF verification flag.
55
+ */
56
+ verifiedSpf?: boolean;
57
+ /**
58
+ * Feedback MX verification flag.
59
+ */
60
+ verifiedFeedback?: boolean;
61
+ /**
62
+ * DKIM verification flag.
63
+ */
64
+ verifiedDkim?: boolean;
65
+ /**
66
+ * DMARC verification flag.
67
+ */
68
+ verifiedDmarc?: boolean;
69
+ /**
70
+ * ARC verification flag.
71
+ */
72
+ verifiedArc?: boolean;
73
+ /**
74
+ * Unix timestamp when the domain was created.
75
+ */
76
+ createdAt?: number;
77
+ /**
78
+ * Unix timestamp when the domain was last updated.
79
+ */
80
+ updatedAt?: number;
81
+ }
82
+ /**
83
+ * Interface representing a request to create a domain.
84
+ *
85
+ * Other Domain fields are not honored for create: the server sets region,
86
+ * branded, the verified flags, id, and timestamps.
87
+ */
88
+ export interface CreateDomainRequest {
89
+ /**
90
+ * Human-readable label.
91
+ */
92
+ name: string;
93
+ /**
94
+ * The domain to register. Normalized to lowercase. Cannot duplicate an existing
95
+ * domain in the organization.
96
+ */
97
+ domainAddress: string;
98
+ }
99
+ /**
100
+ * Interface representing a request to update a domain.
101
+ *
102
+ * Only `name` is updatable. `domainAddress` cannot be changed after create;
103
+ * delete and recreate the domain to use a different address.
104
+ */
105
+ export interface UpdateDomainRequest {
106
+ /**
107
+ * New human-readable label.
108
+ */
109
+ name?: string;
110
+ }
111
+ /**
112
+ * Interface representing a domain DNS verification attempt, used as the request
113
+ * body for both the Info and Verify endpoints.
114
+ */
115
+ export interface DomainVerificationAttempt {
116
+ /**
117
+ * The DNS verification type to fetch info for or verify.
118
+ */
119
+ type: DomainVerificationRequestType;
120
+ /**
121
+ * Free-form options. For dkim, may carry a key-length hint. Most callers omit this.
122
+ */
123
+ options?: Record<string, any>;
124
+ }
125
+ /**
126
+ * Interface representing the DNS record details for a verification attempt
127
+ * returned in a verification result.
128
+ */
129
+ export interface DomainVerificationAttemptResult {
130
+ /**
131
+ * The verification type that this attempt corresponds to.
132
+ */
133
+ type?: DomainVerificationType;
134
+ /**
135
+ * The DNS record values to configure (for example, host, type, and value).
136
+ */
137
+ options?: Record<string, any>;
138
+ }
139
+ /**
140
+ * Interface representing the result of a domain Info or Verify request.
141
+ *
142
+ * Info and Verify return the same shape. Every field is optional.
143
+ */
144
+ export interface DomainVerificationResult {
145
+ /**
146
+ * The ID of the domain being verified.
147
+ */
148
+ domainId?: string;
149
+ /**
150
+ * The verification attempt, including the DNS record to configure.
151
+ */
152
+ attempt?: DomainVerificationAttemptResult;
153
+ /**
154
+ * The current status for this verification type.
155
+ */
156
+ status?: DomainVerificationStatus;
157
+ /**
158
+ * Unix timestamp when the attempt record was created.
159
+ */
160
+ createdAt?: number;
161
+ /**
162
+ * Unix timestamp when the temporary attempt expires.
163
+ */
164
+ expiresAt?: number;
165
+ /**
166
+ * Optional in-between state.
167
+ */
168
+ details?: Record<string, any>;
169
+ /**
170
+ * Human-readable instruction for configuring the DNS record.
171
+ */
172
+ message?: string;
173
+ }
174
+ /**
175
+ * Interface representing query parameters for listing domains.
176
+ */
177
+ export type ListDomainsQueryParams = ListQueryParams;
@@ -314,6 +314,11 @@ export interface ListEventQueryParams extends ListQueryParams {
314
314
  * Master event id if recurring events.
315
315
  */
316
316
  masterEventId?: string;
317
+ /**
318
+ * Filter events by their iCalendar unique identifier.
319
+ * Useful for finding a specific event across calendaring systems.
320
+ */
321
+ icalUid?: string;
317
322
  /**
318
323
  * When set to false, treats tentative calendar events as busy:false.
319
324
  * Only applicable for Microsoft and EWS calendar providers. Defaults to true.
@@ -7,6 +7,7 @@ export * from './calendars.js';
7
7
  export * from './connectors.js';
8
8
  export * from './contacts.js';
9
9
  export * from './credentials.js';
10
+ export * from './domains.js';
10
11
  export * from './drafts.js';
11
12
  export * from './error.js';
12
13
  export * from './events.js';
@@ -21,6 +22,8 @@ export * from './redirectUri.js';
21
22
  export * from './response.js';
22
23
  export * from './rules.js';
23
24
  export * from './scheduler.js';
25
+ export * from './serviceAccount.js';
24
26
  export * from './smartCompose.js';
25
27
  export * from './threads.js';
26
28
  export * from './webhooks.js';
29
+ export * from './workspaces.js';
@@ -177,6 +177,7 @@ export interface MessageHeaders {
177
177
  */
178
178
  export declare enum MessageFields {
179
179
  STANDARD = "standard",
180
+ INCLUDE_BASIC_HEADERS = "include_basic_headers",
180
181
  INCLUDE_HEADERS = "include_headers",
181
182
  INCLUDE_TRACKING_OPTIONS = "include_tracking_options",
182
183
  RAW_MIME = "raw_mime"
@@ -304,6 +305,15 @@ export interface FindMessageQueryParams {
304
305
  */
305
306
  fields?: MessageFields;
306
307
  }
308
+ /**
309
+ * Interface representing the query parameters for sending a message.
310
+ */
311
+ export interface SendMessageQueryParams {
312
+ /**
313
+ * Allows you to specify to return the sent message with headers included.
314
+ */
315
+ fields?: MessageFields;
316
+ }
307
317
  /**
308
318
  * Interface representing the request to clean a message.
309
319
  */
@@ -24,9 +24,13 @@ export interface PolicyLimits {
24
24
  */
25
25
  limitStorageTotal?: number;
26
26
  /**
27
- * Maximum number of messages each grant can send per day.
27
+ * Maximum number of messages each grant can receive per day. Use -1 for unlimited.
28
28
  */
29
- limitCountDailyMessagePerGrant?: number;
29
+ limitCountDailyMessageReceived?: number;
30
+ /**
31
+ * Maximum number of emails each grant can send per day. Use -1 for unlimited.
32
+ */
33
+ limitCountDailyEmailSent?: number;
30
34
  /**
31
35
  * How long, in days, to retain messages in the inbox.
32
36
  */
@@ -1,3 +1,9 @@
1
+ /**
2
+ * The platform of a Redirect URI.
3
+ *
4
+ * One of `web`, `js`, `ios`, `android`, or `desktop`. Defaults to `web` when omitted.
5
+ */
6
+ export type RedirectUriPlatform = 'web' | 'js' | 'ios' | 'android' | 'desktop';
1
7
  /**
2
8
  * Interface representation of a Redirect URI object
3
9
  */
@@ -11,13 +17,17 @@ export type RedirectUri = {
11
17
  */
12
18
  url: string;
13
19
  /**
14
- * Platform identifier
20
+ * Platform identifier. One of `web`, `js`, `ios`, `android`, `desktop`.
15
21
  */
16
- platform: string;
22
+ platform: RedirectUriPlatform;
17
23
  /**
18
24
  * Configuration settings
19
25
  */
20
26
  settings?: RedirectUriSettings;
27
+ /**
28
+ * Unix timestamp (seconds) when the redirect URI was soft-deleted. Omitted when empty.
29
+ */
30
+ deletedAt?: number;
21
31
  };
22
32
  /**
23
33
  * Configuration settings for a Redirect URI object
@@ -57,9 +67,10 @@ export type CreateRedirectUriRequest = {
57
67
  */
58
68
  url: string;
59
69
  /**
60
- * Platform identifier.
70
+ * Platform identifier. One of `web`, `js`, `ios`, `android`, `desktop`.
71
+ * Defaults to `web` when omitted.
61
72
  */
62
- platform: string;
73
+ platform?: RedirectUriPlatform;
63
74
  /**
64
75
  * Optional settings for the redirect uri.
65
76
  */
@@ -230,6 +230,11 @@ export interface RuleEvaluationAppliedActions {
230
230
  * Whether the inbound message or outbound send was blocked.
231
231
  */
232
232
  blocked?: boolean;
233
+ /**
234
+ * Whether the message or send was blocked because an evaluation error
235
+ * triggered fail-closed handling, rather than a genuine rule match.
236
+ */
237
+ blockedByEvaluationError?: boolean;
233
238
  /**
234
239
  * Whether the message or stored sent copy was moved to spam.
235
240
  */
@@ -269,8 +274,9 @@ export interface RuleEvaluation {
269
274
  grantId: string;
270
275
  /**
271
276
  * The inbound message or stored sent copy associated with this evaluation.
277
+ * Omitted (absent) for smtp_rcpt evaluations and outbound sends with no stored copy.
272
278
  */
273
- messageId?: string | null;
279
+ messageId?: string;
274
280
  /**
275
281
  * Unix timestamp when the evaluation occurred.
276
282
  */