@epilot/sdk 2.20.54 → 2.20.56

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/README.md +1 -0
  2. package/definitions/phone-integration-runtime.json +1 -0
  3. package/definitions/phone-integration.json +315 -0
  4. package/definitions/pricing.json +44 -7
  5. package/dist/README-EMWLD7LT.cjs +7 -0
  6. package/dist/README-XH3ZUZQC.js +7 -0
  7. package/dist/{_index-HL3HOTXB.js → _index-67F3SDWD.js} +3 -0
  8. package/dist/{_index-DEYTKG4Z.cjs → _index-GOK37TZ4.cjs} +4 -1
  9. package/dist/apis/access-token.cjs +6 -6
  10. package/dist/apis/access-token.js +1 -1
  11. package/dist/apis/address-suggestions.cjs +6 -6
  12. package/dist/apis/address-suggestions.js +1 -1
  13. package/dist/apis/address.cjs +6 -6
  14. package/dist/apis/address.js +1 -1
  15. package/dist/apis/ai-agents.cjs +6 -6
  16. package/dist/apis/ai-agents.js +1 -1
  17. package/dist/apis/app.cjs +6 -6
  18. package/dist/apis/app.js +1 -1
  19. package/dist/apis/audit-logs.cjs +6 -6
  20. package/dist/apis/audit-logs.js +1 -1
  21. package/dist/apis/automation.cjs +6 -6
  22. package/dist/apis/automation.js +1 -1
  23. package/dist/apis/billing.cjs +6 -6
  24. package/dist/apis/billing.js +1 -1
  25. package/dist/apis/blueprint-manifest.cjs +6 -6
  26. package/dist/apis/blueprint-manifest.js +1 -1
  27. package/dist/apis/calendar.cjs +6 -6
  28. package/dist/apis/calendar.js +1 -1
  29. package/dist/apis/chat.cjs +6 -6
  30. package/dist/apis/chat.js +1 -1
  31. package/dist/apis/configuration-hub.cjs +6 -6
  32. package/dist/apis/configuration-hub.js +1 -1
  33. package/dist/apis/consent.cjs +6 -6
  34. package/dist/apis/consent.js +1 -1
  35. package/dist/apis/customer-portal.cjs +6 -6
  36. package/dist/apis/customer-portal.js +1 -1
  37. package/dist/apis/dashboard.cjs +6 -6
  38. package/dist/apis/dashboard.js +1 -1
  39. package/dist/apis/data-governance.cjs +6 -6
  40. package/dist/apis/data-governance.js +1 -1
  41. package/dist/apis/deduplication.cjs +6 -6
  42. package/dist/apis/deduplication.js +1 -1
  43. package/dist/apis/design.cjs +6 -6
  44. package/dist/apis/design.js +1 -1
  45. package/dist/apis/document.cjs +6 -6
  46. package/dist/apis/document.js +1 -1
  47. package/dist/apis/email-settings.cjs +6 -6
  48. package/dist/apis/email-settings.js +1 -1
  49. package/dist/apis/email-template.cjs +6 -6
  50. package/dist/apis/email-template.js +1 -1
  51. package/dist/apis/entity-mapping.cjs +6 -6
  52. package/dist/apis/entity-mapping.js +1 -1
  53. package/dist/apis/entity.cjs +6 -6
  54. package/dist/apis/entity.js +1 -1
  55. package/dist/apis/environments.cjs +6 -6
  56. package/dist/apis/environments.js +1 -1
  57. package/dist/apis/event-catalog.cjs +6 -6
  58. package/dist/apis/event-catalog.js +1 -1
  59. package/dist/apis/external-values.cjs +6 -6
  60. package/dist/apis/external-values.js +1 -1
  61. package/dist/apis/file.cjs +6 -6
  62. package/dist/apis/file.js +1 -1
  63. package/dist/apis/iban.cjs +6 -6
  64. package/dist/apis/iban.js +1 -1
  65. package/dist/apis/identity.cjs +6 -6
  66. package/dist/apis/identity.js +1 -1
  67. package/dist/apis/integration-toolkit.cjs +6 -6
  68. package/dist/apis/integration-toolkit.js +1 -1
  69. package/dist/apis/journey.cjs +6 -6
  70. package/dist/apis/journey.js +1 -1
  71. package/dist/apis/kanban.cjs +6 -6
  72. package/dist/apis/kanban.js +1 -1
  73. package/dist/apis/message.cjs +6 -6
  74. package/dist/apis/message.js +1 -1
  75. package/dist/apis/metering.cjs +6 -6
  76. package/dist/apis/metering.js +1 -1
  77. package/dist/apis/notes.cjs +6 -6
  78. package/dist/apis/notes.js +1 -1
  79. package/dist/apis/notification.cjs +6 -6
  80. package/dist/apis/notification.js +1 -1
  81. package/dist/apis/organization.cjs +6 -6
  82. package/dist/apis/organization.js +1 -1
  83. package/dist/apis/partner-directory.cjs +6 -6
  84. package/dist/apis/partner-directory.js +1 -1
  85. package/dist/apis/permissions.cjs +6 -6
  86. package/dist/apis/permissions.js +1 -1
  87. package/dist/apis/phone-integration.cjs +38 -0
  88. package/dist/apis/phone-integration.d.cts +18 -0
  89. package/dist/apis/phone-integration.d.ts +18 -0
  90. package/dist/apis/phone-integration.js +38 -0
  91. package/dist/apis/pricing-tier.cjs +6 -6
  92. package/dist/apis/pricing-tier.js +1 -1
  93. package/dist/apis/pricing.cjs +6 -6
  94. package/dist/apis/pricing.d.cts +2 -2
  95. package/dist/apis/pricing.d.ts +2 -2
  96. package/dist/apis/pricing.js +1 -1
  97. package/dist/apis/purpose.cjs +6 -6
  98. package/dist/apis/purpose.js +1 -1
  99. package/dist/apis/query.cjs +6 -6
  100. package/dist/apis/query.js +1 -1
  101. package/dist/apis/sandbox.cjs +6 -6
  102. package/dist/apis/sandbox.js +1 -1
  103. package/dist/apis/sharing.cjs +6 -6
  104. package/dist/apis/sharing.js +1 -1
  105. package/dist/apis/snapshot.cjs +6 -6
  106. package/dist/apis/snapshot.js +1 -1
  107. package/dist/apis/submission.cjs +6 -6
  108. package/dist/apis/submission.js +1 -1
  109. package/dist/apis/target.cjs +6 -6
  110. package/dist/apis/target.js +1 -1
  111. package/dist/apis/targeting.cjs +6 -6
  112. package/dist/apis/targeting.js +1 -1
  113. package/dist/apis/template-variables.cjs +6 -6
  114. package/dist/apis/template-variables.js +1 -1
  115. package/dist/apis/user.cjs +6 -6
  116. package/dist/apis/user.js +1 -1
  117. package/dist/apis/validation-rules.cjs +6 -6
  118. package/dist/apis/validation-rules.js +1 -1
  119. package/dist/apis/webhooks.cjs +6 -6
  120. package/dist/apis/webhooks.js +1 -1
  121. package/dist/apis/workflow-definition.cjs +6 -6
  122. package/dist/apis/workflow-definition.js +1 -1
  123. package/dist/apis/workflow.cjs +6 -6
  124. package/dist/apis/workflow.js +1 -1
  125. package/dist/{chunk-OI4LZOVC.js → chunk-A73AZOKT.js} +5 -3
  126. package/dist/chunk-BY76NFAX.cjs +14 -0
  127. package/dist/{chunk-YJ7BKTTM.cjs → chunk-GMONLMVN.cjs} +5 -3
  128. package/dist/chunk-UFMZ4EV3.js +14 -0
  129. package/dist/index.cjs +20 -12
  130. package/dist/index.d.cts +32 -30
  131. package/dist/index.d.ts +32 -30
  132. package/dist/index.js +14 -6
  133. package/dist/phone-integration-JT2UAOGS.cjs +7 -0
  134. package/dist/phone-integration-KORLYUBG.js +7 -0
  135. package/dist/phone-integration-runtime-27B4SHA5.js +5 -0
  136. package/dist/phone-integration-runtime-DFA6NYNK.cjs +5 -0
  137. package/dist/phone-integration.d-ChHA2oGI.d.cts +179 -0
  138. package/dist/phone-integration.d-ChHA2oGI.d.ts +179 -0
  139. package/dist/pricing-MEDRTGXA.cjs +7 -0
  140. package/dist/pricing-QW23MNY3.js +7 -0
  141. package/dist/{pricing.d-CafFr1TQ.d.cts → pricing.d-DnruxGbn.d.cts} +137 -1
  142. package/dist/{pricing.d-CafFr1TQ.d.ts → pricing.d-DnruxGbn.d.ts} +137 -1
  143. package/docs/phone-integration.md +148 -0
  144. package/docs/pricing.md +1 -1
  145. package/package.json +10 -1
  146. package/dist/README-B6X6BXAW.cjs +0 -7
  147. package/dist/README-LE2VBY2Y.js +0 -7
  148. package/dist/pricing-5ZPVKMML.js +0 -7
  149. package/dist/pricing-VZXOELOD.cjs +0 -7
@@ -3607,6 +3607,49 @@ declare namespace Components {
3607
3607
  string | {
3608
3608
  [name: string]: any;
3609
3609
  }[];
3610
+ } | {
3611
+ code: "OVERRIDE_VALUE_INVALID";
3612
+ details: {
3613
+ /**
3614
+ * Where the value sits, as a dotted path of the request's own keys, with array
3615
+ * entries by index.
3616
+ *
3617
+ * example:
3618
+ * values.tiers.0.unit_amount_decimal
3619
+ */
3620
+ path: string;
3621
+ /**
3622
+ * What the value has to be, in prose.
3623
+ * example:
3624
+ * a non-empty string
3625
+ */
3626
+ expected: string;
3627
+ };
3628
+ /**
3629
+ * Error message
3630
+ */
3631
+ message: string;
3632
+ /**
3633
+ * The HTTP status code
3634
+ */
3635
+ status?: number;
3636
+ /**
3637
+ * The cause of the error (visible for bad requests - http 400)
3638
+ */
3639
+ cause?: string;
3640
+ /**
3641
+ * What went wrong. The same string as `message`, except on a request-validation
3642
+ * failure, which puts the list of validation errors here instead.
3643
+ *
3644
+ */
3645
+ error?: /**
3646
+ * What went wrong. The same string as `message`, except on a request-validation
3647
+ * failure, which puts the list of validation errors here instead.
3648
+ *
3649
+ */
3650
+ string | {
3651
+ [name: string]: any;
3652
+ }[];
3610
3653
  } | {
3611
3654
  code: "CONDITIONAL_PRICING_NOT_ENABLED";
3612
3655
  details: {
@@ -6113,6 +6156,51 @@ declare namespace Components {
6113
6156
  }[] | string | {
6114
6157
  [name: string]: any;
6115
6158
  }[];
6159
+ } | {
6160
+ code: "OVERRIDE_VALUE_INVALID";
6161
+ details: {
6162
+ /**
6163
+ * Where the value sits, as a dotted path of the request's own keys, with array
6164
+ * entries by index.
6165
+ *
6166
+ * example:
6167
+ * values.tiers.0.unit_amount_decimal
6168
+ */
6169
+ path: string;
6170
+ /**
6171
+ * What the value has to be, in prose.
6172
+ * example:
6173
+ * a non-empty string
6174
+ */
6175
+ expected: string;
6176
+ };
6177
+ /**
6178
+ * Error message
6179
+ */
6180
+ message: string;
6181
+ /**
6182
+ * The HTTP status code
6183
+ */
6184
+ status?: number;
6185
+ /**
6186
+ * The cause of the error (visible for bad requests - http 400)
6187
+ */
6188
+ cause?: string;
6189
+ /**
6190
+ * What went wrong. The same string as `message`, except on a request-validation
6191
+ * failure, which puts the list of validation errors here instead.
6192
+ *
6193
+ */
6194
+ error?: /**
6195
+ * What went wrong. The same string as `message`, except on a request-validation
6196
+ * failure, which puts the list of validation errors here instead.
6197
+ *
6198
+ */
6199
+ string | {
6200
+ [name: string]: any;
6201
+ }[] | string | {
6202
+ [name: string]: any;
6203
+ }[];
6116
6204
  } | {
6117
6205
  code: "CONDITIONAL_PRICING_NOT_ENABLED";
6118
6206
  details: {
@@ -12849,6 +12937,53 @@ declare namespace Components {
12849
12937
  }[] | string | {
12850
12938
  [name: string]: any;
12851
12939
  }[];
12940
+ } | {
12941
+ code: "OVERRIDE_VALUE_INVALID";
12942
+ details: {
12943
+ /**
12944
+ * Where the value sits, as a dotted path of the request's own keys, with array
12945
+ * entries by index.
12946
+ *
12947
+ * example:
12948
+ * values.tiers.0.unit_amount_decimal
12949
+ */
12950
+ path: string;
12951
+ /**
12952
+ * What the value has to be, in prose.
12953
+ * example:
12954
+ * a non-empty string
12955
+ */
12956
+ expected: string;
12957
+ };
12958
+ /**
12959
+ * Error message
12960
+ */
12961
+ message: string;
12962
+ /**
12963
+ * The HTTP status code
12964
+ */
12965
+ status?: number;
12966
+ /**
12967
+ * The cause of the error (visible for bad requests - http 400)
12968
+ */
12969
+ cause?: string;
12970
+ /**
12971
+ * What went wrong. The same string as `message`, except on a request-validation
12972
+ * failure, which puts the list of validation errors here instead.
12973
+ *
12974
+ */
12975
+ error?: /**
12976
+ * What went wrong. The same string as `message`, except on a request-validation
12977
+ * failure, which puts the list of validation errors here instead.
12978
+ *
12979
+ */
12980
+ string | {
12981
+ [name: string]: any;
12982
+ }[] | string | {
12983
+ [name: string]: any;
12984
+ }[] | string | {
12985
+ [name: string]: any;
12986
+ }[];
12852
12987
  } | {
12853
12988
  code: "CONDITIONAL_PRICING_NOT_ENABLED";
12854
12989
  details: {
@@ -12976,11 +13111,12 @@ declare namespace Components {
12976
13111
  * - `IDENTIFIER_INVALID` (400): an id in the request cannot be used as a storage key — empty, carrying an unsupported character, or longer than 128 characters
12977
13112
  * - `VALID_FROM_INVALID` (400): a `valid_from` is not one of the timestamp forms a version timeline can be sorted by
12978
13113
  * - `VALUE_UNSTORABLE` (400): a write carries a value the store cannot hold, such as a non-finite number or one outside the table's numeric range
13114
+ * - `OVERRIDE_VALUE_INVALID` (400): a write overrides a `currency` or `number` field, or an amount/decimal pair, with a value of the wrong type
12979
13115
  * - `CONDITIONAL_PRICING_NOT_ENABLED` (403): the organization has not opted in to Conditional Pricing
12980
13116
  * - `CONDITIONAL_PRICING_NOT_READY` (409): the organization opted in minutes ago and a variant cannot be created until its setup finishes
12981
13117
  *
12982
13118
  */
12983
- export type ConditionalPricingErrorCode = "SCHEMA_NOT_FOUND" | "ENTITY_NOT_FOUND" | "ENTITY_TYPE_MISMATCH" | "ENTITY_NOT_CONDITIONAL" | "VARIANT_NOT_FOUND" | "VERSION_NOT_FOUND" | "NO_MATCHES" | "NO_ACTIVE_VERSION" | "AMBIGUOUS_RESOLUTION" | "TUPLE_CONFLICT" | "VERSION_CONFLICT" | "CONDITION_UNDEFINED" | "VARIANT_PIN_UNDECLARED" | "OPERATOR_UNSUPPORTED" | "CONTEXT_FORMAT_INVALID" | "CONDITION_VALUE_INVALID" | "CONDITION_UNCONFIGURED" | "TOO_MANY_MATCHES" | "WRITE_CONFLICT" | "OFFSET_WINDOW_EXCEEDED" | "CURSOR_INVALID" | "VARIANT_LIMIT_REACHED" | "PIN_FORMAT_INVALID" | "VARIANT_UNPINNED" | "LAST_VERSION_UNDELETABLE" | "CONDITION_UNREADABLE" | "SORT_INVALID" | "DEFAULT_MARKER_RESERVED" | "DEFAULT_VARIANT_PINS_CONDITIONS" | "VALID_FROM_IMMUTABLE" | "VARIANT_CONDITIONS_IMMUTABLE" | "IDENTIFIER_INVALID" | "VALID_FROM_INVALID" | "VALUE_UNSTORABLE" | "CONDITIONAL_PRICING_NOT_ENABLED" | "CONDITIONAL_PRICING_NOT_READY";
13119
+ export type ConditionalPricingErrorCode = "SCHEMA_NOT_FOUND" | "ENTITY_NOT_FOUND" | "ENTITY_TYPE_MISMATCH" | "ENTITY_NOT_CONDITIONAL" | "VARIANT_NOT_FOUND" | "VERSION_NOT_FOUND" | "NO_MATCHES" | "NO_ACTIVE_VERSION" | "AMBIGUOUS_RESOLUTION" | "TUPLE_CONFLICT" | "VERSION_CONFLICT" | "CONDITION_UNDEFINED" | "VARIANT_PIN_UNDECLARED" | "OPERATOR_UNSUPPORTED" | "CONTEXT_FORMAT_INVALID" | "CONDITION_VALUE_INVALID" | "CONDITION_UNCONFIGURED" | "TOO_MANY_MATCHES" | "WRITE_CONFLICT" | "OFFSET_WINDOW_EXCEEDED" | "CURSOR_INVALID" | "VARIANT_LIMIT_REACHED" | "PIN_FORMAT_INVALID" | "VARIANT_UNPINNED" | "LAST_VERSION_UNDELETABLE" | "CONDITION_UNREADABLE" | "SORT_INVALID" | "DEFAULT_MARKER_RESERVED" | "DEFAULT_VARIANT_PINS_CONDITIONS" | "VALID_FROM_IMMUTABLE" | "VARIANT_CONDITIONS_IMMUTABLE" | "IDENTIFIER_INVALID" | "VALID_FROM_INVALID" | "VALUE_UNSTORABLE" | "OVERRIDE_VALUE_INVALID" | "CONDITIONAL_PRICING_NOT_ENABLED" | "CONDITIONAL_PRICING_NOT_READY";
12984
13120
  export interface ConditionalPricingOptIn {
12985
13121
  /**
12986
13122
  * - `PROVISIONING`: the organization's search collection is still being set up, and
@@ -3607,6 +3607,49 @@ declare namespace Components {
3607
3607
  string | {
3608
3608
  [name: string]: any;
3609
3609
  }[];
3610
+ } | {
3611
+ code: "OVERRIDE_VALUE_INVALID";
3612
+ details: {
3613
+ /**
3614
+ * Where the value sits, as a dotted path of the request's own keys, with array
3615
+ * entries by index.
3616
+ *
3617
+ * example:
3618
+ * values.tiers.0.unit_amount_decimal
3619
+ */
3620
+ path: string;
3621
+ /**
3622
+ * What the value has to be, in prose.
3623
+ * example:
3624
+ * a non-empty string
3625
+ */
3626
+ expected: string;
3627
+ };
3628
+ /**
3629
+ * Error message
3630
+ */
3631
+ message: string;
3632
+ /**
3633
+ * The HTTP status code
3634
+ */
3635
+ status?: number;
3636
+ /**
3637
+ * The cause of the error (visible for bad requests - http 400)
3638
+ */
3639
+ cause?: string;
3640
+ /**
3641
+ * What went wrong. The same string as `message`, except on a request-validation
3642
+ * failure, which puts the list of validation errors here instead.
3643
+ *
3644
+ */
3645
+ error?: /**
3646
+ * What went wrong. The same string as `message`, except on a request-validation
3647
+ * failure, which puts the list of validation errors here instead.
3648
+ *
3649
+ */
3650
+ string | {
3651
+ [name: string]: any;
3652
+ }[];
3610
3653
  } | {
3611
3654
  code: "CONDITIONAL_PRICING_NOT_ENABLED";
3612
3655
  details: {
@@ -6113,6 +6156,51 @@ declare namespace Components {
6113
6156
  }[] | string | {
6114
6157
  [name: string]: any;
6115
6158
  }[];
6159
+ } | {
6160
+ code: "OVERRIDE_VALUE_INVALID";
6161
+ details: {
6162
+ /**
6163
+ * Where the value sits, as a dotted path of the request's own keys, with array
6164
+ * entries by index.
6165
+ *
6166
+ * example:
6167
+ * values.tiers.0.unit_amount_decimal
6168
+ */
6169
+ path: string;
6170
+ /**
6171
+ * What the value has to be, in prose.
6172
+ * example:
6173
+ * a non-empty string
6174
+ */
6175
+ expected: string;
6176
+ };
6177
+ /**
6178
+ * Error message
6179
+ */
6180
+ message: string;
6181
+ /**
6182
+ * The HTTP status code
6183
+ */
6184
+ status?: number;
6185
+ /**
6186
+ * The cause of the error (visible for bad requests - http 400)
6187
+ */
6188
+ cause?: string;
6189
+ /**
6190
+ * What went wrong. The same string as `message`, except on a request-validation
6191
+ * failure, which puts the list of validation errors here instead.
6192
+ *
6193
+ */
6194
+ error?: /**
6195
+ * What went wrong. The same string as `message`, except on a request-validation
6196
+ * failure, which puts the list of validation errors here instead.
6197
+ *
6198
+ */
6199
+ string | {
6200
+ [name: string]: any;
6201
+ }[] | string | {
6202
+ [name: string]: any;
6203
+ }[];
6116
6204
  } | {
6117
6205
  code: "CONDITIONAL_PRICING_NOT_ENABLED";
6118
6206
  details: {
@@ -12849,6 +12937,53 @@ declare namespace Components {
12849
12937
  }[] | string | {
12850
12938
  [name: string]: any;
12851
12939
  }[];
12940
+ } | {
12941
+ code: "OVERRIDE_VALUE_INVALID";
12942
+ details: {
12943
+ /**
12944
+ * Where the value sits, as a dotted path of the request's own keys, with array
12945
+ * entries by index.
12946
+ *
12947
+ * example:
12948
+ * values.tiers.0.unit_amount_decimal
12949
+ */
12950
+ path: string;
12951
+ /**
12952
+ * What the value has to be, in prose.
12953
+ * example:
12954
+ * a non-empty string
12955
+ */
12956
+ expected: string;
12957
+ };
12958
+ /**
12959
+ * Error message
12960
+ */
12961
+ message: string;
12962
+ /**
12963
+ * The HTTP status code
12964
+ */
12965
+ status?: number;
12966
+ /**
12967
+ * The cause of the error (visible for bad requests - http 400)
12968
+ */
12969
+ cause?: string;
12970
+ /**
12971
+ * What went wrong. The same string as `message`, except on a request-validation
12972
+ * failure, which puts the list of validation errors here instead.
12973
+ *
12974
+ */
12975
+ error?: /**
12976
+ * What went wrong. The same string as `message`, except on a request-validation
12977
+ * failure, which puts the list of validation errors here instead.
12978
+ *
12979
+ */
12980
+ string | {
12981
+ [name: string]: any;
12982
+ }[] | string | {
12983
+ [name: string]: any;
12984
+ }[] | string | {
12985
+ [name: string]: any;
12986
+ }[];
12852
12987
  } | {
12853
12988
  code: "CONDITIONAL_PRICING_NOT_ENABLED";
12854
12989
  details: {
@@ -12976,11 +13111,12 @@ declare namespace Components {
12976
13111
  * - `IDENTIFIER_INVALID` (400): an id in the request cannot be used as a storage key — empty, carrying an unsupported character, or longer than 128 characters
12977
13112
  * - `VALID_FROM_INVALID` (400): a `valid_from` is not one of the timestamp forms a version timeline can be sorted by
12978
13113
  * - `VALUE_UNSTORABLE` (400): a write carries a value the store cannot hold, such as a non-finite number or one outside the table's numeric range
13114
+ * - `OVERRIDE_VALUE_INVALID` (400): a write overrides a `currency` or `number` field, or an amount/decimal pair, with a value of the wrong type
12979
13115
  * - `CONDITIONAL_PRICING_NOT_ENABLED` (403): the organization has not opted in to Conditional Pricing
12980
13116
  * - `CONDITIONAL_PRICING_NOT_READY` (409): the organization opted in minutes ago and a variant cannot be created until its setup finishes
12981
13117
  *
12982
13118
  */
12983
- export type ConditionalPricingErrorCode = "SCHEMA_NOT_FOUND" | "ENTITY_NOT_FOUND" | "ENTITY_TYPE_MISMATCH" | "ENTITY_NOT_CONDITIONAL" | "VARIANT_NOT_FOUND" | "VERSION_NOT_FOUND" | "NO_MATCHES" | "NO_ACTIVE_VERSION" | "AMBIGUOUS_RESOLUTION" | "TUPLE_CONFLICT" | "VERSION_CONFLICT" | "CONDITION_UNDEFINED" | "VARIANT_PIN_UNDECLARED" | "OPERATOR_UNSUPPORTED" | "CONTEXT_FORMAT_INVALID" | "CONDITION_VALUE_INVALID" | "CONDITION_UNCONFIGURED" | "TOO_MANY_MATCHES" | "WRITE_CONFLICT" | "OFFSET_WINDOW_EXCEEDED" | "CURSOR_INVALID" | "VARIANT_LIMIT_REACHED" | "PIN_FORMAT_INVALID" | "VARIANT_UNPINNED" | "LAST_VERSION_UNDELETABLE" | "CONDITION_UNREADABLE" | "SORT_INVALID" | "DEFAULT_MARKER_RESERVED" | "DEFAULT_VARIANT_PINS_CONDITIONS" | "VALID_FROM_IMMUTABLE" | "VARIANT_CONDITIONS_IMMUTABLE" | "IDENTIFIER_INVALID" | "VALID_FROM_INVALID" | "VALUE_UNSTORABLE" | "CONDITIONAL_PRICING_NOT_ENABLED" | "CONDITIONAL_PRICING_NOT_READY";
13119
+ export type ConditionalPricingErrorCode = "SCHEMA_NOT_FOUND" | "ENTITY_NOT_FOUND" | "ENTITY_TYPE_MISMATCH" | "ENTITY_NOT_CONDITIONAL" | "VARIANT_NOT_FOUND" | "VERSION_NOT_FOUND" | "NO_MATCHES" | "NO_ACTIVE_VERSION" | "AMBIGUOUS_RESOLUTION" | "TUPLE_CONFLICT" | "VERSION_CONFLICT" | "CONDITION_UNDEFINED" | "VARIANT_PIN_UNDECLARED" | "OPERATOR_UNSUPPORTED" | "CONTEXT_FORMAT_INVALID" | "CONDITION_VALUE_INVALID" | "CONDITION_UNCONFIGURED" | "TOO_MANY_MATCHES" | "WRITE_CONFLICT" | "OFFSET_WINDOW_EXCEEDED" | "CURSOR_INVALID" | "VARIANT_LIMIT_REACHED" | "PIN_FORMAT_INVALID" | "VARIANT_UNPINNED" | "LAST_VERSION_UNDELETABLE" | "CONDITION_UNREADABLE" | "SORT_INVALID" | "DEFAULT_MARKER_RESERVED" | "DEFAULT_VARIANT_PINS_CONDITIONS" | "VALID_FROM_IMMUTABLE" | "VARIANT_CONDITIONS_IMMUTABLE" | "IDENTIFIER_INVALID" | "VALID_FROM_INVALID" | "VALUE_UNSTORABLE" | "OVERRIDE_VALUE_INVALID" | "CONDITIONAL_PRICING_NOT_ENABLED" | "CONDITIONAL_PRICING_NOT_READY";
12984
13120
  export interface ConditionalPricingOptIn {
12985
13121
  /**
12986
13122
  * - `PROVISIONING`: the organization's search collection is still being set up, and
@@ -0,0 +1,148 @@
1
+ # Phone Integration API
2
+
3
+ - **Base URL:** `https://phone-integration-api.sls.epilot.io`
4
+ - **Full API Docs:** [https://docs.epilot.io/api/phone-integration](https://docs.epilot.io/api/phone-integration)
5
+
6
+ ## Usage
7
+
8
+ ```ts
9
+ import { epilot } from '@epilot/sdk'
10
+
11
+ epilot.authorize(() => '<token>')
12
+ const { data } = await epilot.phoneIntegration.batchSearchCustomers(...)
13
+ ```
14
+
15
+ ### Tree-shakeable import
16
+
17
+ ```ts
18
+ import { getClient, authorize } from '@epilot/sdk/phone-integration'
19
+
20
+ const phoneIntegrationClient = getClient()
21
+ authorize(phoneIntegrationClient, () => '<token>')
22
+ const { data } = await phoneIntegrationClient.batchSearchCustomers(...)
23
+ ```
24
+
25
+ ## Operations
26
+
27
+ **phone-integration**
28
+ - [`batchSearchCustomers`](#batchsearchcustomers)
29
+
30
+ **Schemas**
31
+ - [`CustomerBatchSearchResult`](#customerbatchsearchresult)
32
+ - [`CustomerSearchResult`](#customersearchresult)
33
+ - [`CustomerIdentifier`](#customeridentifier)
34
+ - [`CustomerSummary`](#customersummary)
35
+ - [`ErrorResponse`](#errorresponse)
36
+
37
+ ### `batchSearchCustomers`
38
+
39
+ Resolves up to 50 identifiers to epilot customers (Contacts) in one
40
+ request — for example every number in an agent's call history.
41
+
42
+ `GET /v1/customer:batchSearch`
43
+
44
+ ```ts
45
+ const { data } = await client.batchSearchCustomers({
46
+ id: ['...'],
47
+ customer_number: ['...'],
48
+ external_id: ['...'],
49
+ phone_number: ['...'],
50
+ email: ['...'],
51
+ x-trace-id: 'example',
52
+ })
53
+ ```
54
+
55
+ <details>
56
+ <summary>Response</summary>
57
+
58
+ ```json
59
+ {
60
+ "results": [
61
+ {
62
+ "identifier": {
63
+ "type": "id",
64
+ "value": "+4917012345678"
65
+ },
66
+ "status": "found",
67
+ "customer": {
68
+ "id": "dba8e5f9-8b3f-4608-b887-cd0798fce624",
69
+ "name": "Max Mustermann",
70
+ "customer_number": "4711"
71
+ }
72
+ }
73
+ ]
74
+ }
75
+ ```
76
+
77
+ </details>
78
+
79
+ ---
80
+
81
+ ## Schemas
82
+
83
+ ### `CustomerBatchSearchResult`
84
+
85
+ ```ts
86
+ type CustomerBatchSearchResult = {
87
+ results: Array<{
88
+ identifier: {
89
+ type: { ... }
90
+ value: { ... }
91
+ }
92
+ status: "found" | "not_found" | "ambiguous" | "invalid" | "error"
93
+ customer?: {
94
+ id: { ... }
95
+ name: { ... }
96
+ customer_number?: { ... }
97
+ }
98
+ }>
99
+ }
100
+ ```
101
+
102
+ ### `CustomerSearchResult`
103
+
104
+ ```ts
105
+ type CustomerSearchResult = {
106
+ identifier: {
107
+ type: "id" | "customer_number" | "external_id" | "phone_number" | "email"
108
+ value: string
109
+ }
110
+ status: "found" | "not_found" | "ambiguous" | "invalid" | "error"
111
+ customer?: {
112
+ id: string
113
+ name: string
114
+ customer_number?: string
115
+ }
116
+ }
117
+ ```
118
+
119
+ ### `CustomerIdentifier`
120
+
121
+ ```ts
122
+ type CustomerIdentifier = {
123
+ type: "id" | "customer_number" | "external_id" | "phone_number" | "email"
124
+ value: string
125
+ }
126
+ ```
127
+
128
+ ### `CustomerSummary`
129
+
130
+ Present when `status` is `found`
131
+
132
+ ```ts
133
+ type CustomerSummary = {
134
+ id: string
135
+ name: string
136
+ customer_number?: string
137
+ }
138
+ ```
139
+
140
+ ### `ErrorResponse`
141
+
142
+ ```ts
143
+ type ErrorResponse = {
144
+ status: number
145
+ error: string
146
+ code?: string
147
+ }
148
+ ```
package/docs/pricing.md CHANGED
@@ -2993,7 +2993,7 @@ about what is already stored. Refusals raised by request validation carry no `co
2993
2993
  - `SCHEMA_NOT_FOUND` (
2994
2994
 
2995
2995
  ```ts
2996
- type ConditionalPricingErrorCode = "SCHEMA_NOT_FOUND" | "ENTITY_NOT_FOUND" | "ENTITY_TYPE_MISMATCH" | "ENTITY_NOT_CONDITIONAL" | "VARIANT_NOT_FOUND" | "VERSION_NOT_FOUND" | "NO_MATCHES" | "NO_ACTIVE_VERSION" | "AMBIGUOUS_RESOLUTION" | "TUPLE_CONFLICT" | "VERSION_CONFLICT" | "CONDITION_UNDEFINED" | "VARIANT_PIN_UNDECLARED" | "OPERATOR_UNSUPPORTED" | "CONTEXT_FORMAT_INVALID" | "CONDITION_VALUE_INVALID" | "CONDITION_UNCONFIGURED" | "TOO_MANY_MATCHES" | "WRITE_CONFLICT" | "OFFSET_WINDOW_EXCEEDED" | "CURSOR_INVALID" | "VARIANT_LIMIT_REACHED" | "PIN_FORMAT_INVALID" | "VARIANT_UNPINNED" | "LAST_VERSION_UNDELETABLE" | "CONDITION_UNREADABLE" | "SORT_INVALID" | "DEFAULT_MARKER_RESERVED" | "DEFAULT_VARIANT_PINS_CONDITIONS" | "VALID_FROM_IMMUTABLE" | "VARIANT_CONDITIONS_IMMUTABLE" | "IDENTIFIER_INVALID" | "VALID_FROM_INVALID" | "VALUE_UNSTORABLE" | "CONDITIONAL_PRICING_NOT_ENABLED" | "CONDITIONAL_PRICING_NOT_READY"
2996
+ type ConditionalPricingErrorCode = "SCHEMA_NOT_FOUND" | "ENTITY_NOT_FOUND" | "ENTITY_TYPE_MISMATCH" | "ENTITY_NOT_CONDITIONAL" | "VARIANT_NOT_FOUND" | "VERSION_NOT_FOUND" | "NO_MATCHES" | "NO_ACTIVE_VERSION" | "AMBIGUOUS_RESOLUTION" | "TUPLE_CONFLICT" | "VERSION_CONFLICT" | "CONDITION_UNDEFINED" | "VARIANT_PIN_UNDECLARED" | "OPERATOR_UNSUPPORTED" | "CONTEXT_FORMAT_INVALID" | "CONDITION_VALUE_INVALID" | "CONDITION_UNCONFIGURED" | "TOO_MANY_MATCHES" | "WRITE_CONFLICT" | "OFFSET_WINDOW_EXCEEDED" | "CURSOR_INVALID" | "VARIANT_LIMIT_REACHED" | "PIN_FORMAT_INVALID" | "VARIANT_UNPINNED" | "LAST_VERSION_UNDELETABLE" | "CONDITION_UNREADABLE" | "SORT_INVALID" | "DEFAULT_MARKER_RESERVED" | "DEFAULT_VARIANT_PINS_CONDITIONS" | "VALID_FROM_IMMUTABLE" | "VARIANT_CONDITIONS_IMMUTABLE" | "IDENTIFIER_INVALID" | "VALID_FROM_INVALID" | "VALUE_UNSTORABLE" | "OVERRIDE_VALUE_INVALID" | "CONDITIONAL_PRICING_NOT_ENABLED" | "CONDITIONAL_PRICING_NOT_READY"
2997
2997
  ```
2998
2998
 
2999
2999
  ### `ResolveConditionalEntityRequest`
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@epilot/sdk",
3
- "version": "2.20.54",
3
+ "version": "2.20.56",
4
4
  "description": "JavaScript/TypeScript SDK for epilot APIs",
5
5
  "type": "module",
6
6
  "main": "./dist/index.cjs",
@@ -249,6 +249,12 @@
249
249
  "require": "./dist/apis/permissions.cjs"
250
250
  },
251
251
  "./permissions/openapi.json": "./definitions/permissions.json",
252
+ "./phone-integration": {
253
+ "types": "./dist/apis/phone-integration.d.ts",
254
+ "import": "./dist/apis/phone-integration.js",
255
+ "require": "./dist/apis/phone-integration.cjs"
256
+ },
257
+ "./phone-integration/openapi.json": "./definitions/phone-integration.json",
252
258
  "./pricing": {
253
259
  "types": "./dist/apis/pricing.d.ts",
254
260
  "import": "./dist/apis/pricing.js",
@@ -496,6 +502,9 @@
496
502
  "permissions": [
497
503
  "./dist/apis/permissions.d.ts"
498
504
  ],
505
+ "phone-integration": [
506
+ "./dist/apis/phone-integration.d.ts"
507
+ ],
499
508
  "pricing": [
500
509
  "./dist/apis/pricing.d.ts"
501
510
  ],
@@ -1,7 +0,0 @@
1
- "use strict";Object.defineProperty(exports, "__esModule", {value: true});require('./chunk-NJK5F5TF.cjs');
2
-
3
- // src/docs/README.json
4
- var README_default = "<h1 align=\"center\"><img alt=\"epilot\" src=\"https://raw.githubusercontent.com/epilot-dev/sdk-js/main/logo.png\" width=\"200\"><br>@epilot/sdk</h1>\n\n<p align=\"center\">\n <a href=\"https://github.com/epilot-dev/sdk-js/actions?query=workflow%3ACI\"><img src=\"https://github.com/epilot-dev/sdk-js/workflows/CI/badge.svg\" alt=\"CI\"></a>\n <a href=\"https://www.npmjs.com/package/@epilot/sdk\"><img src=\"https://img.shields.io/npm/v/@epilot/sdk.svg\" alt=\"npm version\"></a>\n <a href=\"https://github.com/epilot-dev/sdk-js/blob/main/\"><img src=\"http://img.shields.io/:license-mit-blue.svg\" alt=\"License\"></a>\n</p>\n\n<p align=\"center\">JavaScript/TypeScript SDK for epilot APIs. Full types, tree-shakeable imports, and lazy-loaded OpenAPI specs.</p>\n\n## Install\n\n```bash\nnpm i @epilot/sdk axios openapi-client-axios\n```\n\n## Quick Start\n\n```ts\nimport { epilot } from '@epilot/sdk'\n\nepilot.authorize(() => '<my-bearer-token>')\n\nconst { data: entity } = await epilot.entity.createEntity(\n { slug: 'contact' },\n { first_name: 'John', last_name: 'Doe' },\n)\n\nconst { data: file } = await epilot.file.getFile({ id: 'file-123' })\n\nconst { data: executions } = await epilot.workflow.getExecutions()\n```\n\nAPI clients are built on [openapi-client-axios](https://openapistack.co/docs/openapi-client-axios/intro/), which generates fully typed operation methods on top of regular [axios](https://axios-http.com/docs/intro) instances. All standard axios features (interceptors, defaults, config) work as expected. Each operation is forwarded to a lazy singleton \u2014 the spec is loaded and the client initialized on first use, then cached.\n\nFull API documentation: [https://docs.epilot.io/api](https://docs.epilot.io/api)\n\n## API Reference\n\n<!-- api-reference-table -->\n| API | Import | Docs |\n| --- | ------ | ---- |\n| `epilot.accessToken` | `@epilot/sdk/access-token` | [docs](./docs/access-token.md) |\n| `epilot.address` | `@epilot/sdk/address` | [docs](./docs/address.md) |\n| `epilot.addressSuggestions` | `@epilot/sdk/address-suggestions` | [docs](./docs/address-suggestions.md) |\n| `epilot.aiAgents` | `@epilot/sdk/ai-agents` | [docs](./docs/ai-agents.md) |\n| `epilot.app` | `@epilot/sdk/app` | [docs](./docs/app.md) |\n| `epilot.auditLogs` | `@epilot/sdk/audit-logs` | [docs](./docs/audit-logs.md) |\n| `epilot.automation` | `@epilot/sdk/automation` | [docs](./docs/automation.md) |\n| `epilot.billing` | `@epilot/sdk/billing` | [docs](./docs/billing.md) |\n| `epilot.blueprintManifest` | `@epilot/sdk/blueprint-manifest` | [docs](./docs/blueprint-manifest.md) |\n| `epilot.calendar` | `@epilot/sdk/calendar` | [docs](./docs/calendar.md) |\n| `epilot.chat` | `@epilot/sdk/chat` | [docs](./docs/chat.md) |\n| `epilot.configurationHub` | `@epilot/sdk/configuration-hub` | [docs](./docs/configuration-hub.md) |\n| `epilot.consent` | `@epilot/sdk/consent` | [docs](./docs/consent.md) |\n| `epilot.customerPortal` | `@epilot/sdk/customer-portal` | [docs](./docs/customer-portal.md) |\n| `epilot.dashboard` | `@epilot/sdk/dashboard` | [docs](./docs/dashboard.md) |\n| `epilot.dataGovernance` | `@epilot/sdk/data-governance` | [docs](./docs/data-governance.md) |\n| `epilot.deduplication` | `@epilot/sdk/deduplication` | [docs](./docs/deduplication.md) |\n| `epilot.design` | `@epilot/sdk/design` | [docs](./docs/design.md) |\n| `epilot.document` | `@epilot/sdk/document` | [docs](./docs/document.md) |\n| `epilot.emailSettings` | `@epilot/sdk/email-settings` | [docs](./docs/email-settings.md) |\n| `epilot.emailTemplate` | `@epilot/sdk/email-template` | [docs](./docs/email-template.md) |\n| `epilot.entity` | `@epilot/sdk/entity` | [docs](./docs/entity.md) |\n| `epilot.entityMapping` | `@epilot/sdk/entity-mapping` | [docs](./docs/entity-mapping.md) |\n| `epilot.environments` | `@epilot/sdk/environments` | [docs](./docs/environments.md) |\n| `epilot.eventCatalog` | `@epilot/sdk/event-catalog` | [docs](./docs/event-catalog.md) |\n| `epilot.externalValues` | `@epilot/sdk/external-values` | [docs](./docs/external-values.md) |\n| `epilot.file` | `@epilot/sdk/file` | [docs](./docs/file.md) |\n| `epilot.iban` | `@epilot/sdk/iban` | [docs](./docs/iban.md) |\n| `epilot.identity` | `@epilot/sdk/identity` | [docs](./docs/identity.md) |\n| `epilot.integrationToolkit` | `@epilot/sdk/integration-toolkit` | [docs](./docs/integration-toolkit.md) |\n| `epilot.journey` | `@epilot/sdk/journey` | [docs](./docs/journey.md) |\n| `epilot.kanban` | `@epilot/sdk/kanban` | [docs](./docs/kanban.md) |\n| `epilot.message` | `@epilot/sdk/message` | [docs](./docs/message.md) |\n| `epilot.metering` | `@epilot/sdk/metering` | [docs](./docs/metering.md) |\n| `epilot.notes` | `@epilot/sdk/notes` | [docs](./docs/notes.md) |\n| `epilot.notification` | `@epilot/sdk/notification` | [docs](./docs/notification.md) |\n| `epilot.organization` | `@epilot/sdk/organization` | [docs](./docs/organization.md) |\n| `epilot.partnerDirectory` | `@epilot/sdk/partner-directory` | [docs](./docs/partner-directory.md) |\n| `epilot.permissions` | `@epilot/sdk/permissions` | [docs](./docs/permissions.md) |\n| `epilot.pricing` | `@epilot/sdk/pricing` | [docs](./docs/pricing.md) |\n| `epilot.pricingTier` | `@epilot/sdk/pricing-tier` | [docs](./docs/pricing-tier.md) |\n| `epilot.purpose` | `@epilot/sdk/purpose` | [docs](./docs/purpose.md) |\n| `epilot.query` | `@epilot/sdk/query` | [docs](./docs/query.md) |\n| `epilot.sandbox` | `@epilot/sdk/sandbox` | [docs](./docs/sandbox.md) |\n| `epilot.sharing` | `@epilot/sdk/sharing` | [docs](./docs/sharing.md) |\n| `epilot.snapshot` | `@epilot/sdk/snapshot` | [docs](./docs/snapshot.md) |\n| `epilot.submission` | `@epilot/sdk/submission` | [docs](./docs/submission.md) |\n| `epilot.targeting` | `@epilot/sdk/targeting` | [docs](./docs/targeting.md) |\n| `epilot.templateVariables` | `@epilot/sdk/template-variables` | [docs](./docs/template-variables.md) |\n| `epilot.user` | `@epilot/sdk/user` | [docs](./docs/user.md) |\n| `epilot.validationRules` | `@epilot/sdk/validation-rules` | [docs](./docs/validation-rules.md) |\n| `epilot.webhooks` | `@epilot/sdk/webhooks` | [docs](./docs/webhooks.md) |\n| `epilot.workflow` | `@epilot/sdk/workflow` | [docs](./docs/workflow.md) |\n| `epilot.workflowDefinition` | `@epilot/sdk/workflow-definition` | [docs](./docs/workflow-definition.md) |\n<!-- /api-reference-table -->\n\n## OpenAPI Spec\n\nRetrieve the full OpenAPI specification for any API at runtime. The spec is lazy-loaded on first call and cached.\n\n```ts\nimport { epilot } from '@epilot/sdk'\n\n// Via API handle\nconst entitySpec = await epilot.entity.openapi()\nconsole.log(entitySpec.info.title) // \"Entity API\"\nconsole.log(entitySpec.paths) // all paths with full schemas\n\n// Via top-level method\nconst spec = await epilot.openapi('entity')\n```\n\nFor tree-shakeable imports:\n\n```ts\nimport { openapi } from '@epilot/sdk/entity'\n\nconst spec = await openapi()\n```\n\n## Explicit Client Access\n\n```ts\nimport { epilot } from '@epilot/sdk'\n\nepilot.authorize(() => '<my-token>')\n\n// Get the cached singleton client\nconst entityClient = epilot.entity.getClient()\nconst { data } = await entityClient.getEntity({ slug: 'contact', id: '123' })\n\n// Create a fresh (non-singleton) client instance\nconst freshClient = epilot.entity.createClient()\nauthorize(freshClient, () => '<my-token>')\n```\n\n## Tree-Shakeable Imports\n\nImport only what you need. Other APIs never touch your bundle.\n\n```ts\nimport { getClient, authorize } from '@epilot/sdk/entity'\n\nconst entityClient = getClient()\nauthorize(entityClient, () => '<my-token>')\n\nconst { data } = await entityClient.getEntity({ slug: 'contact', id: '123' })\n\n// Or use the handle for direct operation forwarding\nimport { entity } from '@epilot/sdk/entity'\nconst { data } = await entity.getEntity({ slug: 'contact', id: '123' })\n```\n\n## Types\n\nEach API subpath re-exports all schema types generated from the OpenAPI spec. Import them directly:\n\n```ts\nimport type { Entity, EntitySchema, RelationAttribute } from '@epilot/sdk/entity'\nimport type { FileItem } from '@epilot/sdk/file'\nimport type { AutomationFlow } from '@epilot/sdk/automation'\n```\n\nThe `Client`, `OperationMethods`, and `PathsDictionary` types are also available for typing client instances:\n\n```ts\nimport type { Client } from '@epilot/sdk/entity'\n\nconst entityClient: Client = epilot.entity.getClient()\n```\n\n## Headers\n\n### Global Headers\n\nSet default headers applied to all clients. Useful for `x-epilot-org-id`, `x-epilot-user-id`, etc.\n\n```ts\nimport { epilot } from '@epilot/sdk'\n\nepilot.authorize(() => '<my-token>')\nepilot.headers({\n 'x-epilot-org-id': 'org-123',\n 'x-epilot-user-id': 'user-456',\n})\n\nconst { data } = await epilot.entity.searchEntities(...)\n```\n\n### Standard Axios Headers\n\nUse standard axios `defaults.headers.common` on individual clients:\n\n```ts\nconst entityClient = epilot.entity.getClient()\nentityClient.defaults.headers.common['x-epilot-org-id'] = 'org-123'\n```\n\n## Auth Patterns\n\n`authorize()` accepts a string or a function. The function form is preferred \u2014 it is called on every request, so tokens stay fresh.\n\n```ts\nimport { authorize } from '@epilot/sdk'\nimport { getClient } from '@epilot/sdk/entity'\n\n// Per-client \u2014 function predicate (recommended)\nconst entityClient = getClient()\nauthorize(entityClient, () => '<my-token>')\n\n// Per-client \u2014 async function (e.g. OAuth / session)\nauthorize(entityClient, async () => {\n return await getTokenFromSession()\n})\n\n// Per-client \u2014 static string (sets default header once)\nauthorize(entityClient, 'my-static-api-token')\n```\n\n```ts\n// Global \u2014 applies to all clients resolved from the SDK\nimport { epilot } from '@epilot/sdk'\n\nepilot.authorize(() => '<my-token>')\nepilot.authorize(async () => await getTokenFromSession())\nepilot.authorize('my-static-api-token')\n```\n\n## Fresh Client Instance\n\n```ts\nimport { createClient, authorize } from '@epilot/sdk/entity'\n\nconst entityClient = createClient()\nauthorize(entityClient, () => '<my-token>')\nentityClient.defaults.headers.common['x-epilot-org-id'] = 'org-123'\n```\n\n## Multiple SDK Instances\n\n```ts\nimport { createSDK } from '@epilot/sdk'\n\nconst sdk1 = createSDK()\nsdk1.authorize(() => '<token-for-org-1>')\nsdk1.headers({ 'x-epilot-org-id': 'org-1' })\n\nconst sdk2 = createSDK()\nsdk2.authorize(() => '<token-for-org-2>')\nsdk2.headers({ 'x-epilot-org-id': 'org-2' })\n```\n\n\n## Interceptors\n\nUse axios interceptors for custom request/response processing. Since clients are axios instances, you can use `client.interceptors` directly:\n\n```ts\nentityClient.interceptors.response.use((response) => {\n console.debug(`${response.config.method?.toUpperCase()} ${response.config.url}`, {\n status: response.status,\n data: response.data,\n })\n return response\n})\n```\n\nOr register global interceptors applied to all clients:\n\n```ts\nepilot.interceptors.request((config) => {\n config.headers['x-correlation-id'] = generateTraceId()\n return config\n})\n```\n\n## Auto-Retry (429 Too Many Requests)\n\nThe SDK automatically retries requests that receive a `429 Too Many Requests` response. It respects the `Retry-After` header (in seconds) to determine how long to wait before retrying.\n\nEnabled by default with up to 3 retries.\n\n```ts\nimport { epilot } from '@epilot/sdk'\n\n// Customize retry behavior\nepilot.retry({ maxRetries: 5, defaultDelayMs: 2000 })\n\n// Disable retries\nepilot.retry({ maxRetries: 0 })\n```\n\n| Option | Default | Description |\n| --- | --- | --- |\n| `maxRetries` | `3` | Maximum number of retries. Set to `0` to disable. |\n| `defaultDelayMs` | `1000` | Fallback delay in ms when `Retry-After` header is missing. |\n\nFor individually imported clients (tree-shakeable imports), apply the interceptor manually:\n\n```ts\nimport { getClient, authorize } from '@epilot/sdk/entity'\nimport { applyRetryInterceptor } from '@epilot/sdk'\n\nconst entityClient = getClient()\nauthorize(entityClient, () => '<my-token>')\napplyRetryInterceptor({ client: entityClient, config: { maxRetries: 3 } })\n```\n\n## Large Response Handling (413 Payload Too Large)\n\nepilot APIs use a [large response middleware](https://github.com/epilot-dev/aws-lambda-utility-middlewares) to work around the AWS Lambda 6MB response limit. When a response exceeds ~5.1MB, the API uploads the payload to S3 and returns a presigned URL instead.\n\nThe SDK handles this transparently \u2014 it sends the opt-in `Accept` header and automatically fetches the full payload from S3 when a large response URL is returned. Enabled by default.\n\n```ts\nimport { epilot } from '@epilot/sdk'\n\n// Disable large response handling\nepilot.largeResponse({ enabled: false })\n```\n\nFor individually imported clients (tree-shakeable imports), apply the interceptor manually:\n\n```ts\nimport { getClient, authorize } from '@epilot/sdk/entity'\nimport { applyLargeResponseInterceptor } from '@epilot/sdk'\n\nconst entityClient = getClient()\nauthorize(entityClient, () => '<my-token>')\napplyLargeResponseInterceptor({ client: entityClient, config: { enabled: true } })\n```\n\n## Overrides & Custom APIs\n\nOverride built-in API specs or register custom APIs via `.epilot/sdk-overrides.json`. This is useful for testing new versions of an API spec or getting the latest types without waiting for an SDK release.\n\n```json\n{\n \"entity\": \"./specs/entity-openapi.json\",\n \"myNewApi\": \"./specs/my-new-api-openapi.json\"\n}\n```\n\n```ts\n// Built-in API with overridden spec\nconst { data } = await epilot.entity.getEntity({ slug: 'contact', id: '123' })\n```\n\n### Override Commands\n\n```bash\n# Apply all overrides from .epilot/sdk-overrides.json\nnpx epilot-sdk override\n\n# Override a single API\nnpx epilot-sdk override entity ./my-local-entity-spec.yaml\n\n# Regenerate types after spec changes\nnpx epilot-sdk typegen\n```\n\n<details>\n<summary>Migration from <code>@epilot/*-client</code></summary>\n\nDrop-in replacement \u2014 just change the import path:\n\n```ts\n// Before\nimport { getClient, createClient, authorize } from '@epilot/entity-client'\nimport type { Client, Entity } from '@epilot/entity-client'\n\n// After\nimport { getClient, createClient, authorize } from '@epilot/sdk/entity'\nimport type { Client, Entity } from '@epilot/sdk/entity'\n```\n\n</details>\n\n<details>\n<summary>Client Lifecycle</summary>\n\nWhen you call `authorize()`, `headers()`, `retry()`, `largeResponse()`, or `interceptors`, the SDK invalidates all cached client instances. The next operation call creates a fresh client with the updated configuration.\n\n**Operation methods are always up to date** \u2014 calls like `epilot.entity.getEntity(...)` re-resolve the client on every invocation, so they always use the latest config.\n\n**Direct `getClient()` references can go stale** \u2014 if you hold a reference and then change config, your reference still points to the old client:\n\n```ts\nconst entityClient = epilot.entity.getClient()\n\nepilot.authorize('new-token') // invalidates all cached clients\n\n// entityClient still has the old token\n// epilot.entity.getEntity(...) will use a new client with the new token\n```\n\nIf you need a long-lived reference that survives config changes, call `getClient()` again after changing config, or use operation methods directly.\n\n</details>\n";
5
-
6
-
7
- exports.default = README_default;
@@ -1,7 +0,0 @@
1
- import "./chunk-YPSWSI3M.js";
2
-
3
- // src/docs/README.json
4
- var README_default = "<h1 align=\"center\"><img alt=\"epilot\" src=\"https://raw.githubusercontent.com/epilot-dev/sdk-js/main/logo.png\" width=\"200\"><br>@epilot/sdk</h1>\n\n<p align=\"center\">\n <a href=\"https://github.com/epilot-dev/sdk-js/actions?query=workflow%3ACI\"><img src=\"https://github.com/epilot-dev/sdk-js/workflows/CI/badge.svg\" alt=\"CI\"></a>\n <a href=\"https://www.npmjs.com/package/@epilot/sdk\"><img src=\"https://img.shields.io/npm/v/@epilot/sdk.svg\" alt=\"npm version\"></a>\n <a href=\"https://github.com/epilot-dev/sdk-js/blob/main/\"><img src=\"http://img.shields.io/:license-mit-blue.svg\" alt=\"License\"></a>\n</p>\n\n<p align=\"center\">JavaScript/TypeScript SDK for epilot APIs. Full types, tree-shakeable imports, and lazy-loaded OpenAPI specs.</p>\n\n## Install\n\n```bash\nnpm i @epilot/sdk axios openapi-client-axios\n```\n\n## Quick Start\n\n```ts\nimport { epilot } from '@epilot/sdk'\n\nepilot.authorize(() => '<my-bearer-token>')\n\nconst { data: entity } = await epilot.entity.createEntity(\n { slug: 'contact' },\n { first_name: 'John', last_name: 'Doe' },\n)\n\nconst { data: file } = await epilot.file.getFile({ id: 'file-123' })\n\nconst { data: executions } = await epilot.workflow.getExecutions()\n```\n\nAPI clients are built on [openapi-client-axios](https://openapistack.co/docs/openapi-client-axios/intro/), which generates fully typed operation methods on top of regular [axios](https://axios-http.com/docs/intro) instances. All standard axios features (interceptors, defaults, config) work as expected. Each operation is forwarded to a lazy singleton \u2014 the spec is loaded and the client initialized on first use, then cached.\n\nFull API documentation: [https://docs.epilot.io/api](https://docs.epilot.io/api)\n\n## API Reference\n\n<!-- api-reference-table -->\n| API | Import | Docs |\n| --- | ------ | ---- |\n| `epilot.accessToken` | `@epilot/sdk/access-token` | [docs](./docs/access-token.md) |\n| `epilot.address` | `@epilot/sdk/address` | [docs](./docs/address.md) |\n| `epilot.addressSuggestions` | `@epilot/sdk/address-suggestions` | [docs](./docs/address-suggestions.md) |\n| `epilot.aiAgents` | `@epilot/sdk/ai-agents` | [docs](./docs/ai-agents.md) |\n| `epilot.app` | `@epilot/sdk/app` | [docs](./docs/app.md) |\n| `epilot.auditLogs` | `@epilot/sdk/audit-logs` | [docs](./docs/audit-logs.md) |\n| `epilot.automation` | `@epilot/sdk/automation` | [docs](./docs/automation.md) |\n| `epilot.billing` | `@epilot/sdk/billing` | [docs](./docs/billing.md) |\n| `epilot.blueprintManifest` | `@epilot/sdk/blueprint-manifest` | [docs](./docs/blueprint-manifest.md) |\n| `epilot.calendar` | `@epilot/sdk/calendar` | [docs](./docs/calendar.md) |\n| `epilot.chat` | `@epilot/sdk/chat` | [docs](./docs/chat.md) |\n| `epilot.configurationHub` | `@epilot/sdk/configuration-hub` | [docs](./docs/configuration-hub.md) |\n| `epilot.consent` | `@epilot/sdk/consent` | [docs](./docs/consent.md) |\n| `epilot.customerPortal` | `@epilot/sdk/customer-portal` | [docs](./docs/customer-portal.md) |\n| `epilot.dashboard` | `@epilot/sdk/dashboard` | [docs](./docs/dashboard.md) |\n| `epilot.dataGovernance` | `@epilot/sdk/data-governance` | [docs](./docs/data-governance.md) |\n| `epilot.deduplication` | `@epilot/sdk/deduplication` | [docs](./docs/deduplication.md) |\n| `epilot.design` | `@epilot/sdk/design` | [docs](./docs/design.md) |\n| `epilot.document` | `@epilot/sdk/document` | [docs](./docs/document.md) |\n| `epilot.emailSettings` | `@epilot/sdk/email-settings` | [docs](./docs/email-settings.md) |\n| `epilot.emailTemplate` | `@epilot/sdk/email-template` | [docs](./docs/email-template.md) |\n| `epilot.entity` | `@epilot/sdk/entity` | [docs](./docs/entity.md) |\n| `epilot.entityMapping` | `@epilot/sdk/entity-mapping` | [docs](./docs/entity-mapping.md) |\n| `epilot.environments` | `@epilot/sdk/environments` | [docs](./docs/environments.md) |\n| `epilot.eventCatalog` | `@epilot/sdk/event-catalog` | [docs](./docs/event-catalog.md) |\n| `epilot.externalValues` | `@epilot/sdk/external-values` | [docs](./docs/external-values.md) |\n| `epilot.file` | `@epilot/sdk/file` | [docs](./docs/file.md) |\n| `epilot.iban` | `@epilot/sdk/iban` | [docs](./docs/iban.md) |\n| `epilot.identity` | `@epilot/sdk/identity` | [docs](./docs/identity.md) |\n| `epilot.integrationToolkit` | `@epilot/sdk/integration-toolkit` | [docs](./docs/integration-toolkit.md) |\n| `epilot.journey` | `@epilot/sdk/journey` | [docs](./docs/journey.md) |\n| `epilot.kanban` | `@epilot/sdk/kanban` | [docs](./docs/kanban.md) |\n| `epilot.message` | `@epilot/sdk/message` | [docs](./docs/message.md) |\n| `epilot.metering` | `@epilot/sdk/metering` | [docs](./docs/metering.md) |\n| `epilot.notes` | `@epilot/sdk/notes` | [docs](./docs/notes.md) |\n| `epilot.notification` | `@epilot/sdk/notification` | [docs](./docs/notification.md) |\n| `epilot.organization` | `@epilot/sdk/organization` | [docs](./docs/organization.md) |\n| `epilot.partnerDirectory` | `@epilot/sdk/partner-directory` | [docs](./docs/partner-directory.md) |\n| `epilot.permissions` | `@epilot/sdk/permissions` | [docs](./docs/permissions.md) |\n| `epilot.pricing` | `@epilot/sdk/pricing` | [docs](./docs/pricing.md) |\n| `epilot.pricingTier` | `@epilot/sdk/pricing-tier` | [docs](./docs/pricing-tier.md) |\n| `epilot.purpose` | `@epilot/sdk/purpose` | [docs](./docs/purpose.md) |\n| `epilot.query` | `@epilot/sdk/query` | [docs](./docs/query.md) |\n| `epilot.sandbox` | `@epilot/sdk/sandbox` | [docs](./docs/sandbox.md) |\n| `epilot.sharing` | `@epilot/sdk/sharing` | [docs](./docs/sharing.md) |\n| `epilot.snapshot` | `@epilot/sdk/snapshot` | [docs](./docs/snapshot.md) |\n| `epilot.submission` | `@epilot/sdk/submission` | [docs](./docs/submission.md) |\n| `epilot.targeting` | `@epilot/sdk/targeting` | [docs](./docs/targeting.md) |\n| `epilot.templateVariables` | `@epilot/sdk/template-variables` | [docs](./docs/template-variables.md) |\n| `epilot.user` | `@epilot/sdk/user` | [docs](./docs/user.md) |\n| `epilot.validationRules` | `@epilot/sdk/validation-rules` | [docs](./docs/validation-rules.md) |\n| `epilot.webhooks` | `@epilot/sdk/webhooks` | [docs](./docs/webhooks.md) |\n| `epilot.workflow` | `@epilot/sdk/workflow` | [docs](./docs/workflow.md) |\n| `epilot.workflowDefinition` | `@epilot/sdk/workflow-definition` | [docs](./docs/workflow-definition.md) |\n<!-- /api-reference-table -->\n\n## OpenAPI Spec\n\nRetrieve the full OpenAPI specification for any API at runtime. The spec is lazy-loaded on first call and cached.\n\n```ts\nimport { epilot } from '@epilot/sdk'\n\n// Via API handle\nconst entitySpec = await epilot.entity.openapi()\nconsole.log(entitySpec.info.title) // \"Entity API\"\nconsole.log(entitySpec.paths) // all paths with full schemas\n\n// Via top-level method\nconst spec = await epilot.openapi('entity')\n```\n\nFor tree-shakeable imports:\n\n```ts\nimport { openapi } from '@epilot/sdk/entity'\n\nconst spec = await openapi()\n```\n\n## Explicit Client Access\n\n```ts\nimport { epilot } from '@epilot/sdk'\n\nepilot.authorize(() => '<my-token>')\n\n// Get the cached singleton client\nconst entityClient = epilot.entity.getClient()\nconst { data } = await entityClient.getEntity({ slug: 'contact', id: '123' })\n\n// Create a fresh (non-singleton) client instance\nconst freshClient = epilot.entity.createClient()\nauthorize(freshClient, () => '<my-token>')\n```\n\n## Tree-Shakeable Imports\n\nImport only what you need. Other APIs never touch your bundle.\n\n```ts\nimport { getClient, authorize } from '@epilot/sdk/entity'\n\nconst entityClient = getClient()\nauthorize(entityClient, () => '<my-token>')\n\nconst { data } = await entityClient.getEntity({ slug: 'contact', id: '123' })\n\n// Or use the handle for direct operation forwarding\nimport { entity } from '@epilot/sdk/entity'\nconst { data } = await entity.getEntity({ slug: 'contact', id: '123' })\n```\n\n## Types\n\nEach API subpath re-exports all schema types generated from the OpenAPI spec. Import them directly:\n\n```ts\nimport type { Entity, EntitySchema, RelationAttribute } from '@epilot/sdk/entity'\nimport type { FileItem } from '@epilot/sdk/file'\nimport type { AutomationFlow } from '@epilot/sdk/automation'\n```\n\nThe `Client`, `OperationMethods`, and `PathsDictionary` types are also available for typing client instances:\n\n```ts\nimport type { Client } from '@epilot/sdk/entity'\n\nconst entityClient: Client = epilot.entity.getClient()\n```\n\n## Headers\n\n### Global Headers\n\nSet default headers applied to all clients. Useful for `x-epilot-org-id`, `x-epilot-user-id`, etc.\n\n```ts\nimport { epilot } from '@epilot/sdk'\n\nepilot.authorize(() => '<my-token>')\nepilot.headers({\n 'x-epilot-org-id': 'org-123',\n 'x-epilot-user-id': 'user-456',\n})\n\nconst { data } = await epilot.entity.searchEntities(...)\n```\n\n### Standard Axios Headers\n\nUse standard axios `defaults.headers.common` on individual clients:\n\n```ts\nconst entityClient = epilot.entity.getClient()\nentityClient.defaults.headers.common['x-epilot-org-id'] = 'org-123'\n```\n\n## Auth Patterns\n\n`authorize()` accepts a string or a function. The function form is preferred \u2014 it is called on every request, so tokens stay fresh.\n\n```ts\nimport { authorize } from '@epilot/sdk'\nimport { getClient } from '@epilot/sdk/entity'\n\n// Per-client \u2014 function predicate (recommended)\nconst entityClient = getClient()\nauthorize(entityClient, () => '<my-token>')\n\n// Per-client \u2014 async function (e.g. OAuth / session)\nauthorize(entityClient, async () => {\n return await getTokenFromSession()\n})\n\n// Per-client \u2014 static string (sets default header once)\nauthorize(entityClient, 'my-static-api-token')\n```\n\n```ts\n// Global \u2014 applies to all clients resolved from the SDK\nimport { epilot } from '@epilot/sdk'\n\nepilot.authorize(() => '<my-token>')\nepilot.authorize(async () => await getTokenFromSession())\nepilot.authorize('my-static-api-token')\n```\n\n## Fresh Client Instance\n\n```ts\nimport { createClient, authorize } from '@epilot/sdk/entity'\n\nconst entityClient = createClient()\nauthorize(entityClient, () => '<my-token>')\nentityClient.defaults.headers.common['x-epilot-org-id'] = 'org-123'\n```\n\n## Multiple SDK Instances\n\n```ts\nimport { createSDK } from '@epilot/sdk'\n\nconst sdk1 = createSDK()\nsdk1.authorize(() => '<token-for-org-1>')\nsdk1.headers({ 'x-epilot-org-id': 'org-1' })\n\nconst sdk2 = createSDK()\nsdk2.authorize(() => '<token-for-org-2>')\nsdk2.headers({ 'x-epilot-org-id': 'org-2' })\n```\n\n\n## Interceptors\n\nUse axios interceptors for custom request/response processing. Since clients are axios instances, you can use `client.interceptors` directly:\n\n```ts\nentityClient.interceptors.response.use((response) => {\n console.debug(`${response.config.method?.toUpperCase()} ${response.config.url}`, {\n status: response.status,\n data: response.data,\n })\n return response\n})\n```\n\nOr register global interceptors applied to all clients:\n\n```ts\nepilot.interceptors.request((config) => {\n config.headers['x-correlation-id'] = generateTraceId()\n return config\n})\n```\n\n## Auto-Retry (429 Too Many Requests)\n\nThe SDK automatically retries requests that receive a `429 Too Many Requests` response. It respects the `Retry-After` header (in seconds) to determine how long to wait before retrying.\n\nEnabled by default with up to 3 retries.\n\n```ts\nimport { epilot } from '@epilot/sdk'\n\n// Customize retry behavior\nepilot.retry({ maxRetries: 5, defaultDelayMs: 2000 })\n\n// Disable retries\nepilot.retry({ maxRetries: 0 })\n```\n\n| Option | Default | Description |\n| --- | --- | --- |\n| `maxRetries` | `3` | Maximum number of retries. Set to `0` to disable. |\n| `defaultDelayMs` | `1000` | Fallback delay in ms when `Retry-After` header is missing. |\n\nFor individually imported clients (tree-shakeable imports), apply the interceptor manually:\n\n```ts\nimport { getClient, authorize } from '@epilot/sdk/entity'\nimport { applyRetryInterceptor } from '@epilot/sdk'\n\nconst entityClient = getClient()\nauthorize(entityClient, () => '<my-token>')\napplyRetryInterceptor({ client: entityClient, config: { maxRetries: 3 } })\n```\n\n## Large Response Handling (413 Payload Too Large)\n\nepilot APIs use a [large response middleware](https://github.com/epilot-dev/aws-lambda-utility-middlewares) to work around the AWS Lambda 6MB response limit. When a response exceeds ~5.1MB, the API uploads the payload to S3 and returns a presigned URL instead.\n\nThe SDK handles this transparently \u2014 it sends the opt-in `Accept` header and automatically fetches the full payload from S3 when a large response URL is returned. Enabled by default.\n\n```ts\nimport { epilot } from '@epilot/sdk'\n\n// Disable large response handling\nepilot.largeResponse({ enabled: false })\n```\n\nFor individually imported clients (tree-shakeable imports), apply the interceptor manually:\n\n```ts\nimport { getClient, authorize } from '@epilot/sdk/entity'\nimport { applyLargeResponseInterceptor } from '@epilot/sdk'\n\nconst entityClient = getClient()\nauthorize(entityClient, () => '<my-token>')\napplyLargeResponseInterceptor({ client: entityClient, config: { enabled: true } })\n```\n\n## Overrides & Custom APIs\n\nOverride built-in API specs or register custom APIs via `.epilot/sdk-overrides.json`. This is useful for testing new versions of an API spec or getting the latest types without waiting for an SDK release.\n\n```json\n{\n \"entity\": \"./specs/entity-openapi.json\",\n \"myNewApi\": \"./specs/my-new-api-openapi.json\"\n}\n```\n\n```ts\n// Built-in API with overridden spec\nconst { data } = await epilot.entity.getEntity({ slug: 'contact', id: '123' })\n```\n\n### Override Commands\n\n```bash\n# Apply all overrides from .epilot/sdk-overrides.json\nnpx epilot-sdk override\n\n# Override a single API\nnpx epilot-sdk override entity ./my-local-entity-spec.yaml\n\n# Regenerate types after spec changes\nnpx epilot-sdk typegen\n```\n\n<details>\n<summary>Migration from <code>@epilot/*-client</code></summary>\n\nDrop-in replacement \u2014 just change the import path:\n\n```ts\n// Before\nimport { getClient, createClient, authorize } from '@epilot/entity-client'\nimport type { Client, Entity } from '@epilot/entity-client'\n\n// After\nimport { getClient, createClient, authorize } from '@epilot/sdk/entity'\nimport type { Client, Entity } from '@epilot/sdk/entity'\n```\n\n</details>\n\n<details>\n<summary>Client Lifecycle</summary>\n\nWhen you call `authorize()`, `headers()`, `retry()`, `largeResponse()`, or `interceptors`, the SDK invalidates all cached client instances. The next operation call creates a fresh client with the updated configuration.\n\n**Operation methods are always up to date** \u2014 calls like `epilot.entity.getEntity(...)` re-resolve the client on every invocation, so they always use the latest config.\n\n**Direct `getClient()` references can go stale** \u2014 if you hold a reference and then change config, your reference still points to the old client:\n\n```ts\nconst entityClient = epilot.entity.getClient()\n\nepilot.authorize('new-token') // invalidates all cached clients\n\n// entityClient still has the old token\n// epilot.entity.getEntity(...) will use a new client with the new token\n```\n\nIf you need a long-lived reference that survives config changes, call `getClient()` again after changing config, or use operation methods directly.\n\n</details>\n";
5
- export {
6
- README_default as default
7
- };