@mj-biz-apps/orders-core-entities-server 5.35.0 → 5.36.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 (76) hide show
  1. package/dist/AccountingBridge.d.ts +6 -7
  2. package/dist/AccountingBridge.d.ts.map +1 -1
  3. package/dist/AccountingBridge.js +6 -7
  4. package/dist/AccountingBridge.js.map +1 -1
  5. package/dist/AdvanceOrderStateOperation.d.ts +5 -5
  6. package/dist/AdvanceOrderStateOperation.js +5 -5
  7. package/dist/BaseInvoiceRail.d.ts +9 -0
  8. package/dist/BaseInvoiceRail.d.ts.map +1 -1
  9. package/dist/BaseInvoiceRail.js +8 -0
  10. package/dist/BaseInvoiceRail.js.map +1 -1
  11. package/dist/BasePaymentProvider.d.ts +7 -0
  12. package/dist/BasePaymentProvider.d.ts.map +1 -1
  13. package/dist/BasePaymentProvider.js.map +1 -1
  14. package/dist/BillComInvoiceRail.d.ts +5 -0
  15. package/dist/BillComInvoiceRail.d.ts.map +1 -1
  16. package/dist/BillComInvoiceRail.js +12 -3
  17. package/dist/BillComInvoiceRail.js.map +1 -1
  18. package/dist/CheckoutPublishableKey.d.ts +69 -0
  19. package/dist/CheckoutPublishableKey.d.ts.map +1 -0
  20. package/dist/CheckoutPublishableKey.js +122 -0
  21. package/dist/CheckoutPublishableKey.js.map +1 -0
  22. package/dist/CheckoutSessionService.d.ts +10 -1
  23. package/dist/CheckoutSessionService.d.ts.map +1 -1
  24. package/dist/CheckoutSessionService.js +26 -5
  25. package/dist/CheckoutSessionService.js.map +1 -1
  26. package/dist/ConcessionApprovalTask.d.ts +4 -0
  27. package/dist/ConcessionApprovalTask.d.ts.map +1 -1
  28. package/dist/ConcessionApprovalTask.js +8 -8
  29. package/dist/ConcessionApprovalTask.js.map +1 -1
  30. package/dist/CreateOrderFromProviderPaymentOperation.d.ts.map +1 -1
  31. package/dist/CreateOrderFromProviderPaymentOperation.js +2 -1
  32. package/dist/CreateOrderFromProviderPaymentOperation.js.map +1 -1
  33. package/dist/ExternalInvoiceBehavior.d.ts +6 -0
  34. package/dist/ExternalInvoiceBehavior.d.ts.map +1 -1
  35. package/dist/ExternalInvoiceBehavior.js +7 -0
  36. package/dist/ExternalInvoiceBehavior.js.map +1 -1
  37. package/dist/IssueExternalInvoiceOperation.d.ts.map +1 -1
  38. package/dist/IssueExternalInvoiceOperation.js +25 -3
  39. package/dist/IssueExternalInvoiceOperation.js.map +1 -1
  40. package/dist/OrderEntityServer.d.ts +26 -0
  41. package/dist/OrderEntityServer.d.ts.map +1 -1
  42. package/dist/OrderEntityServer.js +122 -8
  43. package/dist/OrderEntityServer.js.map +1 -1
  44. package/dist/OrderReview.d.ts +72 -0
  45. package/dist/OrderReview.d.ts.map +1 -0
  46. package/dist/OrderReview.js +611 -0
  47. package/dist/OrderReview.js.map +1 -0
  48. package/dist/OrdersSettings.d.ts +58 -0
  49. package/dist/OrdersSettings.d.ts.map +1 -1
  50. package/dist/OrdersSettings.js +111 -0
  51. package/dist/OrdersSettings.js.map +1 -1
  52. package/dist/PaymentProviderResolver.d.ts +10 -2
  53. package/dist/PaymentProviderResolver.d.ts.map +1 -1
  54. package/dist/PaymentProviderResolver.js +16 -5
  55. package/dist/PaymentProviderResolver.js.map +1 -1
  56. package/dist/ProductPriceEntityServer.d.ts +2 -2
  57. package/dist/ProductPriceEntityServer.d.ts.map +1 -1
  58. package/dist/ProductPriceEntityServer.js +3 -3
  59. package/dist/ProductPriceEntityServer.js.map +1 -1
  60. package/dist/RefundAuthority.d.ts +75 -0
  61. package/dist/RefundAuthority.d.ts.map +1 -0
  62. package/dist/RefundAuthority.js +155 -0
  63. package/dist/RefundAuthority.js.map +1 -0
  64. package/dist/RefundPaymentOperation.d.ts +2 -0
  65. package/dist/RefundPaymentOperation.d.ts.map +1 -1
  66. package/dist/RefundPaymentOperation.js +15 -0
  67. package/dist/RefundPaymentOperation.js.map +1 -1
  68. package/dist/SystemOrderOrigin.d.ts +40 -0
  69. package/dist/SystemOrderOrigin.d.ts.map +1 -0
  70. package/dist/SystemOrderOrigin.js +30 -0
  71. package/dist/SystemOrderOrigin.js.map +1 -0
  72. package/dist/index.d.ts +3 -1
  73. package/dist/index.d.ts.map +1 -1
  74. package/dist/index.js +3 -2
  75. package/dist/index.js.map +1 -1
  76. package/package.json +22 -22
@@ -0,0 +1,72 @@
1
+ import '@mj-biz-apps/tasks-entities';
2
+ import { type OrderReviewChangeFacts, type OrderReviewConfig, type ReviewStanding, type ReviewTaskFacts } from '@mj-biz-apps/orders-entities';
3
+ import { type ApprovalTaskContext } from './ConcessionApprovalTask.js';
4
+ import { type ConcessionLineFacts } from './ConcessionGate.js';
5
+ /** A line as the review reads it: the concession gate's facts plus its service period. */
6
+ export interface ReviewLineInput extends ConcessionLineFacts {
7
+ ServicePeriodStart: string | null;
8
+ ServicePeriodEnd: string | null;
9
+ /** A renewal line whose carried-forward price this save edits. */
10
+ RenewalPriceEdited: boolean;
11
+ }
12
+ /** The order, as the save hands it to the review. */
13
+ export interface ReviewOrderInput {
14
+ /** Null for an order not yet saved. */
15
+ OrderHeaderID: string | null;
16
+ OrderNumber: string | null;
17
+ Origin: string | null;
18
+ ReversesOrderHeaderID: string | null;
19
+ Lines: readonly ReviewLineInput[];
20
+ }
21
+ /** The order's most recent review task, with what the gate reads from it. */
22
+ interface LatestReview {
23
+ Task: {
24
+ ID: string;
25
+ Name: string;
26
+ Status: string;
27
+ };
28
+ Facts: ReviewTaskFacts;
29
+ Standing: ReviewStanding;
30
+ }
31
+ /** What a raised review was sent to. */
32
+ export interface RaisedReview {
33
+ TaskID: string;
34
+ TaskName: string;
35
+ Role: string;
36
+ Escalated: boolean;
37
+ AssigneeCount: number;
38
+ }
39
+ /**
40
+ * Called by a save of a saved, unconfirmed order. Raises a review when the save changes a reviewed field
41
+ * on a deal-created order, changes one after an approved review, or edits a renewal's carried-forward
42
+ * price; notes the change on an open review instead of raising a second. Returns a refusal or null.
43
+ */
44
+ export declare function CheckOrderReviewOnChange(order: ReviewOrderInput, change: OrderReviewChangeFacts, ctx: ApprovalTaskContext): Promise<string | null>;
45
+ /**
46
+ * Called by the save that confirms an order. Null lets the confirm through; a string refuses it and says
47
+ * why, and when the order needed a review it did not have, that a review was raised and who it went to.
48
+ */
49
+ export declare function CheckOrderReviewAtConfirm(order: ReviewOrderInput, ctx: ApprovalTaskContext): Promise<string | null>;
50
+ /**
51
+ * The order's review and where it stands, or null when it has none (or the tasks app, or the review
52
+ * task type, is not installed, in which case no review can exist).
53
+ *
54
+ * WHICH TASK. Every review task linked to the order is read. An open one that is assigned to someone
55
+ * wins, newest first, so a newer closed task (which anyone who can write task links can point at the
56
+ * order) never outranks an open review. With none open, the newest task decides. An open task assigned
57
+ * to nobody is passed over and reads as not approved, so it is replaced rather than holding the order
58
+ * forever.
59
+ */
60
+ export declare function LatestReviewTask(orderHeaderID: string, config: OrderReviewConfig, ctx: ApprovalTaskContext): Promise<LatestReview | null>;
61
+ /**
62
+ * Raise a review task for the order: decide the role, assign its active holders other than the order's
63
+ * creator by Person, and link the order. Throws, saying what to fix, when nobody could receive it.
64
+ */
65
+ export declare function RaiseOrderReview(order: ReviewOrderInput, reasons: readonly string[], config: OrderReviewConfig, ctx: ApprovalTaskContext): Promise<RaisedReview>;
66
+ /**
67
+ * The user who created the order, from its `MJ: Record Changes` Create row. With no such row (a host
68
+ * that does not track the entity's changes, or an order older than the tracking), the user saving.
69
+ */
70
+ export declare function OrderCreatorUserID(orderHeaderID: string, ctx: ApprovalTaskContext): Promise<string>;
71
+ export {};
72
+ //# sourceMappingURL=OrderReview.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"OrderReview.d.ts","sourceRoot":"","sources":["../src/OrderReview.ts"],"names":[],"mappings":"AA8CA,OAAO,6BAA6B,CAAC;AAErC,OAAO,EAkBH,KAAK,sBAAsB,EAC3B,KAAK,iBAAiB,EAMtB,KAAK,cAAc,EACnB,KAAK,eAAe,EACvB,MAAM,8BAA8B,CAA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