@endora-commerce/contracts 0.108.0 → 0.110.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/actor.d.ts +16 -0
- package/dist/actor.d.ts.map +1 -1
- package/dist/addresses.d.ts +35 -0
- package/dist/addresses.d.ts.map +1 -1
- package/dist/addresses.js +8 -1
- package/dist/addresses.js.map +1 -1
- package/dist/admin-actions.d.ts +12 -3
- package/dist/admin-actions.d.ts.map +1 -1
- package/dist/admin-actions.js +34 -3
- package/dist/admin-actions.js.map +1 -1
- package/dist/admin-contributions.d.ts +94 -10
- package/dist/admin-contributions.d.ts.map +1 -1
- package/dist/admin-contributions.js +65 -0
- package/dist/admin-contributions.js.map +1 -1
- package/dist/admin-notifications.d.ts +17 -1
- package/dist/admin-notifications.d.ts.map +1 -1
- package/dist/admin-preferences.d.ts +108 -0
- package/dist/admin-preferences.d.ts.map +1 -0
- package/dist/admin-preferences.js +133 -0
- package/dist/admin-preferences.js.map +1 -0
- package/dist/admin-roles.d.ts +8 -2
- package/dist/admin-roles.d.ts.map +1 -1
- package/dist/admin-roles.js.map +1 -1
- package/dist/admin-users.d.ts +9 -0
- package/dist/admin-users.d.ts.map +1 -1
- package/dist/admin.d.ts +92 -5
- package/dist/admin.d.ts.map +1 -1
- package/dist/admin.js +86 -3
- package/dist/admin.js.map +1 -1
- package/dist/assets-library.d.ts +123 -3
- package/dist/assets-library.d.ts.map +1 -1
- package/dist/assets-library.js +11 -3
- package/dist/assets-library.js.map +1 -1
- package/dist/audit-logs.d.ts +12 -0
- package/dist/audit-logs.d.ts.map +1 -1
- package/dist/audit-logs.js +12 -0
- package/dist/audit-logs.js.map +1 -1
- package/dist/blog.d.ts +431 -14
- package/dist/blog.d.ts.map +1 -1
- package/dist/blog.js +251 -7
- package/dist/blog.js.map +1 -1
- package/dist/carts.d.ts +507 -92
- package/dist/carts.d.ts.map +1 -1
- package/dist/carts.js +197 -21
- package/dist/carts.js.map +1 -1
- package/dist/catalog.d.ts +515 -144
- package/dist/catalog.d.ts.map +1 -1
- package/dist/catalog.js +356 -68
- package/dist/catalog.js.map +1 -1
- package/dist/cms-brand.d.ts +2233 -0
- package/dist/cms-brand.d.ts.map +1 -0
- package/dist/cms-brand.js +311 -0
- package/dist/cms-brand.js.map +1 -0
- package/dist/cms-contact-form.d.ts +55 -0
- package/dist/cms-contact-form.d.ts.map +1 -0
- package/dist/cms-contact-form.js +100 -0
- package/dist/cms-contact-form.js.map +1 -0
- package/dist/cms.d.ts +576 -17
- package/dist/cms.d.ts.map +1 -1
- package/dist/cms.js +251 -0
- package/dist/cms.js.map +1 -1
- package/dist/common.d.ts +23 -6
- package/dist/common.d.ts.map +1 -1
- package/dist/common.js +25 -2
- package/dist/common.js.map +1 -1
- package/dist/comparisons.d.ts +28 -21
- package/dist/comparisons.d.ts.map +1 -1
- package/dist/comparisons.js +2 -1
- package/dist/comparisons.js.map +1 -1
- package/dist/credit-limits.d.ts +1 -0
- package/dist/credit-limits.d.ts.map +1 -1
- package/dist/credit-limits.js +14 -0
- package/dist/credit-limits.js.map +1 -1
- package/dist/crm-rich-text.d.ts +10 -61
- package/dist/crm-rich-text.d.ts.map +1 -1
- package/dist/crm-rich-text.js +10 -300
- package/dist/crm-rich-text.js.map +1 -1
- package/dist/crm.d.ts +173 -115
- package/dist/crm.d.ts.map +1 -1
- package/dist/crm.js +35 -88
- package/dist/crm.js.map +1 -1
- package/dist/custom-fields.d.ts +54 -22
- package/dist/custom-fields.d.ts.map +1 -1
- package/dist/custom-fields.js +21 -1
- package/dist/custom-fields.js.map +1 -1
- package/dist/customer-accounts.d.ts +216 -22
- package/dist/customer-accounts.d.ts.map +1 -1
- package/dist/customer-accounts.js +70 -0
- package/dist/customer-accounts.js.map +1 -1
- package/dist/customers.d.ts +40 -73
- package/dist/customers.d.ts.map +1 -1
- package/dist/customers.js +45 -10
- package/dist/customers.js.map +1 -1
- package/dist/document-templates.d.ts +35 -23
- package/dist/document-templates.d.ts.map +1 -1
- package/dist/document-values.d.ts +8 -0
- package/dist/document-values.d.ts.map +1 -1
- package/dist/document-values.js +24 -6
- package/dist/document-values.js.map +1 -1
- package/dist/email.d.ts +5 -0
- package/dist/email.d.ts.map +1 -1
- package/dist/errors.d.ts +224 -1
- package/dist/errors.d.ts.map +1 -1
- package/dist/errors.js +269 -1
- package/dist/errors.js.map +1 -1
- package/dist/forms-logic.d.ts +79 -0
- package/dist/forms-logic.d.ts.map +1 -0
- package/dist/forms-logic.fixtures.d.ts +52 -0
- package/dist/forms-logic.fixtures.d.ts.map +1 -0
- package/dist/forms-logic.fixtures.js +610 -0
- package/dist/forms-logic.fixtures.js.map +1 -0
- package/dist/forms-logic.js +699 -0
- package/dist/forms-logic.js.map +1 -0
- package/dist/forms.d.ts +9833 -0
- package/dist/forms.d.ts.map +1 -0
- package/dist/forms.js +827 -0
- package/dist/forms.js.map +1 -0
- package/dist/import-export.d.ts +180 -0
- package/dist/import-export.d.ts.map +1 -1
- package/dist/import-export.js +60 -0
- package/dist/import-export.js.map +1 -1
- package/dist/index.d.ts +22 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +45 -1
- package/dist/index.js.map +1 -1
- package/dist/inventory.d.ts +6 -6
- package/dist/invoice-ledger.d.ts +7 -7
- package/dist/invoices.d.ts +6 -2
- package/dist/invoices.d.ts.map +1 -1
- package/dist/invoices.js +7 -0
- package/dist/invoices.js.map +1 -1
- package/dist/megamenu.d.ts +674 -0
- package/dist/megamenu.d.ts.map +1 -1
- package/dist/megamenu.js +96 -3
- package/dist/megamenu.js.map +1 -1
- package/dist/mfa.d.ts +125 -4
- package/dist/mfa.d.ts.map +1 -1
- package/dist/mfa.js +54 -2
- package/dist/mfa.js.map +1 -1
- package/dist/modules.d.ts +44 -5
- package/dist/modules.d.ts.map +1 -1
- package/dist/modules.js +73 -0
- package/dist/modules.js.map +1 -1
- package/dist/money-decimal.d.ts +54 -0
- package/dist/money-decimal.d.ts.map +1 -1
- package/dist/money-decimal.js +95 -0
- package/dist/money-decimal.js.map +1 -1
- package/dist/newsletter.d.ts +7 -7
- package/dist/orders.d.ts +128 -10
- package/dist/orders.d.ts.map +1 -1
- package/dist/orders.js +74 -4
- package/dist/orders.js.map +1 -1
- package/dist/organization-registry-lookup.d.ts +362 -0
- package/dist/organization-registry-lookup.d.ts.map +1 -0
- package/dist/organization-registry-lookup.js +196 -0
- package/dist/organization-registry-lookup.js.map +1 -0
- package/dist/organization-roles.d.ts +340 -0
- package/dist/organization-roles.d.ts.map +1 -0
- package/dist/organization-roles.js +211 -0
- package/dist/organization-roles.js.map +1 -0
- package/dist/organizations.d.ts +123 -89
- package/dist/organizations.d.ts.map +1 -1
- package/dist/organizations.js +68 -24
- package/dist/organizations.js.map +1 -1
- package/dist/page-builder-props.d.ts +1401 -0
- package/dist/page-builder-props.d.ts.map +1 -0
- package/dist/page-builder-props.js +266 -0
- package/dist/page-builder-props.js.map +1 -0
- package/dist/page-builder-values.d.ts +95 -0
- package/dist/page-builder-values.d.ts.map +1 -0
- package/dist/page-builder-values.js +164 -0
- package/dist/page-builder-values.js.map +1 -0
- package/dist/pim-connector.d.ts +6 -2
- package/dist/pim-connector.d.ts.map +1 -1
- package/dist/pim-connector.js +6 -2
- package/dist/pim-connector.js.map +1 -1
- package/dist/pim-field-path.d.ts +5 -1
- package/dist/pim-field-path.d.ts.map +1 -1
- package/dist/pim-field-path.js +37 -81
- package/dist/pim-field-path.js.map +1 -1
- package/dist/pim-locale-mapping.d.ts +131 -0
- package/dist/pim-locale-mapping.d.ts.map +1 -0
- package/dist/pim-locale-mapping.js +193 -0
- package/dist/pim-locale-mapping.js.map +1 -0
- package/dist/platform-language.d.ts +9 -0
- package/dist/platform-language.d.ts.map +1 -1
- package/dist/platform-language.js +14 -0
- package/dist/platform-language.js.map +1 -1
- package/dist/price-books.d.ts +47 -43
- package/dist/price-books.d.ts.map +1 -1
- package/dist/price-books.js +6 -2
- package/dist/price-books.js.map +1 -1
- package/dist/price-lists.d.ts +48 -14
- package/dist/price-lists.d.ts.map +1 -1
- package/dist/price-lists.js +24 -1
- package/dist/price-lists.js.map +1 -1
- package/dist/product-feeds.d.ts +144 -84
- package/dist/product-feeds.d.ts.map +1 -1
- package/dist/product-feeds.js +23 -0
- package/dist/product-feeds.js.map +1 -1
- package/dist/product-scope-model.d.ts +161 -0
- package/dist/product-scope-model.d.ts.map +1 -0
- package/dist/product-scope-model.js +161 -0
- package/dist/product-scope-model.js.map +1 -0
- package/dist/product-scope-overrides.d.ts +0 -103
- package/dist/product-scope-overrides.d.ts.map +1 -1
- package/dist/product-scope-overrides.js +0 -54
- package/dist/product-scope-overrides.js.map +1 -1
- package/dist/product-scoped-values.d.ts +2610 -0
- package/dist/product-scoped-values.d.ts.map +1 -0
- package/dist/product-scoped-values.js +425 -0
- package/dist/product-scoped-values.js.map +1 -0
- package/dist/product-scopes.d.ts +746 -0
- package/dist/product-scopes.d.ts.map +1 -0
- package/dist/product-scopes.js +436 -0
- package/dist/product-scopes.js.map +1 -0
- package/dist/product-summary-text.d.ts +23 -0
- package/dist/product-summary-text.d.ts.map +1 -0
- package/dist/product-summary-text.js +64 -0
- package/dist/product-summary-text.js.map +1 -0
- package/dist/product-tax-rates.d.ts +38 -0
- package/dist/product-tax-rates.d.ts.map +1 -0
- package/dist/product-tax-rates.js +45 -0
- package/dist/product-tax-rates.js.map +1 -0
- package/dist/product-url-keys.d.ts +210 -0
- package/dist/product-url-keys.d.ts.map +1 -0
- package/dist/product-url-keys.js +200 -0
- package/dist/product-url-keys.js.map +1 -0
- package/dist/product-value-resolver.d.ts +37 -60
- package/dist/product-value-resolver.d.ts.map +1 -1
- package/dist/product-value-resolver.js +36 -96
- package/dist/product-value-resolver.js.map +1 -1
- package/dist/projects.d.ts +2370 -0
- package/dist/projects.d.ts.map +1 -0
- package/dist/projects.js +843 -0
- package/dist/projects.js.map +1 -0
- package/dist/promotions.d.ts +10 -10
- package/dist/prompt-actions.d.ts +19 -1
- package/dist/prompt-actions.d.ts.map +1 -1
- package/dist/prompt-actions.js +31 -2
- package/dist/prompt-actions.js.map +1 -1
- package/dist/pwa.d.ts +2 -2
- package/dist/quick-order.d.ts +150 -7
- package/dist/quick-order.d.ts.map +1 -1
- package/dist/quick-order.js +76 -2
- package/dist/quick-order.js.map +1 -1
- package/dist/quote-requests.d.ts +99 -13
- package/dist/quote-requests.d.ts.map +1 -1
- package/dist/quote-requests.js +66 -1
- package/dist/quote-requests.js.map +1 -1
- package/dist/record-references.d.ts +252 -0
- package/dist/record-references.d.ts.map +1 -0
- package/dist/record-references.js +178 -0
- package/dist/record-references.js.map +1 -0
- package/dist/record-rich-text.d.ts +66 -0
- package/dist/record-rich-text.d.ts.map +1 -0
- package/dist/record-rich-text.js +304 -0
- package/dist/record-rich-text.js.map +1 -0
- package/dist/returns.d.ts +234 -52
- package/dist/returns.d.ts.map +1 -1
- package/dist/returns.js +139 -26
- package/dist/returns.js.map +1 -1
- package/dist/sales-channels.d.ts +51 -7
- package/dist/sales-channels.d.ts.map +1 -1
- package/dist/sales-channels.js +38 -4
- package/dist/sales-channels.js.map +1 -1
- package/dist/saved-list-views.d.ts +56 -0
- package/dist/saved-list-views.d.ts.map +1 -1
- package/dist/saved-list-views.js +27 -1
- package/dist/saved-list-views.js.map +1 -1
- package/dist/scoped-write-encoding.d.ts +100 -0
- package/dist/scoped-write-encoding.d.ts.map +1 -0
- package/dist/scoped-write-encoding.js +135 -0
- package/dist/scoped-write-encoding.js.map +1 -0
- package/dist/search.d.ts +25 -15
- package/dist/search.d.ts.map +1 -1
- package/dist/seo.d.ts +127 -15
- package/dist/seo.d.ts.map +1 -1
- package/dist/seo.js +38 -4
- package/dist/seo.js.map +1 -1
- package/dist/settings.d.ts +161 -3
- package/dist/settings.d.ts.map +1 -1
- package/dist/settings.js +73 -3
- package/dist/settings.js.map +1 -1
- package/dist/shopping-lists.d.ts +24 -3
- package/dist/shopping-lists.d.ts.map +1 -1
- package/dist/shopping-lists.js +20 -0
- package/dist/shopping-lists.js.map +1 -1
- package/dist/storefront-cache-tags.d.ts +41 -0
- package/dist/storefront-cache-tags.d.ts.map +1 -1
- package/dist/storefront-cache-tags.js +36 -0
- package/dist/storefront-cache-tags.js.map +1 -1
- package/dist/storefront-language-path.d.ts +77 -0
- package/dist/storefront-language-path.d.ts.map +1 -0
- package/dist/storefront-language-path.js +123 -0
- package/dist/storefront-language-path.js.map +1 -0
- package/dist/storefront-value-overrides.d.ts +18 -56
- package/dist/storefront-value-overrides.d.ts.map +1 -1
- package/dist/storefront-value-overrides.js +11 -86
- package/dist/storefront-value-overrides.js.map +1 -1
- package/dist/tasks.d.ts +2842 -0
- package/dist/tasks.d.ts.map +1 -0
- package/dist/tasks.js +901 -0
- package/dist/tasks.js.map +1 -0
- package/dist/transactional-emails.d.ts +14 -11
- package/dist/transactional-emails.d.ts.map +1 -1
- package/dist/transactional-emails.js +13 -0
- package/dist/transactional-emails.js.map +1 -1
- package/package.json +3 -3
package/dist/comparisons.d.ts
CHANGED
|
@@ -23,7 +23,7 @@ export type ComparisonRowClass = z.infer<typeof comparisonRowClassSchema>;
|
|
|
23
23
|
export declare const comparisonProductSummarySchema: z.ZodObject<{
|
|
24
24
|
id: z.ZodString;
|
|
25
25
|
sku: z.ZodString;
|
|
26
|
-
name: z.
|
|
26
|
+
name: z.ZodString;
|
|
27
27
|
slug: z.ZodString;
|
|
28
28
|
type: z.ZodEnum<{
|
|
29
29
|
simple: "simple";
|
|
@@ -51,9 +51,10 @@ export declare const comparisonAttributeRowSchema: z.ZodObject<{
|
|
|
51
51
|
boolean: "boolean";
|
|
52
52
|
date: "date";
|
|
53
53
|
enum: "enum";
|
|
54
|
-
select: "select";
|
|
55
|
-
price: "price";
|
|
56
54
|
multiselect: "multiselect";
|
|
55
|
+
price: "price";
|
|
56
|
+
select: "select";
|
|
57
|
+
page_builder: "page_builder";
|
|
57
58
|
}>;
|
|
58
59
|
values: z.ZodArray<z.ZodNullable<z.ZodString>>;
|
|
59
60
|
rowClass: z.ZodEnum<{
|
|
@@ -89,7 +90,7 @@ export declare const comparisonOwnerViewSchema: z.ZodObject<{
|
|
|
89
90
|
products: z.ZodArray<z.ZodObject<{
|
|
90
91
|
id: z.ZodString;
|
|
91
92
|
sku: z.ZodString;
|
|
92
|
-
name: z.
|
|
93
|
+
name: z.ZodString;
|
|
93
94
|
slug: z.ZodString;
|
|
94
95
|
type: z.ZodEnum<{
|
|
95
96
|
simple: "simple";
|
|
@@ -116,9 +117,10 @@ export declare const comparisonOwnerViewSchema: z.ZodObject<{
|
|
|
116
117
|
boolean: "boolean";
|
|
117
118
|
date: "date";
|
|
118
119
|
enum: "enum";
|
|
119
|
-
select: "select";
|
|
120
|
-
price: "price";
|
|
121
120
|
multiselect: "multiselect";
|
|
121
|
+
price: "price";
|
|
122
|
+
select: "select";
|
|
123
|
+
page_builder: "page_builder";
|
|
122
124
|
}>;
|
|
123
125
|
values: z.ZodArray<z.ZodNullable<z.ZodString>>;
|
|
124
126
|
rowClass: z.ZodEnum<{
|
|
@@ -156,7 +158,7 @@ export declare const comparisonDocumentDataSchema: z.ZodObject<{
|
|
|
156
158
|
products: z.ZodArray<z.ZodObject<{
|
|
157
159
|
id: z.ZodString;
|
|
158
160
|
sku: z.ZodString;
|
|
159
|
-
name: z.
|
|
161
|
+
name: z.ZodString;
|
|
160
162
|
slug: z.ZodString;
|
|
161
163
|
type: z.ZodEnum<{
|
|
162
164
|
simple: "simple";
|
|
@@ -183,9 +185,10 @@ export declare const comparisonDocumentDataSchema: z.ZodObject<{
|
|
|
183
185
|
boolean: "boolean";
|
|
184
186
|
date: "date";
|
|
185
187
|
enum: "enum";
|
|
186
|
-
select: "select";
|
|
187
|
-
price: "price";
|
|
188
188
|
multiselect: "multiselect";
|
|
189
|
+
price: "price";
|
|
190
|
+
select: "select";
|
|
191
|
+
page_builder: "page_builder";
|
|
189
192
|
}>;
|
|
190
193
|
values: z.ZodArray<z.ZodNullable<z.ZodString>>;
|
|
191
194
|
rowClass: z.ZodEnum<{
|
|
@@ -222,7 +225,7 @@ export declare const comparisonOwnerResponseSchema: z.ZodObject<{
|
|
|
222
225
|
products: z.ZodArray<z.ZodObject<{
|
|
223
226
|
id: z.ZodString;
|
|
224
227
|
sku: z.ZodString;
|
|
225
|
-
name: z.
|
|
228
|
+
name: z.ZodString;
|
|
226
229
|
slug: z.ZodString;
|
|
227
230
|
type: z.ZodEnum<{
|
|
228
231
|
simple: "simple";
|
|
@@ -249,9 +252,10 @@ export declare const comparisonOwnerResponseSchema: z.ZodObject<{
|
|
|
249
252
|
boolean: "boolean";
|
|
250
253
|
date: "date";
|
|
251
254
|
enum: "enum";
|
|
252
|
-
select: "select";
|
|
253
|
-
price: "price";
|
|
254
255
|
multiselect: "multiselect";
|
|
256
|
+
price: "price";
|
|
257
|
+
select: "select";
|
|
258
|
+
page_builder: "page_builder";
|
|
255
259
|
}>;
|
|
256
260
|
values: z.ZodArray<z.ZodNullable<z.ZodString>>;
|
|
257
261
|
rowClass: z.ZodEnum<{
|
|
@@ -299,7 +303,7 @@ export declare const comparisonSharedViewSchema: z.ZodObject<{
|
|
|
299
303
|
products: z.ZodArray<z.ZodObject<{
|
|
300
304
|
id: z.ZodString;
|
|
301
305
|
sku: z.ZodString;
|
|
302
|
-
name: z.
|
|
306
|
+
name: z.ZodString;
|
|
303
307
|
slug: z.ZodString;
|
|
304
308
|
type: z.ZodEnum<{
|
|
305
309
|
simple: "simple";
|
|
@@ -326,9 +330,10 @@ export declare const comparisonSharedViewSchema: z.ZodObject<{
|
|
|
326
330
|
boolean: "boolean";
|
|
327
331
|
date: "date";
|
|
328
332
|
enum: "enum";
|
|
329
|
-
select: "select";
|
|
330
|
-
price: "price";
|
|
331
333
|
multiselect: "multiselect";
|
|
334
|
+
price: "price";
|
|
335
|
+
select: "select";
|
|
336
|
+
page_builder: "page_builder";
|
|
332
337
|
}>;
|
|
333
338
|
values: z.ZodArray<z.ZodNullable<z.ZodString>>;
|
|
334
339
|
rowClass: z.ZodEnum<{
|
|
@@ -357,7 +362,7 @@ export declare const comparisonSharedResponseSchema: z.ZodObject<{
|
|
|
357
362
|
products: z.ZodArray<z.ZodObject<{
|
|
358
363
|
id: z.ZodString;
|
|
359
364
|
sku: z.ZodString;
|
|
360
|
-
name: z.
|
|
365
|
+
name: z.ZodString;
|
|
361
366
|
slug: z.ZodString;
|
|
362
367
|
type: z.ZodEnum<{
|
|
363
368
|
simple: "simple";
|
|
@@ -384,9 +389,10 @@ export declare const comparisonSharedResponseSchema: z.ZodObject<{
|
|
|
384
389
|
boolean: "boolean";
|
|
385
390
|
date: "date";
|
|
386
391
|
enum: "enum";
|
|
387
|
-
select: "select";
|
|
388
|
-
price: "price";
|
|
389
392
|
multiselect: "multiselect";
|
|
393
|
+
price: "price";
|
|
394
|
+
select: "select";
|
|
395
|
+
page_builder: "page_builder";
|
|
390
396
|
}>;
|
|
391
397
|
values: z.ZodArray<z.ZodNullable<z.ZodString>>;
|
|
392
398
|
rowClass: z.ZodEnum<{
|
|
@@ -523,7 +529,7 @@ export declare const comparisonAdminDetailSchema: z.ZodObject<{
|
|
|
523
529
|
products: z.ZodArray<z.ZodObject<{
|
|
524
530
|
id: z.ZodString;
|
|
525
531
|
sku: z.ZodString;
|
|
526
|
-
name: z.
|
|
532
|
+
name: z.ZodString;
|
|
527
533
|
slug: z.ZodString;
|
|
528
534
|
type: z.ZodEnum<{
|
|
529
535
|
simple: "simple";
|
|
@@ -550,9 +556,10 @@ export declare const comparisonAdminDetailSchema: z.ZodObject<{
|
|
|
550
556
|
boolean: "boolean";
|
|
551
557
|
date: "date";
|
|
552
558
|
enum: "enum";
|
|
553
|
-
select: "select";
|
|
554
|
-
price: "price";
|
|
555
559
|
multiselect: "multiselect";
|
|
560
|
+
price: "price";
|
|
561
|
+
select: "select";
|
|
562
|
+
page_builder: "page_builder";
|
|
556
563
|
}>;
|
|
557
564
|
values: z.ZodArray<z.ZodNullable<z.ZodString>>;
|
|
558
565
|
rowClass: z.ZodEnum<{
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"comparisons.d.ts","sourceRoot":"","sources":["../src/comparisons.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAiBxB,eAAO,MAAM,qBAAqB,2CAA4C,CAAC;AAC/E,eAAO,MAAM,gCAAgC,IAAI,CAAC;AAClD,eAAO,MAAM,gCAAgC,KAAK,CAAC;AAMnD,eAAO,MAAM,2BAA2B;;;;EAAgC,CAAC;AACzE,MAAM,MAAM,qBAAqB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,2BAA2B,CAAC,CAAC;AAEhF;;;;;;GAMG;AACH,eAAO,MAAM,wBAAwB;;;EAAkC,CAAC;AACxE,MAAM,MAAM,kBAAkB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,wBAAwB,CAAC,CAAC;AAM1E,eAAO,MAAM,8BAA8B;;;;;;;;;;;;;;;;;;;;
|
|
1
|
+
{"version":3,"file":"comparisons.d.ts","sourceRoot":"","sources":["../src/comparisons.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAiBxB,eAAO,MAAM,qBAAqB,2CAA4C,CAAC;AAC/E,eAAO,MAAM,gCAAgC,IAAI,CAAC;AAClD,eAAO,MAAM,gCAAgC,KAAK,CAAC;AAMnD,eAAO,MAAM,2BAA2B;;;;EAAgC,CAAC;AACzE,MAAM,MAAM,qBAAqB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,2BAA2B,CAAC,CAAC;AAEhF;;;;;;GAMG;AACH,eAAO,MAAM,wBAAwB;;;EAAkC,CAAC;AACxE,MAAM,MAAM,kBAAkB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,wBAAwB,CAAC,CAAC;AAM1E,eAAO,MAAM,8BAA8B;;;;;;;;;;;;;;;;;;;;iBA4BzC,CAAC;AACH,MAAM,MAAM,wBAAwB,GAAG,CAAC,CAAC,KAAK,CAAC,OA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isonRowClassSchema = z.enum(['common', 'different']);
|
|
|
33
33
|
export const comparisonProductSummarySchema = z.object({
|
|
34
34
|
id: uuidSchema,
|
|
35
35
|
sku: z.string(),
|
|
36
|
-
name
|
|
36
|
+
/** Feature 174 (`contracts/readers.md` §2) — the name effective at the comparison's (channel, language). */
|
|
37
|
+
name: z.string(),
|
|
37
38
|
slug: z.string(),
|
|
38
39
|
type: z.enum(['simple', 'configurable', 'grouped', 'bundle', 'virtual']),
|
|
39
40
|
/**
|
package/dist/comparisons.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"comparisons.js","sourceRoot":"","sources":["../src/comparisons.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAAE,UAAU,EAAE,WAAW,EAAE,wBAAwB,EAAE,MAAM,aAAa,CAAC;AAChF,OAAO,EAAE,wBAAwB,EAAE,MAAM,cAAc,CAAC;AAExD,uEAAuE;AACvE,EAAE;AACF,4EAA4E;AAC5E,6EAA6E;AAC7E,EAAE;AACF,8DAA8D;AAC9D,0EAA0E;AAC1E,wEAAwE;AAExE,8EAA8E;AAC9E,gDAAgD;AAChD,8EAA8E;AAE9E,MAAM,CAAC,MAAM,qBAAqB,GAAG,CAAC,KAAK,EAAE,QAAQ,EAAE,aAAa,CAAU,CAAC;AAC/E,MAAM,CAAC,MAAM,gCAAgC,GAAG,CAAC,CAAC;AAClD,MAAM,CAAC,MAAM,gCAAgC,GAAG,EAAE,CAAC;AAEnD,8EAA8E;AAC9E,4CAA4C;AAC5C,8EAA8E;AAE9E,MAAM,CAAC,MAAM,2BAA2B,GAAG,CAAC,CAAC,IAAI,CAAC,qBAAqB,CAAC,CAAC;AAGzE;;;;;;GAMG;AACH,MAAM,CAAC,MAAM,wBAAwB,GAAG,CAAC,CAAC,IAAI,CAAC,CAAC,QAAQ,EAAE,WAAW,CAAC,CAAC,CAAC;AAGxE,8EAA8E;AAC9E,iEA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Amount: z.ZodNumber;
|
|
20
20
|
availableAmount: z.ZodNumber;
|
|
21
21
|
currency: z.ZodString;
|
|
22
|
+
activeReservationCount: z.ZodNumber;
|
|
22
23
|
activeReservations: z.ZodArray<z.ZodObject<{
|
|
23
24
|
orderId: z.ZodString;
|
|
24
25
|
amount: z.ZodNumber;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"credit-limits.d.ts","sourceRoot":"","sources":["../src/credit-limits.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAIxB;;;GAGG;AAEH,eAAO,MAAM,kCAAkC;;;EAAiC,CAAC;AACjF,MAAM,MAAM,4BAA4B,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,kCAAkC,CAAC,CAAC;AAE9F,eAAO,MAAM,yCAAyC;;;;EAIpD,CAAC;AACH,MAAM,MAAM,mCAAmC,GAAG,CAAC,CAAC,KAAK,CACvD,OAAO,yCAAyC,CACjD,CAAC;AAEF,eAAO,MAAM,qBAAqB
|
|
1
|
+
{"version":3,"file":"credit-limits.d.ts","sourceRoot":"","sources":["../src/credit-limits.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAIxB;;;GAGG;AAEH,eAAO,MAAM,kCAAkC;;;EAAiC,CAAC;AACjF,MAAM,MAAM,4BAA4B,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,kCAAkC,CAAC,CAAC;AAE9F,eAAO,MAAM,yCAAyC;;;;EAIpD,CAAC;AACH,MAAM,MAAM,mCAAmC,GAAG,CAAC,CAAC,KAAK,CACvD,OAAO,yCAAyC,CACjD,CAAC;AAEF,eAAO,MAAM,qBAAqB;;;;;;;;;;;;iBA2BhC,CAAC;AACH,MAAM,MAAM,eAAe,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,qBAAqB,CAAC,CAAC;AAEpE,eAAO,MAAM,6BAA6B;;;;iBAIxC,CAAC;AACH,MA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AAO,MAAM,gCAAgC;;;;;kBAYlC,CAAC;AACZ,MAAM,MAAM,0BAA0B,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,gCAAgC,CAAC,CAAC;AAE1F,mEAAmE;AACnE,eAAO,MAAM,gCAAgC,uCAAkD,CAAC;AAEhG,uEAAuE;AACvE,eAAO,MAAM,kCAAkC;;;;;;;CAErC,CAAC"}
|
package/dist/credit-limits.js
CHANGED
|
@@ -16,6 +16,20 @@ export const creditLimitViewSchema = z.object({
|
|
|
16
16
|
grantedAmount: z.number().finite().nonnegative(),
|
|
17
17
|
availableAmount: z.number().finite(),
|
|
18
18
|
currency: z.string().length(3),
|
|
19
|
+
/**
|
|
20
|
+
* How many reservations the limit holds — **every** one of them, whoever
|
|
21
|
+
* placed the order (issue #748). The limit is shared, so `availableAmount`
|
|
22
|
+
* and this count are the Organization's figures; `activeReservations` is the
|
|
23
|
+
* list the caller may read, which for the customer's `GET
|
|
24
|
+
* /api/v1/me/credit-limit` is narrower when their organization role lacks
|
|
25
|
+
* `orders.view_organization`. Never derive the count from the list's length.
|
|
26
|
+
*/
|
|
27
|
+
activeReservationCount: z.number().int().nonnegative(),
|
|
28
|
+
/**
|
|
29
|
+
* The active reservations the caller may read. The admin views list every
|
|
30
|
+
* one; the customer view lists the reservations of the orders the buyer may
|
|
31
|
+
* read under `orders`' read scope (`specs/170-organization-roles/` FR-049).
|
|
32
|
+
*/
|
|
19
33
|
activeReservations: z.array(z.object({
|
|
20
34
|
orderId: uuidSchema,
|
|
21
35
|
amount: z.number().finite(),
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"credit-limits.js","sourceRoot":"","sources":["../src/credit-limits.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAAE,iBAAiB,EAAE,UAAU,EAAE,MAAM,aAAa,CAAC;AAC5D,OAAO,EAAE,gBAAgB,EAAE,MAAM,kBAAkB,CAAC;AAEpD;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BAA2B,CAAC,QAAQ,CAAC,EAAE,gCAAgC;CAChE,CAAC"}
|
package/dist/crm-rich-text.d.ts
CHANGED
|
@@ -1,64 +1,13 @@
|
|
|
1
|
-
import { type OpportunityReferenceType } from './crm.js';
|
|
2
1
|
/**
|
|
3
|
-
* The formatted-text grammar of an Opportunity's free text
|
|
4
|
-
*
|
|
5
|
-
*
|
|
6
|
-
*
|
|
7
|
-
*
|
|
8
|
-
*
|
|
9
|
-
*
|
|
10
|
-
*
|
|
11
|
-
*
|
|
12
|
-
* | `**text**` | bold |
|
|
13
|
-
* | `_text_` | italic — not inside a word (`ABC_1_X`) |
|
|
14
|
-
* | `~~text~~` | strikethrough |
|
|
15
|
-
* | `[label](https://…)` | a link — `http`, `https`, `mailto` only |
|
|
16
|
-
* | `- item` | a bulleted list's item |
|
|
17
|
-
* | `3. item` | a numbered list's item |
|
|
18
|
-
* | `\*`, `\_`, … | the character itself |
|
|
19
|
-
*
|
|
20
|
-
* Every line is a block. Text written before formatting existed reads as the
|
|
21
|
-
* paragraphs it was, so nothing stored needs migrating; the token grammar, the
|
|
22
|
-
* length limits, mention extraction and search are untouched; and an e-mail or
|
|
23
|
-
* a bell entry that shows the text plainly shows it readably
|
|
24
|
-
* (`opportunityRichTextToPlain`).
|
|
25
|
-
*
|
|
26
|
-
* **Nothing here is HTML.** A screen draws the blocks as elements of its own,
|
|
27
|
-
* every stretch of text as a text node, so there is no markup to sanitise.
|
|
28
|
-
*/
|
|
29
|
-
export type OpportunityRichMark = 'bold' | 'italic' | 'strike';
|
|
30
|
-
export type OpportunityRichInline = {
|
|
31
|
-
kind: 'text';
|
|
32
|
-
text: string;
|
|
33
|
-
marks: OpportunityRichMark[];
|
|
34
|
-
href?: string;
|
|
35
|
-
} | {
|
|
36
|
-
kind: 'reference';
|
|
37
|
-
type: OpportunityReferenceType;
|
|
38
|
-
id: string;
|
|
39
|
-
marks: OpportunityRichMark[];
|
|
40
|
-
};
|
|
41
|
-
export type OpportunityRichBlock = {
|
|
42
|
-
kind: 'paragraph';
|
|
43
|
-
content: OpportunityRichInline[];
|
|
44
|
-
} | {
|
|
45
|
-
kind: 'bullet_list';
|
|
46
|
-
items: OpportunityRichInline[][];
|
|
47
|
-
} | {
|
|
48
|
-
kind: 'ordered_list';
|
|
49
|
-
start: number;
|
|
50
|
-
items: OpportunityRichInline[][];
|
|
51
|
-
};
|
|
52
|
-
/** Whether `href` may be a link's address. */
|
|
53
|
-
export declare function isSafeOpportunityRichHref(href: string): boolean;
|
|
54
|
-
/** The blocks a stored text stands for. The empty text is no blocks. */
|
|
55
|
-
export declare function parseOpportunityRichText(source: string): OpportunityRichBlock[];
|
|
56
|
-
/** The stored text of `blocks` — the inverse of `parseOpportunityRichText`. */
|
|
57
|
-
export declare function formatOpportunityRichText(blocks: readonly OpportunityRichBlock[]): string;
|
|
58
|
-
/**
|
|
59
|
-
* The text without its formatting, for a place that shows text plainly — an
|
|
60
|
-
* e-mail's text part, a bell entry, a preview. Reference tokens are kept for
|
|
61
|
-
* the caller to resolve; list items keep their markers, links their address.
|
|
2
|
+
* The formatted-text grammar of an Opportunity's free text, under the names CRM
|
|
3
|
+
* has always exported (`specs/158-crm-opportunity-inline-editing/`).
|
|
4
|
+
*
|
|
5
|
+
* The grammar itself lives in `record-rich-text.ts` since
|
|
6
|
+
* `specs/163-projects-and-tasks/` (research R-14): Projects read and write the
|
|
7
|
+
* same formatted text, so it moved under neutral names and every name below is
|
|
8
|
+
* an **alias** of the shared one — the same function, the same type — widened to
|
|
9
|
+
* the five reference types of `record-references.ts`. A text CRM stored before
|
|
10
|
+
* reads exactly as it did.
|
|
62
11
|
*/
|
|
63
|
-
export
|
|
12
|
+
export { formatRecordRichText as formatOpportunityRichText, isSafeRecordRichHref as isSafeOpportunityRichHref, parseRecordRichText as parseOpportunityRichText, recordRichTextToPlain as opportunityRichTextToPlain, type RecordRichBlock as OpportunityRichBlock, type RecordRichInline as OpportunityRichInline, type RecordRichMark as OpportunityRichMark, } from './record-rich-text.js';
|
|
64
13
|
//# sourceMappingURL=crm-rich-text.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"crm-rich-text.d.ts","sourceRoot":"","sources":["../src/crm-rich-text.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"crm-rich-text.d.ts","sourceRoot":"","sources":["../src/crm-rich-text.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AAEH,OAAO,EACL,oBAAoB,IAAI,yBAAyB,EACjD,oBAAoB,IAAI,yBAAyB,EACjD,mBAAmB,IAAI,wBAAwB,EAC/C,qBAAqB,IAAI,0BAA0B,EACnD,KAAK,eAAe,IAAI,oBAAoB,EAC5C,KAAK,gBAAgB,IAAI,qBAAqB,EAC9C,KAAK,cAAc,IAAI,mBAAmB,GAC3C,MAAM,uBAAuB,CAAC"}
|
package/dist/crm-rich-text.js
CHANGED
|
@@ -1,303 +1,13 @@
|
|
|
1
|
-
import { opportunityReferenceTypeSchema } from './crm.js';
|
|
2
|
-
/** The order marks are written in, outermost first — what makes the writer deterministic. */
|
|
3
|
-
const MARK_ORDER = ['bold', 'italic', 'strike'];
|
|
4
|
-
const MARK_DELIMITER = { bold: '**', italic: '_', strike: '~~' };
|
|
5
|
-
/** Characters a backslash makes literal. */
|
|
6
|
-
const ESCAPABLE = new Set(['\\', '*', '_', '~', '[', ']']);
|
|
7
|
-
const SAFE_HREF = /^(https?:\/\/[^\s()<>]+|mailto:[^\s()<>]+)$/i;
|
|
8
|
-
const REFERENCE_AT = new RegExp(`\\[\\[(${opportunityReferenceTypeSchema.options.join('|')}):([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})\\]\\]`, 'y');
|
|
9
|
-
const BULLET_LINE = /^- (.*)$/s;
|
|
10
|
-
const ORDERED_LINE = /^(\d{1,9})\. (.*)$/s;
|
|
11
|
-
const WORD_CHARACTER = /[\p{L}\p{N}]/u;
|
|
12
|
-
/** Whether `href` may be a link's address. */
|
|
13
|
-
export function isSafeOpportunityRichHref(href) {
|
|
14
|
-
return SAFE_HREF.test(href);
|
|
15
|
-
}
|
|
16
|
-
function isWord(character) {
|
|
17
|
-
return character !== undefined && WORD_CHARACTER.test(character);
|
|
18
|
-
}
|
|
19
|
-
/** Whether the delimiter at the cursor may close `mark`. */
|
|
20
|
-
function closesHere(cursor, mark) {
|
|
21
|
-
const delimiter = MARK_DELIMITER[mark];
|
|
22
|
-
if (!cursor.source.startsWith(delimiter, cursor.at))
|
|
23
|
-
return false;
|
|
24
|
-
if (mark === 'italic')
|
|
25
|
-
return !isWord(cursor.source[cursor.at + 1]);
|
|
26
|
-
return true;
|
|
27
|
-
}
|
|
28
|
-
/** Whether the delimiter at the cursor may open `mark`. */
|
|
29
|
-
function opensHere(cursor, mark) {
|
|
30
|
-
const delimiter = MARK_DELIMITER[mark];
|
|
31
|
-
if (!cursor.source.startsWith(delimiter, cursor.at))
|
|
32
|
-
return false;
|
|
33
|
-
const next = cursor.source[cursor.at + delimiter.length];
|
|
34
|
-
if (next === undefined)
|
|
35
|
-
return false;
|
|
36
|
-
if (mark === 'italic')
|
|
37
|
-
return !isWord(cursor.source[cursor.at - 1]) && next !== ' ';
|
|
38
|
-
return true;
|
|
39
|
-
}
|
|
40
1
|
/**
|
|
41
|
-
*
|
|
42
|
-
*
|
|
43
|
-
*
|
|
2
|
+
* The formatted-text grammar of an Opportunity's free text, under the names CRM
|
|
3
|
+
* has always exported (`specs/158-crm-opportunity-inline-editing/`).
|
|
4
|
+
*
|
|
5
|
+
* The grammar itself lives in `record-rich-text.ts` since
|
|
6
|
+
* `specs/163-projects-and-tasks/` (research R-14): Projects read and write the
|
|
7
|
+
* same formatted text, so it moved under neutral names and every name below is
|
|
8
|
+
* an **alias** of the shared one — the same function, the same type — widened to
|
|
9
|
+
* the five reference types of `record-references.ts`. A text CRM stored before
|
|
10
|
+
* reads exactly as it did.
|
|
44
11
|
*/
|
|
45
|
-
|
|
46
|
-
const out = [];
|
|
47
|
-
const pushText = (value) => {
|
|
48
|
-
const last = out[out.length - 1];
|
|
49
|
-
if (last && last.kind === 'text' && sameMarks(last.marks, marks) && last.href === href) {
|
|
50
|
-
last.text += value;
|
|
51
|
-
return;
|
|
52
|
-
}
|
|
53
|
-
out.push({ kind: 'text', text: value, marks: [...marks], ...(href ? { href } : {}) });
|
|
54
|
-
};
|
|
55
|
-
while (cursor.at < cursor.source.length) {
|
|
56
|
-
if (until && 'mark' in until && closesHere(cursor, until.mark)) {
|
|
57
|
-
cursor.at += MARK_DELIMITER[until.mark].length;
|
|
58
|
-
return out;
|
|
59
|
-
}
|
|
60
|
-
if (until && 'linkLabel' in until && cursor.source[cursor.at] === ']') {
|
|
61
|
-
cursor.at += 1;
|
|
62
|
-
return out;
|
|
63
|
-
}
|
|
64
|
-
const character = cursor.source[cursor.at];
|
|
65
|
-
if (character === '\\' && ESCAPABLE.has(cursor.source[cursor.at + 1] ?? '')) {
|
|
66
|
-
pushText(cursor.source[cursor.at + 1]);
|
|
67
|
-
cursor.at += 2;
|
|
68
|
-
continue;
|
|
69
|
-
}
|
|
70
|
-
REFERENCE_AT.lastIndex = cursor.at;
|
|
71
|
-
const reference = REFERENCE_AT.exec(cursor.source);
|
|
72
|
-
if (reference) {
|
|
73
|
-
out.push({
|
|
74
|
-
kind: 'reference',
|
|
75
|
-
type: reference[1],
|
|
76
|
-
id: reference[2].toLowerCase(),
|
|
77
|
-
marks: [...marks],
|
|
78
|
-
});
|
|
79
|
-
cursor.at += reference[0].length;
|
|
80
|
-
continue;
|
|
81
|
-
}
|
|
82
|
-
if (character === '[' && href === undefined && !cursor.exhausted.has('link')) {
|
|
83
|
-
const link = tryLink(cursor, marks);
|
|
84
|
-
if (link) {
|
|
85
|
-
out.push(...link);
|
|
86
|
-
continue;
|
|
87
|
-
}
|
|
88
|
-
}
|
|
89
|
-
const opened = MARK_ORDER.find((mark) => !marks.includes(mark) && !cursor.exhausted.has(mark) && opensHere(cursor, mark));
|
|
90
|
-
if (opened) {
|
|
91
|
-
const start = cursor.at;
|
|
92
|
-
cursor.at += MARK_DELIMITER[opened].length;
|
|
93
|
-
const inner = readInline(cursor, [...marks, opened].sort(byMarkOrder), href, { mark: opened });
|
|
94
|
-
if (inner) {
|
|
95
|
-
for (const node of inner) {
|
|
96
|
-
if (node.kind === 'text')
|
|
97
|
-
pushTextNode(out, node);
|
|
98
|
-
else
|
|
99
|
-
out.push(node);
|
|
100
|
-
}
|
|
101
|
-
continue;
|
|
102
|
-
}
|
|
103
|
-
cursor.at = start;
|
|
104
|
-
cursor.exhausted.add(opened);
|
|
105
|
-
pushText(MARK_DELIMITER[opened]);
|
|
106
|
-
cursor.at += MARK_DELIMITER[opened].length;
|
|
107
|
-
continue;
|
|
108
|
-
}
|
|
109
|
-
pushText(character);
|
|
110
|
-
cursor.at += 1;
|
|
111
|
-
}
|
|
112
|
-
return until ? null : out;
|
|
113
|
-
}
|
|
114
|
-
function pushTextNode(out, node) {
|
|
115
|
-
const last = out[out.length - 1];
|
|
116
|
-
if (last && last.kind === 'text' && sameMarks(last.marks, node.marks) && last.href === node.href) {
|
|
117
|
-
last.text += node.text;
|
|
118
|
-
return;
|
|
119
|
-
}
|
|
120
|
-
out.push(node);
|
|
121
|
-
}
|
|
122
|
-
/** `[label](href)` at the cursor, or `null` — and the cursor untouched — when it is not one. */
|
|
123
|
-
function tryLink(cursor, marks) {
|
|
124
|
-
const start = cursor.at;
|
|
125
|
-
cursor.at += 1;
|
|
126
|
-
// The address is only known after the label: read the label once to find
|
|
127
|
-
// where it ends, then again with the address on every piece.
|
|
128
|
-
const probe = readInline(cursor, marks, '', { linkLabel: true });
|
|
129
|
-
if (probe && cursor.source[cursor.at] === '(') {
|
|
130
|
-
const close = cursor.source.indexOf(')', cursor.at);
|
|
131
|
-
const href = close === -1 ? '' : cursor.source.slice(cursor.at + 1, close);
|
|
132
|
-
if (close !== -1 && isSafeOpportunityRichHref(href) && probe.length > 0) {
|
|
133
|
-
const labelCursor = { ...cursor, at: start + 1 };
|
|
134
|
-
const label = readInline(labelCursor, marks, href, { linkLabel: true }) ?? [];
|
|
135
|
-
cursor.at = close + 1;
|
|
136
|
-
// A reference inside a label carries no address: a chip is a link of its own.
|
|
137
|
-
return label;
|
|
138
|
-
}
|
|
139
|
-
}
|
|
140
|
-
if (!probe)
|
|
141
|
-
cursor.exhausted.add('link');
|
|
142
|
-
cursor.at = start;
|
|
143
|
-
return null;
|
|
144
|
-
}
|
|
145
|
-
function byMarkOrder(a, b) {
|
|
146
|
-
return MARK_ORDER.indexOf(a) - MARK_ORDER.indexOf(b);
|
|
147
|
-
}
|
|
148
|
-
function sameMarks(a, b) {
|
|
149
|
-
return a.length === b.length && a.every((mark, index) => mark === b[index]);
|
|
150
|
-
}
|
|
151
|
-
function readLine(line) {
|
|
152
|
-
return readInline({ source: line, at: 0, exhausted: new Set() }, [], undefined, null) ?? [];
|
|
153
|
-
}
|
|
154
|
-
/** The blocks a stored text stands for. The empty text is no blocks. */
|
|
155
|
-
export function parseOpportunityRichText(source) {
|
|
156
|
-
if (source === '')
|
|
157
|
-
return [];
|
|
158
|
-
const blocks = [];
|
|
159
|
-
for (const line of source.split('\n')) {
|
|
160
|
-
const bullet = BULLET_LINE.exec(line);
|
|
161
|
-
if (bullet) {
|
|
162
|
-
const last = blocks[blocks.length - 1];
|
|
163
|
-
const item = readLine(bullet[1]);
|
|
164
|
-
if (last?.kind === 'bullet_list')
|
|
165
|
-
last.items.push(item);
|
|
166
|
-
else
|
|
167
|
-
blocks.push({ kind: 'bullet_list', items: [item] });
|
|
168
|
-
continue;
|
|
169
|
-
}
|
|
170
|
-
const ordered = ORDERED_LINE.exec(line);
|
|
171
|
-
if (ordered) {
|
|
172
|
-
const last = blocks[blocks.length - 1];
|
|
173
|
-
const item = readLine(ordered[2]);
|
|
174
|
-
if (last?.kind === 'ordered_list')
|
|
175
|
-
last.items.push(item);
|
|
176
|
-
else
|
|
177
|
-
blocks.push({ kind: 'ordered_list', start: Number(ordered[1]), items: [item] });
|
|
178
|
-
continue;
|
|
179
|
-
}
|
|
180
|
-
// An escaped list marker at the start of a line is the characters of one.
|
|
181
|
-
const escapedOrdered = /^(\d{1,9})\\\. /.exec(line);
|
|
182
|
-
const content = line.startsWith('\\- ')
|
|
183
|
-
? [{ kind: 'text', text: '- ', marks: [] }, ...readLine(line.slice(3))]
|
|
184
|
-
: escapedOrdered
|
|
185
|
-
? [
|
|
186
|
-
{ kind: 'text', text: `${escapedOrdered[1]}. `, marks: [] },
|
|
187
|
-
...readLine(line.slice(escapedOrdered[0].length)),
|
|
188
|
-
]
|
|
189
|
-
: readLine(line);
|
|
190
|
-
blocks.push({ kind: 'paragraph', content: mergeTexts(content) });
|
|
191
|
-
}
|
|
192
|
-
return blocks;
|
|
193
|
-
}
|
|
194
|
-
function mergeTexts(nodes) {
|
|
195
|
-
const out = [];
|
|
196
|
-
for (const node of nodes) {
|
|
197
|
-
if (node.kind === 'text') {
|
|
198
|
-
if (node.text === '')
|
|
199
|
-
continue;
|
|
200
|
-
pushTextNode(out, { ...node, marks: [...node.marks] });
|
|
201
|
-
}
|
|
202
|
-
else
|
|
203
|
-
out.push(node);
|
|
204
|
-
}
|
|
205
|
-
return out;
|
|
206
|
-
}
|
|
207
|
-
// --- Writing ---------------------------------------------------------------------
|
|
208
|
-
function escapeText(value) {
|
|
209
|
-
return value.replace(/[\\*_~[\]]/g, (character) => `\\${character}`);
|
|
210
|
-
}
|
|
211
|
-
/** One line of inline content, with the fewest delimiters that say what it is. */
|
|
212
|
-
function writeInline(nodes) {
|
|
213
|
-
let out = '';
|
|
214
|
-
let open = [];
|
|
215
|
-
let link;
|
|
216
|
-
const closeMarksTo = (depth) => {
|
|
217
|
-
while (open.length > depth)
|
|
218
|
-
out += MARK_DELIMITER[open.pop()];
|
|
219
|
-
};
|
|
220
|
-
const closeLink = () => {
|
|
221
|
-
if (link === undefined)
|
|
222
|
-
return;
|
|
223
|
-
closeMarksTo(0);
|
|
224
|
-
out += `](${link})`;
|
|
225
|
-
link = undefined;
|
|
226
|
-
};
|
|
227
|
-
for (const node of nodes) {
|
|
228
|
-
if (node.kind === 'text' && node.text === '')
|
|
229
|
-
continue;
|
|
230
|
-
const wanted = [...node.marks].sort(byMarkOrder);
|
|
231
|
-
const href = node.kind === 'text' && node.href && isSafeOpportunityRichHref(node.href) ? node.href : undefined;
|
|
232
|
-
if (href !== link) {
|
|
233
|
-
closeLink();
|
|
234
|
-
if (href !== undefined) {
|
|
235
|
-
out += '[';
|
|
236
|
-
link = href;
|
|
237
|
-
}
|
|
238
|
-
}
|
|
239
|
-
let keep = 0;
|
|
240
|
-
while (keep < open.length && keep < wanted.length && open[keep] === wanted[keep])
|
|
241
|
-
keep += 1;
|
|
242
|
-
closeMarksTo(keep);
|
|
243
|
-
for (const mark of wanted.slice(keep)) {
|
|
244
|
-
out += MARK_DELIMITER[mark];
|
|
245
|
-
open.push(mark);
|
|
246
|
-
}
|
|
247
|
-
out += node.kind === 'text' ? escapeText(node.text) : `[[${node.type}:${node.id}]]`;
|
|
248
|
-
}
|
|
249
|
-
closeLink();
|
|
250
|
-
closeMarksTo(0);
|
|
251
|
-
open = [];
|
|
252
|
-
return out;
|
|
253
|
-
}
|
|
254
|
-
/** The stored text of `blocks` — the inverse of `parseOpportunityRichText`. */
|
|
255
|
-
export function formatOpportunityRichText(blocks) {
|
|
256
|
-
const lines = [];
|
|
257
|
-
for (const block of blocks) {
|
|
258
|
-
if (block.kind === 'paragraph') {
|
|
259
|
-
const line = writeInline(block.content);
|
|
260
|
-
// A paragraph that begins like a list item says it is not one.
|
|
261
|
-
lines.push(line.startsWith('- ') ? `\\${line}` : line.replace(/^(\d{1,9})\. /, '$1\\. '));
|
|
262
|
-
continue;
|
|
263
|
-
}
|
|
264
|
-
block.items.forEach((item, index) => {
|
|
265
|
-
const marker = block.kind === 'bullet_list' ? '- ' : `${block.start + index}. `;
|
|
266
|
-
lines.push(`${marker}${writeInline(item)}`);
|
|
267
|
-
});
|
|
268
|
-
}
|
|
269
|
-
return lines.join('\n');
|
|
270
|
-
}
|
|
271
|
-
/**
|
|
272
|
-
* The text without its formatting, for a place that shows text plainly — an
|
|
273
|
-
* e-mail's text part, a bell entry, a preview. Reference tokens are kept for
|
|
274
|
-
* the caller to resolve; list items keep their markers, links their address.
|
|
275
|
-
*/
|
|
276
|
-
export function opportunityRichTextToPlain(source) {
|
|
277
|
-
const inline = (nodes) => {
|
|
278
|
-
let out = '';
|
|
279
|
-
let link;
|
|
280
|
-
for (const node of nodes) {
|
|
281
|
-
const href = node.kind === 'text' ? node.href : undefined;
|
|
282
|
-
if (link !== undefined && href !== link) {
|
|
283
|
-
out += ` (${link})`;
|
|
284
|
-
link = undefined;
|
|
285
|
-
}
|
|
286
|
-
if (href !== undefined)
|
|
287
|
-
link = href;
|
|
288
|
-
out += node.kind === 'text' ? node.text : `[[${node.type}:${node.id}]]`;
|
|
289
|
-
}
|
|
290
|
-
if (link !== undefined)
|
|
291
|
-
out += ` (${link})`;
|
|
292
|
-
return out;
|
|
293
|
-
};
|
|
294
|
-
const lines = [];
|
|
295
|
-
for (const block of parseOpportunityRichText(source)) {
|
|
296
|
-
if (block.kind === 'paragraph')
|
|
297
|
-
lines.push(inline(block.content));
|
|
298
|
-
else
|
|
299
|
-
block.items.forEach((item, index) => lines.push(`${block.kind === 'bullet_list' ? '- ' : `${block.start + index}. `}${inline(item)}`));
|
|
300
|
-
}
|
|
301
|
-
return lines.join('\n');
|
|
302
|
-
}
|
|
12
|
+
export { formatRecordRichText as formatOpportunityRichText, isSafeRecordRichHref as isSafeOpportunityRichHref, parseRecordRichText as parseOpportunityRichText, recordRichTextToPlain as opportunityRichTextToPlain, } from './record-rich-text.js';
|
|
303
13
|
//# sourceMappingURL=crm-rich-text.js.map
|