@vivoa/plugin-sdk 0.6.12 → 0.7.1
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/{host-api-Dx6jCIOw.d.mts → host-api-DVbKGytN.d.mts} +88 -4
- package/dist/{host-api-Dx6jCIOw.d.ts → host-api-DVbKGytN.d.ts} +88 -4
- package/dist/index.d.mts +3 -3
- package/dist/index.d.ts +3 -3
- package/dist/index.js +51 -2
- package/dist/index.mjs +51 -2
- package/dist/testing/index.d.mts +1 -1
- package/dist/testing/index.d.ts +1 -1
- package/package.json +1 -1
|
@@ -332,6 +332,13 @@ interface PluginManifest {
|
|
|
332
332
|
* `developer` string first-party manifests used to carry.
|
|
333
333
|
*/
|
|
334
334
|
author?: PluginAuthor;
|
|
335
|
+
/**
|
|
336
|
+
* Catalog access hint. `restricted` = the store asks the platform for an
|
|
337
|
+
* entitlement before ENABLING the app (paid/granted apps). Absent or
|
|
338
|
+
* `public` = no entitlement check. Informational for the host: the platform
|
|
339
|
+
* stays the authority on who is allowed.
|
|
340
|
+
*/
|
|
341
|
+
access?: 'public' | 'restricted';
|
|
335
342
|
/**
|
|
336
343
|
* Declarative admin setup screen. When omitted, host renders the legacy
|
|
337
344
|
* auto-form derived from the plugin's configSchema.
|
|
@@ -869,7 +876,11 @@ interface ShipmentResult {
|
|
|
869
876
|
*/
|
|
870
877
|
interface TrackingEvent {
|
|
871
878
|
trackingNumber: string;
|
|
872
|
-
status: 'in_transit' | 'delivered' | 'cancelled'
|
|
879
|
+
status: 'in_transit' | 'delivered' | 'cancelled'
|
|
880
|
+
/** A delivery attempt failed; the package is still with the carrier. */
|
|
881
|
+
| 'delivery_failed'
|
|
882
|
+
/** The package is coming back to (or reached) the sender. */
|
|
883
|
+
| 'returned' | 'unknown';
|
|
873
884
|
/** ISO-8601 instant the carrier reported the change, when available. */
|
|
874
885
|
occurredAt?: string;
|
|
875
886
|
/** Human-readable carrier status, for audit/logging. */
|
|
@@ -1569,8 +1580,24 @@ declare enum ContentBlockType {
|
|
|
1569
1580
|
Link = "link",
|
|
1570
1581
|
Divider = "divider",
|
|
1571
1582
|
Action = "action",
|
|
1572
|
-
Card = "card"
|
|
1583
|
+
Card = "card",
|
|
1584
|
+
/** Headline metric (label + pre-formatted value). Pure JSON data. */
|
|
1585
|
+
Stat = "stat",
|
|
1586
|
+
/** Read-only table of scalar cells. Pure JSON data. */
|
|
1587
|
+
Table = "table",
|
|
1588
|
+
/** Simple bar/line chart over labelled series. Pure JSON data. */
|
|
1589
|
+
Chart = "chart"
|
|
1573
1590
|
}
|
|
1591
|
+
/**
|
|
1592
|
+
* Host-owned slots the SDK knows by name. `slot` stays a free string on the
|
|
1593
|
+
* wire (an older host ignores a slot it does not know); these constants only
|
|
1594
|
+
* give first-party plugins one spelling.
|
|
1595
|
+
*/
|
|
1596
|
+
declare const UiSlot: {
|
|
1597
|
+
/** Full-page surface of an app in the admin (the app owns the whole body). */
|
|
1598
|
+
readonly AdminAppPage: "admin:app.page";
|
|
1599
|
+
};
|
|
1600
|
+
type UiSlot = (typeof UiSlot)[keyof typeof UiSlot];
|
|
1574
1601
|
declare enum ContentActionVariant {
|
|
1575
1602
|
Primary = "primary",
|
|
1576
1603
|
Secondary = "secondary",
|
|
@@ -1642,7 +1669,51 @@ interface CardBlock {
|
|
|
1642
1669
|
description?: string;
|
|
1643
1670
|
blocks: ContentBlock[];
|
|
1644
1671
|
}
|
|
1645
|
-
|
|
1672
|
+
/**
|
|
1673
|
+
* Headline metric. `value` is already formatted by the plugin (the host does
|
|
1674
|
+
* not guess units/locale). `estimate: true` makes the host label it as an
|
|
1675
|
+
* ESTIMATE next to the value, so a derived number is never shown as a fact.
|
|
1676
|
+
*/
|
|
1677
|
+
interface StatBlock {
|
|
1678
|
+
type: ContentBlockType.Stat;
|
|
1679
|
+
label: string;
|
|
1680
|
+
value?: string;
|
|
1681
|
+
computedKey?: string;
|
|
1682
|
+
hint?: string;
|
|
1683
|
+
variant?: MessageVariant;
|
|
1684
|
+
estimate?: boolean;
|
|
1685
|
+
}
|
|
1686
|
+
type TableCell = string | number | boolean | null;
|
|
1687
|
+
interface TableColumn {
|
|
1688
|
+
key: string;
|
|
1689
|
+
label: string;
|
|
1690
|
+
align?: 'left' | 'right';
|
|
1691
|
+
}
|
|
1692
|
+
/** Read-only table. Cells are scalars looked up by `columns[].key`. */
|
|
1693
|
+
interface TableBlock {
|
|
1694
|
+
type: ContentBlockType.Table;
|
|
1695
|
+
title?: string;
|
|
1696
|
+
columns: TableColumn[];
|
|
1697
|
+
rows: Array<Record<string, TableCell>>;
|
|
1698
|
+
/** Shown instead of the body when `rows` is empty. */
|
|
1699
|
+
emptyText?: string;
|
|
1700
|
+
}
|
|
1701
|
+
interface ChartSeries {
|
|
1702
|
+
name: string;
|
|
1703
|
+
/** One value per label; `null` = no observation (a gap, not a zero). */
|
|
1704
|
+
data: Array<number | null>;
|
|
1705
|
+
}
|
|
1706
|
+
/** Simple chart: `labels` is the x axis, every series aligns to it. */
|
|
1707
|
+
interface ChartBlock {
|
|
1708
|
+
type: ContentBlockType.Chart;
|
|
1709
|
+
kind: 'bar' | 'line';
|
|
1710
|
+
title?: string;
|
|
1711
|
+
labels: string[];
|
|
1712
|
+
series: ChartSeries[];
|
|
1713
|
+
unit?: string;
|
|
1714
|
+
emptyText?: string;
|
|
1715
|
+
}
|
|
1716
|
+
type ContentBlock = TextBlock | BannerBlock | BadgeBlock | KeyValueBlock | CopyFieldBlock | LinkBlock | DividerBlock | ActionBlock | CardBlock | StatBlock | TableBlock | ChartBlock;
|
|
1646
1717
|
/**
|
|
1647
1718
|
* One block tree the plugin injects into a host slot. `slot` names a host-owned
|
|
1648
1719
|
* target (e.g. "admin:order.detail.sidebar", "storefront:product.below"); the
|
|
@@ -1654,9 +1725,22 @@ interface UiContribution {
|
|
|
1654
1725
|
blocks: ContentBlock[];
|
|
1655
1726
|
order?: number;
|
|
1656
1727
|
}
|
|
1728
|
+
/** Runtime context the host hands to {@link IUiPlugin.resolveContributions}. */
|
|
1729
|
+
interface UiSlotContext {
|
|
1730
|
+
/** Free-form, JSON-serializable params chosen by the page (e.g. country). */
|
|
1731
|
+
params?: Record<string, unknown>;
|
|
1732
|
+
}
|
|
1657
1733
|
/** Impl behind a `ui` capability — the static set a plugin declares up front. */
|
|
1658
1734
|
interface IUiPlugin {
|
|
1659
1735
|
readonly contributions: UiContribution[];
|
|
1736
|
+
/**
|
|
1737
|
+
* Optional dynamic counterpart: for slots whose blocks depend on live data
|
|
1738
|
+
* (a full-page report), the host asks the plugin to build the block tree at
|
|
1739
|
+
* request time. Absent => the host serves the static `contributions`.
|
|
1740
|
+
* MUST resolve to pure-JSON blocks and SHOULD NOT throw: degrade to a
|
|
1741
|
+
* banner block explaining what is missing.
|
|
1742
|
+
*/
|
|
1743
|
+
resolveContributions?(slot: string, ctx: UiSlotContext): Promise<UiContribution[]>;
|
|
1660
1744
|
}
|
|
1661
1745
|
interface UiContributionsValidation {
|
|
1662
1746
|
success: boolean;
|
|
@@ -1796,4 +1880,4 @@ interface HostApi {
|
|
|
1796
1880
|
registerCapability<T = unknown>(cap: Capability<T>): void;
|
|
1797
1881
|
}
|
|
1798
1882
|
|
|
1799
|
-
export {
|
|
1883
|
+
export { type FieldBlock as $, AUTHOR_HANDLE_RE as A, type BannerBlock$1 as B, ConfigScope as C, type CarrierSettlement as D, type ChartBlock as E, FieldType as F, type ChartSeries as G, type CodConfig as H, type CodFeeConfig as I, CodFeeType as J, type CodPurchaseTrigger as K, type ConditionalBlock as L, type ConditionalEquals as M, type ConditionalWhen as N, type ConfigurablePlugin as O, type PluginConfigField as P, ContentActionVariant as Q, type ContentBlock as R, type SelectOption as S, ContentBlockType as T, type CopyFieldBlock$1 as U, type CreateShipmentParams as V, type DispatchContext as W, type DividerBlock$1 as X, type DomainEventHandler as Y, type DomainEventName as Z, type EmbedInit as _, type AccordionBlock as a, type SecretStore as a$, type FieldOption as a0, FieldVariant as a1, GatewayEnvironment as a2, type GatewayFeeConfig as a3, type GatewayStaticConfig as a4, type GroupBlock as a5, type HostApi as a6, type HttpClient as a7, type HttpRequest as a8, type HttpResponse as a9, type PaymentCard as aA, type PaymentConnect as aB, type PaymentConnectExchange as aC, type PaymentConnectParams as aD, type PaymentCustomer as aE, type PaymentGatewayCode as aF, type PaymentMerchantPricing as aG, type PaymentPayload as aH, type PaymentPluginConfig as aI, type PaymentRenderMode as aJ, type PaymentResult as aK, type PaymentSessionFees as aL, type PaymentSessionPayload as aM, type PaymentSessionResult as aN, type PaymentSettlementFees as aO, type PaymentVerifyPayload as aP, type PaymentWebhookSettlement as aQ, type PlaceSupplierOrderInput as aR, type Plugin as aS, type PluginActionContext as aT, type PluginActionResult as aU, type PluginAuthor as aV, type PluginConfigFieldDependency as aW, type PluginFactory as aX, type PluginManifest as aY, type RepeaterBlock as aZ, RepeaterSource as a_, type IAnalyticsPlugin as aa, type IInvoicingPlugin as ab, type IPaymentPlugin as ac, type IPlugin as ad, type IShippingPlugin as ae, type ISuppliersPlugin as af, type IUiPlugin as ag, type InlineRowBlock as ah, InvoiceDocumentType as ai, type InvoiceLine as aj, type InvoiceMoney as ak, type InvoiceParty as al, type InvoiceRequest as am, type InvoiceResult as an, InvoiceStatus as ao, type InvoiceTax as ap, type InvoicingDefaultConfig as aq, InvoicingFeature as ar, type InvoicingPluginConfig as as, type InvoicingStaticConfig as at, type KeyValueBlock$1 as au, type KeyValueRow$1 as av, LayoutMode as aw, type Logger as ax, type MarkdownBlock as ay, MessageVariant as az, type AccordionSection as b, shippingCapability as b$, type SequenceStore as b0, type SetupAction as b1, type SetupLayout as b2, type SetupLayoutValidation as b3, type SetupStep as b4, type ShipmentAddress as b5, type ShipmentParcel as b6, type ShipmentResult as b7, type ShippingDefaultConfig as b8, ShippingFeature as b9, type SuppliersDefaultConfig as bA, SuppliersFeature as bB, type SuppliersPluginConfig as bC, type SuppliersStaticConfig as bD, type TabItem as bE, type TableBlock as bF, type TableCell as bG, type TableColumn as bH, type TabsBlock as bI, type ToggleBlock as bJ, type TrackingEvent as bK, TransactionStatus as bL, type UiContribution as bM, type UiContributionsValidation as bN, UiSlot as bO, type UiSlotContext as bP, type VoidInvoiceInput as bQ, type WebhookSignatureResult as bR, analyticsCapability as bS, capability as bT, crossValidateSetupLayout as bU, definePlugin as bV, invoicingCapability as bW, isConfigurablePlugin as bX, isPluginFactory as bY, minorUnitDigits as bZ, paymentCapability as b_, type ShippingPluginConfig as ba, type ShippingQuote as bb, type ShippingQuoteParams as bc, type ShippingStaticConfig as bd, type StatBlock as be, StepStatusFrom as bf, type StepStatusFromAction as bg, type StepStatusFromFields as bh, type StepStatusSource as bi, type StorageBroker as bj, type SupplierCatalogQuery as bk, type SupplierFulfillmentEvent as bl, type SupplierListing as bm, type SupplierListingAttribute as bn, type SupplierListingPage as bo, type SupplierListingVariant as bp, type SupplierMoney as bq, type SupplierOrderAddressLevel as br, type SupplierOrderCustomer as bs, type SupplierOrderLine as bt, type SupplierOrderResult as bu, type SupplierOrderStatus as bv, type SupplierShipTo as bw, type SupplierShippingQuote as bx, type SupplierShippingQuoteInput as by, type SupplierStock as bz, type ActionBlock$1 as c, suppliersCapability as c0, toMajorUnits as c1, toMinorUnits as c2, uiCapability as c3, validatePluginAuthor as c4, validateSetupLayout as c5, validateUiContributions as c6, ActionVariant as d, type AnalyticsActionSource as e, type AnalyticsConsent as f, type AnalyticsEvent as g, type AnalyticsEventName as h, AnalyticsFeature as i, type AnalyticsItem as j, type AnalyticsMoney as k, type AnalyticsPluginConfig as l, type AnalyticsPurchasePolicy as m, type AnalyticsStaticConfig as n, type AnalyticsUserData as o, type AnalyticsUtm as p, type AuthorValidation as q, type Block as r, type BlockBase as s, BlockType as t, type CalloutBlock as u, type Capability as v, CapabilityKind as w, type CardBlock$1 as x, type CardBrand as y, type CarrierServiceMode as z };
|
|
@@ -332,6 +332,13 @@ interface PluginManifest {
|
|
|
332
332
|
* `developer` string first-party manifests used to carry.
|
|
333
333
|
*/
|
|
334
334
|
author?: PluginAuthor;
|
|
335
|
+
/**
|
|
336
|
+
* Catalog access hint. `restricted` = the store asks the platform for an
|
|
337
|
+
* entitlement before ENABLING the app (paid/granted apps). Absent or
|
|
338
|
+
* `public` = no entitlement check. Informational for the host: the platform
|
|
339
|
+
* stays the authority on who is allowed.
|
|
340
|
+
*/
|
|
341
|
+
access?: 'public' | 'restricted';
|
|
335
342
|
/**
|
|
336
343
|
* Declarative admin setup screen. When omitted, host renders the legacy
|
|
337
344
|
* auto-form derived from the plugin's configSchema.
|
|
@@ -869,7 +876,11 @@ interface ShipmentResult {
|
|
|
869
876
|
*/
|
|
870
877
|
interface TrackingEvent {
|
|
871
878
|
trackingNumber: string;
|
|
872
|
-
status: 'in_transit' | 'delivered' | 'cancelled'
|
|
879
|
+
status: 'in_transit' | 'delivered' | 'cancelled'
|
|
880
|
+
/** A delivery attempt failed; the package is still with the carrier. */
|
|
881
|
+
| 'delivery_failed'
|
|
882
|
+
/** The package is coming back to (or reached) the sender. */
|
|
883
|
+
| 'returned' | 'unknown';
|
|
873
884
|
/** ISO-8601 instant the carrier reported the change, when available. */
|
|
874
885
|
occurredAt?: string;
|
|
875
886
|
/** Human-readable carrier status, for audit/logging. */
|
|
@@ -1569,8 +1580,24 @@ declare enum ContentBlockType {
|
|
|
1569
1580
|
Link = "link",
|
|
1570
1581
|
Divider = "divider",
|
|
1571
1582
|
Action = "action",
|
|
1572
|
-
Card = "card"
|
|
1583
|
+
Card = "card",
|
|
1584
|
+
/** Headline metric (label + pre-formatted value). Pure JSON data. */
|
|
1585
|
+
Stat = "stat",
|
|
1586
|
+
/** Read-only table of scalar cells. Pure JSON data. */
|
|
1587
|
+
Table = "table",
|
|
1588
|
+
/** Simple bar/line chart over labelled series. Pure JSON data. */
|
|
1589
|
+
Chart = "chart"
|
|
1573
1590
|
}
|
|
1591
|
+
/**
|
|
1592
|
+
* Host-owned slots the SDK knows by name. `slot` stays a free string on the
|
|
1593
|
+
* wire (an older host ignores a slot it does not know); these constants only
|
|
1594
|
+
* give first-party plugins one spelling.
|
|
1595
|
+
*/
|
|
1596
|
+
declare const UiSlot: {
|
|
1597
|
+
/** Full-page surface of an app in the admin (the app owns the whole body). */
|
|
1598
|
+
readonly AdminAppPage: "admin:app.page";
|
|
1599
|
+
};
|
|
1600
|
+
type UiSlot = (typeof UiSlot)[keyof typeof UiSlot];
|
|
1574
1601
|
declare enum ContentActionVariant {
|
|
1575
1602
|
Primary = "primary",
|
|
1576
1603
|
Secondary = "secondary",
|
|
@@ -1642,7 +1669,51 @@ interface CardBlock {
|
|
|
1642
1669
|
description?: string;
|
|
1643
1670
|
blocks: ContentBlock[];
|
|
1644
1671
|
}
|
|
1645
|
-
|
|
1672
|
+
/**
|
|
1673
|
+
* Headline metric. `value` is already formatted by the plugin (the host does
|
|
1674
|
+
* not guess units/locale). `estimate: true` makes the host label it as an
|
|
1675
|
+
* ESTIMATE next to the value, so a derived number is never shown as a fact.
|
|
1676
|
+
*/
|
|
1677
|
+
interface StatBlock {
|
|
1678
|
+
type: ContentBlockType.Stat;
|
|
1679
|
+
label: string;
|
|
1680
|
+
value?: string;
|
|
1681
|
+
computedKey?: string;
|
|
1682
|
+
hint?: string;
|
|
1683
|
+
variant?: MessageVariant;
|
|
1684
|
+
estimate?: boolean;
|
|
1685
|
+
}
|
|
1686
|
+
type TableCell = string | number | boolean | null;
|
|
1687
|
+
interface TableColumn {
|
|
1688
|
+
key: string;
|
|
1689
|
+
label: string;
|
|
1690
|
+
align?: 'left' | 'right';
|
|
1691
|
+
}
|
|
1692
|
+
/** Read-only table. Cells are scalars looked up by `columns[].key`. */
|
|
1693
|
+
interface TableBlock {
|
|
1694
|
+
type: ContentBlockType.Table;
|
|
1695
|
+
title?: string;
|
|
1696
|
+
columns: TableColumn[];
|
|
1697
|
+
rows: Array<Record<string, TableCell>>;
|
|
1698
|
+
/** Shown instead of the body when `rows` is empty. */
|
|
1699
|
+
emptyText?: string;
|
|
1700
|
+
}
|
|
1701
|
+
interface ChartSeries {
|
|
1702
|
+
name: string;
|
|
1703
|
+
/** One value per label; `null` = no observation (a gap, not a zero). */
|
|
1704
|
+
data: Array<number | null>;
|
|
1705
|
+
}
|
|
1706
|
+
/** Simple chart: `labels` is the x axis, every series aligns to it. */
|
|
1707
|
+
interface ChartBlock {
|
|
1708
|
+
type: ContentBlockType.Chart;
|
|
1709
|
+
kind: 'bar' | 'line';
|
|
1710
|
+
title?: string;
|
|
1711
|
+
labels: string[];
|
|
1712
|
+
series: ChartSeries[];
|
|
1713
|
+
unit?: string;
|
|
1714
|
+
emptyText?: string;
|
|
1715
|
+
}
|
|
1716
|
+
type ContentBlock = TextBlock | BannerBlock | BadgeBlock | KeyValueBlock | CopyFieldBlock | LinkBlock | DividerBlock | ActionBlock | CardBlock | StatBlock | TableBlock | ChartBlock;
|
|
1646
1717
|
/**
|
|
1647
1718
|
* One block tree the plugin injects into a host slot. `slot` names a host-owned
|
|
1648
1719
|
* target (e.g. "admin:order.detail.sidebar", "storefront:product.below"); the
|
|
@@ -1654,9 +1725,22 @@ interface UiContribution {
|
|
|
1654
1725
|
blocks: ContentBlock[];
|
|
1655
1726
|
order?: number;
|
|
1656
1727
|
}
|
|
1728
|
+
/** Runtime context the host hands to {@link IUiPlugin.resolveContributions}. */
|
|
1729
|
+
interface UiSlotContext {
|
|
1730
|
+
/** Free-form, JSON-serializable params chosen by the page (e.g. country). */
|
|
1731
|
+
params?: Record<string, unknown>;
|
|
1732
|
+
}
|
|
1657
1733
|
/** Impl behind a `ui` capability — the static set a plugin declares up front. */
|
|
1658
1734
|
interface IUiPlugin {
|
|
1659
1735
|
readonly contributions: UiContribution[];
|
|
1736
|
+
/**
|
|
1737
|
+
* Optional dynamic counterpart: for slots whose blocks depend on live data
|
|
1738
|
+
* (a full-page report), the host asks the plugin to build the block tree at
|
|
1739
|
+
* request time. Absent => the host serves the static `contributions`.
|
|
1740
|
+
* MUST resolve to pure-JSON blocks and SHOULD NOT throw: degrade to a
|
|
1741
|
+
* banner block explaining what is missing.
|
|
1742
|
+
*/
|
|
1743
|
+
resolveContributions?(slot: string, ctx: UiSlotContext): Promise<UiContribution[]>;
|
|
1660
1744
|
}
|
|
1661
1745
|
interface UiContributionsValidation {
|
|
1662
1746
|
success: boolean;
|
|
@@ -1796,4 +1880,4 @@ interface HostApi {
|
|
|
1796
1880
|
registerCapability<T = unknown>(cap: Capability<T>): void;
|
|
1797
1881
|
}
|
|
1798
1882
|
|
|
1799
|
-
export {
|
|
1883
|
+
export { type FieldBlock as $, AUTHOR_HANDLE_RE as A, type BannerBlock$1 as B, ConfigScope as C, type CarrierSettlement as D, type ChartBlock as E, FieldType as F, type ChartSeries as G, type CodConfig as H, type CodFeeConfig as I, CodFeeType as J, type CodPurchaseTrigger as K, type ConditionalBlock as L, type ConditionalEquals as M, type ConditionalWhen as N, type ConfigurablePlugin as O, type PluginConfigField as P, ContentActionVariant as Q, type ContentBlock as R, type SelectOption as S, ContentBlockType as T, type CopyFieldBlock$1 as U, type CreateShipmentParams as V, type DispatchContext as W, type DividerBlock$1 as X, type DomainEventHandler as Y, type DomainEventName as Z, type EmbedInit as _, type AccordionBlock as a, type SecretStore as a$, type FieldOption as a0, FieldVariant as a1, GatewayEnvironment as a2, type GatewayFeeConfig as a3, type GatewayStaticConfig as a4, type GroupBlock as a5, type HostApi as a6, type HttpClient as a7, type HttpRequest as a8, type HttpResponse as a9, type PaymentCard as aA, type PaymentConnect as aB, type PaymentConnectExchange as aC, type PaymentConnectParams as aD, type PaymentCustomer as aE, type PaymentGatewayCode as aF, type PaymentMerchantPricing as aG, type PaymentPayload as aH, type PaymentPluginConfig as aI, type PaymentRenderMode as aJ, type PaymentResult as aK, type PaymentSessionFees as aL, type PaymentSessionPayload as aM, type PaymentSessionResult as aN, type PaymentSettlementFees as aO, type PaymentVerifyPayload as aP, type PaymentWebhookSettlement as aQ, type PlaceSupplierOrderInput as aR, type Plugin as aS, type PluginActionContext as aT, type PluginActionResult as aU, type PluginAuthor as aV, type PluginConfigFieldDependency as aW, type PluginFactory as aX, type PluginManifest as aY, type RepeaterBlock as aZ, RepeaterSource as a_, type IAnalyticsPlugin as aa, type IInvoicingPlugin as ab, type IPaymentPlugin as ac, type IPlugin as ad, type IShippingPlugin as ae, type ISuppliersPlugin as af, type IUiPlugin as ag, type InlineRowBlock as ah, InvoiceDocumentType as ai, type InvoiceLine as aj, type InvoiceMoney as ak, type InvoiceParty as al, type InvoiceRequest as am, type InvoiceResult as an, InvoiceStatus as ao, type InvoiceTax as ap, type InvoicingDefaultConfig as aq, InvoicingFeature as ar, type InvoicingPluginConfig as as, type InvoicingStaticConfig as at, type KeyValueBlock$1 as au, type KeyValueRow$1 as av, LayoutMode as aw, type Logger as ax, type MarkdownBlock as ay, MessageVariant as az, type AccordionSection as b, shippingCapability as b$, type SequenceStore as b0, type SetupAction as b1, type SetupLayout as b2, type SetupLayoutValidation as b3, type SetupStep as b4, type ShipmentAddress as b5, type ShipmentParcel as b6, type ShipmentResult as b7, type ShippingDefaultConfig as b8, ShippingFeature as b9, type SuppliersDefaultConfig as bA, SuppliersFeature as bB, type SuppliersPluginConfig as bC, type SuppliersStaticConfig as bD, type TabItem as bE, type TableBlock as bF, type TableCell as bG, type TableColumn as bH, type TabsBlock as bI, type ToggleBlock as bJ, type TrackingEvent as bK, TransactionStatus as bL, type UiContribution as bM, type UiContributionsValidation as bN, UiSlot as bO, type UiSlotContext as bP, type VoidInvoiceInput as bQ, type WebhookSignatureResult as bR, analyticsCapability as bS, capability as bT, crossValidateSetupLayout as bU, definePlugin as bV, invoicingCapability as bW, isConfigurablePlugin as bX, isPluginFactory as bY, minorUnitDigits as bZ, paymentCapability as b_, type ShippingPluginConfig as ba, type ShippingQuote as bb, type ShippingQuoteParams as bc, type ShippingStaticConfig as bd, type StatBlock as be, StepStatusFrom as bf, type StepStatusFromAction as bg, type StepStatusFromFields as bh, type StepStatusSource as bi, type StorageBroker as bj, type SupplierCatalogQuery as bk, type SupplierFulfillmentEvent as bl, type SupplierListing as bm, type SupplierListingAttribute as bn, type SupplierListingPage as bo, type SupplierListingVariant as bp, type SupplierMoney as bq, type SupplierOrderAddressLevel as br, type SupplierOrderCustomer as bs, type SupplierOrderLine as bt, type SupplierOrderResult as bu, type SupplierOrderStatus as bv, type SupplierShipTo as bw, type SupplierShippingQuote as bx, type SupplierShippingQuoteInput as by, type SupplierStock as bz, type ActionBlock$1 as c, suppliersCapability as c0, toMajorUnits as c1, toMinorUnits as c2, uiCapability as c3, validatePluginAuthor as c4, validateSetupLayout as c5, validateUiContributions as c6, ActionVariant as d, type AnalyticsActionSource as e, type AnalyticsConsent as f, type AnalyticsEvent as g, type AnalyticsEventName as h, AnalyticsFeature as i, type AnalyticsItem as j, type AnalyticsMoney as k, type AnalyticsPluginConfig as l, type AnalyticsPurchasePolicy as m, type AnalyticsStaticConfig as n, type AnalyticsUserData as o, type AnalyticsUtm as p, type AuthorValidation as q, type Block as r, type BlockBase as s, BlockType as t, type CalloutBlock as u, type Capability as v, CapabilityKind as w, type CardBlock$1 as x, type CardBrand as y, type CarrierServiceMode as z };
|
package/dist/index.d.mts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { F as FieldType, C as ConfigScope, S as SelectOption, P as PluginConfigField } from './host-api-
|
|
2
|
-
export { A as AUTHOR_HANDLE_RE, a as AccordionBlock, b as AccordionSection, c as ActionBlock, d as ActionVariant, e as AnalyticsActionSource, f as AnalyticsConsent, g as AnalyticsEvent, h as AnalyticsEventName, i as AnalyticsFeature, j as AnalyticsItem, k as AnalyticsMoney, l as AnalyticsPluginConfig, m as AnalyticsPurchasePolicy, n as AnalyticsStaticConfig, o as AnalyticsUserData, p as AnalyticsUtm, q as AuthorValidation, B as BannerBlock, r as Block, s as BlockBase, t as BlockType, u as CalloutBlock, v as Capability, w as CapabilityKind, x as CardBlock, y as CardBrand, z as CarrierServiceMode, D as CarrierSettlement, E as
|
|
1
|
+
import { F as FieldType, C as ConfigScope, S as SelectOption, P as PluginConfigField } from './host-api-DVbKGytN.mjs';
|
|
2
|
+
export { A as AUTHOR_HANDLE_RE, a as AccordionBlock, b as AccordionSection, c as ActionBlock, d as ActionVariant, e as AnalyticsActionSource, f as AnalyticsConsent, g as AnalyticsEvent, h as AnalyticsEventName, i as AnalyticsFeature, j as AnalyticsItem, k as AnalyticsMoney, l as AnalyticsPluginConfig, m as AnalyticsPurchasePolicy, n as AnalyticsStaticConfig, o as AnalyticsUserData, p as AnalyticsUtm, q as AuthorValidation, B as BannerBlock, r as Block, s as BlockBase, t as BlockType, u as CalloutBlock, v as Capability, w as CapabilityKind, x as CardBlock, y as CardBrand, z as CarrierServiceMode, D as CarrierSettlement, E as ChartBlock, G as ChartSeries, H as CodConfig, I as CodFeeConfig, J as CodFeeType, K as CodPurchaseTrigger, L as ConditionalBlock, M as ConditionalEquals, N as ConditionalWhen, O as ConfigurablePlugin, Q as ContentActionVariant, R as ContentBlock, T as ContentBlockType, U as CopyFieldBlock, V as CreateShipmentParams, W as DispatchContext, X as DividerBlock, Y as DomainEventHandler, Z as DomainEventName, _ as EmbedInit, $ as FieldBlock, a0 as FieldOption, a1 as FieldVariant, a2 as GatewayEnvironment, a3 as GatewayFeeConfig, a4 as GatewayStaticConfig, a5 as GroupBlock, a6 as HostApi, a7 as HttpClient, a8 as HttpRequest, a9 as HttpResponse, aa as IAnalyticsPlugin, ab as IInvoicingPlugin, ac as IPaymentPlugin, ad as IPlugin, ae as IShippingPlugin, af as ISuppliersPlugin, ag as IUiPlugin, ah as InlineRowBlock, ai as InvoiceDocumentType, aj as InvoiceLine, ak as InvoiceMoney, al as InvoiceParty, am as InvoiceRequest, an as InvoiceResult, ao as InvoiceStatus, ap as InvoiceTax, aq as InvoicingDefaultConfig, ar as InvoicingFeature, as as InvoicingPluginConfig, at as InvoicingStaticConfig, au as KeyValueBlock, av as KeyValueRow, aw as LayoutMode, ax as Logger, ay as MarkdownBlock, az as MessageVariant, aA as PaymentCard, aB as PaymentConnect, aC as PaymentConnectExchange, aD as PaymentConnectParams, aE as PaymentCustomer, aF as PaymentGatewayCode, aG as PaymentMerchantPricing, aH as PaymentPayload, aI as PaymentPluginConfig, aJ as PaymentRenderMode, aK as PaymentResult, aL as PaymentSessionFees, aM as PaymentSessionPayload, aN as PaymentSessionResult, aO as PaymentSettlementFees, aP as PaymentVerifyPayload, aQ as PaymentWebhookSettlement, aR as PlaceSupplierOrderInput, aS as Plugin, aT as PluginActionContext, aU as PluginActionResult, aV as PluginAuthor, aW as PluginConfigFieldDependency, aX as PluginFactory, aY as PluginManifest, aZ as RepeaterBlock, a_ as RepeaterSource, a$ as SecretStore, b0 as SequenceStore, b1 as SetupAction, b2 as SetupLayout, b3 as SetupLayoutValidation, b4 as SetupStep, b5 as ShipmentAddress, b6 as ShipmentParcel, b7 as ShipmentResult, b8 as ShippingDefaultConfig, b9 as ShippingFeature, ba as ShippingPluginConfig, bb as ShippingQuote, bc as ShippingQuoteParams, bd as ShippingStaticConfig, be as StatBlock, bf as StepStatusFrom, bg as StepStatusFromAction, bh as StepStatusFromFields, bi as StepStatusSource, bj as StorageBroker, bk as SupplierCatalogQuery, bl as SupplierFulfillmentEvent, bm as SupplierListing, bn as SupplierListingAttribute, bo as SupplierListingPage, bp as SupplierListingVariant, bq as SupplierMoney, br as SupplierOrderAddressLevel, bs as SupplierOrderCustomer, bt as SupplierOrderLine, bu as SupplierOrderResult, bv as SupplierOrderStatus, bw as SupplierShipTo, bx as SupplierShippingQuote, by as SupplierShippingQuoteInput, bz as SupplierStock, bA as SuppliersDefaultConfig, bB as SuppliersFeature, bC as SuppliersPluginConfig, bD as SuppliersStaticConfig, bE as TabItem, bF as TableBlock, bG as TableCell, bH as TableColumn, bI as TabsBlock, bJ as ToggleBlock, bK as TrackingEvent, bL as TransactionStatus, bM as UiContribution, bN as UiContributionsValidation, bO as UiSlot, bP as UiSlotContext, bQ as VoidInvoiceInput, bR as WebhookSignatureResult, bS as analyticsCapability, bT as capability, bU as crossValidateSetupLayout, bV as definePlugin, bW as invoicingCapability, bX as isConfigurablePlugin, bY as isPluginFactory, bZ as minorUnitDigits, b_ as paymentCapability, b$ as shippingCapability, c0 as suppliersCapability, c1 as toMajorUnits, c2 as toMinorUnits, c3 as uiCapability, c4 as validatePluginAuthor, c5 as validateSetupLayout, c6 as validateUiContributions } from './host-api-DVbKGytN.mjs';
|
|
3
3
|
|
|
4
4
|
declare const PAYMENT_PLUGIN_TOKEN: "PAYMENT_PLUGINS";
|
|
5
5
|
declare const SHIPPING_PLUGIN_TOKEN: "SHIPPING_PLUGINS";
|
|
@@ -74,7 +74,7 @@ declare function checkPermissions(required: string[], grantedRaw: string[]): Per
|
|
|
74
74
|
* - MINOR: additive (new optional fields, new tokens) — backwards compatible.
|
|
75
75
|
* - PATCH: docs/fixes with zero shape changes.
|
|
76
76
|
*/
|
|
77
|
-
declare const SDK_VERSION = "0.
|
|
77
|
+
declare const SDK_VERSION = "0.7.1";
|
|
78
78
|
/**
|
|
79
79
|
* True when a plugin built against `pluginSdkVersion` can run on a host that
|
|
80
80
|
* ships `hostSdkVersion`. Rule: same major, host minor >= plugin minor.
|
package/dist/index.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { F as FieldType, C as ConfigScope, S as SelectOption, P as PluginConfigField } from './host-api-
|
|
2
|
-
export { A as AUTHOR_HANDLE_RE, a as AccordionBlock, b as AccordionSection, c as ActionBlock, d as ActionVariant, e as AnalyticsActionSource, f as AnalyticsConsent, g as AnalyticsEvent, h as AnalyticsEventName, i as AnalyticsFeature, j as AnalyticsItem, k as AnalyticsMoney, l as AnalyticsPluginConfig, m as AnalyticsPurchasePolicy, n as AnalyticsStaticConfig, o as AnalyticsUserData, p as AnalyticsUtm, q as AuthorValidation, B as BannerBlock, r as Block, s as BlockBase, t as BlockType, u as CalloutBlock, v as Capability, w as CapabilityKind, x as CardBlock, y as CardBrand, z as CarrierServiceMode, D as CarrierSettlement, E as
|
|
1
|
+
import { F as FieldType, C as ConfigScope, S as SelectOption, P as PluginConfigField } from './host-api-DVbKGytN.js';
|
|
2
|
+
export { A as AUTHOR_HANDLE_RE, a as AccordionBlock, b as AccordionSection, c as ActionBlock, d as ActionVariant, e as AnalyticsActionSource, f as AnalyticsConsent, g as AnalyticsEvent, h as AnalyticsEventName, i as AnalyticsFeature, j as AnalyticsItem, k as AnalyticsMoney, l as AnalyticsPluginConfig, m as AnalyticsPurchasePolicy, n as AnalyticsStaticConfig, o as AnalyticsUserData, p as AnalyticsUtm, q as AuthorValidation, B as BannerBlock, r as Block, s as BlockBase, t as BlockType, u as CalloutBlock, v as Capability, w as CapabilityKind, x as CardBlock, y as CardBrand, z as CarrierServiceMode, D as CarrierSettlement, E as ChartBlock, G as ChartSeries, H as CodConfig, I as CodFeeConfig, J as CodFeeType, K as CodPurchaseTrigger, L as ConditionalBlock, M as ConditionalEquals, N as ConditionalWhen, O as ConfigurablePlugin, Q as ContentActionVariant, R as ContentBlock, T as ContentBlockType, U as CopyFieldBlock, V as CreateShipmentParams, W as DispatchContext, X as DividerBlock, Y as DomainEventHandler, Z as DomainEventName, _ as EmbedInit, $ as FieldBlock, a0 as FieldOption, a1 as FieldVariant, a2 as GatewayEnvironment, a3 as GatewayFeeConfig, a4 as GatewayStaticConfig, a5 as GroupBlock, a6 as HostApi, a7 as HttpClient, a8 as HttpRequest, a9 as HttpResponse, aa as IAnalyticsPlugin, ab as IInvoicingPlugin, ac as IPaymentPlugin, ad as IPlugin, ae as IShippingPlugin, af as ISuppliersPlugin, ag as IUiPlugin, ah as InlineRowBlock, ai as InvoiceDocumentType, aj as InvoiceLine, ak as InvoiceMoney, al as InvoiceParty, am as InvoiceRequest, an as InvoiceResult, ao as InvoiceStatus, ap as InvoiceTax, aq as InvoicingDefaultConfig, ar as InvoicingFeature, as as InvoicingPluginConfig, at as InvoicingStaticConfig, au as KeyValueBlock, av as KeyValueRow, aw as LayoutMode, ax as Logger, ay as MarkdownBlock, az as MessageVariant, aA as PaymentCard, aB as PaymentConnect, aC as PaymentConnectExchange, aD as PaymentConnectParams, aE as PaymentCustomer, aF as PaymentGatewayCode, aG as PaymentMerchantPricing, aH as PaymentPayload, aI as PaymentPluginConfig, aJ as PaymentRenderMode, aK as PaymentResult, aL as PaymentSessionFees, aM as PaymentSessionPayload, aN as PaymentSessionResult, aO as PaymentSettlementFees, aP as PaymentVerifyPayload, aQ as PaymentWebhookSettlement, aR as PlaceSupplierOrderInput, aS as Plugin, aT as PluginActionContext, aU as PluginActionResult, aV as PluginAuthor, aW as PluginConfigFieldDependency, aX as PluginFactory, aY as PluginManifest, aZ as RepeaterBlock, a_ as RepeaterSource, a$ as SecretStore, b0 as SequenceStore, b1 as SetupAction, b2 as SetupLayout, b3 as SetupLayoutValidation, b4 as SetupStep, b5 as ShipmentAddress, b6 as ShipmentParcel, b7 as ShipmentResult, b8 as ShippingDefaultConfig, b9 as ShippingFeature, ba as ShippingPluginConfig, bb as ShippingQuote, bc as ShippingQuoteParams, bd as ShippingStaticConfig, be as StatBlock, bf as StepStatusFrom, bg as StepStatusFromAction, bh as StepStatusFromFields, bi as StepStatusSource, bj as StorageBroker, bk as SupplierCatalogQuery, bl as SupplierFulfillmentEvent, bm as SupplierListing, bn as SupplierListingAttribute, bo as SupplierListingPage, bp as SupplierListingVariant, bq as SupplierMoney, br as SupplierOrderAddressLevel, bs as SupplierOrderCustomer, bt as SupplierOrderLine, bu as SupplierOrderResult, bv as SupplierOrderStatus, bw as SupplierShipTo, bx as SupplierShippingQuote, by as SupplierShippingQuoteInput, bz as SupplierStock, bA as SuppliersDefaultConfig, bB as SuppliersFeature, bC as SuppliersPluginConfig, bD as SuppliersStaticConfig, bE as TabItem, bF as TableBlock, bG as TableCell, bH as TableColumn, bI as TabsBlock, bJ as ToggleBlock, bK as TrackingEvent, bL as TransactionStatus, bM as UiContribution, bN as UiContributionsValidation, bO as UiSlot, bP as UiSlotContext, bQ as VoidInvoiceInput, bR as WebhookSignatureResult, bS as analyticsCapability, bT as capability, bU as crossValidateSetupLayout, bV as definePlugin, bW as invoicingCapability, bX as isConfigurablePlugin, bY as isPluginFactory, bZ as minorUnitDigits, b_ as paymentCapability, b$ as shippingCapability, c0 as suppliersCapability, c1 as toMajorUnits, c2 as toMinorUnits, c3 as uiCapability, c4 as validatePluginAuthor, c5 as validateSetupLayout, c6 as validateUiContributions } from './host-api-DVbKGytN.js';
|
|
3
3
|
|
|
4
4
|
declare const PAYMENT_PLUGIN_TOKEN: "PAYMENT_PLUGINS";
|
|
5
5
|
declare const SHIPPING_PLUGIN_TOKEN: "SHIPPING_PLUGINS";
|
|
@@ -74,7 +74,7 @@ declare function checkPermissions(required: string[], grantedRaw: string[]): Per
|
|
|
74
74
|
* - MINOR: additive (new optional fields, new tokens) — backwards compatible.
|
|
75
75
|
* - PATCH: docs/fixes with zero shape changes.
|
|
76
76
|
*/
|
|
77
|
-
declare const SDK_VERSION = "0.
|
|
77
|
+
declare const SDK_VERSION = "0.7.1";
|
|
78
78
|
/**
|
|
79
79
|
* True when a plugin built against `pluginSdkVersion` can run on a host that
|
|
80
80
|
* ships `hostSdkVersion`. Rule: same major, host minor >= plugin minor.
|
package/dist/index.js
CHANGED
|
@@ -48,6 +48,7 @@ __export(index_exports, {
|
|
|
48
48
|
StepStatusFrom: () => StepStatusFrom,
|
|
49
49
|
SuppliersFeature: () => SuppliersFeature,
|
|
50
50
|
TransactionStatus: () => TransactionStatus,
|
|
51
|
+
UiSlot: () => UiSlot,
|
|
51
52
|
analyticsCapability: () => analyticsCapability,
|
|
52
53
|
capability: () => capability,
|
|
53
54
|
checkPermissions: () => checkPermissions,
|
|
@@ -568,8 +569,15 @@ var ContentBlockType = /* @__PURE__ */ ((ContentBlockType2) => {
|
|
|
568
569
|
ContentBlockType2["Divider"] = "divider";
|
|
569
570
|
ContentBlockType2["Action"] = "action";
|
|
570
571
|
ContentBlockType2["Card"] = "card";
|
|
572
|
+
ContentBlockType2["Stat"] = "stat";
|
|
573
|
+
ContentBlockType2["Table"] = "table";
|
|
574
|
+
ContentBlockType2["Chart"] = "chart";
|
|
571
575
|
return ContentBlockType2;
|
|
572
576
|
})(ContentBlockType || {});
|
|
577
|
+
var UiSlot = {
|
|
578
|
+
/** Full-page surface of an app in the admin (the app owns the whole body). */
|
|
579
|
+
AdminAppPage: "admin:app.page"
|
|
580
|
+
};
|
|
573
581
|
var ContentActionVariant = /* @__PURE__ */ ((ContentActionVariant2) => {
|
|
574
582
|
ContentActionVariant2["Primary"] = "primary";
|
|
575
583
|
ContentActionVariant2["Secondary"] = "secondary";
|
|
@@ -625,6 +633,43 @@ var sActionBlock2 = (0, import_superstruct3.object)({
|
|
|
625
633
|
label: (0, import_superstruct3.string)(),
|
|
626
634
|
variant: (0, import_superstruct3.optional)(sContentActionVariant)
|
|
627
635
|
});
|
|
636
|
+
var sTableCell = (0, import_superstruct3.union)([(0, import_superstruct3.string)(), (0, import_superstruct3.number)(), (0, import_superstruct3.boolean)(), (0, import_superstruct3.literal)(null)]);
|
|
637
|
+
var sStatBlock = (0, import_superstruct3.object)({
|
|
638
|
+
type: (0, import_superstruct3.literal)("stat" /* Stat */),
|
|
639
|
+
label: (0, import_superstruct3.string)(),
|
|
640
|
+
value: (0, import_superstruct3.optional)((0, import_superstruct3.string)()),
|
|
641
|
+
computedKey: (0, import_superstruct3.optional)((0, import_superstruct3.string)()),
|
|
642
|
+
hint: (0, import_superstruct3.optional)((0, import_superstruct3.string)()),
|
|
643
|
+
variant: (0, import_superstruct3.optional)(sMessageVariant2),
|
|
644
|
+
estimate: (0, import_superstruct3.optional)((0, import_superstruct3.boolean)())
|
|
645
|
+
});
|
|
646
|
+
var sTableBlock = (0, import_superstruct3.object)({
|
|
647
|
+
type: (0, import_superstruct3.literal)("table" /* Table */),
|
|
648
|
+
title: (0, import_superstruct3.optional)((0, import_superstruct3.string)()),
|
|
649
|
+
columns: (0, import_superstruct3.array)(
|
|
650
|
+
(0, import_superstruct3.object)({
|
|
651
|
+
key: (0, import_superstruct3.string)(),
|
|
652
|
+
label: (0, import_superstruct3.string)(),
|
|
653
|
+
align: (0, import_superstruct3.optional)((0, import_superstruct3.enums)(["left", "right"]))
|
|
654
|
+
})
|
|
655
|
+
),
|
|
656
|
+
rows: (0, import_superstruct3.array)((0, import_superstruct3.record)((0, import_superstruct3.string)(), sTableCell)),
|
|
657
|
+
emptyText: (0, import_superstruct3.optional)((0, import_superstruct3.string)())
|
|
658
|
+
});
|
|
659
|
+
var sChartBlock = (0, import_superstruct3.object)({
|
|
660
|
+
type: (0, import_superstruct3.literal)("chart" /* Chart */),
|
|
661
|
+
kind: (0, import_superstruct3.enums)(["bar", "line"]),
|
|
662
|
+
title: (0, import_superstruct3.optional)((0, import_superstruct3.string)()),
|
|
663
|
+
labels: (0, import_superstruct3.array)((0, import_superstruct3.string)()),
|
|
664
|
+
series: (0, import_superstruct3.array)(
|
|
665
|
+
(0, import_superstruct3.object)({
|
|
666
|
+
name: (0, import_superstruct3.string)(),
|
|
667
|
+
data: (0, import_superstruct3.array)((0, import_superstruct3.union)([(0, import_superstruct3.number)(), (0, import_superstruct3.literal)(null)]))
|
|
668
|
+
})
|
|
669
|
+
),
|
|
670
|
+
unit: (0, import_superstruct3.optional)((0, import_superstruct3.string)()),
|
|
671
|
+
emptyText: (0, import_superstruct3.optional)((0, import_superstruct3.string)())
|
|
672
|
+
});
|
|
628
673
|
var sCardBlock2 = (0, import_superstruct3.object)({
|
|
629
674
|
type: (0, import_superstruct3.literal)("card" /* Card */),
|
|
630
675
|
title: (0, import_superstruct3.optional)((0, import_superstruct3.string)()),
|
|
@@ -640,7 +685,10 @@ var sContentBlock = (0, import_superstruct3.union)([
|
|
|
640
685
|
sLinkBlock,
|
|
641
686
|
sDividerBlock2,
|
|
642
687
|
sActionBlock2,
|
|
643
|
-
sCardBlock2
|
|
688
|
+
sCardBlock2,
|
|
689
|
+
sStatBlock,
|
|
690
|
+
sTableBlock,
|
|
691
|
+
sChartBlock
|
|
644
692
|
]);
|
|
645
693
|
var sUiContribution = (0, import_superstruct3.object)({
|
|
646
694
|
slot: (0, import_superstruct3.string)(),
|
|
@@ -741,7 +789,7 @@ function checkPermissions(required, grantedRaw) {
|
|
|
741
789
|
}
|
|
742
790
|
|
|
743
791
|
// src/version.ts
|
|
744
|
-
var SDK_VERSION = "0.
|
|
792
|
+
var SDK_VERSION = "0.7.1";
|
|
745
793
|
function isSdkCompatible(pluginSdkVersion, hostSdkVersion) {
|
|
746
794
|
const parse = (v) => {
|
|
747
795
|
const m = /^(\d+)\.(\d+)\.(\d+)/.exec(v);
|
|
@@ -786,6 +834,7 @@ function isSdkCompatible(pluginSdkVersion, hostSdkVersion) {
|
|
|
786
834
|
StepStatusFrom,
|
|
787
835
|
SuppliersFeature,
|
|
788
836
|
TransactionStatus,
|
|
837
|
+
UiSlot,
|
|
789
838
|
analyticsCapability,
|
|
790
839
|
capability,
|
|
791
840
|
checkPermissions,
|
package/dist/index.mjs
CHANGED
|
@@ -517,6 +517,7 @@ import {
|
|
|
517
517
|
number as number3,
|
|
518
518
|
object as object2,
|
|
519
519
|
optional as optional3,
|
|
520
|
+
record,
|
|
520
521
|
string as string3,
|
|
521
522
|
union as union2,
|
|
522
523
|
validate as validate3
|
|
@@ -531,8 +532,15 @@ var ContentBlockType = /* @__PURE__ */ ((ContentBlockType2) => {
|
|
|
531
532
|
ContentBlockType2["Divider"] = "divider";
|
|
532
533
|
ContentBlockType2["Action"] = "action";
|
|
533
534
|
ContentBlockType2["Card"] = "card";
|
|
535
|
+
ContentBlockType2["Stat"] = "stat";
|
|
536
|
+
ContentBlockType2["Table"] = "table";
|
|
537
|
+
ContentBlockType2["Chart"] = "chart";
|
|
534
538
|
return ContentBlockType2;
|
|
535
539
|
})(ContentBlockType || {});
|
|
540
|
+
var UiSlot = {
|
|
541
|
+
/** Full-page surface of an app in the admin (the app owns the whole body). */
|
|
542
|
+
AdminAppPage: "admin:app.page"
|
|
543
|
+
};
|
|
536
544
|
var ContentActionVariant = /* @__PURE__ */ ((ContentActionVariant2) => {
|
|
537
545
|
ContentActionVariant2["Primary"] = "primary";
|
|
538
546
|
ContentActionVariant2["Secondary"] = "secondary";
|
|
@@ -588,6 +596,43 @@ var sActionBlock2 = object2({
|
|
|
588
596
|
label: string3(),
|
|
589
597
|
variant: optional3(sContentActionVariant)
|
|
590
598
|
});
|
|
599
|
+
var sTableCell = union2([string3(), number3(), boolean3(), literal2(null)]);
|
|
600
|
+
var sStatBlock = object2({
|
|
601
|
+
type: literal2("stat" /* Stat */),
|
|
602
|
+
label: string3(),
|
|
603
|
+
value: optional3(string3()),
|
|
604
|
+
computedKey: optional3(string3()),
|
|
605
|
+
hint: optional3(string3()),
|
|
606
|
+
variant: optional3(sMessageVariant2),
|
|
607
|
+
estimate: optional3(boolean3())
|
|
608
|
+
});
|
|
609
|
+
var sTableBlock = object2({
|
|
610
|
+
type: literal2("table" /* Table */),
|
|
611
|
+
title: optional3(string3()),
|
|
612
|
+
columns: array2(
|
|
613
|
+
object2({
|
|
614
|
+
key: string3(),
|
|
615
|
+
label: string3(),
|
|
616
|
+
align: optional3(enums3(["left", "right"]))
|
|
617
|
+
})
|
|
618
|
+
),
|
|
619
|
+
rows: array2(record(string3(), sTableCell)),
|
|
620
|
+
emptyText: optional3(string3())
|
|
621
|
+
});
|
|
622
|
+
var sChartBlock = object2({
|
|
623
|
+
type: literal2("chart" /* Chart */),
|
|
624
|
+
kind: enums3(["bar", "line"]),
|
|
625
|
+
title: optional3(string3()),
|
|
626
|
+
labels: array2(string3()),
|
|
627
|
+
series: array2(
|
|
628
|
+
object2({
|
|
629
|
+
name: string3(),
|
|
630
|
+
data: array2(union2([number3(), literal2(null)]))
|
|
631
|
+
})
|
|
632
|
+
),
|
|
633
|
+
unit: optional3(string3()),
|
|
634
|
+
emptyText: optional3(string3())
|
|
635
|
+
});
|
|
591
636
|
var sCardBlock2 = object2({
|
|
592
637
|
type: literal2("card" /* Card */),
|
|
593
638
|
title: optional3(string3()),
|
|
@@ -603,7 +648,10 @@ var sContentBlock = union2([
|
|
|
603
648
|
sLinkBlock,
|
|
604
649
|
sDividerBlock2,
|
|
605
650
|
sActionBlock2,
|
|
606
|
-
sCardBlock2
|
|
651
|
+
sCardBlock2,
|
|
652
|
+
sStatBlock,
|
|
653
|
+
sTableBlock,
|
|
654
|
+
sChartBlock
|
|
607
655
|
]);
|
|
608
656
|
var sUiContribution = object2({
|
|
609
657
|
slot: string3(),
|
|
@@ -672,7 +720,7 @@ function isPluginFactory(value) {
|
|
|
672
720
|
}
|
|
673
721
|
|
|
674
722
|
// src/version.ts
|
|
675
|
-
var SDK_VERSION = "0.
|
|
723
|
+
var SDK_VERSION = "0.7.1";
|
|
676
724
|
function isSdkCompatible(pluginSdkVersion, hostSdkVersion) {
|
|
677
725
|
const parse = (v) => {
|
|
678
726
|
const m = /^(\d+)\.(\d+)\.(\d+)/.exec(v);
|
|
@@ -716,6 +764,7 @@ export {
|
|
|
716
764
|
StepStatusFrom,
|
|
717
765
|
SuppliersFeature,
|
|
718
766
|
TransactionStatus,
|
|
767
|
+
UiSlot,
|
|
719
768
|
analyticsCapability,
|
|
720
769
|
capability,
|
|
721
770
|
checkPermissions,
|
package/dist/testing/index.d.mts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { a6 as HostApi, a8 as HttpRequest, Z as DomainEventName, v as Capability, Y as DomainEventHandler, a9 as HttpResponse, W as DispatchContext } from '../host-api-DVbKGytN.mjs';
|
|
2
2
|
|
|
3
3
|
/** Every recorded interaction, keyed by `"port.method"`. */
|
|
4
4
|
interface MockHostCalls {
|
package/dist/testing/index.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { a6 as HostApi, a8 as HttpRequest, Z as DomainEventName, v as Capability, Y as DomainEventHandler, a9 as HttpResponse, W as DispatchContext } from '../host-api-DVbKGytN.js';
|
|
2
2
|
|
|
3
3
|
/** Every recorded interaction, keyed by `"port.method"`. */
|
|
4
4
|
interface MockHostCalls {
|