@tailor-platform/sdk 1.80.0 → 1.81.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.
Files changed (55) hide show
  1. package/CHANGELOG.md +28 -0
  2. package/dist/application-B1_7Wm37.mjs +3 -0
  3. package/dist/{application-C1d52JP9.mjs → application-DDe0er6L.mjs} +149 -20
  4. package/dist/{application-C1d52JP9.mjs.map → application-DDe0er6L.mjs.map} +1 -1
  5. package/dist/cli/index.mjs +13 -28
  6. package/dist/cli/index.mjs.map +1 -1
  7. package/dist/cli/lib.mjs +2 -2
  8. package/dist/completion/zsh-worker.zsh +1 -1
  9. package/dist/configure/index.d.mts +3 -2
  10. package/dist/configure/index.mjs +9 -0
  11. package/dist/configure/index.mjs.map +1 -1
  12. package/dist/configure/services/idp/index.d.mts +1 -1
  13. package/dist/configure/services/idp/permission.d.mts +1 -16
  14. package/dist/configure/services/idp/types.d.mts +5 -1
  15. package/dist/configure/services/index.d.mts +3 -2
  16. package/dist/configure/services/resolver/index.d.mts +2 -1
  17. package/dist/configure/services/resolver/permission.d.mts +64 -0
  18. package/dist/configure/services/resolver/resolver.d.mts +14 -2
  19. package/dist/configure/services/tailordb/permission.d.mts +1 -16
  20. package/dist/configure/types/permission-operand.types.d.mts +20 -0
  21. package/dist/{globals-B-n_3uYu.mjs → globals-DUqEetIh.mjs} +18 -2
  22. package/dist/{globals-B-n_3uYu.mjs.map → globals-DUqEetIh.mjs.map} +1 -1
  23. package/dist/logger-B-fqZe2W.mjs +50 -0
  24. package/dist/logger-B-fqZe2W.mjs.map +1 -0
  25. package/dist/{register-typescript-runtime-Bd4bcLbW.mjs → register-typescript-runtime-QAWucsg0.mjs} +40 -9
  26. package/dist/register-typescript-runtime-QAWucsg0.mjs.map +1 -0
  27. package/dist/runtime/globals.d.mts +7 -0
  28. package/dist/runtime/index.d.mts +3 -1
  29. package/dist/runtime/index.mjs +2 -1
  30. package/dist/runtime/logger.d.mts +98 -0
  31. package/dist/runtime/logger.mjs +3 -0
  32. package/dist/{service_pb-BoLM0X4K.mjs → service_pb-BwZRiNug.mjs} +2 -2
  33. package/dist/{service_pb-BoLM0X4K.mjs.map → service_pb-BwZRiNug.mjs.map} +1 -1
  34. package/dist/{service_pb-r1T7kpJc.mjs → service_pb-wRkxUta6.mjs} +1 -1
  35. package/dist/types/auth.generated.d.mts +14 -2
  36. package/dist/types/executor.generated.d.mts +19 -0
  37. package/dist/types/http-adapter.generated.d.mts +5 -0
  38. package/dist/types/idp.generated.d.mts +30 -0
  39. package/dist/types/resolver.generated.d.mts +28 -2
  40. package/dist/types/tailordb.generated.d.mts +15 -1
  41. package/dist/vitest/environment.mjs +1 -1
  42. package/dist/vitest/index.d.mts +4 -2
  43. package/dist/vitest/index.mjs +83 -2
  44. package/dist/vitest/index.mjs.map +1 -1
  45. package/dist/vitest/mock.d.mts +2 -1
  46. package/dist/vitest/mocks/logger.d.mts +45 -0
  47. package/dist/vitest/setup.mjs +1 -1
  48. package/dist/{workspace_resource_pb-Db3fv68L.mjs → workspace_resource_pb-UGK1SSn_.mjs} +7 -2
  49. package/dist/{workspace_resource_pb-Db3fv68L.mjs.map → workspace_resource_pb-UGK1SSn_.mjs.map} +1 -1
  50. package/docs/runtime.md +4 -0
  51. package/docs/services/resolver.md +54 -0
  52. package/docs/testing.md +33 -6
  53. package/package.json +12 -7
  54. package/dist/application-Nlh9BHQf.mjs +0 -3
  55. package/dist/register-typescript-runtime-Bd4bcLbW.mjs.map +0 -1
@@ -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 };
@@ -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 };
@@ -1,4 +1,4 @@
1
- import { t as RUNTIME_FLAG_KEY } from "../globals-B-n_3uYu.mjs";
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 { CreateAuthIDPConfigRequestSchema as $, CreatePipelineResolverRequestSchema as A, TenantProviderConfig_TenantProviderType as At, IdPPermissionOperator as B, CreateAIGatewayRequestSchema as Bt, UpdateStaticWebsiteRequestSchema as C, AuthOAuth2Client_ClientType as Ct, CreateSecretManagerVaultRequestSchema as D, AuthSCIMAttribute_Uniqueness as Dt, CreateSecretManagerSecretRequestSchema as E, AuthSCIMAttribute_Type as Et, PipelineResolver_OperationType as F, GetApplicationSchemaHealthResponse_ApplicationSchemaHealthStatus as Ft, CreateExecutorExecutorRequestSchema as G, ConditionSchema as Gt, FunctionExecution_Status as H, file_tailor_v1_aigateway as Ht, CreateIdPServiceRequestSchema as I, UpdateApplicationRequestSchema as It, ExecutorJobStatus as J, PageDirection as Jt, UpdateExecutorExecutorRequestSchema as K, Condition_Operator as Kt, UpdateIdPServiceRequestSchema as L, file_tailor_v1_application as Lt, UpdatePipelineResolverRequestSchema as M, file_tailor_v1_auth_resource as Mt, UpdatePipelineServiceRequestSchema as N, file_tailor_v1_secret_manager_resource as Nt, UpdateSecretManagerSecretRequestSchema as O, AuthSCIMConfig_AuthorizationType as Ot, file_tailor_v1_pipeline as P, CreateApplicationRequestSchema as Pt, CreateAuthHookRequestSchema as Q, file_tailor_v1_idp as R, ApplicationSchemaUpdateAttemptStatus as Rt, CreateStaticWebsiteRequestSchema as S, AuthInvokerSchema as St, CustomDomainStatus as T, AuthSCIMAttribute_Mutability as Tt, FunctionExecution_Type as U, file_google_api_field_behavior as Ut, IdPPermissionPermit as V, UpdateAIGatewayRequestSchema as Vt, file_tailor_v1_function_resource as W, file_tailor_fieldmask_v1_option as Wt, ExecutorTriggerType as X, file_buf_validate_validate as Xt, ExecutorTargetType as Y, file_tailor_v1_resource as Yt, CreateAuthConnectionRequestSchema as Z, TailorDBGQLPermission_Permit as _, file_tailor_v1_auth as _t, CreateWorkflowRequestSchema as a, CreateTenantConfigRequestSchema as at, TailorDBType_PermitAction as b, AuthHookPoint as bt, file_tailor_v1_workflow as c, UpdateAuthHookRequestSchema as ct, CreateTailorDBServiceRequestSchema as d, UpdateAuthOAuth2ClientRequestSchema as dt, CreateAuthMachineUserRequestSchema as et, CreateTailorDBTypeRequestSchema as f, UpdateAuthSCIMConfigRequestSchema as ft, TailorDBGQLPermission_Operator as g, UpdateUserProfileConfigRequestSchema as gt, TailorDBGQLPermission_Action as h, UpdateTenantConfigRequestSchema as ht, CreateWorkflowJobFunctionRequestSchema as i, CreateAuthServiceRequestSchema as it, CreatePipelineServiceRequestSchema as j, UserProfileProviderConfig_UserProfileProviderType as jt, file_tailor_v1_secret_manager as k, PATScope as kt, WorkflowExecution_Status as l, UpdateAuthIDPConfigRequestSchema as lt, file_tailor_v1_tailordb as m, UpdateAuthServiceRequestSchema as mt, file_tailor_v1_workspace_resource as n, CreateAuthSCIMConfigRequestSchema as nt, UpdateWorkflowJobFunctionExecutionPolicyRequestSchema as o, CreateUserProfileConfigRequestSchema as ot, UpdateTailorDBTypeRequestSchema as p, UpdateAuthSCIMResourceRequestSchema as pt, file_tailor_v1_executor as q, FilterSchema as qt, CreateWorkflowJobFunctionExecutionPolicyRequestSchema as r, CreateAuthSCIMResourceRequestSchema as rt, UpdateWorkflowRequestSchema as s, UpdateAuthConnectionRequestSchema as st, WorkspacePlatformUserRole as t, CreateAuthOAuth2ClientRequestSchema as tt, WorkflowJobExecution_Status as u, UpdateAuthMachineUserRequestSchema as ut, TailorDBType_Permission_Operator as v, AuthConnection_Status as vt, file_tailor_v1_staticwebsite as w, AuthOAuth2Client_GrantType as wt, AddCustomDomainRequestSchema as x, AuthIDPConfig_AuthType as xt, TailorDBType_Permission_Permit as y, AuthConnection_Type as yt, IdPLang as z, Subgraph_ServiceType as zt };
847
- //# sourceMappingURL=workspace_resource_pb-Db3fv68L.mjs.map
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