@reclaimprotocol/client 0.1.0-dev.1 → 0.1.0-dev.2

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.
@@ -2,13 +2,13 @@ import type { components, operations } from './openapi.gen.ts'
2
2
 
3
3
  export type IOperationId = keyof operations
4
4
 
5
- type RequestBodyContent<T> = T extends {
5
+ export type RequestBodyContent<T> = T extends {
6
6
  content: { 'application/json': infer R }
7
7
  }
8
8
  ? R
9
9
  : T extends { content: { 'application/x-www-form-urlencoded': infer R } }
10
- ? R
11
- : undefined
10
+ ? R
11
+ : undefined
12
12
 
13
13
  export type IJsonRequestBody<T extends IOperationId> = operations[T] extends {
14
14
  requestBody?: infer B
@@ -21,10 +21,10 @@ type AnySuccess<R> = R extends {
21
21
  }
22
22
  ? J
23
23
  : R extends { 201: { content: { 'application/json': infer J } } }
24
- ? J
25
- : R extends { 204: unknown }
26
- ? void
27
- : unknown
24
+ ? J
25
+ : R extends { 204: unknown }
26
+ ? void
27
+ : unknown
28
28
 
29
29
  export type IJsonResponseBody<T extends IOperationId> = operations[T] extends {
30
30
  responses: infer R
@@ -61,20 +61,50 @@ export type IOperationArgs<T extends IOperationId> = {
61
61
  body?: IJsonRequestBody<T> | undefined
62
62
  headers?: IHeaders<T> | undefined
63
63
  } & (
64
- [IParams<T>] extends [undefined] ? unknown : { params: IParams<T> }
65
- ) & (
66
- [IQuery<T>] extends [undefined] ? unknown : { query: IQuery<T> }
67
- ) & (
68
- [IJsonRequestBody<T>] extends [undefined]
69
- ? unknown
70
- : { body: IJsonRequestBody<T> }
71
- ) & (
72
- [IHeaders<T>] extends [undefined] ? unknown : { headers: IHeaders<T> }
73
- )
64
+ [IParams<T>] extends [undefined] ? unknown : { params: IParams<T> }
65
+ ) & (
66
+ [IQuery<T>] extends [undefined] ? unknown : { query: IQuery<T> }
67
+ ) & (
68
+ [IJsonRequestBody<T>] extends [undefined]
69
+ ? unknown
70
+ : { body: IJsonRequestBody<T> }
71
+ ) & (
72
+ [IHeaders<T>] extends [undefined] ? unknown : { headers: IHeaders<T> }
73
+ )
74
74
 
75
75
  export type IOperationResponse<T extends IOperationId> = IJsonResponseBody<T>
76
76
 
77
77
  // RFC 9457 — Problem Details for HTTP APIs.
78
78
  export type ProblemDetails = components['schemas']['Problem'] & {
79
79
  [key: string]: unknown
80
- }
80
+ }
81
+
82
+ // Consumer-facing schema types, re-exported so SDK users import them from
83
+ // `@reclaimprotocol/client` instead of reaching into the generated file.
84
+ export type VerificationSession =
85
+ components['schemas']['VerificationSession']
86
+ export type VerificationStatus = components['schemas']['VerificationStatus']
87
+ export type VerificationEventRecord =
88
+ components['schemas']['VerificationEventRecord']
89
+ export type CallbackSubscription =
90
+ components['schemas']['CallbackSubscription']
91
+ export type CallbackDeliveryStatus =
92
+ components['schemas']['CallbackDeliveryStatus']
93
+ export type VerificationResultDelivery =
94
+ components['schemas']['VerificationResultDelivery']
95
+ // (`Jws` is intentionally NOT re-exported here — `result.ts` exports the
96
+ // canonical hand-written Jws type the SDK helpers operate on.)
97
+ export type ProviderRequiredContext =
98
+ components['schemas']['ProviderRequiredContext']
99
+ export type Provider = components['schemas']['Provider']
100
+ export type ProviderVersion = components['schemas']['ProviderVersion']
101
+ export type OrgCredential = components['schemas']['OrgCredential']
102
+ export type JwkX25519Public = components['schemas']['JwkX25519Public']
103
+ export type OrgToken = components['schemas']['OrgToken']
104
+ export type OrgTokenMeta = components['schemas']['OrgTokenMeta']
105
+ export type Organization = components['schemas']['Organization']
106
+ export type CredentialAttachSession =
107
+ components['schemas']['CredentialAttachSession']
108
+ export type CreateProviderVersionRequest =
109
+ components['schemas']['CreateProviderVersionRequest']
110
+ export type ProviderVersionRef = components['schemas']['ProviderVersionRef']