@tailor-platform/sdk 1.80.1 → 1.82.0
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 +28 -0
- package/dist/application-CP0W2sQo.mjs +3 -0
- package/dist/{application-C1d52JP9.mjs → application-CVeA53ok.mjs} +172 -27
- package/dist/application-CVeA53ok.mjs.map +1 -0
- package/dist/cli/index.mjs +19 -34
- package/dist/cli/index.mjs.map +1 -1
- package/dist/cli/lib.mjs +2 -2
- package/dist/cli/skills.mjs +1 -1
- package/dist/completion/zsh-worker.zsh +1 -1
- package/dist/configure/config/types.d.mts +3 -1
- package/dist/configure/index.d.mts +2 -1
- package/dist/configure/index.mjs +9 -0
- package/dist/configure/index.mjs.map +1 -1
- package/dist/configure/services/idp/permission.d.mts +1 -16
- package/dist/configure/services/index.d.mts +2 -1
- package/dist/configure/services/resolver/index.d.mts +2 -1
- package/dist/configure/services/resolver/permission.d.mts +64 -0
- package/dist/configure/services/resolver/resolver.d.mts +14 -2
- package/dist/configure/services/tailordb/permission.d.mts +1 -16
- package/dist/configure/types/permission-operand.types.d.mts +20 -0
- package/dist/{crashreport-BNWUM6Kf.mjs → crashreport-DMYuHnBN.mjs} +2 -2
- package/dist/{crashreport-BNWUM6Kf.mjs.map → crashreport-DMYuHnBN.mjs.map} +1 -1
- package/dist/{crashreport-BafWvjjX.mjs → crashreport-ecqnz51B.mjs} +1 -1
- package/dist/{globals-DVJ8RVvm.mjs → globals-DUqEetIh.mjs} +11 -2
- package/dist/{globals-DVJ8RVvm.mjs.map → globals-DUqEetIh.mjs.map} +1 -1
- package/dist/{logger-BwS4ppwO.mjs → logger-CXQq9YIp.mjs} +110 -13
- package/dist/logger-CXQq9YIp.mjs.map +1 -0
- package/dist/logger-t5ASCDZm.mjs +49 -0
- package/dist/logger-t5ASCDZm.mjs.map +1 -0
- package/dist/{register-typescript-runtime-Bd4bcLbW.mjs → register-typescript-runtime-O7zQNif0.mjs} +44 -17
- package/dist/register-typescript-runtime-O7zQNif0.mjs.map +1 -0
- package/dist/runtime/globals.d.mts +7 -0
- package/dist/runtime/index.d.mts +3 -1
- package/dist/runtime/index.mjs +2 -1
- package/dist/runtime/logger.d.mts +98 -0
- package/dist/runtime/logger.mjs +3 -0
- package/dist/{service-CDPatibu.mjs → service-B0MaodSg.mjs} +2 -2
- package/dist/{service-CDPatibu.mjs.map → service-B0MaodSg.mjs.map} +1 -1
- package/dist/{service-Cp0I7ZFe.mjs → service-CIGSGg9I.mjs} +2 -2
- package/dist/{service-Cp0I7ZFe.mjs.map → service-CIGSGg9I.mjs.map} +1 -1
- package/dist/service-KnAiVofD.mjs +3 -0
- package/dist/{service_pb-BoLM0X4K.mjs → service_pb-BwZRiNug.mjs} +2 -2
- package/dist/{service_pb-BoLM0X4K.mjs.map → service_pb-BwZRiNug.mjs.map} +1 -1
- package/dist/{service_pb-r1T7kpJc.mjs → service_pb-wRkxUta6.mjs} +1 -1
- package/dist/types/auth.generated.d.mts +14 -2
- package/dist/types/executor.generated.d.mts +19 -0
- package/dist/types/http-adapter.generated.d.mts +5 -0
- package/dist/types/idp.generated.d.mts +30 -0
- package/dist/types/resolver.generated.d.mts +28 -2
- package/dist/types/tailordb.generated.d.mts +15 -1
- package/dist/vitest/environment.mjs +1 -1
- package/dist/vitest/index.d.mts +4 -2
- package/dist/vitest/index.mjs +83 -2
- package/dist/vitest/index.mjs.map +1 -1
- package/dist/vitest/mock.d.mts +2 -1
- package/dist/vitest/mocks/file.d.mts +1 -1
- package/dist/vitest/mocks/logger.d.mts +45 -0
- package/dist/vitest/setup.mjs +1 -1
- package/dist/{workspace_resource_pb-Db3fv68L.mjs → workspace_resource_pb-UGK1SSn_.mjs} +7 -2
- package/dist/{workspace_resource_pb-Db3fv68L.mjs.map → workspace_resource_pb-UGK1SSn_.mjs.map} +1 -1
- package/docs/configuration.md +3 -1
- package/docs/runtime.md +4 -0
- package/docs/services/resolver.md +54 -0
- package/docs/testing.md +23 -2
- package/package.json +11 -6
- package/dist/application-C1d52JP9.mjs.map +0 -1
- package/dist/application-Nlh9BHQf.mjs +0 -3
- package/dist/logger-BwS4ppwO.mjs.map +0 -1
- package/dist/register-typescript-runtime-Bd4bcLbW.mjs.map +0 -1
- package/dist/service-Cg7Qibit.mjs +0 -3
package/dist/vitest/mock.d.mts
CHANGED
|
@@ -3,7 +3,8 @@ import { MockAuthconnectionOptions, mockAuthconnection } from "./mocks/authconne
|
|
|
3
3
|
import { MockFileOptions, mockFile } from "./mocks/file.mjs";
|
|
4
4
|
import { MockIconvOptions, mockIconv } from "./mocks/iconv.mjs";
|
|
5
5
|
import { MockIdpOptions, mockIdp } from "./mocks/idp.mjs";
|
|
6
|
+
import { MockLoggerOptions, mockLogger } from "./mocks/logger.mjs";
|
|
6
7
|
import { MockSecretmanagerOptions, mockSecretmanager } from "./mocks/secretmanager.mjs";
|
|
7
8
|
import { MockTailordbOptions, QueryBehavior, QueryMatch, QueryMatcher, mockTailordb } from "./mocks/tailordb.mjs";
|
|
8
9
|
import { mockWorkflow } from "./mocks/workflow.mjs";
|
|
9
|
-
export { type MockAigatewayOptions, type MockAuthconnectionOptions, type MockFileOptions, type MockIconvOptions, type MockIdpOptions, type MockSecretmanagerOptions, type MockTailordbOptions, type QueryBehavior, type QueryMatch, type QueryMatcher, mockAigateway, mockAuthconnection, mockFile, mockIconv, mockIdp, mockSecretmanager, mockTailordb, mockWorkflow };
|
|
10
|
+
export { type MockAigatewayOptions, type MockAuthconnectionOptions, type MockFileOptions, type MockIconvOptions, type MockIdpOptions, type MockLoggerOptions, type MockSecretmanagerOptions, type MockTailordbOptions, type QueryBehavior, type QueryMatch, type QueryMatcher, mockAigateway, mockAuthconnection, mockFile, mockIconv, mockIdp, mockLogger, mockSecretmanager, mockTailordb, mockWorkflow };
|
|
@@ -46,10 +46,10 @@ declare function mockFile(options?: MockFileOptions): {
|
|
|
46
46
|
calls: FileCall[];
|
|
47
47
|
clear(): void;
|
|
48
48
|
reset(): void;
|
|
49
|
-
delete: Mock<(namespace: string, typeName: string, fieldName: string, recordId: string) => Promise<void>>;
|
|
50
49
|
upload: Mock<(namespace: string, typeName: string, fieldName: string, recordId: string, data: string | ArrayBuffer | Uint8Array | number[], options?: FileUploadOptions) => Promise<FileUploadResponse>>;
|
|
51
50
|
download: Mock<(namespace: string, typeName: string, fieldName: string, recordId: string) => Promise<FileDownloadResponse>>;
|
|
52
51
|
downloadAsBase64: Mock<(namespace: string, typeName: string, fieldName: string, recordId: string) => Promise<FileDownloadAsBase64Response>>;
|
|
52
|
+
delete: Mock<(namespace: string, typeName: string, fieldName: string, recordId: string) => Promise<void>>;
|
|
53
53
|
getMetadata: Mock<(namespace: string, typeName: string, fieldName: string, recordId: string) => Promise<FileMetadata>>;
|
|
54
54
|
openDownloadStream: Mock<(namespace: string, typeName: string, fieldName: string, recordId: string) => Promise<FileStreamIterator>>;
|
|
55
55
|
downloadStream: Mock<(namespace: string, typeName: string, fieldName: string, recordId: string) => Promise<FileDownloadStreamResponse>>;
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
import { LogAttributes } from "../../runtime/logger.mjs";
|
|
2
|
+
//#region src/vitest/mocks/logger.d.ts
|
|
3
|
+
type LogSeverity = "debug" | "info" | "warn" | "error";
|
|
4
|
+
/** A recorded `debug`/`info`/`warn`/`error` call. */
|
|
5
|
+
interface LogCall {
|
|
6
|
+
severity: LogSeverity;
|
|
7
|
+
message: string;
|
|
8
|
+
attributes?: LogAttributes;
|
|
9
|
+
}
|
|
10
|
+
/** Initial fixtures for a logger mock. */
|
|
11
|
+
interface MockLoggerOptions {}
|
|
12
|
+
/**
|
|
13
|
+
* Acquire a disposable mock for `tailor.logger`. Each method is a `vi.fn`, so
|
|
14
|
+
* calls can be asserted directly; `calls` returns the `debug`/`info`/`warn`/
|
|
15
|
+
* `error` entries in the order they were emitted. Restored on dispose.
|
|
16
|
+
* @param _options - Reserved for future initial fixtures
|
|
17
|
+
* @returns Disposable logger mock control object
|
|
18
|
+
* @example
|
|
19
|
+
* ```typescript
|
|
20
|
+
* import { mockLogger } from "@tailor-platform/sdk/vitest";
|
|
21
|
+
*
|
|
22
|
+
* test("logs the processed order", () => {
|
|
23
|
+
* using logger = mockLogger();
|
|
24
|
+
* // …run code that calls tailor.logger.info…
|
|
25
|
+
* expect(logger.info).toHaveBeenCalledWith("order processed", { orderId: "o-1" });
|
|
26
|
+
* });
|
|
27
|
+
* ```
|
|
28
|
+
*/
|
|
29
|
+
declare function mockLogger(_options?: MockLoggerOptions): {
|
|
30
|
+
/** The `debug` `vi.fn`. */
|
|
31
|
+
debug: import("vitest").Mock<(_message: string, _attributes?: LogAttributes) => void>;
|
|
32
|
+
/** The `info` `vi.fn`. */
|
|
33
|
+
info: import("vitest").Mock<(_message: string, _attributes?: LogAttributes) => void>;
|
|
34
|
+
/** The `warn` `vi.fn`. */
|
|
35
|
+
warn: import("vitest").Mock<(_message: string, _attributes?: LogAttributes) => void>;
|
|
36
|
+
/** The `error` `vi.fn`. */
|
|
37
|
+
error: import("vitest").Mock<(_message: string, _attributes?: LogAttributes) => void>;
|
|
38
|
+
/** The `setAttributes` `vi.fn`. */
|
|
39
|
+
setAttributes: import("vitest").Mock<(_attributes: LogAttributes) => void>;
|
|
40
|
+
readonly calls: LogCall[];
|
|
41
|
+
clear(): void;
|
|
42
|
+
reset(): void;
|
|
43
|
+
} & Disposable;
|
|
44
|
+
//#endregion
|
|
45
|
+
export { MockLoggerOptions, mockLogger };
|
package/dist/vitest/setup.mjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { t as RUNTIME_FLAG_KEY } from "../globals-
|
|
1
|
+
import { t as RUNTIME_FLAG_KEY } from "../globals-DUqEetIh.mjs";
|
|
2
2
|
import { t as mockSecretmanager } from "../secretmanager-IY4UvinW.mjs";
|
|
3
3
|
import { pathToFileURL } from "node:url";
|
|
4
4
|
import { afterEach, beforeAll, beforeEach } from "vitest";
|
|
@@ -686,6 +686,11 @@ const file_tailor_v1_tailordb_resource = /*@__PURE__*/ fileDesc("CiF0YWlsb3IvdjE
|
|
|
686
686
|
file_tailor_v1_resource
|
|
687
687
|
]);
|
|
688
688
|
/**
|
|
689
|
+
* Describes the message tailor.v1.TailorDBType.
|
|
690
|
+
* Use `create(TailorDBTypeSchema)` to create a new message.
|
|
691
|
+
*/
|
|
692
|
+
const TailorDBTypeSchema = /*@__PURE__*/ messageDesc(file_tailor_v1_tailordb_resource, 1);
|
|
693
|
+
/**
|
|
689
694
|
* Describes the enum tailor.v1.TailorDBType.Permission.Operator.
|
|
690
695
|
*/
|
|
691
696
|
const TailorDBType_Permission_OperatorSchema = /*@__PURE__*/ enumDesc(file_tailor_v1_tailordb_resource, 1, 18, 0);
|
|
@@ -843,5 +848,5 @@ const WorkspacePlatformUserRoleSchema = /*@__PURE__*/ enumDesc(file_tailor_v1_wo
|
|
|
843
848
|
const WorkspacePlatformUserRole = /*@__PURE__*/ tsEnum(WorkspacePlatformUserRoleSchema);
|
|
844
849
|
|
|
845
850
|
//#endregion
|
|
846
|
-
export {
|
|
847
|
-
//# sourceMappingURL=workspace_resource_pb-
|
|
851
|
+
export { CreateAuthHookRequestSchema as $, file_tailor_v1_secret_manager as A, PATScope as At, IdPLang as B, Subgraph_ServiceType as Bt, CreateStaticWebsiteRequestSchema as C, AuthInvokerSchema as Ct, CreateSecretManagerSecretRequestSchema as D, AuthSCIMAttribute_Type as Dt, CustomDomainStatus as E, AuthSCIMAttribute_Mutability as Et, file_tailor_v1_pipeline as F, CreateApplicationRequestSchema as Ft, file_tailor_v1_function_resource as G, file_tailor_fieldmask_v1_option as Gt, IdPPermissionPermit as H, UpdateAIGatewayRequestSchema as Ht, PipelineResolver_OperationType as I, GetApplicationSchemaHealthResponse_ApplicationSchemaHealthStatus as It, file_tailor_v1_executor as J, FilterSchema as Jt, CreateExecutorExecutorRequestSchema as K, ConditionSchema as Kt, CreateIdPServiceRequestSchema as L, UpdateApplicationRequestSchema as Lt, CreatePipelineServiceRequestSchema as M, UserProfileProviderConfig_UserProfileProviderType as Mt, UpdatePipelineResolverRequestSchema as N, file_tailor_v1_auth_resource as Nt, CreateSecretManagerVaultRequestSchema as O, AuthSCIMAttribute_Uniqueness as Ot, UpdatePipelineServiceRequestSchema as P, file_tailor_v1_secret_manager_resource as Pt, CreateAuthConnectionRequestSchema as Q, UpdateIdPServiceRequestSchema as R, file_tailor_v1_application as Rt, AddCustomDomainRequestSchema as S, AuthIDPConfig_AuthType as St, file_tailor_v1_staticwebsite as T, AuthOAuth2Client_GrantType as Tt, FunctionExecution_Status as U, file_tailor_v1_aigateway as Ut, IdPPermissionOperator as V, CreateAIGatewayRequestSchema as Vt, FunctionExecution_Type as W, file_google_api_field_behavior as Wt, ExecutorTargetType as X, file_tailor_v1_resource as Xt, ExecutorJobStatus as Y, PageDirection as Yt, ExecutorTriggerType as Z, file_buf_validate_validate as Zt, TailorDBGQLPermission_Permit as _, UpdateUserProfileConfigRequestSchema as _t, CreateWorkflowRequestSchema as a, CreateAuthServiceRequestSchema as at, TailorDBType_Permission_Permit as b, AuthConnection_Type as bt, file_tailor_v1_workflow as c, UpdateAuthConnectionRequestSchema as ct, CreateTailorDBServiceRequestSchema as d, UpdateAuthMachineUserRequestSchema as dt, CreateAuthIDPConfigRequestSchema as et, CreateTailorDBTypeRequestSchema as f, UpdateAuthOAuth2ClientRequestSchema as ft, TailorDBGQLPermission_Operator as g, UpdateTenantConfigRequestSchema as gt, TailorDBGQLPermission_Action as h, UpdateAuthServiceRequestSchema as ht, CreateWorkflowJobFunctionRequestSchema as i, CreateAuthSCIMResourceRequestSchema as it, CreatePipelineResolverRequestSchema as j, TenantProviderConfig_TenantProviderType as jt, UpdateSecretManagerSecretRequestSchema as k, AuthSCIMConfig_AuthorizationType as kt, WorkflowExecution_Status as l, UpdateAuthHookRequestSchema as lt, file_tailor_v1_tailordb as m, UpdateAuthSCIMResourceRequestSchema as mt, file_tailor_v1_workspace_resource as n, CreateAuthOAuth2ClientRequestSchema as nt, UpdateWorkflowJobFunctionExecutionPolicyRequestSchema as o, CreateTenantConfigRequestSchema as ot, UpdateTailorDBTypeRequestSchema as p, UpdateAuthSCIMConfigRequestSchema as pt, UpdateExecutorExecutorRequestSchema as q, Condition_Operator as qt, CreateWorkflowJobFunctionExecutionPolicyRequestSchema as r, CreateAuthSCIMConfigRequestSchema as rt, UpdateWorkflowRequestSchema as s, CreateUserProfileConfigRequestSchema as st, WorkspacePlatformUserRole as t, CreateAuthMachineUserRequestSchema as tt, WorkflowJobExecution_Status as u, UpdateAuthIDPConfigRequestSchema as ut, TailorDBTypeSchema as v, file_tailor_v1_auth as vt, UpdateStaticWebsiteRequestSchema as w, AuthOAuth2Client_ClientType as wt, TailorDBType_PermitAction as x, AuthHookPoint as xt, TailorDBType_Permission_Operator as y, AuthConnection_Status as yt, file_tailor_v1_idp as z, ApplicationSchemaUpdateAttemptStatus as zt };
|
|
852
|
+
//# sourceMappingURL=workspace_resource_pb-UGK1SSn_.mjs.map
|