@tailor-platform/sdk 0.12.0 → 0.12.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 +16 -0
- package/dist/cli/api.d.mts +39 -3
- package/dist/cli/api.mjs +2 -2
- package/dist/cli/api.mjs.map +1 -1
- package/dist/cli/index.d.mts +1 -1
- package/dist/cli/index.mjs +19 -2
- package/dist/cli/index.mjs.map +1 -1
- package/dist/configure/index.d.mts +4 -4
- package/dist/configure/index.mjs.map +1 -1
- package/dist/{index-CvaR3wBO.d.mts → index-15r0QXT5.d.mts} +6 -10
- package/dist/job-CSwByDTq.mjs.map +1 -1
- package/dist/{token-C2dypdqc.mjs → list-6vWylIIR.mjs} +184 -18
- package/dist/list-6vWylIIR.mjs.map +1 -0
- package/dist/{types-CWvnDV8C.d.mts → types-BvH0p5R9.d.mts} +8 -12
- package/dist/{plugin-generated.d.ts → user-defined.d.ts} +4 -6
- package/dist/utils/test/index.d.mts +3 -3
- package/docs/cli-reference.md +65 -0
- package/package.json +2 -2
- package/postinstall.mjs +6 -8
- package/dist/token-C2dypdqc.mjs.map +0 -1
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/// <reference path="./
|
|
1
|
+
/// <reference path="./user-defined.d.ts" />
|
|
2
2
|
|
|
3
3
|
import * as zod34 from "zod";
|
|
4
4
|
import { z } from "zod";
|
|
@@ -176,16 +176,12 @@ declare class TailorField<const Defined extends DefinedFieldMetadata = DefinedFi
|
|
|
176
176
|
}
|
|
177
177
|
//#endregion
|
|
178
178
|
//#region src/configure/types/user.d.ts
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
interface AttributeList {
|
|
183
|
-
__tuple?: [];
|
|
184
|
-
}
|
|
185
|
-
}
|
|
179
|
+
interface AttributeMap$1 {}
|
|
180
|
+
interface AttributeList$1 {
|
|
181
|
+
__tuple?: [];
|
|
186
182
|
}
|
|
187
|
-
type InferredAttributeMap = keyof
|
|
188
|
-
type InferredAttributeList =
|
|
183
|
+
type InferredAttributeMap = keyof AttributeMap$1 extends never ? Record<string, string | string[] | boolean | boolean[] | undefined> : AttributeMap$1;
|
|
184
|
+
type InferredAttributeList = AttributeList$1["__tuple"] extends [] ? string[] : AttributeList$1["__tuple"];
|
|
189
185
|
/** Represents a user in the Tailor platform. */
|
|
190
186
|
type TailorUser = {
|
|
191
187
|
/**
|
|
@@ -1429,5 +1425,5 @@ type WebhookOperation = z.infer<typeof WebhookOperationSchema>;
|
|
|
1429
1425
|
type Executor = z.infer<typeof ExecutorSchema>;
|
|
1430
1426
|
type ExecutorInput = z.input<typeof ExecutorSchema>;
|
|
1431
1427
|
//#endregion
|
|
1432
|
-
export { AllowedValues, AllowedValuesOutput, AppConfig, ArrayFieldOutput, AuthConfig, AuthExternalConfig, AuthOwnConfig, type AuthServiceInput, type BuiltinIdP, CodeGeneratorBase, Executor, ExecutorInput, ExecutorServiceConfig, ExecutorServiceInput, FieldMetadata, FieldOptions, FieldOutput, FunctionOperation, Generator, GqlOperation, type IDToken, IdPConfig, IdPExternalConfig, type IdProviderConfig, IncomingWebhookTrigger, InferFieldsOutput, type OAuth2Client, type OAuth2ClientGrantType, type OIDC, PermissionCondition, QueryType, RecordTrigger, Resolver, ResolverExecutedTrigger, ResolverExternalConfig, ResolverInput, ResolverServiceConfig, ResolverServiceInput, type SAML, type SCIMAttribute, type SCIMAttributeMapping, type SCIMAttributeType, type SCIMAuthorization, type SCIMConfig, type SCIMResource, ScheduleTriggerInput, StaticWebsiteConfig, TailorDBField, TailorDBInstance, TailorDBType, TailorDBTypeConfig, TailorField, TailorTypeGqlPermission, TailorTypePermission, TailorUser, type TenantProviderConfig, type UserAttributeKey, type UserAttributeListKey, type UserAttributeMap, type UsernameFieldKey, type ValueOperand, WebhookOperation, WorkflowServiceConfig, WorkflowServiceInput, db, defineAuth, defineConfig, defineGenerators, defineIdp, defineStaticWebSite, output, unauthenticatedTailorUser };
|
|
1433
|
-
//# sourceMappingURL=types-
|
|
1428
|
+
export { AllowedValues, AllowedValuesOutput, AppConfig, ArrayFieldOutput, AttributeList$1 as AttributeList, AttributeMap$1 as AttributeMap, AuthConfig, AuthExternalConfig, AuthOwnConfig, type AuthServiceInput, type BuiltinIdP, CodeGeneratorBase, Executor, ExecutorInput, ExecutorServiceConfig, ExecutorServiceInput, FieldMetadata, FieldOptions, FieldOutput, FunctionOperation, Generator, GqlOperation, type IDToken, IdPConfig, IdPExternalConfig, type IdProviderConfig, IncomingWebhookTrigger, InferFieldsOutput, type OAuth2Client, type OAuth2ClientGrantType, type OIDC, PermissionCondition, QueryType, RecordTrigger, Resolver, ResolverExecutedTrigger, ResolverExternalConfig, ResolverInput, ResolverServiceConfig, ResolverServiceInput, type SAML, type SCIMAttribute, type SCIMAttributeMapping, type SCIMAttributeType, type SCIMAuthorization, type SCIMConfig, type SCIMResource, ScheduleTriggerInput, StaticWebsiteConfig, TailorDBField, TailorDBInstance, TailorDBType, TailorDBTypeConfig, TailorField, TailorTypeGqlPermission, TailorTypePermission, TailorUser, type TenantProviderConfig, type UserAttributeKey, type UserAttributeListKey, type UserAttributeMap, type UsernameFieldKey, type ValueOperand, WebhookOperation, WorkflowServiceConfig, WorkflowServiceInput, db, defineAuth, defineConfig, defineGenerators, defineIdp, defineStaticWebSite, output, unauthenticatedTailorUser };
|
|
1429
|
+
//# sourceMappingURL=types-BvH0p5R9.d.mts.map
|
|
@@ -2,12 +2,10 @@
|
|
|
2
2
|
// Do not edit this file manually
|
|
3
3
|
// Regenerated automatically when running 'tailor-sdk apply' or 'tailor-sdk generate'
|
|
4
4
|
|
|
5
|
-
declare
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
__tuple: string[];
|
|
10
|
-
}
|
|
5
|
+
declare module "@tailor-platform/sdk" {
|
|
6
|
+
interface AttributeMap {}
|
|
7
|
+
interface AttributeList {
|
|
8
|
+
__tuple: string[];
|
|
11
9
|
}
|
|
12
10
|
}
|
|
13
11
|
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
/// <reference path="./../../
|
|
1
|
+
/// <reference path="./../../user-defined.d.ts" />
|
|
2
2
|
|
|
3
|
-
import { TailorDBType, TailorField, TailorUser } from "../../types-
|
|
4
|
-
import { output } from "../../index-
|
|
3
|
+
import { TailorDBType, TailorField, TailorUser } from "../../types-BvH0p5R9.mjs";
|
|
4
|
+
import { output } from "../../index-15r0QXT5.mjs";
|
|
5
5
|
import { StandardSchemaV1 } from "@standard-schema/spec";
|
|
6
6
|
|
|
7
7
|
//#region src/utils/test/index.d.ts
|
package/docs/cli-reference.md
CHANGED
|
@@ -498,3 +498,68 @@ tailor-sdk machineuser token <name> [options]
|
|
|
498
498
|
- `-p, --profile` - Workspace profile to use
|
|
499
499
|
- `-c, --config` - Path to the SDK config file (default: `tailor.config.ts`)
|
|
500
500
|
- `-f, --format` - Output format: `table` or `json` (default: `table`)
|
|
501
|
+
|
|
502
|
+
### oauth2client
|
|
503
|
+
|
|
504
|
+
Manage OAuth2 clients in your Tailor Platform application.
|
|
505
|
+
|
|
506
|
+
```bash
|
|
507
|
+
tailor-sdk oauth2client <subcommand> [options]
|
|
508
|
+
```
|
|
509
|
+
|
|
510
|
+
#### oauth2client list
|
|
511
|
+
|
|
512
|
+
List all OAuth2 clients in the application.
|
|
513
|
+
|
|
514
|
+
```bash
|
|
515
|
+
tailor-sdk oauth2client list [options]
|
|
516
|
+
```
|
|
517
|
+
|
|
518
|
+
**Options:**
|
|
519
|
+
|
|
520
|
+
- `-w, --workspace-id` - ID of the workspace
|
|
521
|
+
- `-p, --profile` - Workspace profile to use
|
|
522
|
+
- `-c, --config` - Path to the SDK config file (default: `tailor.config.ts`)
|
|
523
|
+
- `-f, --format` - Output format: `table` or `json` (default: `table`)
|
|
524
|
+
|
|
525
|
+
**Output:**
|
|
526
|
+
|
|
527
|
+
Returns a list of OAuth2 clients with the following fields:
|
|
528
|
+
|
|
529
|
+
- `name` - Client name
|
|
530
|
+
- `description` - Client description
|
|
531
|
+
- `clientId` - OAuth2 client ID
|
|
532
|
+
- `grantTypes` - Supported grant types (e.g., `authorization_code`, `refresh_token`)
|
|
533
|
+
- `redirectUris` - Registered redirect URIs
|
|
534
|
+
- `createdAt` - Creation timestamp
|
|
535
|
+
|
|
536
|
+
#### oauth2client get
|
|
537
|
+
|
|
538
|
+
Get OAuth2 client credentials (including client secret).
|
|
539
|
+
|
|
540
|
+
```bash
|
|
541
|
+
tailor-sdk oauth2client get <name> [options]
|
|
542
|
+
```
|
|
543
|
+
|
|
544
|
+
**Arguments:**
|
|
545
|
+
|
|
546
|
+
- `name` - OAuth2 client name (required)
|
|
547
|
+
|
|
548
|
+
**Options:**
|
|
549
|
+
|
|
550
|
+
- `-w, --workspace-id` - ID of the workspace
|
|
551
|
+
- `-p, --profile` - Workspace profile to use
|
|
552
|
+
- `-c, --config` - Path to the SDK config file (default: `tailor.config.ts`)
|
|
553
|
+
- `-f, --format` - Output format: `table` or `json` (default: `table`)
|
|
554
|
+
|
|
555
|
+
**Output:**
|
|
556
|
+
|
|
557
|
+
Returns the OAuth2 client credentials with the following fields:
|
|
558
|
+
|
|
559
|
+
- `name` - Client name
|
|
560
|
+
- `description` - Client description
|
|
561
|
+
- `clientId` - OAuth2 client ID
|
|
562
|
+
- `clientSecret` - OAuth2 client secret
|
|
563
|
+
- `grantTypes` - Supported grant types
|
|
564
|
+
- `redirectUris` - Registered redirect URIs
|
|
565
|
+
- `createdAt` - Creation timestamp
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@tailor-platform/sdk",
|
|
3
|
-
"version": "0.12.
|
|
3
|
+
"version": "0.12.1",
|
|
4
4
|
"description": "Tailor Platform SDK - The SDK to work with Tailor Platform",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"main": "./dist/configure/index.mjs",
|
|
@@ -80,7 +80,7 @@
|
|
|
80
80
|
"tsdown": "0.15.6",
|
|
81
81
|
"typescript": "5.9.3",
|
|
82
82
|
"typescript-eslint": "8.48.0",
|
|
83
|
-
"vitest": "4.0.
|
|
83
|
+
"vitest": "4.0.14"
|
|
84
84
|
},
|
|
85
85
|
"scripts": {
|
|
86
86
|
"test": "vitest",
|
package/postinstall.mjs
CHANGED
|
@@ -22,9 +22,9 @@ async function install() {
|
|
|
22
22
|
|
|
23
23
|
console.log("🔧 Initializing Tailor Platform SDK type definitions...");
|
|
24
24
|
|
|
25
|
-
// Create
|
|
25
|
+
// Create user-defined.d.ts in the dist directory
|
|
26
26
|
const distDir = resolve(__dirname, "dist");
|
|
27
|
-
const pluginTypesPath = resolve(distDir, "
|
|
27
|
+
const pluginTypesPath = resolve(distDir, "user-defined.d.ts");
|
|
28
28
|
|
|
29
29
|
// Check if dist directory exists
|
|
30
30
|
if (!existsSync(distDir)) {
|
|
@@ -59,12 +59,10 @@ async function install() {
|
|
|
59
59
|
// Do not edit this file manually
|
|
60
60
|
// Regenerated automatically when running 'tailor-sdk apply' or 'tailor-sdk generate'
|
|
61
61
|
|
|
62
|
-
declare
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
__tuple: string[];
|
|
67
|
-
}
|
|
62
|
+
declare module "@tailor-platform/sdk" {
|
|
63
|
+
interface AttributeMap {}
|
|
64
|
+
interface AttributeList {
|
|
65
|
+
__tuple: string[];
|
|
68
66
|
}
|
|
69
67
|
}
|
|
70
68
|
|