@inkbox/sdk 0.1.2 → 0.1.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/README.md +45 -1
- package/dist/agent_identity.d.ts +68 -1
- package/dist/agent_identity.d.ts.map +1 -1
- package/dist/agent_identity.js +109 -0
- package/dist/agent_identity.js.map +1 -1
- package/dist/authenticator/resources/accounts.d.ts +70 -0
- package/dist/authenticator/resources/accounts.d.ts.map +1 -0
- package/dist/authenticator/resources/accounts.js +91 -0
- package/dist/authenticator/resources/accounts.js.map +1 -0
- package/dist/authenticator/resources/apps.d.ts +38 -0
- package/dist/authenticator/resources/apps.d.ts.map +1 -0
- package/dist/authenticator/resources/apps.js +52 -0
- package/dist/authenticator/resources/apps.js.map +1 -0
- package/dist/authenticator/types.d.ts +83 -0
- package/dist/authenticator/types.d.ts.map +1 -0
- package/dist/authenticator/types.js +43 -0
- package/dist/authenticator/types.js.map +1 -0
- package/dist/identities/resources/identities.d.ts +15 -0
- package/dist/identities/resources/identities.d.ts.map +1 -1
- package/dist/identities/resources/identities.js +18 -0
- package/dist/identities/resources/identities.js.map +1 -1
- package/dist/identities/types.d.ts +21 -0
- package/dist/identities/types.d.ts.map +1 -1
- package/dist/identities/types.js +11 -0
- package/dist/identities/types.js.map +1 -1
- package/dist/index.d.ts +2 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/inkbox.d.ts +6 -0
- package/dist/inkbox.d.ts.map +1 -1
- package/dist/inkbox.js +9 -0
- package/dist/inkbox.js.map +1 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# @inkbox/sdk
|
|
2
2
|
|
|
3
|
-
TypeScript SDK for the [Inkbox API](https://www.inkbox.ai/docs) — API-first communication infrastructure for AI agents (email, phone, identities).
|
|
3
|
+
TypeScript SDK for the [Inkbox API](https://www.inkbox.ai/docs) — API-first communication infrastructure for AI agents (email, phone, authenticator/OTP, identities).
|
|
4
4
|
|
|
5
5
|
## Install
|
|
6
6
|
|
|
@@ -206,6 +206,46 @@ for (const t of hits) {
|
|
|
206
206
|
|
|
207
207
|
---
|
|
208
208
|
|
|
209
|
+
## Authenticator
|
|
210
|
+
|
|
211
|
+
```ts
|
|
212
|
+
// Create an authenticator app and link it to an identity
|
|
213
|
+
const app = await identity.createAuthenticatorApp();
|
|
214
|
+
|
|
215
|
+
// Add an OTP account from an otpauth:// URI
|
|
216
|
+
const account = await identity.createAuthenticatorAccount({
|
|
217
|
+
otpauthUri: "otpauth://totp/Example:user@example.com?secret=EXAMPLESECRET&issuer=Example",
|
|
218
|
+
displayName: "My OTP Account", // optional (max 255 chars)
|
|
219
|
+
description: "Login MFA for Example", // optional
|
|
220
|
+
});
|
|
221
|
+
|
|
222
|
+
// List all accounts in this identity's authenticator app
|
|
223
|
+
const accounts = await identity.listAuthenticatorAccounts();
|
|
224
|
+
|
|
225
|
+
// Get a single account
|
|
226
|
+
const acct = await identity.getAuthenticatorAccount("account-uuid");
|
|
227
|
+
|
|
228
|
+
// Update account metadata (pass null to clear a field)
|
|
229
|
+
await identity.updateAuthenticatorAccount("account-uuid", { displayName: "New Label" });
|
|
230
|
+
|
|
231
|
+
// Generate an OTP code
|
|
232
|
+
const otp = await identity.generateOtp("account-uuid");
|
|
233
|
+
console.log(otp.otpCode); // e.g. "482901"
|
|
234
|
+
console.log(otp.validForSeconds); // seconds until expiry (null for HOTP)
|
|
235
|
+
console.log(otp.otpType); // "totp" or "hotp"
|
|
236
|
+
|
|
237
|
+
// Delete an account
|
|
238
|
+
await identity.deleteAuthenticatorAccount("account-uuid");
|
|
239
|
+
|
|
240
|
+
// Unlink authenticator app from identity
|
|
241
|
+
await identity.unlinkAuthenticatorApp();
|
|
242
|
+
|
|
243
|
+
// Delete the authenticator app (org-level)
|
|
244
|
+
await inkbox.authenticatorApps.delete("app-uuid");
|
|
245
|
+
```
|
|
246
|
+
|
|
247
|
+
---
|
|
248
|
+
|
|
209
249
|
## Org-level Mailboxes
|
|
210
250
|
|
|
211
251
|
Manage mailboxes directly without going through an identity. Access via `inkbox.mailboxes`.
|
|
@@ -351,6 +391,10 @@ Runnable example scripts are available in the [examples/typescript](https://gith
|
|
|
351
391
|
| `read-agent-calls.ts` | List calls and print transcripts |
|
|
352
392
|
| `receive-agent-email-webhook.ts` | Register and delete a mailbox webhook |
|
|
353
393
|
| `receive-agent-call-webhook.ts` | Register, update, and delete a phone webhook |
|
|
394
|
+
| `agent-authenticator-app-e2e.ts` | Full authenticator app lifecycle (create, OTP, cleanup) |
|
|
395
|
+
| `create-authenticator.ts` | Create an authenticator app and add an OTP account |
|
|
396
|
+
| `generate-otp.ts` | Generate an OTP code for an account |
|
|
397
|
+
| `list-authenticator-accounts.ts` | List authenticator accounts for an identity |
|
|
354
398
|
|
|
355
399
|
## License
|
|
356
400
|
|
package/dist/agent_identity.d.ts
CHANGED
|
@@ -8,15 +8,17 @@
|
|
|
8
8
|
* identity's assigned channels so callers never need to pass an email
|
|
9
9
|
* address or phone number ID explicitly.
|
|
10
10
|
*/
|
|
11
|
+
import type { AuthenticatorAccount, AuthenticatorApp, OTPCode } from "./authenticator/types.js";
|
|
11
12
|
import type { Message, MessageDetail, ThreadDetail } from "./mail/types.js";
|
|
12
13
|
import type { PhoneCall, PhoneCallWithRateLimit, PhoneTranscript } from "./phone/types.js";
|
|
13
|
-
import type { _AgentIdentityData, IdentityMailbox, IdentityPhoneNumber } from "./identities/types.js";
|
|
14
|
+
import type { _AgentIdentityData, IdentityAuthenticatorApp, IdentityMailbox, IdentityPhoneNumber } from "./identities/types.js";
|
|
14
15
|
import type { Inkbox } from "./inkbox.js";
|
|
15
16
|
export declare class AgentIdentity {
|
|
16
17
|
private _data;
|
|
17
18
|
private readonly _inkbox;
|
|
18
19
|
private _mailbox;
|
|
19
20
|
private _phoneNumber;
|
|
21
|
+
private _authenticatorApp;
|
|
20
22
|
constructor(data: _AgentIdentityData, inkbox: Inkbox);
|
|
21
23
|
get agentHandle(): string;
|
|
22
24
|
get id(): string;
|
|
@@ -25,6 +27,8 @@ export declare class AgentIdentity {
|
|
|
25
27
|
get mailbox(): IdentityMailbox | null;
|
|
26
28
|
/** The phone number currently assigned to this identity, or `null` if none. */
|
|
27
29
|
get phoneNumber(): IdentityPhoneNumber | null;
|
|
30
|
+
/** The authenticator app currently assigned to this identity, or `null` if none. */
|
|
31
|
+
get authenticatorApp(): IdentityAuthenticatorApp | null;
|
|
28
32
|
/**
|
|
29
33
|
* Create a new mailbox and link it to this identity.
|
|
30
34
|
*
|
|
@@ -69,6 +73,24 @@ export declare class AgentIdentity {
|
|
|
69
73
|
* Unlink this identity's phone number (does not release the number).
|
|
70
74
|
*/
|
|
71
75
|
unlinkPhoneNumber(): Promise<void>;
|
|
76
|
+
/**
|
|
77
|
+
* Create a new authenticator app and link it to this identity.
|
|
78
|
+
*
|
|
79
|
+
* @returns The newly created {@link AuthenticatorApp}.
|
|
80
|
+
*/
|
|
81
|
+
createAuthenticatorApp(): Promise<AuthenticatorApp>;
|
|
82
|
+
/**
|
|
83
|
+
* Link an existing authenticator app to this identity.
|
|
84
|
+
*
|
|
85
|
+
* @param authenticatorAppId - UUID of the authenticator app to link. Obtain via
|
|
86
|
+
* `inkbox.authenticatorApps.list()` or `inkbox.authenticatorApps.get()`.
|
|
87
|
+
* @returns The linked {@link IdentityAuthenticatorApp}.
|
|
88
|
+
*/
|
|
89
|
+
assignAuthenticatorApp(authenticatorAppId: string): Promise<IdentityAuthenticatorApp>;
|
|
90
|
+
/**
|
|
91
|
+
* Unlink this identity's authenticator app (does not delete the app).
|
|
92
|
+
*/
|
|
93
|
+
unlinkAuthenticatorApp(): Promise<void>;
|
|
72
94
|
/**
|
|
73
95
|
* Send an email from this identity's mailbox.
|
|
74
96
|
*
|
|
@@ -165,6 +187,50 @@ export declare class AgentIdentity {
|
|
|
165
187
|
* @param callId - ID of the call to fetch transcripts for.
|
|
166
188
|
*/
|
|
167
189
|
listTranscripts(callId: string): Promise<PhoneTranscript[]>;
|
|
190
|
+
/**
|
|
191
|
+
* Create a new authenticator account from an `otpauth://` URI.
|
|
192
|
+
*
|
|
193
|
+
* @param options.otpauthUri - `otpauth://totp/...` or `otpauth://hotp/...` URI.
|
|
194
|
+
* @param options.displayName - Optional user-managed label (max 255 characters).
|
|
195
|
+
* @param options.description - Optional free-form notes.
|
|
196
|
+
*/
|
|
197
|
+
createAuthenticatorAccount(options: {
|
|
198
|
+
otpauthUri: string;
|
|
199
|
+
displayName?: string;
|
|
200
|
+
description?: string;
|
|
201
|
+
}): Promise<AuthenticatorAccount>;
|
|
202
|
+
/** List all authenticator accounts in this identity's app. */
|
|
203
|
+
listAuthenticatorAccounts(): Promise<AuthenticatorAccount[]>;
|
|
204
|
+
/**
|
|
205
|
+
* Get a single authenticator account by ID.
|
|
206
|
+
*
|
|
207
|
+
* @param accountId - UUID of the authenticator account.
|
|
208
|
+
*/
|
|
209
|
+
getAuthenticatorAccount(accountId: string): Promise<AuthenticatorAccount>;
|
|
210
|
+
/**
|
|
211
|
+
* Update user-managed metadata on an authenticator account.
|
|
212
|
+
*
|
|
213
|
+
* @param accountId - UUID of the authenticator account to update.
|
|
214
|
+
* @param options.displayName - New label (max 255 characters).
|
|
215
|
+
* @param options.description - New notes.
|
|
216
|
+
*/
|
|
217
|
+
updateAuthenticatorAccount(accountId: string, options: {
|
|
218
|
+
displayName?: string | null;
|
|
219
|
+
description?: string | null;
|
|
220
|
+
}): Promise<AuthenticatorAccount>;
|
|
221
|
+
/**
|
|
222
|
+
* Soft-delete an authenticator account.
|
|
223
|
+
*
|
|
224
|
+
* @param accountId - UUID of the authenticator account to delete.
|
|
225
|
+
*/
|
|
226
|
+
deleteAuthenticatorAccount(accountId: string): Promise<void>;
|
|
227
|
+
/**
|
|
228
|
+
* Generate the current OTP code for an authenticator account.
|
|
229
|
+
*
|
|
230
|
+
* @param accountId - UUID of the authenticator account.
|
|
231
|
+
* @returns The generated OTP code with metadata.
|
|
232
|
+
*/
|
|
233
|
+
generateOtp(accountId: string): Promise<OTPCode>;
|
|
168
234
|
/**
|
|
169
235
|
* Update this identity's handle or status.
|
|
170
236
|
*
|
|
@@ -185,5 +251,6 @@ export declare class AgentIdentity {
|
|
|
185
251
|
delete(): Promise<void>;
|
|
186
252
|
private _requireMailbox;
|
|
187
253
|
private _requirePhone;
|
|
254
|
+
private _requireAuthenticatorApp;
|
|
188
255
|
}
|
|
189
256
|
//# sourceMappingURL=agent_identity.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"agent_identity.d.ts","sourceRoot":"","sources":["../src/agent_identity.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AAGH,OAAO,KAAK,EAAE,OAAO,EAAE,aAAa,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAC;AAC5E,OAAO,KAAK,EAAE,SAAS,EAAE,sBAAsB,EAAE,eAAe,EAAE,MAAM,kBAAkB,CAAC;AAC3F,OAAO,KAAK,EAEV,kBAAkB,EAClB,eAAe,EACf,mBAAmB,EACpB,MAAM,uBAAuB,CAAC;AAC/B,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,aAAa,CAAC;AAE1C,qBAAa,aAAa;IACxB,OAAO,CAAC,KAAK,CAAqB;IAClC,OAAO,CAAC,QAAQ,CAAC,OAAO,CAAS;IACjC,OAAO,CAAC,QAAQ,CAAyB;IACzC,OAAO,CAAC,YAAY,CAA6B;
|
|
1
|
+
{"version":3,"file":"agent_identity.d.ts","sourceRoot":"","sources":["../src/agent_identity.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AAGH,OAAO,KAAK,EAAE,oBAAoB,EAAE,gBAAgB,EAAE,OAAO,EAAE,MAAM,0BAA0B,CAAC;AAChG,OAAO,KAAK,EAAE,OAAO,EAAE,aAAa,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAC;AAC5E,OAAO,KAAK,EAAE,SAAS,EAAE,sBAAsB,EAAE,eAAe,EAAE,MAAM,kBAAkB,CAA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G,OAAO,CAAC,OAAO,CAAC;IAStD;;;;;OAKG;IACG,MAAM,CAAC,OAAO,EAAE;QAAE,SAAS,CAAC,EAAE,MAAM,CAAC;QAAC,MAAM,CAAC,EAAE,MAAM,CAAA;KAAE,GAAG,OAAO,CAAC,IAAI,CAAC;IAU7E;;;;OAIG;IACG,OAAO,IAAI,OAAO,CAAC,aAAa,CAAC;IASvC,0EAA0E;IACpE,MAAM,IAAI,OAAO,CAAC,IAAI,CAAC;IAQ7B,OAAO,CAAC,eAAe;IASvB,OAAO,CAAC,aAAa;IASrB,OAAO,CAAC,wBAAwB;CAQjC"}
|
package/dist/agent_identity.js
CHANGED
|
@@ -14,11 +14,13 @@ export class AgentIdentity {
|
|
|
14
14
|
_inkbox;
|
|
15
15
|
_mailbox;
|
|
16
16
|
_phoneNumber;
|
|
17
|
+
_authenticatorApp;
|
|
17
18
|
constructor(data, inkbox) {
|
|
18
19
|
this._data = data;
|
|
19
20
|
this._inkbox = inkbox;
|
|
20
21
|
this._mailbox = data.mailbox;
|
|
21
22
|
this._phoneNumber = data.phoneNumber;
|
|
23
|
+
this._authenticatorApp = data.authenticatorApp;
|
|
22
24
|
}
|
|
23
25
|
// ------------------------------------------------------------------
|
|
24
26
|
// Identity properties
|
|
@@ -30,6 +32,8 @@ export class AgentIdentity {
|
|
|
30
32
|
get mailbox() { return this._mailbox; }
|
|
31
33
|
/** The phone number currently assigned to this identity, or `null` if none. */
|
|
32
34
|
get phoneNumber() { return this._phoneNumber; }
|
|
35
|
+
/** The authenticator app currently assigned to this identity, or `null` if none. */
|
|
36
|
+
get authenticatorApp() { return this._authenticatorApp; }
|
|
33
37
|
// ------------------------------------------------------------------
|
|
34
38
|
// Channel management
|
|
35
39
|
// ------------------------------------------------------------------
|
|
@@ -115,6 +119,46 @@ export class AgentIdentity {
|
|
|
115
119
|
await this._inkbox._idsResource.unlinkPhoneNumber(this.agentHandle);
|
|
116
120
|
this._phoneNumber = null;
|
|
117
121
|
}
|
|
122
|
+
/**
|
|
123
|
+
* Create a new authenticator app and link it to this identity.
|
|
124
|
+
*
|
|
125
|
+
* @returns The newly created {@link AuthenticatorApp}.
|
|
126
|
+
*/
|
|
127
|
+
async createAuthenticatorApp() {
|
|
128
|
+
const app = await this._inkbox._authApps.create({ agentHandle: this.agentHandle });
|
|
129
|
+
this._authenticatorApp = {
|
|
130
|
+
id: app.id,
|
|
131
|
+
organizationId: app.organizationId,
|
|
132
|
+
identityId: app.identityId,
|
|
133
|
+
status: app.status,
|
|
134
|
+
createdAt: app.createdAt,
|
|
135
|
+
updatedAt: app.updatedAt,
|
|
136
|
+
};
|
|
137
|
+
return app;
|
|
138
|
+
}
|
|
139
|
+
/**
|
|
140
|
+
* Link an existing authenticator app to this identity.
|
|
141
|
+
*
|
|
142
|
+
* @param authenticatorAppId - UUID of the authenticator app to link. Obtain via
|
|
143
|
+
* `inkbox.authenticatorApps.list()` or `inkbox.authenticatorApps.get()`.
|
|
144
|
+
* @returns The linked {@link IdentityAuthenticatorApp}.
|
|
145
|
+
*/
|
|
146
|
+
async assignAuthenticatorApp(authenticatorAppId) {
|
|
147
|
+
const data = await this._inkbox._idsResource.assignAuthenticatorApp(this.agentHandle, {
|
|
148
|
+
authenticatorAppId,
|
|
149
|
+
});
|
|
150
|
+
this._authenticatorApp = data.authenticatorApp;
|
|
151
|
+
this._data = data;
|
|
152
|
+
return this._authenticatorApp;
|
|
153
|
+
}
|
|
154
|
+
/**
|
|
155
|
+
* Unlink this identity's authenticator app (does not delete the app).
|
|
156
|
+
*/
|
|
157
|
+
async unlinkAuthenticatorApp() {
|
|
158
|
+
this._requireAuthenticatorApp();
|
|
159
|
+
await this._inkbox._idsResource.unlinkAuthenticatorApp(this.agentHandle);
|
|
160
|
+
this._authenticatorApp = null;
|
|
161
|
+
}
|
|
118
162
|
// ------------------------------------------------------------------
|
|
119
163
|
// Mail helpers
|
|
120
164
|
// ------------------------------------------------------------------
|
|
@@ -228,6 +272,64 @@ export class AgentIdentity {
|
|
|
228
272
|
return this._inkbox._transcripts.list(this._phoneNumber.id, callId);
|
|
229
273
|
}
|
|
230
274
|
// ------------------------------------------------------------------
|
|
275
|
+
// Authenticator helpers
|
|
276
|
+
// ------------------------------------------------------------------
|
|
277
|
+
/**
|
|
278
|
+
* Create a new authenticator account from an `otpauth://` URI.
|
|
279
|
+
*
|
|
280
|
+
* @param options.otpauthUri - `otpauth://totp/...` or `otpauth://hotp/...` URI.
|
|
281
|
+
* @param options.displayName - Optional user-managed label (max 255 characters).
|
|
282
|
+
* @param options.description - Optional free-form notes.
|
|
283
|
+
*/
|
|
284
|
+
async createAuthenticatorAccount(options) {
|
|
285
|
+
this._requireAuthenticatorApp();
|
|
286
|
+
return this._inkbox._authAccounts.create(this._authenticatorApp.id, options);
|
|
287
|
+
}
|
|
288
|
+
/** List all authenticator accounts in this identity's app. */
|
|
289
|
+
async listAuthenticatorAccounts() {
|
|
290
|
+
this._requireAuthenticatorApp();
|
|
291
|
+
return this._inkbox._authAccounts.list(this._authenticatorApp.id);
|
|
292
|
+
}
|
|
293
|
+
/**
|
|
294
|
+
* Get a single authenticator account by ID.
|
|
295
|
+
*
|
|
296
|
+
* @param accountId - UUID of the authenticator account.
|
|
297
|
+
*/
|
|
298
|
+
async getAuthenticatorAccount(accountId) {
|
|
299
|
+
this._requireAuthenticatorApp();
|
|
300
|
+
return this._inkbox._authAccounts.get(this._authenticatorApp.id, accountId);
|
|
301
|
+
}
|
|
302
|
+
/**
|
|
303
|
+
* Update user-managed metadata on an authenticator account.
|
|
304
|
+
*
|
|
305
|
+
* @param accountId - UUID of the authenticator account to update.
|
|
306
|
+
* @param options.displayName - New label (max 255 characters).
|
|
307
|
+
* @param options.description - New notes.
|
|
308
|
+
*/
|
|
309
|
+
async updateAuthenticatorAccount(accountId, options) {
|
|
310
|
+
this._requireAuthenticatorApp();
|
|
311
|
+
return this._inkbox._authAccounts.update(this._authenticatorApp.id, accountId, options);
|
|
312
|
+
}
|
|
313
|
+
/**
|
|
314
|
+
* Soft-delete an authenticator account.
|
|
315
|
+
*
|
|
316
|
+
* @param accountId - UUID of the authenticator account to delete.
|
|
317
|
+
*/
|
|
318
|
+
async deleteAuthenticatorAccount(accountId) {
|
|
319
|
+
this._requireAuthenticatorApp();
|
|
320
|
+
await this._inkbox._authAccounts.delete(this._authenticatorApp.id, accountId);
|
|
321
|
+
}
|
|
322
|
+
/**
|
|
323
|
+
* Generate the current OTP code for an authenticator account.
|
|
324
|
+
*
|
|
325
|
+
* @param accountId - UUID of the authenticator account.
|
|
326
|
+
* @returns The generated OTP code with metadata.
|
|
327
|
+
*/
|
|
328
|
+
async generateOtp(accountId) {
|
|
329
|
+
this._requireAuthenticatorApp();
|
|
330
|
+
return this._inkbox._authAccounts.generateOtp(this._authenticatorApp.id, accountId);
|
|
331
|
+
}
|
|
332
|
+
// ------------------------------------------------------------------
|
|
231
333
|
// Identity management
|
|
232
334
|
// ------------------------------------------------------------------
|
|
233
335
|
/**
|
|
@@ -242,6 +344,7 @@ export class AgentIdentity {
|
|
|
242
344
|
...result,
|
|
243
345
|
mailbox: this._mailbox,
|
|
244
346
|
phoneNumber: this._phoneNumber,
|
|
347
|
+
authenticatorApp: this._authenticatorApp,
|
|
245
348
|
};
|
|
246
349
|
}
|
|
247
350
|
/**
|
|
@@ -254,6 +357,7 @@ export class AgentIdentity {
|
|
|
254
357
|
this._data = data;
|
|
255
358
|
this._mailbox = data.mailbox;
|
|
256
359
|
this._phoneNumber = data.phoneNumber;
|
|
360
|
+
this._authenticatorApp = data.authenticatorApp;
|
|
257
361
|
return this;
|
|
258
362
|
}
|
|
259
363
|
/** Soft-delete this identity (unlinks channels without deleting them). */
|
|
@@ -273,5 +377,10 @@ export class AgentIdentity {
|
|
|
273
377
|
throw new InkboxAPIError(0, `Identity '${this.agentHandle}' has no phone number assigned. Call identity.provisionPhoneNumber() or identity.assignPhoneNumber() first.`);
|
|
274
378
|
}
|
|
275
379
|
}
|
|
380
|
+
_requireAuthenticatorApp() {
|
|
381
|
+
if (!this._authenticatorApp) {
|
|
382
|
+
throw new InkboxAPIError(0, `Identity '${this.agentHandle}' has no authenticator app assigned. Call identity.createAuthenticatorApp() or identity.assignAuthenticatorApp() first.`);
|
|
383
|
+
}
|
|
384
|
+
}
|
|
276
385
|
}
|
|
277
386
|
//# sourceMappingURL=agent_identity.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"agent_identity.js","sourceRoot":"","sources":["../src/agent_identity.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AAEH,OAAO,EAAE,cAAc,EAAE,MAAM,YAAY,CAAC;
|
|
1
|
+
{"version":3,"file":"agent_identity.js","sourceRoot":"","sources":["../src/agent_identity.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AAEH,OAAO,EAAE,cAAc,EAAE,MAAM,YAAY,CAAC;AAa5C,MAAM,OAAO,aAAa;IAChB,KAAK,CAAqB;IACjB,OAAO,CAAS;IACzB,QAAQ,CAAyB;IACjC,YAAY,CAA6B;IACzC,iBAAiB,CAAkC;IAE3D,YAAY,IAAwB,EAAE,MAAc;QAClD,IAAI,CAAC,KAAK,GAAgB,IAAI,CAAC;QAC/B,IAAI,CAAC,OAAO,GAAc,MAAM,CAAC;QACjC,IAAI,CAAC,QAAQ,GAAa,IAAI,CAAC,OAAO,CAAC;QACvC,IAAI,CAAC,YAAY,GAAS,IAAI,CAAC,WAAW,CAAC;QAC3C,IAAI,CAAC,iBAAiB,GAAI,IAAI,CAAC,gBAAgB,CAAC;IAClD,CAAC;IAED,qEAAqE;IACrE,sBAAsB;IACtB,qEAAqE;IAErE,IAAI,WAAW,KAAa,OAAO,IAAI,CAAC,KAAK,CAAC,WAAW,CAAC,CAAC,CAAC;IAC5D,IAAI,EAAE,KAAuB,OAAO,IAAI,CAAC,KAAK,CAAC,EAAE,CAAC,CAAC,CAAC;IACpD,IAAI,MAAM,KAAmB,OAAO,IAAI,CAAC,KAAK,CAAC,MAAM,CAAC,CAAC,CAAC;IAEx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
* Authenticator account CRUD and OTP generation.
|
|
5
|
+
*/
|
|
6
|
+
import { HttpTransport } from "../../_http.js";
|
|
7
|
+
import { AuthenticatorAccount, OTPCode } from "../types.js";
|
|
8
|
+
export declare class AuthenticatorAccountsResource {
|
|
9
|
+
private readonly http;
|
|
10
|
+
constructor(http: HttpTransport);
|
|
11
|
+
/**
|
|
12
|
+
* Create a new authenticator account from an `otpauth://` URI.
|
|
13
|
+
*
|
|
14
|
+
* @param authenticatorAppId - UUID of the parent authenticator app.
|
|
15
|
+
* @param options.otpauthUri - `otpauth://totp/...` or `otpauth://hotp/...` URI.
|
|
16
|
+
* @param options.displayName - Optional user-managed label (max 255 characters).
|
|
17
|
+
* @param options.description - Optional free-form notes.
|
|
18
|
+
*/
|
|
19
|
+
create(authenticatorAppId: string, options: {
|
|
20
|
+
otpauthUri: string;
|
|
21
|
+
displayName?: string;
|
|
22
|
+
description?: string;
|
|
23
|
+
}): Promise<AuthenticatorAccount>;
|
|
24
|
+
/**
|
|
25
|
+
* List all non-deleted authenticator accounts for an app.
|
|
26
|
+
*
|
|
27
|
+
* @param authenticatorAppId - UUID of the parent authenticator app.
|
|
28
|
+
*/
|
|
29
|
+
list(authenticatorAppId: string): Promise<AuthenticatorAccount[]>;
|
|
30
|
+
/**
|
|
31
|
+
* Get a single authenticator account by ID.
|
|
32
|
+
*
|
|
33
|
+
* @param authenticatorAppId - UUID of the parent authenticator app.
|
|
34
|
+
* @param accountId - UUID of the authenticator account.
|
|
35
|
+
*/
|
|
36
|
+
get(authenticatorAppId: string, accountId: string): Promise<AuthenticatorAccount>;
|
|
37
|
+
/**
|
|
38
|
+
* Update user-managed account metadata.
|
|
39
|
+
*
|
|
40
|
+
* Only provided fields are applied; omitted fields are left unchanged.
|
|
41
|
+
*
|
|
42
|
+
* @param authenticatorAppId - UUID of the parent authenticator app.
|
|
43
|
+
* @param accountId - UUID of the authenticator account to update.
|
|
44
|
+
* @param options.displayName - New label (max 255 characters).
|
|
45
|
+
* @param options.description - New notes.
|
|
46
|
+
*/
|
|
47
|
+
update(authenticatorAppId: string, accountId: string, options: {
|
|
48
|
+
displayName?: string | null;
|
|
49
|
+
description?: string | null;
|
|
50
|
+
}): Promise<AuthenticatorAccount>;
|
|
51
|
+
/**
|
|
52
|
+
* Soft-delete an authenticator account.
|
|
53
|
+
*
|
|
54
|
+
* @param authenticatorAppId - UUID of the parent authenticator app.
|
|
55
|
+
* @param accountId - UUID of the authenticator account to delete.
|
|
56
|
+
*/
|
|
57
|
+
delete(authenticatorAppId: string, accountId: string): Promise<void>;
|
|
58
|
+
/**
|
|
59
|
+
* Generate the current OTP code for an account.
|
|
60
|
+
*
|
|
61
|
+
* For TOTP accounts, `validForSeconds` indicates time until expiry.
|
|
62
|
+
* For HOTP accounts, the stored counter is incremented atomically
|
|
63
|
+
* and `validForSeconds` is `null`.
|
|
64
|
+
*
|
|
65
|
+
* @param authenticatorAppId - UUID of the parent authenticator app.
|
|
66
|
+
* @param accountId - UUID of the authenticator account.
|
|
67
|
+
*/
|
|
68
|
+
generateOtp(authenticatorAppId: string, accountId: string): Promise<OTPCode>;
|
|
69
|
+
}
|
|
70
|
+
//# sourceMappingURL=accounts.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"accounts.d.ts","sourceRoot":"","sources":["../../../src/authenticator/resources/accounts.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,EAAE,aAAa,EAAE,MAAM,gBAAgB,CAAC;AAC/C,OAAO,EACL,oBAAoB,EACpB,OAAO,EAKR,MAAM,aAAa,CAAC;AAErB,qBAAa,6BAA6B;IAC5B,OAAO,CAAC,QAAQ,CAAC,IAAI;gBAAJ,IAAI,EAAE,aAAa;IAEhD;;;;;;;OAOG;IACG,MAAM,CACV,kBAAkB,EAAE,MAAM,EAC1B,OAAO,EAAE;QACP,UAAU,EAAE,MAAM,CAAC;QACnB,WAAW,CAAC,EAAE,MAAM,CAAC;QACrB,WAAW,CAAC,EAAE,MAAM,CAAC;KACtB,GACA,OAAO,CAAC,oBAAoB,CAAC;IAWhC;;;;OAIG;IACG,IAAI,CAAC,kBAAkB,EAAE,MAAM,GAAG,OAAO,CAAC,oBAAoB,EAAE,CAAC;IAOvE;;;;;OAKG;IACG,GAAG,CACP,kBAAkB,EAAE,MAAM,EAC1B,SAAS,EAAE,MAAM,GAChB,OAAO,CAAC,oBAAoB,CAAC;IAOhC;;;;;;;;;OASG;IACG,MAAM,CACV,kBAAkB,EAAE,MAAM,EAC1B,SAAS,EAAE,MAAM,EACjB,OAAO,EAAE;QACP,WAAW,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;QAC5B,WAAW,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;KAC7B,GACA,OAAO,CAAC,oBAAoB,CAAC;IAWhC;;;;;OAKG;IACG,MAAM,CACV,kBAAkB,EAAE,MAAM,EAC1B,SAAS,EAAE,MAAM,GAChB,OAAO,CAAC,IAAI,CAAC;IAIhB;;;;;;;;;OASG;IACG,WAAW,CACf,kBAAkB,EAAE,MAAM,EAC1B,SAAS,EAAE,MAAM,GAChB,OAAO,CAAC,OAAO,CAAC;CAMpB"}
|
|
@@ -0,0 +1,91 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* inkbox-authenticator/resources/accounts.ts
|
|
3
|
+
*
|
|
4
|
+
* Authenticator account CRUD and OTP generation.
|
|
5
|
+
*/
|
|
6
|
+
import { parseAuthenticatorAccount, parseOTPCode, } from "../types.js";
|
|
7
|
+
export class AuthenticatorAccountsResource {
|
|
8
|
+
http;
|
|
9
|
+
constructor(http) {
|
|
10
|
+
this.http = http;
|
|
11
|
+
}
|
|
12
|
+
/**
|
|
13
|
+
* Create a new authenticator account from an `otpauth://` URI.
|
|
14
|
+
*
|
|
15
|
+
* @param authenticatorAppId - UUID of the parent authenticator app.
|
|
16
|
+
* @param options.otpauthUri - `otpauth://totp/...` or `otpauth://hotp/...` URI.
|
|
17
|
+
* @param options.displayName - Optional user-managed label (max 255 characters).
|
|
18
|
+
* @param options.description - Optional free-form notes.
|
|
19
|
+
*/
|
|
20
|
+
async create(authenticatorAppId, options) {
|
|
21
|
+
const body = { otpauth_uri: options.otpauthUri };
|
|
22
|
+
if (options.displayName !== undefined)
|
|
23
|
+
body["display_name"] = options.displayName;
|
|
24
|
+
if (options.description !== undefined)
|
|
25
|
+
body["description"] = options.description;
|
|
26
|
+
const data = await this.http.post(`/apps/${authenticatorAppId}/accounts`, body);
|
|
27
|
+
return parseAuthenticatorAccount(data);
|
|
28
|
+
}
|
|
29
|
+
/**
|
|
30
|
+
* List all non-deleted authenticator accounts for an app.
|
|
31
|
+
*
|
|
32
|
+
* @param authenticatorAppId - UUID of the parent authenticator app.
|
|
33
|
+
*/
|
|
34
|
+
async list(authenticatorAppId) {
|
|
35
|
+
const data = await this.http.get(`/apps/${authenticatorAppId}/accounts`);
|
|
36
|
+
return data.map(parseAuthenticatorAccount);
|
|
37
|
+
}
|
|
38
|
+
/**
|
|
39
|
+
* Get a single authenticator account by ID.
|
|
40
|
+
*
|
|
41
|
+
* @param authenticatorAppId - UUID of the parent authenticator app.
|
|
42
|
+
* @param accountId - UUID of the authenticator account.
|
|
43
|
+
*/
|
|
44
|
+
async get(authenticatorAppId, accountId) {
|
|
45
|
+
const data = await this.http.get(`/apps/${authenticatorAppId}/accounts/${accountId}`);
|
|
46
|
+
return parseAuthenticatorAccount(data);
|
|
47
|
+
}
|
|
48
|
+
/**
|
|
49
|
+
* Update user-managed account metadata.
|
|
50
|
+
*
|
|
51
|
+
* Only provided fields are applied; omitted fields are left unchanged.
|
|
52
|
+
*
|
|
53
|
+
* @param authenticatorAppId - UUID of the parent authenticator app.
|
|
54
|
+
* @param accountId - UUID of the authenticator account to update.
|
|
55
|
+
* @param options.displayName - New label (max 255 characters).
|
|
56
|
+
* @param options.description - New notes.
|
|
57
|
+
*/
|
|
58
|
+
async update(authenticatorAppId, accountId, options) {
|
|
59
|
+
const body = {};
|
|
60
|
+
if ("displayName" in options)
|
|
61
|
+
body["display_name"] = options.displayName;
|
|
62
|
+
if ("description" in options)
|
|
63
|
+
body["description"] = options.description;
|
|
64
|
+
const data = await this.http.patch(`/apps/${authenticatorAppId}/accounts/${accountId}`, body);
|
|
65
|
+
return parseAuthenticatorAccount(data);
|
|
66
|
+
}
|
|
67
|
+
/**
|
|
68
|
+
* Soft-delete an authenticator account.
|
|
69
|
+
*
|
|
70
|
+
* @param authenticatorAppId - UUID of the parent authenticator app.
|
|
71
|
+
* @param accountId - UUID of the authenticator account to delete.
|
|
72
|
+
*/
|
|
73
|
+
async delete(authenticatorAppId, accountId) {
|
|
74
|
+
await this.http.delete(`/apps/${authenticatorAppId}/accounts/${accountId}`);
|
|
75
|
+
}
|
|
76
|
+
/**
|
|
77
|
+
* Generate the current OTP code for an account.
|
|
78
|
+
*
|
|
79
|
+
* For TOTP accounts, `validForSeconds` indicates time until expiry.
|
|
80
|
+
* For HOTP accounts, the stored counter is incremented atomically
|
|
81
|
+
* and `validForSeconds` is `null`.
|
|
82
|
+
*
|
|
83
|
+
* @param authenticatorAppId - UUID of the parent authenticator app.
|
|
84
|
+
* @param accountId - UUID of the authenticator account.
|
|
85
|
+
*/
|
|
86
|
+
async generateOtp(authenticatorAppId, accountId) {
|
|
87
|
+
const data = await this.http.post(`/apps/${authenticatorAppId}/accounts/${accountId}/generate-otp`);
|
|
88
|
+
return parseOTPCode(data);
|
|
89
|
+
}
|
|
90
|
+
}
|
|
91
|
+
//# sourceMappingURL=accounts.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"accounts.js","sourceRoot":"","sources":["../../../src/authenticator/resources/accounts.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAGH,OAAO,EAKL,yBAAyB,EACzB,YAAY,GACb,MAAM,aAAa,CAAC;AAErB,MAAM,OAAO,6BAA6B;IACX;IAA7B,YAA6B,IAAmB;QAAnB,SAAI,GAAJ,IAAI,CAAe;IAAG,CAAC;IAEpD;;;;;;;OA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CAAC,WAAW,CAAC;QACxE,MAAM,IAAI,GAAG,MAAM,IAAI,CAAC,IAAI,CAAC,KAAK,CAChC,SAAS,kBAAkB,aAAa,SAAS,EAAE,EACnD,IAAI,CACL,CAAC;QACF,OAAO,yBAAyB,CAAC,IAAI,CAAC,CAAC;IACzC,CAAC;IAED;;;;;OAKG;IACH,KAAK,CAAC,MAAM,CACV,kBAA0B,EAC1B,SAAiB;QAEjB,MAAM,IAAI,CAAC,IAAI,CAAC,MAAM,CAAC,SAAS,kBAAkB,aAAa,SAAS,EAAE,CAAC,CAAC;IAC9E,CAAC;IAED;;;;;;;;;OASG;IACH,KAAK,CAAC,WAAW,CACf,kBAA0B,EAC1B,SAAiB;QAEjB,MAAM,IAAI,GAAG,MAAM,IAAI,CAAC,IAAI,CAAC,IAAI,CAC/B,SAAS,kBAAkB,aAAa,SAAS,eAAe,CACjE,CAAC;QACF,OAAO,YAAY,CAAC,IAAI,CAAC,CAAC;IAC5B,CAAC;CACF"}
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* inkbox-authenticator/resources/apps.ts
|
|
3
|
+
*
|
|
4
|
+
* Authenticator app CRUD operations.
|
|
5
|
+
*/
|
|
6
|
+
import { HttpTransport } from "../../_http.js";
|
|
7
|
+
import { AuthenticatorApp } from "../types.js";
|
|
8
|
+
export declare class AuthenticatorAppsResource {
|
|
9
|
+
private readonly http;
|
|
10
|
+
constructor(http: HttpTransport);
|
|
11
|
+
/**
|
|
12
|
+
* Create a new authenticator app.
|
|
13
|
+
*
|
|
14
|
+
* @param options.agentHandle - Optional agent identity handle to link this app to.
|
|
15
|
+
* If omitted, the app is created unbound.
|
|
16
|
+
*/
|
|
17
|
+
create(options?: {
|
|
18
|
+
agentHandle?: string;
|
|
19
|
+
}): Promise<AuthenticatorApp>;
|
|
20
|
+
/** List all non-deleted authenticator apps for your organisation. */
|
|
21
|
+
list(): Promise<AuthenticatorApp[]>;
|
|
22
|
+
/**
|
|
23
|
+
* Get a single authenticator app by ID.
|
|
24
|
+
*
|
|
25
|
+
* @param authenticatorAppId - UUID of the authenticator app.
|
|
26
|
+
*/
|
|
27
|
+
get(authenticatorAppId: string): Promise<AuthenticatorApp>;
|
|
28
|
+
/**
|
|
29
|
+
* Soft-delete an authenticator app.
|
|
30
|
+
*
|
|
31
|
+
* This also unlinks the app from its identity (if any) and
|
|
32
|
+
* soft-deletes all child authenticator accounts.
|
|
33
|
+
*
|
|
34
|
+
* @param authenticatorAppId - UUID of the authenticator app to delete.
|
|
35
|
+
*/
|
|
36
|
+
delete(authenticatorAppId: string): Promise<void>;
|
|
37
|
+
}
|
|
38
|
+
//# sourceMappingURL=apps.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"apps.d.ts","sourceRoot":"","sources":["../../../src/authenticator/resources/apps.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,EAAE,aAAa,EAAE,MAAM,gBAAgB,CAAC;AAC/C,OAAO,EACL,gBAAgB,EAGjB,MAAM,aAAa,CAAC;AAIrB,qBAAa,yBAAyB;IACxB,OAAO,CAAC,QAAQ,CAAC,IAAI;gBAAJ,IAAI,EAAE,aAAa;IAEhD;;;;;OAKG;IACG,MAAM,CAAC,OAAO,GAAE;QAAE,WAAW,CAAC,EAAE,MAAM,CAAA;KAAO,GAAG,OAAO,CAAC,gBAAgB,CAAC;IAO/E,qEAAqE;IAC/D,IAAI,IAAI,OAAO,CAAC,gBAAgB,EAAE,CAAC;IAKzC;;;;OAIG;IACG,GAAG,CAAC,kBAAkB,EAAE,MAAM,GAAG,OAAO,CAAC,gBAAgB,CAAC;IAKhE;;;;;;;OAOG;IACG,MAAM,CAAC,kBAAkB,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC;CAGxD"}
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* inkbox-authenticator/resources/apps.ts
|
|
3
|
+
*
|
|
4
|
+
* Authenticator app CRUD operations.
|
|
5
|
+
*/
|
|
6
|
+
import { parseAuthenticatorApp, } from "../types.js";
|
|
7
|
+
const BASE = "/apps";
|
|
8
|
+
export class AuthenticatorAppsResource {
|
|
9
|
+
http;
|
|
10
|
+
constructor(http) {
|
|
11
|
+
this.http = http;
|
|
12
|
+
}
|
|
13
|
+
/**
|
|
14
|
+
* Create a new authenticator app.
|
|
15
|
+
*
|
|
16
|
+
* @param options.agentHandle - Optional agent identity handle to link this app to.
|
|
17
|
+
* If omitted, the app is created unbound.
|
|
18
|
+
*/
|
|
19
|
+
async create(options = {}) {
|
|
20
|
+
const body = {};
|
|
21
|
+
if (options.agentHandle !== undefined)
|
|
22
|
+
body["agent_handle"] = options.agentHandle;
|
|
23
|
+
const data = await this.http.post(BASE, body);
|
|
24
|
+
return parseAuthenticatorApp(data);
|
|
25
|
+
}
|
|
26
|
+
/** List all non-deleted authenticator apps for your organisation. */
|
|
27
|
+
async list() {
|
|
28
|
+
const data = await this.http.get(BASE);
|
|
29
|
+
return data.map(parseAuthenticatorApp);
|
|
30
|
+
}
|
|
31
|
+
/**
|
|
32
|
+
* Get a single authenticator app by ID.
|
|
33
|
+
*
|
|
34
|
+
* @param authenticatorAppId - UUID of the authenticator app.
|
|
35
|
+
*/
|
|
36
|
+
async get(authenticatorAppId) {
|
|
37
|
+
const data = await this.http.get(`${BASE}/${authenticatorAppId}`);
|
|
38
|
+
return parseAuthenticatorApp(data);
|
|
39
|
+
}
|
|
40
|
+
/**
|
|
41
|
+
* Soft-delete an authenticator app.
|
|
42
|
+
*
|
|
43
|
+
* This also unlinks the app from its identity (if any) and
|
|
44
|
+
* soft-deletes all child authenticator accounts.
|
|
45
|
+
*
|
|
46
|
+
* @param authenticatorAppId - UUID of the authenticator app to delete.
|
|
47
|
+
*/
|
|
48
|
+
async delete(authenticatorAppId) {
|
|
49
|
+
await this.http.delete(`${BASE}/${authenticatorAppId}`);
|
|
50
|
+
}
|
|
51
|
+
}
|
|
52
|
+
//# sourceM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C;IAC1D,CAAC;CACF"}
|
|
@@ -0,0 +1,83 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* inkbox-authenticator TypeScript SDK — public types.
|
|
3
|
+
*/
|
|
4
|
+
export interface AuthenticatorApp {
|
|
5
|
+
id: string;
|
|
6
|
+
organizationId: string;
|
|
7
|
+
identityId: string | null;
|
|
8
|
+
/** "active" | "paused" | "deleted" */
|
|
9
|
+
status: string;
|
|
10
|
+
createdAt: Date;
|
|
11
|
+
updatedAt: Date;
|
|
12
|
+
}
|
|
13
|
+
export interface AuthenticatorAccount {
|
|
14
|
+
id: string;
|
|
15
|
+
authenticatorAppId: string;
|
|
16
|
+
/** "totp" | "hotp" */
|
|
17
|
+
otpType: string;
|
|
18
|
+
issuer: string | null;
|
|
19
|
+
accountName: string | null;
|
|
20
|
+
displayName: string | null;
|
|
21
|
+
description: string | null;
|
|
22
|
+
/** "sha1" | "sha256" | "sha512" */
|
|
23
|
+
algorithm: string;
|
|
24
|
+
/** 6 | 8 */
|
|
25
|
+
digits: number;
|
|
26
|
+
/** TOTP period in seconds; null for HOTP */
|
|
27
|
+
period: number | null;
|
|
28
|
+
/** HOTP counter; null for TOTP */
|
|
29
|
+
counter: number | null;
|
|
30
|
+
/** "active" | "deleted" */
|
|
31
|
+
status: string;
|
|
32
|
+
createdAt: Date;
|
|
33
|
+
updatedAt: Date;
|
|
34
|
+
}
|
|
35
|
+
export interface OTPCode {
|
|
36
|
+
otpCode: string;
|
|
37
|
+
/** Seconds until code expires; null for HOTP */
|
|
38
|
+
validForSeconds: number | null;
|
|
39
|
+
/** "totp" | "hotp" */
|
|
40
|
+
otpType: string;
|
|
41
|
+
/** "sha1" | "sha256" | "sha512" */
|
|
42
|
+
algorithm: string;
|
|
43
|
+
/** 6 | 8 */
|
|
44
|
+
digits: number;
|
|
45
|
+
/** TOTP period in seconds; null for HOTP */
|
|
46
|
+
period: number | null;
|
|
47
|
+
}
|
|
48
|
+
export interface RawAuthenticatorApp {
|
|
49
|
+
id: string;
|
|
50
|
+
organization_id: string;
|
|
51
|
+
identity_id: string | null;
|
|
52
|
+
status: string;
|
|
53
|
+
created_at: string;
|
|
54
|
+
updated_at: string;
|
|
55
|
+
}
|
|
56
|
+
export interface RawAuthenticatorAccount {
|
|
57
|
+
id: string;
|
|
58
|
+
authenticator_app_id: string;
|
|
59
|
+
otp_type: string;
|
|
60
|
+
issuer: string | null;
|
|
61
|
+
account_name: string | null;
|
|
62
|
+
display_name: string | null;
|
|
63
|
+
description: string | null;
|
|
64
|
+
algorithm: string;
|
|
65
|
+
digits: number;
|
|
66
|
+
period: number | null;
|
|
67
|
+
counter: number | null;
|
|
68
|
+
status: string;
|
|
69
|
+
created_at: string;
|
|
70
|
+
updated_at: string;
|
|
71
|
+
}
|
|
72
|
+
export interface RawOTPCode {
|
|
73
|
+
otp_code: string;
|
|
74
|
+
valid_for_seconds: number | null;
|
|
75
|
+
otp_type: string;
|
|
76
|
+
algorithm: string;
|
|
77
|
+
digits: number;
|
|
78
|
+
period: number | null;
|
|
79
|
+
}
|
|
80
|
+
export declare function parseAuthenticatorApp(r: RawAuthenticatorApp): AuthenticatorApp;
|
|
81
|
+
export declare function parseAuthenticatorAccount(r: RawAuthenticatorAccount): AuthenticatorAccount;
|
|
82
|
+
export declare function parseOTPCode(r: RawOTPCode): OTPCode;
|
|
83
|
+
//# sourceMappingURL=types.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../src/authenticator/types.ts"],"names":[],"mappings":"AAAA;;GAEG;AAIH,MAAM,WAAW,gBAAgB;IAC/B,EAAE,EAAE,MAAM,CAAC;IACX,cAAc,EAAE,MAAM,CAAC;IACvB,UAAU,EAAE,MAAM,GAAG,IAAI,CAAC;IAC1B,sCAAsC;IACtC,MAAM,EAAE,MAAM,CAAC;IACf,SAAS,EAAE,IAAI,CAAC;IAChB,SAAS,EAAE,IAAI,CAAC;CACjB;AAED,MAAM,WAAW,oB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AM,CAAC;IACjB,MAAM,EAAE,MAAM,GAAG,IAAI,CAAC;IACtB,YAAY,EAAE,MAAM,GAAG,IAAI,CAAC;IAC5B,YAAY,EAAE,MAAM,GAAG,IAAI,CAAC;IAC5B,WAAW,EAAE,MAAM,GAAG,IAAI,CAAC;IAC3B,SAAS,EAAE,MAAM,CAAC;IAClB,MAAM,EAAE,MAAM,CAAC;IACf,MAAM,EAAE,MAAM,GAAG,IAAI,CAAC;IACtB,OAAO,EAAE,MAAM,GAAG,IAAI,CAAC;IACvB,MAAM,EAAE,MAAM,CAAC;IACf,UAAU,EAAE,MAAM,CAAC;IACnB,UAAU,EAAE,MAAM,CAAC;CACpB;AAED,MAAM,WAAW,UAAU;IACzB,QAAQ,EAAE,MAAM,CAAC;IACjB,iBAAiB,EAAE,MAAM,GAAG,IAAI,CAAC;IACjC,QAAQ,EAAE,MAAM,CAAC;IACjB,SAAS,EAAE,MAAM,CAAC;IAClB,MAAM,EAAE,MAAM,CAAC;IACf,MAAM,EAAE,MAAM,GAAG,IAAI,CAAC;CACvB;AAID,wBAAgB,qBAAqB,CAAC,CAAC,EAAE,mBAAmB,GAAG,gBAAgB,CAS9E;AAED,wBAAgB,yBAAyB,CAAC,CAAC,EAAE,uBAAuB,GAAG,oBAAoB,CAiB1F;AAED,wBAAgB,YAAY,CAAC,CAAC,EAAE,UAAU,GAAG,OAAO,CASnD"}
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* inkbox-authenticator TypeScript SDK — public types.
|
|
3
|
+
*/
|
|
4
|
+
// ---- parsers ----
|
|
5
|
+
export function parseAuthenticatorApp(r) {
|
|
6
|
+
return {
|
|
7
|
+
id: r.id,
|
|
8
|
+
organizationId: r.organization_id,
|
|
9
|
+
identityId: r.identity_id,
|
|
10
|
+
status: r.status,
|
|
11
|
+
createdAt: new Date(r.created_at),
|
|
12
|
+
updatedAt: new Date(r.updated_at),
|
|
13
|
+
};
|
|
14
|
+
}
|
|
15
|
+
export function parseAuthenticatorAccount(r) {
|
|
16
|
+
return {
|
|
17
|
+
id: r.id,
|
|
18
|
+
authenticatorAppId: r.authenticator_app_id,
|
|
19
|
+
otpType: r.otp_type,
|
|
20
|
+
issuer: r.issuer,
|
|
21
|
+
accountName: r.account_name,
|
|
22
|
+
displayName: r.display_name,
|
|
23
|
+
description: r.description,
|
|
24
|
+
algorithm: r.algorithm,
|
|
25
|
+
digits: r.digits,
|
|
26
|
+
period: r.period,
|
|
27
|
+
counter: r.counter,
|
|
28
|
+
status: r.status,
|
|
29
|
+
createdAt: new Date(r.created_at),
|
|
30
|
+
updatedAt: new Date(r.updated_at),
|
|
31
|
+
};
|
|
32
|
+
}
|
|
33
|
+
export function parseOTPCode(r) {
|
|
34
|
+
return {
|
|
35
|
+
otpCode: r.otp_code,
|
|
36
|
+
validForSeconds: r.valid_for_seconds,
|
|
37
|
+
otpType: r.otp_type,
|
|
38
|
+
algorithm: r.algorithm,
|
|
39
|
+
digits: r.digits,
|
|
40
|
+
period: r.period,
|
|
41
|
+
};
|
|
42
|
+
}
|
|
43
|
+
//# sourceMappingURL=types.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.js","sourceRoot":"","sources":["../../src/authenticator/types.ts"],"names":[],"mappings":"AAAA;;GAEG;AAwFH,oBAAoB;AAEpB,MAAM,UAAU,qBAAqB,CAAC,CAAsB;IAC1D,OAAO;QACL,EAAE,EAAE,CAAC,CAAC,EAAE;QACR,cAAc,EAAE,CAAC,CAAC,eAAe;QACjC,UAAU,EAAE,CAAC,CAAC,WAAW;QACzB,MAAM,EAAE,CAAC,CAAC,MAAM;QAChB,SAAS,EAAE,IAAI,IAAI,CAAC,CAAC,CAAC,UAAU,CAAC;QACjC,SAAS,EAAE,IAAI,IAAI,CAAC,CAAC,CAAC,UAAU,CAAC;KAClC,CAAC;AACJ,CAAC;AAED,MAAM,UAAU,yBAAyB,CAAC,CAA0B;IAClE,OAAO;QACL,EAAE,EAAE,CAAC,CAAC,EAAE;QACR,kBAAkB,EAAE,CAAC,CAAC,oBAAoB;QAC1C,OAAO,EAAE,CAAC,CAAC,QAAQ;QACnB,MAAM,EAAE,CAAC,CAAC,MAAM;QAChB,WAAW,EAAE,CAAC,CAAC,YAAY;QAC3B,WAAW,EAAE,CAAC,CAAC,YAAY;QAC3B,WAAW,EAAE,CAAC,CAAC,WAAW;QAC1B,SAAS,EAAE,CAAC,CAAC,SAAS;QACtB,MAAM,EAAE,CAAC,CAAC,MAAM;QAChB,MAAM,EAAE,CAAC,CAAC,MAAM;QAChB,OAAO,EAAE,CAAC,CAAC,OAAO;QAClB,MAAM,EAAE,CAAC,CAAC,MAAM;QAChB,SAAS,EAAE,IAAI,IAAI,CAAC,CAAC,CAAC,UAAU,CAAC;QACjC,SAAS,EAAE,IAAI,IAAI,CAAC,CAAC,CAAC,UAAU,CAAC;KAClC,CAAC;AACJ,CAAC;AAED,MAAM,UAAU,YAAY,CAAC,CAAa;IACxC,OAAO;QACL,OAAO,EAAE,CAAC,CAAC,QAAQ;QACnB,eAAe,EAAE,CAAC,CAAC,iBAAiB;QACpC,OAAO,EAAE,CAAC,CAAC,QAAQ;QACnB,SAAS,EAAE,CAAC,CAAC,SAAS;QACtB,MAAM,EAAE,CAAC,CAAC,MAAM;QAChB,MAAM,EAAE,CAAC,CAAC,MAAM;KACjB,CAAC;AACJ,CAAC"}
|
|
@@ -76,5 +76,20 @@ export declare class IdentitiesResource {
|
|
|
76
76
|
* @param agentHandle - Handle of the identity.
|
|
77
77
|
*/
|
|
78
78
|
unlinkPhoneNumber(agentHandle: string): Promise<void>;
|
|
79
|
+
/**
|
|
80
|
+
* Assign an authenticator app to an identity.
|
|
81
|
+
*
|
|
82
|
+
* @param agentHandle - Handle of the identity.
|
|
83
|
+
* @param options.authenticatorAppId - UUID of the authenticator app to assign.
|
|
84
|
+
*/
|
|
85
|
+
assignAuthenticatorApp(agentHandle: string, options: {
|
|
86
|
+
authenticatorAppId: string;
|
|
87
|
+
}): Promise<_AgentIdentityData>;
|
|
88
|
+
/**
|
|
89
|
+
* Unlink the authenticator app from an identity (does not delete the app).
|
|
90
|
+
*
|
|
91
|
+
* @param agentHandle - Handle of the identity.
|
|
92
|
+
*/
|
|
93
|
+
unlinkAuthenticatorApp(agentHandle: string): Promise<void>;
|
|
79
94
|
}
|
|
80
95
|
//# sourceMappingURL=identities.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"identities.d.ts","sourceRoot":"","sources":["../../../src/identities/resources/identities.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,EAAE,aAAa,EAAE,MAAM,gBAAgB,CAAC;AAC/C,OAAO,EACL,oBAAoB,EACpB,kBAAkB,EAKnB,MAAM,aAAa,CAAC;AAErB,qBAAa,kBAAkB;IACjB,OAAO,CAAC,QAAQ,CAAC,IAAI;gBAAJ,IAAI,EAAE,aAAa;IAEhD;;;;;OAKG;IACG,MAAM,CAAC,OAAO,EAAE;QAAE,WAAW,EAAE,MAAM,CAAA;KAAE,GAAG,OAAO,CAAC,oBAAoB,CAAC;IAO7E,iDAAiD;IAC3C,IAAI,IAAI,OAAO,CAAC,oBAAoB,EAAE,CAAC;IAK7C;;;;OAIG;IACG,GAAG,CAAC,WAAW,EAAE,MAAM,GAAG,OAAO,CAAC,kBAAkB,CAAC;IAK3D;;;;;;;;OAQG;IACG,MAAM,CACV,WAAW,EAAE,MAAM,EACnB,OAAO,EAAE;QAAE,SAAS,CAAC,EAAE,MAAM,CAAC;QAAC,MAAM,CAAC,EAAE,MAAM,CAAA;KAAE,GAC/C,OAAO,CAAC,oBAAoB,CAAC;IAQhC;;;;;;OAMG;IACG,MAAM,CAAC,WAAW,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC;IAIhD;;;;;OAKG;IACG,aAAa,CACjB,WAAW,EAAE,MAAM,EACnB,OAAO,EAAE;QAAE,SAAS,EAAE,MAAM,CAAA;KAAE,GAC7B,OAAO,CAAC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AAE;QAAE,SAAS,EAAE,MAAM,CAAA;KAAE,GAC7B,OAAO,CAAC,kBAAkB,CAAC;IAQ9B;;;;OAIG;IACG,aAAa,CAAC,WAAW,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC;IAIvD;;;;;OAKG;IACG,iBAAiB,CACrB,WAAW,EAAE,MAAM,EACnB,OAAO,EAAE;QAAE,aAAa,EAAE,MAAM,CAAA;KAAE,GACjC,OAAO,CAAC,kBAAkB,CAAC;IAQ9B;;;;OAIG;IACG,iBAAiB,CAAC,WAAW,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC;IAI3D;;;;;OAKG;IACG,sBAAsB,CAC1B,WAAW,EAAE,MAAM,EACnB,OAAO,EAAE;QAAE,kBAAkB,EAAE,MAAM,CAAA;KAAE,GACtC,OAAO,CAAC,kBAAkB,CAAC;IAQ9B;;;;OAIG;IACG,sBAAsB,CAAC,WAAW,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC;CAGjE"}
|
|
@@ -99,5 +99,23 @@ export class IdentitiesResource {
|
|
|
99
99
|
async unlinkPhoneNumber(agentHandle) {
|
|
100
100
|
await this.http.delete(`/${agentHandle}/phone_number`);
|
|
101
101
|
}
|
|
102
|
+
/**
|
|
103
|
+
* Assign an authenticator app to an identity.
|
|
104
|
+
*
|
|
105
|
+
* @param agentHandle - Handle of the identity.
|
|
106
|
+
* @param options.authenticatorAppId - UUID of the authenticator app to assign.
|
|
107
|
+
*/
|
|
108
|
+
async assignAuthenticatorApp(agentHandle, options) {
|
|
109
|
+
const data = await this.http.post(`/${agentHandle}/authenticator_app`, { authenticator_app_id: options.authenticatorAppId });
|
|
110
|
+
return parseAgentIdentityData(data);
|
|
111
|
+
}
|
|
112
|
+
/**
|
|
113
|
+
* Unlink the authenticator app from an identity (does not delete the app).
|
|
114
|
+
*
|
|
115
|
+
* @param agentHandle - Handle of the identity.
|
|
116
|
+
*/
|
|
117
|
+
async unlinkAuthenticatorApp(agentHandle) {
|
|
118
|
+
await this.http.delete(`/${agentHandle}/authenticator_app`);
|
|
119
|
+
}
|
|
102
120
|
}
|
|
103
121
|
//# sourceMappingURL=identities.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"identities.js","sourceRoot":"","sources":["../../../src/identities/resources/identities.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAGH,OAAO,EAKL,yBAAyB,EACzB,sBAAsB,GACvB,MAAM,aAAa,CAAC;AAErB,MAAM,OAAO,kBAAkB;IACA;IAA7B,YAA6B,IAAmB;QAAnB,SAAI,GAAJ,IAAI,CAAe;IAAG,CAAC;IAEpD;;;;;OAKG;IACH,KAAK,CAAC,MAAM,CAAC,OAAgC;QAC3C,MAAM,IAAI,GAAG,MAAM,IAAI,CAAC,IAAI,CAAC,IAAI,CAA0B,GAAG,EAAE;YAC9D,YAAY,EAAE,OAAO,CAAC,WAAW;SAClC,CAAC,CAAC;QACH,OAAO,yBAAyB,CAAC,IAAI,CAAC,CAAC;IACzC,CAAC;IAED,iDAAiD;IACjD,KAAK,CAAC,IAAI;QACR,MAAM,IAAI,GAAG,MAAM,IAAI,CAAC,IAAI,CAAC,GAAG,CAA4B,GAAG,CAAC,CAAC;QACjE,OAAO,IAAI,CAAC,GAAG,CAAC,yBAAyB,CAAC,CAAC;IAC7C,CAAC;IAED;;;;OAIG;IACH,KAAK,CAAC,GAAG,CAAC,WAAmB;QAC3B,MAAM,IAAI,GAAG,MAAM,IAAI,CAAC,IAAI,CAAC,GAAG,CAAuB,IAAI,WAAW,EAAE,CAAC,CAAC;QAC1E,OAAO,sBAAsB,CAAC,IAAI,CAAC,CAAC;IACtC,CAAC;IAED;;;;;;;;OAQG;IACH,KAAK,CAAC,MAAM,CACV,WAAmB,EACnB,OAAgD;QAEhD,MAAM,IAAI,GAA4B,EAAE,CAAC;QACzC,IAAI,OAAO,CAAC,SAAS,KAAK,SAAS;YAAE,IAAI,CAAC,cAAc,CAAC,GAAG,OAAO,CAAC,SA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,MAAM,IAAI,CAAC,IAAI,CAAC,IAAI,CAC/B,IAAI,WAAW,oBAAoB,EACnC,EAAE,oBAAoB,EAAE,OAAO,CAAC,kBAAkB,EAAE,CACrD,CAAC;QACF,OAAO,sBAAsB,CAAC,IAAI,CAAC,CAAC;IACtC,CAAC;IAED;;;;OAIG;IACH,KAAK,CAAC,sBAAsB,CAAC,WAAmB;QAC9C,MAAM,IAAI,CAAC,IAAI,CAAC,MAAM,CAAC,IAAI,WAAW,oBAAoB,CAAC,CAAC;IAC9D,CAAC;CACF"}
|
|
@@ -33,12 +33,23 @@ export interface AgentIdentitySummary {
|
|
|
33
33
|
createdAt: Date;
|
|
34
34
|
updatedAt: Date;
|
|
35
35
|
}
|
|
36
|
+
export interface IdentityAuthenticatorApp {
|
|
37
|
+
id: string;
|
|
38
|
+
organizationId: string;
|
|
39
|
+
identityId: string | null;
|
|
40
|
+
/** "active" | "paused" | "deleted" */
|
|
41
|
+
status: string;
|
|
42
|
+
createdAt: Date;
|
|
43
|
+
updatedAt: Date;
|
|
44
|
+
}
|
|
36
45
|
/** @internal Full identity data with channels — users interact with AgentIdentity (the class) instead. */
|
|
37
46
|
export interface _AgentIdentityData extends AgentIdentitySummary {
|
|
38
47
|
/** Mailbox assigned to this identity, or null if unlinked. */
|
|
39
48
|
mailbox: IdentityMailbox | null;
|
|
40
49
|
/** Phone number assigned to this identity, or null if unlinked. */
|
|
41
50
|
phoneNumber: IdentityPhoneNumber | null;
|
|
51
|
+
/** Authenticator app assigned to this identity, or null if unlinked. */
|
|
52
|
+
authenticatorApp: IdentityAuthenticatorApp | null;
|
|
42
53
|
}
|
|
43
54
|
export interface RawIdentityMailbox {
|
|
44
55
|
id: string;
|
|
@@ -66,12 +77,22 @@ export interface RawAgentIdentitySummary {
|
|
|
66
77
|
created_at: string;
|
|
67
78
|
updated_at: string;
|
|
68
79
|
}
|
|
80
|
+
export interface RawIdentityAuthenticatorApp {
|
|
81
|
+
id: string;
|
|
82
|
+
organization_id: string;
|
|
83
|
+
identity_id: string | null;
|
|
84
|
+
status: string;
|
|
85
|
+
created_at: string;
|
|
86
|
+
updated_at: string;
|
|
87
|
+
}
|
|
69
88
|
export interface RawAgentIdentityData extends RawAgentIdentitySummary {
|
|
70
89
|
mailbox: RawIdentityMailbox | null;
|
|
71
90
|
phone_number: RawIdentityPhoneNumber | null;
|
|
91
|
+
authenticator_app: RawIdentityAuthenticatorApp | null;
|
|
72
92
|
}
|
|
73
93
|
export declare function parseIdentityMailbox(r: RawIdentityMailbox): IdentityMailbox;
|
|
74
94
|
export declare function parseIdentityPhoneNumber(r: RawIdentityPhoneNumber): IdentityPhoneNumber;
|
|
75
95
|
export declare function parseAgentIdentitySummary(r: RawAgentIdentitySummary): AgentIdentitySummary;
|
|
96
|
+
export declare function parseIdentityAuthenticatorApp(r: RawIdentityAuthenticatorApp): IdentityAuthenticatorApp;
|
|
76
97
|
export declare function parseAgentIdentityData(r: RawAgentIdentityData): _AgentIdentityData;
|
|
77
98
|
//# sourceMappingURL=types.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../src/identities/types.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,MAAM,WAAW,eAAe;IAC9B,EAAE,EAAE,MAAM,CAAC;IACX,YAAY,EAAE,MAAM,CAAC;IACrB,WAAW,EAAE,MAAM,GAAG,IAAI,CAAC;IAC3B,sCAAsC;IACtC,MAAM,EAAE,MAAM,CAAC;IACf,SAAS,EAAE,IAAI,CAAC;IAChB,SAAS,EAAE,IAAI,CAAC;CACjB;AAED,MAAM,WAAW,mBAAmB;IAClC,EAAE,EAAE,MAAM,CAAC;IACX,MAAM,EAAE,MAAM,CAAC;IACf,4BAA4B;IAC5B,IAAI,EAAE,MAAM,CAAC;IACb,uCAAuC;IACvC,MAAM,EAAE,MAAM,CAAC;IACf,gDAAgD;IAChD,kBAAkB,EAAE,MAAM,CAAC;IAC3B,kBAAkB,EAAE,MAA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C;IACxB,YAAY,EAAE,MAAM,CAAC;IACrB,MAAM,EAAE,MAAM,CAAC;IACf,UAAU,EAAE,MAAM,CAAC;IACnB,UAAU,EAAE,MAAM,CAAC;CACpB;AAED,MAAM,WAAW,2BAA2B;IAC1C,EAAE,EAAE,MAAM,CAAC;IACX,eAAe,EAAE,MAAM,CAAC;IACxB,WAAW,EAAE,MAAM,GAAG,IAAI,CAAC;IAC3B,MAAM,EAAE,MAAM,CAAC;IACf,UAAU,EAAE,MAAM,CAAC;IACnB,UAAU,EAAE,MAAM,CAAC;CACpB;AAED,MAAM,WAAW,oBAAqB,SAAQ,uBAAuB;IACnE,OAAO,EAAE,kBAAkB,GAAG,IAAI,CAAC;IACnC,YAAY,EAAE,sBAAsB,GAAG,IAAI,CAAC;IAC5C,iBAAiB,EAAE,2BAA2B,GAAG,IAAI,CAAC;CACvD;AAID,wBAAgB,oBAAoB,CAAC,CAAC,EAAE,kBAAkB,GAAG,eAAe,CAS3E;AAED,wBAAgB,wBAAwB,CAAC,CAAC,EAAE,sBAAsB,GAAG,mBAAmB,CAWvF;AAED,wBAAgB,yBAAyB,CAAC,CAAC,EAAE,uBAAuB,GAAG,oBAAoB,CAS1F;AAED,wBAAgB,6BAA6B,CAAC,CAAC,EAAE,2BAA2B,GAAG,wBAAwB,CAStG;AAED,wBAAgB,sBAAsB,CAAC,CAAC,EAAE,oBAAoB,GAAG,kBAAkB,CAOlF"}
|
package/dist/identities/types.js
CHANGED
|
@@ -34,11 +34,22 @@ export function parseAgentIdentitySummary(r) {
|
|
|
34
34
|
updatedAt: new Date(r.updated_at),
|
|
35
35
|
};
|
|
36
36
|
}
|
|
37
|
+
export function parseIdentityAuthenticatorApp(r) {
|
|
38
|
+
return {
|
|
39
|
+
id: r.id,
|
|
40
|
+
organizationId: r.organization_id,
|
|
41
|
+
identityId: r.identity_id,
|
|
42
|
+
status: r.status,
|
|
43
|
+
createdAt: new Date(r.created_at),
|
|
44
|
+
updatedAt: new Date(r.updated_at),
|
|
45
|
+
};
|
|
46
|
+
}
|
|
37
47
|
export function parseAgentIdentityData(r) {
|
|
38
48
|
return {
|
|
39
49
|
...parseAgentIdentitySummary(r),
|
|
40
50
|
mailbox: r.mailbox ? parseIdentityMailbox(r.mailbox) : null,
|
|
41
51
|
phoneNumber: r.phone_number ? parseIdentityPhoneNumber(r.phone_number) : null,
|
|
52
|
+
authenticatorApp: r.authenticator_app ? parseIdentityAuthenticatorApp(r.authenticator_app) : null,
|
|
42
53
|
};
|
|
43
54
|
}
|
|
44
55
|
//# sourceMappingURL=types.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.js","sourceRoot":"","sources":["../../src/identities/types.ts"],"names":[],"mappings":"AAAA;;GAEG;
|
|
1
|
+
{"version":3,"file":"types.js","sourceRoot":"","sources":["../../src/identities/types.ts"],"names":[],"mappings":"AAAA;;GAEG;AAuGH,oBAAoB;AAEpB,MAAM,UAAU,oBAAoB,CAAC,CAAqB;IACxD,OAAO;QACL,EAAE,EAAE,CAAC,CAAC,EAAE;QACR,YAAY,EAAE,CAAC,CAAC,aAAa;QAC7B,WAAW,EAAE,CAAC,CAAC,YAAY;QAC3B,MAAM,EAAE,CAAC,CAAC,MAAM;QAChB,SAAS,EAAE,IAAI,IAAI,CAAC,CAAC,CAAC,UAAU,CAAC;QACjC,SAAS,EAAE,IAAI,IAAI,CAAC,CAAC,CAAC,UAAU,CAAC;KAClC,CAAC;AACJ,CAAC;AAED,MAAM,UAAU,wBAAwB,CAAC,CAAyB;IAChE,OAAO;QACL,EAAE,EAAE,CAAC,CAAC,EAAE;QACR,MAAM,EAAE,CAAC,CAAC,MAAM;QAChB,IAAI,EAAE,CAAC,CAAC,IAAI;QACZ,MAAM,EAAE,CAAC,CAAC,MAAM;QAChB,kBAAkB,EAAE,CAAC,CAAC,oBAAoB;QAC1C,kBAAkB,EAAE,CAAC,CAAC,oBAAoB;QAC1C,SAAS,EAAE,IAAI,IAAI,CAAC,CAAC,CAAC,U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;AACJ,CAAC"}
|
package/dist/index.d.ts
CHANGED
|
@@ -6,5 +6,6 @@ export type { SigningKey } from "./signing_keys.js";
|
|
|
6
6
|
export { verifyWebhook } from "./signing_keys.js";
|
|
7
7
|
export type { Mailbox, Message, MessageDetail, Thread, ThreadDetail, } from "./mail/types.js";
|
|
8
8
|
export type { PhoneNumber, PhoneCall, PhoneCallWithRateLimit, RateLimitInfo, PhoneTranscript, } from "./phone/types.js";
|
|
9
|
-
export type { AgentIdentitySummary, IdentityMailbox, IdentityPhoneNumber, } from "./identities/types.js";
|
|
9
|
+
export type { AgentIdentitySummary, IdentityAuthenticatorApp, IdentityMailbox, IdentityPhoneNumber, } from "./identities/types.js";
|
|
10
|
+
export type { AuthenticatorApp, AuthenticatorAccount, OTPCode, } from "./authenticator/types.js";
|
|
10
11
|
//# sourceMappingURL=index.d.ts.map
|
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,aAAa,CAAC;AACrC,OAAO,EAAE,aAAa,EAAE,MAAM,qBAAqB,CAAC;AACpD,YAAY,EAAE,aAAa,EAAE,MAAM,aAAa,CAAC;AACjD,OAAO,EAAE,cAAc,EAAE,MAAM,YAAY,CAAC;AAC5C,YAAY,EAAE,UAAU,EAAE,MAAM,mBAAmB,CAAC;AACpD,OAAO,EAAE,aAAa,EAAE,MAAM,mBAAmB,CAAC;AAClD,YAAY,EACV,OAAO,EACP,OAAO,EACP,aAAa,EACb,MAAM,EACN,YAAY,GACb,MAAM,iBAAiB,CAAC;AACzB,YAAY,EACV,WAAW,EACX,SAAS,EACT,sBAAsB,EACtB,aAAa,EACb,eAAe,GAChB,MAAM,kBAAkB,CAAC;AAC1B,YAAY,EACV,oBAAoB,EACpB,eAAe,EACf,mBAAmB,GACpB,MAAM,uBAAuB,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,aAAa,CAAC;AACrC,OAAO,EAAE,aAAa,EAAE,MAAM,qBAAqB,CAAC;AACpD,YAAY,EAAE,aAAa,EAAE,MAAM,aAAa,CAAC;AACjD,OAAO,EAAE,cAAc,EAAE,MAAM,YAAY,CAAC;AAC5C,YAAY,EAAE,UAAU,EAAE,MAAM,mBAAmB,CAAC;AACpD,OAAO,EAAE,aAAa,EAAE,MAAM,mBAAmB,CAAC;AAClD,YAAY,EACV,OAAO,EACP,OAAO,EACP,aAAa,EACb,MAAM,EACN,YAAY,GACb,MAAM,iBAAiB,CAAC;AACzB,YAAY,EACV,WAAW,EACX,SAAS,EACT,sBAAsB,EACtB,aAAa,EACb,eAAe,GAChB,MAAM,kBAAkB,CAAC;AAC1B,YAAY,EACV,oBAAoB,EACpB,wBAAwB,EACxB,eAAe,EACf,mBAAmB,GACpB,MAAM,uBAAuB,CAAC;AAC/B,YAAY,EACV,gBAAgB,EAChB,oBAAoB,EACpB,OAAO,GACR,MAAM,0BAA0B,CAAC"}
|
package/dist/inkbox.d.ts
CHANGED
|
@@ -12,6 +12,8 @@ import { PhoneNumbersResource } from "./phone/resources/numbers.js";
|
|
|
12
12
|
import { CallsResource } from "./phone/resources/calls.js";
|
|
13
13
|
import { TranscriptsResource } from "./phone/resources/transcripts.js";
|
|
14
14
|
import { IdentitiesResource } from "./identities/resources/identities.js";
|
|
15
|
+
import { AuthenticatorAppsResource } from "./authenticator/resources/apps.js";
|
|
16
|
+
import { AuthenticatorAccountsResource } from "./authenticator/resources/accounts.js";
|
|
15
17
|
import { AgentIdentity } from "./agent_identity.js";
|
|
16
18
|
import type { AgentIdentitySummary } from "./identities/types.js";
|
|
17
19
|
export interface InkboxOptions {
|
|
@@ -55,11 +57,15 @@ export declare class Inkbox {
|
|
|
55
57
|
readonly _calls: CallsResource;
|
|
56
58
|
readonly _transcripts: TranscriptsResource;
|
|
57
59
|
readonly _idsResource: IdentitiesResource;
|
|
60
|
+
readonly _authApps: AuthenticatorAppsResource;
|
|
61
|
+
readonly _authAccounts: AuthenticatorAccountsResource;
|
|
58
62
|
constructor(options: InkboxOptions);
|
|
59
63
|
/** Org-level mailbox operations (list, get, create, update, delete). */
|
|
60
64
|
get mailboxes(): MailboxesResource;
|
|
61
65
|
/** Org-level phone number operations (list, get, provision, release). */
|
|
62
66
|
get phoneNumbers(): PhoneNumbersResource;
|
|
67
|
+
/** Org-level authenticator app operations (list, get, create, delete). */
|
|
68
|
+
get authenticatorApps(): AuthenticatorAppsResource;
|
|
63
69
|
/**
|
|
64
70
|
* Create a new agent identity.
|
|
65
71
|
*
|
package/dist/inkbox.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"inkbox.d.ts","sourceRoot":"","sources":["../src/inkbox.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAGH,OAAO,EAAE,iBAAiB,EAAE,MAAM,+BAA+B,CAAC;AAClE,OAAO,EAAE,gBAAgB,EAAE,MAAM,8BAA8B,CAAC;AAChE,OAAO,EAAE,eAAe,EAAE,MAAM,6BAA6B,CAAC;AAC9D,OAAO,EAAE,mBAAmB,EAAE,MAAM,mBAAmB,CAAC;AACxD,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,mBAAmB,CAAC;AACpD,OAAO,EAAE,oBAAoB,EAAE,MAAM,8BAA8B,CAAC;AACpE,OAAO,EAAE,aAAa,EAAE,MAAM,4BAA4B,CAAC;AAC3D,OAAO,EAAE,mBAAmB,EAAE,MAAM,kCAAkC,CAAC;AACvE,OAAO,EAAE,kBAAkB,EAAE,MAAM,sCAAsC,CAAC;AAC1E,OAAO,EAAE,aAAa,EAAE,MAAM,qBAAqB,CAAC;AACpD,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,uBAAuB,CAAC;AAIlE,MAAM,WAAW,aAAa;IAC5B,uDAAuD;IACvD,MA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AC;IAIvD;;;;;;OAMG;IACG,gBAAgB,IAAI,OAAO,CAAC,UAAU,CAAC;CAG9C"}
|
package/dist/inkbox.js
CHANGED
|
@@ -12,6 +12,8 @@ import { PhoneNumbersResource } from "./phone/resources/numbers.js";
|
|
|
12
12
|
import { CallsResource } from "./phone/resources/calls.js";
|
|
13
13
|
import { TranscriptsResource } from "./phone/resources/transcripts.js";
|
|
14
14
|
import { IdentitiesResource } from "./identities/resources/identities.js";
|
|
15
|
+
import { AuthenticatorAppsResource } from "./authenticator/resources/apps.js";
|
|
16
|
+
import { AuthenticatorAccountsResource } from "./authenticator/resources/accounts.js";
|
|
15
17
|
import { AgentIdentity } from "./agent_identity.js";
|
|
16
18
|
const DEFAULT_BASE_URL = "https://api.inkbox.ai";
|
|
17
19
|
/**
|
|
@@ -47,12 +49,15 @@ export class Inkbox {
|
|
|
47
49
|
_calls;
|
|
48
50
|
_transcripts;
|
|
49
51
|
_idsResource;
|
|
52
|
+
_authApps;
|
|
53
|
+
_authAccounts;
|
|
50
54
|
constructor(options) {
|
|
51
55
|
const apiRoot = `${(options.baseUrl ?? DEFAULT_BASE_URL).replace(/\/$/, "")}/api/v1`;
|
|
52
56
|
const ms = options.timeoutMs ?? 30_000;
|
|
53
57
|
const mailHttp = new HttpTransport(options.apiKey, `${apiRoot}/mail`, ms);
|
|
54
58
|
const phoneHttp = new HttpTransport(options.apiKey, `${apiRoot}/phone`, ms);
|
|
55
59
|
const idsHttp = new HttpTransport(options.apiKey, `${apiRoot}/identities`, ms);
|
|
60
|
+
const authHttp = new HttpTransport(options.apiKey, `${apiRoot}/authenticator`, ms);
|
|
56
61
|
const apiHttp = new HttpTransport(options.apiKey, apiRoot, ms);
|
|
57
62
|
this._mailboxes = new MailboxesResource(mailHttp);
|
|
58
63
|
this._messages = new MessagesResource(mailHttp);
|
|
@@ -62,6 +67,8 @@ export class Inkbox {
|
|
|
62
67
|
this._calls = new CallsResource(phoneHttp);
|
|
63
68
|
this._transcripts = new TranscriptsResource(phoneHttp);
|
|
64
69
|
this._idsResource = new IdentitiesResource(idsHttp);
|
|
70
|
+
this._authApps = new AuthenticatorAppsResource(authHttp);
|
|
71
|
+
this._authAccounts = new AuthenticatorAccountsResource(authHttp);
|
|
65
72
|
}
|
|
66
73
|
// ------------------------------------------------------------------
|
|
67
74
|
// Public resource accessors
|
|
@@ -70,6 +77,8 @@ export class Inkbox {
|
|
|
70
77
|
get mailboxes() { return this._mailboxes; }
|
|
71
78
|
/** Org-level phone number operations (list, get, provision, release). */
|
|
72
79
|
get phoneNumbers() { return this._numbers; }
|
|
80
|
+
/** Org-level authenticator app operations (list, get, create, delete). */
|
|
81
|
+
get authenticatorApps() { return this._authApps; }
|
|
73
82
|
// ------------------------------------------------------------------
|
|
74
83
|
// Org-level operations
|
|
75
84
|
// ------------------------------------------------------------------
|
package/dist/inkbox.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"inkbox.js","sourceRoot":"","sources":["../src/inkbox.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,EAAE,aAAa,EAAE,MAAM,YAAY,CAAC;AAC3C,OAAO,EAAE,iBAAiB,EAAE,MAAM,+BAA+B,CAAC;AAClE,OAAO,EAAE,gBAAgB,EAAE,MAAM,8BAA8B,CAAC;AAChE,OAAO,EAAE,eAAe,EAAE,MAAM,6BAA6B,CAAC;AAC9D,OAAO,EAAE,mBAAmB,EAAE,MAAM,mBAAmB,CAAC;AAExD,OAAO,EAAE,oBAAoB,EAAE,MAAM,8BAA8B,CAAC;AACpE,OAAO,EAAE,aAAa,EAAE,MAAM,4BAA4B,CAAC;AAC3D,OAAO,EAAE,mBAAmB,EAAE,MAAM,kCAAkC,CAAC;AACvE,OAAO,EAAE,kBAAkB,EAAE,MAAM,sCAAsC,CAAC;AAC1E,OAAO,EAAE,aAAa,EAAE,MAAM,qBAAqB,CAAC;AAGpD,MAAM,gBAAgB,GAAG,uBAAuB,CAAC;AAWjD;;;;;;;;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