@isomorph.ai/app-sdk 1.29.0 → 1.31.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.
package/dist/index.d.ts CHANGED
@@ -858,7 +858,7 @@ export interface OutlookMessageSendRequest {
858
858
  /** A fresh UUID per authorized Send action, reused only to retry that action. */
859
859
  idempotencyKey: string;
860
860
  }
861
- /** Replies to one message's sender with plain text; an explicit action with its own idempotency key. */
861
+ /** Replies in the original conversation to its resolved reply recipients; an explicit action with its own idempotency key. */
862
862
  export interface OutlookMessageReplyRequest {
863
863
  operation: 'outlook.message.reply';
864
864
  resource: string;
@@ -866,6 +866,8 @@ export interface OutlookMessageReplyRequest {
866
866
  messageId: string;
867
867
  /** Plain text, 1 to 4000 characters. */
868
868
  text: string;
869
+ /** Up to five files, 2 MiB decoded total. */
870
+ attachments?: GmailAttachmentInput[];
869
871
  };
870
872
  /** A fresh UUID per authorized Send action, reused only to retry that action. */
871
873
  idempotencyKey: string;
@@ -1257,6 +1259,8 @@ export interface GmailMessageReadResult {
1257
1259
  threadId: string;
1258
1260
  subject: string;
1259
1261
  from: string;
1262
+ /** Outlook reply recipients: replyTo when present, otherwise the sender. */
1263
+ replyTo?: string[];
1260
1264
  to: string;
1261
1265
  date: string;
1262
1266
  /** The plain text with HTML stripped, cut at 16 KiB with `truncated` set. */
@@ -1502,6 +1502,32 @@ export declare const IntegrationExecuteInputRules: {
1502
1502
  readonly minLength: 1;
1503
1503
  readonly maxLength: 4000;
1504
1504
  };
1505
+ readonly attachments: {
1506
+ readonly kind: "object[]";
1507
+ readonly required: false;
1508
+ readonly minItems: 1;
1509
+ readonly maxItems: 5;
1510
+ readonly fields: {
1511
+ readonly filename: {
1512
+ readonly kind: "string";
1513
+ readonly required: true;
1514
+ readonly minLength: 1;
1515
+ readonly maxLength: 255;
1516
+ };
1517
+ readonly contentType: {
1518
+ readonly kind: "string";
1519
+ readonly required: true;
1520
+ readonly minLength: 1;
1521
+ readonly maxLength: 128;
1522
+ };
1523
+ readonly dataBase64: {
1524
+ readonly kind: "string";
1525
+ readonly required: true;
1526
+ readonly minLength: 1;
1527
+ readonly maxLength: 2796203;
1528
+ };
1529
+ };
1530
+ };
1505
1531
  };
1506
1532
  };
1507
1533
  readonly "outlook.event.list": {
@@ -469,6 +469,11 @@ export const IntegrationExecuteInputRules = {
469
469
  fields: {
470
470
  messageId: { kind: "string", required: true, minLength: 0, pattern: "^[A-Za-z0-9._=-]{1,256}$" },
471
471
  text: { kind: "string", required: true, minLength: 1, maxLength: 4000 },
472
+ attachments: { kind: "object[]", required: false, minItems: 1, maxItems: 5, fields: {
473
+ filename: { kind: "string", required: true, minLength: 1, maxLength: 255 },
474
+ contentType: { kind: "string", required: true, minLength: 1, maxLength: 128 },
475
+ dataBase64: { kind: "string", required: true, minLength: 1, maxLength: 2796203 },
476
+ } },
472
477
  },
473
478
  },
474
479
  "outlook.event.list": {
package/dist/runtime.js CHANGED
@@ -398,7 +398,7 @@ export class Runtime {
398
398
  if (!job?.trigger || job.trigger.connection !== delivery.input.sourceId)
399
399
  throw new Error('mail trigger is not declared by this deployed app');
400
400
  await this.refreshToken(JOB_SESSION_MIN_VALIDITY_MS);
401
- if (!this.options.gatewayUrl || !this.options.queueUrl || this.options.jobRuns === false || !(await this.awaitDataPath()))
401
+ if (!this.options.gatewayUrl || this.options.mode === 'gate' || this.options.jobRuns === false || !(await this.awaitDataPath()))
402
402
  throw new Error('mail arrival requires durable job runs');
403
403
  const queued = await this.runs.enqueueMail(delivery);
404
404
  await this.signalQueuedRun(queued.id);
@@ -642,6 +642,12 @@ export class Runtime {
642
642
  if (this.options.gatewayIdentity && sendsBearer)
643
643
  await this.refreshToken().catch((error) => this.log(`gateway session: ${error instanceof Error ? error.message : String(error)}`));
644
644
  try {
645
+ if (name === 'isomorph-mail-arrival') {
646
+ if (header(request, 'X-Harbour-Verified-Mail-Arrival') !== 'true')
647
+ return refuse(response, 403, 'FORBIDDEN', 'governed mail delivery is required', requestId);
648
+ await this.acceptMailArrival(input);
649
+ return answer(response, 200, { data: { accepted: true } }, requestId);
650
+ }
645
651
  if (name.startsWith(RESERVED_PREFIX))
646
652
  return answer(response, 200, { data: await this.reserved(name, input, context) }, requestId);
647
653
  if (!this.inventory.actions.includes(name))
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@isomorph.ai/app-sdk",
3
- "version": "1.29.0",
3
+ "version": "1.31.0",
4
4
  "type": "module",
5
5
  "repository": {
6
6
  "type": "git",