@epilot/sdk 2.20.59 → 2.20.61

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 (149) hide show
  1. package/definitions/app.json +203 -5
  2. package/definitions/email-settings.json +9 -3
  3. package/definitions/external-values.json +50 -6
  4. package/dist/apis/access-token.cjs +6 -6
  5. package/dist/apis/access-token.js +1 -1
  6. package/dist/apis/address-suggestions.cjs +6 -6
  7. package/dist/apis/address-suggestions.js +1 -1
  8. package/dist/apis/address.cjs +6 -6
  9. package/dist/apis/address.js +1 -1
  10. package/dist/apis/ai-agents.cjs +6 -6
  11. package/dist/apis/ai-agents.js +1 -1
  12. package/dist/apis/app.cjs +6 -6
  13. package/dist/apis/app.d.cts +2 -2
  14. package/dist/apis/app.d.ts +2 -2
  15. package/dist/apis/app.js +1 -1
  16. package/dist/apis/audit-logs.cjs +6 -6
  17. package/dist/apis/audit-logs.js +1 -1
  18. package/dist/apis/automation.cjs +6 -6
  19. package/dist/apis/automation.js +1 -1
  20. package/dist/apis/billing.cjs +6 -6
  21. package/dist/apis/billing.js +1 -1
  22. package/dist/apis/blueprint-manifest.cjs +6 -6
  23. package/dist/apis/blueprint-manifest.js +1 -1
  24. package/dist/apis/calendar.cjs +6 -6
  25. package/dist/apis/calendar.js +1 -1
  26. package/dist/apis/chat.cjs +6 -6
  27. package/dist/apis/chat.js +1 -1
  28. package/dist/apis/configuration-hub.cjs +6 -6
  29. package/dist/apis/configuration-hub.js +1 -1
  30. package/dist/apis/consent.cjs +6 -6
  31. package/dist/apis/consent.js +1 -1
  32. package/dist/apis/customer-portal.cjs +6 -6
  33. package/dist/apis/customer-portal.js +1 -1
  34. package/dist/apis/dashboard.cjs +6 -6
  35. package/dist/apis/dashboard.js +1 -1
  36. package/dist/apis/data-governance.cjs +6 -6
  37. package/dist/apis/data-governance.js +1 -1
  38. package/dist/apis/deduplication.cjs +6 -6
  39. package/dist/apis/deduplication.js +1 -1
  40. package/dist/apis/design.cjs +6 -6
  41. package/dist/apis/design.js +1 -1
  42. package/dist/apis/document.cjs +6 -6
  43. package/dist/apis/document.js +1 -1
  44. package/dist/apis/email-settings.cjs +6 -6
  45. package/dist/apis/email-settings.d.cts +2 -2
  46. package/dist/apis/email-settings.d.ts +2 -2
  47. package/dist/apis/email-settings.js +1 -1
  48. package/dist/apis/email-template.cjs +6 -6
  49. package/dist/apis/email-template.js +1 -1
  50. package/dist/apis/entity-mapping.cjs +6 -6
  51. package/dist/apis/entity-mapping.js +1 -1
  52. package/dist/apis/entity.cjs +6 -6
  53. package/dist/apis/entity.js +1 -1
  54. package/dist/apis/environments.cjs +6 -6
  55. package/dist/apis/environments.js +1 -1
  56. package/dist/apis/event-catalog.cjs +6 -6
  57. package/dist/apis/event-catalog.js +1 -1
  58. package/dist/apis/external-values.cjs +6 -6
  59. package/dist/apis/external-values.d.cts +2 -2
  60. package/dist/apis/external-values.d.ts +2 -2
  61. package/dist/apis/external-values.js +1 -1
  62. package/dist/apis/file.cjs +6 -6
  63. package/dist/apis/file.js +1 -1
  64. package/dist/apis/iban.cjs +6 -6
  65. package/dist/apis/iban.js +1 -1
  66. package/dist/apis/identity.cjs +6 -6
  67. package/dist/apis/identity.js +1 -1
  68. package/dist/apis/integration-toolkit.cjs +6 -6
  69. package/dist/apis/integration-toolkit.js +1 -1
  70. package/dist/apis/journey.cjs +6 -6
  71. package/dist/apis/journey.js +1 -1
  72. package/dist/apis/kanban.cjs +6 -6
  73. package/dist/apis/kanban.js +1 -1
  74. package/dist/apis/message.cjs +6 -6
  75. package/dist/apis/message.js +1 -1
  76. package/dist/apis/metering.cjs +6 -6
  77. package/dist/apis/metering.js +1 -1
  78. package/dist/apis/notes.cjs +6 -6
  79. package/dist/apis/notes.js +1 -1
  80. package/dist/apis/notification.cjs +6 -6
  81. package/dist/apis/notification.js +1 -1
  82. package/dist/apis/organization.cjs +6 -6
  83. package/dist/apis/organization.js +1 -1
  84. package/dist/apis/partner-directory.cjs +6 -6
  85. package/dist/apis/partner-directory.js +1 -1
  86. package/dist/apis/permissions.cjs +6 -6
  87. package/dist/apis/permissions.js +1 -1
  88. package/dist/apis/phone-integration.cjs +6 -6
  89. package/dist/apis/phone-integration.js +1 -1
  90. package/dist/apis/pricing-tier.cjs +6 -6
  91. package/dist/apis/pricing-tier.js +1 -1
  92. package/dist/apis/pricing.cjs +6 -6
  93. package/dist/apis/pricing.js +1 -1
  94. package/dist/apis/purpose.cjs +6 -6
  95. package/dist/apis/purpose.js +1 -1
  96. package/dist/apis/query.cjs +6 -6
  97. package/dist/apis/query.js +1 -1
  98. package/dist/apis/sandbox.cjs +6 -6
  99. package/dist/apis/sandbox.js +1 -1
  100. package/dist/apis/sharing.cjs +6 -6
  101. package/dist/apis/sharing.js +1 -1
  102. package/dist/apis/snapshot.cjs +6 -6
  103. package/dist/apis/snapshot.js +1 -1
  104. package/dist/apis/submission.cjs +6 -6
  105. package/dist/apis/submission.js +1 -1
  106. package/dist/apis/target.cjs +6 -6
  107. package/dist/apis/target.js +1 -1
  108. package/dist/apis/targeting.cjs +6 -6
  109. package/dist/apis/targeting.js +1 -1
  110. package/dist/apis/template-variables.cjs +6 -6
  111. package/dist/apis/template-variables.js +1 -1
  112. package/dist/apis/user.cjs +6 -6
  113. package/dist/apis/user.js +1 -1
  114. package/dist/apis/validation-rules.cjs +6 -6
  115. package/dist/apis/validation-rules.js +1 -1
  116. package/dist/apis/webhooks.cjs +6 -6
  117. package/dist/apis/webhooks.js +1 -1
  118. package/dist/apis/workflow-definition.cjs +6 -6
  119. package/dist/apis/workflow-definition.js +1 -1
  120. package/dist/apis/workflow.cjs +6 -6
  121. package/dist/apis/workflow.js +1 -1
  122. package/dist/app-R2RDF74T.js +7 -0
  123. package/dist/app-YIP3MOGW.cjs +7 -0
  124. package/dist/{app.d-CqXqNLxq.d.cts → app.d-DbOr4uIC.d.cts} +34 -6
  125. package/dist/{app.d-CqXqNLxq.d.ts → app.d-DbOr4uIC.d.ts} +34 -6
  126. package/dist/{chunk-FPQK7U3P.cjs → chunk-6LYUL3EY.cjs} +4 -4
  127. package/dist/{chunk-WPDKRU5K.js → chunk-OEDN6Y5U.js} +4 -4
  128. package/dist/{email-settings-U753HXGA.js → email-settings-DGZKA6CU.js} +1 -1
  129. package/dist/{email-settings-SEGEKVMF.cjs → email-settings-GE5ST3L2.cjs} +3 -3
  130. package/dist/{email-settings-QGCIUWLC.js → email-settings-UYAH3BWW.js} +3 -3
  131. package/dist/{email-settings-Z5EBAELW.cjs → email-settings-VGU7323R.cjs} +1 -1
  132. package/dist/{email-settings.d-DViLYaOl.d.cts → email-settings.d-DX_nzlZk.d.cts} +6 -3
  133. package/dist/{email-settings.d-DViLYaOl.d.ts → email-settings.d-DX_nzlZk.d.ts} +6 -3
  134. package/dist/external-values-7BS76RVR.js +7 -0
  135. package/dist/external-values-R2XB2ALG.cjs +7 -0
  136. package/dist/{external-values.d-DjP9C_-r.d.cts → external-values.d-23q55J5P.d.cts} +74 -20
  137. package/dist/{external-values.d-DjP9C_-r.d.ts → external-values.d-23q55J5P.d.ts} +74 -20
  138. package/dist/index.cjs +8 -8
  139. package/dist/index.d.cts +3 -3
  140. package/dist/index.d.ts +3 -3
  141. package/dist/index.js +1 -1
  142. package/docs/app.md +35 -1
  143. package/docs/email-settings.md +2 -2
  144. package/docs/external-values.md +57 -10
  145. package/package.json +1 -1
  146. package/dist/app-B3TAEVS4.js +0 -7
  147. package/dist/app-C5H6RLZ5.cjs +0 -7
  148. package/dist/external-values-DALDMPMB.js +0 -7
  149. package/dist/external-values-XG5LFKZQ.cjs +0 -7
@@ -13,6 +13,38 @@ declare namespace Components {
13
13
  HookId?: Parameters.HookId /* ^[a-zA-Z0-9_-]{1,100}$ */;
14
14
  }
15
15
  namespace Schemas {
16
+ /**
17
+ * Something a hook needs the consumer to supply in `context`, discriminated by `type`.
18
+ * Today only `entity`; more types will follow. Consumers ignore types they do not know.
19
+ *
20
+ */
21
+ export type ContextRequirement = /**
22
+ * Something a hook needs the consumer to supply in `context`, discriminated by `type`.
23
+ * Today only `entity`; more types will follow. Consumers ignore types they do not know.
24
+ *
25
+ */
26
+ /**
27
+ * The consumer supplies the bound entities of `schema` under `Context.<schema>`, e.g. a hook
28
+ * interpolating `{{ Context.contract[0].external_id }}` declares
29
+ * `{ type: entity, schema: contract }`.
30
+ *
31
+ */
32
+ EntityContextRequirement;
33
+ /**
34
+ * The consumer supplies the bound entities of `schema` under `Context.<schema>`, e.g. a hook
35
+ * interpolating `{{ Context.contract[0].external_id }}` declares
36
+ * `{ type: entity, schema: contract }`.
37
+ *
38
+ */
39
+ export interface EntityContextRequirement {
40
+ type: "entity";
41
+ /**
42
+ * Entity schema slug, e.g. `contract`.
43
+ * example:
44
+ * contract
45
+ */
46
+ schema: string;
47
+ }
16
48
  export interface ExternalValueError {
17
49
  /**
18
50
  * Set for per-result errors; absent for hook-level failures
@@ -48,6 +80,19 @@ declare namespace Components {
48
80
  name: TranslatedString;
49
81
  description?: TranslatedString;
50
82
  results: ExternalValueResultSummary[];
83
+ /**
84
+ * What the hook needs the consumer to supply in `context`, as declared in the hook
85
+ * config. Omitted when the hook declares none. A rule builder must require these
86
+ * contexts on any rule that uses the hook, so the caller passes them in `context`.
87
+ * More requirement types will follow; consumers ignore types they do not know.
88
+ *
89
+ */
90
+ contexts?: /**
91
+ * Something a hook needs the consumer to supply in `context`, discriminated by `type`.
92
+ * Today only `entity`; more types will follow. Consumers ignore types they do not know.
93
+ *
94
+ */
95
+ ContextRequirement[];
51
96
  }
52
97
  export interface ExternalValueResultSummary {
53
98
  id: string;
@@ -59,11 +104,13 @@ declare namespace Components {
59
104
  * example:
60
105
  * {
61
106
  * "context": {
62
- * "input": "123,45",
63
- * "contract": {
64
- * "_id": "8a7e3f5e-9c0c-4c74-8d4a-1a1a1a1a1a1a",
65
- * "installment_amount": 110
66
- * }
107
+ * "contract": [
108
+ * {
109
+ * "_id": "8a7e3f5e-9c0c-4c74-8d4a-1a1a1a1a1a1a",
110
+ * "external_id": "C-1001",
111
+ * "installment_amount": 110
112
+ * }
113
+ * ]
67
114
  * },
68
115
  * "consumer": {
69
116
  * "type": "validation_rule",
@@ -75,11 +122,12 @@ declare namespace Components {
75
122
  /**
76
123
  * Everything the consumer supplies for interpolation, as one name → value map.
77
124
  * Exposed to the hook's Liquid templates as `Context` / `context`, e.g.
78
- * `{{ context.input }}`, `{{ context.contract.installment_amount }}`.
125
+ * `{{ context.contract[0].external_id }}`.
79
126
  *
80
- * The names are up to the consumer; this API does not interpret them. By
81
- * convention the journey runtime passes the validated value of a validation
82
- * rule as `input` and every configured context binding under its own name.
127
+ * One entry per context requirement the consumer bound (see
128
+ * `ExternalValueHookSummary.contexts`): for an `entity` requirement, the bound
129
+ * entities of that schema under its schema slug. This API gives no name special
130
+ * treatment.
83
131
  *
84
132
  */
85
133
  context: {
@@ -165,11 +213,13 @@ declare namespace Paths {
165
213
  * example:
166
214
  * {
167
215
  * "context": {
168
- * "input": "123,45",
169
- * "contract": {
170
- * "_id": "8a7e3f5e-9c0c-4c74-8d4a-1a1a1a1a1a1a",
171
- * "installment_amount": 110
172
- * }
216
+ * "contract": [
217
+ * {
218
+ * "_id": "8a7e3f5e-9c0c-4c74-8d4a-1a1a1a1a1a1a",
219
+ * "external_id": "C-1001",
220
+ * "installment_amount": 110
221
+ * }
222
+ * ]
173
223
  * },
174
224
  * "consumer": {
175
225
  * "type": "validation_rule",
@@ -217,11 +267,13 @@ declare namespace Paths {
217
267
  * example:
218
268
  * {
219
269
  * "context": {
220
- * "input": "123,45",
221
- * "contract": {
222
- * "_id": "8a7e3f5e-9c0c-4c74-8d4a-1a1a1a1a1a1a",
223
- * "installment_amount": 110
224
- * }
270
+ * "contract": [
271
+ * {
272
+ * "_id": "8a7e3f5e-9c0c-4c74-8d4a-1a1a1a1a1a1a",
273
+ * "external_id": "C-1001",
274
+ * "installment_amount": 110
275
+ * }
276
+ * ]
225
277
  * },
226
278
  * "consumer": {
227
279
  * "type": "validation_rule",
@@ -378,6 +430,8 @@ interface PathsDictionary {
378
430
  type Client = OpenAPIClient<OperationMethods, PathsDictionary>
379
431
 
380
432
 
433
+ type ContextRequirement = Components.Schemas.ContextRequirement;
434
+ type EntityContextRequirement = Components.Schemas.EntityContextRequirement;
381
435
  type ExternalValueError = Components.Schemas.ExternalValueError;
382
436
  type ExternalValueErrorCode = Components.Schemas.ExternalValueErrorCode;
383
437
  type ExternalValueHookList = Components.Schemas.ExternalValueHookList;
@@ -388,4 +442,4 @@ type ResolveExternalValueRequest = Components.Schemas.ResolveExternalValueReques
388
442
  type ResolveExternalValueResponse = Components.Schemas.ResolveExternalValueResponse;
389
443
  type TranslatedString = Components.Schemas.TranslatedString;
390
444
 
391
- export { type Client as C, type ExternalValueError as E, type OperationMethods as O, Paths as P, type ResolveExternalValueRequest as R, type TranslatedString as T, Components as a, type PathsDictionary as b, type ExternalValueErrorCode as c, type ExternalValueHookList as d, type ExternalValueHookSummary as e, type ExternalValueResultSummary as f, type ExternalValueType as g, type ResolveExternalValueResponse as h };
445
+ export { type Client as C, type EntityContextRequirement as E, type OperationMethods as O, Paths as P, type ResolveExternalValueRequest as R, type TranslatedString as T, Components as a, type PathsDictionary as b, type ContextRequirement as c, type ExternalValueError as d, type ExternalValueErrorCode as e, type ExternalValueHookList as f, type ExternalValueHookSummary as g, type ExternalValueResultSummary as h, type ExternalValueType as i, type ResolveExternalValueResponse as j };
package/dist/index.cjs CHANGED
@@ -170,7 +170,7 @@ var _chunkWOUASZJWcjs = require('./chunk-WOUASZJW.cjs');
170
170
 
171
171
 
172
172
 
173
- var _chunkFPQK7U3Pcjs = require('./chunk-FPQK7U3P.cjs');
173
+ var _chunk6LYUL3EYcjs = require('./chunk-6LYUL3EY.cjs');
174
174
 
175
175
 
176
176
  var _chunkNJK5F5TFcjs = require('./chunk-NJK5F5TF.cjs');
@@ -244,7 +244,7 @@ var resolveClient = (params) => {
244
244
  }
245
245
  if (!entry.instance) {
246
246
  const definition = entry.loader();
247
- entry.instance = _chunkFPQK7U3Pcjs.createApiClient.call(void 0, {
247
+ entry.instance = _chunk6LYUL3EYcjs.createApiClient.call(void 0, {
248
248
  definition,
249
249
  token: state.token,
250
250
  headers: state.globalHeaders,
@@ -277,7 +277,7 @@ var resetAllClients = (registry) => {
277
277
  };
278
278
 
279
279
  // src/apis/_registry.ts
280
- var expandDef = (mod) => _chunkFPQK7U3Pcjs.expand.call(void 0, _nullishCoalesce(mod.default, () => ( mod)));
280
+ var expandDef = (mod) => _chunk6LYUL3EYcjs.expand.call(void 0, _nullishCoalesce(mod.default, () => ( mod)));
281
281
  var registerBuiltinApis = (registry) => {
282
282
  registerApi({
283
283
  registry,
@@ -640,9 +640,9 @@ var createSDK = () => {
640
640
  const available = [...registry.keys()].join(", ");
641
641
  throw new Error(`Unknown API: "${name}". Available: ${available}`);
642
642
  }
643
- return _chunkFPQK7U3Pcjs.createApiHandle.call(void 0, {
643
+ return _chunk6LYUL3EYcjs.createApiHandle.call(void 0, {
644
644
  resolveClient: () => resolveClient({ registry, name, state }),
645
- createClient: () => _chunkFPQK7U3Pcjs.createApiClient.call(void 0, { definition: entry.loader(), apiName: name }),
645
+ createClient: () => _chunk6LYUL3EYcjs.createApiClient.call(void 0, { definition: entry.loader(), apiName: name }),
646
646
  apiName: name
647
647
  });
648
648
  };
@@ -690,9 +690,9 @@ var createSDK = () => {
690
690
  return interceptorUse;
691
691
  }
692
692
  case "help":
693
- return (apiName) => _chunkFPQK7U3Pcjs.help.call(void 0, apiName);
693
+ return (apiName) => _chunk6LYUL3EYcjs.help.call(void 0, apiName);
694
694
  case "openapi":
695
- return (apiName) => _chunkFPQK7U3Pcjs.openapi.call(void 0, apiName);
695
+ return (apiName) => _chunk6LYUL3EYcjs.openapi.call(void 0, apiName);
696
696
  case "then":
697
697
  case "catch":
698
698
  case "finally":
@@ -722,4 +722,4 @@ var epilot = createSDK();
722
722
 
723
723
 
724
724
 
725
- exports.applyLargeResponseInterceptor = applyLargeResponseInterceptor; exports.applyRetryInterceptor = applyRetryInterceptor; exports.authorize = _chunkFPQK7U3Pcjs.authorize; exports.createSDK = createSDK; exports.epilot = epilot; exports.help = _chunkFPQK7U3Pcjs.help; exports.openapi = _chunkFPQK7U3Pcjs.openapi;
725
+ exports.applyLargeResponseInterceptor = applyLargeResponseInterceptor; exports.applyRetryInterceptor = applyRetryInterceptor; exports.authorize = _chunk6LYUL3EYcjs.authorize; exports.createSDK = createSDK; exports.epilot = epilot; exports.help = _chunk6LYUL3EYcjs.help; exports.openapi = _chunk6LYUL3EYcjs.openapi;
package/dist/index.d.cts CHANGED
@@ -7,7 +7,7 @@ import { C as Client } from './access-token.d-Yy-yrft_.cjs';
7
7
  import { C as Client$1 } from './address.d-CwAPOVxa.cjs';
8
8
  import { C as Client$2 } from './address-suggestions.d-_YwTOR-9.cjs';
9
9
  import { C as Client$3 } from './ai-agents.d-B3TkP4mo.cjs';
10
- import { C as Client$4 } from './app.d-CqXqNLxq.cjs';
10
+ import { C as Client$4 } from './app.d-DbOr4uIC.cjs';
11
11
  import { C as Client$5 } from './audit-logs.d-BRToFqeX.cjs';
12
12
  import { C as Client$6 } from './automation.d-B8g3nYp-.cjs';
13
13
  import { C as Client$7 } from './billing.d-DA3sViEF.cjs';
@@ -22,13 +22,13 @@ import { C as Client$f } from './data-governance.d-BbZ466j5.cjs';
22
22
  import { C as Client$g } from './deduplication.d-Cueh8bDD.cjs';
23
23
  import { C as Client$h } from './design.d-CYHbiaq_.cjs';
24
24
  import { C as Client$i } from './document.d-B0zC-R8x.cjs';
25
- import { C as Client$j } from './email-settings.d-DViLYaOl.cjs';
25
+ import { C as Client$j } from './email-settings.d-DX_nzlZk.cjs';
26
26
  import { C as Client$k } from './email-template.d-gtQkdaXM.cjs';
27
27
  import { C as Client$l } from './entity.d-BwsBk0Po.cjs';
28
28
  import { C as Client$m } from './entity-mapping.d-8MtWa2_L.cjs';
29
29
  import { C as Client$n } from './environments.d-qL1urwAq.cjs';
30
30
  import { C as Client$o } from './event-catalog.d-BrAxYS9D.cjs';
31
- import { C as Client$p } from './external-values.d-DjP9C_-r.cjs';
31
+ import { C as Client$p } from './external-values.d-23q55J5P.cjs';
32
32
  import { C as Client$q } from './file.d-DELNV63w.cjs';
33
33
  import { C as Client$r } from './iban.d-BwdiGbxi.cjs';
34
34
  import { C as Client$s } from './identity.d-BBL0NI_O.cjs';
package/dist/index.d.ts CHANGED
@@ -7,7 +7,7 @@ import { C as Client } from './access-token.d-Yy-yrft_.js';
7
7
  import { C as Client$1 } from './address.d-CwAPOVxa.js';
8
8
  import { C as Client$2 } from './address-suggestions.d-_YwTOR-9.js';
9
9
  import { C as Client$3 } from './ai-agents.d-B3TkP4mo.js';
10
- import { C as Client$4 } from './app.d-CqXqNLxq.js';
10
+ import { C as Client$4 } from './app.d-DbOr4uIC.js';
11
11
  import { C as Client$5 } from './audit-logs.d-BRToFqeX.js';
12
12
  import { C as Client$6 } from './automation.d-B8g3nYp-.js';
13
13
  import { C as Client$7 } from './billing.d-DA3sViEF.js';
@@ -22,13 +22,13 @@ import { C as Client$f } from './data-governance.d-BbZ466j5.js';
22
22
  import { C as Client$g } from './deduplication.d-Cueh8bDD.js';
23
23
  import { C as Client$h } from './design.d-CYHbiaq_.js';
24
24
  import { C as Client$i } from './document.d-B0zC-R8x.js';
25
- import { C as Client$j } from './email-settings.d-DViLYaOl.js';
25
+ import { C as Client$j } from './email-settings.d-DX_nzlZk.js';
26
26
  import { C as Client$k } from './email-template.d-gtQkdaXM.js';
27
27
  import { C as Client$l } from './entity.d-BwsBk0Po.js';
28
28
  import { C as Client$m } from './entity-mapping.d-8MtWa2_L.js';
29
29
  import { C as Client$n } from './environments.d-qL1urwAq.js';
30
30
  import { C as Client$o } from './event-catalog.d-BrAxYS9D.js';
31
- import { C as Client$p } from './external-values.d-DjP9C_-r.js';
31
+ import { C as Client$p } from './external-values.d-23q55J5P.js';
32
32
  import { C as Client$q } from './file.d-DELNV63w.js';
33
33
  import { C as Client$r } from './iban.d-BwdiGbxi.js';
34
34
  import { C as Client$s } from './identity.d-BBL0NI_O.js';
package/dist/index.js CHANGED
@@ -170,7 +170,7 @@ import {
170
170
  expand,
171
171
  help,
172
172
  openapi
173
- } from "./chunk-WPDKRU5K.js";
173
+ } from "./chunk-OEDN6Y5U.js";
174
174
  import {
175
175
  __require
176
176
  } from "./chunk-YPSWSI3M.js";
package/docs/app.md CHANGED
@@ -136,6 +136,8 @@ const { data } = await appClient.getPublicFacingComponent(...)
136
136
  - [`ApiProxyConfig`](#apiproxyconfig)
137
137
  - [`ExternalValuesConfig`](#externalvaluesconfig)
138
138
  - [`ExternalValuesHook`](#externalvalueshook)
139
+ - [`ContextRequirement`](#contextrequirement)
140
+ - [`EntityContextRequirement`](#entitycontextrequirement)
139
141
  - [`ExternalValuesResult`](#externalvaluesresult)
140
142
  - [`Grants`](#grants)
141
143
  - [`BlueprintRef`](#blueprintref)
@@ -2268,6 +2270,7 @@ type ExternalValuesComponent = {
2268
2270
  result: { ... }
2269
2271
  timeout_ms?: { ... }
2270
2272
  on_unavailable?: { ... }
2273
+ contexts?: { ... }
2271
2274
  cache?: { ... }
2272
2275
  secure_proxy?: { ... }
2273
2276
  }>
@@ -3793,6 +3796,10 @@ type ExternalValuesConfig = {
3793
3796
  }>
3794
3797
  timeout_ms?: number
3795
3798
  on_unavailable?: "skip" | "block"
3799
+ contexts?: Array<{
3800
+ type: { ... }
3801
+ schema: { ... }
3802
+ }>
3796
3803
  cache?: {
3797
3804
  ttl_seconds: { ... }
3798
3805
  key?: { ... }
@@ -3807,8 +3814,9 @@ type ExternalValuesConfig = {
3807
3814
 
3808
3815
  ### `ExternalValuesHook`
3809
3816
 
3810
- One external call that returns one or more typed results. Interpolated templates (Liquid) have access to `Input`, `Context`, `Consumer`, `Options`, `Env` and — for `result` templates — `Response` and `AuthResponse`.
3817
+ One external call that returns one or more typed results. Interpolated templates (Liquid) have access to `Context`, `Consumer`, `Options`, `Env` and — for `result` templates — `Response` and `AuthResponse` (each is also available snake_case, e.g. `{{ context.contract }}`).
3811
3818
 
3819
+ `Context` is the name → v
3812
3820
 
3813
3821
  ```ts
3814
3822
  type ExternalValuesHook = {
@@ -3855,6 +3863,10 @@ type ExternalValuesHook = {
3855
3863
  }>
3856
3864
  timeout_ms?: number
3857
3865
  on_unavailable?: "skip" | "block"
3866
+ contexts?: Array<{
3867
+ type: "entity"
3868
+ schema: string
3869
+ }>
3858
3870
  cache?: {
3859
3871
  ttl_seconds: number
3860
3872
  key?: string
@@ -3866,6 +3878,28 @@ type ExternalValuesHook = {
3866
3878
  }
3867
3879
  ```
3868
3880
 
3881
+ ### `ContextRequirement`
3882
+
3883
+ A requirement a hook reads from `Context`, discriminated by `type`. More types will be added later; consumers must ignore types they do not know.
3884
+
3885
+ ```ts
3886
+ type ContextRequirement = {
3887
+ type: "entity"
3888
+ schema: string
3889
+ }
3890
+ ```
3891
+
3892
+ ### `EntityContextRequirement`
3893
+
3894
+ The consumer supplies the bound entities of `schema` under `Context.`<schema>``.
3895
+
3896
+ ```ts
3897
+ type EntityContextRequirement = {
3898
+ type: "entity"
3899
+ schema: string
3900
+ }
3901
+ ```
3902
+
3869
3903
  ### `ExternalValuesResult`
3870
3904
 
3871
3905
  A single typed value extracted from the hook response. Exactly one of `template`, `path` or `jsonata` must be set.
@@ -1801,7 +1801,7 @@ type ConnectOutlookRequest = {
1801
1801
  type MailboxSyncStatus = {
1802
1802
  execution_id: string
1803
1803
  status: "RUNNING" | "COMPLETED" | "COMPLETED_WITH_ERRORS" | "FAILED" | "CANCELLED"
1804
- timeframe: "5m" | "1w" | "2w" | "1m"
1804
+ timeframe: "5m" | "1w" | "2w" | "1m" | "3m" | "6m" | "1y"
1805
1805
  started_at: string // date-time
1806
1806
  completed_at?: string // date-time
1807
1807
  inbox?: {
@@ -1834,7 +1834,7 @@ type MailboxSyncFolderStatuses = "PENDING" | "RUNNING" | "COMPLETED" | "FAILED"
1834
1834
  ### `MailboxSyncTimeframePeriods`
1835
1835
 
1836
1836
  ```ts
1837
- type MailboxSyncTimeframePeriods = "5m" | "1w" | "2w" | "1m"
1837
+ type MailboxSyncTimeframePeriods = "5m" | "1w" | "2w" | "1m" | "3m" | "6m" | "1y"
1838
1838
  ```
1839
1839
 
1840
1840
  ### `InboxBucketResponse`
@@ -38,6 +38,8 @@ const { data } = await externalValuesClient.listExternalValues(...)
38
38
  - [`ResolveExternalValueResponse`](#resolveexternalvalueresponse)
39
39
  - [`ExternalValueResultSummary`](#externalvalueresultsummary)
40
40
  - [`ExternalValueHookSummary`](#externalvaluehooksummary)
41
+ - [`ContextRequirement`](#contextrequirement)
42
+ - [`EntityContextRequirement`](#entitycontextrequirement)
41
43
  - [`ExternalValueHookList`](#externalvaluehooklist)
42
44
 
43
45
  ### `listExternalValues`
@@ -78,6 +80,12 @@ const { data } = await client.listExternalValues()
78
80
  "en": "string"
79
81
  }
80
82
  }
83
+ ],
84
+ "contexts": [
85
+ {
86
+ "type": "entity",
87
+ "schema": "contract"
88
+ }
81
89
  ]
82
90
  }
83
91
  ]
@@ -103,11 +111,13 @@ const { data } = await client.resolveExternalValue(
103
111
  },
104
112
  {
105
113
  context: {
106
- input: '123,45',
107
- contract: {
108
- _id: '8a7e3f5e-9c0c-4c74-8d4a-1a1a1a1a1a1a',
109
- installment_amount: 110
110
- }
114
+ contract: [
115
+ {
116
+ _id: '8a7e3f5e-9c0c-4c74-8d4a-1a1a1a1a1a1a',
117
+ external_id: 'C-1001',
118
+ installment_amount: 110
119
+ }
120
+ ]
111
121
  },
112
122
  consumer: {
113
123
  type: 'validation_rule',
@@ -157,11 +167,13 @@ const { data } = await client.resolvePortalExternalValue(
157
167
  },
158
168
  {
159
169
  context: {
160
- input: '123,45',
161
- contract: {
162
- _id: '8a7e3f5e-9c0c-4c74-8d4a-1a1a1a1a1a1a',
163
- installment_amount: 110
164
- }
170
+ contract: [
171
+ {
172
+ _id: '8a7e3f5e-9c0c-4c74-8d4a-1a1a1a1a1a1a',
173
+ external_id: 'C-1001',
174
+ installment_amount: 110
175
+ }
176
+ ]
165
177
  },
166
178
  consumer: {
167
179
  type: 'validation_rule',
@@ -301,6 +313,37 @@ type ExternalValueHookSummary = {
301
313
  en?: { ... }
302
314
  }
303
315
  }>
316
+ contexts?: Array<{
317
+ type: "entity"
318
+ schema: string
319
+ }>
320
+ }
321
+ ```
322
+
323
+ ### `ContextRequirement`
324
+
325
+ Something a hook needs the consumer to supply in `context`, discriminated by `type`.
326
+ Today only `entity`; more types will follow. Consumers ignore types they do not know.
327
+
328
+
329
+ ```ts
330
+ type ContextRequirement = {
331
+ type: "entity"
332
+ schema: string
333
+ }
334
+ ```
335
+
336
+ ### `EntityContextRequirement`
337
+
338
+ The consumer supplies the bound entities of `schema` under `Context.`<schema>``, e.g. a hook
339
+ interpolating `{{ Context.contract[0].external_id }}` declares
340
+ `{ type: entity, schema: contract }`.
341
+
342
+
343
+ ```ts
344
+ type EntityContextRequirement = {
345
+ type: "entity"
346
+ schema: string
304
347
  }
305
348
  ```
306
349
 
@@ -325,6 +368,10 @@ type ExternalValueHookList = {
325
368
  type: { ... }
326
369
  name: { ... }
327
370
  }>
371
+ contexts?: Array<{
372
+ type: { ... }
373
+ schema: { ... }
374
+ }>
328
375
  }>
329
376
  }
330
377
  ```
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@epilot/sdk",
3
- "version": "2.20.59",
3
+ "version": "2.20.61",
4
4
  "description": "JavaScript/TypeScript SDK for epilot APIs",
5
5
  "type": "module",
6
6
  "main": "./dist/index.cjs",