@talqing/sdk 0.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (108) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +193 -0
  3. package/dist/browser.d.ts +153 -0
  4. package/dist/browser.d.ts.map +1 -0
  5. package/dist/browser.js +440 -0
  6. package/dist/browser.js.map +1 -0
  7. package/dist/client.d.ts +101 -0
  8. package/dist/client.d.ts.map +1 -0
  9. package/dist/client.js +88 -0
  10. package/dist/client.js.map +1 -0
  11. package/dist/gen/apiVersion.d.ts +3 -0
  12. package/dist/gen/apiVersion.d.ts.map +1 -0
  13. package/dist/gen/apiVersion.js +4 -0
  14. package/dist/gen/apiVersion.js.map +1 -0
  15. package/dist/gen/client/client.gen.d.ts +3 -0
  16. package/dist/gen/client/client.gen.d.ts.map +1 -0
  17. package/dist/gen/client/client.gen.js +217 -0
  18. package/dist/gen/client/client.gen.js.map +1 -0
  19. package/dist/gen/client/index.d.ts +11 -0
  20. package/dist/gen/client/index.d.ts.map +1 -0
  21. package/dist/gen/client/index.js +7 -0
  22. package/dist/gen/client/index.js.map +1 -0
  23. package/dist/gen/client/types.gen.d.ts +121 -0
  24. package/dist/gen/client/types.gen.d.ts.map +1 -0
  25. package/dist/gen/client/types.gen.js +3 -0
  26. package/dist/gen/client/types.gen.js.map +1 -0
  27. package/dist/gen/client/utils.gen.d.ts +38 -0
  28. package/dist/gen/client/utils.gen.d.ts.map +1 -0
  29. package/dist/gen/client/utils.gen.js +231 -0
  30. package/dist/gen/client/utils.gen.js.map +1 -0
  31. package/dist/gen/client.gen.d.ts +13 -0
  32. package/dist/gen/client.gen.d.ts.map +1 -0
  33. package/dist/gen/client.gen.js +4 -0
  34. package/dist/gen/client.gen.js.map +1 -0
  35. package/dist/gen/core/auth.gen.d.ts +26 -0
  36. package/dist/gen/core/auth.gen.d.ts.map +1 -0
  37. package/dist/gen/core/auth.gen.js +15 -0
  38. package/dist/gen/core/auth.gen.js.map +1 -0
  39. package/dist/gen/core/bodySerializer.gen.d.ts +26 -0
  40. package/dist/gen/core/bodySerializer.gen.d.ts.map +1 -0
  41. package/dist/gen/core/bodySerializer.gen.js +58 -0
  42. package/dist/gen/core/bodySerializer.gen.js.map +1 -0
  43. package/dist/gen/core/params.gen.d.ts +44 -0
  44. package/dist/gen/core/params.gen.d.ts.map +1 -0
  45. package/dist/gen/core/params.gen.js +110 -0
  46. package/dist/gen/core/params.gen.js.map +1 -0
  47. package/dist/gen/core/pathSerializer.gen.d.ts +34 -0
  48. package/dist/gen/core/pathSerializer.gen.d.ts.map +1 -0
  49. package/dist/gen/core/pathSerializer.gen.js +107 -0
  50. package/dist/gen/core/pathSerializer.gen.js.map +1 -0
  51. package/dist/gen/core/queryKeySerializer.gen.d.ts +19 -0
  52. package/dist/gen/core/queryKeySerializer.gen.d.ts.map +1 -0
  53. package/dist/gen/core/queryKeySerializer.gen.js +93 -0
  54. package/dist/gen/core/queryKeySerializer.gen.js.map +1 -0
  55. package/dist/gen/core/serverSentEvents.gen.d.ts +72 -0
  56. package/dist/gen/core/serverSentEvents.gen.d.ts.map +1 -0
  57. package/dist/gen/core/serverSentEvents.gen.js +133 -0
  58. package/dist/gen/core/serverSentEvents.gen.js.map +1 -0
  59. package/dist/gen/core/types.gen.d.ts +84 -0
  60. package/dist/gen/core/types.gen.d.ts.map +1 -0
  61. package/dist/gen/core/types.gen.js +3 -0
  62. package/dist/gen/core/types.gen.js.map +1 -0
  63. package/dist/gen/core/utils.gen.d.ts +20 -0
  64. package/dist/gen/core/utils.gen.d.ts.map +1 -0
  65. package/dist/gen/core/utils.gen.js +88 -0
  66. package/dist/gen/core/utils.gen.js.map +1 -0
  67. package/dist/gen/index.d.ts +3 -0
  68. package/dist/gen/index.d.ts.map +1 -0
  69. package/dist/gen/index.js +3 -0
  70. package/dist/gen/index.js.map +1 -0
  71. package/dist/gen/sdk.gen.d.ts +2330 -0
  72. package/dist/gen/sdk.gen.d.ts.map +1 -0
  73. package/dist/gen/sdk.gen.js +4320 -0
  74. package/dist/gen/sdk.gen.js.map +1 -0
  75. package/dist/gen/types.gen.d.ts +17288 -0
  76. package/dist/gen/types.gen.d.ts.map +1 -0
  77. package/dist/gen/types.gen.js +3 -0
  78. package/dist/gen/types.gen.js.map +1 -0
  79. package/dist/index.d.ts +6 -0
  80. package/dist/index.d.ts.map +1 -0
  81. package/dist/index.js +6 -0
  82. package/dist/index.js.map +1 -0
  83. package/dist/vocabulary.d.ts +67 -0
  84. package/dist/vocabulary.d.ts.map +1 -0
  85. package/dist/vocabulary.js +12 -0
  86. package/dist/vocabulary.js.map +1 -0
  87. package/package.json +67 -0
  88. package/src/browser.tsx +675 -0
  89. package/src/client.ts +189 -0
  90. package/src/gen/apiVersion.ts +4 -0
  91. package/src/gen/client/client.gen.ts +277 -0
  92. package/src/gen/client/index.ts +27 -0
  93. package/src/gen/client/types.gen.ts +218 -0
  94. package/src/gen/client/utils.gen.ts +316 -0
  95. package/src/gen/client.gen.ts +16 -0
  96. package/src/gen/core/auth.gen.ts +48 -0
  97. package/src/gen/core/bodySerializer.gen.ts +82 -0
  98. package/src/gen/core/params.gen.ts +178 -0
  99. package/src/gen/core/pathSerializer.gen.ts +171 -0
  100. package/src/gen/core/queryKeySerializer.gen.ts +117 -0
  101. package/src/gen/core/serverSentEvents.gen.ts +242 -0
  102. package/src/gen/core/types.gen.ts +110 -0
  103. package/src/gen/core/utils.gen.ts +140 -0
  104. package/src/gen/index.ts +4 -0
  105. package/src/gen/sdk.gen.ts +5008 -0
  106. package/src/gen/types.gen.ts +18418 -0
  107. package/src/index.ts +13 -0
  108. package/src/vocabulary.ts +134 -0
package/src/index.ts ADDED
@@ -0,0 +1,13 @@
1
+ export { paginate, TalqingApiError, TalqingClient } from "./client.js";
2
+ export type {
3
+ JsonObject,
4
+ JsonPrimitive,
5
+ JsonValue,
6
+ Page,
7
+ TalqingClientOptions,
8
+ } from "./client.js";
9
+ /* The generated surface: every request and response type, and the resource
10
+ * class the client is built on. */
11
+ export * from "./gen/index.js";
12
+ export { API_VERSION } from "./gen/apiVersion.js";
13
+ export type * from "./vocabulary.js";
@@ -0,0 +1,134 @@
1
+ /** The named vocabularies the document spells inline.
2
+ *
3
+ * Pydantic renders a `Literal[...]` field as an inline enum rather than a named
4
+ * schema, so a generator has nowhere to hang a name — the values arrive typed,
5
+ * but only as part of whichever field carries them. These give each one back
6
+ * its name by reading it off that field, so they cannot drift from the
7
+ * contract: change the backend's Literal and the alias changes with it, or
8
+ * stops compiling.
9
+ *
10
+ */
11
+
12
+ import type {
13
+ AvatarCatalogEntryResponse,
14
+ AvatarPriceLine,
15
+ AvatarPricing,
16
+ CallBatchRecipientResponse,
17
+ CallSummaryResponse,
18
+ CallBatchResponse,
19
+ ConversationItemResponse,
20
+ EmailBatchResponse,
21
+ EmailRecipientResponse,
22
+ ObservabilityGetData,
23
+ HttpOperation,
24
+ LLMModelSpec,
25
+ ObservabilityEndingResponse,
26
+ ObservabilityLatencyMetricResponse,
27
+ ObservabilityRangeResponse,
28
+ LLMCatalogEntryResponse,
29
+ LLMPriceLine,
30
+ LLMPricing,
31
+ MemberResponse,
32
+ PhoneNumberResponse,
33
+ PublicMessage,
34
+ NoiseCancellationCatalogEntryResponse,
35
+ RealtimeCatalogEntryResponse,
36
+ RealtimePriceLine,
37
+ RealtimePricing,
38
+ STTCatalogEntryResponse,
39
+ STTPriceLine,
40
+ STTPricing,
41
+ TelephonyAccountResponse,
42
+ TTSCatalogEntryResponse,
43
+ TTSPriceLine,
44
+ TTSPricing,
45
+ SetVariableConfig,
46
+ TaskRunError,
47
+ ToolResponse,
48
+ } from "./gen/types.gen.js";
49
+
50
+ /** Whether a call achieved what it was for. Three-valued on purpose: an
51
+ * evaluator that cannot say "I don't know" invents a verdict for wrong
52
+ * numbers and hangups. */
53
+ export type CallOutcome = NonNullable<CallSummaryResponse["outcome"]>;
54
+
55
+ /** How long a model may think before it answers. */
56
+ export type ReasoningEffort = NonNullable<LLMModelSpec["reasoning_effort"]>;
57
+
58
+ /** How a call reached the agent. */
59
+ export type CallType = CallSummaryResponse["type"];
60
+
61
+ export type CallBatchStatus = CallBatchResponse["status"];
62
+ export type CallBatchRecipientStatus = CallBatchRecipientResponse["status"];
63
+ export type EmailBatchStatus = EmailBatchResponse["status"];
64
+ export type EmailRecipientStatus = EmailRecipientResponse["status"];
65
+ export type NumberReadiness = PhoneNumberResponse["readiness"];
66
+ export type TaskErrorType = TaskRunError["type"];
67
+ export type PublishStore = SetVariableConfig["store"];
68
+ export type ObservabilityGranularity = ObservabilityRangeResponse["granularity"];
69
+ export type ObservabilityChannel = NonNullable<ObservabilityGetData["query"]>["channel"];
70
+
71
+ /** What an operation does when it fails: stop the tree, or carry on. */
72
+ export type OnError = NonNullable<HttpOperation["on_error"]>;
73
+
74
+ /** One node of a tool's operation tree — the 11-variant discriminated union. */
75
+ export type OperationRequest = NonNullable<ToolResponse["operations"]>[number];
76
+
77
+ /** The kinds of row a conversation transcript holds. */
78
+ export type ConversationItemType = ConversationItemResponse["type"];
79
+ export type DeliveryStatus = ConversationItemResponse["delivery_status"];
80
+ /** Who wrote the row: `livekit.agents.llm.ChatRole`, plus the `tool` we stamp on
81
+ * a function call and its output, which LiveKit gives no role of its own. */
82
+ export type ConversationItemRole = NonNullable<ConversationItemResponse["role"]>;
83
+ /** Which way the row travelled, and whether the end customer saw it. */
84
+ export type ConversationItemDirection = ConversationItemResponse["direction"];
85
+ export type ConversationItemVisibility = ConversationItemResponse["visibility"];
86
+
87
+ /** A person's standing in an organization. Stated on the way out as well as in
88
+ * — `memberships.role` is CHECK-constrained to exactly these three. */
89
+ export type Role = MemberResponse["role"];
90
+
91
+ /** One item on a CoPilot rail: a message, a tool call, or its output. A union
92
+ * alias has no schema of its own, so this is the only one of the three that
93
+ * the generator cannot name — `TurnMetrics` and `StoredAgentPlan` come
94
+ * straight out of `./gen`. */
95
+ export type CopilotItem = PublicMessage["item"];
96
+
97
+ /** One priced line on a call's bill. The document has one shape per stage —
98
+ * they share `kind`, which is what a reader switches on. */
99
+ export type PriceLine =
100
+ | LLMPriceLine
101
+ | STTPriceLine
102
+ | TTSPriceLine
103
+ | RealtimePriceLine
104
+ | AvatarPriceLine;
105
+
106
+ export type TelephonyAccountStatus = TelephonyAccountResponse["status"];
107
+ export type TelephonyProvider = TelephonyAccountResponse["provider"];
108
+
109
+ /** Which latency the chart is showing. */
110
+ export type ObservabilityLatencyMetric = ObservabilityLatencyMetricResponse["metric"];
111
+
112
+ /** How a call ended, bucketed. */
113
+ export type ObservabilityCloseReasonBucket = ObservabilityEndingResponse["bucket"];
114
+
115
+ /** One entry in the model catalog, whichever stage it belongs to. The document
116
+ * has a type per stage and no common base — Pydantic inlines an inherited base
117
+ * into each concrete schema rather than pointing at it — so the shared fields
118
+ * (`provider`, `model`, `label`, `channel`, `pricing`) are reached through the
119
+ * union. */
120
+ export type CatalogEntry =
121
+ | LLMCatalogEntryResponse
122
+ | STTCatalogEntryResponse
123
+ | TTSCatalogEntryResponse
124
+ | RealtimeCatalogEntryResponse
125
+ | AvatarCatalogEntryResponse
126
+ | NoiseCancellationCatalogEntryResponse;
127
+
128
+ /** What one catalog entry costs, whichever stage it is priced by. */
129
+ export type CatalogPricing =
130
+ | LLMPricing
131
+ | STTPricing
132
+ | TTSPricing
133
+ | RealtimePricing
134
+ | AvatarPricing;