gemi 0.56.0 → 0.58.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/app/index.js +1 -1
- package/dist/broadcasting/index.js +1 -1
- package/dist/bun/plugin.js +1 -1
- package/dist/bun/preload.js +1 -1
- package/dist/{chunk-jdj7k3r9.js → chunk-0a2xgcj3.js} +2 -2
- package/dist/{chunk-jdj7k3r9.js.map → chunk-0a2xgcj3.js.map} +1 -1
- package/dist/{chunk-3e88tyee.js → chunk-3337e5g0.js} +2 -2
- package/dist/{chunk-3e88tyee.js.map → chunk-3337e5g0.js.map} +1 -1
- package/dist/chunk-3aa287k7.js +6 -0
- package/dist/{chunk-cv9w5cmb.js.map → chunk-3aa287k7.js.map} +2 -2
- package/dist/{chunk-01am9k5v.js → chunk-3g5bjvdf.js} +2 -2
- package/dist/{chunk-01am9k5v.js.map → chunk-3g5bjvdf.js.map} +1 -1
- package/dist/{chunk-w9k9s4wh.js → chunk-3xadx444.js} +2 -2
- package/dist/{chunk-w9k9s4wh.js.map → chunk-3xadx444.js.map} +1 -1
- package/dist/{chunk-npg72mez.js → chunk-3zxwscmf.js} +2 -2
- package/dist/{chunk-kgmr9qxx.js.map → chunk-3zxwscmf.js.map} +1 -1
- package/dist/{chunk-64s1pzz1.js → chunk-437085pe.js} +2 -2
- package/dist/{chunk-64s1pzz1.js.map → chunk-437085pe.js.map} +1 -1
- package/dist/{chunk-eqrd31ye.js → chunk-4yt5x8s2.js} +2 -2
- package/dist/{chunk-eqrd31ye.js.map → chunk-4yt5x8s2.js.map} +1 -1
- package/dist/{chunk-9r0sb4zn.js → chunk-5athahgr.js} +2 -2
- package/dist/{chunk-9r0sb4zn.js.map → chunk-5athahgr.js.map} +1 -1
- package/dist/{chunk-g30q4n5y.js → chunk-5n2rvfh3.js} +2 -2
- package/dist/{chunk-g30q4n5y.js.map → chunk-5n2rvfh3.js.map} +1 -1
- package/dist/{chunk-1zfsgffv.js → chunk-6235kb30.js} +3 -3
- package/dist/{chunk-1zfsgffv.js.map → chunk-6235kb30.js.map} +1 -1
- package/dist/{chunk-javjeayw.js → chunk-7b0x860b.js} +2 -2
- package/dist/{chunk-javjeayw.js.map → chunk-7b0x860b.js.map} +1 -1
- package/dist/{chunk-4qwwy968.js → chunk-7ef5n8k2.js} +2 -2
- package/dist/{chunk-4qwwy968.js.map → chunk-7ef5n8k2.js.map} +1 -1
- package/dist/{chunk-q0waxxz5.js → chunk-7j6wbv12.js} +2 -2
- package/dist/{chunk-q0waxxz5.js.map → chunk-7j6wbv12.js.map} +1 -1
- package/dist/chunk-86jebsm4.js +9 -0
- package/dist/{chunk-kry5vwam.js.map → chunk-86jebsm4.js.map} +3 -3
- package/dist/chunk-87qab82w.js +5 -0
- package/dist/chunk-87qab82w.js.map +37 -0
- package/dist/{chunk-36pg61vt.js → chunk-8gew8b9a.js} +2 -2
- package/dist/{chunk-36pg61vt.js.map → chunk-8gew8b9a.js.map} +1 -1
- package/dist/{chunk-v6v6sem5.js → chunk-9m2tbf3n.js} +2 -2
- package/dist/{chunk-v6v6sem5.js.map → chunk-9m2tbf3n.js.map} +1 -1
- package/dist/{chunk-gzdf2025.js → chunk-a2sgjpvq.js} +2 -2
- package/dist/{chunk-gzdf2025.js.map → chunk-a2sgjpvq.js.map} +1 -1
- package/dist/chunk-b35e128b.js +5 -0
- package/dist/{chunk-b50zmz3t.js.map → chunk-b35e128b.js.map} +1 -1
- package/dist/{chunk-ct274qts.js → chunk-cyaz97p5.js} +2 -2
- package/dist/{chunk-ct274qts.js.map → chunk-cyaz97p5.js.map} +1 -1
- package/dist/{chunk-v06qcyj5.js → chunk-d125j8t0.js} +3 -3
- package/dist/{chunk-v06qcyj5.js.map → chunk-d125j8t0.js.map} +1 -1
- package/dist/{chunk-hs5v3eqj.js → chunk-dgsgjg53.js} +2 -2
- package/dist/{chunk-hs5v3eqj.js.map → chunk-dgsgjg53.js.map} +1 -1
- package/dist/{chunk-xjy5apyr.js → chunk-eejmhtnc.js} +2 -2
- package/dist/{chunk-xjy5apyr.js.map → chunk-eejmhtnc.js.map} +1 -1
- package/dist/{chunk-3y75q5a2.js → chunk-fjm4y8bn.js} +2 -2
- package/dist/{chunk-3y75q5a2.js.map → chunk-fjm4y8bn.js.map} +1 -1
- package/dist/{chunk-9c89q2mz.js → chunk-grdahng8.js} +2 -2
- package/dist/{chunk-9c89q2mz.js.map → chunk-grdahng8.js.map} +1 -1
- package/dist/{chunk-699z6d8y.js → chunk-gw6agevz.js} +3 -3
- package/dist/{chunk-699z6d8y.js.map → chunk-gw6agevz.js.map} +1 -1
- package/dist/{chunk-62ke19q4.js → chunk-hppagzz4.js} +4 -4
- package/dist/{chunk-62ke19q4.js.map → chunk-hppagzz4.js.map} +1 -1
- package/dist/chunk-hwa5sqw5.js +19 -0
- package/dist/{chunk-tmnhkphv.js.map → chunk-hwa5sqw5.js.map} +12 -6
- package/dist/chunk-hxf1re93.js +4 -0
- package/dist/{chunk-vkngcrzq.js.map → chunk-hxf1re93.js.map} +6 -5
- package/dist/{chunk-d36dfqxw.js → chunk-j0c6ytkj.js} +3 -3
- package/dist/{chunk-d36dfqxw.js.map → chunk-j0c6ytkj.js.map} +1 -1
- package/dist/{chunk-kgmr9qxx.js → chunk-jhkjz9jr.js} +2 -2
- package/dist/{chunk-npg72mez.js.map → chunk-jhkjz9jr.js.map} +1 -1
- package/dist/{chunk-62723jyy.js → chunk-k0fvsyeh.js} +1 -1
- package/dist/{chunk-31kcf7dq.js → chunk-keehyx51.js} +2 -2
- package/dist/{chunk-31kcf7dq.js.map → chunk-keehyx51.js.map} +1 -1
- package/dist/{chunk-enhkf60v.js → chunk-m3xy5xyf.js} +2 -2
- package/dist/{chunk-enhkf60v.js.map → chunk-m3xy5xyf.js.map} +1 -1
- package/dist/{chunk-c75mymmq.js → chunk-mkfpnymy.js} +1 -1
- package/dist/{chunk-rgb69nh1.js → chunk-mwpdp09e.js} +2 -2
- package/dist/{chunk-rgb69nh1.js.map → chunk-mwpdp09e.js.map} +1 -1
- package/dist/chunk-pmhd6zfc.js +37 -0
- package/dist/chunk-pmhd6zfc.js.map +20 -0
- package/dist/chunk-qb5mv6pj.js +5 -0
- package/dist/chunk-qb5mv6pj.js.map +12 -0
- package/dist/{chunk-1pwwrpa3.js → chunk-qgxr0g36.js} +2 -2
- package/dist/{chunk-1pwwrpa3.js.map → chunk-qgxr0g36.js.map} +1 -1
- package/dist/{chunk-4yafsffx.js → chunk-sy7jbdeb.js} +2 -2
- package/dist/{chunk-4yafsffx.js.map → chunk-sy7jbdeb.js.map} +1 -1
- package/dist/{chunk-gasdfwva.js → chunk-szss069z.js} +2 -2
- package/dist/{chunk-gasdfwva.js.map → chunk-szss069z.js.map} +1 -1
- package/dist/{chunk-m0ggfy1m.js → chunk-tss5svjr.js} +2 -2
- package/dist/{chunk-m0ggfy1m.js.map → chunk-tss5svjr.js.map} +1 -1
- package/dist/{chunk-dzzmqv0j.js → chunk-vr90r27j.js} +2 -2
- package/dist/{chunk-dzzmqv0j.js.map → chunk-vr90r27j.js.map} +1 -1
- package/dist/{chunk-pvdbrt4z.js → chunk-w62m5f0n.js} +3 -3
- package/dist/{chunk-pvdbrt4z.js.map → chunk-w62m5f0n.js.map} +1 -1
- package/dist/{chunk-cn2r5jfj.js → chunk-w7rf99w6.js} +2 -2
- package/dist/{chunk-cn2r5jfj.js.map → chunk-w7rf99w6.js.map} +1 -1
- package/dist/{chunk-tja0c815.js → chunk-wbrj0gya.js} +2 -2
- package/dist/{chunk-tja0c815.js.map → chunk-wbrj0gya.js.map} +1 -1
- package/dist/{chunk-rsdg619q.js → chunk-xdv1b8mr.js} +2 -2
- package/dist/{chunk-rsdg619q.js.map → chunk-xdv1b8mr.js.map} +1 -1
- package/dist/{chunk-h3mwgbg7.js → chunk-xey9cbap.js} +2 -2
- package/dist/{chunk-h3mwgbg7.js.map → chunk-xey9cbap.js.map} +1 -1
- package/dist/{chunk-wgpa04jb.js → chunk-xzk827r3.js} +2 -2
- package/dist/{chunk-wgpa04jb.js.map → chunk-xzk827r3.js.map} +1 -1
- package/dist/{chunk-x14sk95v.js → chunk-y6a8r2bn.js} +3 -3
- package/dist/{chunk-x14sk95v.js.map → chunk-y6a8r2bn.js.map} +1 -1
- package/dist/{chunk-33wjsw4r.js → chunk-yed5whgs.js} +3 -3
- package/dist/{chunk-33wjsw4r.js.map → chunk-yed5whgs.js.map} +1 -1
- package/dist/{chunk-02gdzs5t.js → chunk-yf7vz71n.js} +1 -1
- package/dist/{chunk-y9fp58bg.js → chunk-yjzs247s.js} +2 -2
- package/dist/{chunk-y9fp58bg.js.map → chunk-yjzs247s.js.map} +1 -1
- package/dist/{chunk-kgg1eqne.js → chunk-yy0eb9wn.js} +2 -2
- package/dist/{chunk-kgg1eqne.js.map → chunk-yy0eb9wn.js.map} +1 -1
- package/dist/{chunk-4xx78ba9.js → chunk-zbxgbr12.js} +2 -2
- package/dist/{chunk-4xx78ba9.js.map → chunk-zbxgbr12.js.map} +1 -1
- package/dist/{chunk-8k1zqrvh.js → chunk-zh2egcyb.js} +2 -2
- package/dist/{chunk-8k1zqrvh.js.map → chunk-zh2egcyb.js.map} +1 -1
- package/dist/chunks/ThemeProvider-li1J_igh.js.map +1 -1
- package/dist/client/ClientRouter.d.ts.map +1 -1
- package/dist/client/ProgressManager.d.ts +1 -1
- package/dist/client/RouteStateContext.d.ts +9 -0
- package/dist/client/RouteStateContext.d.ts.map +1 -1
- package/dist/client/ServerDataProvider.d.ts +7 -0
- package/dist/client/ServerDataProvider.d.ts.map +1 -1
- package/dist/client/index.d.ts +2 -1
- package/dist/client/index.d.ts.map +1 -1
- package/dist/client/index.js +68 -10
- package/dist/client/index.js.map +1 -1
- package/dist/client/rpc.d.ts +42 -0
- package/dist/client/rpc.d.ts.map +1 -1
- package/dist/client/useFeature.d.ts +40 -0
- package/dist/client/useFeature.d.ts.map +1 -0
- package/dist/config/index.js +1 -1
- package/dist/console/run.js +2 -2
- package/dist/console/run.js.map +1 -1
- package/dist/container/index.js +2 -2
- package/dist/container/index.js.map +1 -1
- package/dist/database/index.js +2 -2
- package/dist/database/index.js.map +1 -1
- package/dist/email/index.js +2 -2
- package/dist/email/index.js.map +1 -1
- package/dist/facades/Features.d.ts +57 -0
- package/dist/facades/Features.d.ts.map +1 -0
- package/dist/facades/index.d.ts +1 -0
- package/dist/facades/index.d.ts.map +1 -1
- package/dist/facades/index.js +2 -2
- package/dist/facades/index.js.map +1 -1
- package/dist/foundation/index.js +2 -2
- package/dist/foundation/index.js.map +1 -1
- package/dist/gemi.d.ts +13 -5
- package/dist/http/ApiRouter.d.ts +3 -2
- package/dist/http/ApiRouter.d.ts.map +1 -1
- package/dist/http/HttpRequest.d.ts +4 -0
- package/dist/http/HttpRequest.d.ts.map +1 -1
- package/dist/http/ViewRouter.d.ts +127 -4
- package/dist/http/ViewRouter.d.ts.map +1 -1
- package/dist/http/index.d.ts +1 -0
- package/dist/http/index.d.ts.map +1 -1
- package/dist/http/index.js +2 -2
- package/dist/http/index.js.map +1 -1
- package/dist/http/middlewareList.d.ts +25 -0
- package/dist/http/middlewareList.d.ts.map +1 -0
- package/dist/http/requestContext.d.ts +57 -0
- package/dist/http/requestContext.d.ts.map +1 -1
- package/dist/i18n/dictionaryRuntime.js +2 -2
- package/dist/i18n/dictionaryRuntime.js.map +1 -1
- package/dist/i18n/index.js +2 -2
- package/dist/i18n/index.js.map +1 -1
- package/dist/ide/typescript-plugin/index.js +1206 -0
- package/dist/ide/typescript-plugin/index.js.map +17 -0
- package/dist/kernel/index.js +3 -3
- package/dist/kernel/index.js.map +3 -3
- package/dist/kernel/providers.d.ts +16 -4
- package/dist/kernel/providers.d.ts.map +1 -1
- package/dist/orm/context.d.ts +65 -0
- package/dist/orm/context.d.ts.map +1 -1
- package/dist/orm/index.js +2 -2
- package/dist/orm/index.js.map +1 -1
- package/dist/server/index.js +2 -2
- package/dist/server/index.js.map +1 -1
- package/dist/services/discovery.d.ts +27 -0
- package/dist/services/discovery.d.ts.map +1 -1
- package/dist/services/events/Event.d.ts +208 -0
- package/dist/services/events/Event.d.ts.map +1 -0
- package/dist/services/events/EventManager.d.ts +285 -0
- package/dist/services/events/EventManager.d.ts.map +1 -0
- package/dist/services/events/EventServiceProvider.d.ts +46 -0
- package/dist/services/events/EventServiceProvider.d.ts.map +1 -0
- package/dist/services/events/FakeEventManager.d.ts +155 -0
- package/dist/services/events/FakeEventManager.d.ts.map +1 -0
- package/dist/services/events/FakeEventManager.test-d.d.ts +2 -0
- package/dist/services/events/FakeEventManager.test-d.d.ts.map +1 -0
- package/dist/services/events/Listener.d.ts +189 -0
- package/dist/services/events/Listener.d.ts.map +1 -0
- package/dist/services/events/Listener.test-d.d.ts +2 -0
- package/dist/services/events/Listener.test-d.d.ts.map +1 -0
- package/dist/services/events/config.d.ts +55 -0
- package/dist/services/events/config.d.ts.map +1 -0
- package/dist/services/events/listenerJob.d.ts +43 -0
- package/dist/services/events/listenerJob.d.ts.map +1 -0
- package/dist/services/features/FeatureFlagStore.d.ts +60 -0
- package/dist/services/features/FeatureFlagStore.d.ts.map +1 -0
- package/dist/services/features/FeatureManager.d.ts +82 -0
- package/dist/services/features/FeatureManager.d.ts.map +1 -0
- package/dist/services/features/FeaturesServiceProvider.d.ts +6 -0
- package/dist/services/features/FeaturesServiceProvider.d.ts.map +1 -0
- package/dist/services/features/bucket.d.ts +57 -0
- package/dist/services/features/bucket.d.ts.map +1 -0
- package/dist/services/features/config.d.ts +57 -0
- package/dist/services/features/config.d.ts.map +1 -0
- package/dist/services/features/context.d.ts +31 -0
- package/dist/services/features/context.d.ts.map +1 -0
- package/dist/services/features/defineFeature.d.ts +145 -0
- package/dist/services/features/defineFeature.d.ts.map +1 -0
- package/dist/services/features/evaluate.d.ts +74 -0
- package/dist/services/features/evaluate.d.ts.map +1 -0
- package/dist/services/features/sources/DatabaseFeatureFlagSource.d.ts +19 -0
- package/dist/services/features/sources/DatabaseFeatureFlagSource.d.ts.map +1 -0
- package/dist/services/features/sources/FeatureFlagSource.d.ts +30 -0
- package/dist/services/features/sources/FeatureFlagSource.d.ts.map +1 -0
- package/dist/services/features/sources/StaticFeatureFlagSource.d.ts +24 -0
- package/dist/services/features/sources/StaticFeatureFlagSource.d.ts.map +1 -0
- package/dist/services/features/types.d.ts +63 -0
- package/dist/services/features/types.d.ts.map +1 -0
- package/dist/services/index.d.ts +18 -1
- package/dist/services/index.d.ts.map +1 -1
- package/dist/services/index.js +8 -8
- package/dist/services/index.js.map +8 -4
- package/dist/services/queue/QueueManager.d.ts +31 -0
- package/dist/services/queue/QueueManager.d.ts.map +1 -1
- package/dist/services/router/ViewRouteDispatcher.d.ts +8 -0
- package/dist/services/router/ViewRouteDispatcher.d.ts.map +1 -1
- package/dist/services/router/createFlatViewRoutes.d.ts +14 -0
- package/dist/services/router/createFlatViewRoutes.d.ts.map +1 -1
- package/dist/services/router/streamQueryInjection.d.ts.map +1 -1
- package/dist/support/index.js +2 -2
- package/dist/support/index.js.map +1 -1
- package/dist/testing/Page.d.ts +12 -0
- package/dist/testing/Page.d.ts.map +1 -1
- package/dist/testing/index.d.ts +24 -0
- package/dist/testing/index.d.ts.map +1 -1
- package/dist/testing/index.js +7 -3
- package/dist/testing/index.js.map +1 -1
- package/ide/typescript-plugin/package.json +5 -0
- package/package.json +4 -2
- package/dist/chunk-4t80js0n.js +0 -33
- package/dist/chunk-4t80js0n.js.map +0 -18
- package/dist/chunk-98a576s9.js +0 -5
- package/dist/chunk-98a576s9.js.map +0 -30
- package/dist/chunk-b50zmz3t.js +0 -5
- package/dist/chunk-cv9w5cmb.js +0 -6
- package/dist/chunk-f9mfw82d.js +0 -5
- package/dist/chunk-f9mfw82d.js.map +0 -12
- package/dist/chunk-kry5vwam.js +0 -9
- package/dist/chunk-tmnhkphv.js +0 -19
- package/dist/chunk-vkngcrzq.js +0 -4
- /package/dist/{chunk-62723jyy.js.map → chunk-k0fvsyeh.js.map} +0 -0
- /package/dist/{chunk-c75mymmq.js.map → chunk-mkfpnymy.js.map} +0 -0
- /package/dist/{chunk-02gdzs5t.js.map → chunk-yf7vz71n.js.map} +0 -0
|
@@ -5,6 +5,6 @@
|
|
|
5
5
|
"import type { Application } from \"../foundation/Application\";\n\n/**\n * Both hooks default to no-ops. `register()` binds services into the container\n * and must not resolve any of them; `boot()` runs after every provider has\n * registered, so it may resolve freely.\n */\nexport abstract class ServiceProvider {\n constructor(protected app: Application) {}\n\n register(): void {}\n\n boot(): void | Promise<void> {}\n}\n"
|
|
6
6
|
],
|
|
7
7
|
"mappings": ";AAOO,MAAe,CAAgB,CACd,IAAtB,WAAW,CAAW,EAAkB,CAAlB,WAEtB,QAAQ,EAAS,EAEjB,IAAI,EAAyB,EAC/B",
|
|
8
|
-
"debugId": "
|
|
8
|
+
"debugId": "D91DDD29A297152464756E2164756E21",
|
|
9
9
|
"names": []
|
|
10
10
|
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
// @bun
|
|
2
|
-
import{P as J}from"./chunk-
|
|
2
|
+
import{P as J}from"./chunk-tss5svjr.js";import{Ef as I}from"./chunk-jhkjz9jr.js";var Z=I((Q)=>{var K=J(),L=(b)=>{return{setHttpHandler(j){b.httpHandler=j},httpHandler(){return b.httpHandler},updateHttpClientConfig(j,w){b.httpHandler?.updateHttpClientConfig(j,w)},httpHandlerConfigs(){return b.httpHandler.httpHandlerConfigs()}}},M=(b)=>{return{httpHandler:b.httpHandler()}};class B{name;kind;values;constructor({name:b,kind:j=K.FieldPosition.HEADER,values:w=[]}){this.name=b,this.kind=j,this.values=w}add(b){this.values.push(b)}set(b){this.values=b}remove(b){this.values=this.values.filter((j)=>j!==b)}toString(){return this.values.map((b)=>b.includes(",")||b.includes(" ")?`"${b}"`:b).join(", ")}get(){return this.values}}class D{entries={};encoding;constructor({fields:b=[],encoding:j="utf-8"}){b.forEach(this.setField.bind(this)),this.encoding=j}setField(b){this.entries[b.name.toLowerCase()]=b}getField(b){return this.entries[b.toLowerCase()]}removeField(b){delete this.entries[b.toLowerCase()]}getByType(b){return Object.values(this.entries).filter((j)=>j.kind===b)}}class z{method;protocol;hostname;port;path;query;headers;username;password;fragment;body;constructor(b){this.method=b.method||"GET",this.hostname=b.hostname||"localhost",this.port=b.port,this.query=b.query||{},this.headers=b.headers||{},this.body=b.body,this.protocol=b.protocol?b.protocol.slice(-1)!==":"?`${b.protocol}:`:b.protocol:"https:",this.path=b.path?b.path.charAt(0)!=="/"?`/${b.path}`:b.path:"/",this.username=b.username,this.password=b.password,this.fragment=b.fragment}static clone(b){let j=new z({...b,headers:{...b.headers}});if(j.query)j.query=O(j.query);return j}static isInstance(b){if(!b)return!1;let j=b;return"method"in j&&"protocol"in j&&"hostname"in j&&"path"in j&&typeof j.query==="object"&&typeof j.headers==="object"}clone(){return z.clone(this)}}function O(b){return Object.keys(b).reduce((j,w)=>{let A=b[w];return{...j,[w]:Array.isArray(A)?[...A]:A}},{})}class G{statusCode;reason;headers;body;constructor(b){this.statusCode=b.statusCode,this.reason=b.reason,this.headers=b.headers||{},this.body=b.body}static isInstance(b){if(!b)return!1;let j=b;return typeof j.statusCode==="number"&&typeof j.headers==="object"}}function P(b){return/^[a-z0-9][a-z0-9\.\-]*[a-z0-9]$/.test(b)}Q.Field=B;Q.Fields=D;Q.HttpRequest=z;Q.HttpResponse=G;Q.getHttpHandlerExtensionConfiguration=L;Q.isValidHostname=P;Q.resolveHttpHandlerRuntimeConfig=M});
|
|
3
3
|
export{Z as J};
|
|
4
4
|
|
|
5
|
-
//# debugId=
|
|
5
|
+
//# debugId=33E4327D76FB32BD64756E2164756E21
|
|
@@ -5,6 +5,6 @@
|
|
|
5
5
|
"'use strict';\n\nvar types = require('@smithy/types');\n\nconst getHttpHandlerExtensionConfiguration = (runtimeConfig) => {\n return {\n setHttpHandler(handler) {\n runtimeConfig.httpHandler = handler;\n },\n httpHandler() {\n return runtimeConfig.httpHandler;\n },\n updateHttpClientConfig(key, value) {\n runtimeConfig.httpHandler?.updateHttpClientConfig(key, value);\n },\n httpHandlerConfigs() {\n return runtimeConfig.httpHandler.httpHandlerConfigs();\n },\n };\n};\nconst resolveHttpHandlerRuntimeConfig = (httpHandlerExtensionConfiguration) => {\n return {\n httpHandler: httpHandlerExtensionConfiguration.httpHandler(),\n };\n};\n\nclass Field {\n name;\n kind;\n values;\n constructor({ name, kind = types.FieldPosition.HEADER, values = [] }) {\n this.name = name;\n this.kind = kind;\n this.values = values;\n }\n add(value) {\n this.values.push(value);\n }\n set(values) {\n this.values = values;\n }\n remove(value) {\n this.values = this.values.filter((v) => v !== value);\n }\n toString() {\n return this.values.map((v) => (v.includes(\",\") || v.includes(\" \") ? `\"${v}\"` : v)).join(\", \");\n }\n get() {\n return this.values;\n }\n}\n\nclass Fields {\n entries = {};\n encoding;\n constructor({ fields = [], encoding = \"utf-8\" }) {\n fields.forEach(this.setField.bind(this));\n this.encoding = encoding;\n }\n setField(field) {\n this.entries[field.name.toLowerCase()] = field;\n }\n getField(name) {\n return this.entries[name.toLowerCase()];\n }\n removeField(name) {\n delete this.entries[name.toLowerCase()];\n }\n getByType(kind) {\n return Object.values(this.entries).filter((field) => field.kind === kind);\n }\n}\n\nclass HttpRequest {\n method;\n protocol;\n hostname;\n port;\n path;\n query;\n headers;\n username;\n password;\n fragment;\n body;\n constructor(options) {\n this.method = options.method || \"GET\";\n this.hostname = options.hostname || \"localhost\";\n this.port = options.port;\n this.query = options.query || {};\n this.headers = options.headers || {};\n this.body = options.body;\n this.protocol = options.protocol\n ? options.protocol.slice(-1) !== \":\"\n ? `${options.protocol}:`\n : options.protocol\n : \"https:\";\n this.path = options.path ? (options.path.charAt(0) !== \"/\" ? `/${options.path}` : options.path) : \"/\";\n this.username = options.username;\n this.password = options.password;\n this.fragment = options.fragment;\n }\n static clone(request) {\n const cloned = new HttpRequest({\n ...request,\n headers: { ...request.headers },\n });\n if (cloned.query) {\n cloned.query = cloneQuery(cloned.query);\n }\n return cloned;\n }\n static isInstance(request) {\n if (!request) {\n return false;\n }\n const req = request;\n return (\"method\" in req &&\n \"protocol\" in req &&\n \"hostname\" in req &&\n \"path\" in req &&\n typeof req[\"query\"] === \"object\" &&\n typeof req[\"headers\"] === \"object\");\n }\n clone() {\n return HttpRequest.clone(this);\n }\n}\nfunction cloneQuery(query) {\n return Object.keys(query).reduce((carry, paramName) => {\n const param = query[paramName];\n return {\n ...carry,\n [paramName]: Array.isArray(param) ? [...param] : param,\n };\n }, {});\n}\n\nclass HttpResponse {\n statusCode;\n reason;\n headers;\n body;\n constructor(options) {\n this.statusCode = options.statusCode;\n this.reason = options.reason;\n this.headers = options.headers || {};\n this.body = options.body;\n }\n static isInstance(response) {\n if (!response)\n return false;\n const resp = response;\n return typeof resp.statusCode === \"number\" && typeof resp.headers === \"object\";\n }\n}\n\nfunction isValidHostname(hostname) {\n const hostPattern = /^[a-z0-9][a-z0-9\\.\\-]*[a-z0-9]$/;\n return hostPattern.test(hostname);\n}\n\nexports.Field = Field;\nexports.Fields = Fields;\nexports.HttpRequest = HttpRequest;\nexports.HttpResponse = HttpResponse;\nexports.getHttpHandlerExtensionConfiguration = getHttpHandlerExtensionConfiguration;\nexports.isValidHostname = isValidHostname;\nexports.resolveHttpHandlerRuntimeConfig = resolveHttpHandlerRuntimeConfig;\n"
|
|
6
6
|
],
|
|
7
7
|
"mappings": ";qGAEA,FAAI,MAEE,EAAuC,CAAC,IAAkB,CAC5D,MAAO,CACH,cAAc,CAAC,EAAS,CACpB,EAAc,YAAc,GAEhC,WAAW,EAAG,CACV,OAAO,EAAc,aAEzB,sBAAsB,CAAC,EAAK,EAAO,CAC/B,EAAc,aAAa,uBAAuB,EAAK,CAAK,GAEhE,kBAAkB,EAAG,CACjB,OAAO,EAAc,YAAY,mBAAmB,EAE5D,GAEE,EAAkC,CAAC,IAAsC,CAC3E,MAAO,CACH,YAAa,EAAkC,YAAY,CAC/D,GAGJ,MAAM,CAAM,CACR,KACA,KACA,OACA,WAAW,EAAG,OAAM,OAAO,EAAM,cAAc,OAAQ,SAAS,CAAC,GAAK,CAClE,KAAK,KAAO,EACZ,KAAK,KAAO,EACZ,KAAK,OAAS,EAElB,GAAG,CAAC,EAAO,CACP,KAAK,OAAO,KAAK,CAAK,EAE1B,GAAG,CAAC,EAAQ,CACR,KAAK,OAAS,EAElB,MAAM,CAAC,EAAO,CACV,KAAK,OAAS,KAAK,OAAO,OAAO,CAAC,IAAM,IAAM,CAAK,EAEvD,QAAQ,EAAG,CACP,OAAO,KAAK,OAAO,IAAI,CAAC,IAAO,EAAE,SAAS,GAAG,GAAK,EAAE,SAAS,GAAG,EAAI,IAAI,KAAO,CAAE,EAAE,KAAK,IAAI,EAEhG,GAAG,EAAG,CACF,OAAO,KAAK,OAEpB,CAEA,MAAM,CAAO,CACT,QAAU,CAAC,EACX,SACA,WAAW,EAAG,SAAS,CAAC,EAAG,WAAW,SAAW,CAC7C,EAAO,QAAQ,KAAK,SAAS,KAAK,IAAI,CAAC,EACvC,KAAK,SAAW,EAEpB,QAAQ,CAAC,EAAO,CACZ,KAAK,QAAQ,EAAM,KAAK,YAAY,GAAK,EAE7C,QAAQ,CAAC,EAAM,CACX,OAAO,KAAK,QAAQ,EAAK,YAAY,GAEzC,WAAW,CAAC,EAAM,CACd,OAAO,KAAK,QAAQ,EAAK,YAAY,GAEzC,SAAS,CAAC,EAAM,CACZ,OAAO,OAAO,OAAO,KAAK,OAAO,EAAE,OAAO,CAAC,IAAU,EAAM,OAAS,CAAI,EAEhF,CAEA,MAAM,CAAY,CACd,OACA,SACA,SACA,KACA,KACA,MACA,QACA,SACA,SACA,SACA,KACA,WAAW,CAAC,EAAS,CACjB,KAAK,OAAS,EAAQ,QAAU,MAChC,KAAK,SAAW,EAAQ,UAAY,YACpC,KAAK,KAAO,EAAQ,KACpB,KAAK,MAAQ,EAAQ,OAAS,CAAC,EAC/B,KAAK,QAAU,EAAQ,SAAW,CAAC,EACnC,KAAK,KAAO,EAAQ,KACpB,KAAK,SAAW,EAAQ,SAClB,EAAQ,SAAS,MAAM,EAAE,IAAM,IAC3B,GAAG,EAAQ,YACX,EAAQ,SACZ,SACN,KAAK,KAAO,EAAQ,KAAQ,EAAQ,KAAK,OAAO,CAAC,IAAM,IAAM,IAAI,EAAQ,OAAS,EAAQ,KAAQ,IAClG,KAAK,SAAW,EAAQ,SACxB,KAAK,SAAW,EAAQ,SACxB,KAAK,SAAW,EAAQ,eAErB,MAAK,CAAC,EAAS,CAClB,IAAM,EAAS,IAAI,EAAY,IACxB,EACH,QAAS,IAAK,EAAQ,OAAQ,CAClC,CAAC,EACD,GAAI,EAAO,MACP,EAAO,MAAQ,EAAW,EAAO,KAAK,EAE1C,OAAO,QAEJ,WAAU,CAAC,EAAS,CACvB,GAAI,CAAC,EACD,MAAO,GAEX,IAAM,EAAM,EACZ,MAAQ,WAAY,GAChB,aAAc,GACd,aAAc,GACd,SAAU,GACV,OAAO,EAAI,QAAa,UACxB,OAAO,EAAI,UAAe,SAElC,KAAK,EAAG,CACJ,OAAO,EAAY,MAAM,IAAI,EAErC,CACA,SAAS,CAAU,CAAC,EAAO,CACvB,OAAO,OAAO,KAAK,CAAK,EAAE,OAAO,CAAC,EAAO,IAAc,CACnD,IAAM,EAAQ,EAAM,GACpB,MAAO,IACA,GACF,GAAY,MAAM,QAAQ,CAAK,EAAI,CAAC,GAAG,CAAK,EAAI,CACrD,GACD,CAAC,CAAC,EAGT,MAAM,CAAa,CACf,WACA,OACA,QACA,KACA,WAAW,CAAC,EAAS,CACjB,KAAK,WAAa,EAAQ,WAC1B,KAAK,OAAS,EAAQ,OACtB,KAAK,QAAU,EAAQ,SAAW,CAAC,EACnC,KAAK,KAAO,EAAQ,WAEjB,WAAU,CAAC,EAAU,CACxB,GAAI,CAAC,EACD,MAAO,GACX,IAAM,EAAO,EACb,OAAO,OAAO,EAAK,aAAe,UAAY,OAAO,EAAK,UAAY,SAE9E,CAEA,SAAS,CAAe,CAAC,EAAU,CAE/B,MADoB,kCACD,KAAK,CAAQ,EAG5B,QAAQ,EACR,SAAS,EACT,cAAc,EACd,eAAe,EACf,uCAAuC,EACvC,kBAAkB,EAClB,kCAAkC",
|
|
8
|
-
"debugId": "
|
|
8
|
+
"debugId": "33E4327D76FB32BD64756E2164756E21",
|
|
9
9
|
"names": []
|
|
10
10
|
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
// @bun
|
|
2
|
-
import{
|
|
2
|
+
import{Df as cJ,Ef as E,Hf as LE}from"./chunk-jhkjz9jr.js";var T2=E((n0)=>{Object.defineProperty(n0,"__esModule",{value:!0});n0.ApplicationInSerializer=void 0;n0.ApplicationInSerializer={_fromJsonObject(u){return{metadata:u.metadata,name:u.name,rateLimit:u.rateLimit,throttleRate:u.throttleRate,uid:u.uid}},_toJsonObject(u){return{metadata:u.metadata,name:u.name,rateLimit:u.rateLimit,throttleRate:u.throttleRate,uid:u.uid}}}});var t2=E((o0)=>{Object.defineProperty(o0,"__esModule",{value:!0});o0.ApplicationOutSerializer=void 0;o0.ApplicationOutSerializer={_fromJsonObject(u){return{createdAt:new Date(u.createdAt),id:u.id,metadata:u.metadata,name:u.name,rateLimit:u.rateLimit,throttleRate:u.throttleRate,uid:u.uid,updatedAt:new Date(u.updatedAt)}},_toJsonObject(u){return{createdAt:u.createdAt,id:u.id,metadata:u.metadata,name:u.name,rateLimit:u.rateLimit,throttleRate:u.throttleRate,uid:u.uid,updatedAt:u.updatedAt}}}});var Du=E((e0)=>{Object.defineProperty(e0,"__esModule",{value:!0});e0.ApplicationPatchSerializer=void 0;e0.ApplicationPatchSerializer={_fromJsonObject(u){return{metadata:u.metadata,name:u.name,rateLimit:u.rateLimit,uid:u.uid}},_toJsonObject(u){return{metadata:u.metadata,name:u.name,rateLimit:u.rateLimit,uid:u.uid}}}});var wu=E((Bu)=>{Object.defineProperty(Bu,"__esModule",{value:!0});Bu.ListResponseApplicationOutSerializer=void 0;var Au=t2();Bu.ListResponseApplicationOutSerializer={_fromJsonObject(u){return{data:u.data.map((D)=>Au.ApplicationOutSerializer._fromJsonObject(D)),done:u.done,iterator:u.iterator,prevIterator:u.prevIterator}},_toJsonObject(u){return{data:u.data.map((D)=>Au.ApplicationOutSerializer._toJsonObject(D)),done:u.done,iterator:u.iterator,prevIterator:u.prevIterator}}}});var e2=E((Gu)=>{Object.defineProperty(Gu,"__esModule",{value:!0});Gu.ApiException=void 0;class Eu extends Error{constructor(u,D,A){super(`HTTP-Code: ${u}
|
|
3
3
|
Headers: ${JSON.stringify(A)}`);this.code=u,this.body=D,this.headers={},A.forEach((B,F)=>{this.headers[F]=B})}}Gu.ApiException=Eu});var R=E((d)=>{var V2=d&&d.__awaiter||function(u,D,A,B){function F(G){return G instanceof A?G:new A(function(w){w(G)})}return new(A||(A=Promise))(function(G,w){function N(X){try{$(B.next(X))}catch(z){w(z)}}function J(X){try{$(B.throw(X))}catch(z){w(z)}}function $(X){X.done?G(X.value):F(X.value).then(N,J)}$((B=B.apply(u,D||[])).next())})};Object.defineProperty(d,"__esModule",{value:!0});d.SvixRequest=d.HttpMethod=d.LIB_VERSION=void 0;var u0=e2();d.LIB_VERSION="1.92.2";var lE=`svix-libs/${d.LIB_VERSION}/javascript`,dE;(function(u){u.GET="GET",u.HEAD="HEAD",u.POST="POST",u.PUT="PUT",u.DELETE="DELETE",u.CONNECT="CONNECT",u.OPTIONS="OPTIONS",u.TRACE="TRACE",u.PATCH="PATCH"})(dE=d.HttpMethod||(d.HttpMethod={}));class Ju{constructor(u,D){this.method=u,this.path=D,this.queryParams={},this.headerParams={}}setPathParam(u,D){let A=this.path.replace(`{${u}}`,encodeURIComponent(D));if(this.path===A)throw Error(`path parameter ${u} not found`);this.path=A}setQueryParams(u){for(let[D,A]of Object.entries(u))this.setQueryParam(D,A)}setQueryParam(u,D){if(D===void 0||D===null)return;if(typeof D==="string")this.queryParams[u]=D;else if(typeof D==="boolean"||typeof D==="number")this.queryParams[u]=D.toString();else if(D instanceof Date)this.queryParams[u]=D.toISOString();else if(Array.isArray(D)){if(D.length>0)this.queryParams[u]=D.join(",")}else{let A=D;throw Error(`query parameter ${u} has unsupported type`)}}setHeaderParam(u,D){if(D===void 0)return;this.headerParams[u]=D}setBody(u){this.body=JSON.stringify(u)}send(u,D){return V2(this,void 0,void 0,function*(){let A=yield this.sendInner(u);if(A.status===204)return null;let B=yield A.text();return D(JSON.parse(B))})}sendNoResponseBody(u){return V2(this,void 0,void 0,function*(){yield this.sendInner(u)})}sendInner(u){var D,A;return V2(this,void 0,void 0,function*(){let B=new URL(u.baseUrl+this.path);for(let[N,J]of Object.entries(this.queryParams))B.searchParams.set(N,J);if(this.headerParams["idempotency-key"]===void 0&&this.method.toUpperCase()==="POST")this.headerParams["idempotency-key"]=`auto_${crypto.randomUUID()}`;let F=Math.floor(Math.random()*Number.MAX_SAFE_INTEGER);if(this.body!=null)this.headerParams["content-type"]="application/json";let G="credentials"in Request.prototype,w=yield Zu(B,{method:this.method.toString(),body:this.body,headers:Object.assign({accept:"application/json, */*;q=0.8",authorization:`Bearer ${u.token}`,"user-agent":lE,"svix-req-id":F.toString()},this.headerParams),credentials:G?"same-origin":void 0,signal:u.timeout!==void 0?AbortSignal.timeout(u.timeout):void 0},u.retryScheduleInMs,(D=u.retryScheduleInMs)===null||D===void 0?void 0:D[0],((A=u.retryScheduleInMs)===null||A===void 0?void 0:A.length)||u.numRetries,u.fetch);return rE(w)})}}d.SvixRequest=Ju;function rE(u){return V2(this,void 0,void 0,function*(){if(u.status<300)return u;let D=yield u.text();if(u.status===422)throw new u0.ApiException(u.status,JSON.parse(D),u.headers);if(u.status>=400&&u.status<=499)throw new u0.ApiException(u.status,JSON.parse(D),u.headers);throw new u0.ApiException(u.status,D,u.headers)})}function Zu(u,D,A,B=50,F=2,G=fetch,w=1){return V2(this,void 0,void 0,function*(){let N=(J)=>new Promise(($)=>setTimeout($,J));try{let J=yield G(u,D);if(F<=0||J.status<500)return J}catch(J){if(F<=0)throw J}return yield N(B),D.headers["svix-retry-count"]=w.toString(),B=(A===null||A===void 0?void 0:A[w])||B*2,yield Zu(u,D,A,B,--F,G,++w)})}});var Yu=E(($u)=>{Object.defineProperty($u,"__esModule",{value:!0});$u.Application=void 0;var D0=T2(),W2=t2(),cE=Du(),iE=wu(),g=R();class zu{constructor(u){this.requestCtx=u}list(u){let D=new g.SvixRequest(g.HttpMethod.GET,"/api/v1/app");return D.setQueryParams({exclude_apps_with_no_endpoints:u===null||u===void 0?void 0:u.excludeAppsWithNoEndpoints,exclude_apps_with_disabled_endpoints:u===null||u===void 0?void 0:u.excludeAppsWithDisabledEndpoints,exclude_apps_with_svix_play_endpoints:u===null||u===void 0?void 0:u.excludeAppsWithSvixPlayEndpoints,limit:u===null||u===void 0?void 0:u.limit,iterator:u===null||u===void 0?void 0:u.iterator,order:u===null||u===void 0?void 0:u.order}),D.send(this.requestCtx,iE.ListResponseApplicationOutSerializer._fromJsonObject)}create(u,D){let A=new g.SvixRequest(g.HttpMethod.POST,"/api/v1/app");return A.setHeaderParam("idempotency-key",D===null||D===void 0?void 0:D.idempotencyKey),A.setBody(D0.ApplicationInSerializer._toJsonObject(u)),A.send(this.requestCtx,W2.ApplicationOutSerializer._fromJsonObject)}getOrCreate(u,D){let A=new g.SvixRequest(g.HttpMethod.POST,"/api/v1/app");return A.setQueryParam("get_if_exists",!0),A.setHeaderParam("idempotency-key",D===null||D===void 0?void 0:D.idempotencyKey),A.setBody(D0.ApplicationInSerializer._toJsonObject(u)),A.send(this.requestCtx,W2.ApplicationOutSerializer._fromJsonObject)}get(u){let D=new g.SvixRequest(g.HttpMethod.GET,"/api/v1/app/{app_id}");return D.setPathParam("app_id",u),D.send(this.requestCtx,W2.ApplicationOutSerializer._fromJsonObject)}update(u,D){let A=new g.SvixRequest(g.HttpMethod.PUT,"/api/v1/app/{app_id}");return A.setPathParam("app_id",u),A.setBody(D0.ApplicationInSerializer._toJsonObject(D)),A.send(this.requestCtx,W2.ApplicationOutSerializer._fromJsonObject)}delete(u){let D=new g.SvixRequest(g.HttpMethod.DELETE,"/api/v1/app/{app_id}");return D.setPathParam("app_id",u),D.sendNoResponseBody(this.requestCtx)}patch(u,D){let A=new g.SvixRequest(g.HttpMethod.PATCH,"/api/v1/app/{app_id}");return A.setPathParam("app_id",u),A.setBody(cE.ApplicationPatchSerializer._toJsonObject(D)),A.send(this.requestCtx,W2.ApplicationOutSerializer._fromJsonObject)}}$u.Application=zu});var Wu=E((Qu)=>{Object.defineProperty(Qu,"__esModule",{value:!0});Qu.ApiTokenOutSerializer=void 0;Qu.ApiTokenOutSerializer={_fromJsonObject(u){return{createdAt:new Date(u.createdAt),expiresAt:u.expiresAt?new Date(u.expiresAt):null,id:u.id,name:u.name,scopes:u.scopes,token:u.token}},_toJsonObject(u){return{createdAt:u.createdAt,expiresAt:u.expiresAt,id:u.id,name:u.name,scopes:u.scopes,token:u.token}}}});var A0=E((Hu)=>{Object.defineProperty(Hu,"__esModule",{value:!0});Hu.AppPortalCapabilitySerializer=Hu.AppPortalCapability=void 0;var aE;(function(u){u.ViewBase="ViewBase",u.ViewEndpointSecret="ViewEndpointSecret",u.ManageEndpointSecret="ManageEndpointSecret",u.ManageTransformations="ManageTransformations",u.CreateAttempts="CreateAttempts",u.ManageEndpoint="ManageEndpoint"})(aE=Hu.AppPortalCapability||(Hu.AppPortalCapability={}));Hu.AppPortalCapabilitySerializer={_fromJsonObject(u){return u},_toJsonObject(u){return u}}});var vu=E((Ru)=>{Object.defineProperty(Ru,"__esModule",{value:!0});Ru.AppPortalAccessInSerializer=void 0;var Uu=A0(),Pu=T2();Ru.AppPortalAccessInSerializer={_fromJsonObject(u){var D;return{application:u.application!=null?Pu.ApplicationInSerializer._fromJsonObject(u.application):void 0,capabilities:(D=u.capabilities)===null||D===void 0?void 0:D.map((A)=>Uu.AppPortalCapabilitySerializer._fromJsonObject(A)),expiry:u.expiry,featureFlags:u.featureFlags,readOnly:u.readOnly,sessionId:u.sessionId}},_toJsonObject(u){var D;return{application:u.application!=null?Pu.ApplicationInSerializer._toJsonObject(u.application):void 0,capabilities:(D=u.capabilities)===null||D===void 0?void 0:D.map((A)=>Uu.AppPortalCapabilitySerializer._toJsonObject(A)),expiry:u.expiry,featureFlags:u.featureFlags,readOnly:u.readOnly,sessionId:u.sessionId}}}});var Tu=E((Mu)=>{Object.defineProperty(Mu,"__esModule",{value:!0});Mu.AppPortalAccessOutSerializer=void 0;Mu.AppPortalAccessOutSerializer={_fromJsonObject(u){return{token:u.token,url:u.url}},_toJsonObject(u){return{token:u.token,url:u.url}}}});var qu=E((hu)=>{Object.defineProperty(hu,"__esModule",{value:!0});hu.ApplicationTokenExpireInSerializer=void 0;hu.ApplicationTokenExpireInSerializer={_fromJsonObject(u){return{expiry:u.expiry,sessionIds:u.sessionIds}},_toJsonObject(u){return{expiry:u.expiry,sessionIds:u.sessionIds}}}});var xu=E((ku)=>{Object.defineProperty(ku,"__esModule",{value:!0});ku.RotatePollerTokenInSerializer=void 0;ku.RotatePollerTokenInSerializer={_fromJsonObject(u){return{expiry:u.expiry,oldTokenExpiry:u.oldTokenExpiry}},_toJsonObject(u){return{expiry:u.expiry,oldTokenExpiry:u.oldTokenExpiry}}}});var mu=E((yu)=>{Object.defineProperty(yu,"__esModule",{value:!0});yu.StreamPortalAccessInSerializer=void 0;yu.StreamPortalAccessInSerializer={_fromJsonObject(u){return{expiry:u.expiry,featureFlags:u.featureFlags,sessionId:u.sessionId}},_toJsonObject(u){return{expiry:u.expiry,featureFlags:u.featureFlags,sessionId:u.sessionId}}}});var ju=E((gu)=>{Object.defineProperty(gu,"__esModule",{value:!0});gu.StreamTokenExpireInSerializer=void 0;gu.StreamTokenExpireInSerializer={_fromJsonObject(u){return{expiry:u.expiry,sessionIds:u.sessionIds}},_toJsonObject(u){return{expiry:u.expiry,sessionIds:u.sessionIds}}}});var B0=E((fu)=>{Object.defineProperty(fu,"__esModule",{value:!0});fu.DashboardAccessOutSerializer=void 0;fu.DashboardAccessOutSerializer={_fromJsonObject(u){return{token:u.token,url:u.url}},_toJsonObject(u){return{token:u.token,url:u.url}}}});var pu=E((iu)=>{Object.defineProperty(iu,"__esModule",{value:!0});iu.Authentication=void 0;var du=Wu(),pE=vu(),ru=Tu(),nE=qu(),sE=xu(),oE=mu(),tE=ju(),eE=B0(),q=R();class cu{constructor(u){this.requestCtx=u}appPortalAccess(u,D,A){let B=new q.SvixRequest(q.HttpMethod.POST,"/api/v1/auth/app-portal-access/{app_id}");return B.setPathParam("app_id",u),B.setHeaderParam("idempotency-key",A===null||A===void 0?void 0:A.idempotencyKey),B.setBody(pE.AppPortalAccessInSerializer._toJsonObject(D)),B.send(this.requestCtx,ru.AppPortalAccessOutSerializer._fromJsonObject)}expireAll(u,D,A){let B=new q.SvixRequest(q.HttpMethod.POST,"/api/v1/auth/app/{app_id}/expire-all");return B.setPathParam("app_id",u),B.setHeaderParam("idempotency-key",A===null||A===void 0?void 0:A.idempotencyKey),B.setBody(nE.ApplicationTokenExpireInSerializer._toJsonObject(D)),B.sendNoResponseBody(this.requestCtx)}dashboardAccess(u,D){let A=new q.SvixRequest(q.HttpMethod.POST,"/api/v1/auth/dashboard-access/{app_id}");return A.setPathParam("app_id",u),A.setHeaderParam("idempotency-key",D===null||D===void 0?void 0:D.idempotencyKey),A.send(this.requestCtx,eE.DashboardAccessOutSerializer._fromJsonObject)}logout(u){let D=new q.SvixRequest(q.HttpMethod.POST,"/api/v1/auth/logout");return D.setHeaderParam("idempotency-key",u===null||u===void 0?void 0:u.idempotencyKey),D.sendNoResponseBody(this.requestCtx)}streamLogout(u){let D=new q.SvixRequest(q.HttpMethod.POST,"/api/v1/auth/stream-logout");return D.setHeaderParam("idempotency-key",u===null||u===void 0?void 0:u.idempotencyKey),D.sendNoResponseBody(this.requestCtx)}streamPortalAccess(u,D,A){let B=new q.SvixRequest(q.HttpMethod.POST,"/api/v1/auth/stream-portal-access/{stream_id}");return B.setPathParam("stream_id",u),B.setHeaderParam("idempotency-key",A===null||A===void 0?void 0:A.idempotencyKey),B.setBody(oE.StreamPortalAccessInSerializer._toJsonObject(D)),B.send(this.requestCtx,ru.AppPortalAccessOutSerializer._fromJsonObject)}streamExpireAll(u,D,A){let B=new q.SvixRequest(q.HttpMethod.POST,"/api/v1/auth/stream/{stream_id}/expire-all");return B.setPathParam("stream_id",u),B.setHeaderParam("idempotency-key",A===null||A===void 0?void 0:A.idempotencyKey),B.setBody(tE.StreamTokenExpireInSerializer._toJsonObject(D)),B.sendNoResponseBody(this.requestCtx)}getStreamPollerToken(u,D){let A=new q.SvixRequest(q.HttpMethod.GET,"/api/v1/auth/stream/{stream_id}/sink/{sink_id}/poller/token");return A.setPathParam("stream_id",u),A.setPathParam("sink_id",D),A.send(this.requestCtx,du.ApiTokenOutSerializer._fromJsonObject)}rotateStreamPollerToken(u,D,A,B){let F=new q.SvixRequest(q.HttpMethod.POST,"/api/v1/auth/stream/{stream_id}/sink/{sink_id}/poller/token/rotate");return F.setPathParam("stream_id",u),F.setPathParam("sink_id",D),F.setHeaderParam("idempotency-key",B===null||B===void 0?void 0:B.idempotencyKey),F.setBody(sE.RotatePollerTokenInSerializer._toJsonObject(A)),F.send(this.requestCtx,du.ApiTokenOutSerializer._fromJsonObject)}}iu.Authentication=cu});var t=E((su)=>{Object.defineProperty(su,"__esModule",{value:!0});su.BackgroundTaskStatusSerializer=su.BackgroundTaskStatus=void 0;var uG;(function(u){u.Running="running",u.Finished="finished",u.Failed="failed"})(uG=su.BackgroundTaskStatus||(su.BackgroundTaskStatus={}));su.BackgroundTaskStatusSerializer={_fromJsonObject(u){return u},_toJsonObject(u){return u}}});var e=E((eu)=>{Object.defineProperty(eu,"__esModule",{value:!0});eu.BackgroundTaskTypeSerializer=eu.BackgroundTaskType=void 0;var DG;(function(u){u.EndpointReplay="endpoint.replay",u.EndpointRecover="endpoint.recover",u.ApplicationStats="application.stats",u.MessageBroadcast="message.broadcast",u.SdkGenerate="sdk.generate",u.EventTypeAggregate="event-type.aggregate",u.ApplicationPurgeContent="application.purge_content",u.EndpointBulkReplay="endpoint.bulk-replay"})(DG=eu.BackgroundTaskType||(eu.BackgroundTaskType={}));eu.BackgroundTaskTypeSerializer={_fromJsonObject(u){return u},_toJsonObject(u){return u}}});var F0=E((BD)=>{Object.defineProperty(BD,"__esModule",{value:!0});BD.BackgroundTaskOutSerializer=void 0;var DD=t(),AD=e();BD.BackgroundTaskOutSerializer={_fromJsonObject(u){return{data:u.data,id:u.id,status:DD.BackgroundTaskStatusSerializer._fromJsonObject(u.status),task:AD.BackgroundTaskTypeSerializer._fromJsonObject(u.task),updatedAt:new Date(u.updatedAt)}},_toJsonObject(u){return{data:u.data,id:u.id,status:DD.BackgroundTaskStatusSerializer._toJsonObject(u.status),task:AD.BackgroundTaskTypeSerializer._toJsonObject(u.task),updatedAt:u.updatedAt}}}});var ND=E((ED)=>{Object.defineProperty(ED,"__esModule",{value:!0});ED.ListResponseBackgroundTaskOutSerializer=void 0;var wD=F0();ED.ListResponseBackgroundTaskOutSerializer={_fromJsonObject(u){return{data:u.data.map((D)=>wD.BackgroundTaskOutSerializer._fromJsonObject(D)),done:u.done,iterator:u.iterator,prevIterator:u.prevIterator}},_toJsonObject(u){return{data:u.data.map((D)=>wD.BackgroundTaskOutSerializer._toJsonObject(D)),done:u.done,iterator:u.iterator,prevIterator:u.prevIterator}}}});var $D=E((ZD)=>{Object.defineProperty(ZD,"__esModule",{value:!0});ZD.BackgroundTask=void 0;var AG=F0(),BG=ND(),h2=R();class JD{constructor(u){this.requestCtx=u}list(u){let D=new h2.SvixRequest(h2.HttpMethod.GET,"/api/v1/background-task");return D.setQueryParams({status:u===null||u===void 0?void 0:u.status,task:u===null||u===void 0?void 0:u.task,limit:u===null||u===void 0?void 0:u.limit,iterator:u===null||u===void 0?void 0:u.iterator,order:u===null||u===void 0?void 0:u.order}),D.send(this.requestCtx,BG.ListResponseBackgroundTaskOutSerializer._fromJsonObject)}listByEndpoint(u){return this.list(u)}get(u){let D=new h2.SvixRequest(h2.HttpMethod.GET,"/api/v1/background-task/{task_id}");return D.setPathParam("task_id",u),D.send(this.requestCtx,AG.BackgroundTaskOutSerializer._fromJsonObject)}}ZD.BackgroundTask=JD});var w2=E((YD)=>{Object.defineProperty(YD,"__esModule",{value:!0});YD.ConnectorKindSerializer=YD.ConnectorKind=void 0;var FG;(function(u){u.Custom="Custom",u.AgenticCommerceProtocol="AgenticCommerceProtocol",u.CloseCrm="CloseCRM",u.CustomerIo="CustomerIO",u.Discord="Discord",u.Hubspot="Hubspot",u.Inngest="Inngest",u.Loops="Loops",u.Otel="Otel",u.Resend="Resend",u.Salesforce="Salesforce",u.Segment="Segment",u.Sendgrid="Sendgrid",u.Slack="Slack",u.Teams="Teams",u.TriggerDev="TriggerDev",u.Windmill="Windmill",u.Zapier="Zapier"})(FG=YD.ConnectorKind||(YD.ConnectorKind={}));YD.ConnectorKindSerializer={_fromJsonObject(u){return u},_toJsonObject(u){return u}}});var O2=E((WD)=>{Object.defineProperty(WD,"__esModule",{value:!0});WD.ConnectorProductSerializer=WD.ConnectorProduct=void 0;var wG;(function(u){u.Dispatch="Dispatch",u.Stream="Stream"})(wG=WD.ConnectorProduct||(WD.ConnectorProduct={}));WD.ConnectorProductSerializer={_fromJsonObject(u){return u},_toJsonObject(u){return u}}});var w0=E((UD)=>{Object.defineProperty(UD,"__esModule",{value:!0});UD.ConnectorInSerializer=void 0;var HD=w2(),CD=O2();UD.ConnectorInSerializer={_fromJsonObject(u){return{allowedEventTypes:u.allowedEventTypes,description:u.description,featureFlags:u.featureFlags,instructions:u.instructions,kind:u.kind!=null?HD.ConnectorKindSerializer._fromJsonObject(u.kind):void 0,logo:u.logo,name:u.name,productType:u.productType!=null?CD.ConnectorProductSerializer._fromJsonObject(u.productType):void 0,transformation:u.transformation,uid:u.uid}},_toJsonObject(u){return{allowedEventTypes:u.allowedEventTypes,description:u.description,featureFlags:u.featureFlags,instructions:u.instructions,kind:u.kind!=null?HD.ConnectorKindSerializer._toJsonObject(u.kind):void 0,logo:u.logo,name:u.name,productType:u.productType!=null?CD.ConnectorProductSerializer._toJsonObject(u.productType):void 0,transformation:u.transformation,uid:u.uid}}}});var q2=E((vD)=>{Object.defineProperty(vD,"__esModule",{value:!0});vD.ConnectorOutSerializer=void 0;var RD=w2(),LD=O2();vD.ConnectorOutSerializer={_fromJsonObject(u){return{allowedEventTypes:u.allowedEventTypes,createdAt:new Date(u.createdAt),description:u.description,featureFlags:u.featureFlags,id:u.id,instructions:u.instructions,kind:RD.ConnectorKindSerializer._fromJsonObject(u.kind),logo:u.logo,name:u.name,orgId:u.orgId,productType:LD.ConnectorProductSerializer._fromJsonObject(u.productType),transformation:u.transformation,transformationUpdatedAt:new Date(u.transformationUpdatedAt),uid:u.uid,updatedAt:new Date(u.updatedAt)}},_toJsonObject(u){return{allowedEventTypes:u.allowedEventTypes,createdAt:u.createdAt,description:u.description,featureFlags:u.featureFlags,id:u.id,instructions:u.instructions,kind:RD.ConnectorKindSerializer._toJsonObject(u.kind),logo:u.logo,name:u.name,orgId:u.orgId,productType:LD.ConnectorProductSerializer._toJsonObject(u.productType),transformation:u.transformation,transformationUpdatedAt:u.transformationUpdatedAt,uid:u.uid,updatedAt:u.updatedAt}}}});var OD=E((TD)=>{Object.defineProperty(TD,"__esModule",{value:!0});TD.ConnectorPatchSerializer=void 0;var SD=w2();TD.ConnectorPatchSerializer={_fromJsonObject(u){return{allowedEventTypes:u.allowedEventTypes,description:u.description,featureFlags:u.featureFlags,instructions:u.instructions,kind:u.kind!=null?SD.ConnectorKindSerializer._fromJsonObject(u.kind):void 0,logo:u.logo,name:u.name,transformation:u.transformation}},_toJsonObject(u){return{allowedEventTypes:u.allowedEventTypes,description:u.description,featureFlags:u.featureFlags,instructions:u.instructions,kind:u.kind!=null?SD.ConnectorKindSerializer._toJsonObject(u.kind):void 0,logo:u.logo,name:u.name,transformation:u.transformation}}}});var xD=E((kD)=>{Object.defineProperty(kD,"__esModule",{value:!0});kD.ConnectorUpdateSerializer=void 0;var qD=w2();kD.ConnectorUpdateSerializer={_fromJsonObject(u){return{allowedEventTypes:u.allowedEventTypes,description:u.description,featureFlags:u.featureFlags,instructions:u.instructions,kind:u.kind!=null?qD.ConnectorKindSerializer._fromJsonObject(u.kind):void 0,logo:u.logo,name:u.name,transformation:u.transformation}},_toJsonObject(u){return{allowedEventTypes:u.allowedEventTypes,description:u.description,featureFlags:u.featureFlags,instructions:u.instructions,kind:u.kind!=null?qD.ConnectorKindSerializer._toJsonObject(u.kind):void 0,logo:u.logo,name:u.name,transformation:u.transformation}}}});var gD=E((_D)=>{Object.defineProperty(_D,"__esModule",{value:!0});_D.ListResponseConnectorOutSerializer=void 0;var yD=q2();_D.ListResponseConnectorOutSerializer={_fromJsonObject(u){return{data:u.data.map((D)=>yD.ConnectorOutSerializer._fromJsonObject(D)),done:u.done,iterator:u.iterator,prevIterator:u.prevIterator}},_toJsonObject(u){return{data:u.data.map((D)=>yD.ConnectorOutSerializer._toJsonObject(D)),done:u.done,iterator:u.iterator,prevIterator:u.prevIterator}}}});var lD=E((jD)=>{Object.defineProperty(jD,"__esModule",{value:!0});jD.Connector=void 0;var EG=w0(),k2=q2(),GG=OD(),NG=xD(),JG=gD(),r=R();class bD{constructor(u){this.requestCtx=u}list(u){let D=new r.SvixRequest(r.HttpMethod.GET,"/api/v1/connector");return D.setQueryParams({limit:u===null||u===void 0?void 0:u.limit,iterator:u===null||u===void 0?void 0:u.iterator,order:u===null||u===void 0?void 0:u.order,product_type:u===null||u===void 0?void 0:u.productType}),D.send(this.requestCtx,JG.ListResponseConnectorOutSerializer._fromJsonObject)}create(u,D){let A=new r.SvixRequest(r.HttpMethod.POST,"/api/v1/connector");return A.setHeaderParam("idempotency-key",D===null||D===void 0?void 0:D.idempotencyKey),A.setBody(EG.ConnectorInSerializer._toJsonObject(u)),A.send(this.requestCtx,k2.ConnectorOutSerializer._fromJsonObject)}get(u){let D=new r.SvixRequest(r.HttpMethod.GET,"/api/v1/connector/{connector_id}");return D.setPathParam("connector_id",u),D.send(this.requestCtx,k2.ConnectorOutSerializer._fromJsonObject)}update(u,D){let A=new r.SvixRequest(r.HttpMethod.PUT,"/api/v1/connector/{connector_id}");return A.setPathParam("connector_id",u),A.setBody(NG.ConnectorUpdateSerializer._toJsonObject(D)),A.send(this.requestCtx,k2.ConnectorOutSerializer._fromJsonObject)}delete(u){let D=new r.SvixRequest(r.HttpMethod.DELETE,"/api/v1/connector/{connector_id}");return D.setPathParam("connector_id",u),D.sendNoResponseBody(this.requestCtx)}patch(u,D){let A=new r.SvixRequest(r.HttpMethod.PATCH,"/api/v1/connector/{connector_id}");return A.setPathParam("connector_id",u),A.setBody(GG.ConnectorPatchSerializer._toJsonObject(D)),A.send(this.requestCtx,k2.ConnectorOutSerializer._fromJsonObject)}}jD.Connector=bD});var E2=E((rD)=>{Object.defineProperty(rD,"__esModule",{value:!0});rD.MessageStatusSerializer=rD.MessageStatus=void 0;var ZG;(function(u){u[u.Success=0]="Success",u[u.Pending=1]="Pending",u[u.Fail=2]="Fail",u[u.Sending=3]="Sending"})(ZG=rD.MessageStatus||(rD.MessageStatus={}));rD.MessageStatusSerializer={_fromJsonObject(u){return u},_toJsonObject(u){return u}}});var E0=E((aD)=>{Object.defineProperty(aD,"__esModule",{value:!0});aD.StatusCodeClassSerializer=aD.StatusCodeClass=void 0;var zG;(function(u){u[u.CodeNone=0]="CodeNone",u[u.Code1xx=100]="Code1xx",u[u.Code2xx=200]="Code2xx",u[u.Code3xx=300]="Code3xx",u[u.Code4xx=400]="Code4xx",u[u.Code5xx=500]="Code5xx"})(zG=aD.StatusCodeClass||(aD.StatusCodeClass={}));aD.StatusCodeClassSerializer={_fromJsonObject(u){return u},_toJsonObject(u){return u}}});var eD=E((oD)=>{Object.defineProperty(oD,"__esModule",{value:!0});oD.BulkReplayInSerializer=void 0;var nD=E2(),sD=E0();oD.BulkReplayInSerializer={_fromJsonObject(u){return{channel:u.channel,eventTypes:u.eventTypes,since:new Date(u.since),status:u.status!=null?nD.MessageStatusSerializer._fromJsonObject(u.status):void 0,statusCodeClass:u.statusCodeClass!=null?sD.StatusCodeClassSerializer._fromJsonObject(u.statusCodeClass):void 0,tag:u.tag,until:u.until?new Date(u.until):null}},_toJsonObject(u){return{channel:u.channel,eventTypes:u.eventTypes,since:u.since,status:u.status!=null?nD.MessageStatusSerializer._toJsonObject(u.status):void 0,statusCodeClass:u.statusCodeClass!=null?sD.StatusCodeClassSerializer._toJsonObject(u.statusCodeClass):void 0,tag:u.tag,until:u.until}}}});var A1=E((u1)=>{Object.defineProperty(u1,"__esModule",{value:!0});u1.EndpointHeadersInSerializer=void 0;u1.EndpointHeadersInSerializer={_fromJsonObject(u){return{headers:u.headers}},_toJsonObject(u){return{headers:u.headers}}}});var G0=E((B1)=>{Object.defineProperty(B1,"__esModule",{value:!0});B1.EndpointHeadersOutSerializer=void 0;B1.EndpointHeadersOutSerializer={_fromJsonObject(u){return{headers:u.headers,sensitive:u.sensitive}},_toJsonObject(u){return{headers:u.headers,sensitive:u.sensitive}}}});var G1=E((w1)=>{Object.defineProperty(w1,"__esModule",{value:!0});w1.EndpointHeadersPatchInSerializer=void 0;w1.EndpointHeadersPatchInSerializer={_fromJsonObject(u){return{deleteHeaders:u.deleteHeaders,headers:u.headers}},_toJsonObject(u){return{deleteHeaders:u.deleteHeaders,headers:u.headers}}}});var Z1=E((N1)=>{Object.defineProperty(N1,"__esModule",{value:!0});N1.EndpointInSerializer=void 0;N1.EndpointInSerializer={_fromJsonObject(u){return{channels:u.channels,description:u.description,disabled:u.disabled,filterTypes:u.filterTypes,headers:u.headers,metadata:u.metadata,rateLimit:u.rateLimit,secret:u.secret,throttleRate:u.throttleRate,uid:u.uid,url:u.url,version:u.version}},_toJsonObject(u){return{channels:u.channels,description:u.description,disabled:u.disabled,filterTypes:u.filterTypes,headers:u.headers,metadata:u.metadata,rateLimit:u.rateLimit,secret:u.secret,throttleRate:u.throttleRate,uid:u.uid,url:u.url,version:u.version}}}});var N0=E((z1)=>{Object.defineProperty(z1,"__esModule",{value:!0});z1.EndpointOutSerializer=void 0;z1.EndpointOutSerializer={_fromJsonObject(u){return{channels:u.channels,createdAt:new Date(u.createdAt),description:u.description,disabled:u.disabled,filterTypes:u.filterTypes,id:u.id,metadata:u.metadata,rateLimit:u.rateLimit,throttleRate:u.throttleRate,uid:u.uid,updatedAt:new Date(u.updatedAt),url:u.url,version:u.version}},_toJsonObject(u){return{channels:u.channels,createdAt:u.createdAt,description:u.description,disabled:u.disabled,filterTypes:u.filterTypes,id:u.id,metadata:u.metadata,rateLimit:u.rateLimit,throttleRate:u.throttleRate,uid:u.uid,updatedAt:u.updatedAt,url:u.url,version:u.version}}}});var Q1=E((X1)=>{Object.defineProperty(X1,"__esModule",{value:!0});X1.EndpointPatchSerializer=void 0;X1.EndpointPatchSerializer={_fromJsonObject(u){return{channels:u.channels,description:u.description,disabled:u.disabled,filterTypes:u.filterTypes,metadata:u.metadata,rateLimit:u.rateLimit,secret:u.secret,throttleRate:u.throttleRate,uid:u.uid,url:u.url,version:u.version}},_toJsonObject(u){return{channels:u.channels,description:u.description,disabled:u.disabled,filterTypes:u.filterTypes,metadata:u.metadata,rateLimit:u.rateLimit,secret:u.secret,throttleRate:u.throttleRate,uid:u.uid,url:u.url,version:u.version}}}});var K1=E((V1)=>{Object.defineProperty(V1,"__esModule",{value:!0});V1.EndpointSecretOutSerializer=void 0;V1.EndpointSecretOutSerializer={_fromJsonObject(u){return{key:u.key}},_toJsonObject(u){return{key:u.key}}}});var J0=E((H1)=>{Object.defineProperty(H1,"__esModule",{value:!0});H1.EndpointSecretRotateInSerializer=void 0;H1.EndpointSecretRotateInSerializer={_fromJsonObject(u){return{key:u.key}},_toJsonObject(u){return{key:u.key}}}});var R1=E((U1)=>{Object.defineProperty(U1,"__esModule",{value:!0});U1.EndpointStatsSerializer=void 0;U1.EndpointStatsSerializer={_fromJsonObject(u){return{fail:u.fail,pending:u.pending,sending:u.sending,success:u.success}},_toJsonObject(u){return{fail:u.fail,pending:u.pending,sending:u.sending,success:u.success}}}});var M1=E((L1)=>{Object.defineProperty(L1,"__esModule",{value:!0});L1.EndpointTransformationInSerializer=void 0;L1.EndpointTransformationInSerializer={_fromJsonObject(u){return{code:u.code,enabled:u.enabled}},_toJsonObject(u){return{code:u.code,enabled:u.enabled}}}});var h1=E((S1)=>{Object.defineProperty(S1,"__esModule",{value:!0});S1.EndpointTransformationOutSerializer=void 0;S1.EndpointTransformationOutSerializer={_fromJsonObject(u){return{code:u.code,enabled:u.enabled,updatedAt:u.updatedAt?new Date(u.updatedAt):null}},_toJsonObject(u){return{code:u.code,enabled:u.enabled,updatedAt:u.updatedAt}}}});var k1=E((O1)=>{Object.defineProperty(O1,"__esModule",{value:!0});O1.EndpointTransformationPatchSerializer=void 0;O1.EndpointTransformationPatchSerializer={_fromJsonObject(u){return{code:u.code,enabled:u.enabled}},_toJsonObject(u){return{code:u.code,enabled:u.enabled}}}});var y1=E((I1)=>{Object.defineProperty(I1,"__esModule",{value:!0});I1.EndpointUpdateSerializer=void 0;I1.EndpointUpdateSerializer={_fromJsonObject(u){return{channels:u.channels,description:u.description,disabled:u.disabled,filterTypes:u.filterTypes,metadata:u.metadata,rateLimit:u.rateLimit,throttleRate:u.throttleRate,uid:u.uid,url:u.url,version:u.version}},_toJsonObject(u){return{channels:u.channels,description:u.description,disabled:u.disabled,filterTypes:u.filterTypes,metadata:u.metadata,rateLimit:u.rateLimit,throttleRate:u.throttleRate,uid:u.uid,url:u.url,version:u.version}}}});var g1=E((_1)=>{Object.defineProperty(_1,"__esModule",{value:!0});_1.EventExampleInSerializer=void 0;_1.EventExampleInSerializer={_fromJsonObject(u){return{eventType:u.eventType,exampleIndex:u.exampleIndex}},_toJsonObject(u){return{eventType:u.eventType,exampleIndex:u.exampleIndex}}}});var l1=E((j1)=>{Object.defineProperty(j1,"__esModule",{value:!0});j1.ListResponseEndpointOutSerializer=void 0;var b1=N0();j1.ListResponseEndpointOutSerializer={_fromJsonObject(u){return{data:u.data.map((D)=>b1.EndpointOutSerializer._fromJsonObject(D)),done:u.done,iterator:u.iterator,prevIterator:u.prevIterator}},_toJsonObject(u){return{data:u.data.map((D)=>b1.EndpointOutSerializer._toJsonObject(D)),done:u.done,iterator:u.iterator,prevIterator:u.prevIterator}}}});var K2=E((d1)=>{Object.defineProperty(d1,"__esModule",{value:!0});d1.MessageOutSerializer=void 0;d1.MessageOutSerializer={_fromJsonObject(u){return{channels:u.channels,deliverAt:u.deliverAt?new Date(u.deliverAt):null,eventId:u.eventId,eventType:u.eventType,id:u.id,payload:u.payload,tags:u.tags,timestamp:new Date(u.timestamp)}},_toJsonObject(u){return{channels:u.channels,deliverAt:u.deliverAt,eventId:u.eventId,eventType:u.eventType,id:u.id,payload:u.payload,tags:u.tags,timestamp:u.timestamp}}}});var a1=E((c1)=>{Object.defineProperty(c1,"__esModule",{value:!0});c1.RecoverInSerializer=void 0;c1.RecoverInSerializer={_fromJsonObject(u){return{since:new Date(u.since),until:u.until?new Date(u.until):null}},_toJsonObject(u){return{since:u.since,until:u.until}}}});var t1=E((s1)=>{Object.defineProperty(s1,"__esModule",{value:!0});s1.RecoverOutSerializer=void 0;var p1=t(),n1=e();s1.RecoverOutSerializer={_fromJsonObject(u){return{id:u.id,status:p1.BackgroundTaskStatusSerializer._fromJsonObject(u.status),task:n1.BackgroundTaskTypeSerializer._fromJsonObject(u.task),updatedAt:new Date(u.updatedAt)}},_toJsonObject(u){return{id:u.id,status:p1.BackgroundTaskStatusSerializer._toJsonObject(u.status),task:n1.BackgroundTaskTypeSerializer._toJsonObject(u.task),updatedAt:u.updatedAt}}}});var D3=E((e1)=>{Object.defineProperty(e1,"__esModule",{value:!0});e1.ReplayInSerializer=void 0;e1.ReplayInSerializer={_fromJsonObject(u){return{since:new Date(u.since),until:u.until?new Date(u.until):null}},_toJsonObject(u){return{since:u.since,until:u.until}}}});var E3=E((F3)=>{Object.defineProperty(F3,"__esModule",{value:!0});F3.ReplayOutSerializer=void 0;var A3=t(),B3=e();F3.ReplayOutSerializer={_fromJsonObject(u){return{id:u.id,status:A3.BackgroundTaskStatusSerializer._fromJsonObject(u.status),task:B3.BackgroundTaskTypeSerializer._fromJsonObject(u.task),updatedAt:new Date(u.updatedAt)}},_toJsonObject(u){return{id:u.id,status:A3.BackgroundTaskStatusSerializer._toJsonObject(u.status),task:B3.BackgroundTaskTypeSerializer._toJsonObject(u.task),updatedAt:u.updatedAt}}}});var z3=E((J3)=>{Object.defineProperty(J3,"__esModule",{value:!0});J3.Endpoint=void 0;var $G=eD(),XG=A1(),YG=G0(),QG=G1(),VG=Z1(),I2=N0(),WG=Q1(),KG=K1(),HG=J0(),CG=R1(),UG=M1(),PG=h1(),RG=k1(),LG=y1(),vG=g1(),MG=l1(),SG=K2(),TG=a1(),hG=t1(),OG=D3(),G3=E3(),V=R();class N3{constructor(u){this.requestCtx=u}list(u,D){let A=new V.SvixRequest(V.HttpMethod.GET,"/api/v1/app/{app_id}/endpoint");return A.setPathParam("app_id",u),A.setQueryParams({limit:D===null||D===void 0?void 0:D.limit,iterator:D===null||D===void 0?void 0:D.iterator,order:D===null||D===void 0?void 0:D.order}),A.send(this.requestCtx,MG.ListResponseEndpointOutSerializer._fromJsonObject)}create(u,D,A){let B=new V.SvixRequest(V.HttpMethod.POST,"/api/v1/app/{app_id}/endpoint");return B.setPathParam("app_id",u),B.setHeaderParam("idempotency-key",A===null||A===void 0?void 0:A.idempotencyKey),B.setBody(VG.EndpointInSerializer._toJsonObject(D)),B.send(this.requestCtx,I2.EndpointOutSerializer._fromJsonObject)}get(u,D){let A=new V.SvixRequest(V.HttpMethod.GET,"/api/v1/app/{app_id}/endpoint/{endpoint_id}");return A.setPathParam("app_id",u),A.setPathParam("endpoint_id",D),A.send(this.requestCtx,I2.EndpointOutSerializer._fromJsonObject)}update(u,D,A){let B=new V.SvixRequest(V.HttpMethod.PUT,"/api/v1/app/{app_id}/endpoint/{endpoint_id}");return B.setPathParam("app_id",u),B.setPathParam("endpoint_id",D),B.setBody(LG.EndpointUpdateSerializer._toJsonObject(A)),B.send(this.requestCtx,I2.EndpointOutSerializer._fromJsonObject)}delete(u,D){let A=new V.SvixRequest(V.HttpMethod.DELETE,"/api/v1/app/{app_id}/endpoint/{endpoint_id}");return A.setPathParam("app_id",u),A.setPathParam("endpoint_id",D),A.sendNoResponseBody(this.requestCtx)}patch(u,D,A){let B=new V.SvixRequest(V.HttpMethod.PATCH,"/api/v1/app/{app_id}/endpoint/{endpoint_id}");return B.setPathParam("app_id",u),B.setPathParam("endpoint_id",D),B.setBody(WG.EndpointPatchSerializer._toJsonObject(A)),B.send(this.requestCtx,I2.EndpointOutSerializer._fromJsonObject)}bulkReplay(u,D,A,B){let F=new V.SvixRequest(V.HttpMethod.POST,"/api/v1/app/{app_id}/endpoint/{endpoint_id}/bulk-replay");return F.setPathParam("app_id",u),F.setPathParam("endpoint_id",D),F.setHeaderParam("idempotency-key",B===null||B===void 0?void 0:B.idempotencyKey),F.setBody($G.BulkReplayInSerializer._toJsonObject(A)),F.send(this.requestCtx,G3.ReplayOutSerializer._fromJsonObject)}getHeaders(u,D){let A=new V.SvixRequest(V.HttpMethod.GET,"/api/v1/app/{app_id}/endpoint/{endpoint_id}/headers");return A.setPathParam("app_id",u),A.setPathParam("endpoint_id",D),A.send(this.requestCtx,YG.EndpointHeadersOutSerializer._fromJsonObject)}updateHeaders(u,D,A){let B=new V.SvixRequest(V.HttpMethod.PUT,"/api/v1/app/{app_id}/endpoint/{endpoint_id}/headers");return B.setPathParam("app_id",u),B.setPathParam("endpoint_id",D),B.setBody(XG.EndpointHeadersInSerializer._toJsonObject(A)),B.sendNoResponseBody(this.requestCtx)}headersUpdate(u,D,A){return this.updateHeaders(u,D,A)}patchHeaders(u,D,A){let B=new V.SvixRequest(V.HttpMethod.PATCH,"/api/v1/app/{app_id}/endpoint/{endpoint_id}/headers");return B.setPathParam("app_id",u),B.setPathParam("endpoint_id",D),B.setBody(QG.EndpointHeadersPatchInSerializer._toJsonObject(A)),B.sendNoResponseBody(this.requestCtx)}headersPatch(u,D,A){return this.patchHeaders(u,D,A)}recover(u,D,A,B){let F=new V.SvixRequest(V.HttpMethod.POST,"/api/v1/app/{app_id}/endpoint/{endpoint_id}/recover");return F.setPathParam("app_id",u),F.setPathParam("endpoint_id",D),F.setHeaderParam("idempotency-key",B===null||B===void 0?void 0:B.idempotencyKey),F.setBody(TG.RecoverInSerializer._toJsonObject(A)),F.send(this.requestCtx,hG.RecoverOutSerializer._fromJsonObject)}replayMissing(u,D,A,B){let F=new V.SvixRequest(V.HttpMethod.POST,"/api/v1/app/{app_id}/endpoint/{endpoint_id}/replay-missing");return F.setPathParam("app_id",u),F.setPathParam("endpoint_id",D),F.setHeaderParam("idempotency-key",B===null||B===void 0?void 0:B.idempotencyKey),F.setBody(OG.ReplayInSerializer._toJsonObject(A)),F.send(this.requestCtx,G3.ReplayOutSerializer._fromJsonObject)}getSecret(u,D){let A=new V.SvixRequest(V.HttpMethod.GET,"/api/v1/app/{app_id}/endpoint/{endpoint_id}/secret");return A.setPathParam("app_id",u),A.setPathParam("endpoint_id",D),A.send(this.requestCtx,KG.EndpointSecretOutSerializer._fromJsonObject)}rotateSecret(u,D,A,B){let F=new V.SvixRequest(V.HttpMethod.POST,"/api/v1/app/{app_id}/endpoint/{endpoint_id}/secret/rotate");return F.setPathParam("app_id",u),F.setPathParam("endpoint_id",D),F.setHeaderParam("idempotency-key",B===null||B===void 0?void 0:B.idempotencyKey),F.setBody(HG.EndpointSecretRotateInSerializer._toJsonObject(A)),F.sendNoResponseBody(this.requestCtx)}sendExample(u,D,A,B){let F=new V.SvixRequest(V.HttpMethod.POST,"/api/v1/app/{app_id}/endpoint/{endpoint_id}/send-example");return F.setPathParam("app_id",u),F.setPathParam("endpoint_id",D),F.setHeaderParam("idempotency-key",B===null||B===void 0?void 0:B.idempotencyKey),F.setBody(vG.EventExampleInSerializer._toJsonObject(A)),F.send(this.requestCtx,SG.MessageOutSerializer._fromJsonObject)}getStats(u,D,A){let B=new V.SvixRequest(V.HttpMethod.GET,"/api/v1/app/{app_id}/endpoint/{endpoint_id}/stats");return B.setPathParam("app_id",u),B.setPathParam("endpoint_id",D),B.setQueryParams({since:A===null||A===void 0?void 0:A.since,until:A===null||A===void 0?void 0:A.until}),B.send(this.requestCtx,CG.EndpointStatsSerializer._fromJsonObject)}transformationGet(u,D){let A=new V.SvixRequest(V.HttpMethod.GET,"/api/v1/app/{app_id}/endpoint/{endpoint_id}/transformation");return A.setPathParam("app_id",u),A.setPathParam("endpoint_id",D),A.send(this.requestCtx,PG.EndpointTransformationOutSerializer._fromJsonObject)}patchTransformation(u,D,A){let B=new V.SvixRequest(V.HttpMethod.PATCH,"/api/v1/app/{app_id}/endpoint/{endpoint_id}/transformation");return B.setPathParam("app_id",u),B.setPathParam("endpoint_id",D),B.setBody(RG.EndpointTransformationPatchSerializer._toJsonObject(A)),B.sendNoResponseBody(this.requestCtx)}transformationPartialUpdate(u,D,A){let B=new V.SvixRequest(V.HttpMethod.PATCH,"/api/v1/app/{app_id}/endpoint/{endpoint_id}/transformation");return B.setPathParam("app_id",u),B.setPathParam("endpoint_id",D),B.setBody(UG.EndpointTransformationInSerializer._toJsonObject(A)),B.sendNoResponseBody(this.requestCtx)}}J3.Endpoint=N3});var Z0=E(($3)=>{Object.defineProperty($3,"__esModule",{value:!0});$3.EventTypeInSerializer=void 0;$3.EventTypeInSerializer={_fromJsonObject(u){return{archived:u.archived,deprecated:u.deprecated,description:u.description,featureFlag:u.featureFlag,featureFlags:u.featureFlags,groupName:u.groupName,name:u.name,schemas:u.schemas}},_toJsonObject(u){return{archived:u.archived,deprecated:u.deprecated,description:u.description,featureFlag:u.featureFlag,featureFlags:u.featureFlags,groupName:u.groupName,name:u.name,schemas:u.schemas}}}});var K3=E((V3)=>{Object.defineProperty(V3,"__esModule",{value:!0});V3.EnvironmentInSerializer=void 0;var Y3=w0(),Q3=Z0();V3.EnvironmentInSerializer={_fromJsonObject(u){var D,A;return{connectors:(D=u.connectors)===null||D===void 0?void 0:D.map((B)=>Y3.ConnectorInSerializer._fromJsonObject(B)),eventTypes:(A=u.eventTypes)===null||A===void 0?void 0:A.map((B)=>Q3.EventTypeInSerializer._fromJsonObject(B)),settings:u.settings}},_toJsonObject(u){var D,A;return{connectors:(D=u.connectors)===null||D===void 0?void 0:D.map((B)=>Y3.ConnectorInSerializer._toJsonObject(B)),eventTypes:(A=u.eventTypes)===null||A===void 0?void 0:A.map((B)=>Q3.EventTypeInSerializer._toJsonObject(B)),settings:u.settings}}}});var x2=E((H3)=>{Object.defineProperty(H3,"__esModule",{value:!0});H3.EventTypeOutSerializer=void 0;H3.EventTypeOutSerializer={_fromJsonObject(u){return{archived:u.archived,createdAt:new Date(u.createdAt),deprecated:u.deprecated,description:u.description,featureFlag:u.featureFlag,featureFlags:u.featureFlags,groupName:u.groupName,name:u.name,schemas:u.schemas,updatedAt:new Date(u.updatedAt)}},_toJsonObject(u){return{archived:u.archived,createdAt:u.createdAt,deprecated:u.deprecated,description:u.description,featureFlag:u.featureFlag,featureFlags:u.featureFlags,groupName:u.groupName,name:u.name,schemas:u.schemas,updatedAt:u.updatedAt}}}});var v3=E((R3)=>{Object.defineProperty(R3,"__esModule",{value:!0});R3.EnvironmentOutSerializer=void 0;var U3=q2(),P3=x2();R3.EnvironmentOutSerializer={_fromJsonObject(u){return{connectors:u.connectors.map((D)=>U3.ConnectorOutSerializer._fromJsonObject(D)),createdAt:new Date(u.createdAt),eventTypes:u.eventTypes.map((D)=>P3.EventTypeOutSerializer._fromJsonObject(D)),settings:u.settings,version:u.version}},_toJsonObject(u){return{connectors:u.connectors.map((D)=>U3.ConnectorOutSerializer._toJsonObject(D)),createdAt:u.createdAt,eventTypes:u.eventTypes.map((D)=>P3.EventTypeOutSerializer._toJsonObject(D)),settings:u.settings,version:u.version}}}});var h3=E((S3)=>{Object.defineProperty(S3,"__esModule",{value:!0});S3.Environment=void 0;var qG=K3(),kG=v3(),y2=R();class M3{constructor(u){this.requestCtx=u}export(u){let D=new y2.SvixRequest(y2.HttpMethod.POST,"/api/v1/environment/export");return D.setHeaderParam("idempotency-key",u===null||u===void 0?void 0:u.idempotencyKey),D.send(this.requestCtx,kG.EnvironmentOutSerializer._fromJsonObject)}import(u,D){let A=new y2.SvixRequest(y2.HttpMethod.POST,"/api/v1/environment/import");return A.setHeaderParam("idempotency-key",D===null||D===void 0?void 0:D.idempotencyKey),A.setBody(qG.EnvironmentInSerializer._toJsonObject(u)),A.sendNoResponseBody(this.requestCtx)}}S3.Environment=M3});var k3=E((O3)=>{Object.defineProperty(O3,"__esModule",{value:!0});O3.EventTypeImportOpenApiInSerializer=void 0;O3.EventTypeImportOpenApiInSerializer={_fromJsonObject(u){return{dryRun:u.dryRun,replaceAll:u.replaceAll,spec:u.spec,specRaw:u.specRaw}},_toJsonObject(u){return{dryRun:u.dryRun,replaceAll:u.replaceAll,spec:u.spec,specRaw:u.specRaw}}}});var y3=E((I3)=>{Object.defineProperty(I3,"__esModule",{value:!0});I3.EventTypeFromOpenApiSerializer=void 0;I3.EventTypeFromOpenApiSerializer={_fromJsonObject(u){return{deprecated:u.deprecated,description:u.description,featureFlag:u.featureFlag,featureFlags:u.featureFlags,groupName:u.groupName,name:u.name,schemas:u.schemas}},_toJsonObject(u){return{deprecated:u.deprecated,description:u.description,featureFlag:u.featureFlag,featureFlags:u.featureFlags,groupName:u.groupName,name:u.name,schemas:u.schemas}}}});var b3=E((m3)=>{Object.defineProperty(m3,"__esModule",{value:!0});m3.EventTypeImportOpenApiOutDataSerializer=void 0;var _3=y3();m3.EventTypeImportOpenApiOutDataSerializer={_fromJsonObject(u){var D;return{modified:u.modified,toModify:(D=u.to_modify)===null||D===void 0?void 0:D.map((A)=>_3.EventTypeFromOpenApiSerializer._fromJsonObject(A))}},_toJsonObject(u){var D;return{modified:u.modified,to_modify:(D=u.toModify)===null||D===void 0?void 0:D.map((A)=>_3.EventTypeFromOpenApiSerializer._toJsonObject(A))}}}});var d3=E((f3)=>{Object.defineProperty(f3,"__esModule",{value:!0});f3.EventTypeImportOpenApiOutSerializer=void 0;var j3=b3();f3.EventTypeImportOpenApiOutSerializer={_fromJsonObject(u){return{data:j3.EventTypeImportOpenApiOutDataSerializer._fromJsonObject(u.data)}},_toJsonObject(u){return{data:j3.EventTypeImportOpenApiOutDataSerializer._toJsonObject(u.data)}}}});var i3=E((r3)=>{Object.defineProperty(r3,"__esModule",{value:!0});r3.EventTypePatchSerializer=void 0;r3.EventTypePatchSerializer={_fromJsonObject(u){return{archived:u.archived,deprecated:u.deprecated,description:u.description,featureFlag:u.featureFlag,featureFlags:u.featureFlags,groupName:u.groupName,schemas:u.schemas}},_toJsonObject(u){return{archived:u.archived,deprecated:u.deprecated,description:u.description,featureFlag:u.featureFlag,featureFlags:u.featureFlags,groupName:u.groupName,schemas:u.schemas}}}});var n3=E((a3)=>{Object.defineProperty(a3,"__esModule",{value:!0});a3.EventTypeUpdateSerializer=void 0;a3.EventTypeUpdateSerializer={_fromJsonObject(u){return{archived:u.archived,deprecated:u.deprecated,description:u.description,featureFlag:u.featureFlag,featureFlags:u.featureFlags,groupName:u.groupName,schemas:u.schemas}},_toJsonObject(u){return{archived:u.archived,deprecated:u.deprecated,description:u.description,featureFlag:u.featureFlag,featureFlags:u.featureFlags,groupName:u.groupName,schemas:u.schemas}}}});var e3=E((o3)=>{Object.defineProperty(o3,"__esModule",{value:!0});o3.ListResponseEventTypeOutSerializer=void 0;var s3=x2();o3.ListResponseEventTypeOutSerializer={_fromJsonObject(u){return{data:u.data.map((D)=>s3.EventTypeOutSerializer._fromJsonObject(D)),done:u.done,iterator:u.iterator,prevIterator:u.prevIterator}},_toJsonObject(u){return{data:u.data.map((D)=>s3.EventTypeOutSerializer._toJsonObject(D)),done:u.done,iterator:u.iterator,prevIterator:u.prevIterator}}}});var B5=E((D5)=>{Object.defineProperty(D5,"__esModule",{value:!0});D5.EventType=void 0;var IG=k3(),xG=d3(),yG=Z0(),_2=x2(),_G=i3(),mG=n3(),gG=e3(),b=R();class u5{constructor(u){this.requestCtx=u}list(u){let D=new b.SvixRequest(b.HttpMethod.GET,"/api/v1/event-type");return D.setQueryParams({limit:u===null||u===void 0?void 0:u.limit,iterator:u===null||u===void 0?void 0:u.iterator,order:u===null||u===void 0?void 0:u.order,include_archived:u===null||u===void 0?void 0:u.includeArchived,with_content:u===null||u===void 0?void 0:u.withContent}),D.send(this.requestCtx,gG.ListResponseEventTypeOutSerializer._fromJsonObject)}create(u,D){let A=new b.SvixRequest(b.HttpMethod.POST,"/api/v1/event-type");return A.setHeaderParam("idempotency-key",D===null||D===void 0?void 0:D.idempotencyKey),A.setBody(yG.EventTypeInSerializer._toJsonObject(u)),A.send(this.requestCtx,_2.EventTypeOutSerializer._fromJsonObject)}importOpenapi(u,D){let A=new b.SvixRequest(b.HttpMethod.POST,"/api/v1/event-type/import/openapi");return A.setHeaderParam("idempotency-key",D===null||D===void 0?void 0:D.idempotencyKey),A.setBody(IG.EventTypeImportOpenApiInSerializer._toJsonObject(u)),A.send(this.requestCtx,xG.EventTypeImportOpenApiOutSerializer._fromJsonObject)}get(u){let D=new b.SvixRequest(b.HttpMethod.GET,"/api/v1/event-type/{event_type_name}");return D.setPathParam("event_type_name",u),D.send(this.requestCtx,_2.EventTypeOutSerializer._fromJsonObject)}update(u,D){let A=new b.SvixRequest(b.HttpMethod.PUT,"/api/v1/event-type/{event_type_name}");return A.setPathParam("event_type_name",u),A.setBody(mG.EventTypeUpdateSerializer._toJsonObject(D)),A.send(this.requestCtx,_2.EventTypeOutSerializer._fromJsonObject)}delete(u,D){let A=new b.SvixRequest(b.HttpMethod.DELETE,"/api/v1/event-type/{event_type_name}");return A.setPathParam("event_type_name",u),A.setQueryParams({expunge:D===null||D===void 0?void 0:D.expunge}),A.sendNoResponseBody(this.requestCtx)}patch(u,D){let A=new b.SvixRequest(b.HttpMethod.PATCH,"/api/v1/event-type/{event_type_name}");return A.setPathParam("event_type_name",u),A.setBody(_G.EventTypePatchSerializer._toJsonObject(D)),A.send(this.requestCtx,_2.EventTypeOutSerializer._fromJsonObject)}}D5.EventType=u5});var N5=E((E5)=>{Object.defineProperty(E5,"__esModule",{value:!0});E5.Health=void 0;var F5=R();class w5{constructor(u){this.requestCtx=u}get(){return new F5.SvixRequest(F5.HttpMethod.GET,"/api/v1/health").sendNoResponseBody(this.requestCtx)}}E5.Health=w5});var z5=E((J5)=>{Object.defineProperty(J5,"__esModule",{value:!0});J5.IngestSourceConsumerPortalAccessInSerializer=void 0;J5.IngestSourceConsumerPortalAccessInSerializer={_fromJsonObject(u){return{expiry:u.expiry,readOnly:u.readOnly}},_toJsonObject(u){return{expiry:u.expiry,readOnly:u.readOnly}}}});var Y5=E(($5)=>{Object.defineProperty($5,"__esModule",{value:!0});$5.IngestEndpointHeadersInSerializer=void 0;$5.IngestEndpointHeadersInSerializer={_fromJsonObject(u){return{headers:u.headers}},_toJsonObject(u){return{headers:u.headers}}}});var W5=E((Q5)=>{Object.defineProperty(Q5,"__esModule",{value:!0});Q5.IngestEndpointHeadersOutSerializer=void 0;Q5.IngestEndpointHeadersOutSerializer={_fromJsonObject(u){return{headers:u.headers,sensitive:u.sensitive}},_toJsonObject(u){return{headers:u.headers,sensitive:u.sensitive}}}});var C5=E((K5)=>{Object.defineProperty(K5,"__esModule",{value:!0});K5.IngestEndpointInSerializer=void 0;K5.IngestEndpointInSerializer={_fromJsonObject(u){return{description:u.description,disabled:u.disabled,metadata:u.metadata,rateLimit:u.rateLimit,secret:u.secret,uid:u.uid,url:u.url}},_toJsonObject(u){return{description:u.description,disabled:u.disabled,metadata:u.metadata,rateLimit:u.rateLimit,secret:u.secret,uid:u.uid,url:u.url}}}});var z0=E((U5)=>{Object.defineProperty(U5,"__esModule",{value:!0});U5.IngestEndpointOutSerializer=void 0;U5.IngestEndpointOutSerializer={_fromJsonObject(u){return{createdAt:new Date(u.createdAt),description:u.description,disabled:u.disabled,id:u.id,metadata:u.metadata,rateLimit:u.rateLimit,uid:u.uid,updatedAt:new Date(u.updatedAt),url:u.url}},_toJsonObject(u){return{createdAt:u.createdAt,description:u.description,disabled:u.disabled,id:u.id,metadata:u.metadata,rateLimit:u.rateLimit,uid:u.uid,updatedAt:u.updatedAt,url:u.url}}}});var v5=E((R5)=>{Object.defineProperty(R5,"__esModule",{value:!0});R5.IngestEndpointSecretInSerializer=void 0;R5.IngestEndpointSecretInSerializer={_fromJsonObject(u){return{key:u.key}},_toJsonObject(u){return{key:u.key}}}});var T5=E((M5)=>{Object.defineProperty(M5,"__esModule",{value:!0});M5.IngestEndpointSecretOutSerializer=void 0;M5.IngestEndpointSecretOutSerializer={_fromJsonObject(u){return{key:u.key}},_toJsonObject(u){return{key:u.key}}}});var q5=E((h5)=>{Object.defineProperty(h5,"__esModule",{value:!0});h5.IngestEndpointTransformationOutSerializer=void 0;h5.IngestEndpointTransformationOutSerializer={_fromJsonObject(u){return{code:u.code,enabled:u.enabled}},_toJsonObject(u){return{code:u.code,enabled:u.enabled}}}});var x5=E((k5)=>{Object.defineProperty(k5,"__esModule",{value:!0});k5.IngestEndpointTransformationPatchSerializer=void 0;k5.IngestEndpointTransformationPatchSerializer={_fromJsonObject(u){return{code:u.code,enabled:u.enabled}},_toJsonObject(u){return{code:u.code,enabled:u.enabled}}}});var m5=E((y5)=>{Object.defineProperty(y5,"__esModule",{value:!0});y5.IngestEndpointUpdateSerializer=void 0;y5.IngestEndpointUpdateSerializer={_fromJsonObject(u){return{description:u.description,disabled:u.disabled,metadata:u.metadata,rateLimit:u.rateLimit,uid:u.uid,url:u.url}},_toJsonObject(u){return{description:u.description,disabled:u.disabled,metadata:u.metadata,rateLimit:u.rateLimit,uid:u.uid,url:u.url}}}});var f5=E((b5)=>{Object.defineProperty(b5,"__esModule",{value:!0});b5.ListResponseIngestEndpointOutSerializer=void 0;var g5=z0();b5.ListResponseIngestEndpointOutSerializer={_fromJsonObject(u){return{data:u.data.map((D)=>g5.IngestEndpointOutSerializer._fromJsonObject(D)),done:u.done,iterator:u.iterator,prevIterator:u.prevIterator}},_toJsonObject(u){return{data:u.data.map((D)=>g5.IngestEndpointOutSerializer._toJsonObject(D)),done:u.done,iterator:u.iterator,prevIterator:u.prevIterator}}}});var c5=E((d5)=>{Object.defineProperty(d5,"__esModule",{value:!0});d5.IngestEndpoint=void 0;var bG=Y5(),jG=W5(),fG=C5(),$0=z0(),lG=v5(),dG=T5(),rG=q5(),cG=x5(),iG=m5(),aG=f5(),v=R();class l5{constructor(u){this.requestCtx=u}list(u,D){let A=new v.SvixRequest(v.HttpMethod.GET,"/ingest/api/v1/source/{source_id}/endpoint");return A.setPathParam("source_id",u),A.setQueryParams({limit:D===null||D===void 0?void 0:D.limit,iterator:D===null||D===void 0?void 0:D.iterator,order:D===null||D===void 0?void 0:D.order}),A.send(this.requestCtx,aG.ListResponseIngestEndpointOutSerializer._fromJsonObject)}create(u,D,A){let B=new v.SvixRequest(v.HttpMethod.POST,"/ingest/api/v1/source/{source_id}/endpoint");return B.setPathParam("source_id",u),B.setHeaderParam("idempotency-key",A===null||A===void 0?void 0:A.idempotencyKey),B.setBody(fG.IngestEndpointInSerializer._toJsonObject(D)),B.send(this.requestCtx,$0.IngestEndpointOutSerializer._fromJsonObject)}get(u,D){let A=new v.SvixRequest(v.HttpMethod.GET,"/ingest/api/v1/source/{source_id}/endpoint/{endpoint_id}");return A.setPathParam("source_id",u),A.setPathParam("endpoint_id",D),A.send(this.requestCtx,$0.IngestEndpointOutSerializer._fromJsonObject)}update(u,D,A){let B=new v.SvixRequest(v.HttpMethod.PUT,"/ingest/api/v1/source/{source_id}/endpoint/{endpoint_id}");return B.setPathParam("source_id",u),B.setPathParam("endpoint_id",D),B.setBody(iG.IngestEndpointUpdateSerializer._toJsonObject(A)),B.send(this.requestCtx,$0.IngestEndpointOutSerializer._fromJsonObject)}delete(u,D){let A=new v.SvixRequest(v.HttpMethod.DELETE,"/ingest/api/v1/source/{source_id}/endpoint/{endpoint_id}");return A.setPathParam("source_id",u),A.setPathParam("endpoint_id",D),A.sendNoResponseBody(this.requestCtx)}getHeaders(u,D){let A=new v.SvixRequest(v.HttpMethod.GET,"/ingest/api/v1/source/{source_id}/endpoint/{endpoint_id}/headers");return A.setPathParam("source_id",u),A.setPathParam("endpoint_id",D),A.send(this.requestCtx,jG.IngestEndpointHeadersOutSerializer._fromJsonObject)}updateHeaders(u,D,A){let B=new v.SvixRequest(v.HttpMethod.PUT,"/ingest/api/v1/source/{source_id}/endpoint/{endpoint_id}/headers");return B.setPathParam("source_id",u),B.setPathParam("endpoint_id",D),B.setBody(bG.IngestEndpointHeadersInSerializer._toJsonObject(A)),B.sendNoResponseBody(this.requestCtx)}getSecret(u,D){let A=new v.SvixRequest(v.HttpMethod.GET,"/ingest/api/v1/source/{source_id}/endpoint/{endpoint_id}/secret");return A.setPathParam("source_id",u),A.setPathParam("endpoint_id",D),A.send(this.requestCtx,dG.IngestEndpointSecretOutSerializer._fromJsonObject)}rotateSecret(u,D,A,B){let F=new v.SvixRequest(v.HttpMethod.POST,"/ingest/api/v1/source/{source_id}/endpoint/{endpoint_id}/secret/rotate");return F.setPathParam("source_id",u),F.setPathParam("endpoint_id",D),F.setHeaderParam("idempotency-key",B===null||B===void 0?void 0:B.idempotencyKey),F.setBody(lG.IngestEndpointSecretInSerializer._toJsonObject(A)),F.sendNoResponseBody(this.requestCtx)}getTransformation(u,D){let A=new v.SvixRequest(v.HttpMethod.GET,"/ingest/api/v1/source/{source_id}/endpoint/{endpoint_id}/transformation");return A.setPathParam("source_id",u),A.setPathParam("endpoint_id",D),A.send(this.requestCtx,rG.IngestEndpointTransformationOutSerializer._fromJsonObject)}setTransformation(u,D,A){let B=new v.SvixRequest(v.HttpMethod.PATCH,"/ingest/api/v1/source/{source_id}/endpoint/{endpoint_id}/transformation");return B.setPathParam("source_id",u),B.setPathParam("endpoint_id",D),B.setBody(cG.IngestEndpointTransformationPatchSerializer._toJsonObject(A)),B.sendNoResponseBody(this.requestCtx)}}d5.IngestEndpoint=l5});var p5=E((i5)=>{Object.defineProperty(i5,"__esModule",{value:!0});i5.AdobeSignConfigSerializer=void 0;i5.AdobeSignConfigSerializer={_fromJsonObject(u){return{clientId:u.clientId}},_toJsonObject(u){return{clientId:u.clientId}}}});var o5=E((n5)=>{Object.defineProperty(n5,"__esModule",{value:!0});n5.AirwallexConfigSerializer=void 0;n5.AirwallexConfigSerializer={_fromJsonObject(u){return{secret:u.secret}},_toJsonObject(u){return{secret:u.secret}}}});var uA=E((t5)=>{Object.defineProperty(t5,"__esModule",{value:!0});t5.CheckbookConfigSerializer=void 0;t5.CheckbookConfigSerializer={_fromJsonObject(u){return{secret:u.secret}},_toJsonObject(u){return{secret:u.secret}}}});var X0=E((DA)=>{Object.defineProperty(DA,"__esModule",{value:!0});DA.CronConfigSerializer=void 0;DA.CronConfigSerializer={_fromJsonObject(u){return{contentType:u.contentType,payload:u.payload,schedule:u.schedule}},_toJsonObject(u){return{contentType:u.contentType,payload:u.payload,schedule:u.schedule}}}});var wA=E((BA)=>{Object.defineProperty(BA,"__esModule",{value:!0});BA.DocusignConfigSerializer=void 0;BA.DocusignConfigSerializer={_fromJsonObject(u){return{secret:u.secret}},_toJsonObject(u){return{secret:u.secret}}}});var NA=E((EA)=>{Object.defineProperty(EA,"__esModule",{value:!0});EA.EasypostConfigSerializer=void 0;EA.EasypostConfigSerializer={_fromJsonObject(u){return{secret:u.secret}},_toJsonObject(u){return{secret:u.secret}}}});var zA=E((JA)=>{Object.defineProperty(JA,"__esModule",{value:!0});JA.GithubConfigSerializer=void 0;JA.GithubConfigSerializer={_fromJsonObject(u){return{secret:u.secret}},_toJsonObject(u){return{secret:u.secret}}}});var YA=E(($A)=>{Object.defineProperty($A,"__esModule",{value:!0});$A.HubspotConfigSerializer=void 0;$A.HubspotConfigSerializer={_fromJsonObject(u){return{secret:u.secret}},_toJsonObject(u){return{secret:u.secret}}}});var WA=E((QA)=>{Object.defineProperty(QA,"__esModule",{value:!0});QA.MetaConfigSerializer=void 0;QA.MetaConfigSerializer={_fromJsonObject(u){return{secret:u.secret,verifyToken:u.verifyToken}},_toJsonObject(u){return{secret:u.secret,verifyToken:u.verifyToken}}}});var CA=E((KA)=>{Object.defineProperty(KA,"__esModule",{value:!0});KA.OrumIoConfigSerializer=void 0;KA.OrumIoConfigSerializer={_fromJsonObject(u){return{publicKey:u.publicKey}},_toJsonObject(u){return{publicKey:u.publicKey}}}});var RA=E((UA)=>{Object.defineProperty(UA,"__esModule",{value:!0});UA.PandaDocConfigSerializer=void 0;UA.PandaDocConfigSerializer={_fromJsonObject(u){return{secret:u.secret}},_toJsonObject(u){return{secret:u.secret}}}});var MA=E((LA)=>{Object.defineProperty(LA,"__esModule",{value:!0});LA.PortIoConfigSerializer=void 0;LA.PortIoConfigSerializer={_fromJsonObject(u){return{secret:u.secret}},_toJsonObject(u){return{secret:u.secret}}}});var hA=E((SA)=>{Object.defineProperty(SA,"__esModule",{value:!0});SA.RutterConfigSerializer=void 0;SA.RutterConfigSerializer={_fromJsonObject(u){return{secret:u.secret}},_toJsonObject(u){return{secret:u.secret}}}});var kA=E((OA)=>{Object.defineProperty(OA,"__esModule",{value:!0});OA.SegmentConfigSerializer=void 0;OA.SegmentConfigSerializer={_fromJsonObject(u){return{secret:u.secret}},_toJsonObject(u){return{secret:u.secret}}}});var yA=E((IA)=>{Object.defineProperty(IA,"__esModule",{value:!0});IA.ShopifyConfigSerializer=void 0;IA.ShopifyConfigSerializer={_fromJsonObject(u){return{secret:u.secret}},_toJsonObject(u){return{secret:u.secret}}}});var gA=E((_A)=>{Object.defineProperty(_A,"__esModule",{value:!0});_A.SlackConfigSerializer=void 0;_A.SlackConfigSerializer={_fromJsonObject(u){return{secret:u.secret}},_toJsonObject(u){return{secret:u.secret}}}});var fA=E((bA)=>{Object.defineProperty(bA,"__esModule",{value:!0});bA.StripeConfigSerializer=void 0;bA.StripeConfigSerializer={_fromJsonObject(u){return{secret:u.secret}},_toJsonObject(u){return{secret:u.secret}}}});var rA=E((lA)=>{Object.defineProperty(lA,"__esModule",{value:!0});lA.SvixConfigSerializer=void 0;lA.SvixConfigSerializer={_fromJsonObject(u){return{secret:u.secret}},_toJsonObject(u){return{secret:u.secret}}}});var aA=E((cA)=>{Object.defineProperty(cA,"__esModule",{value:!0});cA.TelnyxConfigSerializer=void 0;cA.TelnyxConfigSerializer={_fromJsonObject(u){return{publicKey:u.publicKey}},_toJsonObject(u){return{publicKey:u.publicKey}}}});var sA=E((pA)=>{Object.defineProperty(pA,"__esModule",{value:!0});pA.VapiConfigSerializer=void 0;pA.VapiConfigSerializer={_fromJsonObject(u){return{secret:u.secret}},_toJsonObject(u){return{secret:u.secret}}}});var eA=E((oA)=>{Object.defineProperty(oA,"__esModule",{value:!0});oA.VeriffConfigSerializer=void 0;oA.VeriffConfigSerializer={_fromJsonObject(u){return{secret:u.secret}},_toJsonObject(u){return{secret:u.secret}}}});var A9=E((u9)=>{Object.defineProperty(u9,"__esModule",{value:!0});u9.ZoomConfigSerializer=void 0;u9.ZoomConfigSerializer={_fromJsonObject(u){return{secret:u.secret}},_toJsonObject(u){return{secret:u.secret}}}});var M9=E((L9)=>{Object.defineProperty(L9,"__esModule",{value:!0});L9.IngestSourceInSerializer=void 0;var B9=p5(),F9=o5(),w9=uA(),E9=X0(),G9=wA(),N9=NA(),J9=zA(),Z9=YA(),z9=WA(),$9=CA(),X9=RA(),Y9=MA(),Q9=hA(),V9=kA(),W9=yA(),K9=gA(),H9=fA(),W=rA(),C9=aA(),U9=sA(),P9=eA(),R9=A9();L9.IngestSourceInSerializer={_fromJsonObject(u){let D=u.type;function A(B){switch(B){case"generic-webhook":return{};case"cron":return E9.CronConfigSerializer._fromJsonObject(u.config);case"adobe-sign":return B9.AdobeSignConfigSerializer._fromJsonObject(u.config);case"beehiiv":return W.SvixConfigSerializer._fromJsonObject(u.config);case"brex":return W.SvixConfigSerializer._fromJsonObject(u.config);case"checkbook":return w9.CheckbookConfigSerializer._fromJsonObject(u.config);case"clerk":return W.SvixConfigSerializer._fromJsonObject(u.config);case"docusign":return G9.DocusignConfigSerializer._fromJsonObject(u.config);case"easypost":return N9.EasypostConfigSerializer._fromJsonObject(u.config);case"github":return J9.GithubConfigSerializer._fromJsonObject(u.config);case"guesty":return W.SvixConfigSerializer._fromJsonObject(u.config);case"hubspot":return Z9.HubspotConfigSerializer._fromJsonObject(u.config);case"incident-io":return W.SvixConfigSerializer._fromJsonObject(u.config);case"lithic":return W.SvixConfigSerializer._fromJsonObject(u.config);case"meta":return z9.MetaConfigSerializer._fromJsonObject(u.config);case"nash":return W.SvixConfigSerializer._fromJsonObject(u.config);case"orum-io":return $9.OrumIoConfigSerializer._fromJsonObject(u.config);case"panda-doc":return X9.PandaDocConfigSerializer._fromJsonObject(u.config);case"port-io":return Y9.PortIoConfigSerializer._fromJsonObject(u.config);case"pleo":return W.SvixConfigSerializer._fromJsonObject(u.config);case"psi-fi":return W.SvixConfigSerializer._fromJsonObject(u.config);case"replicate":return W.SvixConfigSerializer._fromJsonObject(u.config);case"resend":return W.SvixConfigSerializer._fromJsonObject(u.config);case"rutter":return Q9.RutterConfigSerializer._fromJsonObject(u.config);case"safebase":return W.SvixConfigSerializer._fromJsonObject(u.config);case"sardine":return W.SvixConfigSerializer._fromJsonObject(u.config);case"segment":return V9.SegmentConfigSerializer._fromJsonObject(u.config);case"shopify":return W9.ShopifyConfigSerializer._fromJsonObject(u.config);case"slack":return K9.SlackConfigSerializer._fromJsonObject(u.config);case"stripe":return H9.StripeConfigSerializer._fromJsonObject(u.config);case"stych":return W.SvixConfigSerializer._fromJsonObject(u.config);case"svix":return W.SvixConfigSerializer._fromJsonObject(u.config);case"zoom":return R9.ZoomConfigSerializer._fromJsonObject(u.config);case"telnyx":return C9.TelnyxConfigSerializer._fromJsonObject(u.config);case"vapi":return U9.VapiConfigSerializer._fromJsonObject(u.config);case"open-ai":return W.SvixConfigSerializer._fromJsonObject(u.config);case"render":return W.SvixConfigSerializer._fromJsonObject(u.config);case"veriff":return P9.VeriffConfigSerializer._fromJsonObject(u.config);case"airwallex":return F9.AirwallexConfigSerializer._fromJsonObject(u.config);default:throw Error(`Unexpected type: ${B}`)}}return{type:D,config:A(D),metadata:u.metadata,name:u.name,uid:u.uid}},_toJsonObject(u){let D;switch(u.type){case"generic-webhook":D={};break;case"cron":D=E9.CronConfigSerializer._toJsonObject(u.config);break;case"adobe-sign":D=B9.AdobeSignConfigSerializer._toJsonObject(u.config);break;case"beehiiv":D=W.SvixConfigSerializer._toJsonObject(u.config);break;case"brex":D=W.SvixConfigSerializer._toJsonObject(u.config);break;case"checkbook":D=w9.CheckbookConfigSerializer._toJsonObject(u.config);break;case"clerk":D=W.SvixConfigSerializer._toJsonObject(u.config);break;case"docusign":D=G9.DocusignConfigSerializer._toJsonObject(u.config);break;case"easypost":D=N9.EasypostConfigSerializer._toJsonObject(u.config);break;case"github":D=J9.GithubConfigSerializer._toJsonObject(u.config);break;case"guesty":D=W.SvixConfigSerializer._toJsonObject(u.config);break;case"hubspot":D=Z9.HubspotConfigSerializer._toJsonObject(u.config);break;case"incident-io":D=W.SvixConfigSerializer._toJsonObject(u.config);break;case"lithic":D=W.SvixConfigSerializer._toJsonObject(u.config);break;case"meta":D=z9.MetaConfigSerializer._toJsonObject(u.config);break;case"nash":D=W.SvixConfigSerializer._toJsonObject(u.config);break;case"orum-io":D=$9.OrumIoConfigSerializer._toJsonObject(u.config);break;case"panda-doc":D=X9.PandaDocConfigSerializer._toJsonObject(u.config);break;case"port-io":D=Y9.PortIoConfigSerializer._toJsonObject(u.config);break;case"pleo":D=W.SvixConfigSerializer._toJsonObject(u.config);break;case"psi-fi":D=W.SvixConfigSerializer._toJsonObject(u.config);break;case"replicate":D=W.SvixConfigSerializer._toJsonObject(u.config);break;case"resend":D=W.SvixConfigSerializer._toJsonObject(u.config);break;case"rutter":D=Q9.RutterConfigSerializer._toJsonObject(u.config);break;case"safebase":D=W.SvixConfigSerializer._toJsonObject(u.config);break;case"sardine":D=W.SvixConfigSerializer._toJsonObject(u.config);break;case"segment":D=V9.SegmentConfigSerializer._toJsonObject(u.config);break;case"shopify":D=W9.ShopifyConfigSerializer._toJsonObject(u.config);break;case"slack":D=K9.SlackConfigSerializer._toJsonObject(u.config);break;case"stripe":D=H9.StripeConfigSerializer._toJsonObject(u.config);break;case"stych":D=W.SvixConfigSerializer._toJsonObject(u.config);break;case"svix":D=W.SvixConfigSerializer._toJsonObject(u.config);break;case"zoom":D=R9.ZoomConfigSerializer._toJsonObject(u.config);break;case"telnyx":D=C9.TelnyxConfigSerializer._toJsonObject(u.config);break;case"vapi":D=U9.VapiConfigSerializer._toJsonObject(u.config);break;case"open-ai":D=W.SvixConfigSerializer._toJsonObject(u.config);break;case"render":D=W.SvixConfigSerializer._toJsonObject(u.config);break;case"veriff":D=P9.VeriffConfigSerializer._toJsonObject(u.config);break;case"airwallex":D=F9.AirwallexConfigSerializer._toJsonObject(u.config);break}return{type:u.type,config:D,metadata:u.metadata,name:u.name,uid:u.uid}}}});var h9=E((S9)=>{Object.defineProperty(S9,"__esModule",{value:!0});S9.AdobeSignConfigOutSerializer=void 0;S9.AdobeSignConfigOutSerializer={_fromJsonObject(u){return{}},_toJsonObject(u){return{}}}});var k9=E((O9)=>{Object.defineProperty(O9,"__esModule",{value:!0});O9.AirwallexConfigOutSerializer=void 0;O9.AirwallexConfigOutSerializer={_fromJsonObject(u){return{}},_toJsonObject(u){return{}}}});var y9=E((I9)=>{Object.defineProperty(I9,"__esModule",{value:!0});I9.CheckbookConfigOutSerializer=void 0;I9.CheckbookConfigOutSerializer={_fromJsonObject(u){return{}},_toJsonObject(u){return{}}}});var g9=E((_9)=>{Object.defineProperty(_9,"__esModule",{value:!0});_9.DocusignConfigOutSerializer=void 0;_9.DocusignConfigOutSerializer={_fromJsonObject(u){return{}},_toJsonObject(u){return{}}}});var f9=E((b9)=>{Object.defineProperty(b9,"__esModule",{value:!0});b9.EasypostConfigOutSerializer=void 0;b9.EasypostConfigOutSerializer={_fromJsonObject(u){return{}},_toJsonObject(u){return{}}}});var r9=E((l9)=>{Object.defineProperty(l9,"__esModule",{value:!0});l9.GithubConfigOutSerializer=void 0;l9.GithubConfigOutSerializer={_fromJsonObject(u){return{}},_toJsonObject(u){return{}}}});var a9=E((c9)=>{Object.defineProperty(c9,"__esModule",{value:!0});c9.HubspotConfigOutSerializer=void 0;c9.HubspotConfigOutSerializer={_fromJsonObject(u){return{}},_toJsonObject(u){return{}}}});var s9=E((p9)=>{Object.defineProperty(p9,"__esModule",{value:!0});p9.MetaConfigOutSerializer=void 0;p9.MetaConfigOutSerializer={_fromJsonObject(u){return{}},_toJsonObject(u){return{}}}});var e9=E((o9)=>{Object.defineProperty(o9,"__esModule",{value:!0});o9.OrumIoConfigOutSerializer=void 0;o9.OrumIoConfigOutSerializer={_fromJsonObject(u){return{publicKey:u.publicKey}},_toJsonObject(u){return{publicKey:u.publicKey}}}});var A8=E((u8)=>{Object.defineProperty(u8,"__esModule",{value:!0});u8.PandaDocConfigOutSerializer=void 0;u8.PandaDocConfigOutSerializer={_fromJsonObject(u){return{}},_toJsonObject(u){return{}}}});var w8=E((B8)=>{Object.defineProperty(B8,"__esModule",{value:!0});B8.PortIoConfigOutSerializer=void 0;B8.PortIoConfigOutSerializer={_fromJsonObject(u){return{}},_toJsonObject(u){return{}}}});var N8=E((E8)=>{Object.defineProperty(E8,"__esModule",{value:!0});E8.RutterConfigOutSerializer=void 0;E8.RutterConfigOutSerializer={_fromJsonObject(u){return{}},_toJsonObject(u){return{}}}});var z8=E((J8)=>{Object.defineProperty(J8,"__esModule",{value:!0});J8.SegmentConfigOutSerializer=void 0;J8.SegmentConfigOutSerializer={_fromJsonObject(u){return{}},_toJsonObject(u){return{}}}});var Y8=E(($8)=>{Object.defineProperty($8,"__esModule",{value:!0});$8.ShopifyConfigOutSerializer=void 0;$8.ShopifyConfigOutSerializer={_fromJsonObject(u){return{}},_toJsonObject(u){return{}}}});var W8=E((Q8)=>{Object.defineProperty(Q8,"__esModule",{value:!0});Q8.SlackConfigOutSerializer=void 0;Q8.SlackConfigOutSerializer={_fromJsonObject(u){return{}},_toJsonObject(u){return{}}}});var C8=E((K8)=>{Object.defineProperty(K8,"__esModule",{value:!0});K8.StripeConfigOutSerializer=void 0;K8.StripeConfigOutSerializer={_fromJsonObject(u){return{}},_toJsonObject(u){return{}}}});var R8=E((U8)=>{Object.defineProperty(U8,"__esModule",{value:!0});U8.SvixConfigOutSerializer=void 0;U8.SvixConfigOutSerializer={_fromJsonObject(u){return{}},_toJsonObject(u){return{}}}});var M8=E((L8)=>{Object.defineProperty(L8,"__esModule",{value:!0});L8.TelnyxConfigOutSerializer=void 0;L8.TelnyxConfigOutSerializer={_fromJsonObject(u){return{publicKey:u.publicKey}},_toJsonObject(u){return{publicKey:u.publicKey}}}});var h8=E((S8)=>{Object.defineProperty(S8,"__esModule",{value:!0});S8.VapiConfigOutSerializer=void 0;S8.VapiConfigOutSerializer={_fromJsonObject(u){return{}},_toJsonObject(u){return{}}}});var k8=E((O8)=>{Object.defineProperty(O8,"__esModule",{value:!0});O8.VeriffConfigOutSerializer=void 0;O8.VeriffConfigOutSerializer={_fromJsonObject(u){return{}},_toJsonObject(u){return{}}}});var y8=E((I8)=>{Object.defineProperty(I8,"__esModule",{value:!0});I8.ZoomConfigOutSerializer=void 0;I8.ZoomConfigOutSerializer={_fromJsonObject(u){return{}},_toJsonObject(u){return{}}}});var Y0=E((B4)=>{Object.defineProperty(B4,"__esModule",{value:!0});B4.IngestSourceOutSerializer=void 0;var _8=h9(),m8=k9(),g8=y9(),b8=X0(),j8=g9(),f8=f9(),l8=r9(),d8=a9(),r8=s9(),c8=e9(),i8=A8(),a8=w8(),p8=N8(),n8=z8(),s8=Y8(),o8=W8(),t8=C8(),K=R8(),e8=M8(),u4=h8(),D4=k8(),A4=y8();B4.IngestSourceOutSerializer={_fromJsonObject(u){let D=u.type;function A(B){switch(B){case"generic-webhook":return{};case"cron":return b8.CronConfigSerializer._fromJsonObject(u.config);case"adobe-sign":return _8.AdobeSignConfigOutSerializer._fromJsonObject(u.config);case"beehiiv":return K.SvixConfigOutSerializer._fromJsonObject(u.config);case"brex":return K.SvixConfigOutSerializer._fromJsonObject(u.config);case"checkbook":return g8.CheckbookConfigOutSerializer._fromJsonObject(u.config);case"clerk":return K.SvixConfigOutSerializer._fromJsonObject(u.config);case"docusign":return j8.DocusignConfigOutSerializer._fromJsonObject(u.config);case"easypost":return f8.EasypostConfigOutSerializer._fromJsonObject(u.config);case"github":return l8.GithubConfigOutSerializer._fromJsonObject(u.config);case"guesty":return K.SvixConfigOutSerializer._fromJsonObject(u.config);case"hubspot":return d8.HubspotConfigOutSerializer._fromJsonObject(u.config);case"incident-io":return K.SvixConfigOutSerializer._fromJsonObject(u.config);case"lithic":return K.SvixConfigOutSerializer._fromJsonObject(u.config);case"meta":return r8.MetaConfigOutSerializer._fromJsonObject(u.config);case"nash":return K.SvixConfigOutSerializer._fromJsonObject(u.config);case"orum-io":return c8.OrumIoConfigOutSerializer._fromJsonObject(u.config);case"panda-doc":return i8.PandaDocConfigOutSerializer._fromJsonObject(u.config);case"port-io":return a8.PortIoConfigOutSerializer._fromJsonObject(u.config);case"psi-fi":return K.SvixConfigOutSerializer._fromJsonObject(u.config);case"pleo":return K.SvixConfigOutSerializer._fromJsonObject(u.config);case"replicate":return K.SvixConfigOutSerializer._fromJsonObject(u.config);case"resend":return K.SvixConfigOutSerializer._fromJsonObject(u.config);case"rutter":return p8.RutterConfigOutSerializer._fromJsonObject(u.config);case"safebase":return K.SvixConfigOutSerializer._fromJsonObject(u.config);case"sardine":return K.SvixConfigOutSerializer._fromJsonObject(u.config);case"segment":return n8.SegmentConfigOutSerializer._fromJsonObject(u.config);case"shopify":return s8.ShopifyConfigOutSerializer._fromJsonObject(u.config);case"slack":return o8.SlackConfigOutSerializer._fromJsonObject(u.config);case"stripe":return t8.StripeConfigOutSerializer._fromJsonObject(u.config);case"stych":return K.SvixConfigOutSerializer._fromJsonObject(u.config);case"svix":return K.SvixConfigOutSerializer._fromJsonObject(u.config);case"zoom":return A4.ZoomConfigOutSerializer._fromJsonObject(u.config);case"telnyx":return e8.TelnyxConfigOutSerializer._fromJsonObject(u.config);case"vapi":return u4.VapiConfigOutSerializer._fromJsonObject(u.config);case"open-ai":return K.SvixConfigOutSerializer._fromJsonObject(u.config);case"render":return K.SvixConfigOutSerializer._fromJsonObject(u.config);case"veriff":return D4.VeriffConfigOutSerializer._fromJsonObject(u.config);case"airwallex":return m8.AirwallexConfigOutSerializer._fromJsonObject(u.config);default:throw Error(`Unexpected type: ${B}`)}}return{type:D,config:A(D),createdAt:new Date(u.createdAt),id:u.id,ingestUrl:u.ingestUrl,metadata:u.metadata,name:u.name,uid:u.uid,updatedAt:new Date(u.updatedAt)}},_toJsonObject(u){let D;switch(u.type){case"generic-webhook":D={};break;case"cron":D=b8.CronConfigSerializer._toJsonObject(u.config);break;case"adobe-sign":D=_8.AdobeSignConfigOutSerializer._toJsonObject(u.config);break;case"beehiiv":D=K.SvixConfigOutSerializer._toJsonObject(u.config);break;case"brex":D=K.SvixConfigOutSerializer._toJsonObject(u.config);break;case"checkbook":D=g8.CheckbookConfigOutSerializer._toJsonObject(u.config);break;case"clerk":D=K.SvixConfigOutSerializer._toJsonObject(u.config);break;case"docusign":D=j8.DocusignConfigOutSerializer._toJsonObject(u.config);break;case"easypost":D=f8.EasypostConfigOutSerializer._toJsonObject(u.config);break;case"github":D=l8.GithubConfigOutSerializer._toJsonObject(u.config);break;case"guesty":D=K.SvixConfigOutSerializer._toJsonObject(u.config);break;case"hubspot":D=d8.HubspotConfigOutSerializer._toJsonObject(u.config);break;case"incident-io":D=K.SvixConfigOutSerializer._toJsonObject(u.config);break;case"lithic":D=K.SvixConfigOutSerializer._toJsonObject(u.config);break;case"meta":D=r8.MetaConfigOutSerializer._toJsonObject(u.config);break;case"nash":D=K.SvixConfigOutSerializer._toJsonObject(u.config);break;case"orum-io":D=c8.OrumIoConfigOutSerializer._toJsonObject(u.config);break;case"panda-doc":D=i8.PandaDocConfigOutSerializer._toJsonObject(u.config);break;case"port-io":D=a8.PortIoConfigOutSerializer._toJsonObject(u.config);break;case"psi-fi":D=K.SvixConfigOutSerializer._toJsonObject(u.config);break;case"pleo":D=K.SvixConfigOutSerializer._toJsonObject(u.config);break;case"replicate":D=K.SvixConfigOutSerializer._toJsonObject(u.config);break;case"resend":D=K.SvixConfigOutSerializer._toJsonObject(u.config);break;case"rutter":D=p8.RutterConfigOutSerializer._toJsonObject(u.config);break;case"safebase":D=K.SvixConfigOutSerializer._toJsonObject(u.config);break;case"sardine":D=K.SvixConfigOutSerializer._toJsonObject(u.config);break;case"segment":D=n8.SegmentConfigOutSerializer._toJsonObject(u.config);break;case"shopify":D=s8.ShopifyConfigOutSerializer._toJsonObject(u.config);break;case"slack":D=o8.SlackConfigOutSerializer._toJsonObject(u.config);break;case"stripe":D=t8.StripeConfigOutSerializer._toJsonObject(u.config);break;case"stych":D=K.SvixConfigOutSerializer._toJsonObject(u.config);break;case"svix":D=K.SvixConfigOutSerializer._toJsonObject(u.config);break;case"zoom":D=A4.ZoomConfigOutSerializer._toJsonObject(u.config);break;case"telnyx":D=e8.TelnyxConfigOutSerializer._toJsonObject(u.config);break;case"vapi":D=u4.VapiConfigOutSerializer._toJsonObject(u.config);break;case"open-ai":D=K.SvixConfigOutSerializer._toJsonObject(u.config);break;case"render":D=K.SvixConfigOutSerializer._toJsonObject(u.config);break;case"veriff":D=D4.VeriffConfigOutSerializer._toJsonObject(u.config);break;case"airwallex":D=m8.AirwallexConfigOutSerializer._toJsonObject(u.config);break}return{type:u.type,config:D,createdAt:u.createdAt,id:u.id,ingestUrl:u.ingestUrl,metadata:u.metadata,name:u.name,uid:u.uid,updatedAt:u.updatedAt}}}});var N4=E((E4)=>{Object.defineProperty(E4,"__esModule",{value:!0});E4.ListResponseIngestSourceOutSerializer=void 0;var w4=Y0();E4.ListResponseIngestSourceOutSerializer={_fromJsonObject(u){return{data:u.data.map((D)=>w4.IngestSourceOutSerializer._fromJsonObject(D)),done:u.done,iterator:u.iterator,prevIterator:u.prevIterator}},_toJsonObject(u){return{data:u.data.map((D)=>w4.IngestSourceOutSerializer._toJsonObject(D)),done:u.done,iterator:u.iterator,prevIterator:u.prevIterator}}}});var z4=E((J4)=>{Object.defineProperty(J4,"__esModule",{value:!0});J4.RotateTokenOutSerializer=void 0;J4.RotateTokenOutSerializer={_fromJsonObject(u){return{ingestUrl:u.ingestUrl}},_toJsonObject(u){return{ingestUrl:u.ingestUrl}}}});var V4=E((Y4)=>{Object.defineProperty(Y4,"__esModule",{value:!0});Y4.IngestSource=void 0;var $4=M9(),Q0=Y0(),pG=N4(),nG=z4(),c=R();class X4{constructor(u){this.requestCtx=u}list(u){let D=new c.SvixRequest(c.HttpMethod.GET,"/ingest/api/v1/source");return D.setQueryParams({limit:u===null||u===void 0?void 0:u.limit,iterator:u===null||u===void 0?void 0:u.iterator,order:u===null||u===void 0?void 0:u.order}),D.send(this.requestCtx,pG.ListResponseIngestSourceOutSerializer._fromJsonObject)}create(u,D){let A=new c.SvixRequest(c.HttpMethod.POST,"/ingest/api/v1/source");return A.setHeaderParam("idempotency-key",D===null||D===void 0?void 0:D.idempotencyKey),A.setBody($4.IngestSourceInSerializer._toJsonObject(u)),A.send(this.requestCtx,Q0.IngestSourceOutSerializer._fromJsonObject)}get(u){let D=new c.SvixRequest(c.HttpMethod.GET,"/ingest/api/v1/source/{source_id}");return D.setPathParam("source_id",u),D.send(this.requestCtx,Q0.IngestSourceOutSerializer._fromJsonObject)}update(u,D){let A=new c.SvixRequest(c.HttpMethod.PUT,"/ingest/api/v1/source/{source_id}");return A.setPathParam("source_id",u),A.setBody($4.IngestSourceInSerializer._toJsonObject(D)),A.send(this.requestCtx,Q0.IngestSourceOutSerializer._fromJsonObject)}delete(u){let D=new c.SvixRequest(c.HttpMethod.DELETE,"/ingest/api/v1/source/{source_id}");return D.setPathParam("source_id",u),D.sendNoResponseBody(this.requestCtx)}rotateToken(u,D){let A=new c.SvixRequest(c.HttpMethod.POST,"/ingest/api/v1/source/{source_id}/token/rotate");return A.setPathParam("source_id",u),A.setHeaderParam("idempotency-key",D===null||D===void 0?void 0:D.idempotencyKey),A.send(this.requestCtx,nG.RotateTokenOutSerializer._fromJsonObject)}}Y4.IngestSource=X4});var U4=E((H4)=>{Object.defineProperty(H4,"__esModule",{value:!0});H4.Ingest=void 0;var sG=B0(),oG=z5(),tG=c5(),eG=V4(),W4=R();class K4{constructor(u){this.requestCtx=u}get endpoint(){return new tG.IngestEndpoint(this.requestCtx)}get source(){return new eG.IngestSource(this.requestCtx)}dashboard(u,D,A){let B=new W4.SvixRequest(W4.HttpMethod.POST,"/ingest/api/v1/source/{source_id}/dashboard");return B.setPathParam("source_id",u),B.setHeaderParam("idempotency-key",A===null||A===void 0?void 0:A.idempotencyKey),B.setBody(oG.IngestSourceConsumerPortalAccessInSerializer._toJsonObject(D)),B.send(this.requestCtx,sG.DashboardAccessOutSerializer._fromJsonObject)}}H4.Ingest=K4});var L4=E((P4)=>{Object.defineProperty(P4,"__esModule",{value:!0});P4.IntegrationInSerializer=void 0;P4.IntegrationInSerializer={_fromJsonObject(u){return{featureFlags:u.featureFlags,name:u.name}},_toJsonObject(u){return{featureFlags:u.featureFlags,name:u.name}}}});var S4=E((v4)=>{Object.defineProperty(v4,"__esModule",{value:!0});v4.IntegrationKeyOutSerializer=void 0;v4.IntegrationKeyOutSerializer={_fromJsonObject(u){return{key:u.key}},_toJsonObject(u){return{key:u.key}}}});var V0=E((T4)=>{Object.defineProperty(T4,"__esModule",{value:!0});T4.IntegrationOutSerializer=void 0;T4.IntegrationOutSerializer={_fromJsonObject(u){return{createdAt:new Date(u.createdAt),featureFlags:u.featureFlags,id:u.id,name:u.name,updatedAt:new Date(u.updatedAt)}},_toJsonObject(u){return{createdAt:u.createdAt,featureFlags:u.featureFlags,id:u.id,name:u.name,updatedAt:u.updatedAt}}}});var k4=E((O4)=>{Object.defineProperty(O4,"__esModule",{value:!0});O4.IntegrationUpdateSerializer=void 0;O4.IntegrationUpdateSerializer={_fromJsonObject(u){return{featureFlags:u.featureFlags,name:u.name}},_toJsonObject(u){return{featureFlags:u.featureFlags,name:u.name}}}});var _4=E((x4)=>{Object.defineProperty(x4,"__esModule",{value:!0});x4.ListResponseIntegrationOutSerializer=void 0;var I4=V0();x4.ListResponseIntegrationOutSerializer={_fromJsonObject(u){return{data:u.data.map((D)=>I4.IntegrationOutSerializer._fromJsonObject(D)),done:u.done,iterator:u.iterator,prevIterator:u.prevIterator}},_toJsonObject(u){return{data:u.data.map((D)=>I4.IntegrationOutSerializer._toJsonObject(D)),done:u.done,iterator:u.iterator,prevIterator:u.prevIterator}}}});var f4=E((b4)=>{Object.defineProperty(b4,"__esModule",{value:!0});b4.Integration=void 0;var uN=L4(),m4=S4(),W0=V0(),DN=k4(),AN=_4(),j=R();class g4{constructor(u){this.requestCtx=u}list(u,D){let A=new j.SvixRequest(j.HttpMethod.GET,"/api/v1/app/{app_id}/integration");return A.setPathParam("app_id",u),A.setQueryParams({limit:D===null||D===void 0?void 0:D.limit,iterator:D===null||D===void 0?void 0:D.iterator,order:D===null||D===void 0?void 0:D.order}),A.send(this.requestCtx,AN.ListResponseIntegrationOutSerializer._fromJsonObject)}create(u,D,A){let B=new j.SvixRequest(j.HttpMethod.POST,"/api/v1/app/{app_id}/integration");return B.setPathParam("app_id",u),B.setHeaderParam("idempotency-key",A===null||A===void 0?void 0:A.idempotencyKey),B.setBody(uN.IntegrationInSerializer._toJsonObject(D)),B.send(this.requestCtx,W0.IntegrationOutSerializer._fromJsonObject)}get(u,D){let A=new j.SvixRequest(j.HttpMethod.GET,"/api/v1/app/{app_id}/integration/{integ_id}");return A.setPathParam("app_id",u),A.setPathParam("integ_id",D),A.send(this.requestCtx,W0.IntegrationOutSerializer._fromJsonObject)}update(u,D,A){let B=new j.SvixRequest(j.HttpMethod.PUT,"/api/v1/app/{app_id}/integration/{integ_id}");return B.setPathParam("app_id",u),B.setPathParam("integ_id",D),B.setBody(DN.IntegrationUpdateSerializer._toJsonObject(A)),B.send(this.requestCtx,W0.IntegrationOutSerializer._fromJsonObject)}delete(u,D){let A=new j.SvixRequest(j.HttpMethod.DELETE,"/api/v1/app/{app_id}/integration/{integ_id}");return A.setPathParam("app_id",u),A.setPathParam("integ_id",D),A.sendNoResponseBody(this.requestCtx)}getKey(u,D){let A=new j.SvixRequest(j.HttpMethod.GET,"/api/v1/app/{app_id}/integration/{integ_id}/key");return A.setPathParam("app_id",u),A.setPathParam("integ_id",D),A.send(this.requestCtx,m4.IntegrationKeyOutSerializer._fromJsonObject)}rotateKey(u,D,A){let B=new j.SvixRequest(j.HttpMethod.POST,"/api/v1/app/{app_id}/integration/{integ_id}/key/rotate");return B.setPathParam("app_id",u),B.setPathParam("integ_id",D),B.setHeaderParam("idempotency-key",A===null||A===void 0?void 0:A.idempotencyKey),B.send(this.requestCtx,m4.IntegrationKeyOutSerializer._fromJsonObject)}}b4.Integration=g4});var i4=E((r4)=>{Object.defineProperty(r4,"__esModule",{value:!0});r4.ExpungeAllContentsOutSerializer=void 0;var l4=t(),d4=e();r4.ExpungeAllContentsOutSerializer={_fromJsonObject(u){return{id:u.id,status:l4.BackgroundTaskStatusSerializer._fromJsonObject(u.status),task:d4.BackgroundTaskTypeSerializer._fromJsonObject(u.task),updatedAt:new Date(u.updatedAt)}},_toJsonObject(u){return{id:u.id,status:l4.BackgroundTaskStatusSerializer._toJsonObject(u.status),task:d4.BackgroundTaskTypeSerializer._toJsonObject(u.task),updatedAt:u.updatedAt}}}});var s4=E((p4)=>{Object.defineProperty(p4,"__esModule",{value:!0});p4.ListResponseMessageOutSerializer=void 0;var a4=K2();p4.ListResponseMessageOutSerializer={_fromJsonObject(u){return{data:u.data.map((D)=>a4.MessageOutSerializer._fromJsonObject(D)),done:u.done,iterator:u.iterator,prevIterator:u.prevIterator}},_toJsonObject(u){return{data:u.data.map((D)=>a4.MessageOutSerializer._toJsonObject(D)),done:u.done,iterator:u.iterator,prevIterator:u.prevIterator}}}});var e4=E((o4)=>{Object.defineProperty(o4,"__esModule",{value:!0});o4.MessagePrecheckInSerializer=void 0;o4.MessagePrecheckInSerializer={_fromJsonObject(u){return{channels:u.channels,eventType:u.eventType}},_toJsonObject(u){return{channels:u.channels,eventType:u.eventType}}}});var A6=E((u6)=>{Object.defineProperty(u6,"__esModule",{value:!0});u6.MessagePrecheckOutSerializer=void 0;u6.MessagePrecheckOutSerializer={_fromJsonObject(u){return{active:u.active}},_toJsonObject(u){return{active:u.active}}}});var w6=E((B6)=>{Object.defineProperty(B6,"__esModule",{value:!0});B6.PollingEndpointConsumerSeekInSerializer=void 0;B6.PollingEndpointConsumerSeekInSerializer={_fromJsonObject(u){return{after:new Date(u.after)}},_toJsonObject(u){return{after:u.after}}}});var N6=E((E6)=>{Object.defineProperty(E6,"__esModule",{value:!0});E6.PollingEndpointConsumerSeekOutSerializer=void 0;E6.PollingEndpointConsumerSeekOutSerializer={_fromJsonObject(u){return{iterator:u.iterator}},_toJsonObject(u){return{iterator:u.iterator}}}});var z6=E((J6)=>{Object.defineProperty(J6,"__esModule",{value:!0});J6.PollingEndpointMessageOutSerializer=void 0;J6.PollingEndpointMessageOutSerializer={_fromJsonObject(u){return{channels:u.channels,deliverAt:u.deliverAt?new Date(u.deliverAt):null,eventId:u.eventId,eventType:u.eventType,headers:u.headers,id:u.id,payload:u.payload,tags:u.tags,timestamp:new Date(u.timestamp)}},_toJsonObject(u){return{channels:u.channels,deliverAt:u.deliverAt,eventId:u.eventId,eventType:u.eventType,headers:u.headers,id:u.id,payload:u.payload,tags:u.tags,timestamp:u.timestamp}}}});var Q6=E((X6)=>{Object.defineProperty(X6,"__esModule",{value:!0});X6.PollingEndpointOutSerializer=void 0;var $6=z6();X6.PollingEndpointOutSerializer={_fromJsonObject(u){return{data:u.data.map((D)=>$6.PollingEndpointMessageOutSerializer._fromJsonObject(D)),done:u.done,iterator:u.iterator}},_toJsonObject(u){return{data:u.data.map((D)=>$6.PollingEndpointMessageOutSerializer._toJsonObject(D)),done:u.done,iterator:u.iterator}}}});var C6=E((K6)=>{Object.defineProperty(K6,"__esModule",{value:!0});K6.MessagePoller=void 0;var BN=w6(),FN=N6(),V6=Q6(),G2=R();class W6{constructor(u){this.requestCtx=u}poll(u,D,A){let B=new G2.SvixRequest(G2.HttpMethod.GET,"/api/v1/app/{app_id}/poller/{sink_id}");return B.setPathParam("app_id",u),B.setPathParam("sink_id",D),B.setQueryParams({limit:A===null||A===void 0?void 0:A.limit,iterator:A===null||A===void 0?void 0:A.iterator,event_type:A===null||A===void 0?void 0:A.eventType,channel:A===null||A===void 0?void 0:A.channel,after:A===null||A===void 0?void 0:A.after}),B.send(this.requestCtx,V6.PollingEndpointOutSerializer._fromJsonObject)}consumerPoll(u,D,A,B){let F=new G2.SvixRequest(G2.HttpMethod.GET,"/api/v1/app/{app_id}/poller/{sink_id}/consumer/{consumer_id}");return F.setPathParam("app_id",u),F.setPathParam("sink_id",D),F.setPathParam("consumer_id",A),F.setQueryParams({limit:B===null||B===void 0?void 0:B.limit,iterator:B===null||B===void 0?void 0:B.iterator}),F.send(this.requestCtx,V6.PollingEndpointOutSerializer._fromJsonObject)}consumerSeek(u,D,A,B,F){let G=new G2.SvixRequest(G2.HttpMethod.POST,"/api/v1/app/{app_id}/poller/{sink_id}/consumer/{consumer_id}/seek");return G.setPathParam("app_id",u),G.setPathParam("sink_id",D),G.setPathParam("consumer_id",A),G.setHeaderParam("idempotency-key",F===null||F===void 0?void 0:F.idempotencyKey),G.setBody(BN.PollingEndpointConsumerSeekInSerializer._toJsonObject(B)),G.send(this.requestCtx,FN.PollingEndpointConsumerSeekOutSerializer._fromJsonObject)}}K6.MessagePoller=W6});var L6=E((P6)=>{Object.defineProperty(P6,"__esModule",{value:!0});P6.MessageInSerializer=void 0;var U6=T2();P6.MessageInSerializer={_fromJsonObject(u){return{application:u.application!=null?U6.ApplicationInSerializer._fromJsonObject(u.application):void 0,channels:u.channels,deliverAt:u.deliverAt?new Date(u.deliverAt):null,eventId:u.eventId,eventType:u.eventType,payload:u.payload,payloadRetentionHours:u.payloadRetentionHours,payloadRetentionPeriod:u.payloadRetentionPeriod,tags:u.tags,transformationsParams:u.transformationsParams}},_toJsonObject(u){return{application:u.application!=null?U6.ApplicationInSerializer._toJsonObject(u.application):void 0,channels:u.channels,deliverAt:u.deliverAt,eventId:u.eventId,eventType:u.eventType,payload:u.payload,payloadRetentionHours:u.payloadRetentionHours,payloadRetentionPeriod:u.payloadRetentionPeriod,tags:u.tags,transformationsParams:u.transformationsParams}}}});var K0=E((S6)=>{Object.defineProperty(S6,"__esModule",{value:!0});S6.messageInRaw=S6.Message=void 0;var wN=i4(),EN=s4(),v6=K2(),GN=e4(),NN=A6(),JN=C6(),i=R(),ZN=L6();class M6{constructor(u){this.requestCtx=u}get poller(){return new JN.MessagePoller(this.requestCtx)}list(u,D){let A=new i.SvixRequest(i.HttpMethod.GET,"/api/v1/app/{app_id}/msg");return A.setPathParam("app_id",u),A.setQueryParams({limit:D===null||D===void 0?void 0:D.limit,iterator:D===null||D===void 0?void 0:D.iterator,channel:D===null||D===void 0?void 0:D.channel,before:D===null||D===void 0?void 0:D.before,after:D===null||D===void 0?void 0:D.after,with_content:D===null||D===void 0?void 0:D.withContent,tag:D===null||D===void 0?void 0:D.tag,event_types:D===null||D===void 0?void 0:D.eventTypes}),A.send(this.requestCtx,EN.ListResponseMessageOutSerializer._fromJsonObject)}create(u,D,A){let B=new i.SvixRequest(i.HttpMethod.POST,"/api/v1/app/{app_id}/msg");return B.setPathParam("app_id",u),B.setQueryParams({with_content:A===null||A===void 0?void 0:A.withContent}),B.setHeaderParam("idempotency-key",A===null||A===void 0?void 0:A.idempotencyKey),B.setBody(ZN.MessageInSerializer._toJsonObject(D)),B.send(this.requestCtx,v6.MessageOutSerializer._fromJsonObject)}expungeAllContents(u,D){let A=new i.SvixRequest(i.HttpMethod.POST,"/api/v1/app/{app_id}/msg/expunge-all-contents");return A.setPathParam("app_id",u),A.setHeaderParam("idempotency-key",D===null||D===void 0?void 0:D.idempotencyKey),A.send(this.requestCtx,wN.ExpungeAllContentsOutSerializer._fromJsonObject)}precheck(u,D,A){let B=new i.SvixRequest(i.HttpMethod.POST,"/api/v1/app/{app_id}/msg/precheck/active");return B.setPathParam("app_id",u),B.setHeaderParam("idempotency-key",A===null||A===void 0?void 0:A.idempotencyKey),B.setBody(GN.MessagePrecheckInSerializer._toJsonObject(D)),B.send(this.requestCtx,NN.MessagePrecheckOutSerializer._fromJsonObject)}get(u,D,A){let B=new i.SvixRequest(i.HttpMethod.GET,"/api/v1/app/{app_id}/msg/{msg_id}");return B.setPathParam("app_id",u),B.setPathParam("msg_id",D),B.setQueryParams({with_content:A===null||A===void 0?void 0:A.withContent}),B.send(this.requestCtx,v6.MessageOutSerializer._fromJsonObject)}expungeContent(u,D){let A=new i.SvixRequest(i.HttpMethod.DELETE,"/api/v1/app/{app_id}/msg/{msg_id}/content");return A.setPathParam("app_id",u),A.setPathParam("msg_id",D),A.sendNoResponseBody(this.requestCtx)}}S6.Message=M6;function zN(u,D,A){return{eventType:u,payload:{},transformationsParams:{rawPayload:D,headers:A?{"content-type":A}:void 0}}}S6.messageInRaw=zN});var H0=E((h6)=>{Object.defineProperty(h6,"__esModule",{value:!0});h6.EmptyResponseSerializer=void 0;h6.EmptyResponseSerializer={_fromJsonObject(u){return{}},_toJsonObject(u){return{}}}});var H2=E((k6)=>{Object.defineProperty(k6,"__esModule",{value:!0});k6.MessageStatusTextSerializer=k6.MessageStatusText=void 0;var XN;(function(u){u.Success="success",u.Pending="pending",u.Fail="fail",u.Sending="sending"})(XN=k6.MessageStatusText||(k6.MessageStatusText={}));k6.MessageStatusTextSerializer={_fromJsonObject(u){return u},_toJsonObject(u){return u}}});var g6=E((_6)=>{Object.defineProperty(_6,"__esModule",{value:!0});_6.EndpointMessageOutSerializer=void 0;var x6=E2(),y6=H2();_6.EndpointMessageOutSerializer={_fromJsonObject(u){return{channels:u.channels,deliverAt:u.deliverAt?new Date(u.deliverAt):null,eventId:u.eventId,eventType:u.eventType,id:u.id,nextAttempt:u.nextAttempt?new Date(u.nextAttempt):null,payload:u.payload,status:x6.MessageStatusSerializer._fromJsonObject(u.status),statusText:y6.MessageStatusTextSerializer._fromJsonObject(u.statusText),tags:u.tags,timestamp:new Date(u.timestamp)}},_toJsonObject(u){return{channels:u.channels,deliverAt:u.deliverAt,eventId:u.eventId,eventType:u.eventType,id:u.id,nextAttempt:u.nextAttempt,payload:u.payload,status:x6.MessageStatusSerializer._toJsonObject(u.status),statusText:y6.MessageStatusTextSerializer._toJsonObject(u.statusText),tags:u.tags,timestamp:u.timestamp}}}});var l6=E((j6)=>{Object.defineProperty(j6,"__esModule",{value:!0});j6.ListResponseEndpointMessageOutSerializer=void 0;var b6=g6();j6.ListResponseEndpointMessageOutSerializer={_fromJsonObject(u){return{data:u.data.map((D)=>b6.EndpointMessageOutSerializer._fromJsonObject(D)),done:u.done,iterator:u.iterator,prevIterator:u.prevIterator}},_toJsonObject(u){return{data:u.data.map((D)=>b6.EndpointMessageOutSerializer._toJsonObject(D)),done:u.done,iterator:u.iterator,prevIterator:u.prevIterator}}}});var C0=E((r6)=>{Object.defineProperty(r6,"__esModule",{value:!0});r6.MessageAttemptTriggerTypeSerializer=r6.MessageAttemptTriggerType=void 0;var YN;(function(u){u[u.Scheduled=0]="Scheduled",u[u.Manual=1]="Manual"})(YN=r6.MessageAttemptTriggerType||(r6.MessageAttemptTriggerType={}));r6.MessageAttemptTriggerTypeSerializer={_fromJsonObject(u){return u},_toJsonObject(u){return u}}});var U0=E((s6)=>{Object.defineProperty(s6,"__esModule",{value:!0});s6.MessageAttemptOutSerializer=void 0;var i6=C0(),a6=K2(),p6=E2(),n6=H2();s6.MessageAttemptOutSerializer={_fromJsonObject(u){return{endpointId:u.endpointId,id:u.id,msg:u.msg!=null?a6.MessageOutSerializer._fromJsonObject(u.msg):void 0,msgId:u.msgId,response:u.response,responseDurationMs:u.responseDurationMs,responseStatusCode:u.responseStatusCode,status:p6.MessageStatusSerializer._fromJsonObject(u.status),statusText:n6.MessageStatusTextSerializer._fromJsonObject(u.statusText),timestamp:new Date(u.timestamp),triggerType:i6.MessageAttemptTriggerTypeSerializer._fromJsonObject(u.triggerType),url:u.url}},_toJsonObject(u){return{endpointId:u.endpointId,id:u.id,msg:u.msg!=null?a6.MessageOutSerializer._toJsonObject(u.msg):void 0,msgId:u.msgId,response:u.response,responseDurationMs:u.responseDurationMs,responseStatusCode:u.responseStatusCode,status:p6.MessageStatusSerializer._toJsonObject(u.status),statusText:n6.MessageStatusTextSerializer._toJsonObject(u.statusText),timestamp:u.timestamp,triggerType:i6.MessageAttemptTriggerTypeSerializer._toJsonObject(u.triggerType),url:u.url}}}});var DB=E((e6)=>{Object.defineProperty(e6,"__esModule",{value:!0});e6.ListResponseMessageAttemptOutSerializer=void 0;var t6=U0();e6.ListResponseMessageAttemptOutSerializer={_fromJsonObject(u){return{data:u.data.map((D)=>t6.MessageAttemptOutSerializer._fromJsonObject(D)),done:u.done,iterator:u.iterator,prevIterator:u.prevIterator}},_toJsonObject(u){return{data:u.data.map((D)=>t6.MessageAttemptOutSerializer._toJsonObject(D)),done:u.done,iterator:u.iterator,prevIterator:u.prevIterator}}}});var EB=E((FB)=>{Object.defineProperty(FB,"__esModule",{value:!0});FB.MessageEndpointOutSerializer=void 0;var AB=E2(),BB=H2();FB.MessageEndpointOutSerializer={_fromJsonObject(u){return{channels:u.channels,createdAt:new Date(u.createdAt),description:u.description,disabled:u.disabled,filterTypes:u.filterTypes,id:u.id,nextAttempt:u.nextAttempt?new Date(u.nextAttempt):null,rateLimit:u.rateLimit,status:AB.MessageStatusSerializer._fromJsonObject(u.status),statusText:BB.MessageStatusTextSerializer._fromJsonObject(u.statusText),throttleRate:u.throttleRate,uid:u.uid,updatedAt:new Date(u.updatedAt),url:u.url,version:u.version}},_toJsonObject(u){return{channels:u.channels,createdAt:u.createdAt,description:u.description,disabled:u.disabled,filterTypes:u.filterTypes,id:u.id,nextAttempt:u.nextAttempt,rateLimit:u.rateLimit,status:AB.MessageStatusSerializer._toJsonObject(u.status),statusText:BB.MessageStatusTextSerializer._toJsonObject(u.statusText),throttleRate:u.throttleRate,uid:u.uid,updatedAt:u.updatedAt,url:u.url,version:u.version}}}});var ZB=E((NB)=>{Object.defineProperty(NB,"__esModule",{value:!0});NB.ListResponseMessageEndpointOutSerializer=void 0;var GB=EB();NB.ListResponseMessageEndpointOutSerializer={_fromJsonObject(u){return{data:u.data.map((D)=>GB.MessageEndpointOutSerializer._fromJsonObject(D)),done:u.done,iterator:u.iterator,prevIterator:u.prevIterator}},_toJsonObject(u){return{data:u.data.map((D)=>GB.MessageEndpointOutSerializer._toJsonObject(D)),done:u.done,iterator:u.iterator,prevIterator:u.prevIterator}}}});var QB=E((XB)=>{Object.defineProperty(XB,"__esModule",{value:!0});XB.MessageAttempt=void 0;var QN=H0(),VN=l6(),zB=DB(),WN=ZB(),KN=U0(),f=R();class $B{constructor(u){this.requestCtx=u}listByEndpoint(u,D,A){let B=new f.SvixRequest(f.HttpMethod.GET,"/api/v1/app/{app_id}/attempt/endpoint/{endpoint_id}");return B.setPathParam("app_id",u),B.setPathParam("endpoint_id",D),B.setQueryParams({limit:A===null||A===void 0?void 0:A.limit,iterator:A===null||A===void 0?void 0:A.iterator,status:A===null||A===void 0?void 0:A.status,status_code_class:A===null||A===void 0?void 0:A.statusCodeClass,channel:A===null||A===void 0?void 0:A.channel,tag:A===null||A===void 0?void 0:A.tag,before:A===null||A===void 0?void 0:A.before,after:A===null||A===void 0?void 0:A.after,with_content:A===null||A===void 0?void 0:A.withContent,with_msg:A===null||A===void 0?void 0:A.withMsg,event_types:A===null||A===void 0?void 0:A.eventTypes}),B.send(this.requestCtx,zB.ListResponseMessageAttemptOutSerializer._fromJsonObject)}listByMsg(u,D,A){let B=new f.SvixRequest(f.HttpMethod.GET,"/api/v1/app/{app_id}/attempt/msg/{msg_id}");return B.setPathParam("app_id",u),B.setPathParam("msg_id",D),B.setQueryParams({limit:A===null||A===void 0?void 0:A.limit,iterator:A===null||A===void 0?void 0:A.iterator,status:A===null||A===void 0?void 0:A.status,status_code_class:A===null||A===void 0?void 0:A.statusCodeClass,channel:A===null||A===void 0?void 0:A.channel,tag:A===null||A===void 0?void 0:A.tag,endpoint_id:A===null||A===void 0?void 0:A.endpointId,before:A===null||A===void 0?void 0:A.before,after:A===null||A===void 0?void 0:A.after,with_content:A===null||A===void 0?void 0:A.withContent,event_types:A===null||A===void 0?void 0:A.eventTypes}),B.send(this.requestCtx,zB.ListResponseMessageAttemptOutSerializer._fromJsonObject)}listAttemptedMessages(u,D,A){let B=new f.SvixRequest(f.HttpMethod.GET,"/api/v1/app/{app_id}/endpoint/{endpoint_id}/msg");return B.setPathParam("app_id",u),B.setPathParam("endpoint_id",D),B.setQueryParams({limit:A===null||A===void 0?void 0:A.limit,iterator:A===null||A===void 0?void 0:A.iterator,channel:A===null||A===void 0?void 0:A.channel,tag:A===null||A===void 0?void 0:A.tag,status:A===null||A===void 0?void 0:A.status,before:A===null||A===void 0?void 0:A.before,after:A===null||A===void 0?void 0:A.after,with_content:A===null||A===void 0?void 0:A.withContent,event_types:A===null||A===void 0?void 0:A.eventTypes}),B.send(this.requestCtx,VN.ListResponseEndpointMessageOutSerializer._fromJsonObject)}get(u,D,A){let B=new f.SvixRequest(f.HttpMethod.GET,"/api/v1/app/{app_id}/msg/{msg_id}/attempt/{attempt_id}");return B.setPathParam("app_id",u),B.setPathParam("msg_id",D),B.setPathParam("attempt_id",A),B.send(this.requestCtx,KN.MessageAttemptOutSerializer._fromJsonObject)}expungeContent(u,D,A){let B=new f.SvixRequest(f.HttpMethod.DELETE,"/api/v1/app/{app_id}/msg/{msg_id}/attempt/{attempt_id}/content");return B.setPathParam("app_id",u),B.setPathParam("msg_id",D),B.setPathParam("attempt_id",A),B.sendNoResponseBody(this.requestCtx)}listAttemptedDestinations(u,D,A){let B=new f.SvixRequest(f.HttpMethod.GET,"/api/v1/app/{app_id}/msg/{msg_id}/endpoint");return B.setPathParam("app_id",u),B.setPathParam("msg_id",D),B.setQueryParams({limit:A===null||A===void 0?void 0:A.limit,iterator:A===null||A===void 0?void 0:A.iterator}),B.send(this.requestCtx,WN.ListResponseMessageEndpointOutSerializer._fromJsonObject)}resend(u,D,A,B){let F=new f.SvixRequest(f.HttpMethod.POST,"/api/v1/app/{app_id}/msg/{msg_id}/endpoint/{endpoint_id}/resend");return F.setPathParam("app_id",u),F.setPathParam("msg_id",D),F.setPathParam("endpoint_id",A),F.setHeaderParam("idempotency-key",B===null||B===void 0?void 0:B.idempotencyKey),F.send(this.requestCtx,QN.EmptyResponseSerializer._fromJsonObject)}}XB.MessageAttempt=$B});var P0=E((VB)=>{Object.defineProperty(VB,"__esModule",{value:!0});VB.OperationalWebhookEndpointOutSerializer=void 0;VB.OperationalWebhookEndpointOutSerializer={_fromJsonObject(u){return{createdAt:new Date(u.createdAt),description:u.description,disabled:u.disabled,filterTypes:u.filterTypes,id:u.id,metadata:u.metadata,rateLimit:u.rateLimit,uid:u.uid,updatedAt:new Date(u.updatedAt),url:u.url}},_toJsonObject(u){return{createdAt:u.createdAt,description:u.description,disabled:u.disabled,filterTypes:u.filterTypes,id:u.id,metadata:u.metadata,rateLimit:u.rateLimit,uid:u.uid,updatedAt:u.updatedAt,url:u.url}}}});var UB=E((HB)=>{Object.defineProperty(HB,"__esModule",{value:!0});HB.ListResponseOperationalWebhookEndpointOutSerializer=void 0;var KB=P0();HB.ListResponseOperationalWebhookEndpointOutSerializer={_fromJsonObject(u){return{data:u.data.map((D)=>KB.OperationalWebhookEndpointOutSerializer._fromJsonObject(D)),done:u.done,iterator:u.iterator,prevIterator:u.prevIterator}},_toJsonObject(u){return{data:u.data.map((D)=>KB.OperationalWebhookEndpointOutSerializer._toJsonObject(D)),done:u.done,iterator:u.iterator,prevIterator:u.prevIterator}}}});var LB=E((PB)=>{Object.defineProperty(PB,"__esModule",{value:!0});PB.OperationalWebhookEndpointHeadersInSerializer=void 0;PB.OperationalWebhookEndpointHeadersInSerializer={_fromJsonObject(u){return{headers:u.headers}},_toJsonObject(u){return{headers:u.headers}}}});var SB=E((vB)=>{Object.defineProperty(vB,"__esModule",{value:!0});vB.OperationalWebhookEndpointHeadersOutSerializer=void 0;vB.OperationalWebhookEndpointHeadersOutSerializer={_fromJsonObject(u){return{headers:u.headers,sensitive:u.sensitive}},_toJsonObject(u){return{headers:u.headers,sensitive:u.sensitive}}}});var OB=E((TB)=>{Object.defineProperty(TB,"__esModule",{value:!0});TB.OperationalWebhookEndpointInSerializer=void 0;TB.OperationalWebhookEndpointInSerializer={_fromJsonObject(u){return{description:u.description,disabled:u.disabled,filterTypes:u.filterTypes,metadata:u.metadata,rateLimit:u.rateLimit,secret:u.secret,uid:u.uid,url:u.url}},_toJsonObject(u){return{description:u.description,disabled:u.disabled,filterTypes:u.filterTypes,metadata:u.metadata,rateLimit:u.rateLimit,secret:u.secret,uid:u.uid,url:u.url}}}});var IB=E((qB)=>{Object.defineProperty(qB,"__esModule",{value:!0});qB.OperationalWebhookEndpointSecretInSerializer=void 0;qB.OperationalWebhookEndpointSecretInSerializer={_fromJsonObject(u){return{key:u.key}},_toJsonObject(u){return{key:u.key}}}});var _B=E((xB)=>{Object.defineProperty(xB,"__esModule",{value:!0});xB.OperationalWebhookEndpointSecretOutSerializer=void 0;xB.OperationalWebhookEndpointSecretOutSerializer={_fromJsonObject(u){return{key:u.key}},_toJsonObject(u){return{key:u.key}}}});var bB=E((mB)=>{Object.defineProperty(mB,"__esModule",{value:!0});mB.OperationalWebhookEndpointUpdateSerializer=void 0;mB.OperationalWebhookEndpointUpdateSerializer={_fromJsonObject(u){return{description:u.description,disabled:u.disabled,filterTypes:u.filterTypes,metadata:u.metadata,rateLimit:u.rateLimit,uid:u.uid,url:u.url}},_toJsonObject(u){return{description:u.description,disabled:u.disabled,filterTypes:u.filterTypes,metadata:u.metadata,rateLimit:u.rateLimit,uid:u.uid,url:u.url}}}});var L0=E((fB)=>{Object.defineProperty(fB,"__esModule",{value:!0});fB.OperationalWebhookEndpoint=void 0;var HN=UB(),CN=LB(),UN=SB(),PN=OB(),R0=P0(),RN=IB(),LN=_B(),vN=bB(),k=R();class jB{constructor(u){this.requestCtx=u}list(u){let D=new k.SvixRequest(k.HttpMethod.GET,"/api/v1/operational-webhook/endpoint");return D.setQueryParams({limit:u===null||u===void 0?void 0:u.limit,iterator:u===null||u===void 0?void 0:u.iterator,order:u===null||u===void 0?void 0:u.order}),D.send(this.requestCtx,HN.ListResponseOperationalWebhookEndpointOutSerializer._fromJsonObject)}create(u,D){let A=new k.SvixRequest(k.HttpMethod.POST,"/api/v1/operational-webhook/endpoint");return A.setHeaderParam("idempotency-key",D===null||D===void 0?void 0:D.idempotencyKey),A.setBody(PN.OperationalWebhookEndpointInSerializer._toJsonObject(u)),A.send(this.requestCtx,R0.OperationalWebhookEndpointOutSerializer._fromJsonObject)}get(u){let D=new k.SvixRequest(k.HttpMethod.GET,"/api/v1/operational-webhook/endpoint/{endpoint_id}");return D.setPathParam("endpoint_id",u),D.send(this.requestCtx,R0.OperationalWebhookEndpointOutSerializer._fromJsonObject)}update(u,D){let A=new k.SvixRequest(k.HttpMethod.PUT,"/api/v1/operational-webhook/endpoint/{endpoint_id}");return A.setPathParam("endpoint_id",u),A.setBody(vN.OperationalWebhookEndpointUpdateSerializer._toJsonObject(D)),A.send(this.requestCtx,R0.OperationalWebhookEndpointOutSerializer._fromJsonObject)}delete(u){let D=new k.SvixRequest(k.HttpMethod.DELETE,"/api/v1/operational-webhook/endpoint/{endpoint_id}");return D.setPathParam("endpoint_id",u),D.sendNoResponseBody(this.requestCtx)}getHeaders(u){let D=new k.SvixRequest(k.HttpMethod.GET,"/api/v1/operational-webhook/endpoint/{endpoint_id}/headers");return D.setPathParam("endpoint_id",u),D.send(this.requestCtx,UN.OperationalWebhookEndpointHeadersOutSerializer._fromJsonObject)}updateHeaders(u,D){let A=new k.SvixRequest(k.HttpMethod.PUT,"/api/v1/operational-webhook/endpoint/{endpoint_id}/headers");return A.setPathParam("endpoint_id",u),A.setBody(CN.OperationalWebhookEndpointHeadersInSerializer._toJsonObject(D)),A.sendNoResponseBody(this.requestCtx)}getSecret(u){let D=new k.SvixRequest(k.HttpMethod.GET,"/api/v1/operational-webhook/endpoint/{endpoint_id}/secret");return D.setPathParam("endpoint_id",u),D.send(this.requestCtx,LN.OperationalWebhookEndpointSecretOutSerializer._fromJsonObject)}rotateSecret(u,D,A){let B=new k.SvixRequest(k.HttpMethod.POST,"/api/v1/operational-webhook/endpoint/{endpoint_id}/secret/rotate");return B.setPathParam("endpoint_id",u),B.setHeaderParam("idempotency-key",A===null||A===void 0?void 0:A.idempotencyKey),B.setBody(RN.OperationalWebhookEndpointSecretInSerializer._toJsonObject(D)),B.sendNoResponseBody(this.requestCtx)}}fB.OperationalWebhookEndpoint=jB});var iB=E((rB)=>{Object.defineProperty(rB,"__esModule",{value:!0});rB.OperationalWebhook=void 0;var MN=L0();class dB{constructor(u){this.requestCtx=u}get endpoint(){return new MN.OperationalWebhookEndpoint(this.requestCtx)}}rB.OperationalWebhook=dB});var oB=E((nB)=>{Object.defineProperty(nB,"__esModule",{value:!0});nB.AggregateEventTypesOutSerializer=void 0;var aB=t(),pB=e();nB.AggregateEventTypesOutSerializer={_fromJsonObject(u){return{id:u.id,status:aB.BackgroundTaskStatusSerializer._fromJsonObject(u.status),task:pB.BackgroundTaskTypeSerializer._fromJsonObject(u.task),updatedAt:new Date(u.updatedAt)}},_toJsonObject(u){return{id:u.id,status:aB.BackgroundTaskStatusSerializer._toJsonObject(u.status),task:pB.BackgroundTaskTypeSerializer._toJsonObject(u.task),updatedAt:u.updatedAt}}}});var uF=E((tB)=>{Object.defineProperty(tB,"__esModule",{value:!0});tB.AppUsageStatsInSerializer=void 0;tB.AppUsageStatsInSerializer={_fromJsonObject(u){return{appIds:u.appIds,since:new Date(u.since),until:new Date(u.until)}},_toJsonObject(u){return{appIds:u.appIds,since:u.since,until:u.until}}}});var wF=E((BF)=>{Object.defineProperty(BF,"__esModule",{value:!0});BF.AppUsageStatsOutSerializer=void 0;var DF=t(),AF=e();BF.AppUsageStatsOutSerializer={_fromJsonObject(u){return{id:u.id,status:DF.BackgroundTaskStatusSerializer._fromJsonObject(u.status),task:AF.BackgroundTaskTypeSerializer._fromJsonObject(u.task),unresolvedAppIds:u.unresolvedAppIds,updatedAt:new Date(u.updatedAt)}},_toJsonObject(u){return{id:u.id,status:DF.BackgroundTaskStatusSerializer._toJsonObject(u.status),task:AF.BackgroundTaskTypeSerializer._toJsonObject(u.task),unresolvedAppIds:u.unresolvedAppIds,updatedAt:u.updatedAt}}}});var JF=E((GF)=>{Object.defineProperty(GF,"__esModule",{value:!0});GF.Statistics=void 0;var SN=oB(),TN=uF(),hN=wF(),m2=R();class EF{constructor(u){this.requestCtx=u}aggregateAppStats(u,D){let A=new m2.SvixRequest(m2.HttpMethod.POST,"/api/v1/stats/usage/app");return A.setHeaderParam("idempotency-key",D===null||D===void 0?void 0:D.idempotencyKey),A.setBody(TN.AppUsageStatsInSerializer._toJsonObject(u)),A.send(this.requestCtx,hN.AppUsageStatsOutSerializer._fromJsonObject)}aggregateEventTypes(){return new m2.SvixRequest(m2.HttpMethod.PUT,"/api/v1/stats/usage/event-types").send(this.requestCtx,SN.AggregateEventTypesOutSerializer._fromJsonObject)}}GF.Statistics=EF});var $F=E((ZF)=>{Object.defineProperty(ZF,"__esModule",{value:!0});ZF.HttpSinkHeadersPatchInSerializer=void 0;ZF.HttpSinkHeadersPatchInSerializer={_fromJsonObject(u){return{headers:u.headers}},_toJsonObject(u){return{headers:u.headers}}}});var QF=E((XF)=>{Object.defineProperty(XF,"__esModule",{value:!0});XF.SinkTransformationOutSerializer=void 0;XF.SinkTransformationOutSerializer={_fromJsonObject(u){return{code:u.code,enabled:u.enabled}},_toJsonObject(u){return{code:u.code,enabled:u.enabled}}}});var v0=E((VF)=>{Object.defineProperty(VF,"__esModule",{value:!0});VF.StreamEventTypeOutSerializer=void 0;VF.StreamEventTypeOutSerializer={_fromJsonObject(u){return{archived:u.archived,createdAt:new Date(u.createdAt),deprecated:u.deprecated,description:u.description,featureFlags:u.featureFlags,name:u.name,updatedAt:new Date(u.updatedAt)}},_toJsonObject(u){return{archived:u.archived,createdAt:u.createdAt,deprecated:u.deprecated,description:u.description,featureFlags:u.featureFlags,name:u.name,updatedAt:u.updatedAt}}}});var UF=E((HF)=>{Object.defineProperty(HF,"__esModule",{value:!0});HF.ListResponseStreamEventTypeOutSerializer=void 0;var KF=v0();HF.ListResponseStreamEventTypeOutSerializer={_fromJsonObject(u){return{data:u.data.map((D)=>KF.StreamEventTypeOutSerializer._fromJsonObject(D)),done:u.done,iterator:u.iterator,prevIterator:u.prevIterator}},_toJsonObject(u){return{data:u.data.map((D)=>KF.StreamEventTypeOutSerializer._toJsonObject(D)),done:u.done,iterator:u.iterator,prevIterator:u.prevIterator}}}});var LF=E((PF)=>{Object.defineProperty(PF,"__esModule",{value:!0});PF.StreamEventTypeInSerializer=void 0;PF.StreamEventTypeInSerializer={_fromJsonObject(u){return{archived:u.archived,deprecated:u.deprecated,description:u.description,featureFlags:u.featureFlags,name:u.name}},_toJsonObject(u){return{archived:u.archived,deprecated:u.deprecated,description:u.description,featureFlags:u.featureFlags,name:u.name}}}});var SF=E((vF)=>{Object.defineProperty(vF,"__esModule",{value:!0});vF.StreamEventTypePatchSerializer=void 0;vF.StreamEventTypePatchSerializer={_fromJsonObject(u){return{archived:u.archived,deprecated:u.deprecated,description:u.description,featureFlags:u.featureFlags,name:u.name}},_toJsonObject(u){return{archived:u.archived,deprecated:u.deprecated,description:u.description,featureFlags:u.featureFlags,name:u.name}}}});var kF=E((OF)=>{Object.defineProperty(OF,"__esModule",{value:!0});OF.StreamingEventType=void 0;var ON=UF(),TF=LF(),g2=v0(),qN=SF(),a=R();class hF{constructor(u){this.requestCtx=u}list(u){let D=new a.SvixRequest(a.HttpMethod.GET,"/api/v1/stream/event-type");return D.setQueryParams({limit:u===null||u===void 0?void 0:u.limit,iterator:u===null||u===void 0?void 0:u.iterator,order:u===null||u===void 0?void 0:u.order,include_archived:u===null||u===void 0?void 0:u.includeArchived}),D.send(this.requestCtx,ON.ListResponseStreamEventTypeOutSerializer._fromJsonObject)}create(u,D){let A=new a.SvixRequest(a.HttpMethod.POST,"/api/v1/stream/event-type");return A.setHeaderParam("idempotency-key",D===null||D===void 0?void 0:D.idempotencyKey),A.setBody(TF.StreamEventTypeInSerializer._toJsonObject(u)),A.send(this.requestCtx,g2.StreamEventTypeOutSerializer._fromJsonObject)}get(u){let D=new a.SvixRequest(a.HttpMethod.GET,"/api/v1/stream/event-type/{name}");return D.setPathParam("name",u),D.send(this.requestCtx,g2.StreamEventTypeOutSerializer._fromJsonObject)}update(u,D){let A=new a.SvixRequest(a.HttpMethod.PUT,"/api/v1/stream/event-type/{name}");return A.setPathParam("name",u),A.setBody(TF.StreamEventTypeInSerializer._toJsonObject(D)),A.send(this.requestCtx,g2.StreamEventTypeOutSerializer._fromJsonObject)}delete(u,D){let A=new a.SvixRequest(a.HttpMethod.DELETE,"/api/v1/stream/event-type/{name}");return A.setPathParam("name",u),A.setQueryParams({expunge:D===null||D===void 0?void 0:D.expunge}),A.sendNoResponseBody(this.requestCtx)}patch(u,D){let A=new a.SvixRequest(a.HttpMethod.PATCH,"/api/v1/stream/event-type/{name}");return A.setPathParam("name",u),A.setBody(qN.StreamEventTypePatchSerializer._toJsonObject(D)),A.send(this.requestCtx,g2.StreamEventTypeOutSerializer._fromJsonObject)}}OF.StreamingEventType=hF});var yF=E((IF)=>{Object.defineProperty(IF,"__esModule",{value:!0});IF.EventInSerializer=void 0;IF.EventInSerializer={_fromJsonObject(u){return{eventType:u.eventType,payload:u.payload}},_toJsonObject(u){return{eventType:u.eventType,payload:u.payload}}}});var M0=E((_F)=>{Object.defineProperty(_F,"__esModule",{value:!0});_F.StreamInSerializer=void 0;_F.StreamInSerializer={_fromJsonObject(u){return{metadata:u.metadata,name:u.name,uid:u.uid}},_toJsonObject(u){return{metadata:u.metadata,name:u.name,uid:u.uid}}}});var lF=E((jF)=>{Object.defineProperty(jF,"__esModule",{value:!0});jF.CreateStreamEventsInSerializer=void 0;var gF=yF(),bF=M0();jF.CreateStreamEventsInSerializer={_fromJsonObject(u){return{events:u.events.map((D)=>gF.EventInSerializer._fromJsonObject(D)),stream:u.stream!=null?bF.StreamInSerializer._fromJsonObject(u.stream):void 0}},_toJsonObject(u){return{events:u.events.map((D)=>gF.EventInSerializer._toJsonObject(D)),stream:u.stream!=null?bF.StreamInSerializer._toJsonObject(u.stream):void 0}}}});var cF=E((dF)=>{Object.defineProperty(dF,"__esModule",{value:!0});dF.CreateStreamEventsOutSerializer=void 0;dF.CreateStreamEventsOutSerializer={_fromJsonObject(u){return{}},_toJsonObject(u){return{}}}});var pF=E((iF)=>{Object.defineProperty(iF,"__esModule",{value:!0});iF.EventOutSerializer=void 0;iF.EventOutSerializer={_fromJsonObject(u){return{eventType:u.eventType,payload:u.payload,timestamp:new Date(u.timestamp)}},_toJsonObject(u){return{eventType:u.eventType,payload:u.payload,timestamp:u.timestamp}}}});var tF=E((sF)=>{Object.defineProperty(sF,"__esModule",{value:!0});sF.EventStreamOutSerializer=void 0;var nF=pF();sF.EventStreamOutSerializer={_fromJsonObject(u){return{data:u.data.map((D)=>nF.EventOutSerializer._fromJsonObject(D)),done:u.done,iterator:u.iterator}},_toJsonObject(u){return{data:u.data.map((D)=>nF.EventOutSerializer._toJsonObject(D)),done:u.done,iterator:u.iterator}}}});var A7=E((u7)=>{Object.defineProperty(u7,"__esModule",{value:!0});u7.StreamingEvents=void 0;var kN=lF(),IN=cF(),xN=tF(),b2=R();class eF{constructor(u){this.requestCtx=u}create(u,D,A){let B=new b2.SvixRequest(b2.HttpMethod.POST,"/api/v1/stream/{stream_id}/events");return B.setPathParam("stream_id",u),B.setHeaderParam("idempotency-key",A===null||A===void 0?void 0:A.idempotencyKey),B.setBody(kN.CreateStreamEventsInSerializer._toJsonObject(D)),B.send(this.requestCtx,IN.CreateStreamEventsOutSerializer._fromJsonObject)}get(u,D,A){let B=new b2.SvixRequest(b2.HttpMethod.GET,"/api/v1/stream/{stream_id}/sink/{sink_id}/events");return B.setPathParam("stream_id",u),B.setPathParam("sink_id",D),B.setQueryParams({limit:A===null||A===void 0?void 0:A.limit,iterator:A===null||A===void 0?void 0:A.iterator,after:A===null||A===void 0?void 0:A.after}),B.send(this.requestCtx,xN.EventStreamOutSerializer._fromJsonObject)}}u7.StreamingEvents=eF});var S0=E((B7)=>{Object.defineProperty(B7,"__esModule",{value:!0});B7.AzureBlobStorageConfigSerializer=void 0;B7.AzureBlobStorageConfigSerializer={_fromJsonObject(u){return{accessKey:u.accessKey,account:u.account,container:u.container}},_toJsonObject(u){return{accessKey:u.accessKey,account:u.account,container:u.container}}}});var T0=E((w7)=>{Object.defineProperty(w7,"__esModule",{value:!0});w7.GoogleCloudStorageConfigSerializer=void 0;w7.GoogleCloudStorageConfigSerializer={_fromJsonObject(u){return{bucket:u.bucket,credentials:u.credentials}},_toJsonObject(u){return{bucket:u.bucket,credentials:u.credentials}}}});var h0=E((G7)=>{Object.defineProperty(G7,"__esModule",{value:!0});G7.S3ConfigSerializer=void 0;G7.S3ConfigSerializer={_fromJsonObject(u){return{accessKeyId:u.accessKeyId,bucket:u.bucket,endpointUrl:u.endpointUrl,region:u.region,secretAccessKey:u.secretAccessKey}},_toJsonObject(u){return{accessKeyId:u.accessKeyId,bucket:u.bucket,endpointUrl:u.endpointUrl,region:u.region,secretAccessKey:u.secretAccessKey}}}});var O0=E((J7)=>{Object.defineProperty(J7,"__esModule",{value:!0});J7.SinkHttpConfigSerializer=void 0;J7.SinkHttpConfigSerializer={_fromJsonObject(u){return{headers:u.headers,key:u.key,url:u.url}},_toJsonObject(u){return{headers:u.headers,key:u.key,url:u.url}}}});var q0=E((z7)=>{Object.defineProperty(z7,"__esModule",{value:!0});z7.SinkOtelV1ConfigSerializer=void 0;z7.SinkOtelV1ConfigSerializer={_fromJsonObject(u){return{headers:u.headers,url:u.url}},_toJsonObject(u){return{headers:u.headers,url:u.url}}}});var k0=E((Y7)=>{Object.defineProperty(Y7,"__esModule",{value:!0});Y7.SinkStatusSerializer=Y7.SinkStatus=void 0;var yN;(function(u){u.Enabled="enabled",u.Paused="paused",u.Disabled="disabled",u.Retrying="retrying"})(yN=Y7.SinkStatus||(Y7.SinkStatus={}));Y7.SinkStatusSerializer={_fromJsonObject(u){return u},_toJsonObject(u){return u}}});var I0=E((P7)=>{Object.defineProperty(P7,"__esModule",{value:!0});P7.StreamSinkOutSerializer=void 0;var V7=S0(),W7=T0(),K7=h0(),H7=O0(),C7=q0(),U7=k0();P7.StreamSinkOutSerializer={_fromJsonObject(u){let D=u.type;function A(B){switch(B){case"poller":return{};case"azureBlobStorage":return V7.AzureBlobStorageConfigSerializer._fromJsonObject(u.config);case"otelTracing":return C7.SinkOtelV1ConfigSerializer._fromJsonObject(u.config);case"http":return H7.SinkHttpConfigSerializer._fromJsonObject(u.config);case"amazonS3":return K7.S3ConfigSerializer._fromJsonObject(u.config);case"googleCloudStorage":return W7.GoogleCloudStorageConfigSerializer._fromJsonObject(u.config);default:throw Error(`Unexpected type: ${B}`)}}return{type:D,config:A(D),batchSize:u.batchSize,createdAt:new Date(u.createdAt),currentIterator:u.currentIterator,eventTypes:u.eventTypes,failureReason:u.failureReason,id:u.id,maxWaitSecs:u.maxWaitSecs,metadata:u.metadata,nextRetryAt:u.nextRetryAt?new Date(u.nextRetryAt):null,status:U7.SinkStatusSerializer._fromJsonObject(u.status),uid:u.uid,updatedAt:new Date(u.updatedAt)}},_toJsonObject(u){let D;switch(u.type){case"poller":D={};break;case"azureBlobStorage":D=V7.AzureBlobStorageConfigSerializer._toJsonObject(u.config);break;case"otelTracing":D=C7.SinkOtelV1ConfigSerializer._toJsonObject(u.config);break;case"http":D=H7.SinkHttpConfigSerializer._toJsonObject(u.config);break;case"amazonS3":D=K7.S3ConfigSerializer._toJsonObject(u.config);break;case"googleCloudStorage":D=W7.GoogleCloudStorageConfigSerializer._toJsonObject(u.config);break}return{type:u.type,config:D,batchSize:u.batchSize,createdAt:u.createdAt,currentIterator:u.currentIterator,eventTypes:u.eventTypes,failureReason:u.failureReason,id:u.id,maxWaitSecs:u.maxWaitSecs,metadata:u.metadata,nextRetryAt:u.nextRetryAt,status:U7.SinkStatusSerializer._toJsonObject(u.status),uid:u.uid,updatedAt:u.updatedAt}}}});var S7=E((v7)=>{Object.defineProperty(v7,"__esModule",{value:!0});v7.ListResponseStreamSinkOutSerializer=void 0;var L7=I0();v7.ListResponseStreamSinkOutSerializer={_fromJsonObject(u){return{data:u.data.map((D)=>L7.StreamSinkOutSerializer._fromJsonObject(D)),done:u.done,iterator:u.iterator,prevIterator:u.prevIterator}},_toJsonObject(u){return{data:u.data.map((D)=>L7.StreamSinkOutSerializer._toJsonObject(D)),done:u.done,iterator:u.iterator,prevIterator:u.prevIterator}}}});var O7=E((T7)=>{Object.defineProperty(T7,"__esModule",{value:!0});T7.SinkSecretOutSerializer=void 0;T7.SinkSecretOutSerializer={_fromJsonObject(u){return{key:u.key}},_toJsonObject(u){return{key:u.key}}}});var I7=E((q7)=>{Object.defineProperty(q7,"__esModule",{value:!0});q7.SinkTransformInSerializer=void 0;q7.SinkTransformInSerializer={_fromJsonObject(u){return{code:u.code}},_toJsonObject(u){return{code:u.code}}}});var j2=E((y7)=>{Object.defineProperty(y7,"__esModule",{value:!0});y7.SinkStatusInSerializer=y7.SinkStatusIn=void 0;var _N;(function(u){u.Enabled="enabled",u.Disabled="disabled"})(_N=y7.SinkStatusIn||(y7.SinkStatusIn={}));y7.SinkStatusInSerializer={_fromJsonObject(u){return u},_toJsonObject(u){return u}}});var c7=E((d7)=>{Object.defineProperty(d7,"__esModule",{value:!0});d7.StreamSinkInSerializer=void 0;var m7=S0(),g7=T0(),b7=h0(),j7=O0(),f7=q0(),l7=j2();d7.StreamSinkInSerializer={_fromJsonObject(u){let D=u.type;function A(B){switch(B){case"poller":return{};case"azureBlobStorage":return m7.AzureBlobStorageConfigSerializer._fromJsonObject(u.config);case"otelTracing":return f7.SinkOtelV1ConfigSerializer._fromJsonObject(u.config);case"http":return j7.SinkHttpConfigSerializer._fromJsonObject(u.config);case"amazonS3":return b7.S3ConfigSerializer._fromJsonObject(u.config);case"googleCloudStorage":return g7.GoogleCloudStorageConfigSerializer._fromJsonObject(u.config);default:throw Error(`Unexpected type: ${B}`)}}return{type:D,config:A(D),batchSize:u.batchSize,eventTypes:u.eventTypes,maxWaitSecs:u.maxWaitSecs,metadata:u.metadata,status:u.status!=null?l7.SinkStatusInSerializer._fromJsonObject(u.status):void 0,uid:u.uid}},_toJsonObject(u){let D;switch(u.type){case"poller":D={};break;case"azureBlobStorage":D=m7.AzureBlobStorageConfigSerializer._toJsonObject(u.config);break;case"otelTracing":D=f7.SinkOtelV1ConfigSerializer._toJsonObject(u.config);break;case"http":D=j7.SinkHttpConfigSerializer._toJsonObject(u.config);break;case"amazonS3":D=b7.S3ConfigSerializer._toJsonObject(u.config);break;case"googleCloudStorage":D=g7.GoogleCloudStorageConfigSerializer._toJsonObject(u.config);break}return{type:u.type,config:D,batchSize:u.batchSize,eventTypes:u.eventTypes,maxWaitSecs:u.maxWaitSecs,metadata:u.metadata,status:u.status!=null?l7.SinkStatusInSerializer._toJsonObject(u.status):void 0,uid:u.uid}}}});var p7=E((i7)=>{Object.defineProperty(i7,"__esModule",{value:!0});i7.AmazonS3PatchConfigSerializer=void 0;i7.AmazonS3PatchConfigSerializer={_fromJsonObject(u){return{accessKeyId:u.accessKeyId,bucket:u.bucket,endpointUrl:u.endpointUrl,region:u.region,secretAccessKey:u.secretAccessKey}},_toJsonObject(u){return{accessKeyId:u.accessKeyId,bucket:u.bucket,endpointUrl:u.endpointUrl,region:u.region,secretAccessKey:u.secretAccessKey}}}});var o7=E((n7)=>{Object.defineProperty(n7,"__esModule",{value:!0});n7.AzureBlobStoragePatchConfigSerializer=void 0;n7.AzureBlobStoragePatchConfigSerializer={_fromJsonObject(u){return{accessKey:u.accessKey,account:u.account,container:u.container}},_toJsonObject(u){return{accessKey:u.accessKey,account:u.account,container:u.container}}}});var uw=E((t7)=>{Object.defineProperty(t7,"__esModule",{value:!0});t7.GoogleCloudStoragePatchConfigSerializer=void 0;t7.GoogleCloudStoragePatchConfigSerializer={_fromJsonObject(u){return{bucket:u.bucket,credentials:u.credentials}},_toJsonObject(u){return{bucket:u.bucket,credentials:u.credentials}}}});var Bw=E((Dw)=>{Object.defineProperty(Dw,"__esModule",{value:!0});Dw.HttpPatchConfigSerializer=void 0;Dw.HttpPatchConfigSerializer={_fromJsonObject(u){return{url:u.url}},_toJsonObject(u){return{url:u.url}}}});var Ew=E((Fw)=>{Object.defineProperty(Fw,"__esModule",{value:!0});Fw.OtelTracingPatchConfigSerializer=void 0;Fw.OtelTracingPatchConfigSerializer={_fromJsonObject(u){return{url:u.url}},_toJsonObject(u){return{url:u.url}}}});var Qw=E((Xw)=>{Object.defineProperty(Xw,"__esModule",{value:!0});Xw.StreamSinkPatchSerializer=void 0;var Gw=p7(),Nw=o7(),Jw=uw(),Zw=Bw(),zw=Ew(),$w=j2();Xw.StreamSinkPatchSerializer={_fromJsonObject(u){let D=u.type;function A(B){switch(B){case"poller":return{};case"azureBlobStorage":return Nw.AzureBlobStoragePatchConfigSerializer._fromJsonObject(u.config);case"otelTracing":return zw.OtelTracingPatchConfigSerializer._fromJsonObject(u.config);case"http":return Zw.HttpPatchConfigSerializer._fromJsonObject(u.config);case"amazonS3":return Gw.AmazonS3PatchConfigSerializer._fromJsonObject(u.config);case"googleCloudStorage":return Jw.GoogleCloudStoragePatchConfigSerializer._fromJsonObject(u.config);default:throw Error(`Unexpected type: ${B}`)}}return{type:D,config:A(D),batchSize:u.batchSize,eventTypes:u.eventTypes,maxWaitSecs:u.maxWaitSecs,metadata:u.metadata,status:u.status!=null?$w.SinkStatusInSerializer._fromJsonObject(u.status):void 0,uid:u.uid}},_toJsonObject(u){let D;switch(u.type){case"poller":D={};break;case"azureBlobStorage":D=Nw.AzureBlobStoragePatchConfigSerializer._toJsonObject(u.config);break;case"otelTracing":D=zw.OtelTracingPatchConfigSerializer._toJsonObject(u.config);break;case"http":D=Zw.HttpPatchConfigSerializer._toJsonObject(u.config);break;case"amazonS3":D=Gw.AmazonS3PatchConfigSerializer._toJsonObject(u.config);break;case"googleCloudStorage":D=Jw.GoogleCloudStoragePatchConfigSerializer._toJsonObject(u.config);break}return{type:u.type,config:D,batchSize:u.batchSize,eventTypes:u.eventTypes,maxWaitSecs:u.maxWaitSecs,metadata:u.metadata,status:u.status!=null?$w.SinkStatusInSerializer._toJsonObject(u.status):void 0,uid:u.uid}}}});var Uw=E((Hw)=>{Object.defineProperty(Hw,"__esModule",{value:!0});Hw.StreamingSink=void 0;var Vw=H0(),mN=J0(),gN=S7(),bN=O7(),jN=I7(),Ww=c7(),f2=I0(),fN=Qw(),I=R();class Kw{constructor(u){this.requestCtx=u}list(u,D){let A=new I.SvixRequest(I.HttpMethod.GET,"/api/v1/stream/{stream_id}/sink");return A.setPathParam("stream_id",u),A.setQueryParams({limit:D===null||D===void 0?void 0:D.limit,iterator:D===null||D===void 0?void 0:D.iterator,order:D===null||D===void 0?void 0:D.order}),A.send(this.requestCtx,gN.ListResponseStreamSinkOutSerializer._fromJsonObject)}create(u,D,A){let B=new I.SvixRequest(I.HttpMethod.POST,"/api/v1/stream/{stream_id}/sink");return B.setPathParam("stream_id",u),B.setHeaderParam("idempotency-key",A===null||A===void 0?void 0:A.idempotencyKey),B.setBody(Ww.StreamSinkInSerializer._toJsonObject(D)),B.send(this.requestCtx,f2.StreamSinkOutSerializer._fromJsonObject)}get(u,D){let A=new I.SvixRequest(I.HttpMethod.GET,"/api/v1/stream/{stream_id}/sink/{sink_id}");return A.setPathParam("stream_id",u),A.setPathParam("sink_id",D),A.send(this.requestCtx,f2.StreamSinkOutSerializer._fromJsonObject)}update(u,D,A){let B=new I.SvixRequest(I.HttpMethod.PUT,"/api/v1/stream/{stream_id}/sink/{sink_id}");return B.setPathParam("stream_id",u),B.setPathParam("sink_id",D),B.setBody(Ww.StreamSinkInSerializer._toJsonObject(A)),B.send(this.requestCtx,f2.StreamSinkOutSerializer._fromJsonObject)}delete(u,D){let A=new I.SvixRequest(I.HttpMethod.DELETE,"/api/v1/stream/{stream_id}/sink/{sink_id}");return A.setPathParam("stream_id",u),A.setPathParam("sink_id",D),A.sendNoResponseBody(this.requestCtx)}patch(u,D,A){let B=new I.SvixRequest(I.HttpMethod.PATCH,"/api/v1/stream/{stream_id}/sink/{sink_id}");return B.setPathParam("stream_id",u),B.setPathParam("sink_id",D),B.setBody(fN.StreamSinkPatchSerializer._toJsonObject(A)),B.send(this.requestCtx,f2.StreamSinkOutSerializer._fromJsonObject)}getSecret(u,D){let A=new I.SvixRequest(I.HttpMethod.GET,"/api/v1/stream/{stream_id}/sink/{sink_id}/secret");return A.setPathParam("stream_id",u),A.setPathParam("sink_id",D),A.send(this.requestCtx,bN.SinkSecretOutSerializer._fromJsonObject)}rotateSecret(u,D,A,B){let F=new I.SvixRequest(I.HttpMethod.POST,"/api/v1/stream/{stream_id}/sink/{sink_id}/secret/rotate");return F.setPathParam("stream_id",u),F.setPathParam("sink_id",D),F.setHeaderParam("idempotency-key",B===null||B===void 0?void 0:B.idempotencyKey),F.setBody(mN.EndpointSecretRotateInSerializer._toJsonObject(A)),F.send(this.requestCtx,Vw.EmptyResponseSerializer._fromJsonObject)}transformationPartialUpdate(u,D,A){let B=new I.SvixRequest(I.HttpMethod.PATCH,"/api/v1/stream/{stream_id}/sink/{sink_id}/transformation");return B.setPathParam("stream_id",u),B.setPathParam("sink_id",D),B.setBody(jN.SinkTransformInSerializer._toJsonObject(A)),B.send(this.requestCtx,Vw.EmptyResponseSerializer._fromJsonObject)}}Hw.StreamingSink=Kw});var x0=E((Pw)=>{Object.defineProperty(Pw,"__esModule",{value:!0});Pw.StreamOutSerializer=void 0;Pw.StreamOutSerializer={_fromJsonObject(u){return{createdAt:new Date(u.createdAt),id:u.id,metadata:u.metadata,name:u.name,uid:u.uid,updatedAt:new Date(u.updatedAt)}},_toJsonObject(u){return{createdAt:u.createdAt,id:u.id,metadata:u.metadata,name:u.name,uid:u.uid,updatedAt:u.updatedAt}}}});var Sw=E((vw)=>{Object.defineProperty(vw,"__esModule",{value:!0});vw.ListResponseStreamOutSerializer=void 0;var Lw=x0();vw.ListResponseStreamOutSerializer={_fromJsonObject(u){return{data:u.data.map((D)=>Lw.StreamOutSerializer._fromJsonObject(D)),done:u.done,iterator:u.iterator,prevIterator:u.prevIterator}},_toJsonObject(u){return{data:u.data.map((D)=>Lw.StreamOutSerializer._toJsonObject(D)),done:u.done,iterator:u.iterator,prevIterator:u.prevIterator}}}});var Ow=E((Tw)=>{Object.defineProperty(Tw,"__esModule",{value:!0});Tw.StreamPatchSerializer=void 0;Tw.StreamPatchSerializer={_fromJsonObject(u){return{description:u.description,metadata:u.metadata,uid:u.uid}},_toJsonObject(u){return{description:u.description,metadata:u.metadata,uid:u.uid}}}});var yw=E((Iw)=>{Object.defineProperty(Iw,"__esModule",{value:!0});Iw.StreamingStream=void 0;var lN=Sw(),qw=M0(),l2=x0(),dN=Ow(),p=R();class kw{constructor(u){this.requestCtx=u}list(u){let D=new p.SvixRequest(p.HttpMethod.GET,"/api/v1/stream");return D.setQueryParams({limit:u===null||u===void 0?void 0:u.limit,iterator:u===null||u===void 0?void 0:u.iterator,order:u===null||u===void 0?void 0:u.order}),D.send(this.requestCtx,lN.ListResponseStreamOutSerializer._fromJsonObject)}create(u,D){let A=new p.SvixRequest(p.HttpMethod.POST,"/api/v1/stream");return A.setHeaderParam("idempotency-key",D===null||D===void 0?void 0:D.idempotencyKey),A.setBody(qw.StreamInSerializer._toJsonObject(u)),A.send(this.requestCtx,l2.StreamOutSerializer._fromJsonObject)}get(u){let D=new p.SvixRequest(p.HttpMethod.GET,"/api/v1/stream/{stream_id}");return D.setPathParam("stream_id",u),D.send(this.requestCtx,l2.StreamOutSerializer._fromJsonObject)}update(u,D){let A=new p.SvixRequest(p.HttpMethod.PUT,"/api/v1/stream/{stream_id}");return A.setPathParam("stream_id",u),A.setBody(qw.StreamInSerializer._toJsonObject(D)),A.send(this.requestCtx,l2.StreamOutSerializer._fromJsonObject)}delete(u){let D=new p.SvixRequest(p.HttpMethod.DELETE,"/api/v1/stream/{stream_id}");return D.setPathParam("stream_id",u),D.sendNoResponseBody(this.requestCtx)}patch(u,D){let A=new p.SvixRequest(p.HttpMethod.PATCH,"/api/v1/stream/{stream_id}");return A.setPathParam("stream_id",u),A.setBody(dN.StreamPatchSerializer._toJsonObject(D)),A.send(this.requestCtx,l2.StreamOutSerializer._fromJsonObject)}}Iw.StreamingStream=kw});var jw=E((gw)=>{Object.defineProperty(gw,"__esModule",{value:!0});gw.Streaming=void 0;var _w=G0(),rN=$F(),cN=QF(),iN=kF(),aN=A7(),pN=Uw(),nN=yw(),N2=R();class mw{constructor(u){this.requestCtx=u}get event_type(){return new iN.StreamingEventType(this.requestCtx)}get events(){return new aN.StreamingEvents(this.requestCtx)}get sink(){return new pN.StreamingSink(this.requestCtx)}get stream(){return new nN.StreamingStream(this.requestCtx)}sinkHeadersGet(u,D){let A=new N2.SvixRequest(N2.HttpMethod.GET,"/api/v1/stream/{stream_id}/sink/{sink_id}/headers");return A.setPathParam("stream_id",u),A.setPathParam("sink_id",D),A.send(this.requestCtx,_w.EndpointHeadersOutSerializer._fromJsonObject)}sinkHeadersPatch(u,D,A){let B=new N2.SvixRequest(N2.HttpMethod.PATCH,"/api/v1/stream/{stream_id}/sink/{sink_id}/headers");return B.setPathParam("stream_id",u),B.setPathParam("sink_id",D),B.setBody(rN.HttpSinkHeadersPatchInSerializer._toJsonObject(A)),B.send(this.requestCtx,_w.EndpointHeadersOutSerializer._fromJsonObject)}sinkTransformationGet(u,D){let A=new N2.SvixRequest(N2.HttpMethod.GET,"/api/v1/stream/{stream_id}/sink/{sink_id}/transformation");return A.setPathParam("stream_id",u),A.setPathParam("sink_id",D),A.send(this.requestCtx,cN.SinkTransformationOutSerializer._fromJsonObject)}}gw.Streaming=mw});var dw=E((fw)=>{Object.defineProperty(fw,"__esModule",{value:!0});fw.HTTPValidationError=fw.ValidationError=fw.HttpErrorOut=void 0;class J2{static getAttributeTypeMap(){return J2.attributeTypeMap}}fw.HttpErrorOut=J2;J2.discriminator=void 0;J2.mapping=void 0;J2.attributeTypeMap=[{name:"code",baseName:"code",type:"string",format:""},{name:"detail",baseName:"detail",type:"string",format:""}];class Z2{static getAttributeTypeMap(){return Z2.attributeTypeMap}}fw.ValidationError=Z2;Z2.discriminator=void 0;Z2.mapping=void 0;Z2.attributeTypeMap=[{name:"loc",baseName:"loc",type:"Array<string>",format:""},{name:"msg",baseName:"msg",type:"string",format:""},{name:"type",baseName:"type",type:"string",format:""}];class z2{static getAttributeTypeMap(){return z2.attributeTypeMap}}fw.HTTPValidationError=z2;z2.discriminator=void 0;z2.mapping=void 0;z2.attributeTypeMap=[{name:"detail",baseName:"detail",type:"Array<ValidationError>",format:""}]});var aw=E((cw)=>{Object.defineProperty(cw,"__esModule",{value:!0});cw.timingSafeEqual=void 0;function rw(u,D=""){if(!u)throw Error(D)}function tN(u,D){if(u.byteLength!==D.byteLength)return!1;if(!(u instanceof DataView))u=new DataView(ArrayBuffer.isView(u)?u.buffer:u);if(!(D instanceof DataView))D=new DataView(ArrayBuffer.isView(D)?D.buffer:D);rw(u instanceof DataView),rw(D instanceof DataView);let A=u.byteLength,B=0,F=-1;while(++F<A)B|=u.getUint8(F)^D.getUint8(F);return B===0}cw.timingSafeEqual=tN});var sw=E((l)=>{var eN=l&&l.__extends||function(){var u=function(D,A){return u=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(B,F){B.__proto__=F}||function(B,F){for(var G in F)if(F.hasOwnProperty(G))B[G]=F[G]},u(D,A)};return function(D,A){u(D,A);function B(){this.constructor=D}D.prototype=A===null?Object.create(A):(B.prototype=A.prototype,new B)}}();Object.defineProperty(l,"__esModule",{value:!0});var M=256,y0=function(){function u(D){if(D===void 0)D="=";this._paddingCharacter=D}return u.prototype.encodedLength=function(D){if(!this._paddingCharacter)return(D*8+5)/6|0;return(D+2)/3*4|0},u.prototype.encode=function(D){var A="",B=0;for(;B<D.length-2;B+=3){var F=D[B]<<16|D[B+1]<<8|D[B+2];A+=this._encodeByte(F>>>18&63),A+=this._encodeByte(F>>>12&63),A+=this._encodeByte(F>>>6&63),A+=this._encodeByte(F>>>0&63)}var G=D.length-B;if(G>0){var F=D[B]<<16|(G===2?D[B+1]<<8:0);if(A+=this._encodeByte(F>>>18&63),A+=this._encodeByte(F>>>12&63),G===2)A+=this._encodeByte(F>>>6&63);else A+=this._paddingCharacter||"";A+=this._paddingCharacter||""}return A},u.prototype.maxDecodedLength=function(D){if(!this._paddingCharacter)return(D*6+7)/8|0;return D/4*3|0},u.prototype.decodedLength=function(D){return this.maxDecodedLength(D.length-this._getPaddingLength(D))},u.prototype.decode=function(D){if(D.length===0)return new Uint8Array(0);var A=this._getPaddingLength(D),B=D.length-A,F=new Uint8Array(this.maxDecodedLength(B)),G=0,w=0,N=0,J=0,$=0,X=0,z=0;for(;w<B-4;w+=4)J=this._decodeChar(D.charCodeAt(w+0)),$=this._decodeChar(D.charCodeAt(w+1)),X=this._decodeChar(D.charCodeAt(w+2)),z=this._decodeChar(D.charCodeAt(w+3)),F[G++]=J<<2|$>>>4,F[G++]=$<<4|X>>>2,F[G++]=X<<6|z,N|=J&M,N|=$&M,N|=X&M,N|=z&M;if(w<B-1)J=this._decodeChar(D.charCodeAt(w)),$=this._decodeChar(D.charCodeAt(w+1)),F[G++]=J<<2|$>>>4,N|=J&M,N|=$&M;if(w<B-2)X=this._decodeChar(D.charCodeAt(w+2)),F[G++]=$<<4|X>>>2,N|=X&M;if(w<B-3)z=this._decodeChar(D.charCodeAt(w+3)),F[G++]=X<<6|z,N|=z&M;if(N!==0)throw Error("Base64Coder: incorrect characters for decoding");return F},u.prototype._encodeByte=function(D){var A=D;return A+=65,A+=25-D>>>8&6,A+=51-D>>>8&-75,A+=61-D>>>8&-15,A+=62-D>>>8&3,String.fromCharCode(A)},u.prototype._decodeChar=function(D){var A=M;return A+=(42-D&D-44)>>>8&-M+D-43+62,A+=(46-D&D-48)>>>8&-M+D-47+63,A+=(47-D&D-58)>>>8&-M+D-48+52,A+=(64-D&D-91)>>>8&-M+D-65+0,A+=(96-D&D-123)>>>8&-M+D-97+26,A},u.prototype._getPaddingLength=function(D){var A=0;if(this._paddingCharacter){for(var B=D.length-1;B>=0;B--){if(D[B]!==this._paddingCharacter)break;A++}if(D.length<4||A>2)throw Error("Base64Coder: incorrect padding")}return A},u}();l.Coder=y0;var C2=new y0;function uJ(u){return C2.encode(u)}l.encode=uJ;function DJ(u){return C2.decode(u)}l.decode=DJ;var pw=function(u){eN(D,u);function D(){return u!==null&&u.apply(this,arguments)||this}return D.prototype._encodeByte=function(A){var B=A;return B+=65,B+=25-A>>>8&6,B+=51-A>>>8&-75,B+=61-A>>>8&-13,B+=62-A>>>8&49,String.fromCharCode(B)},D.prototype._decodeChar=function(A){var B=M;return B+=(44-A&A-46)>>>8&-M+A-45+62,B+=(94-A&A-96)>>>8&-M+A-95+63,B+=(47-A&A-58)>>>8&-M+A-48+52,B+=(64-A&A-91)>>>8&-M+A-65+0,B+=(96-A&A-123)>>>8&-M+A-97+26,B},D}(y0);l.URLSafeCoder=pw;var nw=new pw;function AJ(u){return nw.encode(u)}l.encodeURLSafe=AJ;function BJ(u){return nw.decode(u)}l.decodeURLSafe=BJ;l.encodedLength=function(u){return C2.encodedLength(u)};l.maxDecodedLength=function(u){return C2.maxDecodedLength(u)};l.decodedLength=function(u){return C2.decodedLength(u)}});var tw=E((ow,d2)=>{(function(u,D){var A={};D(A);var B=A.default;for(var F in A)B[F]=A[F];if(typeof d2==="object"&&typeof d2.exports==="object")d2.exports=B;else if(typeof define==="function"&&define.amd)define(function(){return B});else u.sha256=B})(ow,function(u){u.__esModule=!0,u.digestLength=32,u.blockSize=64;var D=new Uint32Array([1116352408,1899447441,3049323471,3921009573,961987163,1508970993,2453635748,2870763221,3624381080,310598401,607225278,1426881987,1925078388,2162078206,2614888103,3248222580,3835390401,4022224774,264347078,604807628,770255983,1249150122,1555081692,1996064986,2554220882,2821834349,2952996808,3210313671,3336571891,3584528711,113926993,338241895,666307205,773529912,1294757372,1396182291,1695183700,1986661051,2177026350,2456956037,2730485921,2820302411,3259730800,3345764771,3516065817,3600352804,4094571909,275423344,430227734,506948616,659060556,883997877,958139571,1322822218,1537002063,1747873779,1955562222,2024104815,2227730452,2361852424,2428436474,2756734187,3204031479,3329325298]);function A(z,Z,Y,Q,L){var C,U,H,_,T,P,n,h,y,O,$2,X2,P2;while(L>=64){C=Z[0],U=Z[1],H=Z[2],_=Z[3],T=Z[4],P=Z[5],n=Z[6],h=Z[7];for(O=0;O<16;O++)$2=Q+O*4,z[O]=(Y[$2]&255)<<24|(Y[$2+1]&255)<<16|(Y[$2+2]&255)<<8|Y[$2+3]&255;for(O=16;O<64;O++)y=z[O-2],X2=(y>>>17|y<<15)^(y>>>19|y<<13)^y>>>10,y=z[O-15],P2=(y>>>7|y<<25)^(y>>>18|y<<14)^y>>>3,z[O]=(X2+z[O-7]|0)+(P2+z[O-16]|0);for(O=0;O<64;O++)X2=(((T>>>6|T<<26)^(T>>>11|T<<21)^(T>>>25|T<<7))+(T&P^~T&n)|0)+(h+(D[O]+z[O]|0)|0)|0,P2=((C>>>2|C<<30)^(C>>>13|C<<19)^(C>>>22|C<<10))+(C&U^C&H^U&H)|0,h=n,n=P,P=T,T=_+X2|0,_=H,H=U,U=C,C=X2+P2|0;Z[0]+=C,Z[1]+=U,Z[2]+=H,Z[3]+=_,Z[4]+=T,Z[5]+=P,Z[6]+=n,Z[7]+=h,Q+=64,L-=64}return Q}var B=function(){function z(){this.digestLength=u.digestLength,this.blockSize=u.blockSize,this.state=new Int32Array(8),this.temp=new Int32Array(64),this.buffer=new Uint8Array(128),this.bufferLength=0,this.bytesHashed=0,this.finished=!1,this.reset()}return z.prototype.reset=function(){return this.state[0]=1779033703,this.state[1]=3144134277,this.state[2]=1013904242,this.state[3]=2773480762,this.state[4]=1359893119,this.state[5]=2600822924,this.state[6]=528734635,this.state[7]=1541459225,this.bufferLength=0,this.bytesHashed=0,this.finished=!1,this},z.prototype.clean=function(){for(var Z=0;Z<this.buffer.length;Z++)this.buffer[Z]=0;for(var Z=0;Z<this.temp.length;Z++)this.temp[Z]=0;this.reset()},z.prototype.update=function(Z,Y){if(Y===void 0)Y=Z.length;if(this.finished)throw Error("SHA256: can't update because hash was finished.");var Q=0;if(this.bytesHashed+=Y,this.bufferLength>0){while(this.bufferLength<64&&Y>0)this.buffer[this.bufferLength++]=Z[Q++],Y--;if(this.bufferLength===64)A(this.temp,this.state,this.buffer,0,64),this.bufferLength=0}if(Y>=64)Q=A(this.temp,this.state,Z,Q,Y),Y%=64;while(Y>0)this.buffer[this.bufferLength++]=Z[Q++],Y--;return this},z.prototype.finish=function(Z){if(!this.finished){var Y=this.bytesHashed,Q=this.bufferLength,L=Y/536870912|0,C=Y<<3,U=Y%64<56?64:128;this.buffer[Q]=128;for(var H=Q+1;H<U-8;H++)this.buffer[H]=0;this.buffer[U-8]=L>>>24&255,this.buffer[U-7]=L>>>16&255,this.buffer[U-6]=L>>>8&255,this.buffer[U-5]=L>>>0&255,this.buffer[U-4]=C>>>24&255,this.buffer[U-3]=C>>>16&255,this.buffer[U-2]=C>>>8&255,this.buffer[U-1]=C>>>0&255,A(this.temp,this.state,this.buffer,0,U),this.finished=!0}for(var H=0;H<8;H++)Z[H*4+0]=this.state[H]>>>24&255,Z[H*4+1]=this.state[H]>>>16&255,Z[H*4+2]=this.state[H]>>>8&255,Z[H*4+3]=this.state[H]>>>0&255;return this},z.prototype.digest=function(){var Z=new Uint8Array(this.digestLength);return this.finish(Z),Z},z.prototype._saveState=function(Z){for(var Y=0;Y<this.state.length;Y++)Z[Y]=this.state[Y]},z.prototype._restoreState=function(Z,Y){for(var Q=0;Q<this.state.length;Q++)this.state[Q]=Z[Q];this.bytesHashed=Y,this.finished=!1,this.bufferLength=0},z}();u.Hash=B;var F=function(){function z(Z){this.inner=new B,this.outer=new B,this.blockSize=this.inner.blockSize,this.digestLength=this.inner.digestLength;var Y=new Uint8Array(this.blockSize);if(Z.length>this.blockSize)new B().update(Z).finish(Y).clean();else for(var Q=0;Q<Z.length;Q++)Y[Q]=Z[Q];for(var Q=0;Q<Y.length;Q++)Y[Q]^=54;this.inner.update(Y);for(var Q=0;Q<Y.length;Q++)Y[Q]^=106;this.outer.update(Y),this.istate=new Uint32Array(8),this.ostate=new Uint32Array(8),this.inner._saveState(this.istate),this.outer._saveState(this.ostate);for(var Q=0;Q<Y.length;Q++)Y[Q]=0}return z.prototype.reset=function(){return this.inner._restoreState(this.istate,this.inner.blockSize),this.outer._restoreState(this.ostate,this.outer.blockSize),this},z.prototype.clean=function(){for(var Z=0;Z<this.istate.length;Z++)this.ostate[Z]=this.istate[Z]=0;this.inner.clean(),this.outer.clean()},z.prototype.update=function(Z){return this.inner.update(Z),this},z.prototype.finish=function(Z){if(this.outer.finished)this.outer.finish(Z);else this.inner.finish(Z),this.outer.update(Z,this.digestLength).finish(Z);return this},z.prototype.digest=function(){var Z=new Uint8Array(this.digestLength);return this.finish(Z),Z},z}();u.HMAC=F;function G(z){var Z=new B().update(z),Y=Z.digest();return Z.clean(),Y}u.hash=G,u.default=G;function w(z,Z){var Y=new F(z).update(Z),Q=Y.digest();return Y.clean(),Q}u.hmac=w;function N(z,Z,Y,Q){var L=Q[0];if(L===0)throw Error("hkdf: cannot expand more");if(Z.reset(),L>1)Z.update(z);if(Y)Z.update(Y);Z.update(Q),Z.finish(z),Q[0]++}var J=new Uint8Array(u.digestLength);function $(z,Z,Y,Q){if(Z===void 0)Z=J;if(Q===void 0)Q=32;var L=new Uint8Array([1]),C=w(Z,z),U=new F(C),H=new Uint8Array(U.digestLength),_=H.length,T=new Uint8Array(Q);for(var P=0;P<Q;P++){if(_===H.length)N(H,U,Y,L),_=0;T[P]=H[_++]}return U.clean(),H.fill(0),L.fill(0),T}u.hkdf=$;function X(z,Z,Y,Q){var L=new F(z),C=L.digestLength,U=new Uint8Array(4),H=new Uint8Array(C),_=new Uint8Array(C),T=new Uint8Array(Q);for(var P=0;P*C<Q;P++){var n=P+1;U[0]=n>>>24&255,U[1]=n>>>16&255,U[2]=n>>>8&255,U[3]=n>>>0&255,L.reset(),L.update(Z),L.update(U),L.finish(_);for(var h=0;h<C;h++)H[h]=_[h];for(var h=2;h<=Y;h++){L.reset(),L.update(_).finish(_);for(var y=0;y<C;y++)H[y]^=_[y]}for(var h=0;h<C&&P*C+h<Q;h++)T[P*C+h]=H[h]}for(var P=0;P<C;P++)H[P]=_[P]=0;for(var P=0;P<4;P++)U[P]=0;return L.clean(),T}u.pbkdf2=X})});var m0=E((DE)=>{Object.defineProperty(DE,"__esModule",{value:!0});DE.Webhook=DE.WebhookVerificationError=void 0;var FJ=aw(),ew=sw(),wJ=tw(),uE=300;class _0 extends Error{constructor(u){super(u);Object.setPrototypeOf(this,_0.prototype),this.name="ExtendableError",this.stack=Error(u).stack}}class u2 extends _0{constructor(u){super(u);Object.setPrototypeOf(this,u2.prototype),this.name="WebhookVerificationError"}}DE.WebhookVerificationError=u2;class U2{constructor(u,D){if(!u)throw Error("Secret can't be empty.");if((D===null||D===void 0?void 0:D.format)==="raw")if(u instanceof Uint8Array)this.key=u;else this.key=Uint8Array.from(u,(A)=>A.charCodeAt(0));else{if(typeof u!=="string")throw Error("Expected secret to be of type string");if(u.startsWith(U2.prefix))u=u.substring(U2.prefix.length);this.key=ew.decode(u)}}verify(u,D){let A={};for(let z of Object.keys(D))A[z.toLowerCase()]=D[z];let B=A["webhook-id"],F=A["webhook-signature"],G=A["webhook-timestamp"];if(!F||!B||!G)throw new u2("Missing required headers");let w=this.verifyTimestamp(G),J=this.sign(B,w,u).split(",")[1],$=F.split(" "),X=new globalThis.TextEncoder;for(let z of $){let[Z,Y]=z.split(",");if(Z!=="v1")continue;if((0,FJ.timingSafeEqual)(X.encode(Y),X.encode(J)))return JSON.parse(u.toString())}throw new u2("No matching signature found")}sign(u,D,A){if(typeof A==="string");else if(A.constructor.name==="Buffer")A=A.toString();else throw Error("Expected payload to be of type string or Buffer.");let B=new TextEncoder,F=Math.floor(D.getTime()/1000),G=B.encode(`${u}.${F}.${A}`);return`v1,${ew.encode(wJ.hmac(this.key,G))}`}verifyTimestamp(u){let D=Math.floor(Date.now()/1000),A=parseInt(u,10);if(isNaN(A))throw new u2("Invalid Signature Headers");if(D-A>uE)throw new u2("Message timestamp too old");if(A>D+uE)throw new u2("Message timestamp too new");return new Date(A*1000)}}DE.Webhook=U2;U2.prefix="whsec_"});var wE=E((g0)=>{Object.defineProperty(g0,"__esModule",{value:!0});g0.Webhook=g0.WebhookVerificationError=void 0;var GJ=m0(),NJ=m0();Object.defineProperty(g0,"WebhookVerificationError",{enumerable:!0,get:function(){return NJ.WebhookVerificationError}});class BE{constructor(u,D){this.inner=new GJ.Webhook(u,D)}verify(u,D){var A,B,F,G,w,N;let J={};for(let $ of Object.keys(D))J[$.toLowerCase()]=D[$];return J["webhook-id"]=(B=(A=J["svix-id"])!==null&&A!==void 0?A:J["webhook-id"])!==null&&B!==void 0?B:"",J["webhook-signature"]=(G=(F=J["svix-signature"])!==null&&F!==void 0?F:J["webhook-signature"])!==null&&G!==void 0?G:"",J["webhook-timestamp"]=(N=(w=J["svix-timestamp"])!==null&&w!==void 0?w:J["webhook-timestamp"])!==null&&N!==void 0?N:"",this.inner.verify(u,J)}sign(u,D,A){return this.inner.sign(u,D,A)}}g0.Webhook=BE});var JE=E((GE)=>{Object.defineProperty(GE,"__esModule",{value:!0});GE.EndpointDisabledTriggerSerializer=GE.EndpointDisabledTrigger=void 0;var JJ;(function(u){u.Manual="manual",u.Automatic="automatic"})(JJ=GE.EndpointDisabledTrigger||(GE.EndpointDisabledTrigger={}));GE.EndpointDisabledTriggerSerializer={_fromJsonObject(u){return u},_toJsonObject(u){return u}}});var XE=E((zE)=>{Object.defineProperty(zE,"__esModule",{value:!0});zE.OrderingSerializer=zE.Ordering=void 0;var ZJ;(function(u){u.Ascending="ascending",u.Descending="descending"})(ZJ=zE.Ordering||(zE.Ordering={}));zE.OrderingSerializer={_fromJsonObject(u){return u},_toJsonObject(u){return u}}});var YE=E((m)=>{Object.defineProperty(m,"__esModule",{value:!0});m.StatusCodeClass=m.SinkStatusIn=m.SinkStatus=m.Ordering=m.MessageStatusText=m.MessageStatus=m.MessageAttemptTriggerType=m.EndpointDisabledTrigger=m.ConnectorProduct=m.ConnectorKind=m.BackgroundTaskType=m.BackgroundTaskStatus=m.AppPortalCapability=void 0;var zJ=A0();Object.defineProperty(m,"AppPortalCapability",{enumerable:!0,get:function(){return zJ.AppPortalCapability}});var $J=t();Object.defineProperty(m,"BackgroundTaskStatus",{enumerable:!0,get:function(){return $J.BackgroundTaskStatus}});var XJ=e();Object.defineProperty(m,"BackgroundTaskType",{enumerable:!0,get:function(){return XJ.BackgroundTaskType}});var YJ=w2();Object.defineProperty(m,"ConnectorKind",{enumerable:!0,get:function(){return YJ.ConnectorKind}});var QJ=O2();Object.defineProperty(m,"ConnectorProduct",{enumerable:!0,get:function(){return QJ.ConnectorProduct}});var VJ=JE();Object.defineProperty(m,"EndpointDisabledTrigger",{enumerable:!0,get:function(){return VJ.EndpointDisabledTrigger}});var WJ=C0();Object.defineProperty(m,"MessageAttemptTriggerType",{enumerable:!0,get:function(){return WJ.MessageAttemptTriggerType}});var KJ=E2();Object.defineProperty(m,"MessageStatus",{enumerable:!0,get:function(){return KJ.MessageStatus}});var HJ=H2();Object.defineProperty(m,"MessageStatusText",{enumerable:!0,get:function(){return HJ.MessageStatusText}});var CJ=XE();Object.defineProperty(m,"Ordering",{enumerable:!0,get:function(){return CJ.Ordering}});var UJ=k0();Object.defineProperty(m,"SinkStatus",{enumerable:!0,get:function(){return UJ.SinkStatus}});var PJ=j2();Object.defineProperty(m,"SinkStatusIn",{enumerable:!0,get:function(){return PJ.SinkStatusIn}});var RJ=E0();Object.defineProperty(m,"StatusCodeClass",{enumerable:!0,get:function(){return RJ.StatusCodeClass}})});var WE=E((S)=>{var vJ=S&&S.__createBinding||(Object.create?function(u,D,A,B){if(B===void 0)B=A;var F=Object.getOwnPropertyDescriptor(D,A);if(!F||("get"in F?!D.__esModule:F.writable||F.configurable))F={enumerable:!0,get:function(){return D[A]}};Object.defineProperty(u,B,F)}:function(u,D,A,B){if(B===void 0)B=A;u[B]=D[A]}),QE=S&&S.__exportStar||function(u,D){for(var A in u)if(A!=="default"&&!Object.prototype.hasOwnProperty.call(D,A))vJ(D,u,A)};Object.defineProperty(S,"__esModule",{value:!0});S.Svix=S.messageInRaw=S.ValidationError=S.HttpErrorOut=S.HTTPValidationError=S.ApiException=void 0;var MJ=Yu(),SJ=pu(),TJ=$D(),hJ=lD(),OJ=z3(),qJ=h3(),kJ=B5(),IJ=N5(),xJ=U4(),yJ=f4(),_J=K0(),mJ=QB(),gJ=iB(),bJ=JF(),jJ=jw(),fJ=L0(),lJ=e2();Object.defineProperty(S,"ApiException",{enumerable:!0,get:function(){return lJ.ApiException}});var b0=dw();Object.defineProperty(S,"HTTPValidationError",{enumerable:!0,get:function(){return b0.HTTPValidationError}});Object.defineProperty(S,"HttpErrorOut",{enumerable:!0,get:function(){return b0.HttpErrorOut}});Object.defineProperty(S,"ValidationError",{enumerable:!0,get:function(){return b0.ValidationError}});QE(wE(),S);QE(YE(),S);var dJ=K0();Object.defineProperty(S,"messageInRaw",{enumerable:!0,get:function(){return dJ.messageInRaw}});var rJ=[{region:"us",url:"https://api.us.svix.com"},{region:"eu",url:"https://api.eu.svix.com"},{region:"in",url:"https://api.in.svix.com"},{region:"ca",url:"https://api.ca.svix.com"},{region:"au",url:"https://api.au.svix.com"}];class VE{constructor(u,D={}){var A,B,F;let G=(A=rJ.find((N)=>N.region===u.split(".")[1]))===null||A===void 0?void 0:A.url,w=(F=(B=D.serverUrl)!==null&&B!==void 0?B:G)!==null&&F!==void 0?F:"https://api.svix.com";if(D.retryScheduleInMs){this.requestCtx={baseUrl:w,token:u,timeout:D.requestTimeout,retryScheduleInMs:D.retryScheduleInMs,fetch:D.fetch};return}if(D.numRetries){this.requestCtx={baseUrl:w,token:u,timeout:D.requestTimeout,numRetries:D.numRetries,fetch:D.fetch};return}this.requestCtx={baseUrl:w,token:u,timeout:D.requestTimeout,fetch:D.fetch}}get application(){return new MJ.Application(this.requestCtx)}get authentication(){return new SJ.Authentication(this.requestCtx)}get backgroundTask(){return new TJ.BackgroundTask(this.requestCtx)}get connector(){return new hJ.Connector(this.requestCtx)}get endpoint(){return new OJ.Endpoint(this.requestCtx)}get environment(){return new qJ.Environment(this.requestCtx)}get eventType(){return new kJ.EventType(this.requestCtx)}get health(){return new IJ.Health(this.requestCtx)}get ingest(){return new xJ.Ingest(this.requestCtx)}get integration(){return new yJ.Integration(this.requestCtx)}get message(){return new _J.Message(this.requestCtx)}get messageAttempt(){return new mJ.MessageAttempt(this.requestCtx)}get operationalWebhook(){return new gJ.OperationalWebhook(this.requestCtx)}get statistics(){return new bJ.Statistics(this.requestCtx)}get streaming(){return new jJ.Streaming(this.requestCtx)}get operationalWebhookEndpoint(){return new fJ.OperationalWebhookEndpoint(this.requestCtx)}}S.Svix=VE});var s=new TextEncoder;var Y2=new Uint8Array(256);for(let u=0;u<64;u++)Y2["ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charCodeAt(u)]=u;function R2(u){let D=Math.ceil(u.length/4)*3,A=u.length,B=0;if(u.length%4===3)D--;else if(u.length%4===2)D-=2;else if(u[u.length-1]==="="){if(D--,u[u.length-2]==="=")D--}let F=new ArrayBuffer(D),G=new Uint8Array(F);for(let w=0;w<A;w+=4){let N=Y2[u.charCodeAt(w)],J=Y2[u.charCodeAt(w+1)],$=Y2[u.charCodeAt(w+2)],X=Y2[u.charCodeAt(w+3)];G[B++]=N<<2|J>>4,G[B++]=(J&15)<<4|$>>2,G[B++]=($&3)<<6|X&63}return F}function B2(u){u=u||"utf8";let D;try{D=new TextDecoder(u)}catch(A){D=new TextDecoder("windows-1252")}return D}async function o(u){if("arrayBuffer"in u)return await u.arrayBuffer();let D=new FileReader;return new Promise((A,B)=>{D.onload=function(F){A(F.target.result)},D.onerror=function(F){B(D.error)},D.readAsArrayBuffer(u)})}function j0(u){if(u>=48&&u<=57||u>=97&&u<=102||u>=65&&u<=70)return String.fromCharCode(u);return!1}function hE(u,D,A){let B=u.indexOf("*");if(B>=0)u=u.substr(0,B);D=D.toUpperCase();let F;if(D==="Q"){A=A.replace(/=\s+([0-9a-fA-F])/g,"=$1").replace(/[_\s]/g," ");let G=s.encode(A),w=[];for(let J=0,$=G.length;J<$;J++){let X=G[J];if(J<=$-2&&X===61){let z=j0(G[J+1]),Z=j0(G[J+2]);if(z&&Z){let Y=parseInt(z+Z,16);w.push(Y),J+=2;continue}}w.push(X)}F=new ArrayBuffer(w.length);let N=new DataView(F);for(let J=0,$=w.length;J<$;J++)N.setUint8(J,w[J])}else if(D==="B")F=R2(A.replace(/[^a-zA-Z0-9\+\/=]+/g,""));else F=s.encode(A);return B2(u).decode(F)}function D2(u){let D=!0,A=!1;while(!A){let B=(u||"").toString().replace(/(=\?([^?]+)\?[Bb]\?([^?]*)\?=)\s*(?==\?([^?]+)\?[Bb]\?[^?]*\?=)/g,(F,G,w,N,J)=>{if(!D)return F;if(w===J&&N.length%4===0&&!/=$/.test(N))return G+"__\x00JOIN\x00__";return F}).replace(/(=\?([^?]+)\?[Qq]\?[^?]*\?=)\s*(?==\?([^?]+)\?[Qq]\?[^?]*\?=)/g,(F,G,w,N)=>{if(!D)return F;if(w===N)return G+"__\x00JOIN\x00__";return F}).replace(/(\?=)?__\x00JOIN\x00__(=\?([^?]+)\?[QqBb]\?)?/g,"").replace(/(=\?[^?]+\?[QqBb]\?[^?]*\?=)\s+(?==\?[^?]+\?[QqBb]\?[^?]*\?=)/g,"$1").replace(/=\?([\w_\-*]+)\?([QqBb])\?([^?]*)\?=/g,(F,G,w,N)=>hE(G,w,N));if(D&&B.indexOf("\uFFFD")>=0)D=!1;else return B}}function OE(u,D){D=D||"utf-8";let A=[];for(let G=0;G<u.length;G++){let w=u.charAt(G);if(w==="%"&&/^[a-f0-9]{2}/i.test(u.substr(G+1,2))){let N=u.substr(G+1,2);G+=2,A.push(parseInt(N,16))}else if(w.charCodeAt(0)>126){w=s.encode(w);for(let N=0;N<w.length;N++)A.push(w[N])}else A.push(w.charCodeAt(0))}let B=new ArrayBuffer(A.length),F=new DataView(B);for(let G=0,w=A.length;G<w;G++)F.setUint8(G,A[G]);return B2(D).decode(B)}function f0(u){let D=new Map;Object.keys(u.params).forEach((A)=>{let B=A.match(/\*((\d+)\*?)?$/);if(!B)return;let F=A.substr(0,B.index).toLowerCase(),G=Number(B[2])||0,w;if(!D.has(F))w={charset:!1,values:[]},D.set(F,w);else w=D.get(F);let N=u.params[A];if(G===0&&B[0].charAt(B[0].length-1)==="*"&&(B=N.match(/^([^']*)'[^']*'(.*)$/)))w.charset=B[1]||"utf-8",N=B[2];w.values.push({nr:G,value:N}),delete u.params[A]}),D.forEach((A,B)=>{u.params[B]=OE(A.values.sort((F,G)=>F.nr-G.nr).map((F)=>F.value).join(""),A.charset)})}class L2{constructor(){this.chunks=[]}update(u){this.chunks.push(u),this.chunks.push(`
|
|
4
4
|
`)}finalize(){return o(new Blob(this.chunks,{type:"application/octet-stream"}))}}class v2{constructor(u){u=u||{},this.decoder=u.decoder||new TextDecoder,this.maxChunkSize=102400,this.chunks=[],this.remainder=""}update(u){let D=this.decoder.decode(u);if(D=D.replace(/[^a-zA-Z0-9+\/]+/g,""),this.remainder+=D,this.remainder.length>=this.maxChunkSize){let A=Math.floor(this.remainder.length/4)*4,B;if(A===this.remainder.length)B=this.remainder,this.remainder="";else B=this.remainder.substr(0,A),this.remainder=this.remainder.substr(A);if(B.length)this.chunks.push(R2(B))}}finalize(){if(this.remainder&&!/^=+$/.test(this.remainder))this.chunks.push(R2(this.remainder));return o(new Blob(this.chunks,{type:"application/octet-stream"}))}}var l0=/^=[a-f0-9]{2}$/i,qE=/(?==[a-f0-9]{2})/i,kE=/=\r?\n/g,IE=/=[a-fA-F0-9]?$/;class M2{constructor(u){u=u||{},this.decoder=u.decoder||new TextDecoder,this.maxChunkSize=102400,this.remainder="",this.chunks=[]}decodeQPBytes(u){let D=new ArrayBuffer(u.length),A=new DataView(D);for(let B=0,F=u.length;B<F;B++)A.setUint8(B,parseInt(u[B],16));return D}decodeChunks(u){u=u.replace(kE,"");let D=u.split(qE),A=[];for(let B of D){if(B.charAt(0)!=="="){if(A.length)this.chunks.push(this.decodeQPBytes(A)),A=[];this.chunks.push(B);continue}if(B.length===3){if(l0.test(B))A.push(B.substr(1));else{if(A.length)this.chunks.push(this.decodeQPBytes(A)),A=[];this.chunks.push(B)}continue}if(B.length>3){let F=B.substr(0,3);if(l0.test(F))A.push(B.substr(1,2)),this.chunks.push(this.decodeQPBytes(A)),A=[],B=B.substr(3),this.chunks.push(B);else{if(A.length)this.chunks.push(this.decodeQPBytes(A)),A=[];this.chunks.push(B)}}}if(A.length)this.chunks.push(this.decodeQPBytes(A))}update(u){let D=this.decoder.decode(u)+`
|
|
5
5
|
`;if(D=this.remainder+D,D.length<this.maxChunkSize){this.remainder=D;return}this.remainder="";let A=D.match(IE);if(A){if(A.index===0){this.remainder=D;return}this.remainder=D.substr(A.index),D=D.substr(0,A.index)}this.decodeChunks(D)}finalize(){if(this.remainder.length)this.decodeChunks(this.remainder),this.remainder="";return o(new Blob(this.chunks,{type:"application/octet-stream"}))}}var xE=B2();class Q2{constructor(u){if(this.options=u||{},this.postalMime=this.options.postalMime,this.root=!!this.options.parentNode,this.childNodes=[],this.options.parentNode){if(this.parentNode=this.options.parentNode,this.depth=this.parentNode.depth+1,this.depth>this.options.maxNestingDepth)throw Error(`Maximum MIME nesting depth of ${this.options.maxNestingDepth} levels exceeded`);this.options.parentNode.childNodes.push(this)}else this.depth=0;this.state="header",this.headerLines=[],this.headerSize=0;let A=(this.options.parentMultipartType||null)==="digest"?"message/rfc822":"text/plain";this.contentType={value:A,default:!0},this.contentTransferEncoding={value:"8bit"},this.contentDisposition={value:""},this.headers=[],this.contentDecoder=!1}setupContentDecoder(u){if(/base64/i.test(u))this.contentDecoder=new v2;else if(/quoted-printable/i.test(u))this.contentDecoder=new M2({decoder:B2(this.contentType.parsed.params.charset)});else this.contentDecoder=new L2}async finalize(){if(this.state==="finished")return;if(this.state==="header")this.processHeaders();let u=this.postalMime.boundaries;for(let D=u.length-1;D>=0;D--)if(u[D].node===this){u.splice(D,1);break}await this.finalizeChildNodes(),this.content=this.contentDecoder?await this.contentDecoder.finalize():null,this.state="finished"}async finalizeChildNodes(){for(let u of this.childNodes)await u.finalize()}stripComments(u){let D="",A=0,B=!1,F=!1;for(let G=0;G<u.length;G++){let w=u.charAt(G);if(B){if(A===0)D+=w;B=!1;continue}if(w==="\\"){if(B=!0,A===0)D+=w;continue}if(w==='"'&&A===0){F=!F,D+=w;continue}if(!F){if(w==="("){A++;continue}if(w===")"&&A>0){A--;continue}}if(A===0)D+=w}return D}parseStructuredHeader(u){u=this.stripComments(u);let D={value:!1,params:{}},A=!1,B="",F="value",G=!1,w=!1,N;for(let J=0,$=u.length;J<$;J++)switch(N=u.charAt(J),F){case"key":if(N==="="){A=B.trim().toLowerCase(),F="value",B="";break}B+=N;break;case"value":if(w)B+=N;else if(N==="\\"){w=!0;continue}else if(G&&N===G)G=!1;else if(!G&&N==='"')G=N;else if(!G&&N===";"){if(A===!1)D.value=B.trim();else D.params[A]=B.trim();F="key",B=""}else B+=N;w=!1;break}if(B=B.trim(),F==="value")if(A===!1)D.value=B;else D.params[A]=B;else if(B)D.params[B.toLowerCase()]="";if(D.value)D.value=D.value.toLowerCase();return f0(D),D}decodeFlowedText(u,D){return u.split(/\r?\n/).reduce((A,B)=>{if(A.endsWith(" ")&&A!=="-- "&&!A.endsWith(`
|
|
@@ -30,4 +30,4 @@ ${F}
|
|
|
30
30
|
`);$.content=s.encode(X);break}default:$.content=G.content}this.attachments.push($)}}else if(G.contentType.multipart==="alternative")w=G;else if(G.contentType.multipart==="related")N=G;for(let J of G.childNodes)await F(J,w,N)};await F(this.root,!1,!1),A.forEach((G)=>{D.forEach((w)=>{if(!u[w])u[w]=[];if(G[w])G[w].forEach((N)=>{switch(N.type){case"text":u[w].push(N.value);break;case"subMessage":switch(w){case"html":u[w].push(n2(N.value));break;case"plain":u[w].push(p2(N.value));break}break}});else{let N;switch(w){case"html":N="plain";break;case"plain":N="html";break}(G[N]||[]).forEach((J)=>{switch(J.type){case"text":switch(w){case"html":u[w].push(d0(J.value));break;case"plain":u[w].push(r0(J.value));break}break;case"subMessage":switch(w){case"html":u[w].push(n2(J.value));break;case"plain":u[w].push(p2(J.value));break}break}})}})}),Object.keys(u).forEach((G)=>{u[G]=u[G].join(`
|
|
31
31
|
`)}),this.textContent=u}isInlineTextNode(u){if(u.contentDisposition?.parsed?.value==="attachment")return!1;switch(u.contentType.parsed?.value){case"text/html":case"text/plain":return!0;case"text/calendar":case"text/csv":default:return!1}}isInlineMessageRfc822(u){if(u.contentType.parsed?.value!=="message/rfc822")return!1;return(u.contentDisposition?.parsed?.value||(this.options.rfc822Attachments?"attachment":"inline"))==="inline"}forceRfc822Attachments(){if(this.options.forceRfc822Attachments)return!0;let u=!1,D=(A)=>{if(!A.contentType.multipart){if(A.contentType.parsed&&["message/delivery-status","message/feedback-report"].includes(A.contentType.parsed.value))u=!0}for(let B of A.childNodes)D(B)};return D(this.root),u}async resolveStream(u){let D=0,A=[],B=u.getReader();while(!0){let{done:w,value:N}=await B.read();if(w)break;A.push(N),D+=N.length}let F=new Uint8Array(D),G=0;for(let w of A)F.set(w,G),G+=w.length;return F}async parse(u){if(this.started)throw Error("Can not reuse parser, create a new PostalMime object");if(this.started=!0,u&&typeof u.getReader==="function")u=await this.resolveStream(u);if(u=u||new ArrayBuffer(0),typeof u==="string")u=s.encode(u);if(u instanceof Blob||Object.prototype.toString.call(u)==="[object Blob]")u=await o(u);if(u.buffer instanceof ArrayBuffer)u=new Uint8Array(u).buffer;this.buf=u,this.av=new Uint8Array(u),this.readPos=0;while(this.readPos<this.av.length){let B=this.readLine();await this.processLine(B.bytes,B.done)}await this.processNodeTree();let D={headers:this.root.headers.map((B)=>({key:B.key,originalKey:B.originalKey,value:B.value})).reverse()};for(let B of["from","sender"]){let F=this.root.headers.find((G)=>G.key===B);if(F&&F.value){let G=S2(F.value);if(G&&G.length)D[B]=G[0]}}for(let B of["delivered-to","return-path"]){let F=this.root.headers.find((G)=>G.key===B);if(F&&F.value){let G=S2(F.value);if(G&&G.length&&G[0].address){let w=o2(B);D[w]=G[0].address}}}for(let B of["to","cc","bcc","reply-to"]){let F=this.root.headers.filter((w)=>w.key===B),G=[];if(F.filter((w)=>w&&w.value).map((w)=>S2(w.value)).forEach((w)=>G=G.concat(w||[])),G&&G.length){let w=o2(B);D[w]=G}}for(let B of["subject","message-id","in-reply-to","references"]){let F=this.root.headers.find((G)=>G.key===B);if(F&&F.value){let G=o2(B);D[G]=D2(F.value)}}let A=this.root.headers.find((B)=>B.key==="date");if(A){let B=new Date(A.value);if(B.toString()==="Invalid Date")B=A.value;else B=B.toISOString();D.date=B}if(this.textContent?.html)D.html=this.textContent.html;if(this.textContent?.plain)D.text=this.textContent.plain;switch(D.attachments=this.attachments,D.headerLines=(this.root.rawHeaderLines||[]).slice().reverse(),this.attachmentEncoding){case"arraybuffer":break;case"base64":for(let F of D.attachments||[])if(F?.content)F.content=p0(F.content),F.encoding="base64";break;case"utf8":let B=new TextDecoder("utf8");for(let F of D.attachments||[])if(F?.content)F.content=B.decode(F.content),F.encoding="utf8";break;default:throw Error("Unknown attachment encoding")}return D}}var vE=cJ(WE(),1),iJ="6.12.3";function x(u){let D=new URLSearchParams;if(u.limit!==void 0)D.set("limit",u.limit.toString());if("after"in u&&u.after!==void 0)D.set("after",u.after);if("before"in u&&u.before!==void 0)D.set("before",u.before);return D.toString()}var aJ=class{constructor(u){this.resend=u}async create(u,D={}){return await this.resend.post("/api-keys",u,D)}async list(u={}){let D=x(u),A=D?`/api-keys?${D}`:"/api-keys";return await this.resend.get(A)}async remove(u){return await this.resend.delete(`/api-keys/${u}`)}},pJ=class{constructor(u){this.resend=u}async get(u){return await this.resend.get(`/automations/${u.automationId}/runs/${u.runId}`)}async list(u){let D=x(u),A=new URLSearchParams(D);if(u.status){let G=Array.isArray(u.status)?u.status.join(","):u.status;A.set("status",G)}let B=A.toString(),F=B?`/automations/${u.automationId}/runs?${B}`:`/automations/${u.automationId}/runs`;return await this.resend.get(F)}};function ME(u){switch(u.type){case"trigger":return{key:u.key,type:u.type,config:{event_name:u.config.eventName}};case"delay":return{key:u.key,type:u.type,config:u.config};case"send_email":return{key:u.key,type:u.type,config:{template:u.config.template,subject:u.config.subject,from:u.config.from,reply_to:u.config.replyTo}};case"wait_for_event":return{key:u.key,type:u.type,config:{event_name:u.config.eventName,timeout:u.config.timeout,filter_rule:u.config.filterRule}};case"condition":return{key:u.key,type:u.type,config:u.config};case"contact_update":return{key:u.key,type:u.type,config:{first_name:u.config.firstName,last_name:u.config.lastName,unsubscribed:u.config.unsubscribed,properties:u.config.properties}};case"contact_delete":return{key:u.key,type:u.type,config:u.config};case"add_to_segment":return{key:u.key,type:u.type,config:{segment_id:u.config.segmentId}}}}function SE(u){return{from:u.from,to:u.to,type:u.type}}function nJ(u){return{name:u.name,status:u.status,steps:u.steps.map(ME),connections:u.connections.map(SE)}}function sJ(u){return{event:u.event,contact_id:u.contactId,email:u.email,payload:u.payload}}var oJ=class{constructor(u){this.resend=u,this.runs=new pJ(this.resend)}async create(u){return await this.resend.post("/automations",nJ(u))}async list(u={}){let D=[x(u)];if(u.status)D.push(`status=${encodeURIComponent(u.status)}`);let A=D.filter(Boolean).join("&"),B=A?`/automations?${A}`:"/automations";return await this.resend.get(B)}async get(u){return await this.resend.get(`/automations/${u}`)}async remove(u){return await this.resend.delete(`/automations/${u}`)}async update(u,D){let A={};if(D.name!==void 0)A.name=D.name;if(D.status!==void 0)A.status=D.status;if(D.steps!==void 0)A.steps=D.steps.map(ME);if(D.connections!==void 0)A.connections=D.connections.map(SE);return await this.resend.patch(`/automations/${u}`,A)}async stop(u){return await this.resend.post(`/automations/${u}/stop`)}};function tJ(u){return u?.map((D)=>({content:D.content,filename:D.filename,path:D.path,content_type:D.contentType,content_id:D.contentId}))}function TE(u){return{attachments:tJ(u.attachments),bcc:u.bcc,cc:u.cc,from:u.from,headers:u.headers,html:u.html,reply_to:u.replyTo,scheduled_at:u.scheduledAt,subject:u.subject,tags:u.tags,text:u.text,to:u.to,template:u.template?{id:u.template.id,variables:u.template.variables}:void 0,topic_id:u.topicId}}async function r2(u){let D;try{({render:D}=await import("@react-email/render"))}catch{throw Error("Failed to render React component. Make sure to install `@react-email/render` or `@react-email/components`.")}return D(u)}var eJ=class{constructor(u){this.resend=u}async send(u,D){return this.create(u,D)}async create(u,D){let A=[];for(let B of u){if(B.react)B.html=await r2(B.react),B.react=void 0;A.push(TE(B))}return await this.resend.post("/emails/batch",A,{...D,headers:{"x-batch-validation":D?.batchValidation??"strict",...D?.headers}})}},uZ=class{constructor(u){this.resend=u}async create(u,D={}){if(u.react)u.html=await r2(u.react);return await this.resend.post("/broadcasts",{name:u.name,segment_id:u.segmentId,audience_id:u.audienceId,preview_text:u.previewText,from:u.from,html:u.html,reply_to:u.replyTo,subject:u.subject,text:u.text,topic_id:u.topicId,send:u.send,scheduled_at:u.scheduledAt},D)}async send(u,D){return await this.resend.post(`/broadcasts/${u}/send`,{scheduled_at:D?.scheduledAt})}async list(u={}){let D=x(u),A=D?`/broadcasts?${D}`:"/broadcasts";return await this.resend.get(A)}async get(u){return await this.resend.get(`/broadcasts/${u}`)}async remove(u){return await this.resend.delete(`/broadcasts/${u}`)}async update(u,D){if(D.react)D.html=await r2(D.react);return await this.resend.patch(`/broadcasts/${u}`,{name:D.name,segment_id:D.segmentId,audience_id:D.audienceId,from:D.from,html:D.html,text:D.text,subject:D.subject,reply_to:D.replyTo,preview_text:D.previewText,topic_id:D.topicId})}};function KE(u){return{id:u.id,key:u.key,createdAt:u.created_at,type:u.type,fallbackValue:u.fallback_value}}function HE(u){if("key"in u)return{key:u.key,type:u.type,fallback_value:u.fallbackValue};return{fallback_value:u.fallbackValue}}var DZ=class{constructor(u){this.resend=u}async create(u){let D=HE(u);return await this.resend.post("/contact-properties",D)}async list(u={}){let D=x(u),A=D?`/contact-properties?${D}`:"/contact-properties",B=await this.resend.get(A);if(B.data)return{data:{...B.data,data:B.data.data.map((F)=>KE(F))},headers:B.headers,error:null};return B}async get(u){if(!u)return{data:null,headers:null,error:{message:"Missing `id` field.",statusCode:null,name:"missing_required_field"}};let D=await this.resend.get(`/contact-properties/${u}`);if(D.data)return{data:{object:"contact_property",...KE(D.data)},headers:D.headers,error:null};return D}async update(u){if(!u.id)return{data:null,headers:null,error:{message:"Missing `id` field.",statusCode:null,name:"missing_required_field"}};let D=HE(u);return await this.resend.patch(`/contact-properties/${u.id}`,D)}async remove(u){if(!u)return{data:null,headers:null,error:{message:"Missing `id` field.",statusCode:null,name:"missing_required_field"}};return await this.resend.delete(`/contact-properties/${u}`)}},AZ=class{constructor(u){this.resend=u}async list(u){if(!u.contactId&&!u.email)return{data:null,headers:null,error:{message:"Missing `id` or `email` field.",statusCode:null,name:"missing_required_field"}};let D=u.email?u.email:u.contactId,A=x(u),B=A?`/contacts/${D}/segments?${A}`:`/contacts/${D}/segments`;return await this.resend.get(B)}async add(u){if(!u.contactId&&!u.email)return{data:null,headers:null,error:{message:"Missing `id` or `email` field.",statusCode:null,name:"missing_required_field"}};let D=u.email?u.email:u.contactId;return this.resend.post(`/contacts/${D}/segments/${u.segmentId}`)}async remove(u){if(!u.contactId&&!u.email)return{data:null,headers:null,error:{message:"Missing `id` or `email` field.",statusCode:null,name:"missing_required_field"}};let D=u.email?u.email:u.contactId;return this.resend.delete(`/contacts/${D}/segments/${u.segmentId}`)}},BZ=class{constructor(u){this.resend=u}async update(u){if(!u.id&&!u.email)return{data:null,headers:null,error:{message:"Missing `id` or `email` field.",statusCode:null,name:"missing_required_field"}};let D=u.email?u.email:u.id;return this.resend.patch(`/contacts/${D}/topics`,u.topics)}async list(u){if(!u.id&&!u.email)return{data:null,headers:null,error:{message:"Missing `id` or `email` field.",statusCode:null,name:"missing_required_field"}};let D=u.email?u.email:u.id,A=x(u),B=A?`/contacts/${D}/topics?${A}`:`/contacts/${D}/topics`;return this.resend.get(B)}},FZ=class{constructor(u){this.resend=u,this.topics=new BZ(this.resend),this.segments=new AZ(this.resend)}async create(u,D={}){if("audienceId"in u){if("segments"in u||"topics"in u)return{data:null,headers:null,error:{message:"`audienceId` is deprecated, and cannot be used together with `segments` or `topics`. Use `segments` instead to add one or more segments to the new contact.",statusCode:null,name:"invalid_parameter"}};return await this.resend.post(`/audiences/${u.audienceId}/contacts`,{unsubscribed:u.unsubscribed,email:u.email,first_name:u.firstName,last_name:u.lastName,properties:u.properties},D)}return await this.resend.post("/contacts",{unsubscribed:u.unsubscribed,email:u.email,first_name:u.firstName,last_name:u.lastName,properties:u.properties,segments:u.segments,topics:u.topics},D)}async list(u={}){let D=u.segmentId??u.audienceId;if(!D){let F=x(u),G=F?`/contacts?${F}`:"/contacts";return await this.resend.get(G)}let A=x(u),B=A?`/segments/${D}/contacts?${A}`:`/segments/${D}/contacts`;return await this.resend.get(B)}async get(u){if(typeof u==="string")return this.resend.get(`/contacts/${u}`);if(!u.id&&!u.email)return{data:null,headers:null,error:{message:"Missing `id` or `email` field.",statusCode:null,name:"missing_required_field"}};if(!u.audienceId)return this.resend.get(`/contacts/${u?.email?u?.email:u?.id}`);return this.resend.get(`/audiences/${u.audienceId}/contacts/${u?.email?u?.email:u?.id}`)}async update(u){if(!u.id&&!u.email)return{data:null,headers:null,error:{message:"Missing `id` or `email` field.",statusCode:null,name:"missing_required_field"}};if(!u.audienceId)return await this.resend.patch(`/contacts/${u?.email?u?.email:u?.id}`,{unsubscribed:u.unsubscribed,first_name:u.firstName,last_name:u.lastName,properties:u.properties});return await this.resend.patch(`/audiences/${u.audienceId}/contacts/${u?.email?u?.email:u?.id}`,{unsubscribed:u.unsubscribed,first_name:u.firstName,last_name:u.lastName,properties:u.properties})}async remove(u){if(typeof u==="string")return this.resend.delete(`/contacts/${u}`);if(!u.id&&!u.email)return{data:null,headers:null,error:{message:"Missing `id` or `email` field.",statusCode:null,name:"missing_required_field"}};if(!u.audienceId)return this.resend.delete(`/contacts/${u?.email?u?.email:u?.id}`);return this.resend.delete(`/audiences/${u.audienceId}/contacts/${u?.email?u?.email:u?.id}`)}};function wZ(u){return{name:u.name,region:u.region,custom_return_path:u.customReturnPath,capabilities:u.capabilities,open_tracking:u.openTracking,click_tracking:u.clickTracking,tls:u.tls,tracking_subdomain:u.trackingSubdomain}}var EZ=class{constructor(u){this.resend=u}async create(u,D={}){return await this.resend.post("/domains",wZ(u),D)}async list(u={}){let D=x(u),A=D?`/domains?${D}`:"/domains";return await this.resend.get(A)}async get(u){return await this.resend.get(`/domains/${u}`)}async update(u){return await this.resend.patch(`/domains/${u.id}`,{click_tracking:u.clickTracking,open_tracking:u.openTracking,tls:u.tls,capabilities:u.capabilities,tracking_subdomain:u.trackingSubdomain})}async remove(u){return await this.resend.delete(`/domains/${u}`)}async verify(u){return await this.resend.post(`/domains/${u}/verify`)}},GZ=class{constructor(u){this.resend=u}async get(u){let{emailId:D,id:A}=u;return await this.resend.get(`/emails/${D}/attachments/${A}`)}async list(u){let{emailId:D}=u,A=x(u),B=A?`/emails/${D}/attachments?${A}`:`/emails/${D}/attachments`;return await this.resend.get(B)}},NZ=class{constructor(u){this.resend=u}async get(u){let{emailId:D,id:A}=u;return await this.resend.get(`/emails/receiving/${D}/attachments/${A}`)}async list(u){let{emailId:D}=u,A=x(u),B=A?`/emails/receiving/${D}/attachments?${A}`:`/emails/receiving/${D}/attachments`;return await this.resend.get(B)}},JZ=class{constructor(u){this.resend=u,this.attachments=new NZ(u)}async get(u){return await this.resend.get(`/emails/receiving/${u}`)}async list(u={}){let D=x(u),A=D?`/emails/receiving?${D}`:"/emails/receiving";return await this.resend.get(A)}async forward(u){let{emailId:D,to:A,from:B}=u,F=u.passthrough!==!1,G=await this.get(D);if(G.error)return{data:null,error:G.error,headers:G.headers};let w=G.data,N=w.subject||"(no subject)";if(F)return this.forwardPassthrough(w,{to:A,from:B,subject:N});let J=N.startsWith("Fwd:")?N:`Fwd: ${N}`;return this.forwardWrapped(w,{to:A,from:B,subject:J,text:"text"in u?u.text:void 0,html:"html"in u?u.html:void 0})}async forwardPassthrough(u,D){let{to:A,from:B,subject:F}=D;if(!u.raw?.download_url)return{data:null,error:{name:"validation_error",message:"Raw email content is not available for this email",statusCode:400},headers:null};let G=await fetch(u.raw.download_url);if(!G.ok)return{data:null,error:{name:"application_error",message:"Failed to download raw email content",statusCode:G.status},headers:null};let w=await G.text(),N=await F2.parse(w,{attachmentEncoding:"base64"}),J=N.attachments.map(($)=>{let X=$.contentId?$.contentId.replace(/^<|>$/g,""):void 0;return{filename:$.filename,content:$.content.toString(),content_type:$.mimeType,content_id:X||void 0}});return await this.resend.post("/emails",{from:B,to:A,subject:F,text:N.text||void 0,html:N.html||void 0,attachments:J.length>0?J:void 0})}async forwardWrapped(u,D){let{to:A,from:B,subject:F,text:G,html:w}=D;if(!u.raw?.download_url)return{data:null,error:{name:"validation_error",message:"Raw email content is not available for this email",statusCode:400},headers:null};let N=await fetch(u.raw.download_url);if(!N.ok)return{data:null,error:{name:"application_error",message:"Failed to download raw email content",statusCode:N.status},headers:null};let J=await N.text();return await this.resend.post("/emails",{from:B,to:A,subject:F,text:G,html:w,attachments:[{filename:"forwarded_message.eml",content:Buffer.from(J).toString("base64"),content_type:"message/rfc822"}]})}},ZZ=class{constructor(u){this.resend=u,this.attachments=new GZ(u),this.receiving=new JZ(u)}async send(u,D={}){return this.create(u,D)}async create(u,D={}){if(u.react)u.html=await r2(u.react);return await this.resend.post("/emails",TE(u),D)}async get(u){return await this.resend.get(`/emails/${u}`)}async list(u={}){let D=x(u),A=D?`/emails?${D}`:"/emails";return await this.resend.get(A)}async update(u){return await this.resend.patch(`/emails/${u.id}`,{scheduled_at:u.scheduledAt})}async cancel(u){return await this.resend.post(`/emails/${u}/cancel`)}},zZ=class{constructor(u){this.resend=u}async send(u){return await this.resend.post("/events/send",sJ(u))}async create(u){return await this.resend.post("/events",u)}async get(u){return await this.resend.get(`/events/${encodeURIComponent(u)}`)}async list(u={}){let D=x(u),A=D?`/events?${D}`:"/events";return await this.resend.get(A)}async update(u,D){return await this.resend.patch(`/events/${encodeURIComponent(u)}`,D)}async remove(u){return await this.resend.delete(`/events/${encodeURIComponent(u)}`)}},$Z=class{constructor(u){this.resend=u}async list(u={}){let D=x(u),A=D?`/logs?${D}`:"/logs";return await this.resend.get(A)}async get(u){return await this.resend.get(`/logs/${u}`)}},XZ=class{constructor(u){this.resend=u}async create(u,D={}){return await this.resend.post("/segments",u,D)}async list(u={}){let D=x(u),A=D?`/segments?${D}`:"/segments";return await this.resend.get(A)}async get(u){return await this.resend.get(`/segments/${u}`)}async remove(u){return await this.resend.delete(`/segments/${u}`)}};function YZ(u={}){let D=new URLSearchParams;if(u.before)D.set("before",u.before);if(u.after)D.set("after",u.after);if(u.limit)D.set("limit",u.limit.toString());return D.size>0?`?${D.toString()}`:""}function QZ(u){return u?.map((D)=>({key:D.key,type:D.type,fallback_value:D.fallbackValue}))}function CE(u){return{name:"name"in u?u.name:void 0,subject:u.subject,html:u.html,text:u.text,alias:u.alias,from:u.from,reply_to:u.replyTo,variables:QZ(u.variables)}}var UE=class{constructor(u,D){this.promise=u,this.publishFn=D}then(u,D){return this.promise.then(u,D)}async publish(){let{data:u,error:D}=await this.promise;if(D)return{data:null,headers:null,error:D};return this.publishFn(u.id)}},VZ=class{constructor(u){this.resend=u}create(u){return new UE(this.performCreate(u),this.publish.bind(this))}async performCreate(u){if(u.react){if(!this.renderAsync)try{let{renderAsync:D}=await import("@react-email/render");this.renderAsync=D}catch{throw Error("Failed to render React component. Make sure to install `@react-email/render`")}u.html=await this.renderAsync(u.react)}return this.resend.post("/templates",CE(u))}async remove(u){return await this.resend.delete(`/templates/${u}`)}async get(u){return await this.resend.get(`/templates/${u}`)}async list(u={}){return this.resend.get(`/templates${YZ(u)}`)}duplicate(u){return new UE(this.resend.post(`/templates/${u}/duplicate`),this.publish.bind(this))}async publish(u){return await this.resend.post(`/templates/${u}/publish`)}async update(u,D){return await this.resend.patch(`/templates/${u}`,CE(D))}},WZ=class{constructor(u){this.resend=u}async create(u){let{defaultSubscription:D,...A}=u;return await this.resend.post("/topics",{...A,default_subscription:D})}async list(){return await this.resend.get("/topics")}async get(u){if(!u)return{data:null,headers:null,error:{message:"Missing `id` field.",statusCode:null,name:"missing_required_field"}};return await this.resend.get(`/topics/${u}`)}async update(u){if(!u.id)return{data:null,headers:null,error:{message:"Missing `id` field.",statusCode:null,name:"missing_required_field"}};return await this.resend.patch(`/topics/${u.id}`,u)}async remove(u){if(!u)return{data:null,headers:null,error:{message:"Missing `id` field.",statusCode:null,name:"missing_required_field"}};return await this.resend.delete(`/topics/${u}`)}},KZ=class{constructor(u){this.resend=u}async create(u,D={}){return await this.resend.post("/webhooks",u,D)}async get(u){return await this.resend.get(`/webhooks/${u}`)}async list(u={}){let D=x(u),A=D?`/webhooks?${D}`:"/webhooks";return await this.resend.get(A)}async update(u,D){return await this.resend.patch(`/webhooks/${u}`,D)}async remove(u){return await this.resend.delete(`/webhooks/${u}`)}verify(u){return new vE.Webhook(u.webhookSecret).verify(u.payload,{"svix-id":u.headers.id,"svix-timestamp":u.headers.timestamp,"svix-signature":u.headers.signature})}},PE="https://api.resend.com",RE=`resend-node:${iJ}`,HZ=typeof process<"u"&&process.env?process.env.RESEND_BASE_URL||PE:PE,CZ=typeof process<"u"&&process.env?process.env.RESEND_USER_AGENT||RE:RE,EQ=class{constructor(u){if(this.key=u,this.segments=new XZ(this),this.apiKeys=new aJ(this),this.audiences=this.segments,this.automations=new oJ(this),this.batch=new eJ(this),this.broadcasts=new uZ(this),this.contactProperties=new DZ(this),this.contacts=new FZ(this),this.domains=new EZ(this),this.emails=new ZZ(this),this.events=new zZ(this),this.logs=new $Z(this),this.templates=new VZ(this),this.topics=new WZ(this),this.webhooks=new KZ(this),!u){if(typeof process<"u"&&process.env)this.key=process.env.RESEND_API_KEY;if(!this.key)throw Error('Missing API key. Pass it to the constructor `new Resend("re_123")`')}this.headers=new Headers({Authorization:`Bearer ${this.key}`,"User-Agent":CZ,"Content-Type":"application/json"})}async fetchRequest(u,D={}){try{let A=await fetch(`${HZ}${u}`,D);if(!A.ok)try{let B=await A.text();return{data:null,error:JSON.parse(B),headers:Object.fromEntries(A.headers.entries())}}catch(B){if(B instanceof SyntaxError)return{data:null,error:{name:"application_error",statusCode:A.status,message:"Internal server error. We are unable to process your request right now, please try again later."},headers:Object.fromEntries(A.headers.entries())};let F={message:A.statusText,statusCode:A.status,name:"application_error"};if(B instanceof Error)return{data:null,error:{...F,message:B.message},headers:Object.fromEntries(A.headers.entries())};return{data:null,error:F,headers:Object.fromEntries(A.headers.entries())}}return{data:await A.json(),error:null,headers:Object.fromEntries(A.headers.entries())}}catch{return{data:null,error:{name:"application_error",statusCode:null,message:"Unable to fetch data. The request could not be resolved."},headers:null}}}async post(u,D,A={}){let B=new Headers(this.headers);if(A.headers)for(let[G,w]of new Headers(A.headers).entries())B.set(G,w);if(A.idempotencyKey)B.set("Idempotency-Key",A.idempotencyKey);let F={method:"POST",body:JSON.stringify(D),...A,headers:B};return this.fetchRequest(u,F)}async get(u,D={}){let A=new Headers(this.headers);if(D.headers)for(let[F,G]of new Headers(D.headers).entries())A.set(F,G);let B={method:"GET",...D,headers:A};return this.fetchRequest(u,B)}async put(u,D,A={}){let B=new Headers(this.headers);if(A.headers)for(let[G,w]of new Headers(A.headers).entries())B.set(G,w);let F={method:"PUT",body:JSON.stringify(D),...A,headers:B};return this.fetchRequest(u,F)}async patch(u,D,A={}){let B=new Headers(this.headers);if(A.headers)for(let[G,w]of new Headers(A.headers).entries())B.set(G,w);let F={method:"PATCH",body:JSON.stringify(D),...A,headers:B};return this.fetchRequest(u,F)}async delete(u,D){let A={method:"DELETE",body:JSON.stringify(D),headers:this.headers};return this.fetchRequest(u,A)}};export{EQ as Resend};
|
|
32
32
|
|
|
33
|
-
//# debugId=
|
|
33
|
+
//# debugId=71DF7DDF76912E7464756E2164756E21
|