@marianmeres/collection-types 2.1.0 → 2.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.
package/dist/order.d.ts CHANGED
@@ -12,7 +12,10 @@
12
12
  import type { AddressData } from "./customer.js";
13
13
  import type { UUID } from "./utils.js";
14
14
  /** Order status progression */
15
- export type OrderStatus = "pending" | "paid" | "processing" | "shipped" | "delivered" | "cancelled";
15
+ export type OrderStatus = "pending" | "paid" | "processing" | "shipped" | "delivered" | "cancelled"
16
+ /** System-set by the abandoned-checkout maintenance sweep (never via the
17
+ * customer/admin transition API); a terminal, off-sequence state. */
18
+ | "abandoned";
16
19
  /** Checkout stages for tracking progress */
17
20
  export type CheckoutStage = "cart" | "addresses" | "delivery" | "confirm" | "payment" | "complete";
18
21
  /** Single order line item (snapshot at purchase time) */
package/dist/payment.d.ts CHANGED
@@ -59,6 +59,10 @@ export interface PaymentIntent {
59
59
  export interface PaymentResult {
60
60
  /** Provider reference ID */
61
61
  provider_reference: string;
62
+ /** Optional provider verification summary (e.g. PayPal payer email/id,
63
+ * capture status, seller-protection eligibility) surfaced for admin review.
64
+ * Provider-specific keys; undefined when the provider supplies none. */
65
+ verification?: Record<string, unknown>;
62
66
  }
63
67
  /**
64
68
  * Result of a refund operation.
@@ -29,6 +29,13 @@ export type ObjectSchema<T> = {
29
29
  _searchable?: boolean;
30
30
  /** Virtual form-only fields (not persisted, excluded from DB validation) */
31
31
  _extra_form_fields?: Record<string, PropertyDefinition>;
32
+ /**
33
+ * Admin list-view hint: append these top-level model timestamp columns to the
34
+ * DataTable (rendered from the model row, not `data.*`). Operational
35
+ * collections (orders, invoices, …) typically want "when was this placed /
36
+ * last touched" in the list.
37
+ */
38
+ _data_table_dates?: ("_created_at" | "_updated_at")[];
32
39
  };
33
40
  /** Extended schema (loose typing for __extends patterns) */
34
41
  export type ExtendedSchema = {
package/dist/schema.d.ts CHANGED
@@ -4,7 +4,7 @@
4
4
  */
5
5
  import type { MaybeLocalized } from "./utils.js";
6
6
  /** HTML field type for UI rendering */
7
- export type SchemaHtmlType = "text" | "textarea" | "wysiwyg" | "markdown" | "number" | "money" | "boolean" | "checkbox" | "parent" | "object" | "select" | "multiselect" | "date" | "datetime" | "time" | "color" | "relation" | "asset" | "json" | "code" | "keyvalues" | "password";
7
+ export type SchemaHtmlType = "text" | "textarea" | "wysiwyg" | "markdown" | "number" | "money" | "boolean" | "checkbox" | "parent" | "object" | "select" | "status" | "multiselect" | "date" | "datetime" | "time" | "color" | "relation" | "asset" | "json" | "code" | "keyvalues" | "password";
8
8
  /** Configuration for relation-type fields in schema */
9
9
  export interface RelationTypeConfig {
10
10
  relation_type: string;
@@ -22,11 +22,13 @@ export interface AssetTypeConfig {
22
22
  maxSize?: number;
23
23
  variants?: string[];
24
24
  }
25
- /** Configuration for select/multiselect fields */
25
+ /** Configuration for select/multiselect/status fields */
26
26
  export interface SelectConfig {
27
+ /** `intent` (status fields) carries the per-value badge color. */
27
28
  options: Array<{
28
29
  value: string;
29
30
  label: string;
31
+ intent?: string;
30
32
  }>;
31
33
  multiple?: boolean;
32
34
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@marianmeres/collection-types",
3
- "version": "2.1.0",
3
+ "version": "2.2.0",
4
4
  "type": "module",
5
5
  "main": "dist/mod.js",
6
6
  "types": "dist/mod.d.ts",