@geekmidas/constructs 10.0.0-alpha.1 → 10.0.0-alpha.100
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/README.md +223 -158
- package/dist/{Construct-CdhThxDI.mjs → Construct-B1vGBPme.mjs} +45 -33
- package/dist/Construct-B1vGBPme.mjs.map +1 -0
- package/dist/Construct-BQALFCh2.d.cts +230 -0
- package/dist/Construct-BQALFCh2.d.cts.map +1 -0
- package/dist/{Construct-roId57cU.cjs → Construct-DUSXuTHP.cjs} +65 -47
- package/dist/Construct-DUSXuTHP.cjs.map +1 -0
- package/dist/Construct-QXnl3VqT.d.mts +230 -0
- package/dist/Construct-QXnl3VqT.d.mts.map +1 -0
- package/dist/Cron-DI3nKoic.d.cts +45 -0
- package/dist/Cron-DI3nKoic.d.cts.map +1 -0
- package/dist/Cron-uYAHPnp7.d.mts +45 -0
- package/dist/Cron-uYAHPnp7.d.mts.map +1 -0
- package/dist/CronBuilder-C0Ek1-RA.cjs +121 -0
- package/dist/CronBuilder-C0Ek1-RA.cjs.map +1 -0
- package/dist/CronBuilder-DaSUm2Na.d.mts +47 -0
- package/dist/CronBuilder-DaSUm2Na.d.mts.map +1 -0
- package/dist/CronBuilder-Dmix_Pen.mjs +109 -0
- package/dist/CronBuilder-Dmix_Pen.mjs.map +1 -0
- package/dist/CronBuilder-g1lZLWyG.d.cts +47 -0
- package/dist/CronBuilder-g1lZLWyG.d.cts.map +1 -0
- package/dist/{Endpoint-BTj58Gob.mjs → Endpoint-BG4UJ9oA.mjs} +146 -109
- package/dist/Endpoint-BG4UJ9oA.mjs.map +1 -0
- package/dist/{Endpoint-BBkV6l0k.cjs → Endpoint-BoUg8ocM.cjs} +174 -131
- package/dist/Endpoint-BoUg8ocM.cjs.map +1 -0
- package/dist/{Endpoint-BKR5QH6O.d.mts → Endpoint-Du-NwPX2.d.mts} +83 -91
- package/dist/Endpoint-Du-NwPX2.d.mts.map +1 -0
- package/dist/{Endpoint-BQ9O0P1w.d.cts → Endpoint-aCvBMPoH.d.cts} +82 -90
- package/dist/Endpoint-aCvBMPoH.d.cts.map +1 -0
- package/dist/{EndpointFactory-BejSTzbB.mjs → EndpointFactory-BDtsrEvJ.mjs} +60 -77
- package/dist/EndpointFactory-BDtsrEvJ.mjs.map +1 -0
- package/dist/{EndpointFactory-DYoGLaIT.cjs → EndpointFactory-DJ7gXLpR.cjs} +96 -113
- package/dist/EndpointFactory-DJ7gXLpR.cjs.map +1 -0
- package/dist/{index-D5zqAJ2e.d.cts → EndpointFactory-DMYdJCOj.d.mts} +78 -134
- package/dist/EndpointFactory-DMYdJCOj.d.mts.map +1 -0
- package/dist/{index-Cvz551AO.d.mts → EndpointFactory-I7s1co3Y.d.cts} +79 -135
- package/dist/EndpointFactory-I7s1co3Y.d.cts.map +1 -0
- package/dist/Function-DuqGcbOI.d.mts +76 -0
- package/dist/Function-DuqGcbOI.d.mts.map +1 -0
- package/dist/Function-Pu-1kKZz.d.cts +76 -0
- package/dist/Function-Pu-1kKZz.d.cts.map +1 -0
- package/dist/{HonoEndpointAdaptor-7aYNdqJq.mjs → HonoEndpointAdaptor-PtPlbeKY.mjs} +75 -57
- package/dist/HonoEndpointAdaptor-PtPlbeKY.mjs.map +1 -0
- package/dist/{HonoEndpointAdaptor-wMsCyMgt.cjs → HonoEndpointAdaptor-zVzVLJEO.cjs} +83 -62
- package/dist/HonoEndpointAdaptor-zVzVLJEO.cjs.map +1 -0
- package/dist/Queue-A3wfD0it.cjs +109 -0
- package/dist/Queue-A3wfD0it.cjs.map +1 -0
- package/dist/Queue-D6USGS4q.mjs +104 -0
- package/dist/Queue-D6USGS4q.mjs.map +1 -0
- package/dist/{Queue-D6WeziRD.d.cts → Queue-DlsHRzUp.d.mts} +48 -48
- package/dist/Queue-DlsHRzUp.d.mts.map +1 -0
- package/dist/{Queue-DpUeqdC8.d.mts → Queue-HPyi0e1i.d.cts} +49 -49
- package/dist/Queue-HPyi0e1i.d.cts.map +1 -0
- package/dist/QueueBuilder-BjuF0UBl.cjs +135 -0
- package/dist/QueueBuilder-BjuF0UBl.cjs.map +1 -0
- package/dist/QueueBuilder-Cue73M4t.mjs +118 -0
- package/dist/QueueBuilder-Cue73M4t.mjs.map +1 -0
- package/dist/QueueBuilder-OSi6LkV9.d.cts +75 -0
- package/dist/QueueBuilder-OSi6LkV9.d.cts.map +1 -0
- package/dist/QueueBuilder-QHsnVt1P.d.mts +75 -0
- package/dist/QueueBuilder-QHsnVt1P.d.mts.map +1 -0
- package/dist/{Subscriber-4rBJgDKI.d.mts → Subscriber-Bpp02cGr.d.cts} +30 -21
- package/dist/Subscriber-Bpp02cGr.d.cts.map +1 -0
- package/dist/{Subscriber-DVQowdyj.d.cts → Subscriber-CtN9R48-.d.mts} +29 -20
- package/dist/Subscriber-CtN9R48-.d.mts.map +1 -0
- package/dist/SubscriberBuilder-CDy4nHCz.mjs +134 -0
- package/dist/SubscriberBuilder-CDy4nHCz.mjs.map +1 -0
- package/dist/SubscriberBuilder-CuCMFpYW.d.mts +67 -0
- package/dist/SubscriberBuilder-CuCMFpYW.d.mts.map +1 -0
- package/dist/SubscriberBuilder-D_owVoHo.cjs +145 -0
- package/dist/SubscriberBuilder-D_owVoHo.cjs.map +1 -0
- package/dist/SubscriberBuilder-g3fAVWgs.d.cts +67 -0
- package/dist/SubscriberBuilder-g3fAVWgs.d.cts.map +1 -0
- package/dist/Topic-D74b5cgs.mjs +99 -0
- package/dist/Topic-D74b5cgs.mjs.map +1 -0
- package/dist/Topic-GHxcU8AG.cjs +104 -0
- package/dist/Topic-GHxcU8AG.cjs.map +1 -0
- package/dist/adaptors/aws.cjs +332 -188
- package/dist/adaptors/aws.cjs.map +1 -1
- package/dist/adaptors/aws.d.cts +114 -44
- package/dist/adaptors/aws.d.cts.map +1 -1
- package/dist/adaptors/aws.d.mts +114 -44
- package/dist/adaptors/aws.d.mts.map +1 -1
- package/dist/adaptors/aws.mjs +308 -166
- package/dist/adaptors/aws.mjs.map +1 -1
- package/dist/adaptors/hono.cjs +3 -11
- package/dist/adaptors/hono.d.cts +7 -16
- package/dist/adaptors/hono.d.cts.map +1 -1
- package/dist/adaptors/hono.d.mts +8 -17
- package/dist/adaptors/hono.d.mts.map +1 -1
- package/dist/adaptors/hono.mjs +2 -11
- package/dist/adaptors/testing.cjs +743 -90
- package/dist/adaptors/testing.cjs.map +1 -1
- package/dist/adaptors/testing.d.cts +351 -54
- package/dist/adaptors/testing.d.cts.map +1 -1
- package/dist/adaptors/testing.d.mts +351 -54
- package/dist/adaptors/testing.d.mts.map +1 -1
- package/dist/adaptors/testing.mjs +706 -71
- package/dist/adaptors/testing.mjs.map +1 -1
- package/dist/auth-BMCJN30Y.d.cts +268 -0
- package/dist/auth-BMCJN30Y.d.cts.map +1 -0
- package/dist/auth-CcuceLYo.d.mts +268 -0
- package/dist/auth-CcuceLYo.d.mts.map +1 -0
- package/dist/auth.cjs +302 -34
- package/dist/auth.cjs.map +1 -1
- package/dist/auth.d.cts +2 -108
- package/dist/auth.d.mts +2 -108
- package/dist/auth.mjs +290 -28
- package/dist/auth.mjs.map +1 -1
- package/dist/{cache-CdQ7OLpR.d.cts → cache-CXh6GIgb.d.mts} +4 -7
- package/dist/cache-CXh6GIgb.d.mts.map +1 -0
- package/dist/{cache-DYoJFcfd.d.mts → cache-DnGDGly3.d.cts} +4 -7
- package/dist/cache-DnGDGly3.d.cts.map +1 -0
- package/dist/cache.cjs +68 -2
- package/dist/cache.cjs.map +1 -0
- package/dist/cache.d.cts +1 -2
- package/dist/cache.d.mts +1 -2
- package/dist/cache.mjs +67 -2
- package/dist/cache.mjs.map +1 -0
- package/dist/cipher-C1lEFX63.mjs +225 -0
- package/dist/cipher-C1lEFX63.mjs.map +1 -0
- package/dist/cipher-CVxfwLjk.cjs +332 -0
- package/dist/cipher-CVxfwLjk.cjs.map +1 -0
- package/dist/{clone-DblgEZZa.mjs → clone-EKNovYHu.mjs} +3 -3
- package/dist/clone-EKNovYHu.mjs.map +1 -0
- package/dist/{clone-Dy0cR2SZ.cjs → clone-UGJpvQnL.cjs} +7 -8
- package/dist/clone-UGJpvQnL.cjs.map +1 -0
- package/dist/{construct-interface-BqwRNYA2.d.mts → construct-interface-B1AfqRl4.d.cts} +43 -12
- package/dist/construct-interface-B1AfqRl4.d.cts.map +1 -0
- package/dist/{construct-interface-D2nNkHUN.d.cts → construct-interface-DluK3_da.d.mts} +43 -12
- package/dist/construct-interface-DluK3_da.d.mts.map +1 -0
- package/dist/construct-interface.cjs +113 -7
- package/dist/construct-interface.cjs.map +1 -0
- package/dist/construct-interface.d.cts +2 -2
- package/dist/construct-interface.d.mts +2 -2
- package/dist/construct-interface.mjs +106 -2
- package/dist/construct-interface.mjs.map +1 -0
- package/dist/credential.cjs +77 -17
- package/dist/credential.cjs.map +1 -1
- package/dist/credential.d.cts +34 -9
- package/dist/credential.d.cts.map +1 -1
- package/dist/credential.d.mts +34 -9
- package/dist/credential.d.mts.map +1 -1
- package/dist/credential.mjs +71 -13
- package/dist/credential.mjs.map +1 -1
- package/dist/crons/index.cjs +189 -85
- package/dist/crons/index.cjs.map +1 -1
- package/dist/crons/index.d.cts +70 -48
- package/dist/crons/index.d.cts.map +1 -1
- package/dist/crons/index.d.mts +70 -48
- package/dist/crons/index.d.mts.map +1 -1
- package/dist/crons/index.mjs +183 -81
- package/dist/crons/index.mjs.map +1 -1
- package/dist/database/kysely.cjs +4 -181
- package/dist/database/kysely.d.cts +2 -152
- package/dist/database/kysely.d.mts +2 -152
- package/dist/database/kysely.mjs +2 -180
- package/dist/email.cjs +25 -12
- package/dist/email.cjs.map +1 -1
- package/dist/email.d.cts +3 -7
- package/dist/email.d.cts.map +1 -1
- package/dist/email.d.mts +3 -7
- package/dist/email.d.mts.map +1 -1
- package/dist/email.mjs +16 -3
- package/dist/email.mjs.map +1 -1
- package/dist/encryption.cjs +96 -0
- package/dist/encryption.cjs.map +1 -0
- package/dist/encryption.d.cts +117 -0
- package/dist/encryption.d.cts.map +1 -0
- package/dist/encryption.d.mts +117 -0
- package/dist/encryption.d.mts.map +1 -0
- package/dist/encryption.mjs +83 -0
- package/dist/encryption.mjs.map +1 -0
- package/dist/endpoints/index.cjs +8 -11
- package/dist/endpoints/index.d.cts +51 -7
- package/dist/endpoints/index.d.cts.map +1 -0
- package/dist/endpoints/index.d.mts +51 -7
- package/dist/endpoints/index.d.mts.map +1 -0
- package/dist/endpoints/index.mjs +6 -11
- package/dist/external-api-MJ8id87V.d.mts +105 -0
- package/dist/external-api-MJ8id87V.d.mts.map +1 -0
- package/dist/external-api-O107yzZJ.d.cts +105 -0
- package/dist/external-api-O107yzZJ.d.cts.map +1 -0
- package/dist/external-api.cjs +142 -0
- package/dist/external-api.cjs.map +1 -0
- package/dist/external-api.d.cts +2 -0
- package/dist/external-api.d.mts +2 -0
- package/dist/external-api.mjs +139 -0
- package/dist/external-api.mjs.map +1 -0
- package/dist/file-server.cjs +42 -10
- package/dist/file-server.cjs.map +1 -1
- package/dist/file-server.d.cts +6 -10
- package/dist/file-server.d.cts.map +1 -1
- package/dist/file-server.d.mts +6 -10
- package/dist/file-server.d.mts.map +1 -1
- package/dist/file-server.mjs +34 -2
- package/dist/file-server.mjs.map +1 -1
- package/dist/functions/index.cjs +2 -6
- package/dist/functions/index.d.cts +3 -4
- package/dist/functions/index.d.mts +3 -4
- package/dist/functions/index.mjs +2 -6
- package/dist/{functions-Cpff1uZH.mjs → functions-BFizikJU.mjs} +394 -243
- package/dist/functions-BFizikJU.mjs.map +1 -0
- package/dist/{functions-DukjG8ov.cjs → functions-CfzJG9hK.cjs} +432 -275
- package/dist/functions-CfzJG9hK.cjs.map +1 -0
- package/dist/index-BuzRvKOQ.d.cts +115 -0
- package/dist/index-BuzRvKOQ.d.cts.map +1 -0
- package/dist/index-CTkKOer4.d.mts +115 -0
- package/dist/index-CTkKOer4.d.mts.map +1 -0
- package/dist/index-CeEtxDmK.d.cts +79 -0
- package/dist/index-CeEtxDmK.d.cts.map +1 -0
- package/dist/index-CeEtxDmK.d.mts +79 -0
- package/dist/index-CeEtxDmK.d.mts.map +1 -0
- package/dist/index.cjs +6 -3
- package/dist/index.d.cts +27 -4
- package/dist/index.d.cts.map +1 -0
- package/dist/index.d.mts +27 -4
- package/dist/index.d.mts.map +1 -0
- package/dist/index.mjs +3 -3
- package/dist/kms-B-Hm3d5r.cjs +85 -0
- package/dist/kms-B-Hm3d5r.cjs.map +1 -0
- package/dist/kms-BdUlMJEZ.mjs +85 -0
- package/dist/kms-BdUlMJEZ.mjs.map +1 -0
- package/dist/kysely-Bii4l6eP.mjs +370 -0
- package/dist/kysely-Bii4l6eP.mjs.map +1 -0
- package/dist/kysely-CO_Dk43W.cjs +383 -0
- package/dist/kysely-CO_Dk43W.cjs.map +1 -0
- package/dist/kysely-D0bpzgPs.d.cts +175 -0
- package/dist/kysely-D0bpzgPs.d.cts.map +1 -0
- package/dist/kysely-DUqC3Ie0.d.mts +175 -0
- package/dist/kysely-DUqC3Ie0.d.mts.map +1 -0
- package/dist/{telemetry-C3L0iS28.d.cts → lambdaTelemetry-8vnmVZQ5.d.cts} +3 -6
- package/dist/lambdaTelemetry-8vnmVZQ5.d.cts.map +1 -0
- package/dist/{telemetry-D7bVFLGi.d.mts → lambdaTelemetry-8vnmVZQ5.d.mts} +3 -6
- package/dist/lambdaTelemetry-8vnmVZQ5.d.mts.map +1 -0
- package/dist/{lazyAccessors-DM6HcXQk.mjs → lazyAccessors-CFanua0O.mjs} +20 -21
- package/dist/lazyAccessors-CFanua0O.mjs.map +1 -0
- package/dist/{lazyAccessors-DrJj8NpA.cjs → lazyAccessors-hJKGv8Ay.cjs} +60 -62
- package/dist/lazyAccessors-hJKGv8Ay.cjs.map +1 -0
- package/dist/mobile-app.cjs +73 -0
- package/dist/mobile-app.cjs.map +1 -0
- package/dist/mobile-app.d.cts +61 -0
- package/dist/mobile-app.d.cts.map +1 -0
- package/dist/mobile-app.d.mts +61 -0
- package/dist/mobile-app.d.mts.map +1 -0
- package/dist/mobile-app.mjs +72 -0
- package/dist/mobile-app.mjs.map +1 -0
- package/dist/object-storage.cjs +18 -10
- package/dist/object-storage.cjs.map +1 -1
- package/dist/object-storage.d.cts +3 -7
- package/dist/object-storage.d.cts.map +1 -1
- package/dist/object-storage.d.mts +3 -7
- package/dist/object-storage.d.mts.map +1 -1
- package/dist/object-storage.mjs +11 -3
- package/dist/object-storage.mjs.map +1 -1
- package/dist/processAudits-BRRVVHUB.mjs +131 -0
- package/dist/processAudits-BRRVVHUB.mjs.map +1 -0
- package/dist/processAudits-DasOZjPl.cjs +154 -0
- package/dist/processAudits-DasOZjPl.cjs.map +1 -0
- package/dist/queue/index.cjs +6 -189
- package/dist/queue/index.d.cts +3 -60
- package/dist/queue/index.d.mts +3 -60
- package/dist/queue/index.mjs +3 -186
- package/dist/rest-api.cjs +92 -63
- package/dist/rest-api.cjs.map +1 -1
- package/dist/rest-api.d.cts +81 -61
- package/dist/rest-api.d.cts.map +1 -1
- package/dist/rest-api.d.mts +81 -61
- package/dist/rest-api.d.mts.map +1 -1
- package/dist/rest-api.mjs +84 -55
- package/dist/rest-api.mjs.map +1 -1
- package/dist/{chunk-DWy1uDak.cjs → rolldown-runtime-y5ARvAq5.cjs} +14 -18
- package/dist/runSubscriber-BHvJ8POr.mjs +109 -0
- package/dist/runSubscriber-BHvJ8POr.mjs.map +1 -0
- package/dist/runSubscriber-D8nLXIv1.cjs +126 -0
- package/dist/runSubscriber-D8nLXIv1.cjs.map +1 -0
- package/dist/shutdown-BMJmAhSt.cjs +38 -0
- package/dist/shutdown-BMJmAhSt.cjs.map +1 -0
- package/dist/shutdown-C7xa8x9S.mjs +27 -0
- package/dist/shutdown-C7xa8x9S.mjs.map +1 -0
- package/dist/site.cjs +35 -9
- package/dist/site.cjs.map +1 -1
- package/dist/site.d.cts +25 -22
- package/dist/site.d.cts.map +1 -1
- package/dist/site.d.mts +25 -22
- package/dist/site.d.mts.map +1 -1
- package/dist/site.mjs +31 -5
- package/dist/site.mjs.map +1 -1
- package/dist/stages-BSCF19o2.d.cts +56 -0
- package/dist/stages-BSCF19o2.d.cts.map +1 -0
- package/dist/stages-BSCF19o2.d.mts +56 -0
- package/dist/stages-BSCF19o2.d.mts.map +1 -0
- package/dist/subscribers/index.cjs +111 -101
- package/dist/subscribers/index.cjs.map +1 -1
- package/dist/subscribers/index.d.cts +44 -56
- package/dist/subscribers/index.d.cts.map +1 -1
- package/dist/subscribers/index.d.mts +44 -56
- package/dist/subscribers/index.d.mts.map +1 -1
- package/dist/subscribers/index.mjs +108 -98
- package/dist/subscribers/index.mjs.map +1 -1
- package/dist/surfaceEnv-CNimK76p.cjs +56 -0
- package/dist/surfaceEnv-CNimK76p.cjs.map +1 -0
- package/dist/surfaceEnv-wMT5QzgZ.mjs +45 -0
- package/dist/surfaceEnv-wMT5QzgZ.mjs.map +1 -0
- package/dist/telemetry-B48RLjyk.d.cts +40 -0
- package/dist/telemetry-B48RLjyk.d.cts.map +1 -0
- package/dist/telemetry-DRtT1_0A.d.mts +40 -0
- package/dist/telemetry-DRtT1_0A.d.mts.map +1 -0
- package/dist/telemetry.cjs +56 -0
- package/dist/telemetry.cjs.map +1 -0
- package/dist/telemetry.d.cts +2 -0
- package/dist/telemetry.d.mts +2 -0
- package/dist/telemetry.mjs +55 -0
- package/dist/telemetry.mjs.map +1 -0
- package/dist/topic/index.cjs +3 -137
- package/dist/topic/index.d.cts +2 -32
- package/dist/topic/index.d.mts +2 -32
- package/dist/topic/index.mjs +2 -134
- package/dist/tracing-CxaZ98IB.mjs +110 -0
- package/dist/tracing-CxaZ98IB.mjs.map +1 -0
- package/dist/tracing-DPMidF_r.cjs +127 -0
- package/dist/tracing-DPMidF_r.cjs.map +1 -0
- package/dist/{types-BlAkSuGI.d.cts → types-DMuSQeLL.d.cts} +3 -5
- package/dist/types-DMuSQeLL.d.cts.map +1 -0
- package/dist/{types-aKksMEWL.d.mts → types-DMuSQeLL.d.mts} +3 -5
- package/dist/types-DMuSQeLL.d.mts.map +1 -0
- package/dist/types.d.cts +1 -1
- package/dist/types.d.mts +1 -1
- package/dist/types.mjs +1 -0
- package/dist/worker.cjs +191 -0
- package/dist/worker.cjs.map +1 -0
- package/dist/worker.d.cts +171 -0
- package/dist/worker.d.cts.map +1 -0
- package/dist/worker.d.mts +171 -0
- package/dist/worker.d.mts.map +1 -0
- package/dist/worker.mjs +190 -0
- package/dist/worker.mjs.map +1 -0
- package/package.json +116 -70
- package/dist/AWSScheduledFunction-9bJS4WdJ.d.cts +0 -122
- package/dist/AWSScheduledFunction-9bJS4WdJ.d.cts.map +0 -1
- package/dist/AWSScheduledFunction-BJjj8B5V.mjs +0 -243
- package/dist/AWSScheduledFunction-BJjj8B5V.mjs.map +0 -1
- package/dist/AWSScheduledFunction-BO5iEMSh.d.mts +0 -122
- package/dist/AWSScheduledFunction-BO5iEMSh.d.mts.map +0 -1
- package/dist/AWSScheduledFunction-qu4ieRZR.cjs +0 -255
- package/dist/AWSScheduledFunction-qu4ieRZR.cjs.map +0 -1
- package/dist/Construct-B-xc0SE9.d.mts +0 -104
- package/dist/Construct-B-xc0SE9.d.mts.map +0 -1
- package/dist/Construct-CdhThxDI.mjs.map +0 -1
- package/dist/Construct-WhCXIOPV.d.cts +0 -104
- package/dist/Construct-WhCXIOPV.d.cts.map +0 -1
- package/dist/Construct-roId57cU.cjs.map +0 -1
- package/dist/Endpoint-BBkV6l0k.cjs.map +0 -1
- package/dist/Endpoint-BKR5QH6O.d.mts.map +0 -1
- package/dist/Endpoint-BQ9O0P1w.d.cts.map +0 -1
- package/dist/Endpoint-BTj58Gob.mjs.map +0 -1
- package/dist/EndpointFactory-BejSTzbB.mjs.map +0 -1
- package/dist/EndpointFactory-DYoGLaIT.cjs.map +0 -1
- package/dist/HonoEndpointAdaptor-7aYNdqJq.mjs.map +0 -1
- package/dist/HonoEndpointAdaptor-wMsCyMgt.cjs.map +0 -1
- package/dist/Queue-D6WeziRD.d.cts.map +0 -1
- package/dist/Queue-DpUeqdC8.d.mts.map +0 -1
- package/dist/Subscriber-4rBJgDKI.d.mts.map +0 -1
- package/dist/Subscriber-DVQowdyj.d.cts.map +0 -1
- package/dist/Topic-Ohx9dvWr.d.cts +0 -91
- package/dist/Topic-Ohx9dvWr.d.cts.map +0 -1
- package/dist/Topic-cmy2jOUy.d.mts +0 -91
- package/dist/Topic-cmy2jOUy.d.mts.map +0 -1
- package/dist/auth.d.cts.map +0 -1
- package/dist/auth.d.mts.map +0 -1
- package/dist/cache-0ANvRQnD.mjs +0 -51
- package/dist/cache-0ANvRQnD.mjs.map +0 -1
- package/dist/cache-3WSvAulx.cjs +0 -57
- package/dist/cache-3WSvAulx.cjs.map +0 -1
- package/dist/cache-CdQ7OLpR.d.cts.map +0 -1
- package/dist/cache-DYoJFcfd.d.mts.map +0 -1
- package/dist/clone-DblgEZZa.mjs.map +0 -1
- package/dist/clone-Dy0cR2SZ.cjs.map +0 -1
- package/dist/construct-interface-BfjcOD_E.cjs +0 -117
- package/dist/construct-interface-BfjcOD_E.cjs.map +0 -1
- package/dist/construct-interface-BqwRNYA2.d.mts.map +0 -1
- package/dist/construct-interface-D2nNkHUN.d.cts.map +0 -1
- package/dist/construct-interface-Z4CpS8tK.mjs +0 -81
- package/dist/construct-interface-Z4CpS8tK.mjs.map +0 -1
- package/dist/database/kysely.cjs.map +0 -1
- package/dist/database/kysely.d.cts.map +0 -1
- package/dist/database/kysely.d.mts.map +0 -1
- package/dist/database/kysely.mjs.map +0 -1
- package/dist/functions-Cpff1uZH.mjs.map +0 -1
- package/dist/functions-DukjG8ov.cjs.map +0 -1
- package/dist/index-BTvozlUD.d.cts +0 -163
- package/dist/index-BTvozlUD.d.cts.map +0 -1
- package/dist/index-Cvz551AO.d.mts.map +0 -1
- package/dist/index-D5zqAJ2e.d.cts.map +0 -1
- package/dist/index-L7pz0R0T.d.mts +0 -162
- package/dist/index-L7pz0R0T.d.mts.map +0 -1
- package/dist/lazyAccessors-DM6HcXQk.mjs.map +0 -1
- package/dist/lazyAccessors-DrJj8NpA.cjs.map +0 -1
- package/dist/processAudits-Bc8rz6Ev.cjs +0 -92
- package/dist/processAudits-Bc8rz6Ev.cjs.map +0 -1
- package/dist/processAudits-D89tICM4.mjs +0 -80
- package/dist/processAudits-D89tICM4.mjs.map +0 -1
- package/dist/publisher-CGEo8UKD.mjs +0 -41
- package/dist/publisher-CGEo8UKD.mjs.map +0 -1
- package/dist/publisher-CqGsXB2X.cjs +0 -53
- package/dist/publisher-CqGsXB2X.cjs.map +0 -1
- package/dist/queue/index.cjs.map +0 -1
- package/dist/queue/index.d.cts.map +0 -1
- package/dist/queue/index.d.mts.map +0 -1
- package/dist/queue/index.mjs.map +0 -1
- package/dist/surfaceEnv-BFXEms2f.cjs +0 -39
- package/dist/surfaceEnv-BFXEms2f.cjs.map +0 -1
- package/dist/surfaceEnv-C3Ktahea.mjs +0 -27
- package/dist/surfaceEnv-C3Ktahea.mjs.map +0 -1
- package/dist/telemetry-C3L0iS28.d.cts.map +0 -1
- package/dist/telemetry-D7bVFLGi.d.mts.map +0 -1
- package/dist/topic/index.cjs.map +0 -1
- package/dist/topic/index.d.cts.map +0 -1
- package/dist/topic/index.d.mts.map +0 -1
- package/dist/topic/index.mjs.map +0 -1
- package/dist/types-BlAkSuGI.d.cts.map +0 -1
- package/dist/types-aKksMEWL.d.mts.map +0 -1
package/dist/rest-api.d.cts
CHANGED
|
@@ -1,37 +1,33 @@
|
|
|
1
|
-
import "./
|
|
2
|
-
import "./
|
|
3
|
-
import {
|
|
4
|
-
import "./
|
|
5
|
-
import { BuiltInSecuritySchemeId } from "./Endpoint-BQ9O0P1w.cjs";
|
|
6
|
-
import { EndpointBuilder, EndpointFactory, RemoveTrailingSlash } from "./index-D5zqAJ2e.cjs";
|
|
1
|
+
import { i as Declarable, t as Authenticator } from "./construct-interface-B1AfqRl4.cjs";
|
|
2
|
+
import { n as Telemetry } from "./telemetry-B48RLjyk.cjs";
|
|
3
|
+
import { T as BuiltInSecuritySchemeId } from "./Endpoint-aCvBMPoH.cjs";
|
|
4
|
+
import { t as EndpointFactory } from "./EndpointFactory-I7s1co3Y.cjs";
|
|
7
5
|
import { EnvironmentParser } from "@geekmidas/envkit";
|
|
8
6
|
import { Logger } from "@geekmidas/logger";
|
|
9
|
-
import {
|
|
7
|
+
import { ConstructName, Declaration, Dependency } from "@geekmidas/manifest";
|
|
10
8
|
import { Telescope } from "@geekmidas/telescope";
|
|
11
|
-
|
|
12
9
|
//#region src/rest-api.d.ts
|
|
13
|
-
|
|
14
|
-
|
|
10
|
+
/** The factory a surface builds its endpoints from. */
|
|
11
|
+
type Endpoints = EndpointFactory<[], '', Logger>;
|
|
12
|
+
export interface RestApiConfig<TAuthorizers extends readonly string[] = readonly []> {
|
|
15
13
|
/**
|
|
16
|
-
* The app that serves this surface
|
|
17
|
-
*
|
|
18
|
-
*
|
|
19
|
-
*
|
|
20
|
-
*
|
|
21
|
-
*
|
|
22
|
-
*
|
|
23
|
-
*
|
|
24
|
-
*
|
|
25
|
-
* gets its process by inference gets it from whatever happened to reference
|
|
26
|
-
* it, and that was the thing worth removing.
|
|
27
|
-
*
|
|
28
|
-
* So this is an override and nothing else. Everything in it follows from
|
|
29
|
-
* this construct's id — `apps/<kebab-id>` where that directory exists, the
|
|
30
|
-
* conventional code directories under it, a port assigned in a stable
|
|
31
|
-
* order. Write one when the layout genuinely differs:
|
|
32
|
-
* `app: { path: 'services/api' }`.
|
|
14
|
+
* The app that serves this surface, relative to the workspace root —
|
|
15
|
+
* `'apps/api'`, or `'.'` in a single-app project.
|
|
16
|
+
*
|
|
17
|
+
* Required. It was inferred from the id (`apps/<kebab-id>`, or the root
|
|
18
|
+
* when no such directory existed), which meant a surface's home was
|
|
19
|
+
* whatever happened to be on disk. It is where the app's `package.json`
|
|
20
|
+
* and base `tsconfig.json` are, and which build serves this surface. It
|
|
21
|
+
* does not change discovery: constructs still load from the workspace's
|
|
22
|
+
* `constructs` glob.
|
|
33
23
|
*/
|
|
34
|
-
|
|
24
|
+
path: string;
|
|
25
|
+
/**
|
|
26
|
+
* The label it answers on under a stage's domain — `api` for
|
|
27
|
+
* `api.myapp.com`, from `domains` — and under the project locally,
|
|
28
|
+
* `api.myapp.localhost`. Absent, its id kebab-cased.
|
|
29
|
+
*/
|
|
30
|
+
subdomain?: string;
|
|
35
31
|
/**
|
|
36
32
|
* CORS tunables. The *origins* are never here — they are read off the
|
|
37
33
|
* constructs that declared an edge to this surface, which is the whole point
|
|
@@ -94,23 +90,35 @@ interface RestApiConfig<TAuthorizers extends readonly string[] = readonly []> {
|
|
|
94
90
|
* printed an import for. The entry already imports the surface.
|
|
95
91
|
*/
|
|
96
92
|
telescope?: Telescope;
|
|
93
|
+
/**
|
|
94
|
+
* What this surface's process emits — the `Telemetry` construct, passed
|
|
95
|
+
* like the logger: a fact about the process, not a grant to a route.
|
|
96
|
+
*
|
|
97
|
+
* An edge to the node, so the deploy hands this process the `OTEL_*` keys
|
|
98
|
+
* its stage resolves, and the build fails without the OpenTelemetry
|
|
99
|
+
* packages. Where the telemetry goes is never here: it is the deploy's,
|
|
100
|
+
* per stage.
|
|
101
|
+
*/
|
|
102
|
+
telemetry?: Telemetry;
|
|
97
103
|
}
|
|
98
104
|
/**
|
|
99
105
|
* What is *not* here, and why.
|
|
100
106
|
*
|
|
101
|
-
* `dependsOn`, `database`, `auditor` and `
|
|
107
|
+
* `dependsOn`, `database`, `auditor` and `.event(topic, …)` all inject a capability
|
|
102
108
|
* into a handler. Putting one on the surface hands it to every route the
|
|
103
109
|
* surface serves — a health check gets the database because a report needed it
|
|
104
110
|
* — which is the thing least privilege forbids and the reason `.calls()` is not
|
|
105
|
-
* spelled `dependsOn`. They belong to the endpoint, or to a
|
|
106
|
-
*
|
|
111
|
+
* spelled `dependsOn`. They belong to the endpoint, or to a branch —
|
|
112
|
+
* `api.database(db)` — for a group of endpoints that genuinely share them. A
|
|
113
|
+
* branch is a new factory; the surface config stays free of grants.
|
|
107
114
|
*
|
|
108
115
|
* `auth` is not here either: `.auth(construct)` already declares it, and a
|
|
109
116
|
* second way to say the same thing is the duplication this whole model removes.
|
|
110
117
|
*
|
|
111
118
|
* What is left is what the *process* is rather than what a route may reach.
|
|
112
119
|
*/
|
|
113
|
-
declare class RestApi<TName extends string = string, const TAuthorizers extends readonly string[] = readonly []> implements Declarable<TName> {
|
|
120
|
+
export declare class RestApi<TName extends string = string, const TAuthorizers extends readonly string[] = readonly []> implements Declarable<TName> {
|
|
121
|
+
#private;
|
|
114
122
|
private readonly config;
|
|
115
123
|
/** Internal: how `.calls()` carries edges into the copy it returns. */
|
|
116
124
|
private readonly dependencies;
|
|
@@ -146,34 +154,46 @@ declare class RestApi<TName extends string = string, const TAuthorizers extends
|
|
|
146
154
|
readonly envParser: EnvironmentParser<{}>;
|
|
147
155
|
/** The Telescope instance, when this surface was given one. */
|
|
148
156
|
readonly telescope?: Telescope;
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
157
|
+
/** What this surface's process emits, when it was given a `Telemetry`. */
|
|
158
|
+
readonly telemetry?: Telemetry;
|
|
159
|
+
constructor(id: ConstructName<TName>, config: RestApiConfig<TAuthorizers>,
|
|
160
|
+
/** Internal: how `.calls()` carries edges into the copy it returns. */
|
|
161
|
+
dependencies?: readonly Dependency[],
|
|
162
|
+
/** Internal: how `.auth()` carries the authenticator into its copy. */
|
|
163
|
+
authenticator?: Authenticator | undefined);
|
|
164
|
+
/** `api.get('/users')` — one route on this surface. */
|
|
165
|
+
readonly get: Endpoints['get'];
|
|
166
|
+
readonly post: Endpoints['post'];
|
|
167
|
+
readonly put: Endpoints['put'];
|
|
168
|
+
readonly patch: Endpoints['patch'];
|
|
169
|
+
readonly delete: Endpoints['delete'];
|
|
170
|
+
readonly options: Endpoints['options'];
|
|
152
171
|
/**
|
|
153
|
-
*
|
|
154
|
-
*
|
|
155
|
-
* `api.get('/users')` is the short form and covers most routes. Reach for
|
|
156
|
-
* this one when a *group* of endpoints shares something a single route would
|
|
157
|
-
* otherwise repeat — a database, an auditor, a publisher:
|
|
172
|
+
* A branch for a *group* of endpoints that shares what a single route would
|
|
173
|
+
* otherwise repeat — a database, an auditor, a publisher, a session:
|
|
158
174
|
*
|
|
159
175
|
* ```ts
|
|
160
|
-
* const
|
|
161
|
-
* export const createUser =
|
|
176
|
+
* export const router = api.database(database);
|
|
177
|
+
* export const createUser = router.post('/users').handle(({ db }) => …);
|
|
162
178
|
* ```
|
|
163
179
|
*
|
|
164
|
-
*
|
|
165
|
-
*
|
|
166
|
-
*
|
|
167
|
-
*
|
|
180
|
+
* Each returns a new factory and leaves the surface as it was. That is the
|
|
181
|
+
* whole difference from putting the same thing in the surface's config: a
|
|
182
|
+
* group opts in, where the surface would grant it to every route it serves —
|
|
183
|
+
* a health check handed the database because a profile endpoint needed it.
|
|
184
|
+
*
|
|
185
|
+
* `dependsOn` is deliberately not here. It is per endpoint, and on the
|
|
186
|
+
* surface it would read as the API depending on something, which is what
|
|
187
|
+
* `.calls()` and `.auth()` say instead.
|
|
168
188
|
*/
|
|
169
|
-
readonly
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
189
|
+
readonly database: Endpoints['database'];
|
|
190
|
+
readonly session: Endpoints['session'];
|
|
191
|
+
readonly auditor: Endpoints['auditor'];
|
|
192
|
+
readonly actor: Endpoints['actor'];
|
|
193
|
+
readonly authorizer: Endpoints['authorizer'];
|
|
194
|
+
readonly authorize: Endpoints['authorize'];
|
|
195
|
+
readonly rls: Endpoints['rls'];
|
|
196
|
+
readonly route: Endpoints['route'];
|
|
177
197
|
/**
|
|
178
198
|
* What authenticates this surface.
|
|
179
199
|
*
|
|
@@ -183,12 +203,13 @@ declare class RestApi<TName extends string = string, const TAuthorizers extends
|
|
|
183
203
|
* what a request is allowed to be. A surface with two of the first is a
|
|
184
204
|
* mistake; two of the second is Tuesday.
|
|
185
205
|
*
|
|
186
|
-
* It
|
|
187
|
-
*
|
|
188
|
-
*
|
|
189
|
-
*
|
|
206
|
+
* It declares the id, and keeps the construct: a session callback reads from
|
|
207
|
+
* it as `auth` — `session(async ({ auth }) => auth.getSession())` — which
|
|
208
|
+
* calls the construct's `verify(headers)`. That is the one thing every
|
|
209
|
+
* provider shares, whether the server is mounted in this process, deployed
|
|
210
|
+
* beside it, or an OIDC issuer somebody else runs.
|
|
190
211
|
*/
|
|
191
|
-
auth(construct:
|
|
212
|
+
auth(construct: Authenticator): RestApi<TName, TAuthorizers>;
|
|
192
213
|
/**
|
|
193
214
|
* Other surfaces this one calls.
|
|
194
215
|
*
|
|
@@ -215,7 +236,6 @@ declare class RestApi<TName extends string = string, const TAuthorizers extends
|
|
|
215
236
|
*/
|
|
216
237
|
declare(): Declaration[];
|
|
217
238
|
}
|
|
218
|
-
//# sourceMappingURL=rest-api.d.ts.map
|
|
219
239
|
//#endregion
|
|
220
|
-
export {
|
|
240
|
+
export type { Authenticator };
|
|
221
241
|
//# sourceMappingURL=rest-api.d.cts.map
|
package/dist/rest-api.d.cts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"rest-api.d.cts","names":[],"sources":["../src/rest-api.ts"],"
|
|
1
|
+
{"version":3,"file":"rest-api.d.cts","names":[],"sources":["../src/rest-api.ts"],"mappings":";;;;;;;;;;KAmDK,YAAY,wBAAwB;iBAExB,cAIhB;;;;;;;;;;;;EAaA;;;;;;EAMA;;;;;;EAMA;IACC;IACA;IACA;IACA;;;;;;;EAOD,cAAc;;;;;;;;;;;;;;;;;;;EAmBd,mBAAmB,uBAAuB;;;;;;;;;;EAU1C,SAAS;;;;;;;;EAQT,YAAY;;;;;;;;EAQZ,YAAY;;;;;;;;;;EAUZ,YAAY;;;;;;;;;;;;;;;;;;qBAoBA,QACZ,qCACM,iEACM,WAAW;;mBA0CL;;mBAEA;;mBAEA;WA5CT,IAAI;;;;;;WAOJ;IACR;IACA;IACA;;;;;;;;;WAUQ,QAAQ;;;;;;;;;WAUR,WAAW;;WAGX,YAAY;;WAGZ,YAAY;EAErB,YACC,IAAI,cAAc,QACD,QAAQ,cAAc,eAEtB;;EAAA,wBAAuB,cAEvB;;EAAA,gBAAgB;;WAyEzB,KAAK;WACL,MAAM;WACN,KAAK;WACL,OAAO;WACP,QAAQ;WACR,SAAS;;;;;;;;;;;;;;;;;;;WAoBT,UAAU;WACV,SAAS;WACT,SAAS;WACT,OAAO;WACP,YAAY;WACZ,WAAW;WACX,KAAK;WACL,OAAO;;;;;;;;;;;;;;;;EAiBhB,KAAK,WAAW,gBAAgB,QAAQ,OAAO;;;;;;;;;;;;;;;EAuB/C,MAAM,qBAAqB,eAAe,QAAQ,OAAO;;;;;;;;;;EAkBzD,WAAW"}
|
package/dist/rest-api.d.mts
CHANGED
|
@@ -1,37 +1,33 @@
|
|
|
1
|
-
import "./
|
|
2
|
-
import "./
|
|
3
|
-
import {
|
|
4
|
-
import "./
|
|
5
|
-
import {
|
|
6
|
-
import { EndpointBuilder, EndpointFactory, RemoveTrailingSlash } from "./index-Cvz551AO.mjs";
|
|
7
|
-
import { AppSpec, ConstructName, Declaration, Dependency } from "@geekmidas/manifest";
|
|
1
|
+
import { i as Declarable, t as Authenticator } from "./construct-interface-DluK3_da.mjs";
|
|
2
|
+
import { n as Telemetry } from "./telemetry-DRtT1_0A.mjs";
|
|
3
|
+
import { T as BuiltInSecuritySchemeId } from "./Endpoint-Du-NwPX2.mjs";
|
|
4
|
+
import { t as EndpointFactory } from "./EndpointFactory-DMYdJCOj.mjs";
|
|
5
|
+
import { ConstructName, Declaration, Dependency } from "@geekmidas/manifest";
|
|
8
6
|
import { EnvironmentParser } from "@geekmidas/envkit";
|
|
9
7
|
import { Logger } from "@geekmidas/logger";
|
|
10
8
|
import { Telescope } from "@geekmidas/telescope";
|
|
11
|
-
|
|
12
9
|
//#region src/rest-api.d.ts
|
|
13
|
-
|
|
14
|
-
|
|
10
|
+
/** The factory a surface builds its endpoints from. */
|
|
11
|
+
type Endpoints = EndpointFactory<[], '', Logger>;
|
|
12
|
+
export interface RestApiConfig<TAuthorizers extends readonly string[] = readonly []> {
|
|
15
13
|
/**
|
|
16
|
-
* The app that serves this surface
|
|
17
|
-
*
|
|
18
|
-
*
|
|
19
|
-
*
|
|
20
|
-
*
|
|
21
|
-
*
|
|
22
|
-
*
|
|
23
|
-
*
|
|
24
|
-
*
|
|
25
|
-
* gets its process by inference gets it from whatever happened to reference
|
|
26
|
-
* it, and that was the thing worth removing.
|
|
27
|
-
*
|
|
28
|
-
* So this is an override and nothing else. Everything in it follows from
|
|
29
|
-
* this construct's id — `apps/<kebab-id>` where that directory exists, the
|
|
30
|
-
* conventional code directories under it, a port assigned in a stable
|
|
31
|
-
* order. Write one when the layout genuinely differs:
|
|
32
|
-
* `app: { path: 'services/api' }`.
|
|
14
|
+
* The app that serves this surface, relative to the workspace root —
|
|
15
|
+
* `'apps/api'`, or `'.'` in a single-app project.
|
|
16
|
+
*
|
|
17
|
+
* Required. It was inferred from the id (`apps/<kebab-id>`, or the root
|
|
18
|
+
* when no such directory existed), which meant a surface's home was
|
|
19
|
+
* whatever happened to be on disk. It is where the app's `package.json`
|
|
20
|
+
* and base `tsconfig.json` are, and which build serves this surface. It
|
|
21
|
+
* does not change discovery: constructs still load from the workspace's
|
|
22
|
+
* `constructs` glob.
|
|
33
23
|
*/
|
|
34
|
-
|
|
24
|
+
path: string;
|
|
25
|
+
/**
|
|
26
|
+
* The label it answers on under a stage's domain — `api` for
|
|
27
|
+
* `api.myapp.com`, from `domains` — and under the project locally,
|
|
28
|
+
* `api.myapp.localhost`. Absent, its id kebab-cased.
|
|
29
|
+
*/
|
|
30
|
+
subdomain?: string;
|
|
35
31
|
/**
|
|
36
32
|
* CORS tunables. The *origins* are never here — they are read off the
|
|
37
33
|
* constructs that declared an edge to this surface, which is the whole point
|
|
@@ -94,23 +90,35 @@ interface RestApiConfig<TAuthorizers extends readonly string[] = readonly []> {
|
|
|
94
90
|
* printed an import for. The entry already imports the surface.
|
|
95
91
|
*/
|
|
96
92
|
telescope?: Telescope;
|
|
93
|
+
/**
|
|
94
|
+
* What this surface's process emits — the `Telemetry` construct, passed
|
|
95
|
+
* like the logger: a fact about the process, not a grant to a route.
|
|
96
|
+
*
|
|
97
|
+
* An edge to the node, so the deploy hands this process the `OTEL_*` keys
|
|
98
|
+
* its stage resolves, and the build fails without the OpenTelemetry
|
|
99
|
+
* packages. Where the telemetry goes is never here: it is the deploy's,
|
|
100
|
+
* per stage.
|
|
101
|
+
*/
|
|
102
|
+
telemetry?: Telemetry;
|
|
97
103
|
}
|
|
98
104
|
/**
|
|
99
105
|
* What is *not* here, and why.
|
|
100
106
|
*
|
|
101
|
-
* `dependsOn`, `database`, `auditor` and `
|
|
107
|
+
* `dependsOn`, `database`, `auditor` and `.event(topic, …)` all inject a capability
|
|
102
108
|
* into a handler. Putting one on the surface hands it to every route the
|
|
103
109
|
* surface serves — a health check gets the database because a report needed it
|
|
104
110
|
* — which is the thing least privilege forbids and the reason `.calls()` is not
|
|
105
|
-
* spelled `dependsOn`. They belong to the endpoint, or to a
|
|
106
|
-
*
|
|
111
|
+
* spelled `dependsOn`. They belong to the endpoint, or to a branch —
|
|
112
|
+
* `api.database(db)` — for a group of endpoints that genuinely share them. A
|
|
113
|
+
* branch is a new factory; the surface config stays free of grants.
|
|
107
114
|
*
|
|
108
115
|
* `auth` is not here either: `.auth(construct)` already declares it, and a
|
|
109
116
|
* second way to say the same thing is the duplication this whole model removes.
|
|
110
117
|
*
|
|
111
118
|
* What is left is what the *process* is rather than what a route may reach.
|
|
112
119
|
*/
|
|
113
|
-
declare class RestApi<TName extends string = string, const TAuthorizers extends readonly string[] = readonly []> implements Declarable<TName> {
|
|
120
|
+
export declare class RestApi<TName extends string = string, const TAuthorizers extends readonly string[] = readonly []> implements Declarable<TName> {
|
|
121
|
+
#private;
|
|
114
122
|
private readonly config;
|
|
115
123
|
/** Internal: how `.calls()` carries edges into the copy it returns. */
|
|
116
124
|
private readonly dependencies;
|
|
@@ -146,34 +154,46 @@ declare class RestApi<TName extends string = string, const TAuthorizers extends
|
|
|
146
154
|
readonly envParser: EnvironmentParser<{}>;
|
|
147
155
|
/** The Telescope instance, when this surface was given one. */
|
|
148
156
|
readonly telescope?: Telescope;
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
157
|
+
/** What this surface's process emits, when it was given a `Telemetry`. */
|
|
158
|
+
readonly telemetry?: Telemetry;
|
|
159
|
+
constructor(id: ConstructName<TName>, config: RestApiConfig<TAuthorizers>,
|
|
160
|
+
/** Internal: how `.calls()` carries edges into the copy it returns. */
|
|
161
|
+
dependencies?: readonly Dependency[],
|
|
162
|
+
/** Internal: how `.auth()` carries the authenticator into its copy. */
|
|
163
|
+
authenticator?: Authenticator | undefined);
|
|
164
|
+
/** `api.get('/users')` — one route on this surface. */
|
|
165
|
+
readonly get: Endpoints['get'];
|
|
166
|
+
readonly post: Endpoints['post'];
|
|
167
|
+
readonly put: Endpoints['put'];
|
|
168
|
+
readonly patch: Endpoints['patch'];
|
|
169
|
+
readonly delete: Endpoints['delete'];
|
|
170
|
+
readonly options: Endpoints['options'];
|
|
152
171
|
/**
|
|
153
|
-
*
|
|
154
|
-
*
|
|
155
|
-
* `api.get('/users')` is the short form and covers most routes. Reach for
|
|
156
|
-
* this one when a *group* of endpoints shares something a single route would
|
|
157
|
-
* otherwise repeat — a database, an auditor, a publisher:
|
|
172
|
+
* A branch for a *group* of endpoints that shares what a single route would
|
|
173
|
+
* otherwise repeat — a database, an auditor, a publisher, a session:
|
|
158
174
|
*
|
|
159
175
|
* ```ts
|
|
160
|
-
* const
|
|
161
|
-
* export const createUser =
|
|
176
|
+
* export const router = api.database(database);
|
|
177
|
+
* export const createUser = router.post('/users').handle(({ db }) => …);
|
|
162
178
|
* ```
|
|
163
179
|
*
|
|
164
|
-
*
|
|
165
|
-
*
|
|
166
|
-
*
|
|
167
|
-
*
|
|
180
|
+
* Each returns a new factory and leaves the surface as it was. That is the
|
|
181
|
+
* whole difference from putting the same thing in the surface's config: a
|
|
182
|
+
* group opts in, where the surface would grant it to every route it serves —
|
|
183
|
+
* a health check handed the database because a profile endpoint needed it.
|
|
184
|
+
*
|
|
185
|
+
* `dependsOn` is deliberately not here. It is per endpoint, and on the
|
|
186
|
+
* surface it would read as the API depending on something, which is what
|
|
187
|
+
* `.calls()` and `.auth()` say instead.
|
|
168
188
|
*/
|
|
169
|
-
readonly
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
189
|
+
readonly database: Endpoints['database'];
|
|
190
|
+
readonly session: Endpoints['session'];
|
|
191
|
+
readonly auditor: Endpoints['auditor'];
|
|
192
|
+
readonly actor: Endpoints['actor'];
|
|
193
|
+
readonly authorizer: Endpoints['authorizer'];
|
|
194
|
+
readonly authorize: Endpoints['authorize'];
|
|
195
|
+
readonly rls: Endpoints['rls'];
|
|
196
|
+
readonly route: Endpoints['route'];
|
|
177
197
|
/**
|
|
178
198
|
* What authenticates this surface.
|
|
179
199
|
*
|
|
@@ -183,12 +203,13 @@ declare class RestApi<TName extends string = string, const TAuthorizers extends
|
|
|
183
203
|
* what a request is allowed to be. A surface with two of the first is a
|
|
184
204
|
* mistake; two of the second is Tuesday.
|
|
185
205
|
*
|
|
186
|
-
* It
|
|
187
|
-
*
|
|
188
|
-
*
|
|
189
|
-
*
|
|
206
|
+
* It declares the id, and keeps the construct: a session callback reads from
|
|
207
|
+
* it as `auth` — `session(async ({ auth }) => auth.getSession())` — which
|
|
208
|
+
* calls the construct's `verify(headers)`. That is the one thing every
|
|
209
|
+
* provider shares, whether the server is mounted in this process, deployed
|
|
210
|
+
* beside it, or an OIDC issuer somebody else runs.
|
|
190
211
|
*/
|
|
191
|
-
auth(construct:
|
|
212
|
+
auth(construct: Authenticator): RestApi<TName, TAuthorizers>;
|
|
192
213
|
/**
|
|
193
214
|
* Other surfaces this one calls.
|
|
194
215
|
*
|
|
@@ -215,7 +236,6 @@ declare class RestApi<TName extends string = string, const TAuthorizers extends
|
|
|
215
236
|
*/
|
|
216
237
|
declare(): Declaration[];
|
|
217
238
|
}
|
|
218
|
-
//# sourceMappingURL=rest-api.d.ts.map
|
|
219
239
|
//#endregion
|
|
220
|
-
export {
|
|
240
|
+
export type { Authenticator };
|
|
221
241
|
//# sourceMappingURL=rest-api.d.mts.map
|
package/dist/rest-api.d.mts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"rest-api.d.mts","names":[],"sources":["../src/rest-api.ts"],"
|
|
1
|
+
{"version":3,"file":"rest-api.d.mts","names":[],"sources":["../src/rest-api.ts"],"mappings":";;;;;;;;;;KAmDK,YAAY,wBAAwB;iBAExB,cAIhB;;;;;;;;;;;;EAaA;;;;;;EAMA;;;;;;EAMA;IACC;IACA;IACA;IACA;;;;;;;EAOD,cAAc;;;;;;;;;;;;;;;;;;;EAmBd,mBAAmB,uBAAuB;;;;;;;;;;EAU1C,SAAS;;;;;;;;EAQT,YAAY;;;;;;;;EAQZ,YAAY;;;;;;;;;;EAUZ,YAAY;;;;;;;;;;;;;;;;;;qBAoBA,QACZ,qCACM,iEACM,WAAW;;mBA0CL;;mBAEA;;mBAEA;WA5CT,IAAI;;;;;;WAOJ;IACR;IACA;IACA;;;;;;;;;WAUQ,QAAQ;;;;;;;;;WAUR,WAAW;;WAGX,YAAY;;WAGZ,YAAY;EAErB,YACC,IAAI,cAAc,QACD,QAAQ,cAAc,eAEtB;;EAAA,wBAAuB,cAEvB;;EAAA,gBAAgB;;WAyEzB,KAAK;WACL,MAAM;WACN,KAAK;WACL,OAAO;WACP,QAAQ;WACR,SAAS;;;;;;;;;;;;;;;;;;;WAoBT,UAAU;WACV,SAAS;WACT,SAAS;WACT,OAAO;WACP,YAAY;WACZ,WAAW;WACX,KAAK;WACL,OAAO;;;;;;;;;;;;;;;;EAiBhB,KAAK,WAAW,gBAAgB,QAAQ,OAAO;;;;;;;;;;;;;;;EAuB/C,MAAM,qBAAqB,eAAe,QAAQ,OAAO;;;;;;;;;;EAkBzD,WAAW"}
|