@nurama/types 1.4.1 → 1.4.3

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.
package/dist/device.d.ts CHANGED
@@ -98,3 +98,35 @@ export interface GetUserDevicesQuery {
98
98
  /** Filter by device type */
99
99
  deviceType?: DeviceType;
100
100
  }
101
+ /** A file in an upload Live Activity's batch, as the app sees it (the API carries it on through processing). */
102
+ export interface LiveActivityFile {
103
+ /** The app's id for the file in its upload queue. */
104
+ key: string;
105
+ /** The asset, once the API has created it. */
106
+ assetId?: string | null;
107
+ kind: 'image' | 'video' | 'file';
108
+ size: number;
109
+ state: 'uploading' | 'processing' | 'ready' | 'failed';
110
+ /** 0–1 through the current state: bytes sent, or the processing percent. */
111
+ progress: number;
112
+ }
113
+ /**
114
+ * Register or refresh an upload Live Activity
115
+ */
116
+ export interface RegisterLiveActivityBody {
117
+ /** The caller's registered iOS device the activity runs on (from `registerDevice`). */
118
+ deviceId: string;
119
+ /** The activity's own APNs push token (hex). */
120
+ pushToken: string;
121
+ /** App bundle id; the push topic is `<bundleId>.push-type.liveactivity`. */
122
+ bundleId: string;
123
+ /** The APNs environment the app's build receives pushes from. */
124
+ apnsEnvironment: 'production' | 'development';
125
+ /** Where the batch is going, as the activity shows it. */
126
+ destination?: string;
127
+ files: LiveActivityFile[];
128
+ }
129
+ export interface LiveActivityRegistration {
130
+ id: string;
131
+ stage: 'uploading' | 'processing' | 'done';
132
+ }
package/dist/user.d.ts CHANGED
@@ -141,6 +141,42 @@ export interface User {
141
141
  */
142
142
  updatedAt?: number;
143
143
  }
144
+ /**
145
+ * A passkey saved to the user's account. The key itself never leaves the user's device or password manager.
146
+ */
147
+ export interface Passkey {
148
+ id: string;
149
+ /** A name to tell it apart, e.g. "MacBook" */
150
+ name: string;
151
+ /** `multiDevice` passkeys sync between devices (iCloud Keychain, Google Password Manager, 1Password) */
152
+ deviceType: 'singleDevice' | 'multiDevice';
153
+ backedUp: boolean;
154
+ transports: string[];
155
+ createdAt: string;
156
+ lastUsedAt: string | null;
157
+ }
158
+ /**
159
+ * What adding a passkey asks for: the password when the account has one, and a two-factor code when two-factor is
160
+ * on. An account with neither sends nothing.
161
+ */
162
+ export interface PasskeyRegistrationProof {
163
+ password?: string;
164
+ mfaToken?: string;
165
+ }
166
+ /**
167
+ * WebAuthn options for the browser's passkey prompt (PublicKeyCredentialCreationOptionsJSON or
168
+ * PublicKeyCredentialRequestOptionsJSON). Passed straight to the WebAuthn library, so kept opaque here.
169
+ */
170
+ export type PasskeyCredentialOptions = Record<string, unknown> & {
171
+ challenge: string;
172
+ };
173
+ /**
174
+ * The browser's response to a passkey prompt (RegistrationResponseJSON or AuthenticationResponseJSON), as the
175
+ * WebAuthn library returns it.
176
+ */
177
+ export type PasskeyCredentialResponse = Record<string, unknown> & {
178
+ id: string;
179
+ };
144
180
  /**
145
181
  * OAuth platform types
146
182
  */
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@nurama/types",
3
- "version": "1.4.1",
3
+ "version": "1.4.3",
4
4
  "description": "Shared TypeScript types for the Nurama ecosystem",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",
package/src/device.ts CHANGED
@@ -106,3 +106,38 @@ export interface GetUserDevicesQuery {
106
106
  /** Filter by device type */
107
107
  deviceType?: DeviceType;
108
108
  }
109
+
110
+ /** A file in an upload Live Activity's batch, as the app sees it (the API carries it on through processing). */
111
+ export interface LiveActivityFile {
112
+ /** The app's id for the file in its upload queue. */
113
+ key: string;
114
+ /** The asset, once the API has created it. */
115
+ assetId?: string | null;
116
+ kind: 'image' | 'video' | 'file';
117
+ size: number;
118
+ state: 'uploading' | 'processing' | 'ready' | 'failed';
119
+ /** 0–1 through the current state: bytes sent, or the processing percent. */
120
+ progress: number;
121
+ }
122
+
123
+ /**
124
+ * Register or refresh an upload Live Activity
125
+ */
126
+ export interface RegisterLiveActivityBody {
127
+ /** The caller's registered iOS device the activity runs on (from `registerDevice`). */
128
+ deviceId: string;
129
+ /** The activity's own APNs push token (hex). */
130
+ pushToken: string;
131
+ /** App bundle id; the push topic is `<bundleId>.push-type.liveactivity`. */
132
+ bundleId: string;
133
+ /** The APNs environment the app's build receives pushes from. */
134
+ apnsEnvironment: 'production' | 'development';
135
+ /** Where the batch is going, as the activity shows it. */
136
+ destination?: string;
137
+ files: LiveActivityFile[];
138
+ }
139
+
140
+ export interface LiveActivityRegistration {
141
+ id: string;
142
+ stage: 'uploading' | 'processing' | 'done';
143
+ }
package/src/user.ts CHANGED
@@ -146,6 +146,42 @@ export interface User {
146
146
  updatedAt?: number;
147
147
  }
148
148
 
149
+ /**
150
+ * A passkey saved to the user's account. The key itself never leaves the user's device or password manager.
151
+ */
152
+ export interface Passkey {
153
+ id: string;
154
+ /** A name to tell it apart, e.g. "MacBook" */
155
+ name: string;
156
+ /** `multiDevice` passkeys sync between devices (iCloud Keychain, Google Password Manager, 1Password) */
157
+ deviceType: 'singleDevice' | 'multiDevice';
158
+ backedUp: boolean;
159
+ transports: string[];
160
+ createdAt: string;
161
+ lastUsedAt: string | null;
162
+ }
163
+
164
+ /**
165
+ * What adding a passkey asks for: the password when the account has one, and a two-factor code when two-factor is
166
+ * on. An account with neither sends nothing.
167
+ */
168
+ export interface PasskeyRegistrationProof {
169
+ password?: string;
170
+ mfaToken?: string;
171
+ }
172
+
173
+ /**
174
+ * WebAuthn options for the browser's passkey prompt (PublicKeyCredentialCreationOptionsJSON or
175
+ * PublicKeyCredentialRequestOptionsJSON). Passed straight to the WebAuthn library, so kept opaque here.
176
+ */
177
+ export type PasskeyCredentialOptions = Record<string, unknown> & { challenge: string };
178
+
179
+ /**
180
+ * The browser's response to a passkey prompt (RegistrationResponseJSON or AuthenticationResponseJSON), as the
181
+ * WebAuthn library returns it.
182
+ */
183
+ export type PasskeyCredentialResponse = Record<string, unknown> & { id: string };
184
+
149
185
  /**
150
186
  * OAuth platform types
151
187
  */