@servora/proto-utils 0.1.0 → 0.1.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.
Files changed (106) hide show
  1. package/dist/gen/servora/audit/v1/index.d.ts +5 -0
  2. package/dist/gen/servora/audit/v1/index.d.ts.map +1 -0
  3. package/dist/gen/servora/audit/v1/index.js +6 -0
  4. package/dist/gen/servora/audit/v1/index.js.map +1 -0
  5. package/dist/gen/servora/authn/audit/v1/index.d.ts +16 -0
  6. package/dist/gen/servora/authn/audit/v1/index.d.ts.map +1 -0
  7. package/dist/gen/servora/authn/audit/v1/index.js +6 -0
  8. package/dist/gen/servora/authn/audit/v1/index.js.map +1 -0
  9. package/dist/gen/servora/authn/v1/index.d.ts +6 -0
  10. package/dist/gen/servora/authn/v1/index.d.ts.map +1 -0
  11. package/dist/gen/servora/authn/v1/index.js +6 -0
  12. package/dist/gen/servora/authn/v1/index.js.map +1 -0
  13. package/dist/gen/servora/authz/audit/v1/index.d.ts +12 -0
  14. package/dist/gen/servora/authz/audit/v1/index.d.ts.map +1 -0
  15. package/dist/gen/servora/authz/audit/v1/index.js +6 -0
  16. package/dist/gen/servora/authz/audit/v1/index.js.map +1 -0
  17. package/dist/gen/servora/authz/openfga/audit/v1/index.d.ts +13 -0
  18. package/dist/gen/servora/authz/openfga/audit/v1/index.d.ts.map +1 -0
  19. package/dist/gen/servora/authz/openfga/audit/v1/index.js +6 -0
  20. package/dist/gen/servora/authz/openfga/audit/v1/index.js.map +1 -0
  21. package/dist/gen/servora/authz/v1/index.d.ts +8 -0
  22. package/dist/gen/servora/authz/v1/index.d.ts.map +1 -0
  23. package/dist/gen/servora/authz/v1/index.js +6 -0
  24. package/dist/gen/servora/authz/v1/index.js.map +1 -0
  25. package/dist/gen/servora/cloudevents/v1/index.d.ts +31 -0
  26. package/dist/gen/servora/cloudevents/v1/index.d.ts.map +1 -0
  27. package/dist/gen/servora/cloudevents/v1/index.js +6 -0
  28. package/dist/gen/servora/cloudevents/v1/index.js.map +1 -0
  29. package/dist/gen/servora/conf/v1/index.d.ts +9 -0
  30. package/dist/gen/servora/conf/v1/index.d.ts.map +1 -0
  31. package/dist/gen/servora/conf/v1/index.js +6 -0
  32. package/dist/gen/servora/conf/v1/index.js.map +1 -0
  33. package/dist/gen/servora/contrib/db/clickhouse/v1/index.d.ts +22 -0
  34. package/dist/gen/servora/contrib/db/clickhouse/v1/index.d.ts.map +1 -0
  35. package/dist/gen/servora/contrib/db/clickhouse/v1/index.js +6 -0
  36. package/dist/gen/servora/contrib/db/clickhouse/v1/index.js.map +1 -0
  37. package/dist/gen/servora/contrib/db/redis/v1/index.d.ts +13 -0
  38. package/dist/gen/servora/contrib/db/redis/v1/index.d.ts.map +1 -0
  39. package/dist/gen/servora/contrib/db/redis/v1/index.js +6 -0
  40. package/dist/gen/servora/contrib/db/redis/v1/index.js.map +1 -0
  41. package/dist/gen/servora/contrib/kafka/v1/index.d.ts +28 -0
  42. package/dist/gen/servora/contrib/kafka/v1/index.d.ts.map +1 -0
  43. package/dist/gen/servora/contrib/kafka/v1/index.js +6 -0
  44. package/dist/gen/servora/contrib/kafka/v1/index.js.map +1 -0
  45. package/dist/gen/servora/contrib/mail/v1/index.d.ts +20 -0
  46. package/dist/gen/servora/contrib/mail/v1/index.d.ts.map +1 -0
  47. package/dist/gen/servora/contrib/mail/v1/index.js +6 -0
  48. package/dist/gen/servora/contrib/mail/v1/index.js.map +1 -0
  49. package/dist/gen/servora/core/v1/index.d.ts +157 -0
  50. package/dist/gen/servora/core/v1/index.d.ts.map +1 -0
  51. package/dist/gen/servora/core/v1/index.js +6 -0
  52. package/dist/gen/servora/core/v1/index.js.map +1 -0
  53. package/dist/gen/servora/mapper/v1/index.d.ts +7 -0
  54. package/dist/gen/servora/mapper/v1/index.d.ts.map +1 -0
  55. package/dist/gen/servora/mapper/v1/index.js +6 -0
  56. package/dist/gen/servora/mapper/v1/index.js.map +1 -0
  57. package/dist/gen/servora/obs/audit/v1/index.d.ts +7 -0
  58. package/dist/gen/servora/obs/audit/v1/index.d.ts.map +1 -0
  59. package/dist/gen/servora/obs/audit/v1/index.js +6 -0
  60. package/dist/gen/servora/obs/audit/v1/index.js.map +1 -0
  61. package/dist/gen/servora/pagination/v1/index.d.ts +26 -0
  62. package/dist/gen/servora/pagination/v1/index.d.ts.map +1 -0
  63. package/dist/gen/servora/pagination/v1/index.js +6 -0
  64. package/dist/gen/servora/pagination/v1/index.js.map +1 -0
  65. package/dist/gen/servora/security/authn/oidc/v1/index.d.ts +7 -0
  66. package/dist/gen/servora/security/authn/oidc/v1/index.d.ts.map +1 -0
  67. package/dist/gen/servora/security/authn/oidc/v1/index.js +6 -0
  68. package/dist/gen/servora/security/authn/oidc/v1/index.js.map +1 -0
  69. package/dist/gen/servora/security/authz/openfga/v1/index.d.ts +7 -0
  70. package/dist/gen/servora/security/authz/openfga/v1/index.d.ts.map +1 -0
  71. package/dist/gen/servora/security/authz/openfga/v1/index.js +6 -0
  72. package/dist/gen/servora/security/authz/openfga/v1/index.js.map +1 -0
  73. package/dist/gen/servora/security/jwt/v1/index.d.ts +9 -0
  74. package/dist/gen/servora/security/jwt/v1/index.d.ts.map +1 -0
  75. package/dist/gen/servora/security/jwt/v1/index.js +6 -0
  76. package/dist/gen/servora/security/jwt/v1/index.js.map +1 -0
  77. package/dist/gen/servora/security/tls/v1/index.d.ts +7 -0
  78. package/dist/gen/servora/security/tls/v1/index.d.ts.map +1 -0
  79. package/dist/gen/servora/security/tls/v1/index.js +6 -0
  80. package/dist/gen/servora/security/tls/v1/index.js.map +1 -0
  81. package/dist/gen/servora/transport/http/cors/v1/index.d.ts +12 -0
  82. package/dist/gen/servora/transport/http/cors/v1/index.d.ts.map +1 -0
  83. package/dist/gen/servora/transport/http/cors/v1/index.js +6 -0
  84. package/dist/gen/servora/transport/http/cors/v1/index.js.map +1 -0
  85. package/package.json +9 -5
  86. package/src/gen/servora/audit/v1/index.ts +24 -0
  87. package/src/gen/servora/authn/audit/v1/index.ts +42 -0
  88. package/src/gen/servora/authn/v1/index.ts +25 -0
  89. package/src/gen/servora/authz/audit/v1/index.ts +40 -0
  90. package/src/gen/servora/authz/openfga/audit/v1/index.ts +29 -0
  91. package/src/gen/servora/authz/v1/index.ts +28 -0
  92. package/src/gen/servora/cloudevents/v1/index.ts +49 -0
  93. package/src/gen/servora/conf/v1/index.ts +32 -0
  94. package/src/gen/servora/contrib/db/clickhouse/v1/index.ts +33 -0
  95. package/src/gen/servora/contrib/db/redis/v1/index.ts +23 -0
  96. package/src/gen/servora/contrib/kafka/v1/index.ts +41 -0
  97. package/src/gen/servora/contrib/mail/v1/index.ts +32 -0
  98. package/src/gen/servora/core/v1/index.ts +221 -0
  99. package/src/gen/servora/mapper/v1/index.ts +18 -0
  100. package/src/gen/servora/obs/audit/v1/index.ts +13 -0
  101. package/src/gen/servora/pagination/v1/index.ts +37 -0
  102. package/src/gen/servora/security/authn/oidc/v1/index.ts +13 -0
  103. package/src/gen/servora/security/authz/openfga/v1/index.ts +13 -0
  104. package/src/gen/servora/security/jwt/v1/index.ts +17 -0
  105. package/src/gen/servora/security/tls/v1/index.ts +13 -0
  106. package/src/gen/servora/transport/http/cors/v1/index.ts +22 -0
@@ -0,0 +1,26 @@
1
+ export type PagePaginationRequest = {
2
+ page: number | undefined;
3
+ pageSize: number | undefined;
4
+ };
5
+ export type CursorPaginationRequest = {
6
+ cursor: string | undefined;
7
+ limit: number | undefined;
8
+ };
9
+ export type PaginationRequest = {
10
+ page?: PagePaginationRequest;
11
+ cursor?: CursorPaginationRequest;
12
+ };
13
+ export type PagePaginationResponse = {
14
+ total: number | undefined;
15
+ page: number | undefined;
16
+ pageSize: number | undefined;
17
+ };
18
+ export type CursorPaginationResponse = {
19
+ nextCursor: string | undefined;
20
+ hasMore: boolean | undefined;
21
+ };
22
+ export type PaginationResponse = {
23
+ page?: PagePaginationResponse;
24
+ cursor?: CursorPaginationResponse;
25
+ };
26
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/gen/servora/pagination/v1/index.ts"],"names":[],"mappings":"AAIA,MAAM,MAAM,qBAAqB,GAAG;IAClC,IAAI,EAAE,MAAM,GAAG,SAAS,CAAC;IACzB,QAAQ,EAAE,MAAM,GAAG,SAAS,CAAC;CAC9B,CAAC;AAEF,MAAM,MAAM,uBAAuB,GAAG;IACpC,MAAM,EAAE,MAAM,GAAG,SAAS,CAAC;IAC3B,KAAK,EAAE,MAAM,GAAG,SAAS,CAAC;CAC3B,CAAC;AAEF,MAAM,MAAM,iBAAiB,GAAG;IAC9B,IAAI,CAAC,EAAE,qBAAqB,CAAC;IAC7B,MAAM,CAAC,EAAE,uBAAuB,CAAC;CAClC,CAAC;AAEF,MAAM,MAAM,sBAAsB,GAAG;IACnC,KAAK,EAAE,MAAM,GAAG,SAAS,CAAC;IAC1B,IAAI,EAAE,MAAM,GAAG,SAAS,CAAC;IACzB,QAAQ,EAAE,MAAM,GAAG,SAAS,CAAC;CAC9B,CAAC;AAEF,MAAM,MAAM,wBAAwB,GAAG;IACrC,UAAU,EAAE,MAAM,GAAG,SAAS,CAAC;IAC/B,OAAO,EAAE,OAAO,GAAG,SAAS,CAAC;CAC9B,CAAC;AAEF,MAAM,MAAM,kBAAkB,GAAG;IAC/B,IAAI,CAAC,EAAE,sBAAsB,CAAC;IAC9B,MAAM,CAAC,EAAE,wBAAwB,CAAC;CACnC,CAAC"}
@@ -0,0 +1,6 @@
1
+ // Code generated by protoc-gen-typescript-http. DO NOT EDIT.
2
+ /* eslint-disable camelcase */
3
+ // @ts-nocheck
4
+ export {};
5
+ // @@protoc_insertion_point(typescript-http-eof)
6
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../src/gen/servora/pagination/v1/index.ts"],"names":[],"mappings":"AAAA,6DAA6D;AAC7D,8BAA8B;AAC9B,cAAc;;AAkCd,gDAAgD"}
@@ -0,0 +1,7 @@
1
+ export type Config = {
2
+ cryptoKey: string | undefined;
3
+ grantTypeRefreshToken: boolean | undefined;
4
+ defaultLogoutRedirectUri: string | undefined;
5
+ loginBaseUrl: string | undefined;
6
+ };
7
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../../src/gen/servora/security/authn/oidc/v1/index.ts"],"names":[],"mappings":"AAIA,MAAM,MAAM,MAAM,GAAG;IACnB,SAAS,EAAE,MAAM,GAAG,SAAS,CAAC;IAC9B,qBAAqB,EAAE,OAAO,GAAG,SAAS,CAAC;IAC3C,wBAAwB,EAAE,MAAM,GAAG,SAAS,CAAC;IAC7C,YAAY,EAAE,MAAM,GAAG,SAAS,CAAC;CAClC,CAAC"}
@@ -0,0 +1,6 @@
1
+ // Code generated by protoc-gen-typescript-http. DO NOT EDIT.
2
+ /* eslint-disable camelcase */
3
+ // @ts-nocheck
4
+ export {};
5
+ // @@protoc_insertion_point(typescript-http-eof)
6
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../../../src/gen/servora/security/authn/oidc/v1/index.ts"],"names":[],"mappings":"AAAA,6DAA6D;AAC7D,8BAA8B;AAC9B,cAAc;;AAUd,gDAAgD"}
@@ -0,0 +1,7 @@
1
+ export type Config = {
2
+ apiUrl: string | undefined;
3
+ storeId: string | undefined;
4
+ modelId: string | undefined;
5
+ apiToken: string | undefined;
6
+ };
7
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../../src/gen/servora/security/authz/openfga/v1/index.ts"],"names":[],"mappings":"AAIA,MAAM,MAAM,MAAM,GAAG;IACnB,MAAM,EAAE,MAAM,GAAG,SAAS,CAAC;IAC3B,OAAO,EAAE,MAAM,GAAG,SAAS,CAAC;IAC5B,OAAO,EAAE,MAAM,GAAG,SAAS,CAAC;IAC5B,QAAQ,EAAE,MAAM,GAAG,SAAS,CAAC;CAC9B,CAAC"}
@@ -0,0 +1,6 @@
1
+ // Code generated by protoc-gen-typescript-http. DO NOT EDIT.
2
+ /* eslint-disable camelcase */
3
+ // @ts-nocheck
4
+ export {};
5
+ // @@protoc_insertion_point(typescript-http-eof)
6
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../../../src/gen/servora/security/authz/openfga/v1/index.ts"],"names":[],"mappings":"AAAA,6DAA6D;AAC7D,8BAA8B;AAC9B,cAAc;;AAUd,gDAAgD"}
@@ -0,0 +1,9 @@
1
+ export type Jwt = {
2
+ privateKeyPath: string | undefined;
3
+ privateKeyPem: string | undefined;
4
+ accessExpire: number | undefined;
5
+ refreshExpire: number | undefined;
6
+ issuer: string | undefined;
7
+ audience: string | undefined;
8
+ };
9
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../src/gen/servora/security/jwt/v1/index.ts"],"names":[],"mappings":"AAMA,MAAM,MAAM,GAAG,GAAG;IAChB,cAAc,EAAE,MAAM,GAAG,SAAS,CAAC;IACnC,aAAa,EAAE,MAAM,GAAG,SAAS,CAAC;IAClC,YAAY,EAAE,MAAM,GAAG,SAAS,CAAC;IACjC,aAAa,EAAE,MAAM,GAAG,SAAS,CAAC;IAClC,MAAM,EAAE,MAAM,GAAG,SAAS,CAAC;IAC3B,QAAQ,EAAE,MAAM,GAAG,SAAS,CAAC;CAC9B,CAAC"}
@@ -0,0 +1,6 @@
1
+ // Code generated by protoc-gen-typescript-http. DO NOT EDIT.
2
+ /* eslint-disable camelcase */
3
+ // @ts-nocheck
4
+ export {};
5
+ // @@protoc_insertion_point(typescript-http-eof)
6
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../../src/gen/servora/security/jwt/v1/index.ts"],"names":[],"mappings":"AAAA,6DAA6D;AAC7D,8BAA8B;AAC9B,cAAc;;AAcd,gDAAgD"}
@@ -0,0 +1,7 @@
1
+ export type TLS = {
2
+ enable: boolean | undefined;
3
+ certPath: string | undefined;
4
+ keyPath: string | undefined;
5
+ caPath: string | undefined;
6
+ };
7
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../src/gen/servora/security/tls/v1/index.ts"],"names":[],"mappings":"AAIA,MAAM,MAAM,GAAG,GAAG;IAChB,MAAM,EAAE,OAAO,GAAG,SAAS,CAAC;IAC5B,QAAQ,EAAE,MAAM,GAAG,SAAS,CAAC;IAC7B,OAAO,EAAE,MAAM,GAAG,SAAS,CAAC;IAC5B,MAAM,EAAE,MAAM,GAAG,SAAS,CAAC;CAC5B,CAAC"}
@@ -0,0 +1,6 @@
1
+ // Code generated by protoc-gen-typescript-http. DO NOT EDIT.
2
+ /* eslint-disable camelcase */
3
+ // @ts-nocheck
4
+ export {};
5
+ // @@protoc_insertion_point(typescript-http-eof)
6
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../../src/gen/servora/security/tls/v1/index.ts"],"names":[],"mappings":"AAAA,6DAA6D;AAC7D,8BAA8B;AAC9B,cAAc;;AAUd,gDAAgD"}
@@ -0,0 +1,12 @@
1
+ export type CORS = {
2
+ enable: boolean | undefined;
3
+ allowedOrigins: string[] | undefined;
4
+ allowedMethods: string[] | undefined;
5
+ allowedHeaders: string[] | undefined;
6
+ exposedHeaders: string[] | undefined;
7
+ allowCredentials: boolean | undefined;
8
+ maxAge: wellKnownDuration | undefined;
9
+ };
10
+ type wellKnownDuration = string;
11
+ export {};
12
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../../src/gen/servora/transport/http/cors/v1/index.ts"],"names":[],"mappings":"AAIA,MAAM,MAAM,IAAI,GAAG;IACjB,MAAM,EAAE,OAAO,GAAG,SAAS,CAAC;IAC5B,cAAc,EAAE,MAAM,EAAE,GAAG,SAAS,CAAC;IACrC,cAAc,EAAE,MAAM,EAAE,GAAG,SAAS,CAAC;IACrC,cAAc,EAAE,MAAM,EAAE,GAAG,SAAS,CAAC;IACrC,cAAc,EAAE,MAAM,EAAE,GAAG,SAAS,CAAC;IACrC,gBAAgB,EAAE,OAAO,GAAG,SAAS,CAAC;IACtC,MAAM,EAAE,iBAAiB,GAAG,SAAS,CAAC;CACvC,CAAC;AAMF,KAAK,iBAAiB,GAAG,MAAM,CAAC"}
@@ -0,0 +1,6 @@
1
+ // Code generated by protoc-gen-typescript-http. DO NOT EDIT.
2
+ /* eslint-disable camelcase */
3
+ // @ts-nocheck
4
+ export {};
5
+ // @@protoc_insertion_point(typescript-http-eof)
6
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../../../src/gen/servora/transport/http/cors/v1/index.ts"],"names":[],"mappings":"AAAA,6DAA6D;AAC7D,8BAA8B;AAC9B,cAAc;;AAmBd,gDAAgD"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@servora/proto-utils",
3
- "version": "0.1.0",
3
+ "version": "0.1.2",
4
4
  "description": "Servora Proto 工具:CRUD 查询、FieldMask、HTTP client、Kratos 错误解析",
5
5
  "type": "module",
6
6
  "exports": {
@@ -24,6 +24,10 @@
24
24
  "types": "./dist/client/errors.d.ts",
25
25
  "import": "./dist/client/errors.js"
26
26
  },
27
+ "./proto/*": {
28
+ "types": "./dist/gen/*/index.d.ts",
29
+ "import": "./dist/gen/*/index.js"
30
+ },
27
31
  "./request": {
28
32
  "types": "./dist/client/request.d.ts",
29
33
  "import": "./dist/client/request.js"
@@ -46,12 +50,12 @@
46
50
  },
47
51
  "repository": {
48
52
  "type": "git",
49
- "url": "git+https://github.com/Servora-Kit/servora-web.git",
50
- "directory": "packages/proto-utils"
53
+ "url": "git+https://github.com/Servora-Kit/servora.git",
54
+ "directory": "web/packages/proto-utils"
51
55
  },
52
- "homepage": "https://github.com/Servora-Kit/servora-web/tree/main/packages/proto-utils",
56
+ "homepage": "https://github.com/Servora-Kit/servora/tree/main/web/packages/proto-utils",
53
57
  "bugs": {
54
- "url": "https://github.com/Servora-Kit/servora-web/issues"
58
+ "url": "https://github.com/Servora-Kit/servora/issues"
55
59
  },
56
60
  "license": "MIT",
57
61
  "sideEffects": false,
@@ -0,0 +1,24 @@
1
+ // Code generated by protoc-gen-typescript-http. DO NOT EDIT.
2
+ /* eslint-disable camelcase */
3
+ // @ts-nocheck
4
+
5
+ // AuditMode controls whether an RPC operation produces a runtime audit event.
6
+ export type AuditMode =
7
+ // UNSPECIFIED inherits the service-level default; treated as DISABLED if no
8
+ // service default is declared.
9
+ | "AUDIT_MODE_UNSPECIFIED"
10
+ // DISABLED suppresses audit events for this operation.
11
+ | "AUDIT_MODE_DISABLED"
12
+ // ENABLED emits a servora.audit.rpc.v1 CloudEvents event for every call.
13
+ | "AUDIT_MODE_ENABLED";
14
+ // AuditRule is the RPC audit on/off switch. It intentionally carries only
15
+ // mode: event type, severity, field extraction and CloudEvents extensions are
16
+ // the responsibility of the event producer (authn, authz, CRUD generator, or
17
+ // business code). Keeping this annotation minimal prevents it from becoming a
18
+ // mixed DSL.
19
+ export type AuditRule = {
20
+ mode: AuditMode | undefined;
21
+ };
22
+
23
+
24
+ // @@protoc_insertion_point(typescript-http-eof)
@@ -0,0 +1,42 @@
1
+ // Code generated by protoc-gen-typescript-http. DO NOT EDIT.
2
+ /* eslint-disable camelcase */
3
+ // @ts-nocheck
4
+
5
+ // AuthnFailure is the CloudEvents data payload for servora.authn.failure.v1
6
+ // events. All string fields MUST be sanitised — no raw tokens, API keys, or
7
+ // full JWT claims may appear here.
8
+ export type AuthnFailure = {
9
+ // reason is the high-level failure reason (e.g. "AUTHN_FAILED").
10
+ reason: string | undefined;
11
+ // code is the HTTP/gRPC status code (e.g. 401).
12
+ code: number | undefined;
13
+ // message is a sanitised, human-readable failure description.
14
+ message: string | undefined;
15
+ // attempts lists the per-scheme authentication results when Multi dispatch
16
+ // was used.
17
+ attempts: SchemeAttempt[] | undefined;
18
+ };
19
+
20
+ // SchemeAttempt records the outcome of a single authentication scheme within a
21
+ // Multi-dispatcher round.
22
+ export type SchemeAttempt = {
23
+ // scheme is the authenticator name (e.g. "jwt", "apikey", "casdoor").
24
+ scheme: string | undefined;
25
+ // reason is the sanitised failure reason returned by this scheme's backend.
26
+ reason: string | undefined;
27
+ // message is a sanitised description from this scheme's backend.
28
+ message: string | undefined;
29
+ };
30
+
31
+ // AuthnSuccess is the CloudEvents data payload for servora.authn.success.v1
32
+ // events. Identity fields are intentionally omitted — the authenticated
33
+ // subject is carried in CloudEvents extensions or set by the business layer.
34
+ export type AuthnSuccess = {
35
+ // scheme is the authentication scheme that succeeded (e.g. "jwt", "apikey").
36
+ scheme: string | undefined;
37
+ // message is an optional human-readable note.
38
+ message: string | undefined;
39
+ };
40
+
41
+
42
+ // @@protoc_insertion_point(typescript-http-eof)
@@ -0,0 +1,25 @@
1
+ // Code generated by protoc-gen-typescript-http. DO NOT EDIT.
2
+ /* eslint-disable camelcase */
3
+ // @ts-nocheck
4
+
5
+ // AuthnRule 声明 RPC 方法的认证策略。
6
+ export type AuthnRule = {
7
+ // 认证模式。
8
+ mode: AuthnRule_Mode | undefined;
9
+ // 接受的认证机制;空列表表示沿用框架默认引擎。
10
+ // 取值是各 wrapper 子包持有的私有 method 字符串常量(如 `jwt`、`mtls`、`api_key`、`aksk`);
11
+ // framework 不枚举这些值,业务自定义引擎也可填任意字符串。
12
+ // 多个值表示"任一通过即可"。
13
+ schemes: string[] | undefined;
14
+ };
15
+
16
+ // Mode 表达认证模式三态。
17
+ export type AuthnRule_Mode =
18
+ // 未指定,等价"未写注解":私有 + 框架默认引擎(fail-closed 默认)。
19
+ | "MODE_UNSPECIFIED"
20
+ // 显式公开。schemes 必须为空。
21
+ | "MODE_PUBLIC"
22
+ // 必须用 schemes 指定的认证机制。schemes 必须非空。
23
+ | "MODE_REQUIRED";
24
+
25
+ // @@protoc_insertion_point(typescript-http-eof)
@@ -0,0 +1,40 @@
1
+ // Code generated by protoc-gen-typescript-http. DO NOT EDIT.
2
+ /* eslint-disable camelcase */
3
+ // @ts-nocheck
4
+
5
+ // AuthzDecision is the CloudEvents data payload shared by all three authz
6
+ // audit event types:
7
+ // - servora.authz.allowed.v1
8
+ // - servora.authz.denied.v1
9
+ // - servora.authz.error.v1
10
+ // The Decision enum distinguishes outcomes so consumers can branch on data
11
+ // without re-parsing the CloudEvents type attribute.
12
+ export type AuthzDecision = {
13
+ decision: AuthzDecision_Decision | undefined;
14
+ // action is the authz action being checked (e.g. "read", "delete").
15
+ action: string | undefined;
16
+ // resource_type is the resource type from the authz rule (e.g. "document").
17
+ resourceType: string | undefined;
18
+ // resource_id is the resolved resource identifier.
19
+ resourceId: string | undefined;
20
+ // backend identifies the authorizer implementation (e.g. "openfga", "casbin").
21
+ backend: string | undefined;
22
+ // reason is an optional Kratos-style reason code (e.g. "AUTHZ_DENIED").
23
+ reason: string | undefined;
24
+ // code is the HTTP/gRPC status code.
25
+ code: number | undefined;
26
+ // message is a sanitised description.
27
+ message: string | undefined;
28
+ };
29
+
30
+ // Decision enumerates the three possible authz outcomes.
31
+ export type AuthzDecision_Decision =
32
+ | "DECISION_UNSPECIFIED"
33
+ // ALLOWED — authorizer.Check returned (true, nil).
34
+ | "DECISION_ALLOWED"
35
+ // DENIED — authorizer.Check returned (false, nil): policy explicitly denied.
36
+ | "DECISION_DENIED"
37
+ // ERROR — authorizer.Check returned (_, err != nil): check itself failed.
38
+ | "DECISION_ERROR";
39
+
40
+ // @@protoc_insertion_point(typescript-http-eof)
@@ -0,0 +1,29 @@
1
+ // Code generated by protoc-gen-typescript-http. DO NOT EDIT.
2
+ /* eslint-disable camelcase */
3
+ // @ts-nocheck
4
+
5
+ // TupleMutation is the CloudEvents data payload for
6
+ // servora.authz.openfga.tuple_mutation.v1 events. It records OpenFGA tuple
7
+ // write or delete operations. The CloudEvents subject MUST be set to
8
+ // "openfga/store/{store_id}"; individual tuples are listed here in data.
9
+ export type TupleMutation = {
10
+ operation: TupleMutation_Operation | undefined;
11
+ tuples: Tuple[] | undefined;
12
+ storeId: string | undefined;
13
+ modelId: string | undefined;
14
+ };
15
+
16
+ // Operation identifies whether tuples were written or deleted.
17
+ export type TupleMutation_Operation =
18
+ | "OPERATION_UNSPECIFIED"
19
+ | "OPERATION_WRITE"
20
+ | "OPERATION_DELETE";
21
+ // Tuple represents a single OpenFGA relationship tuple.
22
+ export type Tuple = {
23
+ user: string | undefined;
24
+ relation: string | undefined;
25
+ object: string | undefined;
26
+ };
27
+
28
+
29
+ // @@protoc_insertion_point(typescript-http-eof)
@@ -0,0 +1,28 @@
1
+ // Code generated by protoc-gen-typescript-http. DO NOT EDIT.
2
+ /* eslint-disable camelcase */
3
+ // @ts-nocheck
4
+
5
+ // AuthzMode defines the authorization mode for an RPC method.
6
+ export type AuthzMode =
7
+ // Unspecified — treated as fail-closed.
8
+ | "AUTHZ_MODE_UNSPECIFIED"
9
+ // Skip authorization entirely (public endpoint).
10
+ | "AUTHZ_MODE_NONE"
11
+ // Perform an authorization check using action / resource_type / resource_id_field.
12
+ | "AUTHZ_MODE_CHECK";
13
+ // AuthzRule binds authorization requirements to an RPC method.
14
+ // action and resource_type are free strings matching the authorization model.
15
+ export type AuthzRule = {
16
+ // Authorization mode.
17
+ mode: AuthzMode | undefined;
18
+ // Action to check, e.g. "admin", "can_delete", "view".
19
+ action: string | undefined;
20
+ // Resource type, e.g. "platform", "video", "server".
21
+ resourceType: string | undefined;
22
+ // Proto field name in the request that carries the resource ID, e.g. "id".
23
+ // When empty, a static default resource ID is used (singleton/platform-level checks).
24
+ resourceIdField: string | undefined;
25
+ };
26
+
27
+
28
+ // @@protoc_insertion_point(typescript-http-eof)
@@ -0,0 +1,49 @@
1
+ // Code generated by protoc-gen-typescript-http. DO NOT EDIT.
2
+ /* eslint-disable camelcase */
3
+ // @ts-nocheck
4
+
5
+ export type CloudEvent = {
6
+ // Required Attributes
7
+ id: string | undefined;
8
+ source: string | undefined;
9
+ specVersion: string | undefined;
10
+ type: string | undefined;
11
+ // Optional & Extension Attributes
12
+ attributes: { [key: string]: CloudEvent_CloudEventAttributeValue } | undefined;
13
+ binaryData?: string;
14
+ textData?: string;
15
+ protoData?: wellKnownAny;
16
+ };
17
+
18
+ // The CloudEvent specification defines seven attribute value types.
19
+ export type CloudEvent_CloudEventAttributeValue = {
20
+ ceBoolean?: boolean;
21
+ ceInteger?: number;
22
+ ceString?: string;
23
+ ceBytes?: string;
24
+ ceUri?: string;
25
+ ceUriRef?: string;
26
+ ceTimestamp?: wellKnownTimestamp;
27
+ };
28
+
29
+ // Encoded using RFC 3339, where generated output will always be Z-normalized
30
+ // and uses 0, 3, 6 or 9 fractional digits.
31
+ // Offsets other than "Z" are also accepted.
32
+ type wellKnownTimestamp = string;
33
+
34
+ // If the Any contains a value that has a special JSON mapping,
35
+ // it will be converted as follows:
36
+ // {"@type": xxx, "value": yyy}.
37
+ // Otherwise, the value will be converted into a JSON object,
38
+ // and the "@type" field will be inserted to indicate the actual data type.
39
+ interface wellKnownAny {
40
+ "@type": string;
41
+ [key: string]: unknown;
42
+ }
43
+
44
+ export type CloudEventBatch = {
45
+ events: CloudEvent[] | undefined;
46
+ };
47
+
48
+
49
+ // @@protoc_insertion_point(typescript-http-eof)
@@ -0,0 +1,32 @@
1
+ // Code generated by protoc-gen-typescript-http. DO NOT EDIT.
2
+ /* eslint-disable camelcase */
3
+ // @ts-nocheck
4
+
5
+ // SectionRule 声明一个配置 message 在外部 yaml / json 配置中的定位键。
6
+ // 应用方通过 bootstrap.Scan 按该 key 在 kratos config 中定向 scan。
7
+ export type SectionRule = {
8
+ // 配置文件中的定位键(支持 dotted path,如 "audit" 或 "authn.oidc")。
9
+ // 不应留空。
10
+ key: string | undefined;
11
+ // 是否允许该 section 在配置中缺失而不报错。
12
+ // optional=true:缺失静默跳过 scan,但 message 仍会经 ApplyDefaults 填默认值;
13
+ // optional=false(默认):缺失视为配置错误。
14
+ optional: boolean | undefined;
15
+ };
16
+
17
+ // FieldRule 声明一个配置字段的默认值与必填语义。
18
+ // default 与 required 互斥使用:required=true 表示用户必须显式提供(零值不接受),
19
+ // default 表示用户未提供时填入字面量。
20
+ export type FieldRule = {
21
+ // 字段默认值的字面量表达。
22
+ // - string 字段:直接字面量(如 "tcp");
23
+ // - 数字 / bool 字段:可解析为对应类型的字符串(如 "8080" / "true");
24
+ // - google.protobuf.Duration:Go duration 字符串(如 "24h" / "5s");
25
+ // - repeated 标量:逗号分隔(如 "GET,POST,OPTIONS")。
26
+ default: string | undefined;
27
+ // 是否必填。若 true,由 plugin 生成 Validate() 在零值时返回 error。
28
+ required: boolean | undefined;
29
+ };
30
+
31
+
32
+ // @@protoc_insertion_point(typescript-http-eof)
@@ -0,0 +1,33 @@
1
+ // Code generated by protoc-gen-typescript-http. DO NOT EDIT.
2
+ /* eslint-disable camelcase */
3
+ // @ts-nocheck
4
+
5
+ export type ClickHouse = {
6
+ addrs: string[] | undefined;
7
+ database: string | undefined;
8
+ username: string | undefined;
9
+ password: string | undefined;
10
+ dialTimeout: wellKnownDuration | undefined;
11
+ readTimeout: wellKnownDuration | undefined;
12
+ maxOpenConns: number | undefined;
13
+ maxIdleConns: number | undefined;
14
+ connMaxLifetime: wellKnownDuration | undefined;
15
+ tls: servorasecuritytlsv1_TLS | undefined;
16
+ compression: string | undefined;
17
+ };
18
+
19
+ // Generated output always contains 0, 3, 6, or 9 fractional digits,
20
+ // depending on required precision, followed by the suffix "s".
21
+ // Accepted are any fractional digits (also none) as long as they fit
22
+ // into nano-seconds precision and the suffix "s" is required.
23
+ type wellKnownDuration = string;
24
+
25
+ export type servorasecuritytlsv1_TLS = {
26
+ enable: boolean | undefined;
27
+ certPath: string | undefined;
28
+ keyPath: string | undefined;
29
+ caPath: string | undefined;
30
+ };
31
+
32
+
33
+ // @@protoc_insertion_point(typescript-http-eof)
@@ -0,0 +1,23 @@
1
+ // Code generated by protoc-gen-typescript-http. DO NOT EDIT.
2
+ /* eslint-disable camelcase */
3
+ // @ts-nocheck
4
+
5
+ export type Redis = {
6
+ network: string | undefined;
7
+ addr: string | undefined;
8
+ userName: string | undefined;
9
+ password: string | undefined;
10
+ db: number | undefined;
11
+ dialTimeout: wellKnownDuration | undefined;
12
+ readTimeout: wellKnownDuration | undefined;
13
+ writeTimeout: wellKnownDuration | undefined;
14
+ };
15
+
16
+ // Generated output always contains 0, 3, 6, or 9 fractional digits,
17
+ // depending on required precision, followed by the suffix "s".
18
+ // Accepted are any fractional digits (also none) as long as they fit
19
+ // into nano-seconds precision and the suffix "s" is required.
20
+ type wellKnownDuration = string;
21
+
22
+
23
+ // @@protoc_insertion_point(typescript-http-eof)
@@ -0,0 +1,41 @@
1
+ // Code generated by protoc-gen-typescript-http. DO NOT EDIT.
2
+ /* eslint-disable camelcase */
3
+ // @ts-nocheck
4
+
5
+ export type Kafka = {
6
+ brokers: string[] | undefined;
7
+ clientId: string | undefined;
8
+ consumerGroup: string | undefined;
9
+ requiredAcks: number | undefined;
10
+ retryMax: number | undefined;
11
+ retryBackoff: wellKnownDuration | undefined;
12
+ dialTimeout: wellKnownDuration | undefined;
13
+ readTimeout: wellKnownDuration | undefined;
14
+ writeTimeout: wellKnownDuration | undefined;
15
+ compression: string | undefined;
16
+ tls: servorasecuritytlsv1_TLS | undefined;
17
+ sasl: Kafka_SASL | undefined;
18
+ };
19
+
20
+ // Generated output always contains 0, 3, 6, or 9 fractional digits,
21
+ // depending on required precision, followed by the suffix "s".
22
+ // Accepted are any fractional digits (also none) as long as they fit
23
+ // into nano-seconds precision and the suffix "s" is required.
24
+ type wellKnownDuration = string;
25
+
26
+ export type servorasecuritytlsv1_TLS = {
27
+ enable: boolean | undefined;
28
+ certPath: string | undefined;
29
+ keyPath: string | undefined;
30
+ caPath: string | undefined;
31
+ };
32
+
33
+ // SASL 认证配置(可选)。
34
+ export type Kafka_SASL = {
35
+ mechanism: string | undefined;
36
+ username: string | undefined;
37
+ password: string | undefined;
38
+ };
39
+
40
+
41
+ // @@protoc_insertion_point(typescript-http-eof)
@@ -0,0 +1,32 @@
1
+ // Code generated by protoc-gen-typescript-http. DO NOT EDIT.
2
+ /* eslint-disable camelcase */
3
+ // @ts-nocheck
4
+
5
+ export type Mail = {
6
+ smtp: SMTP | undefined;
7
+ from: MailFrom | undefined;
8
+ };
9
+
10
+ export type SMTP = {
11
+ host: string | undefined;
12
+ port: number | undefined;
13
+ username: string | undefined;
14
+ password: string | undefined;
15
+ tls: boolean | undefined;
16
+ skipVerifySsl: boolean | undefined;
17
+ sendTimeout: wellKnownDuration | undefined;
18
+ };
19
+
20
+ // Generated output always contains 0, 3, 6, or 9 fractional digits,
21
+ // depending on required precision, followed by the suffix "s".
22
+ // Accepted are any fractional digits (also none) as long as they fit
23
+ // into nano-seconds precision and the suffix "s" is required.
24
+ type wellKnownDuration = string;
25
+
26
+ export type MailFrom = {
27
+ address: string | undefined;
28
+ name: string | undefined;
29
+ };
30
+
31
+
32
+ // @@protoc_insertion_point(typescript-http-eof)