@vivoa/plugin-sdk 0.7.1 → 0.8.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/{host-api-DVbKGytN.d.mts → host-api-D9g2w27d.d.mts} +258 -8
- package/dist/{host-api-DVbKGytN.d.ts → host-api-D9g2w27d.d.ts} +258 -8
- package/dist/index.d.mts +3 -3
- package/dist/index.d.ts +3 -3
- package/dist/index.js +131 -10
- package/dist/index.mjs +133 -10
- package/dist/testing/index.d.mts +7 -1
- package/dist/testing/index.d.ts +7 -1
- package/dist/testing/index.js +9 -0
- package/dist/testing/index.mjs +9 -0
- package/package.json +1 -1
|
@@ -991,6 +991,12 @@ interface SupplierStock {
|
|
|
991
991
|
interface SupplierListing {
|
|
992
992
|
/** Native id in the supplier catalog (product or catalog-item id). */
|
|
993
993
|
externalId: string;
|
|
994
|
+
/**
|
|
995
|
+
* When `externalId` is an item of the SELLER's catalog (e.g. Drop's
|
|
996
|
+
* catalogId), the id of the marketplace product it wraps: the one the
|
|
997
|
+
* supplier's public catalog uses. Absent when both are the same id.
|
|
998
|
+
*/
|
|
999
|
+
catalogProductId?: string | null;
|
|
994
1000
|
title: string;
|
|
995
1001
|
description?: string | null;
|
|
996
1002
|
sku?: string | null;
|
|
@@ -1586,8 +1592,28 @@ declare enum ContentBlockType {
|
|
|
1586
1592
|
/** Read-only table of scalar cells. Pure JSON data. */
|
|
1587
1593
|
Table = "table",
|
|
1588
1594
|
/** Simple bar/line chart over labelled series. Pure JSON data. */
|
|
1589
|
-
Chart = "chart"
|
|
1595
|
+
Chart = "chart",
|
|
1596
|
+
/**
|
|
1597
|
+
* Segmented choice bound to a page param (e.g. `days`). Picking an option
|
|
1598
|
+
* makes the host re-resolve the slot with `params[param] = value`. A VIEW
|
|
1599
|
+
* control, not config input: it never writes plugin settings.
|
|
1600
|
+
*/
|
|
1601
|
+
Filter = "filter",
|
|
1602
|
+
/** Lays its child blocks side by side in N responsive columns. */
|
|
1603
|
+
Grid = "grid",
|
|
1604
|
+
/** Free-text box bound to a page param (debounced by the host). */
|
|
1605
|
+
Search = "search",
|
|
1606
|
+
/** Collapsible section (closed by default): "how to read this", details. */
|
|
1607
|
+
Details = "details",
|
|
1608
|
+
/** One row of view controls (search, filters, links) above a list. */
|
|
1609
|
+
Toolbar = "toolbar"
|
|
1590
1610
|
}
|
|
1611
|
+
/**
|
|
1612
|
+
* A patch over the page params, for IN-PAGE navigation (links, table rows,
|
|
1613
|
+
* stats): the host merges it into the current params; `null` removes one.
|
|
1614
|
+
* It navigates (history entry, so "back" works); filters only replace.
|
|
1615
|
+
*/
|
|
1616
|
+
type PageParams = Record<string, string | null>;
|
|
1591
1617
|
/**
|
|
1592
1618
|
* Host-owned slots the SDK knows by name. `slot` stays a free string on the
|
|
1593
1619
|
* wire (an older host ignores a slot it does not know); these constants only
|
|
@@ -1647,6 +1673,8 @@ interface LinkBlock {
|
|
|
1647
1673
|
href?: string;
|
|
1648
1674
|
computedKey?: string;
|
|
1649
1675
|
external?: boolean;
|
|
1676
|
+
/** In-page navigation instead of `href` (see `PageParams`). */
|
|
1677
|
+
params?: PageParams;
|
|
1650
1678
|
}
|
|
1651
1679
|
interface DividerBlock {
|
|
1652
1680
|
type: ContentBlockType.Divider;
|
|
@@ -1667,6 +1695,12 @@ interface CardBlock {
|
|
|
1667
1695
|
type: ContentBlockType.Card;
|
|
1668
1696
|
title?: string;
|
|
1669
1697
|
description?: string;
|
|
1698
|
+
/**
|
|
1699
|
+
* Picture shown before the title, for a card that heads a record (a
|
|
1700
|
+
* product). `null` = the record has no picture: the host shows a
|
|
1701
|
+
* placeholder. Absent = no picture slot.
|
|
1702
|
+
*/
|
|
1703
|
+
image?: string | null;
|
|
1670
1704
|
blocks: ContentBlock[];
|
|
1671
1705
|
}
|
|
1672
1706
|
/**
|
|
@@ -1682,14 +1716,60 @@ interface StatBlock {
|
|
|
1682
1716
|
hint?: string;
|
|
1683
1717
|
variant?: MessageVariant;
|
|
1684
1718
|
estimate?: boolean;
|
|
1719
|
+
/** Makes the stat a link to more detail on the same page (e.g. what the KPI means). */
|
|
1720
|
+
params?: PageParams;
|
|
1721
|
+
/** Small trend line inside the stat, oldest first; `null` = a gap, never a zero. */
|
|
1722
|
+
trend?: Array<number | null>;
|
|
1723
|
+
}
|
|
1724
|
+
/**
|
|
1725
|
+
* A cell with more than its text: a second line, a thumbnail, a tone. Still
|
|
1726
|
+
* pure data; the host decides how each part looks.
|
|
1727
|
+
*/
|
|
1728
|
+
interface TableRichCell {
|
|
1729
|
+
text: string;
|
|
1730
|
+
/** Muted second line under the text (e.g. vendor, category). */
|
|
1731
|
+
caption?: string;
|
|
1732
|
+
/**
|
|
1733
|
+
* Thumbnail URL shown before the text. `null` = this row has no picture: the
|
|
1734
|
+
* host shows a placeholder so the column stays aligned.
|
|
1735
|
+
*/
|
|
1736
|
+
image?: string | null;
|
|
1737
|
+
/** Tints the text (e.g. `danger` for "sold out"). Never the only signal: say it in `text`. */
|
|
1738
|
+
tone?: MessageVariant;
|
|
1739
|
+
}
|
|
1740
|
+
type TableCell = string | number | boolean | null | TableRichCell;
|
|
1741
|
+
/** Makes a column header sort the table: the value its param takes when clicked. */
|
|
1742
|
+
interface TableColumnSort {
|
|
1743
|
+
value: string;
|
|
1744
|
+
/** Direction that value sorts in, for the header arrow (default `desc`). */
|
|
1745
|
+
dir?: 'asc' | 'desc';
|
|
1685
1746
|
}
|
|
1686
|
-
type TableCell = string | number | boolean | null;
|
|
1687
1747
|
interface TableColumn {
|
|
1688
1748
|
key: string;
|
|
1689
1749
|
label: string;
|
|
1690
1750
|
align?: 'left' | 'right';
|
|
1751
|
+
/** Short explanation of the column, shown on demand next to its header. */
|
|
1752
|
+
hint?: string;
|
|
1753
|
+
sort?: TableColumnSort;
|
|
1754
|
+
}
|
|
1755
|
+
/** The page param the sortable headers write, and the value the plugin sorted by. */
|
|
1756
|
+
interface TableSort {
|
|
1757
|
+
param: string;
|
|
1758
|
+
value: string;
|
|
1759
|
+
/** Params cleared when the sort changes (e.g. `page`). */
|
|
1760
|
+
resets?: string[];
|
|
1691
1761
|
}
|
|
1692
|
-
/**
|
|
1762
|
+
/**
|
|
1763
|
+
* Paging through a page param (1-based; the host removes the param on page 1).
|
|
1764
|
+
* The plugin already sliced `rows`: the host only shows the range and the pager.
|
|
1765
|
+
*/
|
|
1766
|
+
interface TablePagination {
|
|
1767
|
+
param: string;
|
|
1768
|
+
page: number;
|
|
1769
|
+
pageSize: number;
|
|
1770
|
+
total: number;
|
|
1771
|
+
}
|
|
1772
|
+
/** Read-only table. Cells are looked up by `columns[].key`. */
|
|
1693
1773
|
interface TableBlock {
|
|
1694
1774
|
type: ContentBlockType.Table;
|
|
1695
1775
|
title?: string;
|
|
@@ -1697,23 +1777,155 @@ interface TableBlock {
|
|
|
1697
1777
|
rows: Array<Record<string, TableCell>>;
|
|
1698
1778
|
/** Shown instead of the body when `rows` is empty. */
|
|
1699
1779
|
emptyText?: string;
|
|
1700
|
-
|
|
1780
|
+
/** Aligned with `rows`: a row with params is clickable (in-page navigation). */
|
|
1781
|
+
rowParams?: Array<PageParams | null>;
|
|
1782
|
+
/** Columns with `sort` become clickable headers bound to this param. */
|
|
1783
|
+
sort?: TableSort;
|
|
1784
|
+
pagination?: TablePagination;
|
|
1785
|
+
}
|
|
1786
|
+
/** How a chart value is written in axes and tooltips. */
|
|
1787
|
+
type ChartFormat = 'number' | 'currency' | 'percent';
|
|
1701
1788
|
interface ChartSeries {
|
|
1702
1789
|
name: string;
|
|
1703
1790
|
/** One value per label; `null` = no observation (a gap, not a zero). */
|
|
1704
1791
|
data: Array<number | null>;
|
|
1792
|
+
/** Shown in the tooltip only, never drawn (keeps the chart on ONE axis). */
|
|
1793
|
+
tooltipOnly?: boolean;
|
|
1794
|
+
/** Overrides the chart's `format` for this series. */
|
|
1795
|
+
format?: ChartFormat;
|
|
1796
|
+
}
|
|
1797
|
+
/** A horizontal line at a value (an average, a median, the previous period). */
|
|
1798
|
+
interface ChartReference {
|
|
1799
|
+
value: number;
|
|
1800
|
+
label: string;
|
|
1801
|
+
}
|
|
1802
|
+
/** A note pinned to one label (a sold-out day, an averaged day). */
|
|
1803
|
+
interface ChartMarker {
|
|
1804
|
+
/** One of `labels`. */
|
|
1805
|
+
label: string;
|
|
1806
|
+
text: string;
|
|
1807
|
+
tone?: MessageVariant;
|
|
1808
|
+
}
|
|
1809
|
+
/** A point of a `scatter`: one entity placed by two measures. */
|
|
1810
|
+
interface ChartPoint {
|
|
1811
|
+
x: number;
|
|
1812
|
+
y: number;
|
|
1813
|
+
label: string;
|
|
1814
|
+
/** Second line in the tooltip. */
|
|
1815
|
+
caption?: string;
|
|
1816
|
+
/** Clicking the point navigates (in-page, push). */
|
|
1817
|
+
params?: PageParams;
|
|
1818
|
+
/** Drawn in the de-emphasis gray (e.g. a thin sample). */
|
|
1819
|
+
muted?: boolean;
|
|
1820
|
+
}
|
|
1821
|
+
interface ChartAxis {
|
|
1822
|
+
label: string;
|
|
1823
|
+
format?: ChartFormat;
|
|
1824
|
+
/** `log` spreads a long tail (a few huge values among many small): ticks at powers of ten. Default `linear`. */
|
|
1825
|
+
scale?: 'linear' | 'log';
|
|
1705
1826
|
}
|
|
1706
|
-
/**
|
|
1827
|
+
/** Splits a scatter in four at (x, y); names go top-left, top-right, bottom-left, bottom-right. */
|
|
1828
|
+
interface ChartQuadrants {
|
|
1829
|
+
x: number;
|
|
1830
|
+
y: number;
|
|
1831
|
+
names?: [string, string, string, string];
|
|
1832
|
+
}
|
|
1833
|
+
/**
|
|
1834
|
+
* Chart: `labels` is the category axis, every series aligns to it.
|
|
1835
|
+
* `hbar` = horizontal bars, one row per label (best for long names). `scatter`
|
|
1836
|
+
* ignores labels/series and plots `points`. Everything past the first four
|
|
1837
|
+
* fields is optional: an older host draws the basics and ignores the rest.
|
|
1838
|
+
*/
|
|
1707
1839
|
interface ChartBlock {
|
|
1708
1840
|
type: ContentBlockType.Chart;
|
|
1709
|
-
kind: 'bar' | 'line';
|
|
1841
|
+
kind: 'bar' | 'line' | 'hbar' | 'area' | 'scatter';
|
|
1710
1842
|
title?: string;
|
|
1843
|
+
/** One line that says what to see in the chart; the plugin computes it. */
|
|
1844
|
+
summary?: string;
|
|
1711
1845
|
labels: string[];
|
|
1712
1846
|
series: ChartSeries[];
|
|
1713
1847
|
unit?: string;
|
|
1848
|
+
format?: ChartFormat;
|
|
1849
|
+
/** Currency code for `format: 'currency'`. */
|
|
1850
|
+
currency?: string;
|
|
1714
1851
|
emptyText?: string;
|
|
1852
|
+
/** Aligned with `labels`: a label with params is clickable (in-page, push). */
|
|
1853
|
+
labelParams?: Array<PageParams | null>;
|
|
1854
|
+
/** Index of the label to emphasise; the others turn gray. */
|
|
1855
|
+
highlight?: number;
|
|
1856
|
+
references?: ChartReference[];
|
|
1857
|
+
markers?: ChartMarker[];
|
|
1858
|
+
/** Stack the series (bar, hbar). */
|
|
1859
|
+
stacked?: boolean;
|
|
1860
|
+
points?: ChartPoint[];
|
|
1861
|
+
xAxis?: ChartAxis;
|
|
1862
|
+
yAxis?: ChartAxis;
|
|
1863
|
+
quadrants?: ChartQuadrants;
|
|
1864
|
+
}
|
|
1865
|
+
interface FilterOption {
|
|
1866
|
+
value: string;
|
|
1867
|
+
label: string;
|
|
1868
|
+
}
|
|
1869
|
+
/**
|
|
1870
|
+
* Choice over one page param. `value` is the option the plugin rendered with
|
|
1871
|
+
* (it read it from `UiSlotContext.params`, or chose a default).
|
|
1872
|
+
*/
|
|
1873
|
+
interface FilterBlock {
|
|
1874
|
+
type: ContentBlockType.Filter;
|
|
1875
|
+
param: string;
|
|
1876
|
+
label?: string;
|
|
1877
|
+
value: string;
|
|
1878
|
+
options: FilterOption[];
|
|
1879
|
+
/**
|
|
1880
|
+
* `segmented` (default) for a few options; `select` for many (in a `select`
|
|
1881
|
+
* an option with an empty value means "no filter"); `tabs` for the views of
|
|
1882
|
+
* the page.
|
|
1883
|
+
*/
|
|
1884
|
+
display?: 'segmented' | 'select' | 'tabs';
|
|
1885
|
+
/** Params cleared when this one changes (e.g. `page`). */
|
|
1886
|
+
resets?: string[];
|
|
1887
|
+
}
|
|
1888
|
+
/** Free-text box over one page param; the host debounces and replaces the URL. */
|
|
1889
|
+
interface SearchBlock {
|
|
1890
|
+
type: ContentBlockType.Search;
|
|
1891
|
+
param: string;
|
|
1892
|
+
value: string;
|
|
1893
|
+
label?: string;
|
|
1894
|
+
placeholder?: string;
|
|
1895
|
+
/** Params cleared when the text changes (e.g. `page`). */
|
|
1896
|
+
resets?: string[];
|
|
1897
|
+
}
|
|
1898
|
+
/** Collapsible section, closed unless `open`. Recurses into child `blocks`. */
|
|
1899
|
+
interface DetailsBlock {
|
|
1900
|
+
type: ContentBlockType.Details;
|
|
1901
|
+
summary: string;
|
|
1902
|
+
blocks: ContentBlock[];
|
|
1903
|
+
open?: boolean;
|
|
1715
1904
|
}
|
|
1716
|
-
|
|
1905
|
+
/**
|
|
1906
|
+
* One row of view controls above a list: search, filters, a "clear" link. It
|
|
1907
|
+
* wraps on a narrow screen and a search box takes the free width. Use `grid`
|
|
1908
|
+
* for content, this for controls.
|
|
1909
|
+
*/
|
|
1910
|
+
interface ToolbarBlock {
|
|
1911
|
+
type: ContentBlockType.Toolbar;
|
|
1912
|
+
blocks: ContentBlock[];
|
|
1913
|
+
}
|
|
1914
|
+
/**
|
|
1915
|
+
* How a grid shares the width. `even` (default): `columns` equal columns.
|
|
1916
|
+
* `main-aside`: the first block is a wide main column and the rest stack in a
|
|
1917
|
+
* narrow side column (a record page: charts left, facts right); `columns` is
|
|
1918
|
+
* ignored.
|
|
1919
|
+
*/
|
|
1920
|
+
type GridLayout = 'even' | 'main-aside';
|
|
1921
|
+
/** Child blocks in `columns` responsive columns (one column on narrow screens). */
|
|
1922
|
+
interface GridBlock {
|
|
1923
|
+
type: ContentBlockType.Grid;
|
|
1924
|
+
columns: 2 | 3 | 4;
|
|
1925
|
+
layout?: GridLayout;
|
|
1926
|
+
blocks: ContentBlock[];
|
|
1927
|
+
}
|
|
1928
|
+
type ContentBlock = TextBlock | BannerBlock | BadgeBlock | KeyValueBlock | CopyFieldBlock | LinkBlock | DividerBlock | ActionBlock | CardBlock | StatBlock | TableBlock | ChartBlock | FilterBlock | GridBlock | SearchBlock | DetailsBlock | ToolbarBlock;
|
|
1717
1929
|
/**
|
|
1718
1930
|
* One block tree the plugin injects into a host slot. `slot` names a host-owned
|
|
1719
1931
|
* target (e.g. "admin:order.detail.sidebar", "storefront:product.below"); the
|
|
@@ -1859,6 +2071,39 @@ interface StorageBroker {
|
|
|
1859
2071
|
interface SequenceStore {
|
|
1860
2072
|
next(scope: string): Promise<number>;
|
|
1861
2073
|
}
|
|
2074
|
+
/**
|
|
2075
|
+
* A product of THIS store that was imported from a supplier's catalog
|
|
2076
|
+
* (dropshipping). `externalId` is the supplier's own product id, so a plugin
|
|
2077
|
+
* can join it with that supplier's data without reading the host database.
|
|
2078
|
+
*/
|
|
2079
|
+
interface SourcedProduct {
|
|
2080
|
+
/** Local product id in this store. */
|
|
2081
|
+
productId: string;
|
|
2082
|
+
/** Local product title (what the merchant named it). */
|
|
2083
|
+
title: string;
|
|
2084
|
+
/** The supplier's product id. */
|
|
2085
|
+
externalId: string;
|
|
2086
|
+
/**
|
|
2087
|
+
* The supplier marketplace product this one comes from, when the host knows
|
|
2088
|
+
* it (see `SupplierListing.catalogProductId`). `null` = not linked yet.
|
|
2089
|
+
*/
|
|
2090
|
+
catalogProductId: string | null;
|
|
2091
|
+
/**
|
|
2092
|
+
* `true` when the product is priced under what its supplier charges TODAY
|
|
2093
|
+
* (cost + supplier fee), and the owner has not accepted selling that way.
|
|
2094
|
+
* The host owns the margin rules, so a plugin shows this instead of redoing
|
|
2095
|
+
* the math. Absent = this host does not say.
|
|
2096
|
+
*/
|
|
2097
|
+
belowFloor?: boolean;
|
|
2098
|
+
}
|
|
2099
|
+
/**
|
|
2100
|
+
* Read-only view of the store catalog, scoped by the host to the tenant of the
|
|
2101
|
+
* current call.
|
|
2102
|
+
*/
|
|
2103
|
+
interface CatalogReader {
|
|
2104
|
+
/** Products of this store sourced from `supplierCode` (e.g. `soydrop`). */
|
|
2105
|
+
listSourcedProducts(supplierCode: string): Promise<SourcedProduct[]>;
|
|
2106
|
+
}
|
|
1862
2107
|
type DomainEventName = string;
|
|
1863
2108
|
type DomainEventHandler = (payload: unknown) => void | Promise<void>;
|
|
1864
2109
|
/**
|
|
@@ -1874,10 +2119,15 @@ interface HostApi {
|
|
|
1874
2119
|
readonly secrets: SecretStore;
|
|
1875
2120
|
readonly storage: StorageBroker;
|
|
1876
2121
|
readonly sequence: SequenceStore;
|
|
2122
|
+
/**
|
|
2123
|
+
* Store catalog reads. Optional: a host that does not offer it leaves it
|
|
2124
|
+
* out, so a plugin must handle its absence (degrade, never assume).
|
|
2125
|
+
*/
|
|
2126
|
+
readonly catalog?: CatalogReader;
|
|
1877
2127
|
/** Subscribe to a host domain event (order.created, product.updated, ...). */
|
|
1878
2128
|
on(event: DomainEventName, handler: DomainEventHandler): void;
|
|
1879
2129
|
/** Expose a capability to the host's generic registry. */
|
|
1880
2130
|
registerCapability<T = unknown>(cap: Capability<T>): void;
|
|
1881
2131
|
}
|
|
1882
2132
|
|
|
1883
|
-
export { type
|
|
2133
|
+
export { type CopyFieldBlock$1 as $, AUTHOR_HANDLE_RE as A, type BannerBlock$1 as B, ConfigScope as C, type CarrierSettlement as D, type CatalogReader as E, FieldType as F, type ChartAxis as G, type ChartBlock as H, type ChartFormat as I, type ChartMarker as J, type ChartPoint as K, type ChartQuadrants as L, type ChartReference as M, type ChartSeries as N, type CodConfig as O, type PluginConfigField as P, type CodFeeConfig as Q, CodFeeType as R, type SelectOption as S, type CodPurchaseTrigger as T, type ConditionalBlock as U, type ConditionalEquals as V, type ConditionalWhen as W, type ConfigurablePlugin as X, ContentActionVariant as Y, type ContentBlock as Z, ContentBlockType as _, type AccordionBlock as a, type PaymentSessionResult as a$, type CreateShipmentParams as a0, type DetailsBlock as a1, type DispatchContext as a2, type DividerBlock$1 as a3, type DomainEventHandler as a4, type DomainEventName as a5, type EmbedInit as a6, type FieldBlock as a7, type FieldOption as a8, FieldVariant as a9, InvoiceStatus as aA, type InvoiceTax as aB, type InvoicingDefaultConfig as aC, InvoicingFeature as aD, type InvoicingPluginConfig as aE, type InvoicingStaticConfig as aF, type KeyValueBlock$1 as aG, type KeyValueRow$1 as aH, LayoutMode as aI, type LinkBlock as aJ, type Logger as aK, type MarkdownBlock as aL, MessageVariant as aM, type PageParams as aN, type PaymentCard as aO, type PaymentConnect as aP, type PaymentConnectExchange as aQ, type PaymentConnectParams as aR, type PaymentCustomer as aS, type PaymentGatewayCode as aT, type PaymentMerchantPricing as aU, type PaymentPayload as aV, type PaymentPluginConfig as aW, type PaymentRenderMode as aX, type PaymentResult as aY, type PaymentSessionFees as aZ, type PaymentSessionPayload as a_, type FilterBlock as aa, type FilterOption as ab, GatewayEnvironment as ac, type GatewayFeeConfig as ad, type GatewayStaticConfig as ae, type GridBlock as af, type GridLayout as ag, type GroupBlock as ah, type HostApi as ai, type HttpClient as aj, type HttpRequest as ak, type HttpResponse as al, type IAnalyticsPlugin as am, type IInvoicingPlugin as an, type IPaymentPlugin as ao, type IPlugin as ap, type IShippingPlugin as aq, type ISuppliersPlugin as ar, type IUiPlugin as as, type InlineRowBlock as at, InvoiceDocumentType as au, type InvoiceLine as av, type InvoiceMoney as aw, type InvoiceParty as ax, type InvoiceRequest as ay, type InvoiceResult as az, type AccordionSection as b, type TableSort as b$, type PaymentSettlementFees as b0, type PaymentVerifyPayload as b1, type PaymentWebhookSettlement as b2, type PlaceSupplierOrderInput as b3, type Plugin as b4, type PluginActionContext as b5, type PluginActionResult as b6, type PluginAuthor as b7, type PluginConfigFieldDependency as b8, type PluginFactory as b9, type SupplierCatalogQuery as bA, type SupplierFulfillmentEvent as bB, type SupplierListing as bC, type SupplierListingAttribute as bD, type SupplierListingPage as bE, type SupplierListingVariant as bF, type SupplierMoney as bG, type SupplierOrderAddressLevel as bH, type SupplierOrderCustomer as bI, type SupplierOrderLine as bJ, type SupplierOrderResult as bK, type SupplierOrderStatus as bL, type SupplierShipTo as bM, type SupplierShippingQuote as bN, type SupplierShippingQuoteInput as bO, type SupplierStock as bP, type SuppliersDefaultConfig as bQ, SuppliersFeature as bR, type SuppliersPluginConfig as bS, type SuppliersStaticConfig as bT, type TabItem as bU, type TableBlock as bV, type TableCell as bW, type TableColumn as bX, type TableColumnSort as bY, type TablePagination as bZ, type TableRichCell as b_, type PluginManifest as ba, type RepeaterBlock as bb, RepeaterSource as bc, type SearchBlock as bd, type SecretStore as be, type SequenceStore as bf, type SetupAction as bg, type SetupLayout as bh, type SetupLayoutValidation as bi, type SetupStep as bj, type ShipmentAddress as bk, type ShipmentParcel as bl, type ShipmentResult as bm, type ShippingDefaultConfig as bn, ShippingFeature as bo, type ShippingPluginConfig as bp, type ShippingQuote as bq, type ShippingQuoteParams as br, type ShippingStaticConfig as bs, type SourcedProduct as bt, type StatBlock as bu, StepStatusFrom as bv, type StepStatusFromAction as bw, type StepStatusFromFields as bx, type StepStatusSource as by, type StorageBroker as bz, type ActionBlock$1 as c, type TabsBlock as c0, type ToggleBlock as c1, type ToolbarBlock as c2, type TrackingEvent as c3, TransactionStatus as c4, type UiContribution as c5, type UiContributionsValidation as c6, UiSlot as c7, type UiSlotContext as c8, type VoidInvoiceInput as c9, type WebhookSignatureResult as ca, analyticsCapability as cb, capability as cc, crossValidateSetupLayout as cd, definePlugin as ce, invoicingCapability as cf, isConfigurablePlugin as cg, isPluginFactory as ch, minorUnitDigits as ci, paymentCapability as cj, shippingCapability as ck, suppliersCapability as cl, toMajorUnits as cm, toMinorUnits as cn, uiCapability as co, validatePluginAuthor as cp, validateSetupLayout as cq, validateUiContributions as cr, 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-D9g2w27d.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 CatalogReader, G as ChartAxis, H as ChartBlock, I as ChartFormat, J as ChartMarker, K as ChartPoint, L as ChartQuadrants, M as ChartReference, N as ChartSeries, O as CodConfig, Q as CodFeeConfig, R as CodFeeType, T as CodPurchaseTrigger, U as ConditionalBlock, V as ConditionalEquals, W as ConditionalWhen, X as ConfigurablePlugin, Y as ContentActionVariant, Z as ContentBlock, _ as ContentBlockType, $ as CopyFieldBlock, a0 as CreateShipmentParams, a1 as DetailsBlock, a2 as DispatchContext, a3 as DividerBlock, a4 as DomainEventHandler, a5 as DomainEventName, a6 as EmbedInit, a7 as FieldBlock, a8 as FieldOption, a9 as FieldVariant, aa as FilterBlock, ab as FilterOption, ac as GatewayEnvironment, ad as GatewayFeeConfig, ae as GatewayStaticConfig, af as GridBlock, ag as GridLayout, ah as GroupBlock, ai as HostApi, aj as HttpClient, ak as HttpRequest, al as HttpResponse, am as IAnalyticsPlugin, an as IInvoicingPlugin, ao as IPaymentPlugin, ap as IPlugin, aq as IShippingPlugin, ar as ISuppliersPlugin, as as IUiPlugin, at as InlineRowBlock, au as InvoiceDocumentType, av as InvoiceLine, aw as InvoiceMoney, ax as InvoiceParty, ay as InvoiceRequest, az as InvoiceResult, aA as InvoiceStatus, aB as InvoiceTax, aC as InvoicingDefaultConfig, aD as InvoicingFeature, aE as InvoicingPluginConfig, aF as InvoicingStaticConfig, aG as KeyValueBlock, aH as KeyValueRow, aI as LayoutMode, aJ as LinkBlock, aK as Logger, aL as MarkdownBlock, aM as MessageVariant, aN as PageParams, aO as PaymentCard, aP as PaymentConnect, aQ as PaymentConnectExchange, aR as PaymentConnectParams, aS as PaymentCustomer, aT as PaymentGatewayCode, aU as PaymentMerchantPricing, aV as PaymentPayload, aW as PaymentPluginConfig, aX as PaymentRenderMode, aY as PaymentResult, aZ as PaymentSessionFees, a_ as PaymentSessionPayload, a$ as PaymentSessionResult, b0 as PaymentSettlementFees, b1 as PaymentVerifyPayload, b2 as PaymentWebhookSettlement, b3 as PlaceSupplierOrderInput, b4 as Plugin, b5 as PluginActionContext, b6 as PluginActionResult, b7 as PluginAuthor, b8 as PluginConfigFieldDependency, b9 as PluginFactory, ba as PluginManifest, bb as RepeaterBlock, bc as RepeaterSource, bd as SearchBlock, be as SecretStore, bf as SequenceStore, bg as SetupAction, bh as SetupLayout, bi as SetupLayoutValidation, bj as SetupStep, bk as ShipmentAddress, bl as ShipmentParcel, bm as ShipmentResult, bn as ShippingDefaultConfig, bo as ShippingFeature, bp as ShippingPluginConfig, bq as ShippingQuote, br as ShippingQuoteParams, bs as ShippingStaticConfig, bt as SourcedProduct, bu as StatBlock, bv as StepStatusFrom, bw as StepStatusFromAction, bx as StepStatusFromFields, by as StepStatusSource, bz as StorageBroker, bA as SupplierCatalogQuery, bB as SupplierFulfillmentEvent, bC as SupplierListing, bD as SupplierListingAttribute, bE as SupplierListingPage, bF as SupplierListingVariant, bG as SupplierMoney, bH as SupplierOrderAddressLevel, bI as SupplierOrderCustomer, bJ as SupplierOrderLine, bK as SupplierOrderResult, bL as SupplierOrderStatus, bM as SupplierShipTo, bN as SupplierShippingQuote, bO as SupplierShippingQuoteInput, bP as SupplierStock, bQ as SuppliersDefaultConfig, bR as SuppliersFeature, bS as SuppliersPluginConfig, bT as SuppliersStaticConfig, bU as TabItem, bV as TableBlock, bW as TableCell, bX as TableColumn, bY as TableColumnSort, bZ as TablePagination, b_ as TableRichCell, b$ as TableSort, c0 as TabsBlock, c1 as ToggleBlock, c2 as ToolbarBlock, c3 as TrackingEvent, c4 as TransactionStatus, c5 as UiContribution, c6 as UiContributionsValidation, c7 as UiSlot, c8 as UiSlotContext, c9 as VoidInvoiceInput, ca as WebhookSignatureResult, cb as analyticsCapability, cc as capability, cd as crossValidateSetupLayout, ce as definePlugin, cf as invoicingCapability, cg as isConfigurablePlugin, ch as isPluginFactory, ci as minorUnitDigits, cj as paymentCapability, ck as shippingCapability, cl as suppliersCapability, cm as toMajorUnits, cn as toMinorUnits, co as uiCapability, cp as validatePluginAuthor, cq as validateSetupLayout, cr as validateUiContributions } from './host-api-D9g2w27d.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.8.0";
|
|
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-D9g2w27d.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 CatalogReader, G as ChartAxis, H as ChartBlock, I as ChartFormat, J as ChartMarker, K as ChartPoint, L as ChartQuadrants, M as ChartReference, N as ChartSeries, O as CodConfig, Q as CodFeeConfig, R as CodFeeType, T as CodPurchaseTrigger, U as ConditionalBlock, V as ConditionalEquals, W as ConditionalWhen, X as ConfigurablePlugin, Y as ContentActionVariant, Z as ContentBlock, _ as ContentBlockType, $ as CopyFieldBlock, a0 as CreateShipmentParams, a1 as DetailsBlock, a2 as DispatchContext, a3 as DividerBlock, a4 as DomainEventHandler, a5 as DomainEventName, a6 as EmbedInit, a7 as FieldBlock, a8 as FieldOption, a9 as FieldVariant, aa as FilterBlock, ab as FilterOption, ac as GatewayEnvironment, ad as GatewayFeeConfig, ae as GatewayStaticConfig, af as GridBlock, ag as GridLayout, ah as GroupBlock, ai as HostApi, aj as HttpClient, ak as HttpRequest, al as HttpResponse, am as IAnalyticsPlugin, an as IInvoicingPlugin, ao as IPaymentPlugin, ap as IPlugin, aq as IShippingPlugin, ar as ISuppliersPlugin, as as IUiPlugin, at as InlineRowBlock, au as InvoiceDocumentType, av as InvoiceLine, aw as InvoiceMoney, ax as InvoiceParty, ay as InvoiceRequest, az as InvoiceResult, aA as InvoiceStatus, aB as InvoiceTax, aC as InvoicingDefaultConfig, aD as InvoicingFeature, aE as InvoicingPluginConfig, aF as InvoicingStaticConfig, aG as KeyValueBlock, aH as KeyValueRow, aI as LayoutMode, aJ as LinkBlock, aK as Logger, aL as MarkdownBlock, aM as MessageVariant, aN as PageParams, aO as PaymentCard, aP as PaymentConnect, aQ as PaymentConnectExchange, aR as PaymentConnectParams, aS as PaymentCustomer, aT as PaymentGatewayCode, aU as PaymentMerchantPricing, aV as PaymentPayload, aW as PaymentPluginConfig, aX as PaymentRenderMode, aY as PaymentResult, aZ as PaymentSessionFees, a_ as PaymentSessionPayload, a$ as PaymentSessionResult, b0 as PaymentSettlementFees, b1 as PaymentVerifyPayload, b2 as PaymentWebhookSettlement, b3 as PlaceSupplierOrderInput, b4 as Plugin, b5 as PluginActionContext, b6 as PluginActionResult, b7 as PluginAuthor, b8 as PluginConfigFieldDependency, b9 as PluginFactory, ba as PluginManifest, bb as RepeaterBlock, bc as RepeaterSource, bd as SearchBlock, be as SecretStore, bf as SequenceStore, bg as SetupAction, bh as SetupLayout, bi as SetupLayoutValidation, bj as SetupStep, bk as ShipmentAddress, bl as ShipmentParcel, bm as ShipmentResult, bn as ShippingDefaultConfig, bo as ShippingFeature, bp as ShippingPluginConfig, bq as ShippingQuote, br as ShippingQuoteParams, bs as ShippingStaticConfig, bt as SourcedProduct, bu as StatBlock, bv as StepStatusFrom, bw as StepStatusFromAction, bx as StepStatusFromFields, by as StepStatusSource, bz as StorageBroker, bA as SupplierCatalogQuery, bB as SupplierFulfillmentEvent, bC as SupplierListing, bD as SupplierListingAttribute, bE as SupplierListingPage, bF as SupplierListingVariant, bG as SupplierMoney, bH as SupplierOrderAddressLevel, bI as SupplierOrderCustomer, bJ as SupplierOrderLine, bK as SupplierOrderResult, bL as SupplierOrderStatus, bM as SupplierShipTo, bN as SupplierShippingQuote, bO as SupplierShippingQuoteInput, bP as SupplierStock, bQ as SuppliersDefaultConfig, bR as SuppliersFeature, bS as SuppliersPluginConfig, bT as SuppliersStaticConfig, bU as TabItem, bV as TableBlock, bW as TableCell, bX as TableColumn, bY as TableColumnSort, bZ as TablePagination, b_ as TableRichCell, b$ as TableSort, c0 as TabsBlock, c1 as ToggleBlock, c2 as ToolbarBlock, c3 as TrackingEvent, c4 as TransactionStatus, c5 as UiContribution, c6 as UiContributionsValidation, c7 as UiSlot, c8 as UiSlotContext, c9 as VoidInvoiceInput, ca as WebhookSignatureResult, cb as analyticsCapability, cc as capability, cd as crossValidateSetupLayout, ce as definePlugin, cf as invoicingCapability, cg as isConfigurablePlugin, ch as isPluginFactory, ci as minorUnitDigits, cj as paymentCapability, ck as shippingCapability, cl as suppliersCapability, cm as toMajorUnits, cn as toMinorUnits, co as uiCapability, cp as validatePluginAuthor, cq as validateSetupLayout, cr as validateUiContributions } from './host-api-D9g2w27d.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.8.0";
|
|
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.
|