@getlatedev/node 0.2.1277 → 0.2.1279

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.js CHANGED
@@ -36,7 +36,7 @@ module.exports = __toCommonJS(index_exports);
36
36
  // package.json
37
37
  var package_default = {
38
38
  name: "@getlatedev/node",
39
- version: "0.2.1277",
39
+ version: "0.2.1279",
40
40
  description: "The official Node.js library for the Zernio API",
41
41
  main: "dist/index.js",
42
42
  module: "dist/index.mjs",
package/dist/index.mjs CHANGED
@@ -5,7 +5,7 @@ var __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== "sy
5
5
  // package.json
6
6
  var package_default = {
7
7
  name: "@getlatedev/node",
8
- version: "0.2.1277",
8
+ version: "0.2.1279",
9
9
  description: "The official Node.js library for the Zernio API",
10
10
  main: "dist/index.js",
11
11
  module: "dist/index.mjs",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@getlatedev/node",
3
- "version": "0.2.1277",
3
+ "version": "0.2.1279",
4
4
  "description": "The official Node.js library for the Zernio API",
5
5
  "main": "dist/index.js",
6
6
  "module": "dist/index.mjs",
@@ -4135,6 +4135,7 @@ export type CommerceOrder = {
4135
4135
  billingAddress?: (CommerceAddress | null);
4136
4136
  shippingAddress?: (CommerceAddress | null);
4137
4137
  buyerNote?: (string) | null;
4138
+ attribution?: CommerceOrderAttribution;
4138
4139
  lineItems?: Array<{
4139
4140
  id?: string;
4140
4141
  /**
@@ -4200,6 +4201,31 @@ export type CommerceOrder = {
4200
4201
  } | null;
4201
4202
  };
4202
4203
 
4204
+ /**
4205
+ * Where the order came from. Shopify reads it from the customer journey, WooCommerce from its order attribution (WooCommerce 8.5+ with the feature on, orders placed after it was turned on).
4206
+ */
4207
+ export type CommerceOrderAttribution = {
4208
+ /**
4209
+ * False while Shopify is still attributing a new order. No webhook fires when it becomes true, so read the order again later. Always true on WooCommerce.
4210
+ */
4211
+ ready?: boolean;
4212
+ /**
4213
+ * The first session before the order. Shopify only; WooCommerce records the last session alone.
4214
+ */
4215
+ firstVisit?: (CommerceOrderVisit | null);
4216
+ /**
4217
+ * The last session before the order.
4218
+ */
4219
+ lastVisit?: (CommerceOrderVisit | null);
4220
+ /**
4221
+ * Shopify cart and note attributes, or WooCommerce public order meta.
4222
+ */
4223
+ customAttributes?: Array<{
4224
+ key?: string;
4225
+ value?: string;
4226
+ }>;
4227
+ };
4228
+
4203
4229
  /**
4204
4230
  * A shipping or fee line.
4205
4231
  */
@@ -4219,6 +4245,39 @@ export type CommerceOrderChargeLine = {
4219
4245
  */
4220
4246
  export type CommerceOrderStatus = 'pending_payment' | 'on_hold' | 'awaiting_fulfillment' | 'partially_fulfilled' | 'in_transit' | 'delivered' | 'completed' | 'cancelled';
4221
4247
 
4248
+ /**
4249
+ * A store session that led to the order.
4250
+ */
4251
+ export type CommerceOrderVisit = {
4252
+ /**
4253
+ * Null on WooCommerce, which records the session start without a timezone.
4254
+ */
4255
+ occurredAt?: (string) | null;
4256
+ /**
4257
+ * The first page of the session, with its query string.
4258
+ */
4259
+ landingUrl?: (string) | null;
4260
+ referrerUrl?: (string) | null;
4261
+ /**
4262
+ * Where the visit came from, as the platform names it.
4263
+ */
4264
+ source?: (string) | null;
4265
+ /**
4266
+ * Shopify marketing tactic (e.g. SOCIAL, AD, SEARCH) or WooCommerce source type (utm, organic, referral, typein, admin).
4267
+ */
4268
+ sourceType?: (string) | null;
4269
+ /**
4270
+ * Null when the landing URL carried no UTM parameters.
4271
+ */
4272
+ utm?: {
4273
+ source?: (string) | null;
4274
+ medium?: (string) | null;
4275
+ campaign?: (string) | null;
4276
+ term?: (string) | null;
4277
+ content?: (string) | null;
4278
+ } | null;
4279
+ };
4280
+
4222
4281
  export type CommercePage = {
4223
4282
  id?: string;
4224
4283
  accountId?: string;
@@ -20071,7 +20130,7 @@ export type CreatePostData = {
20071
20130
  */
20072
20131
  requiresApproval?: boolean;
20073
20132
  /**
20074
- * TikTok only. Preview whether each `tiktok` entry in `platforms` could publish right now under the TikTok Direct Post daily limits, without creating, scheduling or publishing anything: no post is persisted and no upload slot is claimed, so it can be repeated freely. The request still goes through auth, the payment gate and body validation, then returns HTTP 200 with `{ dryRun: true, canPublish, tiktok: [...] }` instead of 201. Only `tiktok` entries are evaluated; other platforms in the body are ignored, and a body with no `tiktok` entry is rejected with 400 `invalid_field_value` on `platforms`. An entry with `platformSpecificData.tiktokSettings.draft: true` (Creator Inbox upload) is not subject to the limit and always reports `canPublish: true`. Accounts connected through the TikTok for Business app do not go through these limits at all and also always report `canPublish: true`, so on those accounts a dry run confirms the request is well-formed rather than gating it.
20133
+ * TikTok only. Preview whether each `tiktok` entry in `platforms` could publish right now under the TikTok Direct Post daily limits, without creating, scheduling or publishing anything: no post is persisted and no upload slot is claimed, so it can be repeated freely. The request still goes through auth, the payment gate and body validation, and runs the same account access checks as a real create (it can return 400 or 403), then returns HTTP 200 with `{ dryRun: true, canPublish, tiktok: [...] }` instead of 201. Only `tiktok` entries are evaluated; other platforms in the body are ignored, and a body with no `tiktok` entry is rejected with 400 `invalid_field_value` on `platforms`. An entry with `platformSpecificData.tiktokSettings.draft: true` (Creator Inbox upload) is not subject to the limit and always reports `canPublish: true`. Accounts connected through the TikTok for Business app do not go through these limits at all and also always report `canPublish: true`, so on those accounts a dry run confirms the request is well-formed rather than gating it.
20075
20134
  */
20076
20135
  dryRun?: boolean;
20077
20136
  /**