@gorgo/medusa-integration 0.1.3 → 0.1.5
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/.medusa/server/src/admin/index.js +218 -39
- package/.medusa/server/src/admin/index.mjs +219 -40
- package/.medusa/server/src/lib/__tests__/catalog-fallback.unit.spec.js +10 -5
- package/.medusa/server/src/lib/__tests__/catalog.unit.spec.js +64 -1
- package/.medusa/server/src/lib/catalog.generated.js +37 -21
- package/.medusa/server/src/lib/catalog.js +46 -2
- package/.medusa/server/src/lib/markdown/__tests__/inline.unit.spec.d.ts +1 -0
- package/.medusa/server/src/lib/markdown/__tests__/inline.unit.spec.js +90 -0
- package/.medusa/server/src/lib/markdown/__tests__/no-raw-html.unit.spec.d.ts +1 -0
- package/.medusa/server/src/lib/markdown/__tests__/no-raw-html.unit.spec.js +20 -0
- package/.medusa/server/src/lib/markdown/__tests__/parse.unit.spec.d.ts +1 -0
- package/.medusa/server/src/lib/markdown/__tests__/parse.unit.spec.js +91 -0
- package/.medusa/server/src/lib/markdown/href.d.ts +9 -0
- package/.medusa/server/src/lib/markdown/href.js +20 -0
- package/.medusa/server/src/lib/markdown/inline.d.ts +2 -0
- package/.medusa/server/src/lib/markdown/inline.js +51 -0
- package/.medusa/server/src/lib/markdown/parse.d.ts +12 -0
- package/.medusa/server/src/lib/markdown/parse.js +97 -0
- package/.medusa/server/src/lib/markdown/types.d.ts +39 -0
- package/.medusa/server/src/lib/markdown/types.js +3 -0
- package/.medusa/server/src/modules/integration/descriptor/__tests__/build-zod.unit.spec.js +30 -1
- package/.medusa/server/src/modules/integration/descriptor/__tests__/define.unit.spec.js +34 -1
- package/.medusa/server/src/modules/integration/descriptor/build-zod.js +11 -3
- package/.medusa/server/src/modules/integration/descriptor/define.js +13 -1
- package/.medusa/server/src/modules/integration/descriptor/option.d.ts +2 -2
- package/.medusa/server/src/types/http/integration/admin/entities.d.ts +11 -3
- package/.medusa/server/src/types/integration/common.d.ts +1 -1
- package/README.md +5 -5
- package/package.json +3 -2
|
@@ -47,9 +47,17 @@ export interface CatalogIntegration {
|
|
|
47
47
|
label: string;
|
|
48
48
|
shortDescription: string;
|
|
49
49
|
repository: string;
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
50
|
+
/** Dropped at the catalog boundary unless it is an absolute https URL — see `isSafeHref`. */
|
|
51
|
+
docsUrl?: string;
|
|
52
|
+
/**
|
|
53
|
+
* Markdown setup guide shown in the Admin install drawer, per locale. Either locale may be
|
|
54
|
+
* absent: the catalog boundary keeps a locale only when it is a usable string, so a
|
|
55
|
+
* single-locale snippet is common, not malformed.
|
|
56
|
+
*/
|
|
57
|
+
docsSnippet?: {
|
|
58
|
+
en?: string;
|
|
59
|
+
ru?: string;
|
|
60
|
+
};
|
|
53
61
|
/** Icon URL (relative to the Gorgo host). */
|
|
54
62
|
icon: string;
|
|
55
63
|
stars: number | null;
|
|
@@ -18,7 +18,7 @@ export interface UiField {
|
|
|
18
18
|
label: I18nKey;
|
|
19
19
|
hint?: I18nKey;
|
|
20
20
|
placeholder?: string;
|
|
21
|
-
options?: string[];
|
|
21
|
+
options?: (string | number)[];
|
|
22
22
|
/** For `select`: i18n-key label per enum value (value → key). UI shows the label, stores the value. */
|
|
23
23
|
optionLabels?: Partial<Record<string, I18nKey>>;
|
|
24
24
|
/** Descriptor default for a (non-secret) field — pre-fills the edit form when there's no stored value. */
|
package/README.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
<p align="center">
|
|
2
|
-
<a href="https://docs.gorgojs.com/
|
|
3
|
-
<img alt="Integration Module logo" src="https://raw.githubusercontent.com/gorgojs/medusa-integrations/refs/heads/main/assets/integration-medusa-logo.svg" width="
|
|
2
|
+
<a href="https://docs.gorgojs.com/medusa-modules/integration">
|
|
3
|
+
<img alt="Integration Module logo" src="https://raw.githubusercontent.com/gorgojs/medusa-integrations/refs/heads/main/assets/integration-medusa-logo.svg" width="270">
|
|
4
4
|
</a>
|
|
5
5
|
</p>
|
|
6
6
|
|
|
@@ -9,7 +9,7 @@ Integration Module for Medusa
|
|
|
9
9
|
</h1>
|
|
10
10
|
|
|
11
11
|
<p align="center">
|
|
12
|
-
<a href="https://docs.gorgojs.com/
|
|
12
|
+
<a href="https://docs.gorgojs.com/medusa-modules/integration">Documentation</a>
|
|
13
13
|
<br/>
|
|
14
14
|
A Medusa module that lets any plugin or provider declare its options and store admins manage them in the Admin – no <code>medusa-config</code> edits, no redeploys.
|
|
15
15
|
<br/>
|
|
@@ -47,7 +47,7 @@ Integration Module for Medusa
|
|
|
47
47
|
|
|
48
48
|
## What is the Integration Module?
|
|
49
49
|
|
|
50
|
-
The Integration Module lets any plugin declare its options, and store admins configure them as **integrations** right in the Admin – no `medusa-config` edits, no redeploys.
|
|
50
|
+
The Integration Module lets any plugin declare its options, and store admins configure them as **integrations** right in the Admin – no `medusa-config` edits, no redeploys. The module takes care of the UI, storage, encryption, and validation.
|
|
51
51
|
|
|
52
52
|
The Integration Module is useful for any Medusa developer building plugins, providers, or custom modules that need configurable settings, such as API keys, credentials, modes, or webhooks, but who'd rather not hand-build settings UI pages, a data layer, and validation for each one.
|
|
53
53
|
|
|
@@ -75,7 +75,7 @@ The Integration Module is useful for any Medusa developer building plugins, prov
|
|
|
75
75
|
|
|
76
76
|
<p>
|
|
77
77
|
<a href="https://www.npmjs.com/package/@gorgo/medusa-payment-tkassa">
|
|
78
|
-
<img src="https://raw.githubusercontent.com/gorgojs/medusa-integrations/refs/heads/main/catalog/icons/tkassa.
|
|
78
|
+
<img src="https://raw.githubusercontent.com/gorgojs/medusa-integrations/refs/heads/main/catalog/icons/tkassa.svg" width="50" hspace="5" align="left" alt="T-Kassa logo"/>
|
|
79
79
|
</a>
|
|
80
80
|
<b>T-Kassa by T-Bank</b><br/>
|
|
81
81
|
Payment · <a href="https://www.npmjs.com/package/@gorgo/medusa-payment-tkassa">@gorgo/medusa-payment-tkassa</a>
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@gorgo/medusa-integration",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.5",
|
|
4
4
|
"description": "Integration module for Medusa",
|
|
5
5
|
"author": {
|
|
6
6
|
"name": "Gorgo",
|
|
@@ -44,8 +44,9 @@
|
|
|
44
44
|
"scripts": {
|
|
45
45
|
"build": "medusa plugin:build",
|
|
46
46
|
"dev": "yarn predev && medusa plugin:develop",
|
|
47
|
+
"catalog:gen": "node scripts/gen-catalog.mjs",
|
|
47
48
|
"predev": "medusa plugin:publish",
|
|
48
|
-
"prepublishOnly": "medusa plugin:build",
|
|
49
|
+
"prepublishOnly": "yarn catalog:gen && medusa plugin:build",
|
|
49
50
|
"test:unit": "TEST_TYPE=unit NODE_OPTIONS=--experimental-vm-modules jest --silent --runInBand --forceExit"
|
|
50
51
|
},
|
|
51
52
|
"dependencies": {
|