@tailor-platform/function-types 0.8.0 → 0.8.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.
- package/CHANGELOG.md +12 -0
- package/package.json +1 -1
- package/tailor.d.ts +128 -0
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,17 @@
|
|
|
1
1
|
# @tailor-platform/function-types
|
|
2
2
|
|
|
3
|
+
## 0.8.2
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- [#131](https://github.com/tailor-platform/function/pull/131) [`cdac331`](https://github.com/tailor-platform/function/commit/cdac3319608f5b6b425545ceaae795088bfb7047) Thanks [@k1LoW](https://github.com/k1LoW)! - Make `password` optional in `CreateUserInput` and add `clearPassword` to `UpdateUserInput`
|
|
8
|
+
|
|
9
|
+
## 0.8.1
|
|
10
|
+
|
|
11
|
+
### Patch Changes
|
|
12
|
+
|
|
13
|
+
- [#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
|
|
14
|
+
|
|
3
15
|
## 0.7.2
|
|
4
16
|
|
|
5
17
|
### Patch Changes
|
package/package.json
CHANGED
package/tailor.d.ts
CHANGED
|
@@ -277,6 +277,134 @@ 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. If omitted, the user is created without a password (cannot log in with any 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. Cannot be used with clearPassword. */
|
|
351
|
+
password?: string;
|
|
352
|
+
/** If true, remove the user's password. Cannot be used with password. */
|
|
353
|
+
clearPassword?: boolean;
|
|
354
|
+
/** New disabled status for the user */
|
|
355
|
+
disabled?: boolean;
|
|
356
|
+
}
|
|
357
|
+
|
|
358
|
+
/**
|
|
359
|
+
* Input for sending a password reset email
|
|
360
|
+
*/
|
|
361
|
+
interface SendPasswordResetEmailInput {
|
|
362
|
+
/** The ID of the user */
|
|
363
|
+
userId: string;
|
|
364
|
+
/** The URI to redirect to after password reset */
|
|
365
|
+
redirectUri: string;
|
|
366
|
+
}
|
|
367
|
+
|
|
368
|
+
/**
|
|
369
|
+
* IDP Client for user management operations
|
|
370
|
+
*/
|
|
371
|
+
class Client {
|
|
372
|
+
constructor(config: ClientConfig);
|
|
373
|
+
|
|
374
|
+
/**
|
|
375
|
+
* List users in the namespace with optional filtering and pagination.
|
|
376
|
+
*/
|
|
377
|
+
users(options?: ListUsersOptions): Promise<ListUsersResponse>;
|
|
378
|
+
|
|
379
|
+
/**
|
|
380
|
+
* Get a user by ID.
|
|
381
|
+
*/
|
|
382
|
+
user(userId: string): Promise<User>;
|
|
383
|
+
|
|
384
|
+
/**
|
|
385
|
+
* Create a new user.
|
|
386
|
+
*/
|
|
387
|
+
createUser(input: CreateUserInput): Promise<User>;
|
|
388
|
+
|
|
389
|
+
/**
|
|
390
|
+
* Update an existing user.
|
|
391
|
+
*/
|
|
392
|
+
updateUser(input: UpdateUserInput): Promise<User>;
|
|
393
|
+
|
|
394
|
+
/**
|
|
395
|
+
* Delete a user by ID.
|
|
396
|
+
* @returns True if successful
|
|
397
|
+
*/
|
|
398
|
+
deleteUser(userId: string): Promise<boolean>;
|
|
399
|
+
|
|
400
|
+
/**
|
|
401
|
+
* Send a password reset email to a user.
|
|
402
|
+
* @returns True if successful
|
|
403
|
+
*/
|
|
404
|
+
sendPasswordResetEmail(input: SendPasswordResetEmailInput): Promise<boolean>;
|
|
405
|
+
}
|
|
406
|
+
}
|
|
407
|
+
|
|
280
408
|
declare namespace tailor.workflow {
|
|
281
409
|
/**
|
|
282
410
|
* Specifies the machine user that should be used to execute the workflow.
|