@raytio/mcp-server 10.1.0 → 10.3.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.
Files changed (127) hide show
  1. package/contracts/persist/mcp_resource_contract.json +4 -4
  2. package/dist/authorization.d.ts.map +1 -1
  3. package/dist/authorization.js +4 -0
  4. package/dist/authorization.js.map +1 -1
  5. package/dist/generated-reads/guardrails.js +1 -1
  6. package/dist/generated-reads/guardrails.js.map +1 -1
  7. package/dist/generated-reads/resource-tools.d.ts.map +1 -1
  8. package/dist/generated-reads/resource-tools.js +8 -5
  9. package/dist/generated-reads/resource-tools.js.map +1 -1
  10. package/dist/tools/_shared/side-effect.js +2 -2
  11. package/dist/tools/_shared/side-effect.js.map +1 -1
  12. package/dist/tools/_shared/soft-deactivate.d.ts +2 -0
  13. package/dist/tools/_shared/soft-deactivate.d.ts.map +1 -1
  14. package/dist/tools/_shared/soft-deactivate.js +3 -0
  15. package/dist/tools/_shared/soft-deactivate.js.map +1 -1
  16. package/dist/tools/domains.d.ts.map +1 -1
  17. package/dist/tools/domains.js +36 -0
  18. package/dist/tools/domains.js.map +1 -1
  19. package/dist/tools/imports/index.d.ts +6 -6
  20. package/dist/tools/ixn/generated-reads.d.ts +5 -0
  21. package/dist/tools/ixn/generated-reads.d.ts.map +1 -0
  22. package/dist/tools/ixn/generated-reads.js +29 -0
  23. package/dist/tools/ixn/generated-reads.js.map +1 -0
  24. package/dist/tools/ixn/index.d.ts +5 -0
  25. package/dist/tools/ixn/index.d.ts.map +1 -0
  26. package/dist/tools/ixn/index.js +8 -0
  27. package/dist/tools/ixn/index.js.map +1 -0
  28. package/dist/tools/ixn/ixn-conversation-start.d.ts +22 -0
  29. package/dist/tools/ixn/ixn-conversation-start.d.ts.map +1 -0
  30. package/dist/tools/ixn/ixn-conversation-start.js +98 -0
  31. package/dist/tools/ixn/ixn-conversation-start.js.map +1 -0
  32. package/dist/tools/ixn/ixn-message-send.d.ts +28 -0
  33. package/dist/tools/ixn/ixn-message-send.d.ts.map +1 -0
  34. package/dist/tools/ixn/ixn-message-send.js +92 -0
  35. package/dist/tools/ixn/ixn-message-send.js.map +1 -0
  36. package/dist/tools/pbm/generated-reads.d.ts +5 -0
  37. package/dist/tools/pbm/generated-reads.d.ts.map +1 -0
  38. package/dist/tools/pbm/generated-reads.js +32 -0
  39. package/dist/tools/pbm/generated-reads.js.map +1 -0
  40. package/dist/tools/pbm/index.d.ts +5 -0
  41. package/dist/tools/pbm/index.d.ts.map +1 -0
  42. package/dist/tools/pbm/index.js +17 -0
  43. package/dist/tools/pbm/index.js.map +1 -0
  44. package/dist/tools/pbm/pbm-customer-entitlement-override-set.d.ts +26 -0
  45. package/dist/tools/pbm/pbm-customer-entitlement-override-set.d.ts.map +1 -0
  46. package/dist/tools/pbm/pbm-customer-entitlement-override-set.js +78 -0
  47. package/dist/tools/pbm/pbm-customer-entitlement-override-set.js.map +1 -0
  48. package/dist/tools/pbm/pbm-subscription-cancel.d.ts +21 -0
  49. package/dist/tools/pbm/pbm-subscription-cancel.d.ts.map +1 -0
  50. package/dist/tools/pbm/pbm-subscription-cancel.js +86 -0
  51. package/dist/tools/pbm/pbm-subscription-cancel.js.map +1 -0
  52. package/dist/tools/pbm/pbm-subscription-create.d.ts +20 -0
  53. package/dist/tools/pbm/pbm-subscription-create.d.ts.map +1 -0
  54. package/dist/tools/pbm/pbm-subscription-create.js +90 -0
  55. package/dist/tools/pbm/pbm-subscription-create.js.map +1 -0
  56. package/dist/tools/pbm/pbm-subscription-line-add.d.ts +13 -0
  57. package/dist/tools/pbm/pbm-subscription-line-add.d.ts.map +1 -0
  58. package/dist/tools/pbm/pbm-subscription-line-add.js +65 -0
  59. package/dist/tools/pbm/pbm-subscription-line-add.js.map +1 -0
  60. package/dist/tools/pbm/pbm-subscription-line-end.d.ts +12 -0
  61. package/dist/tools/pbm/pbm-subscription-line-end.d.ts.map +1 -0
  62. package/dist/tools/pbm/pbm-subscription-line-end.js +49 -0
  63. package/dist/tools/pbm/pbm-subscription-line-end.js.map +1 -0
  64. package/dist/tools/qom/generated-reads.d.ts +5 -0
  65. package/dist/tools/qom/generated-reads.d.ts.map +1 -0
  66. package/dist/tools/qom/generated-reads.js +22 -0
  67. package/dist/tools/qom/generated-reads.js.map +1 -0
  68. package/dist/tools/qom/index.d.ts +5 -0
  69. package/dist/tools/qom/index.d.ts.map +1 -0
  70. package/dist/tools/qom/index.js +23 -0
  71. package/dist/tools/qom/index.js.map +1 -0
  72. package/dist/tools/qom/qom-order-cancel.d.ts +16 -0
  73. package/dist/tools/qom/qom-order-cancel.d.ts.map +1 -0
  74. package/dist/tools/qom/qom-order-cancel.js +56 -0
  75. package/dist/tools/qom/qom-order-cancel.js.map +1 -0
  76. package/dist/tools/qom/qom-order-create.d.ts +24 -0
  77. package/dist/tools/qom/qom-order-create.d.ts.map +1 -0
  78. package/dist/tools/qom/qom-order-create.js +133 -0
  79. package/dist/tools/qom/qom-order-create.js.map +1 -0
  80. package/dist/tools/qom/qom-order-hold-place.d.ts +11 -0
  81. package/dist/tools/qom/qom-order-hold-place.d.ts.map +1 -0
  82. package/dist/tools/qom/qom-order-hold-place.js +50 -0
  83. package/dist/tools/qom/qom-order-hold-place.js.map +1 -0
  84. package/dist/tools/qom/qom-order-hold-release.d.ts +8 -0
  85. package/dist/tools/qom/qom-order-hold-release.d.ts.map +1 -0
  86. package/dist/tools/qom/qom-order-hold-release.js +42 -0
  87. package/dist/tools/qom/qom-order-hold-release.js.map +1 -0
  88. package/dist/tools/qom/qom-order-line-add.d.ts +18 -0
  89. package/dist/tools/qom/qom-order-line-add.d.ts.map +1 -0
  90. package/dist/tools/qom/qom-order-line-add.js +101 -0
  91. package/dist/tools/qom/qom-order-line-add.js.map +1 -0
  92. package/dist/tools/qom/qom-quote-create.d.ts +20 -0
  93. package/dist/tools/qom/qom-quote-create.d.ts.map +1 -0
  94. package/dist/tools/qom/qom-quote-create.js +142 -0
  95. package/dist/tools/qom/qom-quote-create.js.map +1 -0
  96. package/dist/tools/qom/qom-quote-line-add.d.ts +13 -0
  97. package/dist/tools/qom/qom-quote-line-add.d.ts.map +1 -0
  98. package/dist/tools/qom/qom-quote-line-add.js +92 -0
  99. package/dist/tools/qom/qom-quote-line-add.js.map +1 -0
  100. package/dist/tools/qom/qom-quote-version-create.d.ts +10 -0
  101. package/dist/tools/qom/qom-quote-version-create.d.ts.map +1 -0
  102. package/dist/tools/qom/qom-quote-version-create.js +69 -0
  103. package/dist/tools/qom/qom-quote-version-create.js.map +1 -0
  104. package/dist/tools/role-mapping.d.ts.map +1 -1
  105. package/dist/tools/role-mapping.js +21 -8
  106. package/dist/tools/role-mapping.js.map +1 -1
  107. package/dist/tools/xrm/generated-reads.d.ts +5 -0
  108. package/dist/tools/xrm/generated-reads.d.ts.map +1 -0
  109. package/dist/tools/xrm/generated-reads.js +37 -0
  110. package/dist/tools/xrm/generated-reads.js.map +1 -0
  111. package/dist/tools/xrm/index.d.ts +5 -0
  112. package/dist/tools/xrm/index.d.ts.map +1 -0
  113. package/dist/tools/xrm/index.js +13 -0
  114. package/dist/tools/xrm/index.js.map +1 -0
  115. package/dist/tools/xrm/xrm-inbound-email-rule-create.d.ts +21 -0
  116. package/dist/tools/xrm/xrm-inbound-email-rule-create.d.ts.map +1 -0
  117. package/dist/tools/xrm/xrm-inbound-email-rule-create.js +85 -0
  118. package/dist/tools/xrm/xrm-inbound-email-rule-create.js.map +1 -0
  119. package/dist/tools/xrm/xrm-merchant-create.d.ts +22 -0
  120. package/dist/tools/xrm/xrm-merchant-create.d.ts.map +1 -0
  121. package/dist/tools/xrm/xrm-merchant-create.js +85 -0
  122. package/dist/tools/xrm/xrm-merchant-create.js.map +1 -0
  123. package/dist/tools/xrm/xrm-merchant-update.d.ts +14 -0
  124. package/dist/tools/xrm/xrm-merchant-update.d.ts.map +1 -0
  125. package/dist/tools/xrm/xrm-merchant-update.js +61 -0
  126. package/dist/tools/xrm/xrm-merchant-update.js.map +1 -0
  127. package/package.json +1 -1
@@ -0,0 +1,90 @@
1
+ import { z } from 'zod';
2
+ import { API_ERROR, errorResponse, successResponse } from '../types.js';
3
+ import { cap } from '../../capabilities/tool-capability.js';
4
+ import { confirmFlagSchema, unenforcedIdempotencyKeySchema, writeHeadersWithIdempotency, } from '../_shared/side-effect.js';
5
+ /**
6
+ * Provisioning semantic tool: create a PBM billing subscription
7
+ * (`pbm_billing_subscriptions`). Requires `confirm: true`.
8
+ *
9
+ * The subscription starts PENDING, and billing starts when it becomes
10
+ * BILLABLE. MCP has no tool for that step. Persist has no unique key
11
+ * here, so a retry creates a second subscription.
12
+ *
13
+ * Cancellation columns (`cancellation_effective_date`,
14
+ * `cancellation_request_date`, `cancellation_request_reason`,
15
+ * `cancellation_final_invoice_action`) are intentionally NOT writable
16
+ * through this tool — cancellation is a lifecycle event handled by
17
+ * `pbm_subscription_cancel`. `subscription_status` is not an input.
18
+ *
19
+ * Payment method / gateway credentials live in an excluded FXM table
20
+ * (fxm_payment_processor_credentials) and cannot be set through MCP.
21
+ */
22
+ export const pbmSubscriptionCreateTool = {
23
+ name: 'pbm_subscription_create',
24
+ description: 'Create a PBM billing subscription (pbm_billing_subscriptions). It starts PENDING and is ' +
25
+ 'not billed until it becomes BILLABLE, which MCP cannot do. Requires confirm=true. ' +
26
+ 'Not deduplicated: calling it again creates another subscription, so check ' +
27
+ 'pbm_billing_subscriptions_list filtered on subscribed_to_customer_id before retrying.',
28
+ inputSchema: z.object({
29
+ subscribed_to_customer_id: z
30
+ .string()
31
+ .min(1)
32
+ .describe('UUID of the far_customers row this subscription bills'),
33
+ subscribed_to_party_contact_point_id: z
34
+ .string()
35
+ .min(1)
36
+ .describe('UUID of the party contact point (billing contact) — required'),
37
+ subscribed_to_customer_site_id: z.string().min(1).optional(),
38
+ subscription_name: z.string().max(256).optional(),
39
+ subscription_name_i18n: z.record(z.string()).optional(),
40
+ billing_cycle_month: z.number().int().min(1).max(12).optional(),
41
+ billing_cycle_day_of_month: z.number().int().min(1).max(31).optional(),
42
+ billing_cycle_day_of_week: z.number().int().min(0).max(6).optional(),
43
+ billing_cycle_hour: z.number().int().min(0).max(23).optional(),
44
+ billing_cycle_minute: z.number().int().min(0).max(59).optional(),
45
+ billing_cycle_second: z.number().int().min(0).max(59).optional(),
46
+ subscription_timezone_offset_minutes: z.number().int().optional(),
47
+ start_date: z.string().min(1).optional().describe('ISO 8601 subscription start'),
48
+ end_date: z.string().min(1).optional().describe('ISO 8601 subscription end (rare on create)'),
49
+ metadata: z.record(z.unknown()).optional(),
50
+ confirm: confirmFlagSchema,
51
+ idempotency_key: unenforcedIdempotencyKeySchema,
52
+ }),
53
+ capabilities: [cap('pbm_billing_subscriptions', 'INSERT')],
54
+ sideEffect: 'provisioning',
55
+ confirmation: 'caller_confirms',
56
+ idempotency: 'not_idempotent',
57
+ handler: async (args, ctx) => {
58
+ const input = args;
59
+ const body = {
60
+ subscribed_to_customer_id: input.subscribed_to_customer_id,
61
+ subscribed_to_party_contact_point_id: input.subscribed_to_party_contact_point_id,
62
+ };
63
+ for (const field of [
64
+ 'subscribed_to_customer_site_id',
65
+ 'subscription_name',
66
+ 'subscription_name_i18n',
67
+ 'billing_cycle_month',
68
+ 'billing_cycle_day_of_month',
69
+ 'billing_cycle_day_of_week',
70
+ 'billing_cycle_hour',
71
+ 'billing_cycle_minute',
72
+ 'billing_cycle_second',
73
+ 'subscription_timezone_offset_minutes',
74
+ 'start_date',
75
+ 'end_date',
76
+ 'metadata',
77
+ ]) {
78
+ if (input[field] !== undefined)
79
+ body[field] = input[field];
80
+ }
81
+ try {
82
+ const rows = await ctx.apiClient.post(`${ctx.apiClient.dbBasePath}/pbm_billing_subscriptions?select=*`, body, { headers: writeHeadersWithIdempotency(input.idempotency_key) });
83
+ return successResponse(rows[0]);
84
+ }
85
+ catch (error) {
86
+ return errorResponse(API_ERROR, `Failed to create PBM billing subscription: ${error.message}`);
87
+ }
88
+ },
89
+ };
90
+ //# sourceMappingURL=pbm-subscription-create.js.map
@@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,QAAQ,CAAC,CAAC;IAC1D,UAAU,EAAE,cAAc;IAC1B,YAAY,EAAE,iBAAiB;IAC/B,WAAW,EAAE,gBAAgB;IAC7B,OAAO,EAAE,KAAK,EAAE,IAAI,EAAE,GAAG,EAAE,EAAE;QAC3B,MAAM,KAAK,GAAG,IAA2B,CAAC;QAC1C,MAAM,IAAI,GAAwB;YAChC,yBAAyB,EAAE,KAAK,CAAC,yBAAyB;YAC1D,oCAAoC,EAClC,KAAK,CAAC,oCAAoC;SAC7C,CAAC;QACF,KAAK,MAAM,KAAK,IAAI;YAClB,gCAAgC;YAChC,mBAAmB;YACnB,wBAAwB;YACxB,qBAAqB;YACrB,4BAA4B;YAC5B,2BAA2B;YAC3B,oBAAoB;YACpB,sBAAsB;YACtB,sBAAsB;YACtB,sCAAsC;YACtC,YAAY;YACZ,UAAU;YACV,UAAU;SACX,EAAE,CAAC;YACF,IAAI,KAAK,CAAC,KAAK,CAAC,KAAK,SAAS;gBAAE,IAAI,CAAC,KAAK,CAAC,GAAG,KAAK,CAAC,KAAK,CAAC,CAAC;QAC7D,CAAC;QACD,IAAI,CAAC;YACH,MAAM,IAAI,GAAG,MAAM,GAAG,CAAC,SAAS,CAAC,IAAI,CACnC,GAAG,GAAG,CAAC,SAAS,CAAC,UAAU,qCAAqC,EAChE,IAAI,EACJ,EAAE,OAAO,EAAE,2BAA2B,CAAC,KAAK,CAAC,eAAe,CAAC,EAAE,CAChE,CAAC;YACF,OAAO,eAAe,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,CAAC;QAClC,CAAC;QAAC,OAAO,KAAU,EAAE,CAAC;YACpB,OAAO,aAAa,CAClB,SAAS,EACT,8CAA8C,KAAK,CAAC,OAAO,EAAE,CAC9D,CAAC;QACJ,CAAC;IACH,CAAC;CACF,CAAC"}
@@ -0,0 +1,13 @@
1
+ import { Tool } from '../registry.js';
2
+ /**
3
+ * Provisioning semantic tool: add a line (priced item) to a PBM billing
4
+ * subscription (`pbm_billing_subscription_lines`).
5
+ *
6
+ * Persist refuses the insert unless the parent is PENDING, and requires
7
+ * every line on a subscription to share a currency and billing interval.
8
+ * `subscribed_to_customer_id` is set from the parent by a trigger, so it
9
+ * is not an input. There is no unique key on these lines, so a retry
10
+ * adds a second line and the customer would be billed for both.
11
+ */
12
+ export declare const pbmSubscriptionLineAddTool: Tool;
13
+ //# sourceMappingURL=pbm-subscription-line-add.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"pbm-subscription-line-add.d.ts","sourceRoot":"","sources":["../../../src/tools/pbm/pbm-subscription-line-add.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,IAAI,EAAE,MAAM,gBAAgB,CAAC;AAStC;;;;;;;;;GASG;AACH,eAAO,MAAM,0BAA0B,EAAE,IAuDxC,CAAC"}
@@ -0,0 +1,65 @@
1
+ import { z } from 'zod';
2
+ import { API_ERROR, errorResponse, successResponse } from '../types.js';
3
+ import { cap } from '../../capabilities/tool-capability.js';
4
+ import { confirmFlagSchema, unenforcedIdempotencyKeySchema, writeHeadersWithIdempotency, } from '../_shared/side-effect.js';
5
+ /**
6
+ * Provisioning semantic tool: add a line (priced item) to a PBM billing
7
+ * subscription (`pbm_billing_subscription_lines`).
8
+ *
9
+ * Persist refuses the insert unless the parent is PENDING, and requires
10
+ * every line on a subscription to share a currency and billing interval.
11
+ * `subscribed_to_customer_id` is set from the parent by a trigger, so it
12
+ * is not an input. There is no unique key on these lines, so a retry
13
+ * adds a second line and the customer would be billed for both.
14
+ */
15
+ export const pbmSubscriptionLineAddTool = {
16
+ name: 'pbm_subscription_line_add',
17
+ description: 'Add a priced line to a PENDING PBM billing subscription (pbm_billing_subscription_lines). ' +
18
+ 'Persist refuses any other status, and every line must share a currency and billing ' +
19
+ 'interval. Requires confirm=true. Not deduplicated: calling it again adds another line that ' +
20
+ 'would also be billed, so check pbm_billing_subscription_lines_list before retrying.',
21
+ inputSchema: z.object({
22
+ billing_subscription_id: z
23
+ .string()
24
+ .min(1)
25
+ .describe('UUID of the parent pbm_billing_subscriptions row (required)'),
26
+ price_id: z
27
+ .string()
28
+ .min(1)
29
+ .describe('UUID of the pcm_prices row this line bills against (required)'),
30
+ subscribed_qty: z.number().optional().describe('Quantity of the priced item'),
31
+ start_date: z.string().min(1).optional().describe('ISO 8601 line start (defaults to today)'),
32
+ end_date: z.string().min(1).optional().describe('ISO 8601 line end (rarely on create)'),
33
+ metadata: z.record(z.unknown()).optional(),
34
+ confirm: confirmFlagSchema,
35
+ idempotency_key: unenforcedIdempotencyKeySchema,
36
+ }),
37
+ capabilities: [cap('pbm_billing_subscription_lines', 'INSERT')],
38
+ sideEffect: 'provisioning',
39
+ confirmation: 'caller_confirms',
40
+ idempotency: 'not_idempotent',
41
+ handler: async (args, ctx) => {
42
+ const input = args;
43
+ const body = {
44
+ billing_subscription_id: input.billing_subscription_id,
45
+ price_id: input.price_id,
46
+ };
47
+ for (const field of [
48
+ 'subscribed_qty',
49
+ 'start_date',
50
+ 'end_date',
51
+ 'metadata',
52
+ ]) {
53
+ if (input[field] !== undefined)
54
+ body[field] = input[field];
55
+ }
56
+ try {
57
+ const rows = await ctx.apiClient.post(`${ctx.apiClient.dbBasePath}/pbm_billing_subscription_lines?select=*`, body, { headers: writeHeadersWithIdempotency(input.idempotency_key) });
58
+ return successResponse(rows[0]);
59
+ }
60
+ catch (error) {
61
+ return errorResponse(API_ERROR, `Failed to add PBM subscription line: ${error.message}`);
62
+ }
63
+ },
64
+ };
65
+ //# sourceMappingURL=pbm-subscription-line-add.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"pbm-subscription-line-add.js","sourceRoot":"","sources":["../../../src/tools/pbm/pbm-subscription-line-add.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,OAAO,EAAE,SAAS,EAAE,aAAa,EAAE,eAAe,EAAE,MAAM,aAAa,CAAC;AACxE,OAAO,EAAE,GAAG,EAAE,MAAM,uCAAuC,CAAC;AAC5D,O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IAA2B,CAAC;QAC1C,MAAM,IAAI,GAAwB;YAChC,uBAAuB,EAAE,KAAK,CAAC,uBAAuB;YACtD,QAAQ,EAAE,KAAK,CAAC,QAAQ;SACzB,CAAC;QACF,KAAK,MAAM,KAAK,IAAI;YAClB,gBAAgB;YAChB,YAAY;YACZ,UAAU;YACV,UAAU;SACX,EAAE,CAAC;YACF,IAAI,KAAK,CAAC,KAAK,CAAC,KAAK,SAAS;gBAAE,IAAI,CAAC,KAAK,CAAC,GAAG,KAAK,CAAC,KAAK,CAAC,CAAC;QAC7D,CAAC;QACD,IAAI,CAAC;YACH,MAAM,IAAI,GAAG,MAAM,GAAG,CAAC,SAAS,CAAC,IAAI,CACnC,GAAG,GAAG,CAAC,SAAS,CAAC,UAAU,0CAA0C,EACrE,IAAI,EACJ,EAAE,OAAO,EAAE,2BAA2B,CAAC,KAAK,CAAC,eAAe,CAAC,EAAE,CAChE,CAAC;YACF,OAAO,eAAe,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,CAAC;QAClC,CAAC;QAAC,OAAO,KAAU,EAAE,CAAC;YACpB,OAAO,aAAa,CAClB,SAAS,EACT,wCAAwC,KAAK,CAAC,OAAO,EAAE,CACxD,CAAC;QACJ,CAAC;IACH,CAAC;CACF,CAAC"}
@@ -0,0 +1,12 @@
1
+ import { Tool } from '../registry.js';
2
+ /**
3
+ * State-change semantic tool: close a subscription line by setting its
4
+ * `end_date` (`pbm_billing_subscription_lines`). The reason is merged
5
+ * into `metadata.line_end_reason`.
6
+ *
7
+ * Persist's `prevent_subscription_line_for_parent_status` trigger
8
+ * refuses every insert and update unless the parent subscription is
9
+ * PENDING, so this cannot change a subscription that is already billing.
10
+ */
11
+ export declare const pbmSubscriptionLineEndTool: Tool;
12
+ //# sourceMappingURL=pbm-subscription-line-end.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"pbm-subscription-line-end.d.ts","sourceRoot":"","sources":["../../../src/tools/pbm/pbm-subscription-line-end.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,IAAI,EAAE,MAAM,gBAAgB,CAAC;AAStC;;;;;;;;GAQG;AACH,eAAO,MAAM,0BAA0B,EAAE,IAwCxC,CAAC"}
@@ -0,0 +1,49 @@
1
+ import { z } from 'zod';
2
+ import { cap } from '../../capabilities/tool-capability.js';
3
+ import { confirmFlagSchema, reasonSchema, unenforcedIdempotencyKeySchema, } from '../_shared/side-effect.js';
4
+ import { softDeactivate } from '../_shared/soft-deactivate.js';
5
+ /**
6
+ * State-change semantic tool: close a subscription line by setting its
7
+ * `end_date` (`pbm_billing_subscription_lines`). The reason is merged
8
+ * into `metadata.line_end_reason`.
9
+ *
10
+ * Persist's `prevent_subscription_line_for_parent_status` trigger
11
+ * refuses every insert and update unless the parent subscription is
12
+ * PENDING, so this cannot change a subscription that is already billing.
13
+ */
14
+ export const pbmSubscriptionLineEndTool = {
15
+ name: 'pbm_subscription_line_end',
16
+ description: 'Close a PBM subscription line by setting end_date and merge the reason into metadata. ' +
17
+ 'Persist only allows this while the parent subscription is PENDING, so it cannot change what ' +
18
+ 'a billing subscription charges. Requires confirm=true and a reason. A line already ending ' +
19
+ 'on that date is returned unchanged, so retries are safe.',
20
+ inputSchema: z.object({
21
+ id: z.string().min(1).describe('UUID of the pbm_billing_subscription_lines row to close'),
22
+ end_date: z
23
+ .string()
24
+ .min(1)
25
+ .describe('ISO 8601 date the line ends (required)'),
26
+ reason: reasonSchema.describe('Human-readable reason, merged into metadata'),
27
+ confirm: confirmFlagSchema,
28
+ idempotency_key: unenforcedIdempotencyKeySchema,
29
+ }),
30
+ capabilities: [cap('pbm_billing_subscription_lines', 'UPDATE')],
31
+ sideEffect: 'state_change',
32
+ confirmation: 'caller_confirms',
33
+ idempotency: 'natural_key',
34
+ handler: async (args, ctx) => {
35
+ const input = args;
36
+ return softDeactivate(ctx, {
37
+ table: 'pbm_billing_subscription_lines',
38
+ id: input.id,
39
+ label: 'PBM subscription line',
40
+ verb: 'end',
41
+ isDone: (row) => new Date(row.end_date).getTime() === new Date(input.end_date).getTime(),
42
+ changes: () => ({ end_date: input.end_date }),
43
+ reasonKey: 'line_end_reason',
44
+ reason: input.reason,
45
+ idempotencyKey: input.idempotency_key,
46
+ });
47
+ },
48
+ };
49
+ //# sourceMappingURL=pbm-subscription-line-end.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"pbm-subscription-line-end.js","sourceRoot":"","sources":["../../../src/tools/pbm/pbm-subscription-line-end.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,OAAO,EAAE,GAAG,EAAE,MAAM,uCAAuC,CAAC;AAC5D,OAAO,EACL,iBAAiB,EACjB,YAAY,EACZ,8BAA8B,GAC/B,MAAM,2BAA2B,CAAC;AACnC,OAAO,EAAE,cAAc,EAAE,MAAM,+BAA+B,CAAC;AAE/D;;;;;;;;GAQG;AACH,MAAM,CAAC,MAAM,0BAA0B,GAAS;IAC9C,IAAI,EAAE,2BAA2B;IACjC,WAAW,EACT,wFAAwF;QACxF,8FAA8F;QAC9F,4FAA4F;QAC5F,0DAA0D;IAC5D,WAAW,EAAE,CAAC,CAAC,MAAM,CAAC;QACpB,EAAE,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,QAAQ,CAAC,yDAAyD,CAAC;QACzF,QAAQ,EAAE,CAAC;aACR,MAAM,EAAE;aACR,GAAG,CAAC,CAAC,CAAC;aACN,QAAQ,CAAC,wCAAwC,CAAC;QACrD,MAAM,EAAE,YAAY,CAAC,QAAQ,CAAC,6CAA6C,CAAC;QAC5E,OAAO,EAAE,iBAAiB;QAC1B,eAAe,EAAE,8BAA8B;KAChD,CAAC;IACF,YAAY,EAAE,CAAC,GAAG,CAAC,gCAAgC,EAAE,QAAQ,CAAC,CAAC;IAC/D,UAAU,EAAE,cAAc;IAC1B,YAAY,EAAE,iBAAiB;IAC/B,WAAW,EAAE,aAAa;IAC1B,OAAO,EAAE,KAAK,EAAE,IAAI,EAAE,GAAG,EAAE,EAAE;QAC3B,MAAM,KAAK,GAAG,IAKb,CAAC;QACF,OAAO,cAAc,CAAC,GAAG,EAAE;YACzB,KAAK,EAAE,gCAAgC;YACvC,EAAE,EAAE,KAAK,CAAC,EAAE;YACZ,KAAK,EAAE,uBAAuB;YAC9B,IAAI,EAAE,KAAK;YACX,MAAM,EAAE,CAAC,GAAG,EAAE,EAAE,CAAC,IAAI,IAAI,CAAC,GAAG,CAAC,QAAQ,CAAC,CAAC,OAAO,EAAE,KAAK,IAAI,IAAI,CAAC,KAAK,CAAC,QAAQ,CAAC,CAAC,OAAO,EAAE;YACxF,OAAO,EAAE,GAAG,EAAE,CAAC,CAAC,EAAE,QAAQ,EAAE,KAAK,CAAC,QAAQ,EAAE,CAAC;YAC7C,SAAS,EAAE,iBAAiB;YAC5B,MAAM,EAAE,KAAK,CAAC,MAAM;YACpB,cAAc,EAAE,KAAK,CAAC,eAAe;SACtC,CAAC,CAAC;IACL,CAAC;CACF,CAAC"}
@@ -0,0 +1,5 @@
1
+ import { Tool } from '../registry.js';
2
+ import { CatalogueReport } from '../../generated-reads/index.js';
3
+ export declare const qomGeneratedReadReport: CatalogueReport;
4
+ export declare const qomGeneratedReadTools: Tool[];
5
+ //# sourceMappingURL=generated-reads.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"generated-reads.d.ts","sourceRoot":"","sources":["../../../src/tools/qom/generated-reads.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,MAAM,gBAAgB,CAAC;AACtC,OAAO,EAGL,eAAe,EAChB,MAAM,gCAAgC,CAAC;AAsBxC,eAAO,MAAM,sBAAsB,EAAE,eAC8B,CAAC;AAEpE,eAAO,MAAM,qBAAqB,EAAE,IAAI,EAGvC,CAAC"}
@@ -0,0 +1,22 @@
1
+ import { buildGeneratedReadCatalogue, buildGeneratedReadCatalogueReport, } from '../../generated-reads/index.js';
2
+ import { loadPersistResourceContract } from '../../contracts/persist-resource-contract.js';
3
+ /**
4
+ * Bounded read tools for the QOM module (WI-0003507).
5
+ *
6
+ * The schema-driven catalogue (WI-0003500) emits describe/list/get for
7
+ * every `normal`-sensitivity QOM resource that declares a read
8
+ * operation and has no side effects. All QOM tables are classified
9
+ * `normal` — quote headers, quote versions and lines, order headers
10
+ * and lines, and the batch/interface staging tables — so no
11
+ * `includeSensitive` opt-in is required.
12
+ *
13
+ * Every write on a quote or order lives in a dedicated hand-written
14
+ * tool with explicit confirmation/idempotency semantics (see
15
+ * `qom-quote-*`, `qom-order-*`). Generic PATCHes are refused so
16
+ * totals, transitions, cancellation and hold state stay owned by the
17
+ * persist layer.
18
+ */
19
+ const contract = loadPersistResourceContract();
20
+ export const qomGeneratedReadReport = buildGeneratedReadCatalogueReport(contract, { modules: ['qom'] });
21
+ export const qomGeneratedReadTools = buildGeneratedReadCatalogue(contract, { modules: ['qom'] });
22
+ //# sourceMappingURL=generated-reads.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"generated-reads.js","sourceRoot":"","sources":["../../../src/tools/qom/generated-reads.ts"],"names":[],"mappings":"AACA,OAAO,EACL,2BAA2B,EAC3B,iCAAiC,GAElC,MAAM,gCAAgC,CAAC;AACxC,OAAO,EAAE,2BAA2B,EAAE,MAAM,8CAA8C,CAAC;AAE3F;;;;;;;;;;;;;;;GAeG;AAEH,MAAM,QAAQ,GAAG,2BAA2B,EAAE,CAAC;AAE/C,MAAM,CAAC,MAAM,sBAAsB,GACjC,iCAAiC,CAAC,QAAQ,EAAE,EAAE,OAAO,EAAE,CAAC,KAAK,CAAC,EAAE,CAAC,CAAC;AAEpE,MAAM,CAAC,MAAM,qBAAqB,GAAW,2BAA2B,CACtE,QAAQ,EACR,EAAE,OAAO,EAAE,CAAC,KAAK,CAAC,EAAE,CACrB,CAAC"}
@@ -0,0 +1,5 @@
1
+ import { Tool } from '../registry.js';
2
+ export declare const qomTools: Tool[];
3
+ /** Read-only slice used by the `qom-readonly` selectable sub-domain. */
4
+ export declare const qomReadOnlyTools: Tool[];
5
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/tools/qom/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,MAAM,gBAAgB,CAAC;AAsBtC,eAAO,MAAM,QAAQ,EAAE,IAAI,EAAiD,CAAC;AAE7E,wEAAwE;AACxE,eAAO,MAAM,gBAAgB,EAAE,IAAI,EAA0B,CAAC"}
@@ -0,0 +1,23 @@
1
+ import { qomGeneratedReadTools } from './generated-reads.js';
2
+ import { qomQuoteCreateTool } from './qom-quote-create.js';
3
+ import { qomQuoteVersionCreateTool } from './qom-quote-version-create.js';
4
+ import { qomQuoteLineAddTool } from './qom-quote-line-add.js';
5
+ import { qomOrderCreateTool } from './qom-order-create.js';
6
+ import { qomOrderLineAddTool } from './qom-order-line-add.js';
7
+ import { qomOrderCancelTool } from './qom-order-cancel.js';
8
+ import { qomOrderHoldPlaceTool } from './qom-order-hold-place.js';
9
+ import { qomOrderHoldReleaseTool } from './qom-order-hold-release.js';
10
+ const qomWriteTools = [
11
+ qomQuoteCreateTool,
12
+ qomQuoteVersionCreateTool,
13
+ qomQuoteLineAddTool,
14
+ qomOrderCreateTool,
15
+ qomOrderLineAddTool,
16
+ qomOrderCancelTool,
17
+ qomOrderHoldPlaceTool,
18
+ qomOrderHoldReleaseTool,
19
+ ];
20
+ export const qomTools = [...qomGeneratedReadTools, ...qomWriteTools];
21
+ /** Read-only slice used by the `qom-readonly` selectable sub-domain. */
22
+ export const qomReadOnlyTools = qomGeneratedReadTools;
23
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/tools/qom/index.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,qBAAqB,EAAE,MAAM,sBAAsB,CAAC;AAC7D,OAAO,EAAE,kBAAkB,EAAE,MAAM,uBAAuB,CAAC;AAC3D,OAAO,EAAE,yBAAyB,EAAE,MAAM,+BAA+B,CAAC;AAC1E,OAAO,EAAE,mBAAmB,EAAE,MAAM,yBAAyB,CAAC;AAC9D,OAAO,EAAE,kBAAkB,EAAE,MAAM,uBAAuB,CAAC;AAC3D,OAAO,EAAE,mBAAmB,EAAE,MAAM,yBAAyB,CAAC;AAC9D,OAAO,EAAE,kBAAkB,EAAE,MAAM,uBAAuB,CAAC;AAC3D,OAAO,EAAE,qBAAqB,EAAE,MAAM,2BAA2B,CAAC;AAClE,OAAO,EAAE,uBAAuB,EAAE,MAAM,6BAA6B,CAAC;AAEtE,MAAM,aAAa,GAAW;IAC5B,kBAAkB;IAClB,yBAAyB;IACzB,mBAAmB;IACnB,kBAAkB;IAClB,mBAAmB;IACnB,kBAAkB;IAClB,qBAAqB;IACrB,uBAAuB;CACxB,CAAC;AAEF,MAAM,CAAC,MAAM,QAAQ,GAAW,CAAC,GAAG,qBAAqB,EAAE,GAAG,aAAa,CAAC,CAAC;AAE7E,wEAAwE;AACxE,MAAM,CAAC,MAAM,gBAAgB,GAAW,qBAAqB,CAAC"}
@@ -0,0 +1,16 @@
1
+ import { Tool } from '../registry.js';
2
+ /**
3
+ * Cancellation semantic tool for a QOM order (`qom_order_headers`).
4
+ *
5
+ * Sets `order_status='CANCELLED'`, which is the column Persist's own
6
+ * cancel path writes (`qom_guest_clear_cart`), plus `is_cancelled=true`
7
+ * and `is_open=false`. The reason is merged into `metadata`.
8
+ *
9
+ * Nothing in Persist or persist-functions reacts to the change: no
10
+ * refund, no payment void, no stock release, and the order lines keep
11
+ * their status. The tool therefore only accepts DRAFT and OPEN orders,
12
+ * where no money has moved. Persist does not enforce this
13
+ * (see the Persist work item for QOM order state rules).
14
+ */
15
+ export declare const qomOrderCancelTool: Tool;
16
+ //# sourceMappingURL=qom-order-cancel.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"qom-order-cancel.d.ts","sourceRoot":"","sources":["../../../src/tools/qom/qom-order-cancel.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,IAAI,EAAE,MAAM,gBAAgB,CAAC;AAYtC;;;;;;;;;;;;GAYG;AACH,eAAO,MAAM,kBAAkB,EAAE,IAqChC,CAAC"}
@@ -0,0 +1,56 @@
1
+ import { z } from 'zod';
2
+ import { cap } from '../../capabilities/tool-capability.js';
3
+ import { redactRow } from '../../generated-reads/index.js';
4
+ import { confirmFlagSchema, reasonSchema, unenforcedIdempotencyKeySchema, } from '../_shared/side-effect.js';
5
+ import { softDeactivate } from '../_shared/soft-deactivate.js';
6
+ const CANCELLABLE_STATUSES = ['DRAFT', 'OPEN'];
7
+ /**
8
+ * Cancellation semantic tool for a QOM order (`qom_order_headers`).
9
+ *
10
+ * Sets `order_status='CANCELLED'`, which is the column Persist's own
11
+ * cancel path writes (`qom_guest_clear_cart`), plus `is_cancelled=true`
12
+ * and `is_open=false`. The reason is merged into `metadata`.
13
+ *
14
+ * Nothing in Persist or persist-functions reacts to the change: no
15
+ * refund, no payment void, no stock release, and the order lines keep
16
+ * their status. The tool therefore only accepts DRAFT and OPEN orders,
17
+ * where no money has moved. Persist does not enforce this
18
+ * (see the Persist work item for QOM order state rules).
19
+ */
20
+ export const qomOrderCancelTool = {
21
+ name: 'qom_order_cancel',
22
+ description: 'Cancel a DRAFT or OPEN QOM order: sets order_status=CANCELLED, is_cancelled=true and ' +
23
+ 'is_open=false, and merges the reason into metadata. Any other status is refused, because ' +
24
+ 'cancelling triggers no refund or stock release and does not change the order lines. ' +
25
+ 'Requires confirm=true and a reason. An order already cancelled is returned unchanged, so ' +
26
+ 'retries are safe.',
27
+ inputSchema: z.object({
28
+ id: z.string().min(1).describe('UUID of the order to cancel'),
29
+ reason: reasonSchema.describe('Human-readable reason, merged into metadata'),
30
+ confirm: confirmFlagSchema,
31
+ idempotency_key: unenforcedIdempotencyKeySchema,
32
+ }),
33
+ capabilities: [cap('qom_order_headers', 'UPDATE')],
34
+ sideEffect: 'state_change',
35
+ confirmation: 'caller_confirms',
36
+ idempotency: 'natural_key',
37
+ handler: async (args, ctx) => {
38
+ const input = args;
39
+ return softDeactivate(ctx, {
40
+ table: 'qom_order_headers',
41
+ id: input.id,
42
+ label: 'QOM order',
43
+ verb: 'cancel',
44
+ isDone: (row) => row.is_cancelled === true || row.order_status === 'CANCELLED',
45
+ reject: (row) => CANCELLABLE_STATUSES.includes(row.order_status)
46
+ ? undefined
47
+ : `QOM order ${input.id} is ${row.order_status}: only DRAFT or OPEN orders can be cancelled`,
48
+ changes: () => ({ order_status: 'CANCELLED', is_cancelled: true, is_open: false }),
49
+ reasonKey: 'cancellation_reason',
50
+ reason: input.reason,
51
+ idempotencyKey: input.idempotency_key,
52
+ present: redactRow,
53
+ });
54
+ },
55
+ };
56
+ //# sourceMappingURL=qom-order-cancel.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"qom-order-cancel.js","sourceRoot":"","sources":["../../../src/tools/qom/qom-order-cancel.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,OAAO,EAAE,GAAG,EAAE,MAAM,uCAAuC,CAAC;AAC5D,OAAO,EAAE,SAAS,EAAE,MAAM,gCAAgC,CAAC;AAC3D,OAAO,EACL,iBAAiB,EACjB,YAAY,EACZ,8BAA8B,GAC/B,MAAM,2BAA2B,CAAC;AACnC,OAAO,EAAE,cAAc,EAAE,MAAM,+BAA+B,CAAC;AAE/D,MAAM,oBAAoB,GAAG,CAAC,OAAO,EAAE,MAAM,CAAC,CAAC;AAE/C;;;;;;;;;;;;GAYG;AACH,MAAM,CAAC,MAAM,kBAAkB,GAAS;IACtC,IAAI,EAAE,kBAAkB;IACxB,WAAW,EACT,uFAAuF;QACvF,2FAA2F;QAC3F,sFAAsF;QACtF,2FAA2F;QAC3F,mBAAmB;IACrB,WAAW,EAAE,CAAC,CAAC,MAAM,CAAC;QACpB,EAAE,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,C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 * Provisioning semantic tool: create a QOM order header
4
+ * (`qom_order_headers`). The tool requires `confirm: true` and a
5
+ * business `order_code`, because the unique key
6
+ * (tenant_id, org_id, order_code) is what stops a retry creating a
7
+ * second order. Persist would generate a code if none were sent.
8
+ *
9
+ * `order_status` is limited to DRAFT and OPEN: Persist accepts any
10
+ * lookup value, so a caller could otherwise create an order already
11
+ * PAID or FULFILLED. `order_type` omits MARKETPLACE_GUEST, which belongs
12
+ * to the guest cart RPCs.
13
+ *
14
+ * `is_open`, `is_on_hold`, `is_cancelled` are intentionally NOT
15
+ * writable through this tool — they belong to `qom_order_cancel`,
16
+ * `qom_order_hold_place` and `qom_order_hold_release`.
17
+ * `guest_session_token_hash` is a credential-shaped field: it is not an
18
+ * input and is removed from the returned row.
19
+ *
20
+ * `source_deal_id` links the order back to the SFA deal it was
21
+ * quoted from, if any.
22
+ */
23
+ export declare const qomOrderCreateTool: Tool;
24
+ //# sourceMappingURL=qom-order-create.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"qom-order-create.d.ts","sourceRoot":"","sources":["../../../src/tools/qom/qom-order-create.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,IAAI,EAAE,MAAM,gBAAgB,CAAC;AAUtC;;;;;;;;;;;;;;;;;;;;GAoBG;AACH,eAAO,MAAM,kBAAkB,EAAE,IA+GhC,CAAC"}
@@ -0,0 +1,133 @@
1
+ import { z } from 'zod';
2
+ import { API_ERROR, errorResponse, successResponse } from '../types.js';
3
+ import { cap } from '../../capabilities/tool-capability.js';
4
+ import { redactRow } from '../../generated-reads/index.js';
5
+ import { confirmFlagSchema, unenforcedIdempotencyKeySchema, writeHeadersWithIdempotency, } from '../_shared/side-effect.js';
6
+ /**
7
+ * Provisioning semantic tool: create a QOM order header
8
+ * (`qom_order_headers`). The tool requires `confirm: true` and a
9
+ * business `order_code`, because the unique key
10
+ * (tenant_id, org_id, order_code) is what stops a retry creating a
11
+ * second order. Persist would generate a code if none were sent.
12
+ *
13
+ * `order_status` is limited to DRAFT and OPEN: Persist accepts any
14
+ * lookup value, so a caller could otherwise create an order already
15
+ * PAID or FULFILLED. `order_type` omits MARKETPLACE_GUEST, which belongs
16
+ * to the guest cart RPCs.
17
+ *
18
+ * `is_open`, `is_on_hold`, `is_cancelled` are intentionally NOT
19
+ * writable through this tool — they belong to `qom_order_cancel`,
20
+ * `qom_order_hold_place` and `qom_order_hold_release`.
21
+ * `guest_session_token_hash` is a credential-shaped field: it is not an
22
+ * input and is removed from the returned row.
23
+ *
24
+ * `source_deal_id` links the order back to the SFA deal it was
25
+ * quoted from, if any.
26
+ */
27
+ export const qomOrderCreateTool = {
28
+ name: 'qom_order_create',
29
+ description: 'Create a new sales order (qom_order_headers) as DRAFT or OPEN. Requires confirm=true. ' +
30
+ 'is_open, is_on_hold and is_cancelled cannot be set here: use qom_order_cancel, ' +
31
+ 'qom_order_hold_place or qom_order_hold_release. One order per order_code in an ' +
32
+ 'organisation: a retry fails with a duplicate-key error instead of creating a second order.',
33
+ inputSchema: z.object({
34
+ order_code: z
35
+ .string()
36
+ .min(1)
37
+ .max(32)
38
+ .describe('Business order reference, unique within the organisation (required)'),
39
+ order_status: z.enum(['DRAFT', 'OPEN']).describe('Initial order status (required)'),
40
+ order_type: z
41
+ .enum(['SALES_ORDER', 'STANDARD', 'SUBSCRIPTION'])
42
+ .describe('Order type (required)'),
43
+ order_date: z.string().min(1).optional().describe('ISO 8601 order date'),
44
+ order_currency_code: z.string().length(3).optional(),
45
+ sold_to_customer_id: z.string().min(1).optional(),
46
+ sold_to_customer_site_id: z.string().min(1).optional(),
47
+ sold_to_party_contact_point_id: z.string().min(1).optional(),
48
+ ship_to_customer_id: z.string().min(1).optional(),
49
+ ship_to_customer_site_id: z.string().min(1).optional(),
50
+ ship_to_party_contact_point_id: z.string().min(1).optional(),
51
+ payment_term_id: z.string().min(1).optional(),
52
+ payment_method_id: z.string().min(1).optional(),
53
+ price_list_version_id: z.string().min(1).optional(),
54
+ priced_date: z.string().min(1).optional(),
55
+ request_arrival_date: z.string().min(1).optional(),
56
+ request_ship_date: z.string().min(1).optional(),
57
+ earliest_arrival_date: z.string().min(1).optional(),
58
+ latest_arrival_date: z.string().min(1).optional(),
59
+ earliest_ship_date: z.string().min(1).optional(),
60
+ latest_ship_date: z.string().min(1).optional(),
61
+ allow_partial_ship: z.boolean().optional(),
62
+ shipment_terms_name: z.string().max(32).optional(),
63
+ shipping_instructions: z.string().max(2048).optional(),
64
+ packing_instructions: z.string().max(2048).optional(),
65
+ customer_po_number: z.string().max(64).optional(),
66
+ customer_reference: z.string().max(256).optional(),
67
+ sales_channel_name: z.string().max(32).optional(),
68
+ salesperson_number: z.number().int().optional(),
69
+ source_deal_id: z
70
+ .string()
71
+ .min(1)
72
+ .optional()
73
+ .describe('UUID of the sfa_deals row this order was quoted from'),
74
+ org_id: z.string().min(1).optional(),
75
+ metadata: z.record(z.unknown()).optional(),
76
+ confirm: confirmFlagSchema,
77
+ idempotency_key: unenforcedIdempotencyKeySchema,
78
+ }),
79
+ capabilities: [cap('qom_order_headers', 'INSERT')],
80
+ sideEffect: 'provisioning',
81
+ confirmation: 'caller_confirms',
82
+ idempotency: 'natural_key',
83
+ handler: async (args, ctx) => {
84
+ const input = args;
85
+ const body = {
86
+ order_code: input.order_code,
87
+ order_status: input.order_status,
88
+ order_type: input.order_type,
89
+ };
90
+ for (const field of [
91
+ 'order_date',
92
+ 'order_currency_code',
93
+ 'sold_to_customer_id',
94
+ 'sold_to_customer_site_id',
95
+ 'sold_to_party_contact_point_id',
96
+ 'ship_to_customer_id',
97
+ 'ship_to_customer_site_id',
98
+ 'ship_to_party_contact_point_id',
99
+ 'payment_term_id',
100
+ 'payment_method_id',
101
+ 'price_list_version_id',
102
+ 'priced_date',
103
+ 'request_arrival_date',
104
+ 'request_ship_date',
105
+ 'earliest_arrival_date',
106
+ 'latest_arrival_date',
107
+ 'earliest_ship_date',
108
+ 'latest_ship_date',
109
+ 'allow_partial_ship',
110
+ 'shipment_terms_name',
111
+ 'shipping_instructions',
112
+ 'packing_instructions',
113
+ 'customer_po_number',
114
+ 'customer_reference',
115
+ 'sales_channel_name',
116
+ 'salesperson_number',
117
+ 'source_deal_id',
118
+ 'org_id',
119
+ 'metadata',
120
+ ]) {
121
+ if (input[field] !== undefined)
122
+ body[field] = input[field];
123
+ }
124
+ try {
125
+ const rows = await ctx.apiClient.post(`${ctx.apiClient.dbBasePath}/qom_order_headers?select=*`, body, { headers: writeHeadersWithIdempotency(input.idempotency_key) });
126
+ return successResponse(redactRow(rows[0]));
127
+ }
128
+ catch (error) {
129
+ return errorResponse(API_ERROR, `Failed to create QOM order: ${error.message}`);
130
+ }
131
+ },
132
+ };
133
+ //# sourceMappingURL=qom-order-create.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"qom-order-create.js","sourceRoot":"","sources":["../../../src/tools/qom/qom-order-create.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,OAAO,EAAE,SAAS,EAAE,aAAa,EAAE,eAAe,EAAE,MAAM,aAAa,CAAC;AACxE,OAAO,EAAE,GAAG,EAAE,MAAM,uCAAuC,CAAC;AAC5D,OAAO,EAAE,SAAS,EAAE,MAAM,gCAAgC,CAAC;AAC3D,OAAO,EACL,iBAAiB,EACjB,8BAA8B,EAC9B,2BAA2B,GAC5B,MAAM,2BAA2B,CAAC;AAEnC;;;;;;;;;;;;;;;;;;;;GAoBG;AACH,MAAM,CAAC,MAAM,kBAAkB,GAAS;IACtC,IAAI,EAAE,kBAAkB;IACxB,WAAW,EACT,wFAAwF;QACxF,iFAAiF;QACjF,iFAAiF;QACjF,4FAA4F;IAC9F,WAAW,EAAE,CAAC,CAAC,MAAM,CAAC;QACpB,UAAU,EAAE,CAAC;aACV,MAAM,EAAE;aACR,GAAG,CAAC,CAAC,CAAC;aACN,GAAG,CAAC,EAAE,CAAC;aACP,QAAQ,CAAC,qEAAqE,CAAC;QAClF,YAAY,EAAE,CAAC,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YAClB,oBAAoB;YACpB,qBAAqB;YACrB,uBAAuB;YACvB,sBAAsB;YACtB,oBAAoB;YACpB,oBAAoB;YACpB,oBAAoB;YACpB,oBAAoB;YACpB,gBAAgB;YAChB,QAAQ;YACR,UAAU;SACX,EAAE,CAAC;YACF,IAAI,KAAK,CAAC,KAAK,CAAC,KAAK,SAAS;gBAAE,IAAI,CAAC,KAAK,CAAC,GAAG,KAAK,CAAC,KAAK,CAAC,CAAC;QAC7D,CAAC;QACD,IAAI,CAAC;YACH,MAAM,IAAI,GAAG,MAAM,GAAG,CAAC,SAAS,CAAC,IAAI,CACnC,GAAG,GAAG,CAAC,SAAS,CAAC,UAAU,6BAA6B,EACxD,IAAI,EACJ,EAAE,OAAO,EAAE,2BAA2B,CAAC,KAAK,CAAC,eAAe,CAAC,EAAE,CAChE,CAAC;YACF,OAAO,eAAe,CAAC,SAAS,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;QAC7C,CAAC;QAAC,OAAO,KAAU,EAAE,CAAC;YACpB,OAAO,aAAa,CAClB,SAAS,EACT,+BAA+B,KAAK,CAAC,OAAO,EAAE,CAC/C,CAAC;QACJ,CAAC;IACH,CAAC;CACF,CAAC"}
@@ -0,0 +1,11 @@
1
+ import { Tool } from '../registry.js';
2
+ /**
3
+ * State-transition semantic tool: flag a QOM order as on hold
4
+ * (`qom_order_headers.is_on_hold=true`).
5
+ *
6
+ * Nothing in Persist or persist-functions reads `is_on_hold` on an
7
+ * order, so the flag records intent and does not stop payment or
8
+ * fulfilment. The reason is merged into `metadata.hold_reason`.
9
+ */
10
+ export declare const qomOrderHoldPlaceTool: Tool;
11
+ //# sourceMappingURL=qom-order-hold-place.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"qom-order-hold-place.d.ts","sourceRoot":"","sources":["../../../src/tools/qom/qom-order-hold-place.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,IAAI,EAAE,MAAM,gBAAgB,CAAC;AAYtC;;;;;;;GAOG;AACH,eAAO,MAAM,qBAAqB,EAAE,IAoCnC,CAAC"}