@isomorph.ai/app-sdk 1.28.0 → 1.30.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/README.md CHANGED
@@ -509,3 +509,5 @@ job runtime; duplicate deliveries retain the same run instead of rerunning a com
509
509
  This does not add a per-app polling timer. Cluster hosting and cross-account delivery are not
510
510
  supported by this first release. Local manual job execution tests the handler, not the provider
511
511
  subscription; verify a real incoming email after deployment before calling the trigger live.
512
+
513
+ For PO-linked Zoho bills, first read the PO and send each returned `lineItemId` as the bill line’s `purchaseOrderItemId`. `itemId` identifies the catalog item; it does not identify the PO line. Purchase-order list results are summaries; read the document before comparing lines.
package/dist/index.d.ts CHANGED
@@ -1100,6 +1100,9 @@ export interface BooksLineInput {
1100
1100
  taxId?: string;
1101
1101
  description?: string;
1102
1102
  }
1103
+ export interface BooksBillLineInput extends BooksLineInput {
1104
+ purchaseOrderItemId?: string;
1105
+ }
1103
1106
  export interface BooksDocument {
1104
1107
  id: string;
1105
1108
  number: string;
@@ -1110,6 +1113,8 @@ export interface BooksDocument {
1110
1113
  customerId?: string;
1111
1114
  lineItems: {
1112
1115
  itemId: string;
1116
+ lineItemId?: string;
1117
+ purchaseOrderItemId?: string;
1113
1118
  quantity: string;
1114
1119
  rate: string;
1115
1120
  total: string;
@@ -1151,7 +1156,7 @@ export type ZohoBooksRequest = {
1151
1156
  documentNumber: string;
1152
1157
  documentDate: string;
1153
1158
  purchaseOrderId?: string;
1154
- lineItems: BooksLineInput[];
1159
+ lineItems: BooksBillLineInput[];
1155
1160
  };
1156
1161
  } | {
1157
1162
  operation: 'zohobooks.invoice.create';
@@ -2268,6 +2268,13 @@ export declare const IntegrationExecuteInputRules: {
2268
2268
  readonly minLength: 0;
2269
2269
  readonly maxLength: 2000;
2270
2270
  };
2271
+ readonly purchaseOrderItemId: {
2272
+ readonly kind: "string";
2273
+ readonly required: false;
2274
+ readonly minLength: 0;
2275
+ readonly maxLength: 32;
2276
+ readonly pattern: "^[0-9]{1,32}$";
2277
+ };
2271
2278
  };
2272
2279
  };
2273
2280
  };
@@ -701,6 +701,7 @@ export const IntegrationExecuteInputRules = {
701
701
  rate: { kind: "string", required: true, minLength: 0, maxLength: 17, pattern: "^[0-9]{1,10}(\\.[0-9]{1,6})?$" },
702
702
  taxId: { kind: "string", required: false, minLength: 0, maxLength: 32, pattern: "^[0-9]{1,32}$" },
703
703
  description: { kind: "string", required: false, minLength: 0, maxLength: 2000 },
704
+ purchaseOrderItemId: { kind: "string", required: false, minLength: 0, maxLength: 32, pattern: "^[0-9]{1,32}$" },
704
705
  } },
705
706
  },
706
707
  },
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.28.0",
3
+ "version": "1.30.0",
4
4
  "type": "module",
5
5
  "repository": {
6
6
  "type": "git",