@syncmatters/script-api 1.0.35 → 1.0.37

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.
@@ -526,7 +526,9 @@ export interface ObjectField {
526
526
  isUserKey?: boolean;
527
527
  /** field holds a unique value and the connector honors it as an idsFilterField key in queries */
528
528
  isAlternateKey?: boolean;
529
- /** field, and any fields below, are custom (account specific) */
529
+ /** field, and any fields below, are custom (account specific): created by the account, or a vendor
530
+ * slot with no meaning of its own whose content each account defines (user-defined values,
531
+ * generic custom-field arrays); set it on the container */
530
532
  isCustom?: boolean;
531
533
  /** can this field be referenced in match rules? */
532
534
  canMatch?: boolean;
@@ -586,8 +588,34 @@ export interface ObjectFieldConstraints {
586
588
  minLen?: number;
587
589
  trim?: boolean;
588
590
  dt?: {
589
- format?: "unix" | "unix_ms" | "iso8601" | "yyyy-MM-dd" | "M/d/yyyy" | "dd/MM/yyyy" | "yyyy-MM-dd HH:mm:ss" | "custom";
591
+ /**
592
+ * How the value is written. `"custom"` takes a Luxon pattern from `pattern`; any other string
593
+ * that is not listed is treated as a Luxon pattern too. `"yyyy-MM-dd'T'HH:mm:ss"` is an ISO date
594
+ * and time with no offset and no fractional seconds (`2026-10-05T01:11:21`).
595
+ */
596
+ format?: "unix" | "unix_ms" | "iso8601" | "yyyy-MM-dd" | "M/d/yyyy" | "dd/MM/yyyy" | "yyyy-MM-dd HH:mm:ss" | "yyyy-MM-dd'T'HH:mm:ss" | "custom";
590
597
  pattern?: string;
598
+ /**
599
+ * IANA time zone (`"America/New_York"`, `"UTC"`) of this field's wall-clock values. A value with
600
+ * no offset is read as wall-clock time in `tz`, and values written to the field are rendered as
601
+ * wall-clock time in `tz`. A value that carries its own offset or `Z` keeps it. It describes the
602
+ * value, so it applies to query fields as much as to upsert fields; a connector whose API uses a
603
+ * per-connection zone stamps it from that setting when it builds `meta()`.
604
+ *
605
+ * Absent means unknown: there is no default and nothing is inherited from the connection or the
606
+ * object. `unix` / `unix_ms` ignore it, and so do date-only and time-only fields (a calendar date
607
+ * is not an instant), except a `dateOnly` field in an instant format, where `tz` is the zone whose
608
+ * midnight encodes the day (UTC when absent). An unrecognised zone is an error.
609
+ */
610
+ tz?: string;
611
+ /**
612
+ * The field holds a calendar date even though its format is an instant format: e.g. `unix_ms` at
613
+ * midnight UTC (old HubSpot date properties) or `2026-10-05T00:00:00Z`. Values are converted by
614
+ * calendar day, never by instant, and writes produce an exact midnight in `tz` (UTC when absent).
615
+ * Absent means the kind is inferred from the format: `yyyy-MM-dd`, `M/d/yyyy`, `dd/MM/yyyy` and
616
+ * patterns with date tokens but no time tokens (`yyyy-MM-dd'T'00:00:00`) are already dates.
617
+ */
618
+ dateOnly?: boolean;
591
619
  rangeYears?: number;
592
620
  future?: boolean;
593
621
  past?: boolean;
@@ -1,2 +1,2 @@
1
- export type ObjectSemanticType = "unknown" /** Unknown: no entity fits (a join object, an audit log); the name resolver is not applied */ | "contact" /** Contact: a person you deal with */ | "company" /** Company: an organization */ | "deal" /** Deal: a sales opportunity in a pipeline */ | "quote" /** Quote: a priced offer sent to a customer */ | "lead" /** Lead: an unqualified prospect */ | "user" /** User: a person who works in the system */ | "activity" /** Activity: a logged interaction or to-do */ | "ticket" /** Ticket: a support or service request */ | "project" /** Project: a piece of delivery work */ | "product" /** Product: something you sell or buy */ | "line_item" /** Line Item: one line of a deal, quote, order or invoice */ | "order" /** Order: a commitment to buy or sell */ | "invoice" /** Invoice: a request for payment */ | "payment" /** Payment: money received or paid */ | "shipment" /** Shipment: goods sent or received */ | "location" /** Location: a place or address */ | "contract" /** Contract: an agreement with terms over time */ | "campaign" /** Campaign: a marketing effort */ | "time_entry" /** Time Entry: time logged against work */ | "expense" /** Expense: a cost incurred by a person */ | "asset" /** Asset: equipment or property that is tracked */ | "document" /** Document: a file or its record */ | "journal_entry" /** Journal Entry: a general ledger posting */ | "reference" /** Reference: a lookup or code list */ | "job_requisition" /** Job Requisition: an open role being recruited for */ | "application" /** Application: a candidate's application to a job requisition */ | "contact.candidate" /** Candidate: a person applying for a role */ | "contact.tenant" /** Tenant: a person renting a property or unit */ | "company.account" /** Account: a customer company in a CRM */ | "company.customer" /** Customer: a company you sell to */ | "company.vendor" /** Vendor: a company you buy from */ | "company.partner" /** Partner: a company you work with to sell or deliver */ | "company.competitor" /** Competitor: a company you compete with */ | "company.subsidiary" /** Subsidiary: a legal entity within your own group */ | "deal.opportunity" /** Opportunity: a deal in a CRM pipeline */ | "quote.estimate" /** Estimate: a priced estimate of work or goods */ | "quote.proposal" /** Proposal: a priced proposal sent to a prospect */ | "user.employee" /** Employee: a person employed by the organization */ | "user.resource" /** Resource: a person scheduled onto work */ | "activity.task" /** Task: a to-do item */ | "activity.call" /** Call: a logged phone call */ | "activity.email" /** Email: a logged email message */ | "activity.meeting" /** Meeting: a scheduled meeting or event */ | "activity.note" /** Note: a free-text note */ | "ticket.case" /** Case: a customer support case */ | "ticket.issue" /** Issue: a tracked issue or bug */ | "ticket.incident" /** Incident: an IT service incident */ | "ticket.work_order" /** Work Order: a field service job */ | "project.job" /** Job: a billable job (professional services) */ | "product.item" /** Item: an inventory or catalog item */ | "order.sales_order" /** Sales Order: an order from a customer */ | "order.purchase_order" /** Purchase Order: an order to a vendor */ | "order.transfer_order" /** Transfer Order: stock moved between locations */ | "order.return_authorization" /** Return Authorization: an approved customer return */ | "order.purchase_requisition" /** Purchase Requisition: an internal request to buy */ | "invoice.bill" /** Bill: an invoice received from a vendor */ | "invoice.credit_memo" /** Credit Memo: a credit against an invoice */ | "invoice.cash_sale" /** Cash Sale: a sale paid at the time of sale */ | "payment.refund" /** Refund: money returned to a customer */ | "payment.deposit" /** Deposit: money paid in advance or banked */ | "payment.vendor_payment" /** Vendor Payment: money paid to a vendor */ | "shipment.fulfillment" /** Fulfillment: goods shipped against an order */ | "shipment.item_receipt" /** Item Receipt: goods received from a vendor */ | "shipment.return" /** Return: goods physically returned */ | "location.site" /** Site: a customer or company site */ | "location.address" /** Address: a postal address record */ | "location.warehouse" /** Warehouse: a place stock is held */ | "location.property" /** Property: a rental property or building */ | "location.unit" /** Unit: a rentable unit within a property */ | "contract.agreement" /** Agreement: a service or sales agreement */ | "contract.subscription" /** Subscription: a recurring subscription */ | "contract.entitlement" /** Entitlement: support a customer is entitled to */ | "contract.lease" /** Lease: a rental agreement for a property or unit */ | "campaign.marketing_event" /** Marketing Event: a webinar, conference or similar event */ | "time_entry.worklog" /** Worklog: time logged against a task or issue */ | "time_entry.timesheet" /** Timesheet: a period's time for one person */ | "expense.expense_report" /** Expense Report: a claim grouping expenses */ | "asset.configuration_item" /** Configuration Item: an IT asset under management */ | "asset.fixed_asset" /** Fixed Asset: a depreciating asset on the books */ | "document.file" /** File: a stored file */ | "document.attachment" /** Attachment: a file attached to another record */ | "document.folder" /** Folder: a container of files or documents */ | "journal_entry.manual_journal" /** Manual Journal: a hand-entered journal */ | "reference.lookup" /** Lookup: a generic lookup list */ | "reference.code_list" /** Code List: a list of codes and names */ | "reference.currency" /** Currency: the currencies in use */ | "reference.payment_terms" /** Payment Terms: when payment is due */ | "reference.price_level" /** Price Level: a price list or tier */ | "reference.payment_method" /** Payment Method: how payment is made */ | "reference.unit_of_measure" /** Unit of Measure: the units quantities are counted in */ | "reference.tax_code" /** Tax Code: a tax rate or code */ | "reference.accounting_period" /** Accounting Period: a financial period */ | "reference.category" /** Category: a classification list */ | "reference.status" /** Status: a list of statuses */ | "reference.role" /** Role: a list of roles */ | "reference.gl_account" /** GL Account: a general ledger account */ | "reference.department"; /** Department: an organizational department */
1
+ export type ObjectSemanticType = "unknown" /** Unknown: no entity fits (a join object, an audit log); the name resolver is not applied */ | "contact" /** Contact: a person you deal with */ | "company" /** Company: an organization */ | "deal" /** Deal: a sales opportunity in a pipeline */ | "quote" /** Quote: a priced offer sent to a customer */ | "lead" /** Lead: an unqualified prospect */ | "user" /** User: a person who works in the system */ | "activity" /** Activity: a logged interaction or to-do */ | "ticket" /** Ticket: a support or service request */ | "project" /** Project: a piece of delivery work */ | "product" /** Product: something you sell or buy */ | "line_item" /** Line Item: one line of a deal, quote, order or invoice */ | "order" /** Order: a commitment to buy or sell */ | "invoice" /** Invoice: a request for payment */ | "payment" /** Payment: money received or paid */ | "shipment" /** Shipment: goods sent or received */ | "location" /** Location: a place or address */ | "contract" /** Contract: an agreement with terms over time */ | "campaign" /** Campaign: a marketing effort */ | "time_entry" /** Time Entry: time logged against work */ | "expense" /** Expense: a cost incurred by a person */ | "asset" /** Asset: equipment or property that is tracked */ | "document" /** Document: a file or its record */ | "journal_entry" /** Journal Entry: a general ledger posting */ | "reference" /** Reference: a lookup or code list */ | "job_requisition" /** Job Requisition: an open role being recruited for */ | "application" /** Application: a candidate's application to a job requisition */ | "contact.candidate" /** Candidate: a person applying for a role */ | "contact.tenant" /** Tenant: a person renting a property or unit */ | "company.account" /** Account: a customer company in a CRM */ | "company.customer" /** Customer: a company you sell to */ | "company.vendor" /** Vendor: a company you buy from */ | "company.partner" /** Partner: a company you work with to sell or deliver */ | "company.competitor" /** Competitor: a company you compete with */ | "company.subsidiary" /** Subsidiary: a legal entity within your own group */ | "deal.opportunity" /** Opportunity: a deal in a CRM pipeline */ | "quote.estimate" /** Estimate: a priced estimate of work or goods */ | "quote.proposal" /** Proposal: a priced proposal sent to a prospect */ | "user.employee" /** Employee: a person employed by the organization */ | "user.resource" /** Resource: a person scheduled onto work */ | "activity.task" /** Task: a to-do item */ | "activity.call" /** Call: a logged phone call */ | "activity.email" /** Email: a logged email message */ | "activity.meeting" /** Meeting: a scheduled meeting or event */ | "activity.note" /** Note: a free-text note */ | "ticket.case" /** Case: a customer support case */ | "ticket.issue" /** Issue: a tracked issue or bug */ | "ticket.incident" /** Incident: an IT service incident */ | "ticket.work_order" /** Work Order: a field service job */ | "project.job" /** Job: a billable job (professional services) */ | "product.item" /** Item: an inventory or catalog item */ | "order.sales_order" /** Sales Order: an order from a customer */ | "order.purchase_order" /** Purchase Order: an order to a vendor */ | "order.transfer_order" /** Transfer Order: stock moved between locations */ | "order.return_authorization" /** Return Authorization: an approved customer return */ | "order.purchase_requisition" /** Purchase Requisition: an internal request to buy */ | "invoice.bill" /** Bill: an invoice received from a vendor */ | "invoice.credit_memo" /** Credit Memo: a credit against an invoice */ | "invoice.cash_sale" /** Cash Sale: a sale paid at the time of sale */ | "payment.refund" /** Refund: money returned to a customer */ | "payment.deposit" /** Deposit: money paid in advance or banked */ | "payment.vendor_payment" /** Vendor Payment: money paid to a vendor */ | "shipment.fulfillment" /** Fulfillment: goods shipped against an order */ | "shipment.item_receipt" /** Item Receipt: goods received from a vendor */ | "shipment.return" /** Return: goods physically returned */ | "location.site" /** Site: a customer or company site */ | "location.address" /** Address: a postal address record */ | "location.warehouse" /** Warehouse: a place stock is held */ | "location.property" /** Property: a rental property or building */ | "location.unit" /** Unit: a rentable unit within a property */ | "contract.agreement" /** Agreement: a service or sales agreement */ | "contract.subscription" /** Subscription: a recurring subscription */ | "contract.entitlement" /** Entitlement: support a customer is entitled to */ | "contract.lease" /** Lease: a rental agreement for a property or unit */ | "campaign.marketing_event" /** Marketing Event: a webinar, conference or similar event */ | "time_entry.worklog" /** Worklog: time logged against a task or issue */ | "time_entry.timesheet" /** Timesheet: a period's time for one person */ | "expense.expense_report" /** Expense Report: a claim grouping expenses */ | "asset.configuration_item" /** Configuration Item: an IT asset under management */ | "asset.fixed_asset" /** Fixed Asset: a depreciating asset on the books */ | "document.file" /** File: a stored file */ | "document.attachment" /** Attachment: a file attached to another record */ | "document.folder" /** Folder: a container of files or documents */ | "journal_entry.manual_journal" /** Manual Journal: a hand-entered journal */ | "reference.lookup" /** Lookup: a generic lookup list */ | "reference.code_list" /** Code List: a list of codes and names */ | "reference.currency" /** Currency: the currencies in use */ | "reference.payment_terms" /** Payment Terms: when payment is due */ | "reference.price_level" /** Price Level: a price list or tier */ | "reference.payment_method" /** Payment Method: how payment is made */ | "reference.unit_of_measure" /** Unit of Measure: the units quantities are counted in */ | "reference.tax_code" /** Tax Code: a tax rate or code */ | "reference.accounting_period" /** Accounting Period: a financial period */ | "reference.category" /** Category: a classification list */ | "reference.status" /** Status: a list of statuses */ | "reference.role" /** Role: a list of roles */ | "reference.gl_account" /** GL Account: a general ledger account */ | "reference.department" /** Department: an organizational department */ | "job_requisition.posting"; /** Posting: a published job-board posting of a job requisition */
2
2
  export declare const ObjectSemanticTypeValues: readonly ObjectSemanticType[];
@@ -1,14 +1,14 @@
1
1
  export declare function dateFormat(date: Date | number, options?: {
2
- format?: "ISO" | "ISODate" | "yyyy-MM-dd HH:mm:ss" | "yyyyMMdd";
2
+ format?: "ISO" | "ISODate" | "yyyy-MM-dd HH:mm:ss" | "yyyy-MM-dd'T'HH:mm:ss" | "yyyyMMdd";
3
3
  custom?: string;
4
4
  tz?: string;
5
5
  }): string | undefined;
6
6
  export declare function dateParse(text: string, options?: {
7
- format?: "ISO" | "ISODate" | "yyyy-MM-dd HH:mm:ss" | "yyyyMMdd";
7
+ format?: "ISO" | "ISODate" | "yyyy-MM-dd HH:mm:ss" | "yyyy-MM-dd'T'HH:mm:ss" | "yyyyMMdd";
8
8
  custom?: string;
9
9
  tz?: string;
10
10
  }): Date | undefined;
11
- export type DateTimeFormat = "none" | "unix" | "unix_ms" | "yyyy-MM-dd" | "M/d/yyyy" | "MM/dd/yyyy" | "dd/MM/yyyy" | "iso8601" | "yyyy-MM-dd HH:mm:ss" | "custom";
11
+ export type DateTimeFormat = "none" | "unix" | "unix_ms" | "yyyy-MM-dd" | "M/d/yyyy" | "MM/dd/yyyy" | "dd/MM/yyyy" | "iso8601" | "yyyy-MM-dd HH:mm:ss" | "yyyy-MM-dd'T'HH:mm:ss" | "custom";
12
12
  export type DateTimeTrunc = "none" | "second" | "minute" | "hour" | "day" | "month" | "year";
13
13
  export type DateTimeInterval = "none" | "milliseconds" | "seconds" | "minutes" | "hours" | "days" | "months" | "years";
14
14
  export interface DateTransformOptions {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@syncmatters/script-api",
3
- "version": "1.0.35",
3
+ "version": "1.0.37",
4
4
  "description": "TypeScript type definitions for the SyncMatters script API (types only - scripts execute on the SyncMatters platform)",
5
5
  "types": "./index.d.ts",
6
6
  "exports": {
@@ -28,7 +28,7 @@
28
28
  "license": "MIT",
29
29
  "author": "SyncMatters",
30
30
  "homepage": "https://syncmatters.com",
31
- "typesContentHash": "7bf001b2689ce8a8eeb50ef215532abb80cc617bbfd7d6741bba4b4fb98e22b4",
31
+ "typesContentHash": "a6c6194ba447a988167a6da352fb0a5151163d0268ebbd6210b4f893cacce317",
32
32
  "dependencies": {
33
33
  "@types/node": "*"
34
34
  }