@party-stack/ontology 0.19.1 → 0.21.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 (356) hide show
  1. package/README.md +31 -0
  2. package/lib/OntologyPullConfig.d.ts +4 -17
  3. package/lib/OntologyPullConfig.d.ts.map +1 -1
  4. package/lib/authentication.d.ts +1068 -0
  5. package/lib/authentication.d.ts.map +1 -0
  6. package/lib/authentication.js +55 -0
  7. package/lib/authentication.js.map +1 -0
  8. package/lib/cli/index.js +19 -45
  9. package/lib/cli/index.js.map +1 -1
  10. package/lib/cli/pull.d.ts.map +1 -1
  11. package/lib/cli/pull.js +16 -29
  12. package/lib/cli/pull.js.map +1 -1
  13. package/lib/client.d.ts +11 -0
  14. package/lib/client.d.ts.map +1 -0
  15. package/lib/client.js +21 -0
  16. package/lib/client.js.map +1 -0
  17. package/lib/examples/blog.d.ts +2 -387
  18. package/lib/examples/blog.js +1 -353
  19. package/lib/examples/blog.live-queries.d.ts +1 -1
  20. package/lib/examples/blog.live-queries.d.ts.map +1 -1
  21. package/lib/examples/blog.live-queries.js +1 -1
  22. package/lib/examples/blog.live-queries.js.map +1 -1
  23. package/lib/examples/generated/collections.d.ts +7 -0
  24. package/lib/examples/generated/collections.d.ts.map +1 -0
  25. package/lib/examples/generated/collections.js +12 -0
  26. package/lib/examples/generated/collections.js.map +1 -0
  27. package/lib/examples/generated/live.d.ts +2 -2
  28. package/lib/examples/generated/live.d.ts.map +1 -1
  29. package/lib/examples/generated/live.js.map +1 -1
  30. package/lib/http.d.ts +13 -0
  31. package/lib/http.d.ts.map +1 -0
  32. package/lib/http.js +29 -0
  33. package/lib/http.js.map +1 -0
  34. package/lib/index.d.ts +19 -25
  35. package/lib/index.js +9 -15
  36. package/lib/json/index.d.ts +1 -16
  37. package/lib/json/index.js +2 -132
  38. package/lib/live/LiveOntology.d.ts +114 -50
  39. package/lib/live/LiveOntology.d.ts.map +1 -1
  40. package/lib/live/LiveOntology.js +23 -103
  41. package/lib/live/LiveOntology.js.map +1 -1
  42. package/lib/live/actions/createLiveOntologyAction.d.ts +15 -16
  43. package/lib/live/actions/createLiveOntologyAction.d.ts.map +1 -1
  44. package/lib/live/actions/createLiveOntologyAction.js +3 -11
  45. package/lib/live/actions/createLiveOntologyAction.js.map +1 -1
  46. package/lib/live/actions/types.d.ts +21 -0
  47. package/lib/live/actions/types.d.ts.map +1 -0
  48. package/lib/live/attachments/createLiveOntologyAttachments.d.ts +30 -19
  49. package/lib/live/attachments/createLiveOntologyAttachments.d.ts.map +1 -1
  50. package/lib/live/attachments/createLiveOntologyAttachments.js +43 -60
  51. package/lib/live/attachments/createLiveOntologyAttachments.js.map +1 -1
  52. package/lib/live/attachments/types.d.ts +4 -3
  53. package/lib/live/index.d.ts +10 -10
  54. package/lib/live/index.js +5 -6
  55. package/lib/live/mutators/createReadTx.d.ts +5 -0
  56. package/lib/live/mutators/createReadTx.d.ts.map +1 -0
  57. package/lib/live/mutators/createReadTx.js +19 -0
  58. package/lib/live/mutators/createReadTx.js.map +1 -0
  59. package/lib/live/mutators/types.d.ts +7 -2
  60. package/lib/live/mutators/types.d.ts.map +1 -1
  61. package/lib/live/objects/types.d.ts +6 -0
  62. package/lib/live/objects/types.d.ts.map +1 -0
  63. package/lib/live/outbox/types.d.ts +24 -15
  64. package/lib/live/outbox/types.d.ts.map +1 -1
  65. package/lib/live/outbox/types.js +1 -11
  66. package/lib/live/pins.d.ts +51 -0
  67. package/lib/live/pins.d.ts.map +1 -0
  68. package/lib/live/pins.js +113 -0
  69. package/lib/live/pins.js.map +1 -0
  70. package/lib/live/storageBackend.d.ts +50 -0
  71. package/lib/live/storageBackend.d.ts.map +1 -0
  72. package/lib/live/storageBackend.js +42 -0
  73. package/lib/live/storageBackend.js.map +1 -0
  74. package/lib/local.d.ts +15 -0
  75. package/lib/local.d.ts.map +1 -0
  76. package/lib/local.js +19 -0
  77. package/lib/local.js.map +1 -0
  78. package/lib/meta/generated/collections.d.ts +7 -0
  79. package/lib/meta/generated/collections.d.ts.map +1 -0
  80. package/lib/meta/generated/collections.js +15 -0
  81. package/lib/meta/generated/collections.js.map +1 -0
  82. package/lib/meta/generated/live.d.ts +3 -3
  83. package/lib/meta/generated/live.d.ts.map +1 -1
  84. package/lib/meta/generated/live.js +2 -2
  85. package/lib/meta/generated/live.js.map +1 -1
  86. package/lib/meta/pull.d.ts +5 -9
  87. package/lib/meta/pull.d.ts.map +1 -1
  88. package/lib/meta/pull.js +5 -43
  89. package/lib/meta/pull.js.map +1 -1
  90. package/lib/query.d.ts +1 -0
  91. package/lib/query.js +2 -0
  92. package/lib/runtime/host.d.ts +35 -0
  93. package/lib/runtime/host.d.ts.map +1 -0
  94. package/lib/runtime/host.js +39 -0
  95. package/lib/runtime/host.js.map +1 -0
  96. package/lib/runtime/index.d.ts +2 -0
  97. package/lib/runtime/index.js +1 -0
  98. package/lib/runtime/live.d.ts +25 -0
  99. package/lib/runtime/live.d.ts.map +1 -0
  100. package/lib/runtime/live.js +31 -0
  101. package/lib/runtime/live.js.map +1 -0
  102. package/lib/runtime/resource.d.ts +24 -0
  103. package/lib/runtime/resource.d.ts.map +1 -0
  104. package/lib/runtime/resource.js +127 -0
  105. package/lib/runtime/resource.js.map +1 -0
  106. package/lib/runtime/transactions.d.ts +27 -0
  107. package/lib/runtime/transactions.d.ts.map +1 -0
  108. package/lib/runtime/transactions.js +188 -0
  109. package/lib/runtime/transactions.js.map +1 -0
  110. package/lib/runtime/view.d.ts +25 -0
  111. package/lib/runtime/view.d.ts.map +1 -0
  112. package/lib/runtime/view.js +256 -0
  113. package/lib/runtime/view.js.map +1 -0
  114. package/lib/tanstack/collections.d.ts +73 -0
  115. package/lib/tanstack/collections.d.ts.map +1 -0
  116. package/lib/tanstack/collections.js +495 -0
  117. package/lib/tanstack/collections.js.map +1 -0
  118. package/lib/tanstack/createLocalCollection.d.ts +14 -0
  119. package/lib/tanstack/createLocalCollection.d.ts.map +1 -0
  120. package/lib/tanstack/createLocalCollection.js +9 -0
  121. package/lib/tanstack/createLocalCollection.js.map +1 -0
  122. package/lib/tanstack/descriptors.d.ts +33 -0
  123. package/lib/tanstack/descriptors.d.ts.map +1 -0
  124. package/lib/tanstack/descriptors.js +38 -0
  125. package/lib/tanstack/descriptors.js.map +1 -0
  126. package/lib/tanstack/diagnostics.d.ts +23 -0
  127. package/lib/tanstack/diagnostics.d.ts.map +1 -0
  128. package/lib/tanstack/diagnostics.js +14 -0
  129. package/lib/tanstack/diagnostics.js.map +1 -0
  130. package/lib/tanstack/index.d.ts +6 -0
  131. package/lib/tanstack/index.js +6 -0
  132. package/lib/tanstack/localCollection.d.ts +14 -0
  133. package/lib/tanstack/localCollection.d.ts.map +1 -0
  134. package/lib/tanstack/localCollection.js +73 -0
  135. package/lib/tanstack/localCollection.js.map +1 -0
  136. package/lib/tanstack/subset.d.ts +28 -0
  137. package/lib/tanstack/subset.d.ts.map +1 -0
  138. package/lib/tanstack/subset.js +290 -0
  139. package/lib/tanstack/subset.js.map +1 -0
  140. package/lib/testing/sqlite.d.ts +40 -0
  141. package/lib/testing/sqlite.d.ts.map +1 -0
  142. package/lib/testing/sqlite.js +409 -0
  143. package/lib/testing/sqlite.js.map +1 -0
  144. package/lib/testing/sqliteBackend.d.ts +68 -0
  145. package/lib/testing/sqliteBackend.d.ts.map +1 -0
  146. package/lib/testing/sqliteBackend.js +34 -0
  147. package/lib/testing/sqliteBackend.js.map +1 -0
  148. package/lib/utils/index.d.ts +1 -8
  149. package/lib/utils/index.js +2 -5
  150. package/lib/utils/values.d.ts +1 -33
  151. package/lib/worker.d.ts +19 -0
  152. package/lib/worker.d.ts.map +1 -0
  153. package/lib/worker.js +46 -0
  154. package/lib/worker.js.map +1 -0
  155. package/package.json +54 -19
  156. package/lib/_virtual/_rolldown/runtime.js +0 -13
  157. package/lib/cli/format.d.ts +0 -4
  158. package/lib/cli/format.d.ts.map +0 -1
  159. package/lib/cli/format.js +0 -19
  160. package/lib/cli/format.js.map +0 -1
  161. package/lib/cli/generate.d.ts +0 -10
  162. package/lib/cli/generate.d.ts.map +0 -1
  163. package/lib/cli/generate.js +0 -108
  164. package/lib/cli/generate.js.map +0 -1
  165. package/lib/examples/blog.d.ts.map +0 -1
  166. package/lib/examples/blog.js.map +0 -1
  167. package/lib/generate/builders.d.ts +0 -12
  168. package/lib/generate/builders.d.ts.map +0 -1
  169. package/lib/generate/builders.js +0 -58
  170. package/lib/generate/builders.js.map +0 -1
  171. package/lib/generate/constants.d.ts +0 -5
  172. package/lib/generate/constants.d.ts.map +0 -1
  173. package/lib/generate/constants.js +0 -28
  174. package/lib/generate/constants.js.map +0 -1
  175. package/lib/generate/index.d.ts +0 -6
  176. package/lib/generate/index.js +0 -6
  177. package/lib/generate/live.d.ts +0 -12
  178. package/lib/generate/live.d.ts.map +0 -1
  179. package/lib/generate/live.js +0 -48
  180. package/lib/generate/live.js.map +0 -1
  181. package/lib/generate/ontology.d.ts +0 -8
  182. package/lib/generate/ontology.d.ts.map +0 -1
  183. package/lib/generate/ontology.js +0 -501
  184. package/lib/generate/ontology.js.map +0 -1
  185. package/lib/generate/types.d.ts +0 -17
  186. package/lib/generate/types.d.ts.map +0 -1
  187. package/lib/generate/types.js +0 -216
  188. package/lib/generate/types.js.map +0 -1
  189. package/lib/generate/utils/buildJsDocs.d.ts +0 -10
  190. package/lib/generate/utils/buildJsDocs.d.ts.map +0 -1
  191. package/lib/generate/utils/buildJsDocs.js +0 -16
  192. package/lib/generate/utils/buildJsDocs.js.map +0 -1
  193. package/lib/infer.d.ts +0 -222
  194. package/lib/infer.d.ts.map +0 -1
  195. package/lib/infer.js +0 -14
  196. package/lib/infer.js.map +0 -1
  197. package/lib/installation/createMetaOntologyConfiguration.d.ts +0 -10
  198. package/lib/installation/createMetaOntologyConfiguration.d.ts.map +0 -1
  199. package/lib/installation/createMetaOntologyConfiguration.js +0 -16
  200. package/lib/installation/createMetaOntologyConfiguration.js.map +0 -1
  201. package/lib/installation/createOntologyBackendInstallation.d.ts +0 -5
  202. package/lib/installation/createOntologyBackendInstallation.d.ts.map +0 -1
  203. package/lib/installation/createOntologyBackendInstallation.js +0 -221
  204. package/lib/installation/createOntologyBackendInstallation.js.map +0 -1
  205. package/lib/installation/index.d.ts +0 -4
  206. package/lib/installation/index.js +0 -3
  207. package/lib/installation/types.d.ts +0 -94
  208. package/lib/installation/types.d.ts.map +0 -1
  209. package/lib/ir/generated/builders.d.ts +0 -380
  210. package/lib/ir/generated/builders.d.ts.map +0 -1
  211. package/lib/ir/generated/builders.js +0 -186
  212. package/lib/ir/generated/builders.js.map +0 -1
  213. package/lib/ir/generated/constants.d.ts +0 -265
  214. package/lib/ir/generated/constants.d.ts.map +0 -1
  215. package/lib/ir/generated/constants.js +0 -165
  216. package/lib/ir/generated/constants.js.map +0 -1
  217. package/lib/ir/generated/types.d.ts +0 -416
  218. package/lib/ir/generated/types.d.ts.map +0 -1
  219. package/lib/ir/index.d.ts +0 -4
  220. package/lib/ir/index.js +0 -3
  221. package/lib/ir/schema.d.ts +0 -2246
  222. package/lib/ir/schema.d.ts.map +0 -1
  223. package/lib/ir/schema.js +0 -1187
  224. package/lib/ir/schema.js.map +0 -1
  225. package/lib/ir/validate.d.ts +0 -8
  226. package/lib/ir/validate.d.ts.map +0 -1
  227. package/lib/ir/validate.js +0 -623
  228. package/lib/ir/validate.js.map +0 -1
  229. package/lib/json/index.d.ts.map +0 -1
  230. package/lib/json/index.js.map +0 -1
  231. package/lib/lenses.d.ts +0 -21
  232. package/lib/lenses.d.ts.map +0 -1
  233. package/lib/lenses.js +0 -110
  234. package/lib/lenses.js.map +0 -1
  235. package/lib/live/OntologyBackendAdapter.d.ts +0 -100
  236. package/lib/live/OntologyBackendAdapter.d.ts.map +0 -1
  237. package/lib/live/OntologyBackendAdapter.js +0 -1
  238. package/lib/live/actions/createLiveOntologyActions.d.ts +0 -28
  239. package/lib/live/actions/createLiveOntologyActions.d.ts.map +0 -1
  240. package/lib/live/actions/createLiveOntologyActions.js +0 -139
  241. package/lib/live/actions/createLiveOntologyActions.js.map +0 -1
  242. package/lib/live/actions/prepareActionParameters.d.ts +0 -19
  243. package/lib/live/actions/prepareActionParameters.d.ts.map +0 -1
  244. package/lib/live/actions/prepareActionParameters.js +0 -213
  245. package/lib/live/actions/prepareActionParameters.js.map +0 -1
  246. package/lib/live/attachments/attachmentSources.d.ts +0 -10
  247. package/lib/live/attachments/attachmentSources.d.ts.map +0 -1
  248. package/lib/live/attachments/attachmentSources.js +0 -64
  249. package/lib/live/attachments/attachmentSources.js.map +0 -1
  250. package/lib/live/attachments/unsupportedOntologyAttachmentsAdapter.d.ts +0 -5
  251. package/lib/live/attachments/unsupportedOntologyAttachmentsAdapter.d.ts.map +0 -1
  252. package/lib/live/attachments/unsupportedOntologyAttachmentsAdapter.js +0 -6
  253. package/lib/live/attachments/unsupportedOntologyAttachmentsAdapter.js.map +0 -1
  254. package/lib/live/expression.d.ts +0 -23
  255. package/lib/live/expression.d.ts.map +0 -1
  256. package/lib/live/expression.js +0 -160
  257. package/lib/live/expression.js.map +0 -1
  258. package/lib/live/mutators/OntologyEdits.d.ts +0 -15
  259. package/lib/live/mutators/OntologyEdits.d.ts.map +0 -1
  260. package/lib/live/mutators/OntologyEdits.js +0 -65
  261. package/lib/live/mutators/OntologyEdits.js.map +0 -1
  262. package/lib/live/mutators/createMutatorTx.d.ts +0 -11
  263. package/lib/live/mutators/createMutatorTx.d.ts.map +0 -1
  264. package/lib/live/mutators/createMutatorTx.js +0 -61
  265. package/lib/live/mutators/createMutatorTx.js.map +0 -1
  266. package/lib/live/mutators/runOptimisticAction.d.ts +0 -19
  267. package/lib/live/mutators/runOptimisticAction.d.ts.map +0 -1
  268. package/lib/live/mutators/runOptimisticAction.js +0 -30
  269. package/lib/live/mutators/runOptimisticAction.js.map +0 -1
  270. package/lib/live/objects/OntologyObject.d.ts +0 -4
  271. package/lib/live/objects/OntologyObject.d.ts.map +0 -1
  272. package/lib/live/objects/OntologyObject.js +0 -1
  273. package/lib/live/objects/createLiveOntologyObjectCollection.d.ts +0 -17
  274. package/lib/live/objects/createLiveOntologyObjectCollection.d.ts.map +0 -1
  275. package/lib/live/objects/createLiveOntologyObjectCollection.js +0 -55
  276. package/lib/live/objects/createLiveOntologyObjectCollection.js.map +0 -1
  277. package/lib/live/objects/ontologyObjectCollectionId.d.ts +0 -4
  278. package/lib/live/objects/ontologyObjectCollectionId.d.ts.map +0 -1
  279. package/lib/live/objects/ontologyObjectCollectionId.js +0 -8
  280. package/lib/live/objects/ontologyObjectCollectionId.js.map +0 -1
  281. package/lib/live/outbox/createOntologyOutbox.d.ts +0 -23
  282. package/lib/live/outbox/createOntologyOutbox.d.ts.map +0 -1
  283. package/lib/live/outbox/createOntologyOutbox.js +0 -292
  284. package/lib/live/outbox/createOntologyOutbox.js.map +0 -1
  285. package/lib/live/outbox/leaderExecutor.d.ts +0 -20
  286. package/lib/live/outbox/leaderExecutor.d.ts.map +0 -1
  287. package/lib/live/outbox/leaderExecutor.js +0 -130
  288. package/lib/live/outbox/leaderExecutor.js.map +0 -1
  289. package/lib/live/outbox/outboxService.d.ts +0 -7
  290. package/lib/live/outbox/outboxService.d.ts.map +0 -1
  291. package/lib/live/outbox/outboxService.js +0 -68
  292. package/lib/live/outbox/outboxService.js.map +0 -1
  293. package/lib/live/outbox/projectionManager.d.ts +0 -31
  294. package/lib/live/outbox/projectionManager.d.ts.map +0 -1
  295. package/lib/live/outbox/projectionManager.js +0 -127
  296. package/lib/live/outbox/projectionManager.js.map +0 -1
  297. package/lib/live/outbox/repository.d.ts +0 -31
  298. package/lib/live/outbox/repository.d.ts.map +0 -1
  299. package/lib/live/outbox/repository.js +0 -196
  300. package/lib/live/outbox/repository.js.map +0 -1
  301. package/lib/live/outbox/service.d.ts +0 -61
  302. package/lib/live/outbox/service.d.ts.map +0 -1
  303. package/lib/live/outbox/service.js +0 -6
  304. package/lib/live/outbox/service.js.map +0 -1
  305. package/lib/live/outbox/types.js.map +0 -1
  306. package/lib/live/waitForCollectionReady.d.ts +0 -5
  307. package/lib/live/waitForCollectionReady.d.ts.map +0 -1
  308. package/lib/live/waitForCollectionReady.js +0 -49
  309. package/lib/live/waitForCollectionReady.js.map +0 -1
  310. package/lib/meta/createLocalMetaOntologyBackendAdapter.d.ts +0 -7
  311. package/lib/meta/createLocalMetaOntologyBackendAdapter.d.ts.map +0 -1
  312. package/lib/meta/createLocalMetaOntologyBackendAdapter.js +0 -44
  313. package/lib/meta/createLocalMetaOntologyBackendAdapter.js.map +0 -1
  314. package/lib/meta/generated/constants.d.ts +0 -265
  315. package/lib/meta/generated/constants.d.ts.map +0 -1
  316. package/lib/meta/generated/constants.js +0 -165
  317. package/lib/meta/generated/constants.js.map +0 -1
  318. package/lib/meta/generated/types.d.ts +0 -417
  319. package/lib/meta/generated/types.d.ts.map +0 -1
  320. package/lib/meta/generated/types.js +0 -1
  321. package/lib/meta/ontology.d.ts +0 -26
  322. package/lib/meta/ontology.d.ts.map +0 -1
  323. package/lib/meta/ontology.js +0 -111
  324. package/lib/meta/ontology.js.map +0 -1
  325. package/lib/utils/links.d.ts +0 -49
  326. package/lib/utils/links.d.ts.map +0 -1
  327. package/lib/utils/links.js +0 -13
  328. package/lib/utils/links.js.map +0 -1
  329. package/lib/utils/paths.d.ts +0 -6
  330. package/lib/utils/paths.d.ts.map +0 -1
  331. package/lib/utils/paths.js +0 -42
  332. package/lib/utils/paths.js.map +0 -1
  333. package/lib/utils/provide.d.ts +0 -4
  334. package/lib/utils/provide.d.ts.map +0 -1
  335. package/lib/utils/provide.js +0 -9
  336. package/lib/utils/provide.js.map +0 -1
  337. package/lib/utils/targets.d.ts +0 -37
  338. package/lib/utils/targets.d.ts.map +0 -1
  339. package/lib/utils/targets.js +0 -1
  340. package/lib/utils/typeNames.d.ts +0 -28
  341. package/lib/utils/typeNames.d.ts.map +0 -1
  342. package/lib/utils/typeNames.js +0 -1
  343. package/lib/utils/types.d.ts +0 -12
  344. package/lib/utils/types.d.ts.map +0 -1
  345. package/lib/utils/types.js +0 -48
  346. package/lib/utils/types.js.map +0 -1
  347. package/lib/utils/uncertain.d.ts +0 -11
  348. package/lib/utils/uncertain.d.ts.map +0 -1
  349. package/lib/utils/uncertain.js +0 -14
  350. package/lib/utils/uncertain.js.map +0 -1
  351. package/lib/utils/validation.d.ts +0 -7
  352. package/lib/utils/validation.d.ts.map +0 -1
  353. package/lib/utils/validation.js +0 -1
  354. package/lib/utils/values.d.ts.map +0 -1
  355. /package/lib/{installation → live/actions}/types.js +0 -0
  356. /package/lib/{ir/generated → live/objects}/types.js +0 -0
@@ -0,0 +1,1068 @@
1
+ import { OntologyCollectionDescriptors } from "./tanstack/descriptors.js";
2
+ import { AccountRef, AccountRef as AccountRef$1, AccountSummary } from "@party-stack/connect";
3
+ import { BackendError } from "@party-stack/ontology-backend";
4
+ import { RuntimesLayer } from "@party-stack/runtime";
5
+ import { Effect, Scope } from "effect";
6
+ import { OntologyClient, OntologyServerClient } from "@party-stack/ontology-server/rpc";
7
+ //#region src/authentication.d.ts
8
+ /** Collection descriptors for live queries over Connect's saved accounts and
9
+ * configuration. Resolve them through the authentication view's DbClient.
10
+ * Importing descriptors does not open a client or grant access to secret fields.
11
+ */
12
+ export declare const authenticationObjects: OntologyCollectionDescriptors<import("@party-stack/ontology-spec").InferOntology<{
13
+ types: never[];
14
+ objectTypes: ({
15
+ name: "ServiceInstance";
16
+ pluralDisplayName: "Service instances";
17
+ displayName: "Service instance";
18
+ primaryKey: "id";
19
+ properties: ({
20
+ name: "id";
21
+ displayName: "Id";
22
+ type: {
23
+ kind: "string";
24
+ value: {};
25
+ };
26
+ } | {
27
+ name: "title";
28
+ displayName: "Title";
29
+ type: {
30
+ kind: "string";
31
+ value: {};
32
+ };
33
+ } | {
34
+ name: "service";
35
+ displayName: "Service";
36
+ type: {
37
+ kind: "string";
38
+ value: {};
39
+ };
40
+ } | {
41
+ name: "instanceUrl";
42
+ displayName: "Instance url";
43
+ type: {
44
+ kind: "string";
45
+ value: {};
46
+ };
47
+ })[];
48
+ } | {
49
+ name: "OAuthApplication";
50
+ pluralDisplayName: "OAuthApplications";
51
+ displayName: "OAuth application";
52
+ primaryKey: "id";
53
+ properties: ({
54
+ name: "id";
55
+ displayName: "Id";
56
+ type: {
57
+ kind: "string";
58
+ value: {};
59
+ };
60
+ } | {
61
+ name: "title";
62
+ displayName: "Title";
63
+ type: {
64
+ kind: "string";
65
+ value: {};
66
+ };
67
+ } | {
68
+ name: "serviceInstance";
69
+ displayName: "Service instance";
70
+ type: {
71
+ kind: "objectReference";
72
+ value: {
73
+ objectType: "ServiceInstance";
74
+ };
75
+ };
76
+ } | {
77
+ name: "flow";
78
+ displayName: "Flow";
79
+ type: {
80
+ kind: "string";
81
+ value: {
82
+ constraint: {
83
+ kind: "enum";
84
+ value: {
85
+ options: ({
86
+ value: "authorization-code";
87
+ label: "authorization-code";
88
+ } | {
89
+ value: "client-credentials";
90
+ label: "client-credentials";
91
+ })[];
92
+ };
93
+ };
94
+ };
95
+ };
96
+ } | {
97
+ name: "clientId";
98
+ displayName: "Client id";
99
+ type: {
100
+ kind: "string";
101
+ value: {};
102
+ };
103
+ } | {
104
+ name: "scopes";
105
+ displayName: "Requested scopes";
106
+ type: {
107
+ kind: "optional";
108
+ value: {
109
+ type: {
110
+ kind: "list";
111
+ value: {
112
+ elementType: {
113
+ kind: "string";
114
+ value: {};
115
+ };
116
+ };
117
+ };
118
+ };
119
+ };
120
+ } | {
121
+ name: "redirectUrl";
122
+ displayName: "Redirect URL";
123
+ type: {
124
+ kind: "optional";
125
+ value: {
126
+ type: {
127
+ kind: "string";
128
+ value: {};
129
+ };
130
+ };
131
+ };
132
+ } | {
133
+ name: "clientSecret";
134
+ displayName: "Client secret";
135
+ type: {
136
+ kind: "optional";
137
+ value: {
138
+ type: {
139
+ kind: "encrypted";
140
+ value: {
141
+ type: {
142
+ kind: "string";
143
+ value: {};
144
+ };
145
+ };
146
+ };
147
+ };
148
+ };
149
+ } | {
150
+ name: "serviceAppId";
151
+ displayName: "Service app id";
152
+ type: {
153
+ kind: "optional";
154
+ value: {
155
+ type: {
156
+ kind: "string";
157
+ value: {};
158
+ };
159
+ };
160
+ };
161
+ } | {
162
+ name: "connection";
163
+ displayName: "Connection";
164
+ type: {
165
+ kind: "optional";
166
+ value: {
167
+ type: {
168
+ kind: "objectReference";
169
+ value: {
170
+ objectType: "OAuthConnection";
171
+ };
172
+ };
173
+ };
174
+ };
175
+ })[];
176
+ } | {
177
+ name: "OAuthConnection";
178
+ pluralDisplayName: "OAuthConnections";
179
+ displayName: "OAuth connection";
180
+ primaryKey: "id";
181
+ properties: ({
182
+ name: "id";
183
+ displayName: "Id";
184
+ type: {
185
+ kind: "string";
186
+ value: {};
187
+ };
188
+ } | {
189
+ name: "title";
190
+ displayName: "Title";
191
+ type: {
192
+ kind: "string";
193
+ value: {};
194
+ };
195
+ } | {
196
+ name: "application";
197
+ displayName: "Application";
198
+ type: {
199
+ kind: "objectReference";
200
+ value: {
201
+ objectType: "OAuthApplication";
202
+ };
203
+ };
204
+ } | {
205
+ name: "userId";
206
+ displayName: "User id";
207
+ type: {
208
+ kind: "optional";
209
+ value: {
210
+ type: {
211
+ kind: "string";
212
+ value: {};
213
+ };
214
+ };
215
+ };
216
+ } | {
217
+ name: "status";
218
+ displayName: "Status";
219
+ type: {
220
+ kind: "string";
221
+ value: {
222
+ constraint: {
223
+ kind: "enum";
224
+ value: {
225
+ options: ({
226
+ value: "active";
227
+ label: "active";
228
+ } | {
229
+ value: "needs-auth";
230
+ label: "needs-auth";
231
+ } | {
232
+ value: "inactive";
233
+ label: "inactive";
234
+ })[];
235
+ };
236
+ };
237
+ };
238
+ };
239
+ } | {
240
+ name: "accessToken";
241
+ displayName: "Access token";
242
+ type: {
243
+ kind: "optional";
244
+ value: {
245
+ type: {
246
+ kind: "encrypted";
247
+ value: {
248
+ type: {
249
+ kind: "string";
250
+ value: {};
251
+ };
252
+ };
253
+ };
254
+ };
255
+ };
256
+ } | {
257
+ name: "accessTokenExpiresAt";
258
+ displayName: "Access token expires at";
259
+ type: {
260
+ kind: "optional";
261
+ value: {
262
+ type: {
263
+ kind: "timestamp";
264
+ value: {};
265
+ };
266
+ };
267
+ };
268
+ } | {
269
+ name: "refreshToken";
270
+ displayName: "Refresh token";
271
+ type: {
272
+ kind: "optional";
273
+ value: {
274
+ type: {
275
+ kind: "encrypted";
276
+ value: {
277
+ type: {
278
+ kind: "string";
279
+ value: {};
280
+ };
281
+ };
282
+ };
283
+ };
284
+ };
285
+ } | {
286
+ name: "refreshTokenExpiresAt";
287
+ displayName: "Refresh token expires at";
288
+ type: {
289
+ kind: "optional";
290
+ value: {
291
+ type: {
292
+ kind: "timestamp";
293
+ value: {};
294
+ };
295
+ };
296
+ };
297
+ } | {
298
+ name: "grantedScopes";
299
+ displayName: "Granted scopes";
300
+ type: {
301
+ kind: "optional";
302
+ value: {
303
+ type: {
304
+ kind: "string";
305
+ value: {};
306
+ };
307
+ };
308
+ };
309
+ } | {
310
+ name: "operationId";
311
+ displayName: "Operation id";
312
+ type: {
313
+ kind: "optional";
314
+ value: {
315
+ type: {
316
+ kind: "string";
317
+ value: {};
318
+ };
319
+ };
320
+ };
321
+ } | {
322
+ name: "operationExpiresAt";
323
+ displayName: "Operation expires at";
324
+ type: {
325
+ kind: "optional";
326
+ value: {
327
+ type: {
328
+ kind: "timestamp";
329
+ value: {};
330
+ };
331
+ };
332
+ };
333
+ })[];
334
+ } | {
335
+ name: "ApiKeyConnection";
336
+ pluralDisplayName: "API key connections";
337
+ displayName: "API key connection";
338
+ primaryKey: "id";
339
+ properties: ({
340
+ name: "id";
341
+ displayName: "Id";
342
+ type: {
343
+ kind: "string";
344
+ value: {};
345
+ };
346
+ } | {
347
+ name: "title";
348
+ displayName: "Title";
349
+ type: {
350
+ kind: "string";
351
+ value: {};
352
+ };
353
+ } | {
354
+ name: "serviceInstance";
355
+ displayName: "Service instance";
356
+ type: {
357
+ kind: "objectReference";
358
+ value: {
359
+ objectType: "ServiceInstance";
360
+ };
361
+ };
362
+ } | {
363
+ name: "userId";
364
+ displayName: "User id";
365
+ type: {
366
+ kind: "string";
367
+ value: {};
368
+ };
369
+ } | {
370
+ name: "status";
371
+ displayName: "Status";
372
+ type: {
373
+ kind: "string";
374
+ value: {
375
+ constraint: {
376
+ kind: "enum";
377
+ value: {
378
+ options: ({
379
+ value: "active";
380
+ label: "Active";
381
+ } | {
382
+ value: "needs-auth";
383
+ label: "Needs authentication";
384
+ } | {
385
+ value: "inactive";
386
+ label: "Inactive";
387
+ })[];
388
+ };
389
+ };
390
+ };
391
+ };
392
+ } | {
393
+ name: "apiKey";
394
+ displayName: "API key";
395
+ type: {
396
+ kind: "optional";
397
+ value: {
398
+ type: {
399
+ kind: "encrypted";
400
+ value: {
401
+ type: {
402
+ kind: "string";
403
+ value: {};
404
+ };
405
+ };
406
+ };
407
+ };
408
+ };
409
+ } | {
410
+ name: "expiresAt";
411
+ displayName: "Expires at";
412
+ type: {
413
+ kind: "optional";
414
+ value: {
415
+ type: {
416
+ kind: "timestamp";
417
+ value: {};
418
+ };
419
+ };
420
+ };
421
+ })[];
422
+ } | {
423
+ name: "ExternalSessionConnection";
424
+ pluralDisplayName: "External session connections";
425
+ displayName: "External session connection";
426
+ primaryKey: "id";
427
+ properties: ({
428
+ name: "id";
429
+ displayName: "Id";
430
+ type: {
431
+ kind: "string";
432
+ value: {};
433
+ };
434
+ } | {
435
+ name: "title";
436
+ displayName: "Title";
437
+ type: {
438
+ kind: "string";
439
+ value: {};
440
+ };
441
+ } | {
442
+ name: "serviceInstance";
443
+ displayName: "Service instance";
444
+ type: {
445
+ kind: "objectReference";
446
+ value: {
447
+ objectType: "ServiceInstance";
448
+ };
449
+ };
450
+ } | {
451
+ name: "userId";
452
+ displayName: "User id";
453
+ type: {
454
+ kind: "string";
455
+ value: {};
456
+ };
457
+ } | {
458
+ name: "status";
459
+ displayName: "Status";
460
+ type: {
461
+ kind: "string";
462
+ value: {
463
+ constraint: {
464
+ kind: "enum";
465
+ value: {
466
+ options: ({
467
+ value: "active";
468
+ label: "Active";
469
+ } | {
470
+ value: "needs-auth";
471
+ label: "Needs authentication";
472
+ } | {
473
+ value: "inactive";
474
+ label: "Inactive";
475
+ })[];
476
+ };
477
+ };
478
+ };
479
+ };
480
+ } | {
481
+ name: "sessionId";
482
+ displayName: "Session id";
483
+ type: {
484
+ kind: "string";
485
+ value: {};
486
+ };
487
+ } | {
488
+ name: "expiresAt";
489
+ displayName: "Expires at";
490
+ type: {
491
+ kind: "optional";
492
+ value: {
493
+ type: {
494
+ kind: "timestamp";
495
+ value: {};
496
+ };
497
+ };
498
+ };
499
+ })[];
500
+ } | {
501
+ name: "OAuthAuthorizationAttempt";
502
+ pluralDisplayName: "OAuthAuthorizationAttempts";
503
+ displayName: "OAuth authorization attempt";
504
+ primaryKey: "id";
505
+ properties: ({
506
+ name: "id";
507
+ displayName: "Id";
508
+ type: {
509
+ kind: "string";
510
+ value: {};
511
+ };
512
+ } | {
513
+ name: "application";
514
+ displayName: "Application";
515
+ type: {
516
+ kind: "objectReference";
517
+ value: {
518
+ objectType: "OAuthApplication";
519
+ };
520
+ };
521
+ } | {
522
+ name: "principalId";
523
+ displayName: "Principal id";
524
+ type: {
525
+ kind: "optional";
526
+ value: {
527
+ type: {
528
+ kind: "string";
529
+ value: {};
530
+ };
531
+ };
532
+ };
533
+ } | {
534
+ name: "connectionId";
535
+ displayName: "Connection id";
536
+ type: {
537
+ kind: "string";
538
+ value: {};
539
+ };
540
+ } | {
541
+ name: "redirectUrl";
542
+ displayName: "Redirect url";
543
+ type: {
544
+ kind: "string";
545
+ value: {};
546
+ };
547
+ } | {
548
+ name: "returnUrl";
549
+ displayName: "Return url";
550
+ type: {
551
+ kind: "optional";
552
+ value: {
553
+ type: {
554
+ kind: "string";
555
+ value: {};
556
+ };
557
+ };
558
+ };
559
+ } | {
560
+ name: "codeVerifier";
561
+ displayName: "Code verifier";
562
+ type: {
563
+ kind: "encrypted";
564
+ value: {
565
+ type: {
566
+ kind: "string";
567
+ value: {};
568
+ };
569
+ };
570
+ };
571
+ } | {
572
+ name: "expiresAt";
573
+ displayName: "Expires at";
574
+ type: {
575
+ kind: "timestamp";
576
+ value: {};
577
+ };
578
+ } | {
579
+ name: "status";
580
+ displayName: "Status";
581
+ type: {
582
+ kind: "string";
583
+ value: {
584
+ constraint: {
585
+ kind: "enum";
586
+ value: {
587
+ options: ({
588
+ value: "pending";
589
+ label: "pending";
590
+ } | {
591
+ value: "exchanging";
592
+ label: "exchanging";
593
+ } | {
594
+ value: "completed";
595
+ label: "completed";
596
+ } | {
597
+ value: "failed";
598
+ label: "failed";
599
+ })[];
600
+ };
601
+ };
602
+ };
603
+ };
604
+ })[];
605
+ })[];
606
+ linkTypes: never[];
607
+ actionTypes: ({
608
+ name: "beginAuthorization";
609
+ displayName: "Begin authorization";
610
+ logic: never[];
611
+ parameters: ({
612
+ name: "applicationId";
613
+ displayName: "Application";
614
+ type: {
615
+ kind: "objectReference";
616
+ value: {
617
+ objectType: "OAuthApplication";
618
+ };
619
+ };
620
+ } | {
621
+ name: "principalId";
622
+ displayName: "Principal";
623
+ type: {
624
+ kind: "optional";
625
+ value: {
626
+ type: {
627
+ kind: "string";
628
+ value: {};
629
+ };
630
+ };
631
+ };
632
+ } | {
633
+ name: "redirectUrl";
634
+ displayName: "Redirect URL";
635
+ type: {
636
+ kind: "string";
637
+ value: {};
638
+ };
639
+ } | {
640
+ name: "returnUrl";
641
+ displayName: "Return URL";
642
+ type: {
643
+ kind: "optional";
644
+ value: {
645
+ type: {
646
+ kind: "string";
647
+ value: {};
648
+ };
649
+ };
650
+ };
651
+ } | {
652
+ name: "connectionId";
653
+ displayName: "Connection";
654
+ type: {
655
+ kind: "optional";
656
+ value: {
657
+ type: {
658
+ kind: "objectReference";
659
+ value: {
660
+ objectType: "OAuthConnection";
661
+ };
662
+ };
663
+ };
664
+ };
665
+ })[];
666
+ returnType: {
667
+ kind: "struct";
668
+ value: {
669
+ fields: ({
670
+ name: "id";
671
+ displayName: "Attempt";
672
+ type: {
673
+ kind: "string";
674
+ value: {};
675
+ };
676
+ } | {
677
+ name: "authorizationUrl";
678
+ displayName: "Authorization URL";
679
+ type: {
680
+ kind: "string";
681
+ value: {};
682
+ };
683
+ })[];
684
+ };
685
+ };
686
+ } | {
687
+ name: "completeAuthorization";
688
+ displayName: "Complete authorization";
689
+ logic: never[];
690
+ parameters: ({
691
+ name: "callbackUrl";
692
+ displayName: "Callback URL";
693
+ type: {
694
+ kind: "string";
695
+ value: {};
696
+ };
697
+ } | {
698
+ name: "principalId";
699
+ displayName: "Principal";
700
+ type: {
701
+ kind: "optional";
702
+ value: {
703
+ type: {
704
+ kind: "string";
705
+ value: {};
706
+ };
707
+ };
708
+ };
709
+ })[];
710
+ returnType: {
711
+ kind: "struct";
712
+ value: {
713
+ fields: {
714
+ name: "connectionId";
715
+ displayName: "Connection";
716
+ type: {
717
+ kind: "objectReference";
718
+ value: {
719
+ objectType: "OAuthConnection";
720
+ };
721
+ };
722
+ }[];
723
+ };
724
+ };
725
+ } | {
726
+ name: "connectClientCredentials";
727
+ displayName: "Connect client credentials";
728
+ logic: never[];
729
+ parameters: ({
730
+ name: "applicationId";
731
+ displayName: "Application";
732
+ type: {
733
+ kind: "objectReference";
734
+ value: {
735
+ objectType: "OAuthApplication";
736
+ };
737
+ };
738
+ } | {
739
+ name: "connectionId";
740
+ displayName: "Connection";
741
+ type: {
742
+ kind: "optional";
743
+ value: {
744
+ type: {
745
+ kind: "objectReference";
746
+ value: {
747
+ objectType: "OAuthConnection";
748
+ };
749
+ };
750
+ };
751
+ };
752
+ })[];
753
+ returnType: {
754
+ kind: "struct";
755
+ value: {
756
+ fields: {
757
+ name: "connectionId";
758
+ displayName: "Connection";
759
+ type: {
760
+ kind: "objectReference";
761
+ value: {
762
+ objectType: "OAuthConnection";
763
+ };
764
+ };
765
+ }[];
766
+ };
767
+ };
768
+ } | {
769
+ name: "refreshConnection";
770
+ displayName: "Refresh connection";
771
+ logic: never[];
772
+ parameters: {
773
+ name: "connectionId";
774
+ displayName: "Connection";
775
+ type: {
776
+ kind: "objectReference";
777
+ value: {
778
+ objectType: "OAuthConnection";
779
+ };
780
+ };
781
+ }[];
782
+ returnType: {
783
+ kind: "struct";
784
+ value: {
785
+ fields: {
786
+ name: "connectionId";
787
+ displayName: "Connection";
788
+ type: {
789
+ kind: "objectReference";
790
+ value: {
791
+ objectType: "OAuthConnection";
792
+ };
793
+ };
794
+ }[];
795
+ };
796
+ };
797
+ } | {
798
+ name: "disconnectConnection";
799
+ displayName: "Disconnect connection";
800
+ logic: never[];
801
+ parameters: {
802
+ name: "connectionId";
803
+ displayName: "Connection";
804
+ type: {
805
+ kind: "objectReference";
806
+ value: {
807
+ objectType: "OAuthConnection";
808
+ };
809
+ };
810
+ }[];
811
+ } | {
812
+ name: "forgetConnection";
813
+ displayName: "Forget connection";
814
+ logic: never[];
815
+ parameters: {
816
+ name: "connectionId";
817
+ displayName: "Connection";
818
+ type: {
819
+ kind: "objectReference";
820
+ value: {
821
+ objectType: "OAuthConnection";
822
+ };
823
+ };
824
+ }[];
825
+ } | {
826
+ name: "connectApiKey";
827
+ displayName: "Connect API key";
828
+ logic: never[];
829
+ parameters: ({
830
+ name: "serviceInstanceId";
831
+ displayName: "Service instance";
832
+ type: {
833
+ kind: "objectReference";
834
+ value: {
835
+ objectType: "ServiceInstance";
836
+ };
837
+ };
838
+ } | {
839
+ name: "apiKey";
840
+ displayName: "API key";
841
+ type: {
842
+ kind: "string";
843
+ value: {};
844
+ };
845
+ })[];
846
+ returnType: {
847
+ kind: "struct";
848
+ value: {
849
+ fields: {
850
+ name: "connectionId";
851
+ displayName: "Connection";
852
+ type: {
853
+ kind: "objectReference";
854
+ value: {
855
+ objectType: "ApiKeyConnection";
856
+ };
857
+ };
858
+ }[];
859
+ };
860
+ };
861
+ } | {
862
+ name: "attachExternalSession";
863
+ displayName: "Attach external session";
864
+ logic: never[];
865
+ parameters: ({
866
+ name: "serviceInstanceId";
867
+ displayName: "Service instance";
868
+ type: {
869
+ kind: "objectReference";
870
+ value: {
871
+ objectType: "ServiceInstance";
872
+ };
873
+ };
874
+ } | {
875
+ name: "sessionId";
876
+ displayName: "Session id";
877
+ type: {
878
+ kind: "string";
879
+ value: {};
880
+ };
881
+ })[];
882
+ returnType: {
883
+ kind: "struct";
884
+ value: {
885
+ fields: {
886
+ name: "connectionId";
887
+ displayName: "Connection";
888
+ type: {
889
+ kind: "objectReference";
890
+ value: {
891
+ objectType: "ExternalSessionConnection";
892
+ };
893
+ };
894
+ }[];
895
+ };
896
+ };
897
+ } | {
898
+ name: "disconnectApiKey";
899
+ displayName: "Disconnect API key";
900
+ logic: never[];
901
+ parameters: {
902
+ name: "connectionId";
903
+ displayName: "Connection";
904
+ type: {
905
+ kind: "objectReference";
906
+ value: {
907
+ objectType: "ApiKeyConnection";
908
+ };
909
+ };
910
+ }[];
911
+ } | {
912
+ name: "forgetApiKey";
913
+ displayName: "Forget API key";
914
+ logic: never[];
915
+ parameters: {
916
+ name: "connectionId";
917
+ displayName: "Connection";
918
+ type: {
919
+ kind: "objectReference";
920
+ value: {
921
+ objectType: "ApiKeyConnection";
922
+ };
923
+ };
924
+ }[];
925
+ } | {
926
+ name: "disconnectExternalSession";
927
+ displayName: "Disconnect external session";
928
+ logic: never[];
929
+ parameters: {
930
+ name: "connectionId";
931
+ displayName: "Connection";
932
+ type: {
933
+ kind: "objectReference";
934
+ value: {
935
+ objectType: "ExternalSessionConnection";
936
+ };
937
+ };
938
+ }[];
939
+ } | {
940
+ name: "forgetExternalSession";
941
+ displayName: "Forget external session";
942
+ logic: never[];
943
+ parameters: {
944
+ name: "connectionId";
945
+ displayName: "Connection";
946
+ type: {
947
+ kind: "objectReference";
948
+ value: {
949
+ objectType: "ExternalSessionConnection";
950
+ };
951
+ };
952
+ }[];
953
+ })[];
954
+ queryFunctionTypes: never[];
955
+ }>, Record<never, never>>;
956
+ export interface AuthenticationClientOptions {
957
+ readonly client: OntologyServerClient | Effect.Effect<OntologyClient | OntologyServerClient, BackendError, Scope.Scope>;
958
+ readonly ontology?: string;
959
+ readonly runtime?: RuntimesLayer;
960
+ }
961
+ /** Promise browser commands over the selected Connect ontology. Inventory is read
962
+ * from its ordinary Query endpoint; no account stream or authentication-method proxy.
963
+ * Authentication workflows execute directly and never enter an optimistic outbox.
964
+ */
965
+ export declare function createAuthenticationClient(options: AuthenticationClientOptions): Promise<{
966
+ oauth(settings: Parameters<(settings: {
967
+ readonly applicationId: string;
968
+ readonly redirectUrl: string;
969
+ }) => {
970
+ redirectUrl: string;
971
+ signIn: (input?: Parameters<(options?: {
972
+ browserPresentation?: import("@party-stack/runtime").BrowserAuthenticationPresentation;
973
+ connectionId?: string;
974
+ }) => Effect.Effect<import("@party-stack/connect").Connection<"active"> & {
975
+ readonly id: string;
976
+ }, BackendError>>[0]) => Effect.Effect<{
977
+ userId: string;
978
+ state: {
979
+ readonly status: "active";
980
+ readonly expiration?: {
981
+ readonly expiresAt: number;
982
+ readonly refreshable: boolean;
983
+ } | undefined;
984
+ } & {
985
+ status: "active";
986
+ };
987
+ id: string;
988
+ kind: "oauth";
989
+ }, BackendError<"Conflict" | "Forbidden" | "HistoryExpired" | "Internal" | "InvalidConfiguration" | "InvalidRequest" | "InvalidResponse" | "NotFound" | "NotImplemented" | "RateLimited" | "ResultExpired" | "SchemaMismatch" | "SessionExpired" | "SessionReplaced" | "SourceMismatch" | "Unauthenticated" | "Unavailable" | "ValidationFailed" | "ViewReplaced">, never>;
990
+ complete: (url: string) => Effect.Effect<{
991
+ userId: string;
992
+ state: {
993
+ readonly status: "active";
994
+ readonly expiration?: {
995
+ readonly expiresAt: number;
996
+ readonly refreshable: boolean;
997
+ } | undefined;
998
+ } & {
999
+ status: "active";
1000
+ };
1001
+ id: string;
1002
+ kind: "oauth";
1003
+ } | undefined, BackendError<"Conflict" | "Forbidden" | "HistoryExpired" | "Internal" | "InvalidConfiguration" | "InvalidRequest" | "InvalidResponse" | "NotFound" | "NotImplemented" | "RateLimited" | "ResultExpired" | "SchemaMismatch" | "SessionExpired" | "SessionReplaced" | "SourceMismatch" | "Unauthenticated" | "Unavailable" | "ValidationFailed" | "ViewReplaced">, never>;
1004
+ }>[0]): {
1005
+ signIn: (settings?: Parameters<(input?: Parameters<(options?: {
1006
+ browserPresentation?: import("@party-stack/runtime").BrowserAuthenticationPresentation;
1007
+ connectionId?: string;
1008
+ }) => Effect.Effect<import("@party-stack/connect").Connection<"active"> & {
1009
+ readonly id: string;
1010
+ }, BackendError>>[0]) => Effect.Effect<{
1011
+ userId: string;
1012
+ state: {
1013
+ readonly status: "active";
1014
+ readonly expiration?: {
1015
+ readonly expiresAt: number;
1016
+ readonly refreshable: boolean;
1017
+ } | undefined;
1018
+ } & {
1019
+ status: "active";
1020
+ };
1021
+ id: string;
1022
+ kind: "oauth";
1023
+ }, BackendError<"Conflict" | "Forbidden" | "HistoryExpired" | "Internal" | "InvalidConfiguration" | "InvalidRequest" | "InvalidResponse" | "NotFound" | "NotImplemented" | "RateLimited" | "ResultExpired" | "SchemaMismatch" | "SessionExpired" | "SessionReplaced" | "SourceMismatch" | "Unauthenticated" | "Unavailable" | "ValidationFailed" | "ViewReplaced">, never>>[0]) => Promise<{
1024
+ userId: string;
1025
+ state: {
1026
+ readonly status: "active";
1027
+ readonly expiration?: {
1028
+ readonly expiresAt: number;
1029
+ readonly refreshable: boolean;
1030
+ } | undefined;
1031
+ } & {
1032
+ status: "active";
1033
+ };
1034
+ id: string;
1035
+ kind: "oauth";
1036
+ }>;
1037
+ complete: (url: string) => Promise<{
1038
+ userId: string;
1039
+ state: {
1040
+ readonly status: "active";
1041
+ readonly expiration?: {
1042
+ readonly expiresAt: number;
1043
+ readonly refreshable: boolean;
1044
+ } | undefined;
1045
+ } & {
1046
+ status: "active";
1047
+ };
1048
+ id: string;
1049
+ kind: "oauth";
1050
+ } | undefined>;
1051
+ };
1052
+ attachExternalSession: (instance: string, session: string) => Promise<{
1053
+ kind: "external-session";
1054
+ id: string;
1055
+ }>;
1056
+ connectApiKey: (instance: string, key: string) => Promise<{
1057
+ kind: "api-key";
1058
+ id: string;
1059
+ }>;
1060
+ signOut: (account: AccountRef$1) => Promise<void>;
1061
+ forget: (account: AccountRef$1) => Promise<void>;
1062
+ connections: () => Promise<import("@party-stack/connect").AccountSummary[]>;
1063
+ cleanup: () => Promise<void>;
1064
+ }>;
1065
+ export type AuthenticationClient = Awaited<ReturnType<typeof createAuthenticationClient>>;
1066
+ //#endregion
1067
+ export type { AccountRef, AccountSummary };
1068
+ //# sourceMappingURL=authentication.d.ts.map