@vivoa/plugin-sdk 0.5.2 → 0.6.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/index.d.mts +16 -4
- package/dist/index.d.ts +16 -4
- package/dist/index.js +1 -1
- package/dist/index.mjs +1 -1
- package/package.json +1 -1
package/dist/index.d.mts
CHANGED
|
@@ -754,9 +754,20 @@ interface SupplierOrderAddressLevel {
|
|
|
754
754
|
interface SupplierShipTo {
|
|
755
755
|
address: string;
|
|
756
756
|
referencePoint?: string | null;
|
|
757
|
-
/**
|
|
758
|
-
|
|
759
|
-
|
|
757
|
+
/**
|
|
758
|
+
* Supplier-native geo ids. Optional: when the host cannot produce the
|
|
759
|
+
* supplier's own ids (the common case — the host only knows its own geo),
|
|
760
|
+
* it leaves these empty and passes the human-readable names below. The
|
|
761
|
+
* plugin resolves names → supplier ids against its own geo endpoints.
|
|
762
|
+
*/
|
|
763
|
+
stateId?: string;
|
|
764
|
+
cityId?: string;
|
|
765
|
+
/** ISO 3166-1 alpha-2 of the destination country (e.g. "GT", "SV"). */
|
|
766
|
+
countryCode?: string;
|
|
767
|
+
/** Human-readable admin-area (state/department) name for plugin-side resolution. */
|
|
768
|
+
stateName?: string;
|
|
769
|
+
/** Human-readable locality (city/municipality) name for plugin-side resolution. */
|
|
770
|
+
cityName?: string;
|
|
760
771
|
extraLevels?: SupplierOrderAddressLevel[];
|
|
761
772
|
latitude?: number;
|
|
762
773
|
longitude?: number;
|
|
@@ -826,6 +837,7 @@ interface ISuppliersPlugin extends IPlugin {
|
|
|
826
837
|
getListing(externalId: string, ctx: DispatchContext): Promise<SupplierListing>;
|
|
827
838
|
placeOrder(order: PlaceSupplierOrderInput, ctx: DispatchContext): Promise<SupplierOrderResult>;
|
|
828
839
|
getOrderStatus(externalOrderId: string, ctx: DispatchContext): Promise<SupplierOrderResult>;
|
|
840
|
+
cancelOrder?(externalOrderId: string, ctx: DispatchContext): Promise<SupplierOrderResult>;
|
|
829
841
|
syncStock?(externalIds: string[], ctx: DispatchContext): Promise<SupplierStock[]>;
|
|
830
842
|
parseWebhook?(body: unknown, headers: Record<string, string>, ctx: DispatchContext): SupplierFulfillmentEvent | null;
|
|
831
843
|
isConfigured?(ctx: DispatchContext): boolean;
|
|
@@ -989,7 +1001,7 @@ declare function checkPermissions(required: string[], grantedRaw: string[]): Per
|
|
|
989
1001
|
* - MINOR: additive (new optional fields, new tokens) — backwards compatible.
|
|
990
1002
|
* - PATCH: docs/fixes with zero shape changes.
|
|
991
1003
|
*/
|
|
992
|
-
declare const SDK_VERSION = "0.
|
|
1004
|
+
declare const SDK_VERSION = "0.6.0";
|
|
993
1005
|
/**
|
|
994
1006
|
* True when a plugin built against `pluginSdkVersion` can run on a host that
|
|
995
1007
|
* ships `hostSdkVersion`. Rule: same major, host minor >= plugin minor.
|
package/dist/index.d.ts
CHANGED
|
@@ -754,9 +754,20 @@ interface SupplierOrderAddressLevel {
|
|
|
754
754
|
interface SupplierShipTo {
|
|
755
755
|
address: string;
|
|
756
756
|
referencePoint?: string | null;
|
|
757
|
-
/**
|
|
758
|
-
|
|
759
|
-
|
|
757
|
+
/**
|
|
758
|
+
* Supplier-native geo ids. Optional: when the host cannot produce the
|
|
759
|
+
* supplier's own ids (the common case — the host only knows its own geo),
|
|
760
|
+
* it leaves these empty and passes the human-readable names below. The
|
|
761
|
+
* plugin resolves names → supplier ids against its own geo endpoints.
|
|
762
|
+
*/
|
|
763
|
+
stateId?: string;
|
|
764
|
+
cityId?: string;
|
|
765
|
+
/** ISO 3166-1 alpha-2 of the destination country (e.g. "GT", "SV"). */
|
|
766
|
+
countryCode?: string;
|
|
767
|
+
/** Human-readable admin-area (state/department) name for plugin-side resolution. */
|
|
768
|
+
stateName?: string;
|
|
769
|
+
/** Human-readable locality (city/municipality) name for plugin-side resolution. */
|
|
770
|
+
cityName?: string;
|
|
760
771
|
extraLevels?: SupplierOrderAddressLevel[];
|
|
761
772
|
latitude?: number;
|
|
762
773
|
longitude?: number;
|
|
@@ -826,6 +837,7 @@ interface ISuppliersPlugin extends IPlugin {
|
|
|
826
837
|
getListing(externalId: string, ctx: DispatchContext): Promise<SupplierListing>;
|
|
827
838
|
placeOrder(order: PlaceSupplierOrderInput, ctx: DispatchContext): Promise<SupplierOrderResult>;
|
|
828
839
|
getOrderStatus(externalOrderId: string, ctx: DispatchContext): Promise<SupplierOrderResult>;
|
|
840
|
+
cancelOrder?(externalOrderId: string, ctx: DispatchContext): Promise<SupplierOrderResult>;
|
|
829
841
|
syncStock?(externalIds: string[], ctx: DispatchContext): Promise<SupplierStock[]>;
|
|
830
842
|
parseWebhook?(body: unknown, headers: Record<string, string>, ctx: DispatchContext): SupplierFulfillmentEvent | null;
|
|
831
843
|
isConfigured?(ctx: DispatchContext): boolean;
|
|
@@ -989,7 +1001,7 @@ declare function checkPermissions(required: string[], grantedRaw: string[]): Per
|
|
|
989
1001
|
* - MINOR: additive (new optional fields, new tokens) — backwards compatible.
|
|
990
1002
|
* - PATCH: docs/fixes with zero shape changes.
|
|
991
1003
|
*/
|
|
992
|
-
declare const SDK_VERSION = "0.
|
|
1004
|
+
declare const SDK_VERSION = "0.6.0";
|
|
993
1005
|
/**
|
|
994
1006
|
* True when a plugin built against `pluginSdkVersion` can run on a host that
|
|
995
1007
|
* ships `hostSdkVersion`. Rule: same major, host minor >= plugin minor.
|
package/dist/index.js
CHANGED
|
@@ -530,7 +530,7 @@ function checkPermissions(required, grantedRaw) {
|
|
|
530
530
|
}
|
|
531
531
|
|
|
532
532
|
// src/version.ts
|
|
533
|
-
var SDK_VERSION = "0.
|
|
533
|
+
var SDK_VERSION = "0.6.0";
|
|
534
534
|
function isSdkCompatible(pluginSdkVersion, hostSdkVersion) {
|
|
535
535
|
const parse = (v) => {
|
|
536
536
|
const m = /^(\d+)\.(\d+)\.(\d+)/.exec(v);
|
package/dist/index.mjs
CHANGED
|
@@ -491,7 +491,7 @@ function checkPermissions(required, grantedRaw) {
|
|
|
491
491
|
}
|
|
492
492
|
|
|
493
493
|
// src/version.ts
|
|
494
|
-
var SDK_VERSION = "0.
|
|
494
|
+
var SDK_VERSION = "0.6.0";
|
|
495
495
|
function isSdkCompatible(pluginSdkVersion, hostSdkVersion) {
|
|
496
496
|
const parse = (v) => {
|
|
497
497
|
const m = /^(\d+)\.(\d+)\.(\d+)/.exec(v);
|