alepha 0.19.2 → 0.19.4
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/assets/swagger-ui/swagger-ui-bundle.js +1 -1
- package/dist/api/audits/index.d.ts +8 -8
- package/dist/api/invitations/index.d.ts +790 -0
- package/dist/api/invitations/index.d.ts.map +1 -0
- package/dist/api/invitations/index.js +665 -0
- package/dist/api/invitations/index.js.map +1 -0
- package/dist/api/jobs/index.browser.js +8 -9
- package/dist/api/jobs/index.browser.js.map +1 -1
- package/dist/api/jobs/index.d.ts +90 -34
- package/dist/api/jobs/index.d.ts.map +1 -1
- package/dist/api/jobs/index.js +267 -44
- package/dist/api/jobs/index.js.map +1 -1
- package/dist/api/notifications/index.browser.js +0 -1
- package/dist/api/notifications/index.browser.js.map +1 -1
- package/dist/api/notifications/index.d.ts +3 -3
- package/dist/api/notifications/index.d.ts.map +1 -1
- package/dist/api/notifications/index.js +0 -1
- package/dist/api/notifications/index.js.map +1 -1
- package/dist/api/parameters/index.browser.js +112 -1
- package/dist/api/parameters/index.browser.js.map +1 -1
- package/dist/api/parameters/index.d.ts +90 -3
- package/dist/api/parameters/index.d.ts.map +1 -1
- package/dist/api/parameters/index.js +79 -12
- package/dist/api/parameters/index.js.map +1 -1
- package/dist/{billing → api/payments}/index.d.ts +67 -49
- package/dist/api/payments/index.d.ts.map +1 -0
- package/dist/{billing → api/payments}/index.js +108 -74
- package/dist/api/payments/index.js.map +1 -0
- package/dist/api/subscriptions/index.d.ts +1692 -0
- package/dist/api/subscriptions/index.d.ts.map +1 -0
- package/dist/api/subscriptions/index.js +1870 -0
- package/dist/api/subscriptions/index.js.map +1 -0
- package/dist/api/users/index.d.ts +27 -21
- package/dist/api/users/index.d.ts.map +1 -1
- package/dist/api/users/index.js +167 -34
- package/dist/api/users/index.js.map +1 -1
- package/dist/api/workflows/index.browser.js +246 -0
- package/dist/api/workflows/index.browser.js.map +1 -0
- package/dist/api/workflows/index.d.ts +1618 -0
- package/dist/api/workflows/index.d.ts.map +1 -0
- package/dist/api/workflows/index.js +1504 -0
- package/dist/api/workflows/index.js.map +1 -0
- package/dist/cli/config/index.d.ts +6 -28
- package/dist/cli/config/index.d.ts.map +1 -1
- package/dist/cli/config/index.js +5 -10
- package/dist/cli/config/index.js.map +1 -1
- package/dist/cli/core/index.d.ts +11669 -208
- package/dist/cli/core/index.d.ts.map +1 -1
- package/dist/cli/core/index.js +60 -69
- package/dist/cli/core/index.js.map +1 -1
- package/dist/cli/devtools/index.d.ts +5 -0
- package/dist/cli/devtools/index.d.ts.map +1 -1
- package/dist/cli/devtools/index.js +4 -0
- package/dist/cli/devtools/index.js.map +1 -1
- package/dist/cli/platform/index.d.ts +69 -64
- package/dist/cli/platform/index.d.ts.map +1 -1
- package/dist/cli/platform/index.js +6 -2
- package/dist/cli/platform/index.js.map +1 -1
- package/dist/cli/vendor/index.d.ts +38 -10
- package/dist/cli/vendor/index.d.ts.map +1 -1
- package/dist/cli/vendor/index.js +85 -26
- package/dist/cli/vendor/index.js.map +1 -1
- package/dist/core/index.browser.js +21 -2
- package/dist/core/index.browser.js.map +1 -1
- package/dist/core/index.d.ts +33 -2
- package/dist/core/index.d.ts.map +1 -1
- package/dist/core/index.js +25 -2
- package/dist/core/index.js.map +1 -1
- package/dist/core/index.native.js +25 -2
- package/dist/core/index.native.js.map +1 -1
- package/dist/core/index.workerd.js +25 -2
- package/dist/core/index.workerd.js.map +1 -1
- package/dist/email/smtp/index.js +24 -8
- package/dist/email/smtp/index.js.map +1 -1
- package/dist/logger/index.d.ts.map +1 -1
- package/dist/logger/index.js +1 -1
- package/dist/logger/index.js.map +1 -1
- package/dist/orm/core/index.browser.js +0 -18
- package/dist/orm/core/index.browser.js.map +1 -1
- package/dist/orm/core/index.bun.js +25 -73
- package/dist/orm/core/index.bun.js.map +1 -1
- package/dist/orm/core/index.d.ts +10 -32
- package/dist/orm/core/index.d.ts.map +1 -1
- package/dist/orm/core/index.js +25 -73
- package/dist/orm/core/index.js.map +1 -1
- package/dist/orm/postgres/index.bun.js +3 -3
- package/dist/orm/postgres/index.bun.js.map +1 -1
- package/dist/orm/postgres/index.d.ts +2 -1
- package/dist/orm/postgres/index.d.ts.map +1 -1
- package/dist/orm/postgres/index.js +3 -3
- package/dist/orm/postgres/index.js.map +1 -1
- package/dist/react/router/index.browser.js +25 -3
- package/dist/react/router/index.browser.js.map +1 -1
- package/dist/react/router/index.d.ts +16 -1
- package/dist/react/router/index.d.ts.map +1 -1
- package/dist/react/router/index.js +25 -3
- package/dist/react/router/index.js.map +1 -1
- package/dist/security/index.d.ts +28 -0
- package/dist/security/index.d.ts.map +1 -1
- package/dist/security/index.js +28 -0
- package/dist/security/index.js.map +1 -1
- package/package.json +37 -20
- package/src/api/invitations/__tests__/InvitationService.spec.ts +439 -0
- package/src/api/invitations/controllers/AdminInvitationController.ts +86 -0
- package/src/api/invitations/controllers/InvitationController.ts +84 -0
- package/src/api/invitations/entities/invitations.ts +33 -0
- package/src/api/invitations/index.ts +65 -0
- package/src/api/invitations/jobs/InvitationJobs.ts +37 -0
- package/src/api/invitations/providers/InvitationProvider.ts +45 -0
- package/src/api/invitations/schemas/createInvitationSchema.ts +12 -0
- package/src/api/invitations/schemas/invitationConfigAtom.ts +20 -0
- package/src/api/invitations/schemas/invitationQuerySchema.ts +15 -0
- package/src/api/invitations/schemas/invitationResourceSchema.ts +6 -0
- package/src/api/invitations/schemas/invitationWithResourceInfoSchema.ts +22 -0
- package/src/api/invitations/schemas/myInvitationsQuerySchema.ts +10 -0
- package/src/api/invitations/services/InvitationService.ts +556 -0
- package/src/api/jobs/__tests__/$job.spec.ts +876 -0
- package/src/api/jobs/controllers/AdminJobController.ts +44 -0
- package/src/api/jobs/entities/jobExecutionEntity.ts +0 -2
- package/src/api/jobs/index.ts +0 -3
- package/src/api/jobs/primitives/$job.ts +22 -11
- package/src/api/jobs/providers/JobProvider.ts +239 -25
- package/src/api/jobs/schemas/jobConfigAtom.ts +4 -0
- package/src/api/jobs/schemas/jobCronInfoSchema.ts +1 -0
- package/src/api/jobs/schemas/jobExecutionQuerySchema.ts +0 -1
- package/src/api/jobs/schemas/jobQueueDepthSchema.ts +1 -0
- package/src/api/jobs/schemas/jobRegistrationSchema.ts +1 -6
- package/src/api/jobs/services/JobService.ts +51 -12
- package/src/api/notifications/schemas/notificationQuerySchema.ts +0 -1
- package/src/api/parameters/__tests__/$parameter.spec.ts +327 -0
- package/src/api/parameters/controllers/AdminParameterController.ts +29 -3
- package/src/api/parameters/index.browser.ts +12 -0
- package/src/api/parameters/primitives/$parameter.ts +20 -3
- package/src/api/parameters/services/ParameterProvider.ts +48 -7
- package/src/{billing → api/payments}/__tests__/PaymentMethodService.spec.ts +32 -6
- package/src/api/payments/__tests__/PaymentService.spec.ts +279 -0
- package/src/{billing/controllers/AdminBillingController.ts → api/payments/controllers/AdminPaymentController.ts} +26 -21
- package/src/{billing/controllers/BillingController.ts → api/payments/controllers/PaymentController.ts} +23 -11
- package/src/{billing → api/payments}/entities/paymentIntents.ts +1 -0
- package/src/{billing/errors/BillingError.ts → api/payments/errors/PaymentError.ts} +1 -1
- package/src/{billing → api/payments}/index.ts +31 -25
- package/src/{billing/providers/MemoryBillingProvider.ts → api/payments/providers/MemoryPaymentProvider.ts} +4 -4
- package/src/{billing/providers/BillingProvider.ts → api/payments/providers/PaymentProvider.ts} +9 -2
- package/src/{billing → api/payments}/services/PaymentMethodService.ts +5 -5
- package/src/{billing/services/BillingService.ts → api/payments/services/PaymentService.ts} +94 -18
- package/src/api/subscriptions/__tests__/BillingService.spec.ts +218 -0
- package/src/api/subscriptions/__tests__/SubscriptionService.spec.ts +278 -0
- package/src/api/subscriptions/controllers/AdminSubscriptionController.ts +212 -0
- package/src/api/subscriptions/controllers/SubscriptionController.ts +189 -0
- package/src/api/subscriptions/entities/subscriptionEvents.ts +54 -0
- package/src/api/subscriptions/entities/subscriptions.ts +68 -0
- package/src/api/subscriptions/index.ts +144 -0
- package/src/api/subscriptions/jobs/SubscriptionJobs.ts +382 -0
- package/src/api/subscriptions/middleware/$requireLimit.ts +50 -0
- package/src/api/subscriptions/middleware/$requirePlan.ts +49 -0
- package/src/api/subscriptions/notifications/SubscriptionNotifications.ts +110 -0
- package/src/api/subscriptions/schemas/cancelSubscriptionSchema.ts +8 -0
- package/src/api/subscriptions/schemas/changePlanSchema.ts +9 -0
- package/src/api/subscriptions/schemas/createSubscriptionSchema.ts +11 -0
- package/src/api/subscriptions/schemas/entitlementsSchema.ts +21 -0
- package/src/api/subscriptions/schemas/mrrSchema.ts +13 -0
- package/src/api/subscriptions/schemas/planDefinitionSchema.ts +71 -0
- package/src/api/subscriptions/schemas/planResourceSchema.ts +25 -0
- package/src/api/subscriptions/schemas/subscriptionEventResourceSchema.ts +8 -0
- package/src/api/subscriptions/schemas/subscriptionQuerySchema.ts +19 -0
- package/src/api/subscriptions/schemas/subscriptionResourceSchema.ts +6 -0
- package/src/api/subscriptions/schemas/subscriptionSettingsSchema.ts +32 -0
- package/src/api/subscriptions/schemas/subscriptionStatsSchema.ts +23 -0
- package/src/api/subscriptions/services/BillingService.ts +437 -0
- package/src/api/subscriptions/services/SubscriptionConfig.ts +56 -0
- package/src/api/subscriptions/services/SubscriptionService.ts +867 -0
- package/src/api/subscriptions/services/UsageService.ts +118 -0
- package/src/api/users/__tests__/AdminUserController.spec.ts +80 -1
- package/src/api/users/__tests__/CredentialService.spec.ts +177 -0
- package/src/api/users/__tests__/EmailVerification.spec.ts +29 -18
- package/src/api/users/__tests__/PasswordReset.spec.ts +3 -0
- package/src/api/users/__tests__/RegistrationService.spec.ts +148 -1
- package/src/api/users/__tests__/SessionService.spec.ts +142 -1
- package/src/api/users/atoms/realmAuthSettingsAtom.ts +10 -1
- package/src/api/users/controllers/UserController.ts +3 -8
- package/src/api/users/notifications/UserNotifications.ts +23 -0
- package/src/api/users/schemas/loginSchema.ts +1 -1
- package/src/api/users/services/CredentialService.ts +51 -4
- package/src/api/users/services/RegistrationService.ts +38 -9
- package/src/api/users/services/SessionService.ts +62 -9
- package/src/api/users/services/UserService.ts +21 -12
- package/src/api/workflows/__tests__/$workflow.spec.ts +616 -0
- package/src/api/workflows/controllers/AdminWorkflowController.ts +191 -0
- package/src/api/workflows/entities/workflowExecutions.ts +74 -0
- package/src/api/workflows/entities/workflowStepExecutions.ts +74 -0
- package/src/api/workflows/entities/workflowStepLogs.ts +13 -0
- package/src/api/workflows/index.browser.ts +22 -0
- package/src/api/workflows/index.ts +124 -0
- package/src/api/workflows/jobs/WorkflowJobs.ts +77 -0
- package/src/api/workflows/primitives/$workflow.ts +202 -0
- package/src/api/workflows/providers/WorkflowProvider.ts +1284 -0
- package/src/api/workflows/schemas/workflowActivitySchema.ts +15 -0
- package/src/api/workflows/schemas/workflowConfigAtom.ts +51 -0
- package/src/api/workflows/schemas/workflowExecutionDetailSchema.ts +18 -0
- package/src/api/workflows/schemas/workflowExecutionQuerySchema.ts +26 -0
- package/src/api/workflows/schemas/workflowExecutionResourceSchema.ts +30 -0
- package/src/api/workflows/schemas/workflowRegistrationSchema.ts +26 -0
- package/src/api/workflows/schemas/workflowStatsSchema.ts +16 -0
- package/src/api/workflows/schemas/workflowStepExecutionResourceSchema.ts +15 -0
- package/src/api/workflows/services/WorkflowService.ts +382 -0
- package/src/cli/config/defineConfig.ts +17 -46
- package/src/cli/core/providers/ViteDevServerProvider.ts +45 -3
- package/src/cli/core/services/PackageManagerUtils.ts +3 -1
- package/src/cli/core/services/ProjectScaffolder.ts +5 -5
- package/src/cli/core/templates/agentMd.ts +14 -5
- package/src/cli/core/templates/webAppRouterTs.ts +5 -58
- package/src/cli/devtools/index.ts +21 -1
- package/src/cli/platform/index.ts +23 -2
- package/src/cli/vendor/__tests__/VendorService.spec.ts +283 -178
- package/src/cli/vendor/index.ts +20 -3
- package/src/cli/vendor/services/VendorService.ts +126 -27
- package/src/core/Alepha.ts +10 -0
- package/src/core/__tests__/TypeProvider.spec.ts +4 -2
- package/src/core/providers/SchemaValidator.ts +1 -1
- package/src/core/providers/TypeProvider.ts +46 -3
- package/src/logger/index.ts +6 -1
- package/src/orm/__tests__/enums.spec.ts +22 -29
- package/src/orm/__tests__/orm-showcase-tests.ts +430 -0
- package/src/orm/__tests__/orm-showcase.spec.ts +167 -0
- package/src/orm/core/providers/DatabaseTypeProvider.ts +0 -29
- package/src/orm/core/providers/DrizzleKitProvider.ts +56 -105
- package/src/orm/postgres/services/PostgresModelBuilder.ts +3 -6
- package/src/react/router/__tests__/$page.browser.spec.tsx +157 -0
- package/src/react/router/providers/ReactBrowserProvider.ts +39 -0
- package/src/react/router/providers/ReactBrowserRouterProvider.ts +22 -0
- package/src/security/__tests__/$secure-combinations.spec.ts +945 -0
- package/src/security/primitives/$secure.ts +28 -0
- package/tsconfig.base.json +0 -1
- package/dist/billing/index.d.ts.map +0 -1
- package/dist/billing/index.js.map +0 -1
- package/src/billing/__tests__/BillingService.spec.ts +0 -136
- /package/src/{billing → api/payments}/entities/paymentMethods.ts +0 -0
- /package/src/{billing → api/payments}/entities/refunds.ts +0 -0
- /package/src/{billing → api/payments}/schemas/intentSchemas.ts +0 -0
- /package/src/{billing → api/payments}/schemas/paymentMethodSchemas.ts +0 -0
- /package/src/{billing → api/payments}/schemas/refundSchemas.ts +0 -0
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","names":[],"sources":["../../../src/api/notifications/primitives/$notification.ts","../../../src/api/notifications/schemas/notificationPayloadSchema.ts","../../../src/api/notifications/services/NotificationSenderService.ts","../../../src/api/notifications/jobs/NotificationJobs.ts","../../../src/api/notifications/controllers/AdminNotificationController.ts","../../../src/api/notifications/schemas/notificationContactPreferencesSchema.ts","../../../src/api/notifications/schemas/notificationContactSchema.ts","../../../src/api/notifications/schemas/notificationDetailResourceSchema.ts","../../../src/api/notifications/schemas/notificationQuerySchema.ts","../../../src/api/notifications/schemas/notificationResourceSchema.ts","../../../src/api/notifications/index.ts"],"mappings":";;;;;;;;;;;;;;;;;;;;;;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../../../src/api/notifications/schemas/notificationPayloadSchema.ts","../../../src/api/notifications/services/NotificationSenderService.ts","../../../src/api/notifications/jobs/NotificationJobs.ts","../../../src/api/notifications/controllers/AdminNotificationController.ts","../../../src/api/notifications/schemas/notificationContactPreferencesSchema.ts","../../../src/api/notifications/schemas/notificationContactSchema.ts","../../../src/api/notifications/schemas/notificationDetailResourceSchema.ts","../../../src/api/notifications/schemas/notificationQuerySchema.ts","../../../src/api/notifications/schemas/notificationResourceSchema.ts","../../../src/api/notifications/index.ts"],"mappings":";;;;;;;;;;;;;;;;;;;;;;AAuCA;;;;;;;;;;;;;;;;;;cAAa,aAAA;EAAA,WAA2B,OAAA,EAAO,OAAA,EACpC,4BAAA,CAA6B,CAAA,IAAE,qBAAA,CAAA,CAAA;EAAA;;UAKzB,4BAAA,WAAuC,OAAA,UAC9C,mBAAA,CAAoB,CAAA;EAC5B,IAAA;EACA,WAAA;EACA,QAAA;EACA,QAAA;EACA,SAAA;EACA,YAAA;IAAA,CAEG,IAAA,WAAe,mBAAA,CAAoB,CAAA;EAAA;EAEtC,MAAA,EAAQ,CAAA;AAAA;AAAA,cAKG,qBAAA,WAAgC,OAAA,UAAiB,SAAA,CAC5D,4BAAA,CAA6B,CAAA;EAAA,mBAEV,gBAAA,EAAgB,gBAAA;EAAA,IAExB,IAAA,CAAA;EAIE,IAAA,CAAK,OAAA,EAAS,uBAAA,CAAwB,CAAA,IAAE,OAAA;EAoC9C,SAAA,CAAU,OAAA,EAAS,OAAA,CAAQ,4BAAA,CAA6B,CAAA;AAAA;AAAA,UAShD,uBAAA,WAAkC,OAAA;EACjD,SAAA,EAAW,YAAA,CAAa,CAAA;EACxB,OAAA;AAAA;AAAA,UAGe,mBAAA,WAA8B,OAAA;EAC7C,KAAA;IACE,OAAA;IACA,IAAA,aAAiB,SAAA,EAAW,MAAA,CAAO,CAAA;EAAA;EAErC,GAAA;IACE,OAAA,aAAoB,SAAA,EAAW,MAAA,CAAO,CAAA;EAAA;AAAA;;;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BAAA,GAAiC,MAAA,QACpC,oCAAA;;;cCNI,yBAAA,WAAyB,OAAA;4BAMpC,QAAA,CAAA,OAAA;;;;;;KAEU,mBAAA,GAAsB,MAAA,QAAc,yBAAA;;;cCNnC,gCAAA,WAAgC,OAAA;MAW5C,QAAA,CAAA,OAAA;;;;;;;;;;;;;;;;;;;;;;;;;KAEW,0BAAA,GAA6B,MAAA,QAChC,gCAAA;;;cCfI,uBAAA,WAAuB,OAAA;2BAYlC,QAAA,CAAA,QAAA;;;;;KAEU,iBAAA,GAAoB,MAAA,QAAc,uBAAA;;;cCfjC,0BAAA,WAA0B,OAAA;MAarC,QAAA,CAAA,OAAA;;;;;;;;;;;;;KAEU,oBAAA,GAAuB,MAAA,QAAc,0BAAA;;;;;ATsBjD;;;;;;;;;cUPa,sBAAA,EAAsB,QAAA,CAAA,OAAA,CAcjC,QAAA,CAdiC,MAAA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","names":[],"sources":["../../../src/api/notifications/schemas/notificationPayloadSchema.ts","../../../src/api/notifications/primitives/$notification.ts","../../../src/api/notifications/services/NotificationSenderService.ts","../../../src/api/notifications/jobs/NotificationJobs.ts","../../../src/api/notifications/schemas/notificationResourceSchema.ts","../../../src/api/notifications/schemas/notificationDetailResourceSchema.ts","../../../src/api/notifications/schemas/notificationQuerySchema.ts","../../../src/api/notifications/controllers/AdminNotificationController.ts","../../../src/api/notifications/schemas/notificationContactPreferencesSchema.ts","../../../src/api/notifications/schemas/notificationContactSchema.ts","../../../src/api/notifications/index.ts"],"sourcesContent":["import { type Static, t } from \"alepha\";\n\nexport const notificationPayloadSchema = t.object({\n type: t.enum([\"email\", \"sms\"]),\n template: t.text(),\n contact: t.text(),\n variables: t.optional(t.record(t.text(), t.any())),\n category: t.optional(t.text()),\n critical: t.optional(t.boolean()),\n sensitive: t.optional(t.boolean()),\n});\n\nexport type NotificationPayload = Static<typeof notificationPayloadSchema>;\n","import {\n $inject,\n createPrimitive,\n KIND,\n Primitive,\n type Static,\n type StaticEncode,\n type TObject,\n} from \"alepha\";\nimport { NotificationJobs } from \"../jobs/NotificationJobs.ts\";\n\n/**\n * Creates a notification primitive for managing email/SMS notification templates.\n *\n * Provides type-safe, reusable notification templates with multi-language support,\n * variable substitution, and categorization for different notification channels.\n *\n * @example\n * ```ts\n * class NotificationTemplates {\n * welcomeEmail = $notification({\n * name: \"welcome-email\",\n * category: \"onboarding\",\n * schema: t.object({ username: t.text(), activationLink: t.text() }),\n * email: {\n * subject: \"Welcome to our platform!\",\n * body: (vars) => `Hello ${vars.username}, click: ${vars.activationLink}`\n * }\n * });\n *\n * async sendWelcome(user: User) {\n * await this.welcomeEmail.push({\n * variables: { username: user.name, activationLink: generateLink() },\n * contact: user.email\n * });\n * }\n * }\n * ```\n */\nexport const $notification = <T extends TObject>(\n options: NotificationPrimitiveOptions<T>,\n) => createPrimitive(NotificationPrimitive<T>, options);\n\n// ---------------------------------------------------------------------------------------------------------------------\n\nexport interface NotificationPrimitiveOptions<T extends TObject>\n extends NotificationMessage<T> {\n name?: string;\n description?: string;\n category?: string;\n critical?: boolean;\n sensitive?: boolean;\n translations?: {\n // e.g., \"en\", \"fr\", even \"en-US\"\n [lang: string]: NotificationMessage<T>;\n };\n schema: T;\n}\n\n// ---------------------------------------------------------------------------------------------------------------------\n\nexport class NotificationPrimitive<T extends TObject> extends Primitive<\n NotificationPrimitiveOptions<T>\n> {\n protected readonly notificationJobs = $inject(NotificationJobs);\n\n public get name() {\n return this.options.name ?? `${this.config.propertyKey}`;\n }\n\n public async push(options: NotificationPushOptions<T>) {\n const pushOpts = this.options.critical\n ? ({ priority: \"critical\" } as const)\n : undefined;\n\n if (this.options.email) {\n await this.notificationJobs.sendNotification.push(\n {\n type: \"email\",\n template: this.name,\n contact: options.contact,\n variables: options.variables as Record<string, unknown>,\n category: this.options.category,\n critical: this.options.critical,\n sensitive: this.options.sensitive,\n },\n pushOpts,\n );\n }\n\n if (this.options.sms) {\n await this.notificationJobs.sendNotification.push(\n {\n type: \"sms\",\n template: this.name,\n contact: options.contact,\n variables: options.variables as Record<string, unknown>,\n category: this.options.category,\n critical: this.options.critical,\n sensitive: this.options.sensitive,\n },\n pushOpts,\n );\n }\n }\n\n public configure(options: Partial<NotificationPrimitiveOptions<T>>) {\n Object.assign(this.options, options);\n }\n}\n\n$notification[KIND] = NotificationPrimitive;\n\n// ---------------------------------------------------------------------------------------------------------------------\n\nexport interface NotificationPushOptions<T extends TObject> {\n variables: StaticEncode<T>;\n contact: string;\n}\n\nexport interface NotificationMessage<T extends TObject> {\n email?: {\n subject: string;\n body: string | ((variables: Static<T>) => string);\n };\n sms?: {\n message: string | ((variables: Static<T>) => string);\n };\n}\n","import { $inject, Alepha, AlephaError } from \"alepha\";\nimport { EmailProvider } from \"alepha/email\";\nimport { $logger } from \"alepha/logger\";\nimport { SmsProvider } from \"alepha/sms\";\nimport { $notification } from \"../primitives/$notification.ts\";\nimport type { NotificationPayload } from \"../schemas/notificationPayloadSchema.ts\";\n\nexport class NotificationSenderService {\n protected readonly alepha = $inject(Alepha);\n protected readonly log = $logger();\n protected readonly emailProvider = $inject(EmailProvider);\n protected readonly smsProvider = $inject(SmsProvider);\n\n public async send(payload: NotificationPayload) {\n this.log.debug(\"Processing notification\", {\n type: payload.type,\n template: payload.template,\n contact: payload.contact,\n });\n\n if (payload.type === \"email\") {\n const rendered = this.renderEmail(payload);\n await this.emailProvider.send(rendered);\n this.log.info(\"Email notification sent\", {\n template: payload.template,\n contact: payload.contact,\n });\n return {\n type: \"email\" as const,\n to: rendered.to,\n subject: rendered.subject,\n body: rendered.body,\n };\n }\n\n if (payload.type === \"sms\") {\n const rendered = this.renderSms(payload);\n await this.smsProvider.send(rendered);\n this.log.info(\"SMS notification sent\", {\n template: payload.template,\n contact: payload.contact,\n });\n return {\n type: \"sms\" as const,\n to: rendered.to,\n message: rendered.message,\n };\n }\n }\n\n public renderSms(payload: NotificationPayload) {\n const { variables, contact, template } = this.load(payload);\n\n const sms = template.options.sms;\n if (!sms) {\n throw new AlephaError(\n `Notification template ${payload.template} has no sms defined`,\n );\n }\n\n const message =\n typeof sms.message === \"function\"\n ? sms.message(variables as any)\n : sms.message;\n\n return { to: contact, message };\n }\n\n public renderEmail(payload: NotificationPayload) {\n const { variables, contact, template } = this.load(payload);\n\n const email = template.options.email;\n if (!email) {\n throw new AlephaError(\n `Notification template ${payload.template} has no email defined`,\n );\n }\n\n const subject = email.subject;\n const body =\n typeof email.body === \"function\"\n ? email.body(variables as any)\n : email.body;\n\n return { to: contact, subject, body };\n }\n\n protected load(payload: NotificationPayload) {\n const variables = payload.variables || {};\n const contact = payload.contact;\n const template = this.alepha\n .primitives($notification)\n .find((it) => it.name === payload.template);\n\n if (!template) {\n throw new AlephaError(\n `No notification template found for ${payload.template}`,\n );\n }\n\n return { template, variables, contact };\n }\n}\n","import { $inject } from \"alepha\";\nimport { $job, jobExecutionEntity } from \"alepha/api/jobs\";\nimport { $repository } from \"alepha/orm\";\nimport { notificationPayloadSchema } from \"../schemas/notificationPayloadSchema.ts\";\nimport { NotificationSenderService } from \"../services/NotificationSenderService.ts\";\n\nexport class NotificationJobs {\n protected readonly notificationSenderService = $inject(\n NotificationSenderService,\n );\n protected readonly executions = $repository(jobExecutionEntity);\n\n public readonly sendNotification = $job({\n schema: notificationPayloadSchema,\n retry: {\n retries: 3,\n backoff: {\n initial: [5, \"seconds\"],\n factor: 4,\n max: [10, \"minutes\"],\n jitter: true,\n },\n },\n timeout: [30, \"seconds\"],\n concurrency: 5,\n handler: async ({ items }) => {\n for (const item of items) {\n const rendered = await this.notificationSenderService.send(\n item.payload,\n );\n if (rendered) {\n await this.executions.updateById(item.id, {\n result: rendered as Record<string, unknown>,\n });\n }\n }\n },\n });\n}\n","import { type Static, t } from \"alepha\";\n\nexport const notificationResourceSchema = t.object({\n id: t.uuid(),\n createdAt: t.datetime(),\n status: t.text(),\n template: t.optional(t.text()),\n type: t.optional(t.text()),\n contact: t.optional(t.text()),\n category: t.optional(t.text()),\n critical: t.optional(t.boolean()),\n sensitive: t.optional(t.boolean()),\n startedAt: t.optional(t.datetime()),\n completedAt: t.optional(t.datetime()),\n error: t.optional(t.text()),\n});\n\nexport type NotificationResource = Static<typeof notificationResourceSchema>;\n","import { type Static, t } from \"alepha\";\nimport { logEntrySchema } from \"alepha/logger\";\nimport { notificationResourceSchema } from \"./notificationResourceSchema.ts\";\n\nexport const notificationDetailResourceSchema = t.extend(\n notificationResourceSchema,\n {\n variables: t.optional(t.record(t.text(), t.any())),\n rendered: t.optional(t.record(t.text(), t.any())),\n logs: t.optional(t.array(logEntrySchema)),\n },\n {\n title: \"NotificationDetailResource\",\n description: \"A notification resource with rendered content and logs.\",\n },\n);\n\nexport type NotificationDetailResource = Static<\n typeof notificationDetailResourceSchema\n>;\n","import { type Static, t } from \"alepha\";\nimport { pageQuerySchema } from \"alepha/orm\";\n\nexport const notificationQuerySchema = t.extend(pageQuerySchema, {\n status: t.optional(\n t.enum([\n \"pending\",\n \"scheduled\",\n \"retrying\",\n \"running\",\n \"completed\",\n \"failed\",\n \"dead\",\n \"cancelled\",\n ]),\n ),\n});\n\nexport type NotificationQuery = Static<typeof notificationQuerySchema>;\n","import { $inject, t } from \"alepha\";\nimport { JobService } from \"alepha/api/jobs\";\nimport { $secure } from \"alepha/security\";\nimport { $action } from \"alepha/server\";\nimport { NotificationJobs } from \"../jobs/NotificationJobs.ts\";\nimport { notificationDetailResourceSchema } from \"../schemas/notificationDetailResourceSchema.ts\";\nimport { notificationQuerySchema } from \"../schemas/notificationQuerySchema.ts\";\nimport { notificationResourceSchema } from \"../schemas/notificationResourceSchema.ts\";\n\nexport class AdminNotificationController {\n protected readonly url: string = \"/notifications\";\n protected readonly group: string = \"admin:notifications\";\n protected readonly jobService = $inject(JobService);\n protected readonly notificationJobs = $inject(NotificationJobs);\n\n protected get jobName(): string {\n return this.notificationJobs.sendNotification.name;\n }\n\n public readonly findNotifications = $action({\n path: this.url,\n group: this.group,\n use: [$secure({ permissions: [\"admin:notification:read\"] })],\n schema: {\n query: notificationQuerySchema,\n response: t.page(notificationResourceSchema),\n },\n handler: async ({ query }) => {\n const result = await this.jobService.findExecutions({\n ...query,\n job: this.jobName,\n });\n return {\n ...result,\n content: result.content.map((exec) => this.toResource(exec)),\n } as any;\n },\n });\n\n public readonly getNotification = $action({\n path: `${this.url}/:id`,\n group: this.group,\n use: [$secure({ permissions: [\"admin:notification:read\"] })],\n schema: {\n params: t.object({\n id: t.uuid(),\n }),\n response: notificationDetailResourceSchema,\n },\n handler: async ({ params }) => {\n const detail = await this.jobService.getExecution(params.id);\n return this.toDetailResource(detail) as any;\n },\n });\n\n protected toResource(exec: Record<string, unknown>) {\n const payload = (exec.payload ?? {}) as Record<string, unknown>;\n return {\n id: exec.id,\n createdAt: exec.createdAt,\n status: exec.status,\n template: payload.template,\n type: payload.type,\n contact: payload.contact,\n category: payload.category,\n critical: payload.critical,\n sensitive: payload.sensitive,\n startedAt: exec.startedAt,\n completedAt: exec.completedAt,\n error: exec.error,\n };\n }\n\n protected toDetailResource(exec: Record<string, unknown>) {\n const payload = (exec.payload ?? {}) as Record<string, unknown>;\n return {\n ...this.toResource(exec),\n variables: payload.variables,\n rendered: exec.result,\n logs: exec.logs,\n };\n }\n}\n","import { type Static, t } from \"alepha\";\n\nexport const notificationContactPreferencesSchema = t.object({\n language: t.optional(t.text()),\n exclude: t.array(t.text()),\n});\n\nexport type NotificationContactPreferences = Static<\n typeof notificationContactPreferencesSchema\n>;\n","import { type Static, t } from \"alepha\";\n\nexport const notificationContactSchema = t.object({\n email: t.optional(t.email()),\n phoneNumber: t.optional(t.e164()),\n firstName: t.optional(t.shortText()),\n lastName: t.optional(t.text({ size: \"short\" })),\n language: t.optional(t.bcp47()),\n});\n\nexport type NotificationContact = Static<typeof notificationContactSchema>;\n","import { $module } from \"alepha\";\nimport { AdminNotificationController } from \"./controllers/AdminNotificationController.ts\";\nimport { NotificationJobs } from \"./jobs/NotificationJobs.ts\";\nimport { $notification } from \"./primitives/$notification.ts\";\nimport { NotificationSenderService } from \"./services/NotificationSenderService.ts\";\n\n// ---------------------------------------------------------------------------------------------------------------------\n\nexport * from \"./controllers/AdminNotificationController.ts\";\nexport * from \"./jobs/NotificationJobs.ts\";\nexport * from \"./primitives/$notification.ts\";\nexport * from \"./schemas/notificationContactPreferencesSchema.ts\";\nexport * from \"./schemas/notificationContactSchema.ts\";\nexport * from \"./schemas/notificationDetailResourceSchema.ts\";\nexport * from \"./schemas/notificationPayloadSchema.ts\";\nexport * from \"./schemas/notificationQuerySchema.ts\";\nexport * from \"./schemas/notificationResourceSchema.ts\";\nexport * from \"./services/NotificationSenderService.ts\";\n\n// ---------------------------------------------------------------------------------------------------------------------\n\n/**\n * User notification management.\n *\n * **Features:**\n * - Notification definitions\n * - Email/SMS notification sending\n * - Job-based delivery with retry and tracking\n * - User preferences\n *\n * @module alepha.api.notifications\n */\nexport const AlephaApiNotifications = $module({\n name: \"alepha.api.notifications\",\n primitives: [$notification],\n services: [\n NotificationSenderService,\n NotificationJobs,\n AdminNotificationController,\n ],\n register: (alepha) => {\n alepha\n .with(NotificationSenderService)\n .with(NotificationJobs)\n .with(AdminNotificationController);\n },\n});\n"],"mappings":";;;;;;;;;AAEA,MAAa,4BAA4B,EAAE,OAAO;CAChD,MAAM,EAAE,KAAK,CAAC,SAAS,MAAM,CAAC;CAC9B,UAAU,EAAE,MAAM;CAClB,SAAS,EAAE,MAAM;CACjB,WAAW,EAAE,SAAS,EAAE,OAAO,EAAE,MAAM,EAAE,EAAE,KAAK,CAAC,CAAC;CAClD,UAAU,EAAE,SAAS,EAAE,MAAM,CAAC;CAC9B,UAAU,EAAE,SAAS,EAAE,SAAS,CAAC;CACjC,WAAW,EAAE,SAAS,EAAE,SAAS,CAAC;CACnC,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AC6BF,MAAa,iBACX,YACG,gBAAgB,uBAA0B,QAAQ;AAoBvD,IAAa,wBAAb,cAA8D,UAE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U,QAAQ;GAClB,UAAU,QAAQ;GAClB,WAAW,QAAQ;GACnB,WAAW,KAAK;GAChB,aAAa,KAAK;GAClB,OAAO,KAAK;GACb;;CAGH,iBAA2B,MAA+B;EACxD,MAAM,UAAW,KAAK,WAAW,EAAE;AACnC,SAAO;GACL,GAAG,KAAK,WAAW,KAAK;GACxB,WAAW,QAAQ;GACnB,UAAU,KAAK;GACf,MAAM,KAAK;GACZ;;;;;AC9EL,MAAa,uCAAuC,EAAE,OAAO;CAC3D,UAAU,EAAE,SAAS,EAAE,MAAM,CAAC;CAC9B,SAAS,EAAE,MAAM,EAAE,MAAM,CAAC;CAC3B,CAAC;;;ACHF,MAAa,4BAA4B,EAAE,OAAO;CAChD,OAAO,EAAE,SAAS,EAAE,OAAO,CAAC;CAC5B,aAAa,EAAE,SAAS,EAAE,MAAM,CAAC;CACjC,WAAW,EAAE,SAAS,EAAE,WAAW,CAAC;CACpC,UAAU,EAAE,SAAS,EAAE,KAAK,EAAE,MAAM,SAAS,CAAC,CAAC;CAC/C,UAAU,EAAE,SAAS,EAAE,OAAO,CAAC;CAChC,CAAC;;;;;;;;;;;;;;ACwBF,MAAa,yBAAyB,QAAQ;CAC5C,MAAM;CACN,YAAY,CAAC,cAAc;CAC3B,UAAU;EACR;EACA;EACA;EACD;CACD,WAAW,WAAW;AACpB,SACG,KAAK,0BAA0B,CAC/B,KAAK,iBAAiB,CACtB,KAAK,4BAA4B;;CAEvC,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.js","names":[],"sources":["../../../src/api/notifications/schemas/notificationPayloadSchema.ts","../../../src/api/notifications/primitives/$notification.ts","../../../src/api/notifications/services/NotificationSenderService.ts","../../../src/api/notifications/jobs/NotificationJobs.ts","../../../src/api/notifications/schemas/notificationResourceSchema.ts","../../../src/api/notifications/schemas/notificationDetailResourceSchema.ts","../../../src/api/notifications/schemas/notificationQuerySchema.ts","../../../src/api/notifications/controllers/AdminNotificationController.ts","../../../src/api/notifications/schemas/notificationContactPreferencesSchema.ts","../../../src/api/notifications/schemas/notificationContactSchema.ts","../../../src/api/notifications/index.ts"],"sourcesContent":["import { type Static, t } from \"alepha\";\n\nexport const notificationPayloadSchema = t.object({\n type: t.enum([\"email\", \"sms\"]),\n template: t.text(),\n contact: t.text(),\n variables: t.optional(t.record(t.text(), t.any())),\n category: t.optional(t.text()),\n critical: t.optional(t.boolean()),\n sensitive: t.optional(t.boolean()),\n});\n\nexport type NotificationPayload = Static<typeof notificationPayloadSchema>;\n","import {\n $inject,\n createPrimitive,\n KIND,\n Primitive,\n type Static,\n type StaticEncode,\n type TObject,\n} from \"alepha\";\nimport { NotificationJobs } from \"../jobs/NotificationJobs.ts\";\n\n/**\n * Creates a notification primitive for managing email/SMS notification templates.\n *\n * Provides type-safe, reusable notification templates with multi-language support,\n * variable substitution, and categorization for different notification channels.\n *\n * @example\n * ```ts\n * class NotificationTemplates {\n * welcomeEmail = $notification({\n * name: \"welcome-email\",\n * category: \"onboarding\",\n * schema: t.object({ username: t.text(), activationLink: t.text() }),\n * email: {\n * subject: \"Welcome to our platform!\",\n * body: (vars) => `Hello ${vars.username}, click: ${vars.activationLink}`\n * }\n * });\n *\n * async sendWelcome(user: User) {\n * await this.welcomeEmail.push({\n * variables: { username: user.name, activationLink: generateLink() },\n * contact: user.email\n * });\n * }\n * }\n * ```\n */\nexport const $notification = <T extends TObject>(\n options: NotificationPrimitiveOptions<T>,\n) => createPrimitive(NotificationPrimitive<T>, options);\n\n// ---------------------------------------------------------------------------------------------------------------------\n\nexport interface NotificationPrimitiveOptions<T extends TObject>\n extends NotificationMessage<T> {\n name?: string;\n description?: string;\n category?: string;\n critical?: boolean;\n sensitive?: boolean;\n translations?: {\n // e.g., \"en\", \"fr\", even \"en-US\"\n [lang: string]: NotificationMessage<T>;\n };\n schema: T;\n}\n\n// ---------------------------------------------------------------------------------------------------------------------\n\nexport class NotificationPrimitive<T extends TObject> extends Primitive<\n NotificationPrimitiveOptions<T>\n> {\n protected readonly notificationJobs = $inject(NotificationJobs);\n\n public get name() {\n return this.options.name ?? `${this.config.propertyKey}`;\n }\n\n public async push(options: NotificationPushOptions<T>) {\n const pushOpts = this.options.critical\n ? ({ priority: \"critical\" } as const)\n : undefined;\n\n if (this.options.email) {\n await this.notificationJobs.sendNotification.push(\n {\n type: \"email\",\n template: this.name,\n contact: options.contact,\n variables: options.variables as Record<string, unknown>,\n category: this.options.category,\n critical: this.options.critical,\n sensitive: this.options.sensitive,\n },\n pushOpts,\n );\n }\n\n if (this.options.sms) {\n await this.notificationJobs.sendNotification.push(\n {\n type: \"sms\",\n template: this.name,\n contact: options.contact,\n variables: options.variables as Record<string, unknown>,\n category: this.options.category,\n critical: this.options.critical,\n sensitive: this.options.sensitive,\n },\n pushOpts,\n );\n }\n }\n\n public configure(options: Partial<NotificationPrimitiveOptions<T>>) {\n Object.assign(this.options, options);\n }\n}\n\n$notification[KIND] = NotificationPrimitive;\n\n// ---------------------------------------------------------------------------------------------------------------------\n\nexport interface NotificationPushOptions<T extends TObject> {\n variables: StaticEncode<T>;\n contact: string;\n}\n\nexport interface NotificationMessage<T extends TObject> {\n email?: {\n subject: string;\n body: string | ((variables: Static<T>) => string);\n };\n sms?: {\n message: string | ((variables: Static<T>) => string);\n };\n}\n","import { $inject, Alepha, AlephaError } from \"alepha\";\nimport { EmailProvider } from \"alepha/email\";\nimport { $logger } from \"alepha/logger\";\nimport { SmsProvider } from \"alepha/sms\";\nimport { $notification } from \"../primitives/$notification.ts\";\nimport type { NotificationPayload } from \"../schemas/notificationPayloadSchema.ts\";\n\nexport class NotificationSenderService {\n protected readonly alepha = $inject(Alepha);\n protected readonly log = $logger();\n protected readonly emailProvider = $inject(EmailProvider);\n protected readonly smsProvider = $inject(SmsProvider);\n\n public async send(payload: NotificationPayload) {\n this.log.debug(\"Processing notification\", {\n type: payload.type,\n template: payload.template,\n contact: payload.contact,\n });\n\n if (payload.type === \"email\") {\n const rendered = this.renderEmail(payload);\n await this.emailProvider.send(rendered);\n this.log.info(\"Email notification sent\", {\n template: payload.template,\n contact: payload.contact,\n });\n return {\n type: \"email\" as const,\n to: rendered.to,\n subject: rendered.subject,\n body: rendered.body,\n };\n }\n\n if (payload.type === \"sms\") {\n const rendered = this.renderSms(payload);\n await this.smsProvider.send(rendered);\n this.log.info(\"SMS notification sent\", {\n template: payload.template,\n contact: payload.contact,\n });\n return {\n type: \"sms\" as const,\n to: rendered.to,\n message: rendered.message,\n };\n }\n }\n\n public renderSms(payload: NotificationPayload) {\n const { variables, contact, template } = this.load(payload);\n\n const sms = template.options.sms;\n if (!sms) {\n throw new AlephaError(\n `Notification template ${payload.template} has no sms defined`,\n );\n }\n\n const message =\n typeof sms.message === \"function\"\n ? sms.message(variables as any)\n : sms.message;\n\n return { to: contact, message };\n }\n\n public renderEmail(payload: NotificationPayload) {\n const { variables, contact, template } = this.load(payload);\n\n const email = template.options.email;\n if (!email) {\n throw new AlephaError(\n `Notification template ${payload.template} has no email defined`,\n );\n }\n\n const subject = email.subject;\n const body =\n typeof email.body === \"function\"\n ? email.body(variables as any)\n : email.body;\n\n return { to: contact, subject, body };\n }\n\n protected load(payload: NotificationPayload) {\n const variables = payload.variables || {};\n const contact = payload.contact;\n const template = this.alepha\n .primitives($notification)\n .find((it) => it.name === payload.template);\n\n if (!template) {\n throw new AlephaError(\n `No notification template found for ${payload.template}`,\n );\n }\n\n return { template, variables, contact };\n }\n}\n","import { $inject } from \"alepha\";\nimport { $job, jobExecutionEntity } from \"alepha/api/jobs\";\nimport { $repository } from \"alepha/orm\";\nimport { notificationPayloadSchema } from \"../schemas/notificationPayloadSchema.ts\";\nimport { NotificationSenderService } from \"../services/NotificationSenderService.ts\";\n\nexport class NotificationJobs {\n protected readonly notificationSenderService = $inject(\n NotificationSenderService,\n );\n protected readonly executions = $repository(jobExecutionEntity);\n\n public readonly sendNotification = $job({\n schema: notificationPayloadSchema,\n retry: {\n retries: 3,\n backoff: {\n initial: [5, \"seconds\"],\n factor: 4,\n max: [10, \"minutes\"],\n jitter: true,\n },\n },\n timeout: [30, \"seconds\"],\n concurrency: 5,\n handler: async ({ items }) => {\n for (const item of items) {\n const rendered = await this.notificationSenderService.send(\n item.payload,\n );\n if (rendered) {\n await this.executions.updateById(item.id, {\n result: rendered as Record<string, unknown>,\n });\n }\n }\n },\n });\n}\n","import { type Static, t } from \"alepha\";\n\nexport const notificationResourceSchema = t.object({\n id: t.uuid(),\n createdAt: t.datetime(),\n status: t.text(),\n template: t.optional(t.text()),\n type: t.optional(t.text()),\n contact: t.optional(t.text()),\n category: t.optional(t.text()),\n critical: t.optional(t.boolean()),\n sensitive: t.optional(t.boolean()),\n startedAt: t.optional(t.datetime()),\n completedAt: t.optional(t.datetime()),\n error: t.optional(t.text()),\n});\n\nexport type NotificationResource = Static<typeof notificationResourceSchema>;\n","import { type Static, t } from \"alepha\";\nimport { logEntrySchema } from \"alepha/logger\";\nimport { notificationResourceSchema } from \"./notificationResourceSchema.ts\";\n\nexport const notificationDetailResourceSchema = t.extend(\n notificationResourceSchema,\n {\n variables: t.optional(t.record(t.text(), t.any())),\n rendered: t.optional(t.record(t.text(), t.any())),\n logs: t.optional(t.array(logEntrySchema)),\n },\n {\n title: \"NotificationDetailResource\",\n description: \"A notification resource with rendered content and logs.\",\n },\n);\n\nexport type NotificationDetailResource = Static<\n typeof notificationDetailResourceSchema\n>;\n","import { type Static, t } from \"alepha\";\nimport { pageQuerySchema } from \"alepha/orm\";\n\nexport const notificationQuerySchema = t.extend(pageQuerySchema, {\n status: t.optional(\n t.enum([\n \"pending\",\n \"scheduled\",\n \"retrying\",\n \"running\",\n \"completed\",\n \"dead\",\n \"cancelled\",\n ]),\n ),\n});\n\nexport type NotificationQuery = Static<typeof notificationQuerySchema>;\n","import { $inject, t } from \"alepha\";\nimport { JobService } from \"alepha/api/jobs\";\nimport { $secure } from \"alepha/security\";\nimport { $action } from \"alepha/server\";\nimport { NotificationJobs } from \"../jobs/NotificationJobs.ts\";\nimport { notificationDetailResourceSchema } from \"../schemas/notificationDetailResourceSchema.ts\";\nimport { notificationQuerySchema } from \"../schemas/notificationQuerySchema.ts\";\nimport { notificationResourceSchema } from \"../schemas/notificationResourceSchema.ts\";\n\nexport class AdminNotificationController {\n protected readonly url: string = \"/notifications\";\n protected readonly group: string = \"admin:notifications\";\n protected readonly jobService = $inject(JobService);\n protected readonly notificationJobs = $inject(NotificationJobs);\n\n protected get jobName(): string {\n return this.notificationJobs.sendNotification.name;\n }\n\n public readonly findNotifications = $action({\n path: this.url,\n group: this.group,\n use: [$secure({ permissions: [\"admin:notification:read\"] })],\n schema: {\n query: notificationQuerySchema,\n response: t.page(notificationResourceSchema),\n },\n handler: async ({ query }) => {\n const result = await this.jobService.findExecutions({\n ...query,\n job: this.jobName,\n });\n return {\n ...result,\n content: result.content.map((exec) => this.toResource(exec)),\n } as any;\n },\n });\n\n public readonly getNotification = $action({\n path: `${this.url}/:id`,\n group: this.group,\n use: [$secure({ permissions: [\"admin:notification:read\"] })],\n schema: {\n params: t.object({\n id: t.uuid(),\n }),\n response: notificationDetailResourceSchema,\n },\n handler: async ({ params }) => {\n const detail = await this.jobService.getExecution(params.id);\n return this.toDetailResource(detail) as any;\n },\n });\n\n protected toResource(exec: Record<string, unknown>) {\n const payload = (exec.payload ?? {}) as Record<string, unknown>;\n return {\n id: exec.id,\n createdAt: exec.createdAt,\n status: exec.status,\n template: payload.template,\n type: payload.type,\n contact: payload.contact,\n category: payload.category,\n critical: payload.critical,\n sensitive: payload.sensitive,\n startedAt: exec.startedAt,\n completedAt: exec.completedAt,\n error: exec.error,\n };\n }\n\n protected toDetailResource(exec: Record<string, unknown>) {\n const payload = (exec.payload ?? {}) as Record<string, unknown>;\n return {\n ...this.toResource(exec),\n variables: payload.variables,\n rendered: exec.result,\n logs: exec.logs,\n };\n }\n}\n","import { type Static, t } from \"alepha\";\n\nexport const notificationContactPreferencesSchema = t.object({\n language: t.optional(t.text()),\n exclude: t.array(t.text()),\n});\n\nexport type NotificationContactPreferences = Static<\n typeof notificationContactPreferencesSchema\n>;\n","import { type Static, t } from \"alepha\";\n\nexport const notificationContactSchema = t.object({\n email: t.optional(t.email()),\n phoneNumber: t.optional(t.e164()),\n firstName: t.optional(t.shortText()),\n lastName: t.optional(t.text({ size: \"short\" })),\n language: t.optional(t.bcp47()),\n});\n\nexport type NotificationContact = Static<typeof notificationContactSchema>;\n","import { $module } from \"alepha\";\nimport { AdminNotificationController } from \"./controllers/AdminNotificationController.ts\";\nimport { NotificationJobs } from \"./jobs/NotificationJobs.ts\";\nimport { $notification } from \"./primitives/$notification.ts\";\nimport { NotificationSenderService } from \"./services/NotificationSenderService.ts\";\n\n// ---------------------------------------------------------------------------------------------------------------------\n\nexport * from \"./controllers/AdminNotificationController.ts\";\nexport * from \"./jobs/NotificationJobs.ts\";\nexport * from \"./primitives/$notification.ts\";\nexport * from \"./schemas/notificationContactPreferencesSchema.ts\";\nexport * from \"./schemas/notificationContactSchema.ts\";\nexport * from \"./schemas/notificationDetailResourceSchema.ts\";\nexport * from \"./schemas/notificationPayloadSchema.ts\";\nexport * from \"./schemas/notificationQuerySchema.ts\";\nexport * from \"./schemas/notificationResourceSchema.ts\";\nexport * from \"./services/NotificationSenderService.ts\";\n\n// ---------------------------------------------------------------------------------------------------------------------\n\n/**\n * User notification management.\n *\n * **Features:**\n * - Notification definitions\n * - Email/SMS notification sending\n * - Job-based delivery with retry and tracking\n * - User preferences\n *\n * @module alepha.api.notifications\n */\nexport const AlephaApiNotifications = $module({\n name: \"alepha.api.notifications\",\n primitives: [$notification],\n services: [\n NotificationSenderService,\n NotificationJobs,\n AdminNotificationController,\n ],\n register: (alepha) => {\n alepha\n .with(NotificationSenderService)\n .with(NotificationJobs)\n .with(AdminNotificationController);\n },\n});\n"],"mappings":";;;;;;;;;AAEA,MAAa,4BAA4B,EAAE,OAAO;CAChD,MAAM,EAAE,KAAK,CAAC,SAAS,MAAM,CAAC;CAC9B,UAAU,EAAE,MAAM;CAClB,SAAS,EAAE,MAAM;CACjB,WAAW,EAAE,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,123 @@ const parameters = $entity({
|
|
|
38
38
|
]
|
|
39
39
|
});
|
|
40
40
|
//#endregion
|
|
41
|
+
//#region ../../src/api/parameters/schemas/activateParameterBodySchema.ts
|
|
42
|
+
/**
|
|
43
|
+
* Activate parameter body schema.
|
|
44
|
+
* Uses t.pick for version and creator fields.
|
|
45
|
+
*/
|
|
46
|
+
const activateParameterBodySchema = t.pick(parameters.schema, [
|
|
47
|
+
"version",
|
|
48
|
+
"creatorId",
|
|
49
|
+
"creatorName"
|
|
50
|
+
]);
|
|
51
|
+
//#endregion
|
|
52
|
+
//#region ../../src/api/parameters/schemas/createParameterVersionBodySchema.ts
|
|
53
|
+
/**
|
|
54
|
+
* Create parameter version body schema.
|
|
55
|
+
* Uses t.pick to derive from entity, with required fields made non-optional.
|
|
56
|
+
*/
|
|
57
|
+
const createParameterVersionBodySchema = t.extend(t.pick(parameters.schema, [
|
|
58
|
+
"content",
|
|
59
|
+
"schemaHash",
|
|
60
|
+
"changeDescription",
|
|
61
|
+
"tags",
|
|
62
|
+
"creatorId",
|
|
63
|
+
"creatorName"
|
|
64
|
+
]), { activationDate: t.optional(t.datetime({ description: "When to activate (default: now)" })) });
|
|
65
|
+
//#endregion
|
|
66
|
+
//#region ../../src/api/parameters/schemas/parameterStatusSchema.ts
|
|
67
|
+
/**
|
|
68
|
+
* Parameter status enum schema.
|
|
69
|
+
*/
|
|
70
|
+
const parameterStatusSchema = t.enum([
|
|
71
|
+
"expired",
|
|
72
|
+
"current",
|
|
73
|
+
"next",
|
|
74
|
+
"future"
|
|
75
|
+
]);
|
|
76
|
+
//#endregion
|
|
77
|
+
//#region ../../src/api/parameters/schemas/parameterResponseSchema.ts
|
|
78
|
+
/**
|
|
79
|
+
* Parameter response schema for API responses.
|
|
80
|
+
* Extends the entity schema with a calculated status field.
|
|
81
|
+
* Status is derived from activationDate at query time, not stored.
|
|
82
|
+
*/
|
|
83
|
+
const parameterResponseSchema = t.extend(parameters.schema, { status: parameterStatusSchema });
|
|
84
|
+
//#endregion
|
|
85
|
+
//#region ../../src/api/parameters/schemas/parameterCurrentResponseSchema.ts
|
|
86
|
+
/**
|
|
87
|
+
* Current parameter response schema.
|
|
88
|
+
* Includes current version, next scheduled version, and defaults.
|
|
89
|
+
*/
|
|
90
|
+
const parameterCurrentResponseSchema = t.object({
|
|
91
|
+
current: t.optional(parameterResponseSchema),
|
|
92
|
+
next: t.optional(parameterResponseSchema),
|
|
93
|
+
defaultValue: t.optional(t.json()),
|
|
94
|
+
currentValue: t.optional(t.json()),
|
|
95
|
+
schema: t.optional(t.json())
|
|
96
|
+
});
|
|
97
|
+
//#endregion
|
|
98
|
+
//#region ../../src/api/parameters/schemas/parameterHistoryResponseSchema.ts
|
|
99
|
+
/**
|
|
100
|
+
* Parameter history response schema.
|
|
101
|
+
*/
|
|
102
|
+
const parameterHistoryResponseSchema = t.object({ versions: t.array(parameterResponseSchema) });
|
|
103
|
+
//#endregion
|
|
104
|
+
//#region ../../src/api/parameters/schemas/parameterNameParamSchema.ts
|
|
105
|
+
/**
|
|
106
|
+
* Parameter name param schema.
|
|
107
|
+
* Uses t.pick from entity for consistency.
|
|
108
|
+
*/
|
|
109
|
+
const parameterNameParamSchema = t.pick(parameters.schema, ["name"]);
|
|
110
|
+
//#endregion
|
|
111
|
+
//#region ../../src/api/parameters/schemas/parameterNamesResponseSchema.ts
|
|
112
|
+
/**
|
|
113
|
+
* Parameter names list response schema.
|
|
114
|
+
*/
|
|
115
|
+
const parameterNamesResponseSchema = t.object({ names: t.array(t.text()) });
|
|
116
|
+
//#endregion
|
|
117
|
+
//#region ../../src/api/parameters/schemas/parameterTreeNodeSchema.ts
|
|
118
|
+
/**
|
|
119
|
+
* Tree node schema for parameter tree navigation.
|
|
120
|
+
*/
|
|
121
|
+
const parameterTreeNodeSchema = t.object({
|
|
122
|
+
name: t.text(),
|
|
123
|
+
path: t.text(),
|
|
124
|
+
isLeaf: t.boolean(),
|
|
125
|
+
children: t.array(t.any())
|
|
126
|
+
});
|
|
127
|
+
//#endregion
|
|
128
|
+
//#region ../../src/api/parameters/schemas/parameterVersionParamSchema.ts
|
|
129
|
+
/**
|
|
130
|
+
* Parameter name and version param schema.
|
|
131
|
+
* Uses t.pick from entity for consistency.
|
|
132
|
+
*/
|
|
133
|
+
const parameterVersionParamSchema = t.pick(parameters.schema, ["name", "version"]);
|
|
134
|
+
//#endregion
|
|
135
|
+
//#region ../../src/api/parameters/schemas/parameterVersionResponseSchema.ts
|
|
136
|
+
/**
|
|
137
|
+
* Parameter version response schema.
|
|
138
|
+
*/
|
|
139
|
+
const parameterVersionResponseSchema = t.object({ parameter: t.optional(parameterResponseSchema) });
|
|
140
|
+
//#endregion
|
|
141
|
+
//#region ../../src/api/parameters/schemas/rollbackParameterBodySchema.ts
|
|
142
|
+
/**
|
|
143
|
+
* Rollback parameter body schema.
|
|
144
|
+
* Uses t.pick for creator fields, adds targetVersion.
|
|
145
|
+
*/
|
|
146
|
+
const rollbackParameterBodySchema = t.extend(t.pick(parameters.schema, [
|
|
147
|
+
"changeDescription",
|
|
148
|
+
"creatorId",
|
|
149
|
+
"creatorName"
|
|
150
|
+
]), { targetVersion: t.integer({ description: "Version number to rollback to" }) });
|
|
151
|
+
//#endregion
|
|
41
152
|
//#region ../../src/api/parameters/index.browser.ts
|
|
42
153
|
const AlephaApiParameters = $module({
|
|
43
154
|
name: "alepha.api.parameters",
|
|
44
155
|
services: []
|
|
45
156
|
});
|
|
46
157
|
//#endregion
|
|
47
|
-
export { AlephaApiParameters, parameters };
|
|
158
|
+
export { AlephaApiParameters, activateParameterBodySchema, createParameterVersionBodySchema, parameterCurrentResponseSchema, parameterHistoryResponseSchema, parameterNameParamSchema, parameterNamesResponseSchema, parameterResponseSchema, parameterStatusSchema, parameterTreeNodeSchema, parameterVersionParamSchema, parameterVersionResponseSchema, parameters, rollbackParameterBodySchema };
|
|
48
159
|
|
|
49
160
|
//# sourceMappingURL=index.browser.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.browser.js","names":[],"sources":["../../../src/api/parameters/entities/parameters.ts","../../../src/api/parameters/index.browser.ts"],"sourcesContent":["import { type Static, t } from \"alepha\";\nimport { $entity, db } from \"alepha/orm\";\n\n/**\n * Configuration parameter entity for versioned configuration management.\n *\n * Stores all versions of configuration parameters with:\n * - Status derived from activationDate at query time\n * - Schema versioning for migrations\n * - Activation scheduling\n * - Audit trail (creator info)\n */\nexport const parameters = $entity({\n name: \"parameters\",\n schema: t.object({\n id: db.primaryKey(t.uuid()),\n createdAt: db.createdAt(),\n updatedAt: db.updatedAt(),\n\n /**\n * Configuration name using dot notation for tree hierarchy.\n * Examples: \"app.features\", \"app.pricing.tiers\", \"system.limits\"\n */\n name: t.text(),\n\n /**\n * The configuration content as JSON.\n */\n content: t.json(),\n\n /**\n * Schema version hash for detecting schema changes.\n * Used for auto-migration when schema evolves.\n */\n schemaHash: t.text(),\n\n /**\n * When this version should become active.\n * Default is immediate (now).\n */\n activationDate: t.datetime(),\n\n /**\n * Version number for this configuration.\n * Auto-incremented per config name.\n */\n version: t.integer(),\n\n /**\n * Optional description of changes in this version.\n */\n changeDescription: t.optional(t.text()),\n\n /**\n * Optional tags for filtering/categorization.\n */\n tags: t.optional(t.array(t.text())),\n\n /**\n * Creator user ID (if available).\n */\n creatorId: t.optional(t.uuid()),\n\n /**\n * Creator display name for audit trail.\n */\n creatorName: t.optional(t.text()),\n\n /**\n * Previous content before this change (for rollback reference).\n */\n previousContent: t.optional(t.json()),\n\n /**\n * Migration log if schema changed.\n */\n migrationLog: t.optional(t.text()),\n }),\n indexes: [\n { columns: [\"name\", \"activationDate\"] },\n { columns: [\"name\", \"version\"], unique: true },\n { columns: [\"activationDate\"] },\n ],\n});\n\nexport type Parameter = Static<typeof parameters.schema>;\n","import { $module } from \"alepha\";\n\n// ---------------------------------------------------------------------------------------------------------------------\n\nexport * from \"./entities/parameters.ts\";\n\n// ---------------------------------------------------------------------------------------------------------------------\n\nexport const AlephaApiParameters = $module({\n name: \"alepha.api.parameters\",\n services: [],\n});\n"],"mappings":";;;;;;;;;;;;AAYA,MAAa,aAAa,QAAQ;CAChC,MAAM;CACN,QAAQ,EAAE,OAAO;EACf,IAAI,GAAG,WAAW,EAAE,MAAM,CAAC;EAC3B,WAAW,GAAG,WAAW;EACzB,WAAW,GAAG,WAAW;EAMzB,MAAM,EAAE,MAAM;EAKd,SAAS,EAAE,MAAM;EAMjB,YAAY,EAAE,MAAM;EAMpB,gBAAgB,EAAE,UAAU;EAM5B,SAAS,EAAE,SAAS;EAKpB,mBAAmB,EAAE,SAAS,EAAE,MAAM,CAAC;EAKvC,MAAM,EAAE,SAAS,EAAE,MAAM,EAAE,MAAM,CAAC,CAAC;EAKnC,WAAW,EAAE,SAAS,EAAE,MAAM,CAAC;EAK/B,aAAa,EAAE,SAAS,EAAE,MAAM,CAAC;EAKjC,iBAAiB,EAAE,SAAS,EAAE,MAAM,CAAC;EAKrC,cAAc,EAAE,SAAS,EAAE,MAAM,CAAC;EACnC,CAAC;CACF,SAAS;EACP,EAAE,SAAS,CAAC,QAAQ,iBAAiB,EAAE;EACvC;GAAE,SAAS,CAAC,QAAQ,UAAU;GAAE,QAAQ;GAAM;EAC9C,EAAE,SAAS,CAAC,iBAAiB,EAAE;EAChC;CACF,CAAC;;;AC3EF,MAAa,sBAAsB,QAAQ;CACzC,MAAM;CACN,UAAU,EAAE;CACb,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.browser.js","names":[],"sources":["../../../src/api/parameters/entities/parameters.ts","../../../src/api/parameters/schemas/activateParameterBodySchema.ts","../../../src/api/parameters/schemas/createParameterVersionBodySchema.ts","../../../src/api/parameters/schemas/parameterStatusSchema.ts","../../../src/api/parameters/schemas/parameterResponseSchema.ts","../../../src/api/parameters/schemas/parameterCurrentResponseSchema.ts","../../../src/api/parameters/schemas/parameterHistoryResponseSchema.ts","../../../src/api/parameters/schemas/parameterNameParamSchema.ts","../../../src/api/parameters/schemas/parameterNamesResponseSchema.ts","../../../src/api/parameters/schemas/parameterTreeNodeSchema.ts","../../../src/api/parameters/schemas/parameterVersionParamSchema.ts","../../../src/api/parameters/schemas/parameterVersionResponseSchema.ts","../../../src/api/parameters/schemas/rollbackParameterBodySchema.ts","../../../src/api/parameters/index.browser.ts"],"sourcesContent":["import { type Static, t } from \"alepha\";\nimport { $entity, db } from \"alepha/orm\";\n\n/**\n * Configuration parameter entity for versioned configuration management.\n *\n * Stores all versions of configuration parameters with:\n * - Status derived from activationDate at query time\n * - Schema versioning for migrations\n * - Activation scheduling\n * - Audit trail (creator info)\n */\nexport const parameters = $entity({\n name: \"parameters\",\n schema: t.object({\n id: db.primaryKey(t.uuid()),\n createdAt: db.createdAt(),\n updatedAt: db.updatedAt(),\n\n /**\n * Configuration name using dot notation for tree hierarchy.\n * Examples: \"app.features\", \"app.pricing.tiers\", \"system.limits\"\n */\n name: t.text(),\n\n /**\n * The configuration content as JSON.\n */\n content: t.json(),\n\n /**\n * Schema version hash for detecting schema changes.\n * Used for auto-migration when schema evolves.\n */\n schemaHash: t.text(),\n\n /**\n * When this version should become active.\n * Default is immediate (now).\n */\n activationDate: t.datetime(),\n\n /**\n * Version number for this configuration.\n * Auto-incremented per config name.\n */\n version: t.integer(),\n\n /**\n * Optional description of changes in this version.\n */\n changeDescription: t.optional(t.text()),\n\n /**\n * Optional tags for filtering/categorization.\n */\n tags: t.optional(t.array(t.text())),\n\n /**\n * Creator user ID (if available).\n */\n creatorId: t.optional(t.uuid()),\n\n /**\n * Creator display name for audit trail.\n */\n creatorName: t.optional(t.text()),\n\n /**\n * Previous content before this change (for rollback reference).\n */\n previousContent: t.optional(t.json()),\n\n /**\n * Migration log if schema changed.\n */\n migrationLog: t.optional(t.text()),\n }),\n indexes: [\n { columns: [\"name\", \"activationDate\"] },\n { columns: [\"name\", \"version\"], unique: true },\n { columns: [\"activationDate\"] },\n ],\n});\n\nexport type Parameter = Static<typeof parameters.schema>;\n","import { type Static, t } from \"alepha\";\nimport { parameters } from \"../entities/parameters.ts\";\n\n/**\n * Activate parameter body schema.\n * Uses t.pick for version and creator fields.\n */\nexport const activateParameterBodySchema = t.pick(parameters.schema, [\n \"version\",\n \"creatorId\",\n \"creatorName\",\n]);\n\nexport type ActivateParameterBody = Static<typeof activateParameterBodySchema>;\n","import { type Static, t } from \"alepha\";\nimport { parameters } from \"../entities/parameters.ts\";\n\n/**\n * Create parameter version body schema.\n * Uses t.pick to derive from entity, with required fields made non-optional.\n */\nexport const createParameterVersionBodySchema = t.extend(\n t.pick(parameters.schema, [\n \"content\",\n \"schemaHash\",\n \"changeDescription\",\n \"tags\",\n \"creatorId\",\n \"creatorName\",\n ]),\n {\n activationDate: t.optional(\n t.datetime({ description: \"When to activate (default: now)\" }),\n ),\n },\n);\n\nexport type CreateParameterVersionBody = Static<\n typeof createParameterVersionBodySchema\n>;\n","import { type Static, t } from \"alepha\";\n\n/**\n * Parameter status enum schema.\n */\nexport const parameterStatusSchema = t.enum([\n \"expired\",\n \"current\",\n \"next\",\n \"future\",\n]);\n\nexport type ParameterStatus = Static<typeof parameterStatusSchema>;\n","import { type Static, t } from \"alepha\";\nimport { parameters } from \"../entities/parameters.ts\";\nimport { parameterStatusSchema } from \"./parameterStatusSchema.ts\";\n\n/**\n * Parameter response schema for API responses.\n * Extends the entity schema with a calculated status field.\n * Status is derived from activationDate at query time, not stored.\n */\nexport const parameterResponseSchema = t.extend(parameters.schema, {\n status: parameterStatusSchema,\n});\n\nexport type ParameterResponse = Static<typeof parameterResponseSchema>;\n","import { type Static, t } from \"alepha\";\nimport { parameterResponseSchema } from \"./parameterResponseSchema.ts\";\n\n/**\n * Current parameter response schema.\n * Includes current version, next scheduled version, and defaults.\n */\nexport const parameterCurrentResponseSchema = t.object({\n current: t.optional(parameterResponseSchema),\n next: t.optional(parameterResponseSchema),\n defaultValue: t.optional(t.json()),\n currentValue: t.optional(t.json()),\n schema: t.optional(t.json()),\n});\n\nexport type ParameterCurrentResponse = Static<\n typeof parameterCurrentResponseSchema\n>;\n","import { type Static, t } from \"alepha\";\nimport { parameterResponseSchema } from \"./parameterResponseSchema.ts\";\n\n/**\n * Parameter history response schema.\n */\nexport const parameterHistoryResponseSchema = t.object({\n versions: t.array(parameterResponseSchema),\n});\n\nexport type ParameterHistoryResponse = Static<\n typeof parameterHistoryResponseSchema\n>;\n","import { t } from \"alepha\";\nimport { parameters } from \"../entities/parameters.ts\";\n\n/**\n * Parameter name param schema.\n * Uses t.pick from entity for consistency.\n */\nexport const parameterNameParamSchema = t.pick(parameters.schema, [\"name\"]);\n","import { type Static, t } from \"alepha\";\n\n/**\n * Parameter names list response schema.\n */\nexport const parameterNamesResponseSchema = t.object({\n names: t.array(t.text()),\n});\n\nexport type ParameterNamesResponse = Static<\n typeof parameterNamesResponseSchema\n>;\n","import { type Static, t } from \"alepha\";\n\n/**\n * Tree node schema for parameter tree navigation.\n */\nexport const parameterTreeNodeSchema = t.object({\n name: t.text(),\n path: t.text(),\n isLeaf: t.boolean(),\n children: t.array(t.any()),\n});\n\nexport type ParameterTreeNode = Static<typeof parameterTreeNodeSchema>;\n","import { t } from \"alepha\";\nimport { parameters } from \"../entities/parameters.ts\";\n\n/**\n * Parameter name and version param schema.\n * Uses t.pick from entity for consistency.\n */\nexport const parameterVersionParamSchema = t.pick(parameters.schema, [\n \"name\",\n \"version\",\n]);\n","import { type Static, t } from \"alepha\";\nimport { parameterResponseSchema } from \"./parameterResponseSchema.ts\";\n\n/**\n * Parameter version response schema.\n */\nexport const parameterVersionResponseSchema = t.object({\n parameter: t.optional(parameterResponseSchema),\n});\n\nexport type ParameterVersionResponse = Static<\n typeof parameterVersionResponseSchema\n>;\n","import { type Static, t } from \"alepha\";\nimport { parameters } from \"../entities/parameters.ts\";\n\n/**\n * Rollback parameter body schema.\n * Uses t.pick for creator fields, adds targetVersion.\n */\nexport const rollbackParameterBodySchema = t.extend(\n t.pick(parameters.schema, [\"changeDescription\", \"creatorId\", \"creatorName\"]),\n {\n targetVersion: t.integer({\n description: \"Version number to rollback to\",\n }),\n },\n);\n\nexport type RollbackParameterBody = Static<typeof rollbackParameterBodySchema>;\n","import { $module } from \"alepha\";\n\n// ---------------------------------------------------------------------------------------------------------------------\n\nexport * from \"./entities/parameters.ts\";\nexport * from \"./schemas/activateParameterBodySchema.ts\";\nexport * from \"./schemas/createParameterVersionBodySchema.ts\";\nexport * from \"./schemas/parameterCurrentResponseSchema.ts\";\nexport * from \"./schemas/parameterHistoryResponseSchema.ts\";\nexport * from \"./schemas/parameterNameParamSchema.ts\";\nexport * from \"./schemas/parameterNamesResponseSchema.ts\";\nexport * from \"./schemas/parameterResponseSchema.ts\";\nexport * from \"./schemas/parameterStatusSchema.ts\";\nexport * from \"./schemas/parameterTreeNodeSchema.ts\";\nexport * from \"./schemas/parameterVersionParamSchema.ts\";\nexport * from \"./schemas/parameterVersionResponseSchema.ts\";\nexport * from \"./schemas/rollbackParameterBodySchema.ts\";\n\n// ---------------------------------------------------------------------------------------------------------------------\n\nexport const AlephaApiParameters = $module({\n name: \"alepha.api.parameters\",\n services: [],\n});\n"],"mappings":";;;;;;;;;;;;AAYA,MAAa,aAAa,QAAQ;CAChC,MAAM;CACN,QAAQ,EAAE,OAAO;EACf,IAAI,GAAG,WAAW,EAAE,MAAM,CAAC;EAC3B,WAAW,GAAG,WAAW;EACzB,WAAW,GAAG,WAAW;EAMzB,MAAM,EAAE,MAAM;EAKd,SAAS,EAAE,MAAM;EAMjB,YAAY,EAAE,MAAM;EAMpB,gBAAgB,EAAE,UAAU;EAM5B,SAAS,EAAE,SAAS;EAKpB,mBAAmB,EAAE,SAAS,EAAE,MAAM,CAAC;EAKvC,MAAM,EAAE,SAAS,EAAE,MAAM,EAAE,MAAM,CAAC,CAAC;EAKnC,WAAW,EAAE,SAAS,EAAE,MAAM,CAAC;EAK/B,aAAa,EAAE,SAAS,EAAE,MAAM,CAAC;EAKjC,iBAAiB,EAAE,SAAS,EAAE,MAAM,CAAC;EAKrC,cAAc,EAAE,SAAS,EAAE,MAAM,CAAC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M,EAAE,KAAK,CAAC;CAC3B,CAAC;;;;;;;ACHF,MAAa,8BAA8B,EAAE,KAAK,WAAW,QAAQ,CACnE,QACA,UACD,CAAC;;;;;;ACJF,MAAa,iCAAiC,EAAE,OAAO,EACrD,WAAW,EAAE,SAAS,wBAAwB,EAC/C,CAAC;;;;;;;ACDF,MAAa,8BAA8B,EAAE,OAC3C,EAAE,KAAK,WAAW,QAAQ;CAAC;CAAqB;CAAa;CAAc,CAAC,EAC5E,EACE,eAAe,EAAE,QAAQ,EACvB,aAAa,iCACd,CAAC,EACH,CACF;;;ACMD,MAAa,sBAAsB,QAAQ;CACzC,MAAM;CACN,UAAU,EAAE;CACb,CAAC"}
|
|
@@ -491,7 +491,10 @@ declare class ParameterPrimitive<T extends TObject> extends Primitive<ParameterP
|
|
|
491
491
|
/**
|
|
492
492
|
* Get version history for this parameter.
|
|
493
493
|
*/
|
|
494
|
-
getHistory(
|
|
494
|
+
getHistory(options?: {
|
|
495
|
+
limit?: number;
|
|
496
|
+
offset?: number;
|
|
497
|
+
}): Promise<{
|
|
495
498
|
changeDescription?: string | undefined;
|
|
496
499
|
tags?: string[] | undefined;
|
|
497
500
|
creatorId?: string | undefined;
|
|
@@ -537,6 +540,59 @@ declare class ParameterPrimitive<T extends TObject> extends Primitive<ParameterP
|
|
|
537
540
|
activationDate: string;
|
|
538
541
|
version: number;
|
|
539
542
|
}[]>;
|
|
543
|
+
/**
|
|
544
|
+
* Get a specific version of this parameter.
|
|
545
|
+
*/
|
|
546
|
+
getVersion(version: number): Promise<{
|
|
547
|
+
changeDescription?: string | undefined;
|
|
548
|
+
tags?: string[] | undefined;
|
|
549
|
+
creatorId?: string | undefined;
|
|
550
|
+
creatorName?: string | undefined;
|
|
551
|
+
previousContent?: _$typebox.StaticRecord<[], "Decode", {}, {
|
|
552
|
+
id: PgAttr<PgAttr<_$alepha.TString, typeof PG_PRIMARY_KEY>, typeof PG_DEFAULT>;
|
|
553
|
+
createdAt: PgAttr<PgAttr<_$alepha.TString, typeof PG_CREATED_AT>, typeof PG_DEFAULT>;
|
|
554
|
+
updatedAt: PgAttr<PgAttr<_$alepha.TString, typeof PG_UPDATED_AT>, typeof PG_DEFAULT>;
|
|
555
|
+
name: _$alepha.TString;
|
|
556
|
+
content: _$alepha.TRecord<string, _$alepha.TAny>;
|
|
557
|
+
schemaHash: _$alepha.TString;
|
|
558
|
+
activationDate: _$alepha.TString;
|
|
559
|
+
version: _$alepha.TInteger;
|
|
560
|
+
changeDescription: _$alepha.TOptional<_$alepha.TString>;
|
|
561
|
+
tags: _$alepha.TOptional<_$alepha.TArray<_$alepha.TString>>;
|
|
562
|
+
creatorId: _$alepha.TOptional<_$alepha.TString>;
|
|
563
|
+
creatorName: _$alepha.TOptional<_$alepha.TString>;
|
|
564
|
+
previousContent: _$alepha.TOptional<_$alepha.TRecord<string, _$alepha.TAny>>;
|
|
565
|
+
migrationLog: _$alepha.TOptional<_$alepha.TString>;
|
|
566
|
+
}, string, _$alepha.TAny> | undefined;
|
|
567
|
+
migrationLog?: string | undefined;
|
|
568
|
+
id: string;
|
|
569
|
+
createdAt: string;
|
|
570
|
+
updatedAt: string;
|
|
571
|
+
name: string;
|
|
572
|
+
content: _$typebox.StaticRecord<[], "Decode", {}, {
|
|
573
|
+
id: PgAttr<PgAttr<_$alepha.TString, typeof PG_PRIMARY_KEY>, typeof PG_DEFAULT>;
|
|
574
|
+
createdAt: PgAttr<PgAttr<_$alepha.TString, typeof PG_CREATED_AT>, typeof PG_DEFAULT>;
|
|
575
|
+
updatedAt: PgAttr<PgAttr<_$alepha.TString, typeof PG_UPDATED_AT>, typeof PG_DEFAULT>;
|
|
576
|
+
name: _$alepha.TString;
|
|
577
|
+
content: _$alepha.TRecord<string, _$alepha.TAny>;
|
|
578
|
+
schemaHash: _$alepha.TString;
|
|
579
|
+
activationDate: _$alepha.TString;
|
|
580
|
+
version: _$alepha.TInteger;
|
|
581
|
+
changeDescription: _$alepha.TOptional<_$alepha.TString>;
|
|
582
|
+
tags: _$alepha.TOptional<_$alepha.TArray<_$alepha.TString>>;
|
|
583
|
+
creatorId: _$alepha.TOptional<_$alepha.TString>;
|
|
584
|
+
creatorName: _$alepha.TOptional<_$alepha.TString>;
|
|
585
|
+
previousContent: _$alepha.TOptional<_$alepha.TRecord<string, _$alepha.TAny>>;
|
|
586
|
+
migrationLog: _$alepha.TOptional<_$alepha.TString>;
|
|
587
|
+
}, string, _$alepha.TAny>;
|
|
588
|
+
schemaHash: string;
|
|
589
|
+
activationDate: string;
|
|
590
|
+
version: number;
|
|
591
|
+
} | null>;
|
|
592
|
+
/**
|
|
593
|
+
* Delete all versions of this parameter.
|
|
594
|
+
*/
|
|
595
|
+
delete(): Promise<void>;
|
|
540
596
|
/**
|
|
541
597
|
* Rollback to a specific version.
|
|
542
598
|
*/
|
|
@@ -664,6 +720,11 @@ declare class ParameterProvider {
|
|
|
664
720
|
* Shared promises for deduplicating concurrent load() calls.
|
|
665
721
|
*/
|
|
666
722
|
protected readonly loadPromises: Map<string, Promise<void>>;
|
|
723
|
+
/**
|
|
724
|
+
* Generation counter per parameter — incremented on each doLoad call.
|
|
725
|
+
* Used to discard results from superseded loads.
|
|
726
|
+
*/
|
|
727
|
+
protected readonly loadGeneration: Map<string, number>;
|
|
667
728
|
/**
|
|
668
729
|
* Subscriber callbacks per parameter name.
|
|
669
730
|
*/
|
|
@@ -755,7 +816,14 @@ declare class ParameterProvider {
|
|
|
755
816
|
/**
|
|
756
817
|
* Get all versions of a parameter.
|
|
757
818
|
*/
|
|
758
|
-
getHistory(name: string
|
|
819
|
+
getHistory(name: string, options?: {
|
|
820
|
+
limit?: number;
|
|
821
|
+
offset?: number;
|
|
822
|
+
}): Promise<Parameter[]>;
|
|
823
|
+
/**
|
|
824
|
+
* Delete all versions of a parameter.
|
|
825
|
+
*/
|
|
826
|
+
delete(name: string): Promise<void>;
|
|
759
827
|
/**
|
|
760
828
|
* Get a specific version of a parameter.
|
|
761
829
|
*/
|
|
@@ -802,7 +870,9 @@ declare class ParameterProvider {
|
|
|
802
870
|
*/
|
|
803
871
|
protected migrateWithLock(name: string): Promise<void>;
|
|
804
872
|
/**
|
|
805
|
-
* Poll until a lock is released.
|
|
873
|
+
* Poll until a lock is released (or TTL expires).
|
|
874
|
+
* Uses a probe-only SET NX with minimal TTL to detect release
|
|
875
|
+
* without holding the lock longer than necessary.
|
|
806
876
|
*/
|
|
807
877
|
protected waitForLock(lockKey: string): Promise<void>;
|
|
808
878
|
/**
|
|
@@ -903,6 +973,10 @@ declare class AdminParameterController {
|
|
|
903
973
|
params: _$alepha.TObject<{
|
|
904
974
|
name: _$alepha.TString;
|
|
905
975
|
}>;
|
|
976
|
+
query: _$alepha.TObject<{
|
|
977
|
+
limit: _$alepha.TOptional<_$alepha.TInteger>;
|
|
978
|
+
offset: _$alepha.TOptional<_$alepha.TInteger>;
|
|
979
|
+
}>;
|
|
906
980
|
response: _$alepha.TObject<{
|
|
907
981
|
versions: _$alepha.TArray<_$alepha.TObject<{
|
|
908
982
|
id: PgAttr<PgAttr<_$alepha.TString, typeof PG_PRIMARY_KEY>, typeof PG_DEFAULT>;
|
|
@@ -1096,6 +1170,19 @@ declare class AdminParameterController {
|
|
|
1096
1170
|
status: _$alepha.TUnsafe<"expired" | "current" | "next" | "future">;
|
|
1097
1171
|
}>;
|
|
1098
1172
|
}>;
|
|
1173
|
+
/**
|
|
1174
|
+
* Delete all versions of a parameter.
|
|
1175
|
+
*/
|
|
1176
|
+
deleteParameter: _$alepha_server0.ActionPrimitiveFn<{
|
|
1177
|
+
params: _$alepha.TObject<{
|
|
1178
|
+
name: _$alepha.TString;
|
|
1179
|
+
}>;
|
|
1180
|
+
response: _$alepha.TObject<{
|
|
1181
|
+
ok: _$alepha.TBoolean;
|
|
1182
|
+
id: _$alepha.TOptional<_$alepha.TUnion<[_$alepha.TString, _$alepha.TInteger]>>;
|
|
1183
|
+
count: _$alepha.TOptional<_$alepha.TNumber>;
|
|
1184
|
+
}>;
|
|
1185
|
+
}>;
|
|
1099
1186
|
}
|
|
1100
1187
|
//#endregion
|
|
1101
1188
|
//#region ../../src/api/parameters/schemas/activateParameterBodySchema.d.ts
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","names":[],"sources":["../../../src/orm/core/schemas/insertSchema.ts","../../../src/orm/core/schemas/updateSchema.ts","../../../src/orm/core/primitives/$entity.ts","../../../src/orm/core/constants/PG_SYMBOLS.ts","../../../src/orm/core/helpers/pgAttr.ts","../../../src/orm/core/schemas/databaseEnvSchema.ts","../../../src/api/parameters/entities/parameters.ts","../../../src/api/parameters/primitives/$parameter.ts","../../../src/api/parameters/schemas/parameterStatusSchema.ts","../../../src/api/parameters/schemas/parameterTreeNodeSchema.ts","../../../src/api/parameters/services/ParameterProvider.ts","../../../src/api/parameters/controllers/AdminParameterController.ts","../../../src/api/parameters/schemas/activateParameterBodySchema.ts","../../../src/api/parameters/schemas/createParameterVersionBodySchema.ts","../../../src/api/parameters/schemas/parameterCurrentResponseSchema.ts","../../../src/api/parameters/schemas/parameterHistoryResponseSchema.ts","../../../src/api/parameters/schemas/parameterNameParamSchema.ts","../../../src/api/parameters/schemas/parameterNamesResponseSchema.ts","../../../src/api/parameters/schemas/parameterResponseSchema.ts","../../../src/api/parameters/schemas/parameterVersionParamSchema.ts","../../../src/api/parameters/schemas/parameterVersionResponseSchema.ts","../../../src/api/parameters/schemas/rollbackParameterBodySchema.ts","../../../src/api/parameters/index.ts"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;KAaY,aAAA,WAAwB,OAAA,IAAW,OAAA,eACjC,CAAA,kBAAmB,CAAA,eAAgB,CAAA;EAAA,CAC5C,YAAA;AAAA,YAGC,CAAA,GAAI,CAAA,eAAgB,CAAA;EAAA,CACjB,UAAA;AAAA;EACD,WAAA;AAAA,IACF,SAAA,CAAU,CAAA,eAAgB,CAAA,KAC1B,CAAA,eAAgB,CAAA;;;;;;;;;;;;KCJV,aAAA,WAAwB,OAAA,IAAW,OAAA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8Ba,mBAAA,EAAmB,QAAA,CAAA,OAAA,CAI9B,QAAA,CAJ8B,MAAA"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","names":[],"sources":["../../../src/orm/core/schemas/insertSchema.ts","../../../src/orm/core/schemas/updateSchema.ts","../../../src/orm/core/primitives/$entity.ts","../../../src/orm/core/constants/PG_SYMBOLS.ts","../../../src/orm/core/helpers/pgAttr.ts","../../../src/orm/core/schemas/databaseEnvSchema.ts","../../../src/api/parameters/entities/parameters.ts","../../../src/api/parameters/primitives/$parameter.ts","../../../src/api/parameters/schemas/parameterStatusSchema.ts","../../../src/api/parameters/schemas/parameterTreeNodeSchema.ts","../../../src/api/parameters/services/ParameterProvider.ts","../../../src/api/parameters/controllers/AdminParameterController.ts","../../../src/api/parameters/schemas/activateParameterBodySchema.ts","../../../src/api/parameters/schemas/createParameterVersionBodySchema.ts","../../../src/api/parameters/schemas/parameterCurrentResponseSchema.ts","../../../src/api/parameters/schemas/parameterHistoryResponseSchema.ts","../../../src/api/parameters/schemas/parameterNameParamSchema.ts","../../../src/api/parameters/schemas/parameterNamesResponseSchema.ts","../../../src/api/parameters/schemas/parameterResponseSchema.ts","../../../src/api/parameters/schemas/parameterVersionParamSchema.ts","../../../src/api/parameters/schemas/parameterVersionResponseSchema.ts","../../../src/api/parameters/schemas/rollbackParameterBodySchema.ts","../../../src/api/parameters/index.ts"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;KAaY,aAAA,WAAwB,OAAA,IAAW,OAAA,eACjC,CAAA,kBAAmB,CAAA,eAAgB,CAAA;EAAA,CAC5C,YAAA;AAAA,YAGC,CAAA,GAAI,CAAA,eAAgB,CAAA;EAAA,CACjB,UAAA;AAAA;EACD,WAAA;AAAA,IACF,SAAA,CAAU,CAAA,eAAgB,CAAA,KAC1B,CAAA,eAAgB,CAAA;;;;;;;;;;;;KCJV,aAAA,WAAwB,OAAA,IAAW,OAAA,eACjC,CAAA,kBAAmB,CAAA,eAAgB,CAAA;EAAA,CAC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