@tailor-platform/function-types 0.8.0 → 0.8.1
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/CHANGELOG.md +6 -0
- package/package.json +1 -1
- package/tailor.d.ts +126 -0
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,11 @@
|
|
|
1
1
|
# @tailor-platform/function-types
|
|
2
2
|
|
|
3
|
+
## 0.8.1
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- [#128](https://github.com/tailor-platform/function/pull/128) [`84ce6ba`](https://github.com/tailor-platform/function/commit/84ce6ba209e0c7bf51d0646ecfdcc32403904da6) Thanks [@k1LoW](https://github.com/k1LoW)! - feat: Add tailor.idp namespace type definitions
|
|
8
|
+
|
|
3
9
|
## 0.7.2
|
|
4
10
|
|
|
5
11
|
### Patch Changes
|
package/package.json
CHANGED
package/tailor.d.ts
CHANGED
|
@@ -277,6 +277,132 @@ interface TailorDBFileAPI {
|
|
|
277
277
|
): Promise<FileStreamIterator>;
|
|
278
278
|
}
|
|
279
279
|
|
|
280
|
+
declare namespace tailor.idp {
|
|
281
|
+
/**
|
|
282
|
+
* Configuration for creating an IDP Client
|
|
283
|
+
*/
|
|
284
|
+
interface ClientConfig {
|
|
285
|
+
namespace: string;
|
|
286
|
+
}
|
|
287
|
+
|
|
288
|
+
/**
|
|
289
|
+
* User object returned from IDP operations
|
|
290
|
+
*/
|
|
291
|
+
interface User {
|
|
292
|
+
id: string;
|
|
293
|
+
name: string;
|
|
294
|
+
disabled: boolean;
|
|
295
|
+
createdAt?: string;
|
|
296
|
+
updatedAt?: string;
|
|
297
|
+
}
|
|
298
|
+
|
|
299
|
+
/**
|
|
300
|
+
* Query options for filtering users
|
|
301
|
+
*/
|
|
302
|
+
interface UserQuery {
|
|
303
|
+
/** Filter by user IDs */
|
|
304
|
+
ids?: string[];
|
|
305
|
+
/** Filter by user names */
|
|
306
|
+
names?: string[];
|
|
307
|
+
}
|
|
308
|
+
|
|
309
|
+
/**
|
|
310
|
+
* Options for listing users
|
|
311
|
+
*/
|
|
312
|
+
interface ListUsersOptions {
|
|
313
|
+
/** Maximum number of users to return */
|
|
314
|
+
first?: number;
|
|
315
|
+
/** Page token for pagination */
|
|
316
|
+
after?: string;
|
|
317
|
+
/** Query filter for users */
|
|
318
|
+
query?: UserQuery;
|
|
319
|
+
}
|
|
320
|
+
|
|
321
|
+
/**
|
|
322
|
+
* Response from listing users
|
|
323
|
+
*/
|
|
324
|
+
interface ListUsersResponse {
|
|
325
|
+
users: User[];
|
|
326
|
+
nextPageToken: string | null;
|
|
327
|
+
totalCount: number;
|
|
328
|
+
}
|
|
329
|
+
|
|
330
|
+
/**
|
|
331
|
+
* Input for creating a new user
|
|
332
|
+
*/
|
|
333
|
+
interface CreateUserInput {
|
|
334
|
+
/** The user's name (typically email) */
|
|
335
|
+
name: string;
|
|
336
|
+
/** The user's password */
|
|
337
|
+
password: string;
|
|
338
|
+
/** Whether the user is disabled */
|
|
339
|
+
disabled?: boolean;
|
|
340
|
+
}
|
|
341
|
+
|
|
342
|
+
/**
|
|
343
|
+
* Input for updating an existing user
|
|
344
|
+
*/
|
|
345
|
+
interface UpdateUserInput {
|
|
346
|
+
/** The user's ID */
|
|
347
|
+
id: string;
|
|
348
|
+
/** New name for the user */
|
|
349
|
+
name?: string;
|
|
350
|
+
/** New password for the user */
|
|
351
|
+
password?: string;
|
|
352
|
+
/** New disabled status for the user */
|
|
353
|
+
disabled?: boolean;
|
|
354
|
+
}
|
|
355
|
+
|
|
356
|
+
/**
|
|
357
|
+
* Input for sending a password reset email
|
|
358
|
+
*/
|
|
359
|
+
interface SendPasswordResetEmailInput {
|
|
360
|
+
/** The ID of the user */
|
|
361
|
+
userId: string;
|
|
362
|
+
/** The URI to redirect to after password reset */
|
|
363
|
+
redirectUri: string;
|
|
364
|
+
}
|
|
365
|
+
|
|
366
|
+
/**
|
|
367
|
+
* IDP Client for user management operations
|
|
368
|
+
*/
|
|
369
|
+
class Client {
|
|
370
|
+
constructor(config: ClientConfig);
|
|
371
|
+
|
|
372
|
+
/**
|
|
373
|
+
* List users in the namespace with optional filtering and pagination.
|
|
374
|
+
*/
|
|
375
|
+
users(options?: ListUsersOptions): Promise<ListUsersResponse>;
|
|
376
|
+
|
|
377
|
+
/**
|
|
378
|
+
* Get a user by ID.
|
|
379
|
+
*/
|
|
380
|
+
user(userId: string): Promise<User>;
|
|
381
|
+
|
|
382
|
+
/**
|
|
383
|
+
* Create a new user.
|
|
384
|
+
*/
|
|
385
|
+
createUser(input: CreateUserInput): Promise<User>;
|
|
386
|
+
|
|
387
|
+
/**
|
|
388
|
+
* Update an existing user.
|
|
389
|
+
*/
|
|
390
|
+
updateUser(input: UpdateUserInput): Promise<User>;
|
|
391
|
+
|
|
392
|
+
/**
|
|
393
|
+
* Delete a user by ID.
|
|
394
|
+
* @returns True if successful
|
|
395
|
+
*/
|
|
396
|
+
deleteUser(userId: string): Promise<boolean>;
|
|
397
|
+
|
|
398
|
+
/**
|
|
399
|
+
* Send a password reset email to a user.
|
|
400
|
+
* @returns True if successful
|
|
401
|
+
*/
|
|
402
|
+
sendPasswordResetEmail(input: SendPasswordResetEmailInput): Promise<boolean>;
|
|
403
|
+
}
|
|
404
|
+
}
|
|
405
|
+
|
|
280
406
|
declare namespace tailor.workflow {
|
|
281
407
|
/**
|
|
282
408
|
* Specifies the machine user that should be used to execute the workflow.
|