@lana-commerce/core 13.1.0-alpha.1 → 13.1.0-alpha.2
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/CHANGELOG.md
CHANGED
|
@@ -10,9 +10,12 @@ This project adheres to [Semantic Versioning][semantic versioning].
|
|
|
10
10
|
### Minor Changes
|
|
11
11
|
|
|
12
12
|
- Add "clear" event to "modules/advancedSearch".
|
|
13
|
+
- Extend "invoiceFormat" to support storage fees (internal thing).
|
|
13
14
|
|
|
14
15
|
### Patch Changes
|
|
15
16
|
|
|
17
|
+
- Fix a bug in "modules/advancedSearch". Locale changes were incorrectly ignored in effect body.
|
|
18
|
+
|
|
16
19
|
## [Released]
|
|
17
20
|
|
|
18
21
|
## 13.0.0 (2024-08-12)
|
package/cjs/invoiceFormat.js
CHANGED
|
@@ -10,11 +10,13 @@ function invoiceLineItemDescription(li, plan, opts) {
|
|
|
10
10
|
? "order_fee"
|
|
11
11
|
: planID.indexOf("sms_fee") !== -1
|
|
12
12
|
? "sms_fee"
|
|
13
|
-
: planID.indexOf("
|
|
14
|
-
? "
|
|
15
|
-
: planID.indexOf("
|
|
16
|
-
? "
|
|
17
|
-
: "
|
|
13
|
+
: planID.indexOf("storage_fee") !== -1
|
|
14
|
+
? "storage_fee"
|
|
15
|
+
: planID.indexOf("transaction_fee") !== -1
|
|
16
|
+
? "transaction_fee"
|
|
17
|
+
: planID.indexOf("address_verify_fee") !== -1
|
|
18
|
+
? "address_verify_fee"
|
|
19
|
+
: "subscription";
|
|
18
20
|
let quantity = li.quantity;
|
|
19
21
|
if (kind === "transaction_fee" || kind === "sms_fee" || kind === "subscription") {
|
|
20
22
|
// force 1 quantity on these
|
|
@@ -58,7 +58,7 @@ function createAdvancedSearch(config) {
|
|
|
58
58
|
sortBy: p.sortBy,
|
|
59
59
|
sortDesc: p.sortDesc,
|
|
60
60
|
aggregations: agg,
|
|
61
|
-
}, config.opts), (d) => {
|
|
61
|
+
}, params.config.opts), (d) => {
|
|
62
62
|
var _a, _b;
|
|
63
63
|
const options = d.options.sort((a, b) => {
|
|
64
64
|
return a.name.localeCompare(b.name);
|
package/esm/invoiceFormat.js
CHANGED
|
@@ -7,11 +7,13 @@ export function invoiceLineItemDescription(li, plan, opts) {
|
|
|
7
7
|
? "order_fee"
|
|
8
8
|
: planID.indexOf("sms_fee") !== -1
|
|
9
9
|
? "sms_fee"
|
|
10
|
-
: planID.indexOf("
|
|
11
|
-
? "
|
|
12
|
-
: planID.indexOf("
|
|
13
|
-
? "
|
|
14
|
-
: "
|
|
10
|
+
: planID.indexOf("storage_fee") !== -1
|
|
11
|
+
? "storage_fee"
|
|
12
|
+
: planID.indexOf("transaction_fee") !== -1
|
|
13
|
+
? "transaction_fee"
|
|
14
|
+
: planID.indexOf("address_verify_fee") !== -1
|
|
15
|
+
? "address_verify_fee"
|
|
16
|
+
: "subscription";
|
|
15
17
|
let quantity = li.quantity;
|
|
16
18
|
if (kind === "transaction_fee" || kind === "sms_fee" || kind === "subscription") {
|
|
17
19
|
// force 1 quantity on these
|
|
@@ -59,7 +59,7 @@ export function createAdvancedSearch(config) {
|
|
|
59
59
|
sortBy: p.sortBy,
|
|
60
60
|
sortDesc: p.sortDesc,
|
|
61
61
|
aggregations: agg,
|
|
62
|
-
}, config.opts), (d) => {
|
|
62
|
+
}, params.config.opts), (d) => {
|
|
63
63
|
const options = d.options.sort((a, b) => {
|
|
64
64
|
return a.name.localeCompare(b.name);
|
|
65
65
|
});
|
package/package.json
CHANGED
package/types/invoiceFormat.d.ts
CHANGED
|
@@ -11,7 +11,7 @@ interface PlanLike {
|
|
|
11
11
|
transaction_fee: number;
|
|
12
12
|
}
|
|
13
13
|
export interface InvoiceLineItemDescription {
|
|
14
|
-
kind: "return_fee" | "order_fee" | "sms_fee" | "transaction_fee" | "address_verify_fee" | "subscription";
|
|
14
|
+
kind: "return_fee" | "order_fee" | "sms_fee" | "transaction_fee" | "address_verify_fee" | "storage_fee" | "subscription";
|
|
15
15
|
planName: string;
|
|
16
16
|
description: string;
|
|
17
17
|
quantity: number;
|
|
@@ -7810,6 +7810,25 @@ export interface SurveyQuestionModify {
|
|
|
7810
7810
|
/** The survey question itself */
|
|
7811
7811
|
name?: string | null;
|
|
7812
7812
|
}
|
|
7813
|
+
export interface SynonymEntry {
|
|
7814
|
+
keys: Array<string>;
|
|
7815
|
+
/** A kind of synonym entry */
|
|
7816
|
+
kind: SynonymEntryKind;
|
|
7817
|
+
values: Array<string>;
|
|
7818
|
+
}
|
|
7819
|
+
export interface SynonymEntryCreate {
|
|
7820
|
+
keys?: Array<string> | null;
|
|
7821
|
+
/** A kind of synonym entry */
|
|
7822
|
+
kind: SynonymEntryKind;
|
|
7823
|
+
values?: Array<string> | null;
|
|
7824
|
+
}
|
|
7825
|
+
export type SynonymEntryKind = "list" | "map";
|
|
7826
|
+
export interface SynonymSettings {
|
|
7827
|
+
entries: Array<SynonymEntry>;
|
|
7828
|
+
}
|
|
7829
|
+
export interface SynonymSettingsCreate {
|
|
7830
|
+
entries?: Array<SynonymEntryCreate> | null;
|
|
7831
|
+
}
|
|
7813
7832
|
export interface Task {
|
|
7814
7833
|
/** The date and time when the task was created, RFC 3339 format */
|
|
7815
7834
|
created_at: string;
|
|
@@ -13828,6 +13847,32 @@ export interface EndpointShopsSettingsCreate extends Endpoint<EndpointShopsSetti
|
|
|
13828
13847
|
expand(v: ShopSettingsExpansionMap): EndpointShopsSettingsCreate;
|
|
13829
13848
|
extract(v: Extractor<ShopSettings>): EndpointShopsSettingsCreate;
|
|
13830
13849
|
}
|
|
13850
|
+
export interface EndpointShopsSynonymSettings extends Endpoint<EndpointShopsSynonymSettings, SynonymSettings> {
|
|
13851
|
+
/** Output filtering */
|
|
13852
|
+
fields(v: Array<string>): EndpointShopsSynonymSettings;
|
|
13853
|
+
/** Return text in normalized form */
|
|
13854
|
+
normalized(v: boolean): EndpointShopsSynonymSettings;
|
|
13855
|
+
/** Unique shop identifier. See also: [Unique Identifiers](/overview/concepts/unique-identifiers) */
|
|
13856
|
+
shop_id(v: string): EndpointShopsSynonymSettings;
|
|
13857
|
+
extract(v: Extractor<SynonymSettings>): EndpointShopsSynonymSettings;
|
|
13858
|
+
}
|
|
13859
|
+
export interface EndpointShopsSynonymSettingsCreate extends Endpoint<EndpointShopsSynonymSettingsCreate, SynonymSettings> {
|
|
13860
|
+
/** Output filtering */
|
|
13861
|
+
fields(v: Array<string>): EndpointShopsSynonymSettingsCreate;
|
|
13862
|
+
/** Unique shop identifier. See also: [Unique Identifiers](/overview/concepts/unique-identifiers) */
|
|
13863
|
+
shop_id(v: string): EndpointShopsSynonymSettingsCreate;
|
|
13864
|
+
data(v: SynonymSettingsCreate): EndpointShopsSynonymSettingsCreate;
|
|
13865
|
+
extract(v: Extractor<SynonymSettings>): EndpointShopsSynonymSettingsCreate;
|
|
13866
|
+
}
|
|
13867
|
+
export interface EndpointShopsSynonymSettingsTest extends Endpoint<EndpointShopsSynonymSettingsTest, string> {
|
|
13868
|
+
/** Output filtering */
|
|
13869
|
+
fields(v: Array<string>): EndpointShopsSynonymSettingsTest;
|
|
13870
|
+
/** Unique shop identifier. See also: [Unique Identifiers](/overview/concepts/unique-identifiers) */
|
|
13871
|
+
shop_id(v: string): EndpointShopsSynonymSettingsTest;
|
|
13872
|
+
/** Text to test synonym settings against */
|
|
13873
|
+
text(v: string): EndpointShopsSynonymSettingsTest;
|
|
13874
|
+
extract(v: Extractor<string>): EndpointShopsSynonymSettingsTest;
|
|
13875
|
+
}
|
|
13831
13876
|
export interface EndpointSlugify extends Endpoint<EndpointSlugify, string> {
|
|
13832
13877
|
/** Text to slugify */
|
|
13833
13878
|
text(v: string): EndpointSlugify;
|
|
@@ -15234,6 +15279,9 @@ export interface ReqFunction {
|
|
|
15234
15279
|
(ctx: Context, v: "POST:shops/preferences.json"): EndpointShopsPreferencesCreate;
|
|
15235
15280
|
(ctx: Context, v: "GET:shops/settings.json"): EndpointShopsSettings;
|
|
15236
15281
|
(ctx: Context, v: "POST:shops/settings.json"): EndpointShopsSettingsCreate;
|
|
15282
|
+
(ctx: Context, v: "GET:shops/synonym_settings.json"): EndpointShopsSynonymSettings;
|
|
15283
|
+
(ctx: Context, v: "POST:shops/synonym_settings.json"): EndpointShopsSynonymSettingsCreate;
|
|
15284
|
+
(ctx: Context, v: "GET:shops/synonym_settings/test.json"): EndpointShopsSynonymSettingsTest;
|
|
15237
15285
|
(ctx: Context, v: "GET:slugify.json"): EndpointSlugify;
|
|
15238
15286
|
(ctx: Context, v: "DELETE:sms/messages.json"): EndpointSmsMessagesDelete;
|
|
15239
15287
|
(ctx: Context, v: "GET:sms/messages/page.json"): EndpointSmsMessagesPage;
|