@stratum-hq/core 0.3.1 → 1.1.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/dist/constants.d.ts +0 -1
- package/dist/constants.d.ts.map +1 -1
- package/dist/constants.js +1 -2
- package/dist/constants.js.map +1 -1
- package/dist/index.d.ts +8 -6
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +14 -3
- package/dist/index.js.map +1 -1
- package/dist/types/audit.d.ts +44 -0
- package/dist/types/audit.d.ts.map +1 -1
- package/dist/types/audit.js +22 -1
- package/dist/types/audit.js.map +1 -1
- package/dist/types/tenant.d.ts +10 -4
- package/dist/types/tenant.d.ts.map +1 -1
- package/dist/types/tenant.js +1 -0
- package/dist/types/tenant.js.map +1 -1
- package/dist/types/usage.d.ts +91 -0
- package/dist/types/usage.d.ts.map +1 -0
- package/dist/types/usage.js +46 -0
- package/dist/types/usage.js.map +1 -0
- package/dist/types/webhook.d.ts +37 -6
- package/dist/types/webhook.d.ts.map +1 -1
- package/dist/types/webhook.js +4 -0
- package/dist/types/webhook.js.map +1 -1
- package/dist/utils/errors.d.ts +26 -1
- package/dist/utils/errors.d.ts.map +1 -1
- package/dist/utils/errors.js +38 -1
- package/dist/utils/errors.js.map +1 -1
- package/dist/utils/scopes.d.ts +12 -0
- package/dist/utils/scopes.d.ts.map +1 -0
- package/dist/utils/scopes.js +33 -0
- package/dist/utils/scopes.js.map +1 -0
- package/package.json +10 -2
- package/dist/__tests__/ancestry.test.d.ts +0 -2
- package/dist/__tests__/ancestry.test.d.ts.map +0 -1
- package/dist/__tests__/ancestry.test.js +0 -132
- package/dist/__tests__/ancestry.test.js.map +0 -1
- package/dist/__tests__/config-types.test.d.ts +0 -2
- package/dist/__tests__/config-types.test.d.ts.map +0 -1
- package/dist/__tests__/config-types.test.js +0 -143
- package/dist/__tests__/config-types.test.js.map +0 -1
- package/dist/__tests__/errors.test.d.ts +0 -2
- package/dist/__tests__/errors.test.d.ts.map +0 -1
- package/dist/__tests__/errors.test.js +0 -113
- package/dist/__tests__/errors.test.js.map +0 -1
- package/dist/__tests__/isolation.test.d.ts +0 -2
- package/dist/__tests__/isolation.test.d.ts.map +0 -1
- package/dist/__tests__/isolation.test.js +0 -34
- package/dist/__tests__/isolation.test.js.map +0 -1
- package/dist/__tests__/validation.test.d.ts +0 -2
- package/dist/__tests__/validation.test.d.ts.map +0 -1
- package/dist/__tests__/validation.test.js +0 -122
- package/dist/__tests__/validation.test.js.map +0 -1
- package/dist/__tests__/webhook.test.d.ts +0 -2
- package/dist/__tests__/webhook.test.d.ts.map +0 -1
- package/dist/__tests__/webhook.test.js +0 -165
- package/dist/__tests__/webhook.test.js.map +0 -1
package/dist/constants.d.ts
CHANGED
package/dist/constants.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"constants.d.ts","sourceRoot":"","sources":["../src/constants.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,
|
|
1
|
+
{"version":3,"file":"constants.d.ts","sourceRoot":"","sources":["../src/constants.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,eAAe,KAAK,CAAC;AAClC,eAAO,MAAM,oBAAoB,QAAS,CAAC;AAC3C,eAAO,MAAM,iBAAiB,KAAK,CAAC;AACpC,eAAO,MAAM,aAAa,MAAM,CAAC;AACjC,eAAO,MAAM,cAAc,aAAa,CAAC;AACzC,eAAO,MAAM,aAAa,KAAK,CAAC;AAChC,eAAO,MAAM,aAAa,gBAAgB,CAAC"}
|
package/dist/constants.js
CHANGED
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.TENANT_HEADER = exports.API_KEY_BYTES = exports.API_KEY_PREFIX = exports.MAX_PAGE_SIZE = exports.DEFAULT_PAGE_SIZE = exports.DEFAULT_CACHE_TTL_MS = exports.MAX_SLUG_LENGTH =
|
|
4
|
-
exports.MAX_TREE_DEPTH = 20;
|
|
3
|
+
exports.TENANT_HEADER = exports.API_KEY_BYTES = exports.API_KEY_PREFIX = exports.MAX_PAGE_SIZE = exports.DEFAULT_PAGE_SIZE = exports.DEFAULT_CACHE_TTL_MS = exports.MAX_SLUG_LENGTH = void 0;
|
|
5
4
|
exports.MAX_SLUG_LENGTH = 63;
|
|
6
5
|
exports.DEFAULT_CACHE_TTL_MS = 60_000;
|
|
7
6
|
exports.DEFAULT_PAGE_SIZE = 50;
|
package/dist/constants.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"constants.js","sourceRoot":"","sources":["../src/constants.ts"],"names":[],"mappings":";;;AAAa,QAAA,
|
|
1
|
+
{"version":3,"file":"constants.js","sourceRoot":"","sources":["../src/constants.ts"],"names":[],"mappings":";;;AAAa,QAAA,eAAe,GAAG,EAAE,CAAC;AACrB,QAAA,oBAAoB,GAAG,MAAM,CAAC;AAC9B,QAAA,iBAAiB,GAAG,EAAE,CAAC;AACvB,QAAA,aAAa,GAAG,GAAG,CAAC;AACpB,QAAA,cAAc,GAAG,UAAU,CAAC;AAC5B,QAAA,aAAa,GAAG,EAAE,CAAC;AACnB,QAAA,aAAa,GAAG,aAAa,CAAC"}
|
package/dist/index.d.ts
CHANGED
|
@@ -1,15 +1,17 @@
|
|
|
1
1
|
export { ConsentPurpose, ConsentRecordSchema, GrantConsentInputSchema, type ConsentRecord, type GrantConsentInput, } from "./types/consent.js";
|
|
2
2
|
export { API_KEY_SCOPES, ApiKeyScopeSchema, type ApiKeyScope, } from "./types/api-key.js";
|
|
3
|
-
export {
|
|
4
|
-
export {
|
|
3
|
+
export { scopeSatisfies } from "./utils/scopes.js";
|
|
4
|
+
export { AuditEntrySchema, AuditLogQuerySchema, RecordAuditEventInputSchema, type AuditContext, type AuditEntry, type AuditLogQuery, type RecordAuditEventInput, } from "./types/audit.js";
|
|
5
|
+
export { RecordUsageInputSchema, UsageEventSchema, UsageAggregateQuerySchema, type RecordUsageInput, type UsageEvent, type UsageAggregate, type UsageAggregateQuery, } from "./types/usage.js";
|
|
6
|
+
export { TenantEvent, WebhookSchema, CreateWebhookInputSchema, UpdateWebhookInputSchema, WebhookEventSchema, WebhookDeliveryStatus, WebhookDeliverySchema, type Webhook, type CreateWebhookInput, type UpdateWebhookInput, type WebhookEvent, type WebhookDelivery, type ListWebhookEventsQuery, } from "./types/webhook.js";
|
|
5
7
|
export { RegionStatus, RegionSchema, CreateRegionInputSchema, UpdateRegionInputSchema, MigrateRegionInputSchema, type Region, type CreateRegionInput, type UpdateRegionInput, type MigrateRegionInput, } from "./types/region.js";
|
|
6
|
-
export { IsolationStrategy, TenantStatus, TenantNodeSchema, CreateTenantInputSchema, UpdateTenantInputSchema, MoveTenantInputSchema, type TenantNode, type CreateTenantInput, type UpdateTenantInput, type MoveTenantInput, type TenantContext, type
|
|
8
|
+
export { IsolationStrategy, TenantStatus, TenantNodeSchema, CreateTenantInputSchema, UpdateTenantInputSchema, MoveTenantInputSchema, type TenantNode, type CreateTenantInput, type UpdateTenantInput, type MoveTenantInput, type TenantContext, type ResolvedTenantContext, type ResolvedPermission, } from "./types/tenant.js";
|
|
7
9
|
export { PermissionMode, RevocationMode, PermissionPolicySchema, CreatePermissionInputSchema, UpdatePermissionInputSchema, type PermissionPolicy, type CreatePermissionInput, type UpdatePermissionInput, } from "./types/permission.js";
|
|
8
10
|
export { ConfigEntrySchema, SetConfigInputSchema, type ConfigEntry, type SetConfigInput, type ResolvedConfigEntry, type ResolvedConfig, type BatchSetConfigKeyResult, type BatchSetConfigResult, type ConfigDiffEntry, type ConfigDiffItem, type ConfigDiffTenantInfo, type ConfigDiff, type DriftStatus, type DriftDetail, type DriftResult, type BatchDriftResult, } from "./types/config.js";
|
|
9
|
-
export { SUPPORTED_ISOLATION_STRATEGIES_V1, isSupportedIsolationStrategy, } from "./types/isolation.js";
|
|
11
|
+
export { SUPPORTED_ISOLATION_STRATEGIES, SUPPORTED_ISOLATION_STRATEGIES_V1, isSupportedIsolationStrategy, } from "./types/isolation.js";
|
|
10
12
|
export { parseAncestryPath, buildAncestryPath, getDepth, isAncestorOf, isDescendantOf, getParentPath, appendToPath, getAncestorIds, getSelfId, } from "./utils/ancestry.js";
|
|
11
13
|
export { SLUG_REGEX, SlugSchema, UUIDSchema, PaginationSchema, validateSlug, isValidSlug, type PaginationInput, type PaginatedResult, } from "./utils/validation.js";
|
|
12
14
|
export { CreateAbacPolicyInputSchema, AbacEvaluationRequestSchema, type AbacOperator, type AbacCondition, type AbacPolicy, type CreateAbacPolicyInput, type AbacEvaluationRequest, type AbacEvaluationResult, type ResolvedAbacPolicy, } from "./types/abac.js";
|
|
13
|
-
export { ErrorCode, StratumError, TenantNotFoundError, TenantAlreadyExistsError, TenantHasChildrenError, TenantCycleDetectedError, TenantArchivedError, TenantContextNotFoundError, IsolationViolationError, IsolationStrategyUnsupportedError, PermissionLockedError, PermissionNotFoundError, PermissionRevocationDeniedError, ConfigLockedError, ConfigNotFoundError, ValidationError, UnauthorizedError, ForbiddenError, WebhookNotFoundError, WebhookDeliveryError, AbacPolicyNotFoundError, InvalidAbacOperatorError, AbacPolicyLockedError, } from "./utils/errors.js";
|
|
14
|
-
export {
|
|
15
|
+
export { ErrorCode, StratumError, TenantNotFoundError, TenantAlreadyExistsError, TenantHasChildrenError, TenantCycleDetectedError, TenantArchivedError, TenantSuspendedError, InvalidTenantStateError, TenantContextNotFoundError, IsolationViolationError, IsolationStrategyUnsupportedError, PermissionLockedError, PermissionNotFoundError, PermissionRevocationDeniedError, ConfigLockedError, ConfigNotFoundError, ValidationError, UnauthorizedError, ForbiddenError, WebhookNotFoundError, WebhookDeliveryError, WebhookUrlValidationError, AbacPolicyNotFoundError, InvalidAbacOperatorError, AbacPolicyLockedError, } from "./utils/errors.js";
|
|
16
|
+
export { MAX_SLUG_LENGTH, DEFAULT_CACHE_TTL_MS, DEFAULT_PAGE_SIZE, MAX_PAGE_SIZE, API_KEY_PREFIX, API_KEY_BYTES, TENANT_HEADER, } from "./constants.js";
|
|
15
17
|
//# sourceMappingURL=index.d.ts.map
|
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AACA,OAAO,EACL,cAAc,EACd,mBAAmB,EACnB,uBAAuB,EACvB,KAAK,aAAa,EAClB,KAAK,iBAAiB,GACvB,MAAM,oBAAoB,CAAC;AAG5B,OAAO,EACL,cAAc,EACd,iBAAiB,EACjB,KAAK,WAAW,GACjB,MAAM,oBAAoB,CAAC;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AACA,OAAO,EACL,cAAc,EACd,mBAAmB,EACnB,uBAAuB,EACvB,KAAK,aAAa,EAClB,KAAK,iBAAiB,GACvB,MAAM,oBAAoB,CAAC;AAG5B,OAAO,EACL,cAAc,EACd,iBAAiB,EACjB,KAAK,WAAW,GACjB,MAAM,oBAAoB,CAAC;AAC5B,OAAO,EAAE,cAAc,EAAE,MAAM,mBAAmB,CAAC;AAGnD,OAAO,EACL,gBAAgB,EAChB,mBAAmB,EACnB,2BAA2B,EAC3B,KAAK,YAAY,EACjB,KAAK,UAAU,EACf,KAAK,aAAa,EAClB,KAAK,qBAAqB,GAC3B,MAAM,kBAAkB,CAAC;AAG1B,OAAO,EACL,sBAAsB,EACtB,gBAAgB,EAChB,yBAAyB,EACzB,KAAK,gBAAgB,EACrB,KAAK,UAAU,EACf,KAAK,cAAc,EACnB,KAAK,mBAAmB,GACzB,MAAM,kBAAkB,CAAC;AAG1B,OAAO,EACL,WAAW,EACX,aAAa,EACb,wBAAwB,EACxB,wBAAwB,EACxB,kBAAkB,EAClB,qBAAqB,EACrB,qBAAqB,EACrB,KAAK,OAAO,EACZ,KAAK,kBAAkB,EACvB,KAAK,kBAAkB,EACvB,KAAK,YAAY,EACjB,KAAK,eAAe,EACpB,KAAK,sBAAsB,GAC5B,MA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,UAAU,EACV,gBAAgB,EAChB,YAAY,EACZ,WAAW,EACX,KAAK,eAAe,EACpB,KAAK,eAAe,GACrB,MAAM,uBAAuB,CAAC;AAG/B,OAAO,EACL,2BAA2B,EAC3B,2BAA2B,EAC3B,KAAK,YAAY,EACjB,KAAK,aAAa,EAClB,KAAK,UAAU,EACf,KAAK,qBAAqB,EAC1B,KAAK,qBAAqB,EAC1B,KAAK,oBAAoB,EACzB,KAAK,kBAAkB,GACxB,MAAM,iBAAiB,CAAC;AAGzB,OAAO,EACL,SAAS,EACT,YAAY,EACZ,mBAAmB,EACnB,wBAAwB,EACxB,sBAAsB,EACtB,wBAAwB,EACxB,mBAAmB,EACnB,oBAAoB,EACpB,uBAAuB,EACvB,0BAA0B,EAC1B,uBAAuB,EACvB,iCAAiC,EACjC,qBAAqB,EACrB,uBAAuB,EACvB,+BAA+B,EAC/B,iBAAiB,EACjB,mBAAmB,EACnB,eAAe,EACf,iBAAiB,EACjB,cAAc,EACd,oBAAoB,EACpB,oBAAoB,EACpB,yBAAyB,EACzB,uBAAuB,EACvB,wBAAwB,EACxB,qBAAqB,GACtB,MAAM,mBAAmB,CAAC;AAG3B,OAAO,EACL,eAAe,EACf,oBAAoB,EACpB,iBAAiB,EACjB,aAAa,EACb,cAAc,EACd,aAAa,EACb,aAAa,GACd,MAAM,gBAAgB,CAAC"}
|
package/dist/index.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.
|
|
4
|
-
exports.TENANT_HEADER = exports.API_KEY_BYTES = exports.API_KEY_PREFIX = exports.MAX_PAGE_SIZE = exports.DEFAULT_PAGE_SIZE = exports.DEFAULT_CACHE_TTL_MS = exports.MAX_SLUG_LENGTH = exports.
|
|
3
|
+
exports.SLUG_REGEX = exports.getSelfId = exports.getAncestorIds = exports.appendToPath = exports.getParentPath = exports.isDescendantOf = exports.isAncestorOf = exports.getDepth = exports.buildAncestryPath = exports.parseAncestryPath = exports.isSupportedIsolationStrategy = exports.SUPPORTED_ISOLATION_STRATEGIES_V1 = exports.SUPPORTED_ISOLATION_STRATEGIES = exports.SetConfigInputSchema = exports.ConfigEntrySchema = exports.UpdatePermissionInputSchema = exports.CreatePermissionInputSchema = exports.PermissionPolicySchema = exports.RevocationMode = exports.PermissionMode = exports.MoveTenantInputSchema = exports.UpdateTenantInputSchema = exports.CreateTenantInputSchema = exports.TenantNodeSchema = exports.TenantStatus = exports.IsolationStrategy = exports.MigrateRegionInputSchema = exports.UpdateRegionInputSchema = exports.CreateRegionInputSchema = exports.RegionSchema = exports.RegionStatus = exports.WebhookDeliverySchema = exports.WebhookDeliveryStatus = exports.WebhookEventSchema = exports.UpdateWebhookInputSchema = exports.CreateWebhookInputSchema = exports.WebhookSchema = exports.TenantEvent = exports.UsageAggregateQuerySchema = exports.UsageEventSchema = exports.RecordUsageInputSchema = exports.RecordAuditEventInputSchema = exports.AuditLogQuerySchema = exports.AuditEntrySchema = exports.scopeSatisfies = exports.ApiKeyScopeSchema = exports.API_KEY_SCOPES = exports.GrantConsentInputSchema = exports.ConsentRecordSchema = exports.ConsentPurpose = void 0;
|
|
4
|
+
exports.TENANT_HEADER = exports.API_KEY_BYTES = exports.API_KEY_PREFIX = exports.MAX_PAGE_SIZE = exports.DEFAULT_PAGE_SIZE = exports.DEFAULT_CACHE_TTL_MS = exports.MAX_SLUG_LENGTH = exports.AbacPolicyLockedError = exports.InvalidAbacOperatorError = exports.AbacPolicyNotFoundError = exports.WebhookUrlValidationError = exports.WebhookDeliveryError = exports.WebhookNotFoundError = exports.ForbiddenError = exports.UnauthorizedError = exports.ValidationError = exports.ConfigNotFoundError = exports.ConfigLockedError = exports.PermissionRevocationDeniedError = exports.PermissionNotFoundError = exports.PermissionLockedError = exports.IsolationStrategyUnsupportedError = exports.IsolationViolationError = exports.TenantContextNotFoundError = exports.InvalidTenantStateError = exports.TenantSuspendedError = exports.TenantArchivedError = exports.TenantCycleDetectedError = exports.TenantHasChildrenError = exports.TenantAlreadyExistsError = exports.TenantNotFoundError = exports.StratumError = exports.ErrorCode = exports.AbacEvaluationRequestSchema = exports.CreateAbacPolicyInputSchema = exports.isValidSlug = exports.validateSlug = exports.PaginationSchema = exports.UUIDSchema = exports.SlugSchema = void 0;
|
|
5
5
|
// Consent types
|
|
6
6
|
var consent_js_1 = require("./types/consent.js");
|
|
7
7
|
Object.defineProperty(exports, "ConsentPurpose", { enumerable: true, get: function () { return consent_js_1.ConsentPurpose; } });
|
|
@@ -11,10 +11,18 @@ Object.defineProperty(exports, "GrantConsentInputSchema", { enumerable: true, ge
|
|
|
11
11
|
var api_key_js_1 = require("./types/api-key.js");
|
|
12
12
|
Object.defineProperty(exports, "API_KEY_SCOPES", { enumerable: true, get: function () { return api_key_js_1.API_KEY_SCOPES; } });
|
|
13
13
|
Object.defineProperty(exports, "ApiKeyScopeSchema", { enumerable: true, get: function () { return api_key_js_1.ApiKeyScopeSchema; } });
|
|
14
|
+
var scopes_js_1 = require("./utils/scopes.js");
|
|
15
|
+
Object.defineProperty(exports, "scopeSatisfies", { enumerable: true, get: function () { return scopes_js_1.scopeSatisfies; } });
|
|
14
16
|
// Audit types
|
|
15
17
|
var audit_js_1 = require("./types/audit.js");
|
|
16
18
|
Object.defineProperty(exports, "AuditEntrySchema", { enumerable: true, get: function () { return audit_js_1.AuditEntrySchema; } });
|
|
17
19
|
Object.defineProperty(exports, "AuditLogQuerySchema", { enumerable: true, get: function () { return audit_js_1.AuditLogQuerySchema; } });
|
|
20
|
+
Object.defineProperty(exports, "RecordAuditEventInputSchema", { enumerable: true, get: function () { return audit_js_1.RecordAuditEventInputSchema; } });
|
|
21
|
+
// Usage metering types
|
|
22
|
+
var usage_js_1 = require("./types/usage.js");
|
|
23
|
+
Object.defineProperty(exports, "RecordUsageInputSchema", { enumerable: true, get: function () { return usage_js_1.RecordUsageInputSchema; } });
|
|
24
|
+
Object.defineProperty(exports, "UsageEventSchema", { enumerable: true, get: function () { return usage_js_1.UsageEventSchema; } });
|
|
25
|
+
Object.defineProperty(exports, "UsageAggregateQuerySchema", { enumerable: true, get: function () { return usage_js_1.UsageAggregateQuerySchema; } });
|
|
18
26
|
// Webhook types
|
|
19
27
|
var webhook_js_1 = require("./types/webhook.js");
|
|
20
28
|
Object.defineProperty(exports, "TenantEvent", { enumerable: true, get: function () { return webhook_js_1.TenantEvent; } });
|
|
@@ -49,6 +57,7 @@ var config_js_1 = require("./types/config.js");
|
|
|
49
57
|
Object.defineProperty(exports, "ConfigEntrySchema", { enumerable: true, get: function () { return config_js_1.ConfigEntrySchema; } });
|
|
50
58
|
Object.defineProperty(exports, "SetConfigInputSchema", { enumerable: true, get: function () { return config_js_1.SetConfigInputSchema; } });
|
|
51
59
|
var isolation_js_1 = require("./types/isolation.js");
|
|
60
|
+
Object.defineProperty(exports, "SUPPORTED_ISOLATION_STRATEGIES", { enumerable: true, get: function () { return isolation_js_1.SUPPORTED_ISOLATION_STRATEGIES; } });
|
|
52
61
|
Object.defineProperty(exports, "SUPPORTED_ISOLATION_STRATEGIES_V1", { enumerable: true, get: function () { return isolation_js_1.SUPPORTED_ISOLATION_STRATEGIES_V1; } });
|
|
53
62
|
Object.defineProperty(exports, "isSupportedIsolationStrategy", { enumerable: true, get: function () { return isolation_js_1.isSupportedIsolationStrategy; } });
|
|
54
63
|
// Utilities
|
|
@@ -82,6 +91,8 @@ Object.defineProperty(exports, "TenantAlreadyExistsError", { enumerable: true, g
|
|
|
82
91
|
Object.defineProperty(exports, "TenantHasChildrenError", { enumerable: true, get: function () { return errors_js_1.TenantHasChildrenError; } });
|
|
83
92
|
Object.defineProperty(exports, "TenantCycleDetectedError", { enumerable: true, get: function () { return errors_js_1.TenantCycleDetectedError; } });
|
|
84
93
|
Object.defineProperty(exports, "TenantArchivedError", { enumerable: true, get: function () { return errors_js_1.TenantArchivedError; } });
|
|
94
|
+
Object.defineProperty(exports, "TenantSuspendedError", { enumerable: true, get: function () { return errors_js_1.TenantSuspendedError; } });
|
|
95
|
+
Object.defineProperty(exports, "InvalidTenantStateError", { enumerable: true, get: function () { return errors_js_1.InvalidTenantStateError; } });
|
|
85
96
|
Object.defineProperty(exports, "TenantContextNotFoundError", { enumerable: true, get: function () { return errors_js_1.TenantContextNotFoundError; } });
|
|
86
97
|
Object.defineProperty(exports, "IsolationViolationError", { enumerable: true, get: function () { return errors_js_1.IsolationViolationError; } });
|
|
87
98
|
Object.defineProperty(exports, "IsolationStrategyUnsupportedError", { enumerable: true, get: function () { return errors_js_1.IsolationStrategyUnsupportedError; } });
|
|
@@ -95,12 +106,12 @@ Object.defineProperty(exports, "UnauthorizedError", { enumerable: true, get: fun
|
|
|
95
106
|
Object.defineProperty(exports, "ForbiddenError", { enumerable: true, get: function () { return errors_js_1.ForbiddenError; } });
|
|
96
107
|
Object.defineProperty(exports, "WebhookNotFoundError", { enumerable: true, get: function () { return errors_js_1.WebhookNotFoundError; } });
|
|
97
108
|
Object.defineProperty(exports, "WebhookDeliveryError", { enumerable: true, get: function () { return errors_js_1.WebhookDeliveryError; } });
|
|
109
|
+
Object.defineProperty(exports, "WebhookUrlValidationError", { enumerable: true, get: function () { return errors_js_1.WebhookUrlValidationError; } });
|
|
98
110
|
Object.defineProperty(exports, "AbacPolicyNotFoundError", { enumerable: true, get: function () { return errors_js_1.AbacPolicyNotFoundError; } });
|
|
99
111
|
Object.defineProperty(exports, "InvalidAbacOperatorError", { enumerable: true, get: function () { return errors_js_1.InvalidAbacOperatorError; } });
|
|
100
112
|
Object.defineProperty(exports, "AbacPolicyLockedError", { enumerable: true, get: function () { return errors_js_1.AbacPolicyLockedError; } });
|
|
101
113
|
// Constants
|
|
102
114
|
var constants_js_1 = require("./constants.js");
|
|
103
|
-
Object.defineProperty(exports, "MAX_TREE_DEPTH", { enumerable: true, get: function () { return constants_js_1.MAX_TREE_DEPTH; } });
|
|
104
115
|
Object.defineProperty(exports, "MAX_SLUG_LENGTH", { enumerable: true, get: function () { return constants_js_1.MAX_SLUG_LENGTH; } });
|
|
105
116
|
Object.defineProperty(exports, "DEFAULT_CACHE_TTL_MS", { enumerable: true, get: function () { return constants_js_1.DEFAULT_CACHE_TTL_MS; } });
|
|
106
117
|
Object.defineProperty(exports, "DEFAULT_PAGE_SIZE", { enumerable: true, get: function () { return constants_js_1.DEFAULT_PAGE_SIZE; } });
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";;;;AAAA,gBAAgB;AAChB,iDAM4B;AAL1B,4GAAA,cAAc,OAAA;AACd,iHAAA,mBAAmB,OAAA;AACnB,qHAAA,uBAAuB,OAAA;AAKzB,gBAAgB;AAChB,iDAI4B;AAH1B,4GAAA,cAAc,OAAA;AACd,+GAAA,iBAAiB,OAAA;
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";;;;AAAA,gBAAgB;AAChB,iDAM4B;AAL1B,4GAAA,cAAc,OAAA;AACd,iHAAA,mBAAmB,OAAA;AACnB,qHAAA,uBAAuB,OAAA;AAKzB,gBAAgB;AAChB,iDAI4B;AAH1B,4GAAA,cAAc,OAAA;AACd,+GAAA,iBAAiB,OAAA;AAGnB,+CAAmD;AAA1C,2GAAA,cAAc,OAAA;AAEvB,cAAc;AACd,6CAQ0B;AAPxB,4GAAA,gBAAgB,OAAA;AAChB,+GAAA,mBAAmB,OAAA;AACnB,uHAAA,2BAA2B,OAAA;AAO7B,uBAAuB;AACvB,6CAQ0B;AAPxB,kHAAA,sBAAsB,OAAA;AACtB,4GAAA,gBAAgB,OAAA;AAChB,qHAAA,yBAAyB,OAAA;AAO3B,gBAAgB;AAChB,iDAc4B;AAb1B,yGAAA,WAAW,OAAA;AACX,2GAAA,aAAa,OAAA;AACb,sHAAA,wBAAwB,OAAA;AACxB,sHAAA,wBAAwB,OAAA;AACxB,gHAAA,kBAAkB,OAAA;AACl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A;AAU7B,SAAS;AACT,+CA2B2B;AA1BzB,sGAAA,SAAS,OAAA;AACT,yGAAA,YAAY,OAAA;AACZ,gHAAA,mBAAmB,OAAA;AACnB,qHAAA,wBAAwB,OAAA;AACxB,mHAAA,sBAAsB,OAAA;AACtB,qHAAA,wBAAwB,OAAA;AACxB,gHAAA,mBAAmB,OAAA;AACnB,iHAAA,oBAAoB,OAAA;AACpB,oHAAA,uBAAuB,OAAA;AACvB,uHAAA,0BAA0B,OAAA;AAC1B,oHAAA,uBAAuB,OAAA;AACvB,8HAAA,iCAAiC,OAAA;AACjC,kHAAA,qBAAqB,OAAA;AACrB,oHAAA,uBAAuB,OAAA;AACvB,4HAAA,+BAA+B,OAAA;AAC/B,8GAAA,iBAAiB,OAAA;AACjB,gHAAA,mBAAmB,OAAA;AACnB,4GAAA,eAAe,OAAA;AACf,8GAAA,iBAAiB,OAAA;AACjB,2GAAA,cAAc,OAAA;AACd,iHAAA,oBAAoB,OAAA;AACpB,iHAAA,oBAAoB,OAAA;AACpB,sHAAA,yBAAyB,OAAA;AACzB,oHAAA,uBAAuB,OAAA;AACvB,qHAAA,wBAAwB,OAAA;AACxB,kHAAA,qBAAqB,OAAA;AAGvB,YAAY;AACZ,+CAQwB;AAPtB,+GAAA,eAAe,OAAA;AACf,oHAAA,oBAAoB,OAAA;AACpB,iHAAA,iBAAiB,OAAA;AACjB,6GAAA,aAAa,OAAA;AACb,8GAAA,cAAc,OAAA;AACd,6GAAA,aAAa,OAAA;AACb,6GAAA,aAAa,OAAA"}
|
package/dist/types/audit.d.ts
CHANGED
|
@@ -78,4 +78,48 @@ export declare const AuditLogQuerySchema: z.ZodObject<{
|
|
|
78
78
|
cursor?: string | undefined;
|
|
79
79
|
}>;
|
|
80
80
|
export type AuditLogQuery = z.infer<typeof AuditLogQuerySchema>;
|
|
81
|
+
/**
|
|
82
|
+
* Input to append a custom audit event through the public facade. Stratum owns
|
|
83
|
+
* `audit_logs`, so a consumer records its own events here instead of writing the
|
|
84
|
+
* table directly. `tenantId` is required and the row is always stamped for that
|
|
85
|
+
* tenant and no other. `actorType` matches the actor_type CHECK
|
|
86
|
+
* ('api_key' | 'jwt' | 'system') and defaults to 'system'. `sourceIp` lands in
|
|
87
|
+
* the INET column, so it must be a valid IP; Postgres normalizes it (a bare IPv4
|
|
88
|
+
* round-trips as `x/32`). The recorded row is queryable via queryAuditLogs.
|
|
89
|
+
*/
|
|
90
|
+
export declare const RecordAuditEventInputSchema: z.ZodObject<{
|
|
91
|
+
tenantId: z.ZodString;
|
|
92
|
+
actorId: z.ZodString;
|
|
93
|
+
actorType: z.ZodDefault<z.ZodEnum<["api_key", "jwt", "system"]>>;
|
|
94
|
+
action: z.ZodString;
|
|
95
|
+
resourceType: z.ZodString;
|
|
96
|
+
resourceId: z.ZodNullable<z.ZodString>;
|
|
97
|
+
before: z.ZodOptional<z.ZodNullable<z.ZodRecord<z.ZodString, z.ZodUnknown>>>;
|
|
98
|
+
after: z.ZodOptional<z.ZodNullable<z.ZodRecord<z.ZodString, z.ZodUnknown>>>;
|
|
99
|
+
metadata: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
100
|
+
sourceIp: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
101
|
+
}, "strip", z.ZodTypeAny, {
|
|
102
|
+
metadata: Record<string, unknown>;
|
|
103
|
+
action: string;
|
|
104
|
+
tenantId: string;
|
|
105
|
+
actorId: string;
|
|
106
|
+
actorType: "api_key" | "jwt" | "system";
|
|
107
|
+
resourceType: string;
|
|
108
|
+
resourceId: string | null;
|
|
109
|
+
before?: Record<string, unknown> | null | undefined;
|
|
110
|
+
after?: Record<string, unknown> | null | undefined;
|
|
111
|
+
sourceIp?: string | null | undefined;
|
|
112
|
+
}, {
|
|
113
|
+
action: string;
|
|
114
|
+
tenantId: string;
|
|
115
|
+
actorId: string;
|
|
116
|
+
resourceType: string;
|
|
117
|
+
resourceId: string | null;
|
|
118
|
+
metadata?: Record<string, unknown> | undefined;
|
|
119
|
+
actorType?: "api_key" | "jwt" | "system" | undefined;
|
|
120
|
+
before?: Record<string, unknown> | null | undefined;
|
|
121
|
+
after?: Record<string, unknown> | null | undefined;
|
|
122
|
+
sourceIp?: string | null | undefined;
|
|
123
|
+
}>;
|
|
124
|
+
export type RecordAuditEventInput = z.input<typeof RecordAuditEventInputSchema>;
|
|
81
125
|
//# sourceMappingURL=audit.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"audit.d.ts","sourceRoot":"","sources":["../../src/types/audit.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,MAAM,WAAW,YAAY;IAC3B,QAAQ,EAAE,MAAM,CAAC;IACjB,UAAU,EAAE,SAAS,GAAG,KAAK,GAAG,QAAQ,CAAC;IACzC,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,UAAU,CAAC,EAAE,MAAM,CAAC;CACrB;AAED,eAAO,MAAM,gBAAgB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAc3B,CAAC;AACH,MAAM,MAAM,UAAU,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,gBAAgB,CAAC,CAAC;AAE1D,eAAO,MAAM,mBAAmB;;;;;;;;;;;;;;;;;;;;;;;;;;;EAS9B,CAAC;AACH,MAAM,MAAM,aAAa,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,mBAAmB,CAAC,CAAC"}
|
|
1
|
+
{"version":3,"file":"audit.d.ts","sourceRoot":"","sources":["../../src/types/audit.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,MAAM,WAAW,YAAY;IAC3B,QAAQ,EAAE,MAAM,CAAC;IACjB,UAAU,EAAE,SAAS,GAAG,KAAK,GAAG,QAAQ,CAAC;IACzC,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,UAAU,CAAC,EAAE,MAAM,CAAC;CACrB;AAED,eAAO,MAAM,gBAAgB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAc3B,CAAC;AACH,MAAM,MAAM,UAAU,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,gBAAgB,CAAC,CAAC;AAE1D,eAAO,MAAM,mBAAmB;;;;;;;;;;;;;;;;;;;;;;;;;;;EAS9B,CAAC;AACH,MAAM,MAAM,aAAa,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,mBAAmB,CAAC,CAAC;AAEhE;;;;;;;;GAQG;AACH,eAAO,MAAM,2BAA2B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAWtC,CAAC;AAIH,MAAM,MAAM,qBAAqB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,2BAA2B,CAAC,CAAC"}
|
package/dist/types/audit.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.AuditLogQuerySchema = exports.AuditEntrySchema = void 0;
|
|
3
|
+
exports.RecordAuditEventInputSchema = exports.AuditLogQuerySchema = exports.AuditEntrySchema = void 0;
|
|
4
4
|
const zod_1 = require("zod");
|
|
5
5
|
exports.AuditEntrySchema = zod_1.z.object({
|
|
6
6
|
id: zod_1.z.string().uuid(),
|
|
@@ -27,4 +27,25 @@ exports.AuditLogQuerySchema = zod_1.z.object({
|
|
|
27
27
|
limit: zod_1.z.coerce.number().int().min(1).max(100).default(50),
|
|
28
28
|
cursor: zod_1.z.string().uuid().optional(),
|
|
29
29
|
});
|
|
30
|
+
/**
|
|
31
|
+
* Input to append a custom audit event through the public facade. Stratum owns
|
|
32
|
+
* `audit_logs`, so a consumer records its own events here instead of writing the
|
|
33
|
+
* table directly. `tenantId` is required and the row is always stamped for that
|
|
34
|
+
* tenant and no other. `actorType` matches the actor_type CHECK
|
|
35
|
+
* ('api_key' | 'jwt' | 'system') and defaults to 'system'. `sourceIp` lands in
|
|
36
|
+
* the INET column, so it must be a valid IP; Postgres normalizes it (a bare IPv4
|
|
37
|
+
* round-trips as `x/32`). The recorded row is queryable via queryAuditLogs.
|
|
38
|
+
*/
|
|
39
|
+
exports.RecordAuditEventInputSchema = zod_1.z.object({
|
|
40
|
+
tenantId: zod_1.z.string().uuid(),
|
|
41
|
+
actorId: zod_1.z.string().min(1),
|
|
42
|
+
actorType: zod_1.z.enum(["api_key", "jwt", "system"]).default("system"),
|
|
43
|
+
action: zod_1.z.string().min(1),
|
|
44
|
+
resourceType: zod_1.z.string().min(1),
|
|
45
|
+
resourceId: zod_1.z.string().nullable(),
|
|
46
|
+
before: zod_1.z.record(zod_1.z.unknown()).nullable().optional(),
|
|
47
|
+
after: zod_1.z.record(zod_1.z.unknown()).nullable().optional(),
|
|
48
|
+
metadata: zod_1.z.record(zod_1.z.unknown()).default({}),
|
|
49
|
+
sourceIp: zod_1.z.string().nullable().optional(),
|
|
50
|
+
});
|
|
30
51
|
//# sourceMappingURL=audit.js.map
|
package/dist/types/audit.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"audit.js","sourceRoot":"","sources":["../../src/types/audit.ts"],"names":[],"mappings":";;;AAAA,6BAAwB;AASX,QAAA,gBAAgB,GAAG,OAAC,CAAC,MAAM,CAAC;IACvC,EAAE,EAAE,OAAC,CAAC,MAAM,EAAE,CAAC,IAAI,EAAE;IACrB,QAAQ,EAAE,OAAC,CAAC,MAAM,EAAE;IACpB,UAAU,EAAE,OAAC,CAAC,MAAM,EAAE;IACtB,MAAM,EAAE,OAAC,CAAC,MAAM,EAAE;IAClB,aAAa,EAAE,OAAC,CAAC,MAAM,EAAE;IACzB,WAAW,EAAE,OAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;IAClC,SAAS,EAAE,OAAC,CAAC,MAAM,EAAE,CAAC,IAAI,EAAE,CAAC,QAAQ,EAAE;IACvC,SAAS,EAAE,OAAC,CAAC,MAAM,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OAAO,EAAE,CAAC,CAAC,OAAO,CAAC,EAAE,CAAC;IAC3C,QAAQ,EAAE,OAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE,CAAC,QAAQ,EAAE;CAC3C,CAAC,CAAC"}
|
package/dist/types/tenant.d.ts
CHANGED
|
@@ -8,6 +8,7 @@ export declare const IsolationStrategy: {
|
|
|
8
8
|
export type IsolationStrategy = (typeof IsolationStrategy)[keyof typeof IsolationStrategy];
|
|
9
9
|
export declare const TenantStatus: {
|
|
10
10
|
readonly ACTIVE: "active";
|
|
11
|
+
readonly SUSPENDED: "suspended";
|
|
11
12
|
readonly ARCHIVED: "archived";
|
|
12
13
|
};
|
|
13
14
|
export type TenantStatus = (typeof TenantStatus)[keyof typeof TenantStatus];
|
|
@@ -27,6 +28,7 @@ export declare const TenantNodeSchema: z.ZodObject<{
|
|
|
27
28
|
}>>;
|
|
28
29
|
status: z.ZodDefault<z.ZodNativeEnum<{
|
|
29
30
|
readonly ACTIVE: "active";
|
|
31
|
+
readonly SUSPENDED: "suspended";
|
|
30
32
|
readonly ARCHIVED: "archived";
|
|
31
33
|
}>>;
|
|
32
34
|
region_id: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
@@ -36,7 +38,7 @@ export declare const TenantNodeSchema: z.ZodObject<{
|
|
|
36
38
|
updated_at: z.ZodString;
|
|
37
39
|
}, "strip", z.ZodTypeAny, {
|
|
38
40
|
id: string;
|
|
39
|
-
status: "active" | "archived";
|
|
41
|
+
status: "active" | "suspended" | "archived";
|
|
40
42
|
metadata: Record<string, unknown>;
|
|
41
43
|
created_at: string;
|
|
42
44
|
updated_at: string;
|
|
@@ -59,7 +61,7 @@ export declare const TenantNodeSchema: z.ZodObject<{
|
|
|
59
61
|
ancestry_path: string;
|
|
60
62
|
depth: number;
|
|
61
63
|
name: string;
|
|
62
|
-
status?: "active" | "archived" | undefined;
|
|
64
|
+
status?: "active" | "suspended" | "archived" | undefined;
|
|
63
65
|
metadata?: Record<string, unknown> | undefined;
|
|
64
66
|
region_id?: string | null | undefined;
|
|
65
67
|
config?: Record<string, unknown> | undefined;
|
|
@@ -123,8 +125,12 @@ export declare const MoveTenantInputSchema: z.ZodObject<{
|
|
|
123
125
|
new_parent_id: string;
|
|
124
126
|
}>;
|
|
125
127
|
export type MoveTenantInput = z.infer<typeof MoveTenantInputSchema>;
|
|
126
|
-
/**
|
|
127
|
-
|
|
128
|
+
/**
|
|
129
|
+
* Flat, resolved per-request tenant context: the shape served by the
|
|
130
|
+
* /:id/context endpoint and stored in the SDK's request-scoped context.
|
|
131
|
+
* Distinct from the richer object-graph {@link TenantContext}.
|
|
132
|
+
*/
|
|
133
|
+
export interface ResolvedTenantContext {
|
|
128
134
|
tenant_id: string;
|
|
129
135
|
ancestry_path: string;
|
|
130
136
|
depth: number;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"tenant.d.ts","sourceRoot":"","sources":["../../src/types/tenant.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,aAAa,CAAC;AAElD,eAAO,MAAM,iBAAiB;;;;CAIpB,CAAC;AAEX,MAAM,MAAM,iBAAiB,GAC3B,CAAC,OAAO,iBAAiB,CAAC,CAAC,MAAM,OAAO,iBAAiB,CAAC,CAAC;AAE7D,eAAO,MAAM,YAAY
|
|
1
|
+
{"version":3,"file":"tenant.d.ts","sourceRoot":"","sources":["../../src/types/tenant.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,aAAa,CAAC;AAElD,eAAO,MAAM,iBAAiB;;;;CAIpB,CAAC;AAEX,MAAM,MAAM,iBAAiB,GAC3B,CAAC,OAAO,iBAAiB,CAAC,CAAC,MAAM,OAAO,iBAAiB,CAAC,CAAC;AAE7D,eAAO,MAAM,YAAY;;;;CAI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B;IACjC,SAAS,EAAE,MAAM,CAAC;IAClB,GAAG,EAAE,MAAM,CAAC;IACZ,KAAK,EAAE,OAAO,CAAC;IACf,IAAI,EAAE,MAAM,CAAC;IACb,gBAAgB,EAAE,MAAM,CAAC;IACzB,MAAM,EAAE,OAAO,CAAC;IAChB,SAAS,EAAE,OAAO,CAAC;CACpB"}
|
package/dist/types/tenant.js
CHANGED
package/dist/types/tenant.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"tenant.js","sourceRoot":"","sources":["../../src/types/tenant.ts"],"names":[],"mappings":";;;AAAA,6BAAwB;AAGX,QAAA,iBAAiB,GAAG;IAC/B,UAAU,EAAE,YAAY;IACxB,iBAAiB,EAAE,mBAAmB;IACtC,aAAa,EAAE,eAAe;CACtB,CAAC;AAKE,QAAA,YAAY,GAAG;IAC1B,MAAM,EAAE,QAAQ;IAChB,QAAQ,EAAE,UAAU;CACZ,CAAC;AAIE,QAAA,gBAAgB,GAAG,OAAC,CAAC,MAAM,CAAC;IACvC,EAAE,EAAE,OAAC,CAAC,MAAM,EAAE,CAAC,IAAI,EAAE;IACrB,SAAS,EAAE,OAAC,CAAC,MAAM,EAAE,CAAC,IAAI,EAAE,CAAC,QAAQ,EAAE;IACvC,aAAa,EAAE,OAAC,CAAC,MAAM,EAAE;IACzB,KAAK,EAAE,OAAC,CAAC,MAAM,EAAE,CAAC,GAAG,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC;IAC9B,IAAI,EAAE,OAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,GAAG,CAAC;IAChC,IAAI,EAAE,OAAC,CAAC,MAAM,EAAE,CAAC,KAAK,CAAC,wBAAwB,CAAC;IAChD,MAAM,EAAE,OAAC,CAAC,MAAM,CAAC,OAAC,CAAC,OAAO,EAAE,CAAC,CAAC,OAAO,CAAC,EAAE,CAAC;IACzC,QAAQ,EAAE,OAAC,CAAC,MAAM,CA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b,MAAM,EAAE,OAAC,CAAC,MAAM,CAAC,OAAC,CAAC,OAAO,EAAE,CAAC,CAAC,QAAQ,EAAE;IACxC,QAAQ,EAAE,OAAC,CAAC,MAAM,CAAC,OAAC,CAAC,OAAO,EAAE,CAAC,CAAC,QAAQ,EAAE;CAC3C,CAAC,CAAC;AAIU,QAAA,qBAAqB,GAAG,OAAC,CAAC,MAAM,CAAC;IAC5C,aAAa,EAAE,OAAC,CAAC,MAAM,EAAE,CAAC,IAAI,EAAE;CACjC,CAAC,CAAC"}
|
|
@@ -0,0 +1,91 @@
|
|
|
1
|
+
import { z } from "zod";
|
|
2
|
+
/**
|
|
3
|
+
* Input to record a single usage event for a tenant.
|
|
4
|
+
*
|
|
5
|
+
* `quantity` defaults to 1 (one countable unit) and must be a non-negative
|
|
6
|
+
* integer — metering counts up; credits / adjustments are out of scope.
|
|
7
|
+
* `occurred_at` is when the usage happened (ISO 8601); it defaults to insert
|
|
8
|
+
* time and is the timestamp aggregation windows filter on, so a back-dated
|
|
9
|
+
* import still lands in the right billing window. `idempotency_key`, when
|
|
10
|
+
* supplied, makes the record idempotent per (tenant, metric): re-recording the
|
|
11
|
+
* same key is a no-op that returns the original event, so an at-least-once
|
|
12
|
+
* producer cannot double count.
|
|
13
|
+
*/
|
|
14
|
+
export declare const RecordUsageInputSchema: z.ZodObject<{
|
|
15
|
+
metric: z.ZodString;
|
|
16
|
+
quantity: z.ZodDefault<z.ZodNumber>;
|
|
17
|
+
occurred_at: z.ZodOptional<z.ZodString>;
|
|
18
|
+
idempotency_key: z.ZodOptional<z.ZodString>;
|
|
19
|
+
metadata: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
20
|
+
}, "strip", z.ZodTypeAny, {
|
|
21
|
+
metadata: Record<string, unknown>;
|
|
22
|
+
metric: string;
|
|
23
|
+
quantity: number;
|
|
24
|
+
occurred_at?: string | undefined;
|
|
25
|
+
idempotency_key?: string | undefined;
|
|
26
|
+
}, {
|
|
27
|
+
metric: string;
|
|
28
|
+
metadata?: Record<string, unknown> | undefined;
|
|
29
|
+
quantity?: number | undefined;
|
|
30
|
+
occurred_at?: string | undefined;
|
|
31
|
+
idempotency_key?: string | undefined;
|
|
32
|
+
}>;
|
|
33
|
+
export type RecordUsageInput = z.input<typeof RecordUsageInputSchema>;
|
|
34
|
+
export declare const UsageEventSchema: z.ZodObject<{
|
|
35
|
+
id: z.ZodString;
|
|
36
|
+
tenant_id: z.ZodString;
|
|
37
|
+
metric: z.ZodString;
|
|
38
|
+
quantity: z.ZodNumber;
|
|
39
|
+
idempotency_key: z.ZodNullable<z.ZodString>;
|
|
40
|
+
metadata: z.ZodRecord<z.ZodString, z.ZodUnknown>;
|
|
41
|
+
occurred_at: z.ZodString;
|
|
42
|
+
recorded_at: z.ZodString;
|
|
43
|
+
}, "strip", z.ZodTypeAny, {
|
|
44
|
+
id: string;
|
|
45
|
+
tenant_id: string;
|
|
46
|
+
metadata: Record<string, unknown>;
|
|
47
|
+
metric: string;
|
|
48
|
+
quantity: number;
|
|
49
|
+
occurred_at: string;
|
|
50
|
+
idempotency_key: string | null;
|
|
51
|
+
recorded_at: string;
|
|
52
|
+
}, {
|
|
53
|
+
id: string;
|
|
54
|
+
tenant_id: string;
|
|
55
|
+
metadata: Record<string, unknown>;
|
|
56
|
+
metric: string;
|
|
57
|
+
quantity: number;
|
|
58
|
+
occurred_at: string;
|
|
59
|
+
idempotency_key: string | null;
|
|
60
|
+
recorded_at: string;
|
|
61
|
+
}>;
|
|
62
|
+
export type UsageEvent = z.infer<typeof UsageEventSchema>;
|
|
63
|
+
/**
|
|
64
|
+
* Aggregate usage for one tenant over an optional time window. The window is
|
|
65
|
+
* half-open on `occurred_at`: `from` inclusive, `to` exclusive, so adjacent
|
|
66
|
+
* windows never double count the same event at a boundary. Omitting `metric`
|
|
67
|
+
* returns one aggregate row per metric.
|
|
68
|
+
*/
|
|
69
|
+
export declare const UsageAggregateQuerySchema: z.ZodObject<{
|
|
70
|
+
tenant_id: z.ZodString;
|
|
71
|
+
metric: z.ZodOptional<z.ZodString>;
|
|
72
|
+
from: z.ZodOptional<z.ZodString>;
|
|
73
|
+
to: z.ZodOptional<z.ZodString>;
|
|
74
|
+
}, "strip", z.ZodTypeAny, {
|
|
75
|
+
tenant_id: string;
|
|
76
|
+
from?: string | undefined;
|
|
77
|
+
to?: string | undefined;
|
|
78
|
+
metric?: string | undefined;
|
|
79
|
+
}, {
|
|
80
|
+
tenant_id: string;
|
|
81
|
+
from?: string | undefined;
|
|
82
|
+
to?: string | undefined;
|
|
83
|
+
metric?: string | undefined;
|
|
84
|
+
}>;
|
|
85
|
+
export type UsageAggregateQuery = z.infer<typeof UsageAggregateQuerySchema>;
|
|
86
|
+
export interface UsageAggregate {
|
|
87
|
+
metric: string;
|
|
88
|
+
total: number;
|
|
89
|
+
event_count: number;
|
|
90
|
+
}
|
|
91
|
+
//# sourceMappingURL=usage.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"usage.d.ts","sourceRoot":"","sources":["../../src/types/usage.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB;;;;;;;;;;;GAWG;AACH,eAAO,MAAM,sBAAsB;;;;;;;;;;;;;;;;;;EAMjC,CAAC;AAIH,MAAM,MAAM,gBAAgB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,sBAAsB,CAAC,CAAC;AAEtE,eAAO,MAAM,gBAAgB;;;;;;;;;;;;;;;;;;;;;;;;;;;EAS3B,CAAC;AACH,MAAM,MAAM,UAAU,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,gBAAgB,CAAC,CAAC;AAE1D;;;;;GAKG;AACH,eAAO,MAAM,yBAAyB;;;;;;;;;;;;;;;EAKpC,CAAC;AACH,MAAM,MAAM,mBAAmB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,yBAAyB,CAAC,CAAC;AAE5E,MAAM,WAAW,cAAc;IAC7B,MAAM,EAAE,MAAM,CAAC;IACf,KAAK,EAAE,MAAM,CAAC;IACd,WAAW,EAAE,MAAM,CAAC;CACrB"}
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.UsageAggregateQuerySchema = exports.UsageEventSchema = exports.RecordUsageInputSchema = void 0;
|
|
4
|
+
const zod_1 = require("zod");
|
|
5
|
+
/**
|
|
6
|
+
* Input to record a single usage event for a tenant.
|
|
7
|
+
*
|
|
8
|
+
* `quantity` defaults to 1 (one countable unit) and must be a non-negative
|
|
9
|
+
* integer — metering counts up; credits / adjustments are out of scope.
|
|
10
|
+
* `occurred_at` is when the usage happened (ISO 8601); it defaults to insert
|
|
11
|
+
* time and is the timestamp aggregation windows filter on, so a back-dated
|
|
12
|
+
* import still lands in the right billing window. `idempotency_key`, when
|
|
13
|
+
* supplied, makes the record idempotent per (tenant, metric): re-recording the
|
|
14
|
+
* same key is a no-op that returns the original event, so an at-least-once
|
|
15
|
+
* producer cannot double count.
|
|
16
|
+
*/
|
|
17
|
+
exports.RecordUsageInputSchema = zod_1.z.object({
|
|
18
|
+
metric: zod_1.z.string().min(1).max(128),
|
|
19
|
+
quantity: zod_1.z.number().int().nonnegative().default(1),
|
|
20
|
+
occurred_at: zod_1.z.string().datetime().optional(),
|
|
21
|
+
idempotency_key: zod_1.z.string().min(1).max(255).optional(),
|
|
22
|
+
metadata: zod_1.z.record(zod_1.z.unknown()).default({}),
|
|
23
|
+
});
|
|
24
|
+
exports.UsageEventSchema = zod_1.z.object({
|
|
25
|
+
id: zod_1.z.string().uuid(),
|
|
26
|
+
tenant_id: zod_1.z.string().uuid(),
|
|
27
|
+
metric: zod_1.z.string(),
|
|
28
|
+
quantity: zod_1.z.number(),
|
|
29
|
+
idempotency_key: zod_1.z.string().nullable(),
|
|
30
|
+
metadata: zod_1.z.record(zod_1.z.unknown()),
|
|
31
|
+
occurred_at: zod_1.z.string(),
|
|
32
|
+
recorded_at: zod_1.z.string(),
|
|
33
|
+
});
|
|
34
|
+
/**
|
|
35
|
+
* Aggregate usage for one tenant over an optional time window. The window is
|
|
36
|
+
* half-open on `occurred_at`: `from` inclusive, `to` exclusive, so adjacent
|
|
37
|
+
* windows never double count the same event at a boundary. Omitting `metric`
|
|
38
|
+
* returns one aggregate row per metric.
|
|
39
|
+
*/
|
|
40
|
+
exports.UsageAggregateQuerySchema = zod_1.z.object({
|
|
41
|
+
tenant_id: zod_1.z.string().uuid(),
|
|
42
|
+
metric: zod_1.z.string().optional(),
|
|
43
|
+
from: zod_1.z.string().datetime().optional(),
|
|
44
|
+
to: zod_1.z.string().datetime().optional(),
|
|
45
|
+
});
|
|
46
|
+
//# sourceMappingURL=usage.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"usage.js","sourceRoot":"","sources":["../../src/types/usage.ts"],"names":[],"mappings":";;;AAAA,6BAAwB;AAExB;;;;;;;;;;;GAWG;AACU,QAAA,sBAAsB,GAAG,OAAC,CAAC,MAAM,CAAC;IAC7C,MAAM,EAAE,OAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,GAAG,CAAC;IAClC,QAAQ,EAAE,OAAC,CAAC,MAAM,EAAE,CAAC,GAAG,EAAE,CAAC,WAAW,EAAE,CAAC,OAAO,CAAC,CAAC,CAAC;IACnD,WAAW,EAAE,OAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE,CAAC,QAAQ,EAAE;IAC7C,eAAe,EAAE,OAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC,QAAQ,EAAE;IACtD,QAAQ,EAAE,OAAC,CAAC,MAAM,CAAC,OAAC,CAAC,OAAO,EAAE,CAAC,CAAC,OAAO,CAAC,EAAE,CAAC;CAC5C,CAAC,CAAC;AAMU,QAAA,gBAAgB,GAAG,OAAC,CAAC,MAAM,CAAC;IACvC,EAAE,EAAE,OAAC,CAAC,MAAM,EAAE,CAAC,IAAI,EAAE;IACrB,SAAS,EAAE,OAAC,CAAC,MAAM,EAAE,CAAC,IAAI,EAAE;IAC5B,MAAM,EAAE,OAAC,CAAC,MAAM,EAAE;IAClB,QAAQ,EAAE,OAAC,CAAC,MAAM,EAAE;IACpB,eAAe,EAAE,OAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;IACtC,QAAQ,EAAE,OAAC,CAAC,MAAM,CAAC,OAAC,CAAC,OAAO,EAAE,CAAC;IAC/B,WAAW,EAAE,OAAC,CAAC,MAAM,EAAE;IACvB,WAAW,EAAE,OAAC,CAAC,MAAM,EAAE;CACxB,CAAC,CAAC;AAGH;;;;;GAKG;AACU,QAAA,yBAAyB,GAAG,OAAC,CAAC,MAAM,CAAC;IAChD,SAAS,EAAE,OAAC,CAAC,MAAM,EAAE,CAAC,IAAI,EAAE;IAC5B,MAAM,EAAE,OAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;IAC7B,IAAI,EAAE,OAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE,CAAC,QAAQ,EAAE;IACtC,EAAE,EAAE,OAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE,CAAC,QAAQ,EAAE;CACrC,CAAC,CAAC"}
|
package/dist/types/webhook.d.ts
CHANGED
|
@@ -4,6 +4,10 @@ export declare const TenantEvent: {
|
|
|
4
4
|
readonly TENANT_UPDATED: "tenant.updated";
|
|
5
5
|
readonly TENANT_DELETED: "tenant.deleted";
|
|
6
6
|
readonly TENANT_MOVED: "tenant.moved";
|
|
7
|
+
readonly TENANT_SUSPENDED: "tenant.suspended";
|
|
8
|
+
readonly TENANT_RESUMED: "tenant.resumed";
|
|
9
|
+
readonly TENANT_ARCHIVED: "tenant.archived";
|
|
10
|
+
readonly TENANT_PURGED: "tenant.purged";
|
|
7
11
|
readonly CONFIG_UPDATED: "config.updated";
|
|
8
12
|
readonly CONFIG_DELETED: "config.deleted";
|
|
9
13
|
readonly PERMISSION_CREATED: "permission.created";
|
|
@@ -52,6 +56,10 @@ export declare const CreateWebhookInputSchema: z.ZodObject<{
|
|
|
52
56
|
readonly TENANT_UPDATED: "tenant.updated";
|
|
53
57
|
readonly TENANT_DELETED: "tenant.deleted";
|
|
54
58
|
readonly TENANT_MOVED: "tenant.moved";
|
|
59
|
+
readonly TENANT_SUSPENDED: "tenant.suspended";
|
|
60
|
+
readonly TENANT_RESUMED: "tenant.resumed";
|
|
61
|
+
readonly TENANT_ARCHIVED: "tenant.archived";
|
|
62
|
+
readonly TENANT_PURGED: "tenant.purged";
|
|
55
63
|
readonly CONFIG_UPDATED: "config.updated";
|
|
56
64
|
readonly CONFIG_DELETED: "config.deleted";
|
|
57
65
|
readonly PERMISSION_CREATED: "permission.created";
|
|
@@ -62,12 +70,12 @@ export declare const CreateWebhookInputSchema: z.ZodObject<{
|
|
|
62
70
|
}, "strip", z.ZodTypeAny, {
|
|
63
71
|
tenant_id: string | null;
|
|
64
72
|
url: string;
|
|
65
|
-
events: ("tenant.created" | "tenant.updated" | "tenant.deleted" | "tenant.moved" | "config.updated" | "config.deleted" | "permission.created" | "permission.updated" | "permission.deleted")[];
|
|
73
|
+
events: ("tenant.created" | "tenant.updated" | "tenant.deleted" | "tenant.moved" | "tenant.suspended" | "tenant.resumed" | "tenant.archived" | "tenant.purged" | "config.updated" | "config.deleted" | "permission.created" | "permission.updated" | "permission.deleted")[];
|
|
66
74
|
secret: string;
|
|
67
75
|
description?: string | undefined;
|
|
68
76
|
}, {
|
|
69
77
|
url: string;
|
|
70
|
-
events: ("tenant.created" | "tenant.updated" | "tenant.deleted" | "tenant.moved" | "config.updated" | "config.deleted" | "permission.created" | "permission.updated" | "permission.deleted")[];
|
|
78
|
+
events: ("tenant.created" | "tenant.updated" | "tenant.deleted" | "tenant.moved" | "tenant.suspended" | "tenant.resumed" | "tenant.archived" | "tenant.purged" | "config.updated" | "config.deleted" | "permission.created" | "permission.updated" | "permission.deleted")[];
|
|
71
79
|
secret: string;
|
|
72
80
|
tenant_id?: string | null | undefined;
|
|
73
81
|
description?: string | undefined;
|
|
@@ -81,6 +89,10 @@ export declare const UpdateWebhookInputSchema: z.ZodObject<{
|
|
|
81
89
|
readonly TENANT_UPDATED: "tenant.updated";
|
|
82
90
|
readonly TENANT_DELETED: "tenant.deleted";
|
|
83
91
|
readonly TENANT_MOVED: "tenant.moved";
|
|
92
|
+
readonly TENANT_SUSPENDED: "tenant.suspended";
|
|
93
|
+
readonly TENANT_RESUMED: "tenant.resumed";
|
|
94
|
+
readonly TENANT_ARCHIVED: "tenant.archived";
|
|
95
|
+
readonly TENANT_PURGED: "tenant.purged";
|
|
84
96
|
readonly CONFIG_UPDATED: "config.updated";
|
|
85
97
|
readonly CONFIG_DELETED: "config.deleted";
|
|
86
98
|
readonly PERMISSION_CREATED: "permission.created";
|
|
@@ -91,13 +103,13 @@ export declare const UpdateWebhookInputSchema: z.ZodObject<{
|
|
|
91
103
|
description: z.ZodOptional<z.ZodString>;
|
|
92
104
|
}, "strip", z.ZodTypeAny, {
|
|
93
105
|
url?: string | undefined;
|
|
94
|
-
events?: ("tenant.created" | "tenant.updated" | "tenant.deleted" | "tenant.moved" | "config.updated" | "config.deleted" | "permission.created" | "permission.updated" | "permission.deleted")[] | undefined;
|
|
106
|
+
events?: ("tenant.created" | "tenant.updated" | "tenant.deleted" | "tenant.moved" | "tenant.suspended" | "tenant.resumed" | "tenant.archived" | "tenant.purged" | "config.updated" | "config.deleted" | "permission.created" | "permission.updated" | "permission.deleted")[] | undefined;
|
|
95
107
|
active?: boolean | undefined;
|
|
96
108
|
description?: string | undefined;
|
|
97
109
|
secret?: string | undefined;
|
|
98
110
|
}, {
|
|
99
111
|
url?: string | undefined;
|
|
100
|
-
events?: ("tenant.created" | "tenant.updated" | "tenant.deleted" | "tenant.moved" | "config.updated" | "config.deleted" | "permission.created" | "permission.updated" | "permission.deleted")[] | undefined;
|
|
112
|
+
events?: ("tenant.created" | "tenant.updated" | "tenant.deleted" | "tenant.moved" | "tenant.suspended" | "tenant.resumed" | "tenant.archived" | "tenant.purged" | "config.updated" | "config.deleted" | "permission.created" | "permission.updated" | "permission.deleted")[] | undefined;
|
|
101
113
|
active?: boolean | undefined;
|
|
102
114
|
description?: string | undefined;
|
|
103
115
|
secret?: string | undefined;
|
|
@@ -110,6 +122,10 @@ export declare const WebhookEventSchema: z.ZodObject<{
|
|
|
110
122
|
readonly TENANT_UPDATED: "tenant.updated";
|
|
111
123
|
readonly TENANT_DELETED: "tenant.deleted";
|
|
112
124
|
readonly TENANT_MOVED: "tenant.moved";
|
|
125
|
+
readonly TENANT_SUSPENDED: "tenant.suspended";
|
|
126
|
+
readonly TENANT_RESUMED: "tenant.resumed";
|
|
127
|
+
readonly TENANT_ARCHIVED: "tenant.archived";
|
|
128
|
+
readonly TENANT_PURGED: "tenant.purged";
|
|
113
129
|
readonly CONFIG_UPDATED: "config.updated";
|
|
114
130
|
readonly CONFIG_DELETED: "config.deleted";
|
|
115
131
|
readonly PERMISSION_CREATED: "permission.created";
|
|
@@ -122,17 +138,32 @@ export declare const WebhookEventSchema: z.ZodObject<{
|
|
|
122
138
|
}, "strip", z.ZodTypeAny, {
|
|
123
139
|
id: string;
|
|
124
140
|
tenant_id: string;
|
|
125
|
-
type: "tenant.created" | "tenant.updated" | "tenant.deleted" | "tenant.moved" | "config.updated" | "config.deleted" | "permission.created" | "permission.updated" | "permission.deleted";
|
|
141
|
+
type: "tenant.created" | "tenant.updated" | "tenant.deleted" | "tenant.moved" | "tenant.suspended" | "tenant.resumed" | "tenant.archived" | "tenant.purged" | "config.updated" | "config.deleted" | "permission.created" | "permission.updated" | "permission.deleted";
|
|
126
142
|
created_at: string;
|
|
127
143
|
data: Record<string, unknown>;
|
|
128
144
|
}, {
|
|
129
145
|
id: string;
|
|
130
146
|
tenant_id: string;
|
|
131
|
-
type: "tenant.created" | "tenant.updated" | "tenant.deleted" | "tenant.moved" | "config.updated" | "config.deleted" | "permission.created" | "permission.updated" | "permission.deleted";
|
|
147
|
+
type: "tenant.created" | "tenant.updated" | "tenant.deleted" | "tenant.moved" | "tenant.suspended" | "tenant.resumed" | "tenant.archived" | "tenant.purged" | "config.updated" | "config.deleted" | "permission.created" | "permission.updated" | "permission.deleted";
|
|
132
148
|
created_at: string;
|
|
133
149
|
data: Record<string, unknown>;
|
|
134
150
|
}>;
|
|
135
151
|
export type WebhookEvent = z.infer<typeof WebhookEventSchema>;
|
|
152
|
+
/** Filter for listing a tenant's webhook events (newest first, paginated). */
|
|
153
|
+
export interface ListWebhookEventsQuery {
|
|
154
|
+
/** Tenant whose events to page. Required: a caller never pages another tenant. */
|
|
155
|
+
tenantId: string;
|
|
156
|
+
/** Restrict to a single event type. */
|
|
157
|
+
type?: TenantEvent;
|
|
158
|
+
/** Only events created at or after this ISO-8601 timestamp. */
|
|
159
|
+
from?: string;
|
|
160
|
+
/** Only events created at or before this ISO-8601 timestamp. */
|
|
161
|
+
to?: string;
|
|
162
|
+
/** Page size, 1-100. Defaults to 50. */
|
|
163
|
+
limit?: number;
|
|
164
|
+
/** Rows to skip for pagination. Defaults to 0. */
|
|
165
|
+
offset?: number;
|
|
166
|
+
}
|
|
136
167
|
export declare const WebhookDeliveryStatus: {
|
|
137
168
|
readonly PENDING: "pending";
|
|
138
169
|
readonly SUCCESS: "success";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"webhook.d.ts","sourceRoot":"","sources":["../../src/types/webhook.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,eAAO,MAAM,WAAW
|
|
1
|
+
{"version":3,"file":"webhook.d.ts","sourceRoot":"","sources":["../../src/types/webhook.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,eAAO,MAAM,WAAW;;;;;;;;;;;;;;CAcd,CAA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