@retailcrm/embed-ui-v1-endpoint 0.9.21 → 0.9.22-alpha.1

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.
Files changed (46) hide show
  1. package/README.md +70 -11
  2. package/bin/embed-ui-v1-endpoint-mcp.mjs +10 -0
  3. package/bin/embed-ui-v1-endpoint.mjs +416 -0
  4. package/dist/common/targets.cjs +61 -130
  5. package/dist/common/targets.d.ts +38 -27
  6. package/dist/common/targets.documentation.d.ts +302 -0
  7. package/dist/common/targets.js +61 -130
  8. package/dist/mcp/server.cjs +115 -0
  9. package/dist/mcp/server.d.ts +3 -0
  10. package/dist/mcp/server.js +97 -0
  11. package/dist/meta.json +618 -0
  12. package/docs/README.md +8 -6
  13. package/docs/create-endpoint.md +8 -10
  14. package/docs/define-page-runner.md +3 -3
  15. package/docs/define-widget-runner.md +2 -2
  16. package/docs/layout.md +14 -37
  17. package/docs/menu-placements.md +11 -13
  18. package/docs/page-routes.md +12 -14
  19. package/docs/run-endpoint.md +4 -4
  20. package/docs/targets/customer-card-communications-after.yml +48 -0
  21. package/docs/targets/customer-card-inwork-after.yml +48 -0
  22. package/docs/targets/customer-card-inwork-before.yml +48 -0
  23. package/docs/targets/customer-card-phone.yml +49 -0
  24. package/docs/targets/order-card-comment-manager-before.yml +51 -0
  25. package/docs/targets/order-card-common-after.yml +51 -0
  26. package/docs/targets/order-card-common-before.yml +51 -0
  27. package/docs/targets/order-card-customer-after.yml +51 -0
  28. package/docs/targets/order-card-customer-before.yml +51 -0
  29. package/docs/targets/order-card-customer-email.yml +51 -0
  30. package/docs/targets/order-card-customer-phone.yml +51 -0
  31. package/docs/targets/order-card-delivery-address.yml +51 -0
  32. package/docs/targets/order-card-delivery-after.yml +51 -0
  33. package/docs/targets/order-card-delivery-before.yml +51 -0
  34. package/docs/targets/order-card-dimensions-before.yml +51 -0
  35. package/docs/targets/order-card-list-after.yml +51 -0
  36. package/docs/targets/order-card-list-before.yml +51 -0
  37. package/docs/targets/order-card-payment-before.yml +51 -0
  38. package/docs/targets/order-card-store-before.yml +51 -0
  39. package/docs/targets/order-mg-delivery-after.yml +51 -0
  40. package/docs/targets/order-mg-delivery-before.yml +51 -0
  41. package/docs/targets/order-mg-list-after.yml +51 -0
  42. package/docs/targets/order-mg-list-before.yml +51 -0
  43. package/docs/targets/order-mg-payment-after.yml +51 -0
  44. package/docs/targets/order-mg-payment-before.yml +51 -0
  45. package/docs/targets.md +42 -17
  46. package/package.json +27 -7
@@ -0,0 +1,51 @@
1
+ target: "order/card:common.before"
2
+ summary: >
3
+ Widget for the section with common data. It is placed in the full order form: Section start, right above the input fields.
4
+ language: en-GB
5
+ audience: ai
6
+
7
+ public_import:
8
+ from: "@retailcrm/embed-ui-v1-endpoint/common"
9
+ named:
10
+ - targets
11
+ - TargetName
12
+
13
+ runner_import:
14
+ from: "@retailcrm/embed-ui-v1-endpoint/remote/widgets"
15
+ named:
16
+ - defineWidgetRunner
17
+ - defineMultiRunner
18
+
19
+ page:
20
+ id: "order/card"
21
+ label: "full order form"
22
+ area: "common.before"
23
+
24
+ description: "Widget for the section with common data"
25
+ location: "Section start, right above the input fields"
26
+
27
+ target_config:
28
+ contexts:
29
+ - "order/card"
30
+ - "order/card:settings"
31
+ - "user/current"
32
+ - "settings"
33
+ custom_contexts:
34
+ - "order"
35
+ action_scopes:
36
+ - "order/card"
37
+
38
+ use_when:
39
+ - "Place a widget exactly at order/card:common.before."
40
+ - "The widget belongs to the full order form and should appear at this location: Section start, right above the input fields."
41
+ - "The widget can work with the contexts listed in target_config.contexts."
42
+
43
+ avoid_when:
44
+ - "The widget belongs to a different page, section, or field-level insertion point."
45
+ - "The widget requires contexts, custom contexts, or action scopes that are not listed in target_config."
46
+
47
+ ai_notes:
48
+ - "Use the target id as the runner registration key."
49
+ - "Use targets[target].contexts as the source of truth for context availability."
50
+ - "Do not duplicate target context lists in generated widget code."
51
+ - "Order card and chat order form targets share the same order form data contract."
@@ -0,0 +1,51 @@
1
+ target: "order/card:customer.after"
2
+ summary: >
3
+ Widget for the section with customer data. It is placed in the full order form: Section end, right under the input fields.
4
+ language: en-GB
5
+ audience: ai
6
+
7
+ public_import:
8
+ from: "@retailcrm/embed-ui-v1-endpoint/common"
9
+ named:
10
+ - targets
11
+ - TargetName
12
+
13
+ runner_import:
14
+ from: "@retailcrm/embed-ui-v1-endpoint/remote/widgets"
15
+ named:
16
+ - defineWidgetRunner
17
+ - defineMultiRunner
18
+
19
+ page:
20
+ id: "order/card"
21
+ label: "full order form"
22
+ area: "customer.after"
23
+
24
+ description: "Widget for the section with customer data"
25
+ location: "Section end, right under the input fields"
26
+
27
+ target_config:
28
+ contexts:
29
+ - "order/card"
30
+ - "order/card:settings"
31
+ - "user/current"
32
+ - "settings"
33
+ custom_contexts:
34
+ - "order"
35
+ action_scopes:
36
+ - "order/card"
37
+
38
+ use_when:
39
+ - "Place a widget exactly at order/card:customer.after."
40
+ - "The widget belongs to the full order form and should appear at this location: Section end, right under the input fields."
41
+ - "The widget can work with the contexts listed in target_config.contexts."
42
+
43
+ avoid_when:
44
+ - "The widget belongs to a different page, section, or field-level insertion point."
45
+ - "The widget requires contexts, custom contexts, or action scopes that are not listed in target_config."
46
+
47
+ ai_notes:
48
+ - "Use the target id as the runner registration key."
49
+ - "Use targets[target].contexts as the source of truth for context availability."
50
+ - "Do not duplicate target context lists in generated widget code."
51
+ - "Order card and chat order form targets share the same order form data contract."
@@ -0,0 +1,51 @@
1
+ target: "order/card:customer.before"
2
+ summary: >
3
+ Widget for the section with customer data. It is placed in the full order form: Section start, right above the input fields.
4
+ language: en-GB
5
+ audience: ai
6
+
7
+ public_import:
8
+ from: "@retailcrm/embed-ui-v1-endpoint/common"
9
+ named:
10
+ - targets
11
+ - TargetName
12
+
13
+ runner_import:
14
+ from: "@retailcrm/embed-ui-v1-endpoint/remote/widgets"
15
+ named:
16
+ - defineWidgetRunner
17
+ - defineMultiRunner
18
+
19
+ page:
20
+ id: "order/card"
21
+ label: "full order form"
22
+ area: "customer.before"
23
+
24
+ description: "Widget for the section with customer data"
25
+ location: "Section start, right above the input fields"
26
+
27
+ target_config:
28
+ contexts:
29
+ - "order/card"
30
+ - "order/card:settings"
31
+ - "user/current"
32
+ - "settings"
33
+ custom_contexts:
34
+ - "order"
35
+ action_scopes:
36
+ - "order/card"
37
+
38
+ use_when:
39
+ - "Place a widget exactly at order/card:customer.before."
40
+ - "The widget belongs to the full order form and should appear at this location: Section start, right above the input fields."
41
+ - "The widget can work with the contexts listed in target_config.contexts."
42
+
43
+ avoid_when:
44
+ - "The widget belongs to a different page, section, or field-level insertion point."
45
+ - "The widget requires contexts, custom contexts, or action scopes that are not listed in target_config."
46
+
47
+ ai_notes:
48
+ - "Use the target id as the runner registration key."
49
+ - "Use targets[target].contexts as the source of truth for context availability."
50
+ - "Do not duplicate target context lists in generated widget code."
51
+ - "Order card and chat order form targets share the same order form data contract."
@@ -0,0 +1,51 @@
1
+ target: "order/card:customer.email"
2
+ summary: >
3
+ Widget for customer email input field. It is placed in the full order form: Right after the input field.
4
+ language: en-GB
5
+ audience: ai
6
+
7
+ public_import:
8
+ from: "@retailcrm/embed-ui-v1-endpoint/common"
9
+ named:
10
+ - targets
11
+ - TargetName
12
+
13
+ runner_import:
14
+ from: "@retailcrm/embed-ui-v1-endpoint/remote/widgets"
15
+ named:
16
+ - defineWidgetRunner
17
+ - defineMultiRunner
18
+
19
+ page:
20
+ id: "order/card"
21
+ label: "full order form"
22
+ area: "customer.email"
23
+
24
+ description: "Widget for customer email input field"
25
+ location: "Right after the input field"
26
+
27
+ target_config:
28
+ contexts:
29
+ - "order/card"
30
+ - "order/card:settings"
31
+ - "user/current"
32
+ - "settings"
33
+ custom_contexts:
34
+ - "order"
35
+ action_scopes:
36
+ - "order/card"
37
+
38
+ use_when:
39
+ - "Place a widget exactly at order/card:customer.email."
40
+ - "The widget belongs to the full order form and should appear at this location: Right after the input field."
41
+ - "The widget can work with the contexts listed in target_config.contexts."
42
+
43
+ avoid_when:
44
+ - "The widget belongs to a different page, section, or field-level insertion point."
45
+ - "The widget requires contexts, custom contexts, or action scopes that are not listed in target_config."
46
+
47
+ ai_notes:
48
+ - "Use the target id as the runner registration key."
49
+ - "Use targets[target].contexts as the source of truth for context availability."
50
+ - "Do not duplicate target context lists in generated widget code."
51
+ - "Order card and chat order form targets share the same order form data contract."
@@ -0,0 +1,51 @@
1
+ target: "order/card:customer.phone"
2
+ summary: >
3
+ Widget for customer phone input field. It is placed in the full order form: Right after the input field.
4
+ language: en-GB
5
+ audience: ai
6
+
7
+ public_import:
8
+ from: "@retailcrm/embed-ui-v1-endpoint/common"
9
+ named:
10
+ - targets
11
+ - TargetName
12
+
13
+ runner_import:
14
+ from: "@retailcrm/embed-ui-v1-endpoint/remote/widgets"
15
+ named:
16
+ - defineWidgetRunner
17
+ - defineMultiRunner
18
+
19
+ page:
20
+ id: "order/card"
21
+ label: "full order form"
22
+ area: "customer.phone"
23
+
24
+ description: "Widget for customer phone input field"
25
+ location: "Right after the input field"
26
+
27
+ target_config:
28
+ contexts:
29
+ - "order/card"
30
+ - "order/card:settings"
31
+ - "user/current"
32
+ - "settings"
33
+ custom_contexts:
34
+ - "order"
35
+ action_scopes:
36
+ - "order/card"
37
+
38
+ use_when:
39
+ - "Place a widget exactly at order/card:customer.phone."
40
+ - "The widget belongs to the full order form and should appear at this location: Right after the input field."
41
+ - "The widget can work with the contexts listed in target_config.contexts."
42
+
43
+ avoid_when:
44
+ - "The widget belongs to a different page, section, or field-level insertion point."
45
+ - "The widget requires contexts, custom contexts, or action scopes that are not listed in target_config."
46
+
47
+ ai_notes:
48
+ - "Use the target id as the runner registration key."
49
+ - "Use targets[target].contexts as the source of truth for context availability."
50
+ - "Do not duplicate target context lists in generated widget code."
51
+ - "Order card and chat order form targets share the same order form data contract."
@@ -0,0 +1,51 @@
1
+ target: "order/card:delivery.address"
2
+ summary: >
3
+ Widget for delivery address input field. It is placed in the full order form: Right under the input field.
4
+ language: en-GB
5
+ audience: ai
6
+
7
+ public_import:
8
+ from: "@retailcrm/embed-ui-v1-endpoint/common"
9
+ named:
10
+ - targets
11
+ - TargetName
12
+
13
+ runner_import:
14
+ from: "@retailcrm/embed-ui-v1-endpoint/remote/widgets"
15
+ named:
16
+ - defineWidgetRunner
17
+ - defineMultiRunner
18
+
19
+ page:
20
+ id: "order/card"
21
+ label: "full order form"
22
+ area: "delivery.address"
23
+
24
+ description: "Widget for delivery address input field"
25
+ location: "Right under the input field"
26
+
27
+ target_config:
28
+ contexts:
29
+ - "order/card"
30
+ - "order/card:settings"
31
+ - "user/current"
32
+ - "settings"
33
+ custom_contexts:
34
+ - "order"
35
+ action_scopes:
36
+ - "order/card"
37
+
38
+ use_when:
39
+ - "Place a widget exactly at order/card:delivery.address."
40
+ - "The widget belongs to the full order form and should appear at this location: Right under the input field."
41
+ - "The widget can work with the contexts listed in target_config.contexts."
42
+
43
+ avoid_when:
44
+ - "The widget belongs to a different page, section, or field-level insertion point."
45
+ - "The widget requires contexts, custom contexts, or action scopes that are not listed in target_config."
46
+
47
+ ai_notes:
48
+ - "Use the target id as the runner registration key."
49
+ - "Use targets[target].contexts as the source of truth for context availability."
50
+ - "Do not duplicate target context lists in generated widget code."
51
+ - "Order card and chat order form targets share the same order form data contract."
@@ -0,0 +1,51 @@
1
+ target: "order/card:delivery.after"
2
+ summary: >
3
+ Widget for the section with delivery data. It is placed in the full order form: Section end, right under the input fields.
4
+ language: en-GB
5
+ audience: ai
6
+
7
+ public_import:
8
+ from: "@retailcrm/embed-ui-v1-endpoint/common"
9
+ named:
10
+ - targets
11
+ - TargetName
12
+
13
+ runner_import:
14
+ from: "@retailcrm/embed-ui-v1-endpoint/remote/widgets"
15
+ named:
16
+ - defineWidgetRunner
17
+ - defineMultiRunner
18
+
19
+ page:
20
+ id: "order/card"
21
+ label: "full order form"
22
+ area: "delivery.after"
23
+
24
+ description: "Widget for the section with delivery data"
25
+ location: "Section end, right under the input fields"
26
+
27
+ target_config:
28
+ contexts:
29
+ - "order/card"
30
+ - "order/card:settings"
31
+ - "user/current"
32
+ - "settings"
33
+ custom_contexts:
34
+ - "order"
35
+ action_scopes:
36
+ - "order/card"
37
+
38
+ use_when:
39
+ - "Place a widget exactly at order/card:delivery.after."
40
+ - "The widget belongs to the full order form and should appear at this location: Section end, right under the input fields."
41
+ - "The widget can work with the contexts listed in target_config.contexts."
42
+
43
+ avoid_when:
44
+ - "The widget belongs to a different page, section, or field-level insertion point."
45
+ - "The widget requires contexts, custom contexts, or action scopes that are not listed in target_config."
46
+
47
+ ai_notes:
48
+ - "Use the target id as the runner registration key."
49
+ - "Use targets[target].contexts as the source of truth for context availability."
50
+ - "Do not duplicate target context lists in generated widget code."
51
+ - "Order card and chat order form targets share the same order form data contract."
@@ -0,0 +1,51 @@
1
+ target: "order/card:delivery.before"
2
+ summary: >
3
+ Widget for the section with delivery data. It is placed in the full order form: Section start, right above the input fields.
4
+ language: en-GB
5
+ audience: ai
6
+
7
+ public_import:
8
+ from: "@retailcrm/embed-ui-v1-endpoint/common"
9
+ named:
10
+ - targets
11
+ - TargetName
12
+
13
+ runner_import:
14
+ from: "@retailcrm/embed-ui-v1-endpoint/remote/widgets"
15
+ named:
16
+ - defineWidgetRunner
17
+ - defineMultiRunner
18
+
19
+ page:
20
+ id: "order/card"
21
+ label: "full order form"
22
+ area: "delivery.before"
23
+
24
+ description: "Widget for the section with delivery data"
25
+ location: "Section start, right above the input fields"
26
+
27
+ target_config:
28
+ contexts:
29
+ - "order/card"
30
+ - "order/card:settings"
31
+ - "user/current"
32
+ - "settings"
33
+ custom_contexts:
34
+ - "order"
35
+ action_scopes:
36
+ - "order/card"
37
+
38
+ use_when:
39
+ - "Place a widget exactly at order/card:delivery.before."
40
+ - "The widget belongs to the full order form and should appear at this location: Section start, right above the input fields."
41
+ - "The widget can work with the contexts listed in target_config.contexts."
42
+
43
+ avoid_when:
44
+ - "The widget belongs to a different page, section, or field-level insertion point."
45
+ - "The widget requires contexts, custom contexts, or action scopes that are not listed in target_config."
46
+
47
+ ai_notes:
48
+ - "Use the target id as the runner registration key."
49
+ - "Use targets[target].contexts as the source of truth for context availability."
50
+ - "Do not duplicate target context lists in generated widget code."
51
+ - "Order card and chat order form targets share the same order form data contract."
@@ -0,0 +1,51 @@
1
+ target: "order/card:dimensions.before"
2
+ summary: >
3
+ Widget for the section with dimensions and weight. It is placed in the full order form: Section start, right above the input fields.
4
+ language: en-GB
5
+ audience: ai
6
+
7
+ public_import:
8
+ from: "@retailcrm/embed-ui-v1-endpoint/common"
9
+ named:
10
+ - targets
11
+ - TargetName
12
+
13
+ runner_import:
14
+ from: "@retailcrm/embed-ui-v1-endpoint/remote/widgets"
15
+ named:
16
+ - defineWidgetRunner
17
+ - defineMultiRunner
18
+
19
+ page:
20
+ id: "order/card"
21
+ label: "full order form"
22
+ area: "dimensions.before"
23
+
24
+ description: "Widget for the section with dimensions and weight"
25
+ location: "Section start, right above the input fields"
26
+
27
+ target_config:
28
+ contexts:
29
+ - "order/card"
30
+ - "order/card:settings"
31
+ - "user/current"
32
+ - "settings"
33
+ custom_contexts:
34
+ - "order"
35
+ action_scopes:
36
+ - "order/card"
37
+
38
+ use_when:
39
+ - "Place a widget exactly at order/card:dimensions.before."
40
+ - "The widget belongs to the full order form and should appear at this location: Section start, right above the input fields."
41
+ - "The widget can work with the contexts listed in target_config.contexts."
42
+
43
+ avoid_when:
44
+ - "The widget belongs to a different page, section, or field-level insertion point."
45
+ - "The widget requires contexts, custom contexts, or action scopes that are not listed in target_config."
46
+
47
+ ai_notes:
48
+ - "Use the target id as the runner registration key."
49
+ - "Use targets[target].contexts as the source of truth for context availability."
50
+ - "Do not duplicate target context lists in generated widget code."
51
+ - "Order card and chat order form targets share the same order form data contract."
@@ -0,0 +1,51 @@
1
+ target: "order/card:list.after"
2
+ summary: >
3
+ Widget for the list of ordered items. It is placed in the full order form: Section start, right under the list.
4
+ language: en-GB
5
+ audience: ai
6
+
7
+ public_import:
8
+ from: "@retailcrm/embed-ui-v1-endpoint/common"
9
+ named:
10
+ - targets
11
+ - TargetName
12
+
13
+ runner_import:
14
+ from: "@retailcrm/embed-ui-v1-endpoint/remote/widgets"
15
+ named:
16
+ - defineWidgetRunner
17
+ - defineMultiRunner
18
+
19
+ page:
20
+ id: "order/card"
21
+ label: "full order form"
22
+ area: "list.after"
23
+
24
+ description: "Widget for the list of ordered items"
25
+ location: "Section start, right under the list"
26
+
27
+ target_config:
28
+ contexts:
29
+ - "order/card"
30
+ - "order/card:settings"
31
+ - "user/current"
32
+ - "settings"
33
+ custom_contexts:
34
+ - "order"
35
+ action_scopes:
36
+ - "order/card"
37
+
38
+ use_when:
39
+ - "Place a widget exactly at order/card:list.after."
40
+ - "The widget belongs to the full order form and should appear at this location: Section start, right under the list."
41
+ - "The widget can work with the contexts listed in target_config.contexts."
42
+
43
+ avoid_when:
44
+ - "The widget belongs to a different page, section, or field-level insertion point."
45
+ - "The widget requires contexts, custom contexts, or action scopes that are not listed in target_config."
46
+
47
+ ai_notes:
48
+ - "Use the target id as the runner registration key."
49
+ - "Use targets[target].contexts as the source of truth for context availability."
50
+ - "Do not duplicate target context lists in generated widget code."
51
+ - "Order card and chat order form targets share the same order form data contract."
@@ -0,0 +1,51 @@
1
+ target: "order/card:list.before"
2
+ summary: >
3
+ Widget for the list of ordered items. It is placed in the full order form: Section start, right above the input fields.
4
+ language: en-GB
5
+ audience: ai
6
+
7
+ public_import:
8
+ from: "@retailcrm/embed-ui-v1-endpoint/common"
9
+ named:
10
+ - targets
11
+ - TargetName
12
+
13
+ runner_import:
14
+ from: "@retailcrm/embed-ui-v1-endpoint/remote/widgets"
15
+ named:
16
+ - defineWidgetRunner
17
+ - defineMultiRunner
18
+
19
+ page:
20
+ id: "order/card"
21
+ label: "full order form"
22
+ area: "list.before"
23
+
24
+ description: "Widget for the list of ordered items"
25
+ location: "Section start, right above the input fields"
26
+
27
+ target_config:
28
+ contexts:
29
+ - "order/card"
30
+ - "order/card:settings"
31
+ - "user/current"
32
+ - "settings"
33
+ custom_contexts:
34
+ - "order"
35
+ action_scopes:
36
+ - "order/card"
37
+
38
+ use_when:
39
+ - "Place a widget exactly at order/card:list.before."
40
+ - "The widget belongs to the full order form and should appear at this location: Section start, right above the input fields."
41
+ - "The widget can work with the contexts listed in target_config.contexts."
42
+
43
+ avoid_when:
44
+ - "The widget belongs to a different page, section, or field-level insertion point."
45
+ - "The widget requires contexts, custom contexts, or action scopes that are not listed in target_config."
46
+
47
+ ai_notes:
48
+ - "Use the target id as the runner registration key."
49
+ - "Use targets[target].contexts as the source of truth for context availability."
50
+ - "Do not duplicate target context lists in generated widget code."
51
+ - "Order card and chat order form targets share the same order form data contract."
@@ -0,0 +1,51 @@
1
+ target: "order/card:payment.before"
2
+ summary: >
3
+ Widget for the section with payment data. It is placed in the full order form: Section start, right above the input fields.
4
+ language: en-GB
5
+ audience: ai
6
+
7
+ public_import:
8
+ from: "@retailcrm/embed-ui-v1-endpoint/common"
9
+ named:
10
+ - targets
11
+ - TargetName
12
+
13
+ runner_import:
14
+ from: "@retailcrm/embed-ui-v1-endpoint/remote/widgets"
15
+ named:
16
+ - defineWidgetRunner
17
+ - defineMultiRunner
18
+
19
+ page:
20
+ id: "order/card"
21
+ label: "full order form"
22
+ area: "payment.before"
23
+
24
+ description: "Widget for the section with payment data"
25
+ location: "Section start, right above the input fields"
26
+
27
+ target_config:
28
+ contexts:
29
+ - "order/card"
30
+ - "order/card:settings"
31
+ - "user/current"
32
+ - "settings"
33
+ custom_contexts:
34
+ - "order"
35
+ action_scopes:
36
+ - "order/card"
37
+
38
+ use_when:
39
+ - "Place a widget exactly at order/card:payment.before."
40
+ - "The widget belongs to the full order form and should appear at this location: Section start, right above the input fields."
41
+ - "The widget can work with the contexts listed in target_config.contexts."
42
+
43
+ avoid_when:
44
+ - "The widget belongs to a different page, section, or field-level insertion point."
45
+ - "The widget requires contexts, custom contexts, or action scopes that are not listed in target_config."
46
+
47
+ ai_notes:
48
+ - "Use the target id as the runner registration key."
49
+ - "Use targets[target].contexts as the source of truth for context availability."
50
+ - "Do not duplicate target context lists in generated widget code."
51
+ - "Order card and chat order form targets share the same order form data contract."
@@ -0,0 +1,51 @@
1
+ target: "order/card:store.before"
2
+ summary: >
3
+ Widget for the section with warehouse data. It is placed in the full order form: Section start, right above the input fields.
4
+ language: en-GB
5
+ audience: ai
6
+
7
+ public_import:
8
+ from: "@retailcrm/embed-ui-v1-endpoint/common"
9
+ named:
10
+ - targets
11
+ - TargetName
12
+
13
+ runner_import:
14
+ from: "@retailcrm/embed-ui-v1-endpoint/remote/widgets"
15
+ named:
16
+ - defineWidgetRunner
17
+ - defineMultiRunner
18
+
19
+ page:
20
+ id: "order/card"
21
+ label: "full order form"
22
+ area: "store.before"
23
+
24
+ description: "Widget for the section with warehouse data"
25
+ location: "Section start, right above the input fields"
26
+
27
+ target_config:
28
+ contexts:
29
+ - "order/card"
30
+ - "order/card:settings"
31
+ - "user/current"
32
+ - "settings"
33
+ custom_contexts:
34
+ - "order"
35
+ action_scopes:
36
+ - "order/card"
37
+
38
+ use_when:
39
+ - "Place a widget exactly at order/card:store.before."
40
+ - "The widget belongs to the full order form and should appear at this location: Section start, right above the input fields."
41
+ - "The widget can work with the contexts listed in target_config.contexts."
42
+
43
+ avoid_when:
44
+ - "The widget belongs to a different page, section, or field-level insertion point."
45
+ - "The widget requires contexts, custom contexts, or action scopes that are not listed in target_config."
46
+
47
+ ai_notes:
48
+ - "Use the target id as the runner registration key."
49
+ - "Use targets[target].contexts as the source of truth for context availability."
50
+ - "Do not duplicate target context lists in generated widget code."
51
+ - "Order card and chat order form targets share the same order form data contract."