@openmrp/sdk 0.19.4 → 0.19.6

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 (119) hide show
  1. package/CHANGELOG.md +2 -2
  2. package/README.md +26 -26
  3. package/client.d.mts +4 -4
  4. package/client.d.ts +4 -4
  5. package/client.js +37 -37
  6. package/client.mjs +35 -35
  7. package/core/api-promise.d.mts +2 -2
  8. package/core/api-promise.d.ts +2 -2
  9. package/core/error.d.mts +2 -2
  10. package/core/error.d.ts +2 -2
  11. package/core/error.js +4 -4
  12. package/core/error.mjs +2 -2
  13. package/core/resource.d.mts +3 -3
  14. package/core/resource.d.ts +3 -3
  15. package/index.d.mts +3 -3
  16. package/index.d.ts +3 -3
  17. package/index.js +4 -4
  18. package/index.mjs +3 -3
  19. package/internal/parse.d.mts +2 -2
  20. package/internal/parse.d.ts +2 -2
  21. package/internal/shims.js +1 -1
  22. package/internal/shims.mjs +1 -1
  23. package/internal/uploads.d.mts +4 -4
  24. package/internal/uploads.d.ts +4 -4
  25. package/internal/utils/base64.js +2 -2
  26. package/internal/utils/base64.mjs +3 -3
  27. package/internal/utils/log.d.mts +3 -3
  28. package/internal/utils/log.d.ts +3 -3
  29. package/internal/utils/path.js +1 -1
  30. package/internal/utils/path.mjs +2 -2
  31. package/internal/utils/values.js +5 -5
  32. package/internal/utils/values.mjs +6 -6
  33. package/package.json +2 -2
  34. package/resources/ai/agents.d.mts +2 -6
  35. package/resources/ai/agents.d.mts.map +1 -1
  36. package/resources/ai/agents.d.ts +2 -6
  37. package/resources/ai/agents.d.ts.map +1 -1
  38. package/resources/ai/ai.d.mts +2 -2
  39. package/resources/ai/ai.d.mts.map +1 -1
  40. package/resources/ai/ai.d.ts +2 -2
  41. package/resources/ai/ai.d.ts.map +1 -1
  42. package/resources/ai/runs/runs.d.mts +1 -4
  43. package/resources/ai/runs/runs.d.mts.map +1 -1
  44. package/resources/ai/runs/runs.d.ts +1 -4
  45. package/resources/ai/runs/runs.d.ts.map +1 -1
  46. package/resources/ai/runs/runs.js.map +1 -1
  47. package/resources/ai/runs/runs.mjs.map +1 -1
  48. package/resources/catalog/items/actions.d.mts +2 -2
  49. package/resources/catalog/items/actions.d.mts.map +1 -1
  50. package/resources/catalog/items/actions.d.ts +2 -2
  51. package/resources/catalog/items/actions.d.ts.map +1 -1
  52. package/resources/core/request-logs.d.mts +2 -2
  53. package/resources/core/request-logs.d.mts.map +1 -1
  54. package/resources/core/request-logs.d.ts +2 -2
  55. package/resources/core/request-logs.d.ts.map +1 -1
  56. package/resources/messaging/conversations/actions.d.mts +2 -2
  57. package/resources/messaging/conversations/actions.d.mts.map +1 -1
  58. package/resources/messaging/conversations/actions.d.ts +2 -2
  59. package/resources/messaging/conversations/actions.d.ts.map +1 -1
  60. package/resources/messaging/conversations/conversations.d.mts +2 -2
  61. package/resources/messaging/conversations/conversations.d.mts.map +1 -1
  62. package/resources/messaging/conversations/conversations.d.ts +2 -2
  63. package/resources/messaging/conversations/conversations.d.ts.map +1 -1
  64. package/resources/messaging/conversations/conversations.js.map +1 -1
  65. package/resources/messaging/conversations/conversations.mjs.map +1 -1
  66. package/resources/messaging/email-domains/email-domains.d.mts +1 -1
  67. package/resources/messaging/email-domains/email-domains.d.mts.map +1 -1
  68. package/resources/messaging/email-domains/email-domains.d.ts +1 -1
  69. package/resources/messaging/email-domains/email-domains.d.ts.map +1 -1
  70. package/resources/messaging/email-inboxes.d.mts +8 -8
  71. package/resources/messaging/email-inboxes.d.mts.map +1 -1
  72. package/resources/messaging/email-inboxes.d.ts +8 -8
  73. package/resources/messaging/email-inboxes.d.ts.map +1 -1
  74. package/resources/messaging/preferences.d.mts +1 -1
  75. package/resources/messaging/preferences.d.mts.map +1 -1
  76. package/resources/messaging/preferences.d.ts +1 -1
  77. package/resources/messaging/preferences.d.ts.map +1 -1
  78. package/resources/operations/shipments/actions.d.mts +1 -1
  79. package/resources/operations/shipments/actions.d.mts.map +1 -1
  80. package/resources/operations/shipments/actions.d.ts +1 -1
  81. package/resources/operations/shipments/actions.d.ts.map +1 -1
  82. package/resources/sales/sales-orders/sales-orders.d.mts +4 -4
  83. package/resources/sales/sales-orders/sales-orders.d.mts.map +1 -1
  84. package/resources/sales/sales-orders/sales-orders.d.ts +4 -4
  85. package/resources/sales/sales-orders/sales-orders.d.ts.map +1 -1
  86. package/resources/sales/volume-discounts.d.mts +4 -4
  87. package/resources/sales/volume-discounts.d.mts.map +1 -1
  88. package/resources/sales/volume-discounts.d.ts +4 -4
  89. package/resources/sales/volume-discounts.d.ts.map +1 -1
  90. package/src/client.ts +17 -17
  91. package/src/core/api-promise.ts +4 -4
  92. package/src/core/error.ts +2 -2
  93. package/src/core/resource.ts +3 -3
  94. package/src/index.ts +3 -3
  95. package/src/internal/parse.ts +2 -2
  96. package/src/internal/shims.ts +1 -1
  97. package/src/internal/uploads.ts +5 -5
  98. package/src/internal/utils/base64.ts +3 -3
  99. package/src/internal/utils/log.ts +3 -3
  100. package/src/internal/utils/path.ts +2 -2
  101. package/src/internal/utils/values.ts +6 -6
  102. package/src/resources/ai/agents.ts +2 -6
  103. package/src/resources/ai/ai.ts +2 -2
  104. package/src/resources/ai/runs/runs.ts +8 -4
  105. package/src/resources/catalog/items/actions.ts +2 -2
  106. package/src/resources/core/request-logs.ts +36 -2
  107. package/src/resources/messaging/conversations/actions.ts +2 -2
  108. package/src/resources/messaging/conversations/conversations.ts +36 -2
  109. package/src/resources/messaging/email-domains/email-domains.ts +1 -1
  110. package/src/resources/messaging/email-inboxes.ts +8 -8
  111. package/src/resources/messaging/preferences.ts +10 -1
  112. package/src/resources/operations/shipments/actions.ts +1 -1
  113. package/src/resources/sales/sales-orders/sales-orders.ts +4 -4
  114. package/src/resources/sales/volume-discounts.ts +32 -4
  115. package/src/version.ts +1 -1
  116. package/version.d.mts +1 -1
  117. package/version.d.ts +1 -1
  118. package/version.js +1 -1
  119. package/version.mjs +1 -1
@@ -181,7 +181,7 @@ export interface CreateEmailInboxRequest {
181
181
  * Leaving this unset makes the agent run on every incoming message, since email
182
182
  * has no reliable @mention convention.
183
183
  */
184
- agent_trigger_policy?: string;
184
+ agent_trigger_policy?: 'mention' | 'keyword' | 'always';
185
185
 
186
186
  /**
187
187
  * Display name for the `From` header of outbound mail.
@@ -244,7 +244,7 @@ export interface EmailInbox {
244
244
  * When no policy is set the agent runs on every incoming message, since email has
245
245
  * no reliable @mention convention.
246
246
  */
247
- agent_trigger_policy: string | null;
247
+ agent_trigger_policy: 'mention' | 'keyword' | 'always' | null;
248
248
 
249
249
  /**
250
250
  * Creation timestamp.
@@ -296,7 +296,7 @@ export interface EmailInbox {
296
296
  * - `disabled`: the inbox stays provisioned and keeps its history, but inbound
297
297
  * mail is dropped without being threaded.
298
298
  */
299
- status: string;
299
+ status: 'active' | 'disabled';
300
300
 
301
301
  /**
302
302
  * Last updated timestamp.
@@ -343,7 +343,7 @@ export interface UpdateEmailInboxRequest {
343
343
  * - `disabled`: the inbox stays provisioned and keeps its history, but inbound
344
344
  * mail is dropped without being threaded.
345
345
  */
346
- status: string;
346
+ status: 'active' | 'disabled';
347
347
 
348
348
  /**
349
349
  * The agent to bind to this inbox to handle incoming mail.
@@ -369,7 +369,7 @@ export interface UpdateEmailInboxRequest {
369
369
  * While no policy has been set, the agent runs on every incoming message, since
370
370
  * email has no reliable @mention convention.
371
371
  */
372
- agent_trigger_policy?: string;
372
+ agent_trigger_policy?: 'mention' | 'keyword' | 'always';
373
373
 
374
374
  /**
375
375
  * Display name for the `From` header of outbound mail.
@@ -437,7 +437,7 @@ export interface EmailInboxCreateParams {
437
437
  * Leaving this unset makes the agent run on every incoming message, since email
438
438
  * has no reliable @mention convention.
439
439
  */
440
- agent_trigger_policy?: string;
440
+ agent_trigger_policy?: 'mention' | 'keyword' | 'always';
441
441
 
442
442
  /**
443
443
  * Body param: Display name for the `From` header of outbound mail.
@@ -478,7 +478,7 @@ export interface EmailInboxUpdateParams {
478
478
  * - `disabled`: the inbox stays provisioned and keeps its history, but inbound
479
479
  * mail is dropped without being threaded.
480
480
  */
481
- status: string;
481
+ status: 'active' | 'disabled';
482
482
 
483
483
  /**
484
484
  * Query param: Sub-objects to expand in the response. When omitted, sub-objects
@@ -511,7 +511,7 @@ export interface EmailInboxUpdateParams {
511
511
  * While no policy has been set, the agent runs on every incoming message, since
512
512
  * email has no reliable @mention convention.
513
513
  */
514
- agent_trigger_policy?: string;
514
+ agent_trigger_policy?: 'mention' | 'keyword' | 'always';
515
515
 
516
516
  /**
517
517
  * Body param: Display name for the `From` header of outbound mail.
@@ -108,7 +108,16 @@ export interface NotificationPreference {
108
108
  * A preference with no category is the user's global default, used for every
109
109
  * category they have not set a specific preference for.
110
110
  */
111
- category: string | null;
111
+ category:
112
+ | 'chat.message'
113
+ | 'chat.mention'
114
+ | 'chat.added'
115
+ | 'order.updated'
116
+ | 'agent.run_completed'
117
+ | 'agent.alert'
118
+ | 'system.broadcast'
119
+ | 'customer.registered'
120
+ | null;
112
121
 
113
122
  /**
114
123
  * Creation timestamp.
@@ -234,7 +234,7 @@ export interface RateShopResult {
234
234
  * replaced every option's carrier rate.
235
235
  * - `none`: standard carrier rates apply with no exemption.
236
236
  */
237
- exemption_type: string | null;
237
+ exemption_type: 'freight_exempt' | 'minimum_order_met' | 'flat_rate' | 'none' | null;
238
238
 
239
239
  /**
240
240
  * Flat shipping amount applied to the options.
@@ -407,7 +407,7 @@ export interface CreateSalesOrderRequest {
407
407
  /**
408
408
  * Fulfillment priority used to rank the order on the shop floor.
409
409
  */
410
- priority_code: string;
410
+ priority_code: 'low' | 'normal' | 'high';
411
411
 
412
412
  /**
413
413
  * Ship-to address ID.
@@ -1570,7 +1570,7 @@ export interface UpdateSalesOrderRequest {
1570
1570
  /**
1571
1571
  * New fulfillment priority for the order.
1572
1572
  */
1573
- priority_code?: string;
1573
+ priority_code?: 'low' | 'normal' | 'high';
1574
1574
 
1575
1575
  /**
1576
1576
  * Date delivery is promised to the customer.
@@ -1839,7 +1839,7 @@ export interface SalesOrderCreateParams {
1839
1839
  /**
1840
1840
  * Body param: Fulfillment priority used to rank the order on the shop floor.
1841
1841
  */
1842
- priority_code: string;
1842
+ priority_code: 'low' | 'normal' | 'high';
1843
1843
 
1844
1844
  /**
1845
1845
  * Body param: Ship-to address ID.
@@ -2131,7 +2131,7 @@ export interface SalesOrderUpdateParams {
2131
2131
  /**
2132
2132
  * Body param: New fulfillment priority for the order.
2133
2133
  */
2134
- priority_code?: string;
2134
+ priority_code?: 'low' | 'normal' | 'high';
2135
2135
 
2136
2136
  /**
2137
2137
  * Body param: Date delivery is promised to the customer.
@@ -609,7 +609,14 @@ export interface VolumeDiscountListParams {
609
609
  * Sub-objects to expand in the response. When omitted, sub-objects are returned as
610
610
  * `null`.
611
611
  */
612
- include?: Array<'customer_groups' | 'product_lines' | 'categories' | 'attributes' | 'acceptable_units'>;
612
+ include?: Array<
613
+ | 'customer_groups'
614
+ | 'product_lines'
615
+ | 'categories'
616
+ | 'categories.properties'
617
+ | 'attributes'
618
+ | 'acceptable_units'
619
+ >;
613
620
 
614
621
  /**
615
622
  * Maximum number of results to return in a single page.
@@ -629,7 +636,14 @@ export interface VolumeDiscountRetrieveParams {
629
636
  * Sub-objects to expand in the response. When omitted, sub-objects are returned as
630
637
  * `null`.
631
638
  */
632
- include?: Array<'customer_groups' | 'product_lines' | 'categories' | 'attributes' | 'acceptable_units'>;
639
+ include?: Array<
640
+ | 'customer_groups'
641
+ | 'product_lines'
642
+ | 'categories'
643
+ | 'categories.properties'
644
+ | 'attributes'
645
+ | 'acceptable_units'
646
+ >;
633
647
  }
634
648
 
635
649
  export interface VolumeDiscountCreateParams {
@@ -649,7 +663,14 @@ export interface VolumeDiscountCreateParams {
649
663
  * Query param: Sub-objects to expand in the response. When omitted, sub-objects
650
664
  * are returned as `null`.
651
665
  */
652
- include?: Array<'customer_groups' | 'product_lines' | 'categories' | 'attributes' | 'acceptable_units'>;
666
+ include?: Array<
667
+ | 'customer_groups'
668
+ | 'product_lines'
669
+ | 'categories'
670
+ | 'categories.properties'
671
+ | 'attributes'
672
+ | 'acceptable_units'
673
+ >;
653
674
 
654
675
  /**
655
676
  * Body param: Attribute IDs to scope the discount to.
@@ -734,7 +755,14 @@ export interface VolumeDiscountUpdateParams {
734
755
  * Query param: Sub-objects to expand in the response. When omitted, sub-objects
735
756
  * are returned as `null`.
736
757
  */
737
- include?: Array<'customer_groups' | 'product_lines' | 'categories' | 'attributes' | 'acceptable_units'>;
758
+ include?: Array<
759
+ | 'customer_groups'
760
+ | 'product_lines'
761
+ | 'categories'
762
+ | 'categories.properties'
763
+ | 'attributes'
764
+ | 'acceptable_units'
765
+ >;
738
766
 
739
767
  /**
740
768
  * Body param: Attribute IDs to set.
package/src/version.ts CHANGED
@@ -1 +1 @@
1
- export const VERSION = '0.19.4'; // x-release-please-version
1
+ export const VERSION = '0.19.6'; // x-release-please-version
package/version.d.mts CHANGED
@@ -1,2 +1,2 @@
1
- export declare const VERSION = "0.19.4";
1
+ export declare const VERSION = "0.19.6";
2
2
  //# sourceMappingURL=version.d.mts.map
package/version.d.ts CHANGED
@@ -1,2 +1,2 @@
1
- export declare const VERSION = "0.19.4";
1
+ export declare const VERSION = "0.19.6";
2
2
  //# sourceMappingURL=version.d.ts.map
package/version.js CHANGED
@@ -1,5 +1,5 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.VERSION = void 0;
4
- exports.VERSION = '0.19.4'; // x-release-please-version
4
+ exports.VERSION = '0.19.6'; // x-release-please-version
5
5
  //# sourceMappingURL=version.js.map
package/version.mjs CHANGED
@@ -1,2 +1,2 @@
1
- export const VERSION = '0.19.4'; // x-release-please-version
1
+ export const VERSION = '0.19.6'; // x-release-please-version
2
2
  //# sourceMappingURL=version.mjs.map