gemi 0.75.0 → 0.77.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/ai/AgentController.d.ts +47 -0
- package/dist/ai/AgentController.d.ts.map +1 -1
- package/dist/ai/index.js +10 -10
- package/dist/ai/index.js.map +7 -5
- package/dist/ai/providers/request.d.ts.map +1 -1
- package/dist/ai/store/TurnJournal.d.ts +97 -0
- package/dist/ai/store/TurnJournal.d.ts.map +1 -0
- package/dist/ai/types.d.ts +29 -3
- package/dist/ai/types.d.ts.map +1 -1
- 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-fy2f8sq8.js → chunk-0472aphj.js} +2 -2
- package/dist/{chunk-fy2f8sq8.js.map → chunk-0472aphj.js.map} +1 -1
- package/dist/{chunk-bm97dwbp.js → chunk-0da5t7vs.js} +2 -2
- package/dist/{chunk-bm97dwbp.js.map → chunk-0da5t7vs.js.map} +1 -1
- package/dist/{chunk-17q5kheg.js → chunk-0pqsp84p.js} +2 -2
- package/dist/{chunk-17q5kheg.js.map → chunk-0pqsp84p.js.map} +1 -1
- package/dist/{chunk-8ef9n5pk.js → chunk-1712rv0r.js} +2 -2
- package/dist/{chunk-8ef9n5pk.js.map → chunk-1712rv0r.js.map} +1 -1
- package/dist/{chunk-9gn3x603.js → chunk-1ap69pez.js} +1 -1
- package/dist/{chunk-a1n0thja.js → chunk-1qwkhbc4.js} +2 -2
- package/dist/{chunk-a1n0thja.js.map → chunk-1qwkhbc4.js.map} +1 -1
- package/dist/{chunk-qn7rr4bw.js → chunk-27pnn95c.js} +2 -2
- package/dist/{chunk-qn7rr4bw.js.map → chunk-27pnn95c.js.map} +1 -1
- package/dist/{chunk-q60vevbt.js → chunk-34s3tfgk.js} +3 -3
- package/dist/{chunk-q60vevbt.js.map → chunk-34s3tfgk.js.map} +1 -1
- package/dist/{chunk-9h0cz1f0.js → chunk-3hfwbp2m.js} +2 -2
- package/dist/{chunk-9h0cz1f0.js.map → chunk-3hfwbp2m.js.map} +1 -1
- package/dist/{chunk-3dd2gwrj.js → chunk-3jyz4378.js} +2 -2
- package/dist/{chunk-3dd2gwrj.js.map → chunk-3jyz4378.js.map} +1 -1
- package/dist/{chunk-t20b1xn4.js → chunk-443yr2km.js} +3 -3
- package/dist/{chunk-t20b1xn4.js.map → chunk-443yr2km.js.map} +1 -1
- package/dist/{chunk-xrd9xx3c.js → chunk-4h7z32zp.js} +3 -3
- package/dist/{chunk-xrd9xx3c.js.map → chunk-4h7z32zp.js.map} +1 -1
- package/dist/{chunk-3nxkn558.js → chunk-5ddn8mfj.js} +2 -2
- package/dist/{chunk-3nxkn558.js.map → chunk-5ddn8mfj.js.map} +1 -1
- package/dist/{chunk-pxfw8dg1.js → chunk-6h5gvcs8.js} +2 -2
- package/dist/{chunk-pxfw8dg1.js.map → chunk-6h5gvcs8.js.map} +1 -1
- package/dist/{chunk-7e4rhaqs.js → chunk-7yhsy039.js} +2 -2
- package/dist/{chunk-7e4rhaqs.js.map → chunk-7yhsy039.js.map} +1 -1
- package/dist/{chunk-zat41156.js → chunk-989rzqd6.js} +3 -3
- package/dist/{chunk-zat41156.js.map → chunk-989rzqd6.js.map} +1 -1
- package/dist/{chunk-hny56r47.js → chunk-9z3y20ms.js} +2 -2
- package/dist/{chunk-hny56r47.js.map → chunk-9z3y20ms.js.map} +1 -1
- package/dist/{chunk-yqb9cpkx.js → chunk-axxbkm30.js} +2 -2
- package/dist/{chunk-yqb9cpkx.js.map → chunk-axxbkm30.js.map} +1 -1
- package/dist/{chunk-mc7nbgct.js → chunk-b941c34r.js} +2 -2
- package/dist/{chunk-mc7nbgct.js.map → chunk-b941c34r.js.map} +1 -1
- package/dist/{chunk-62pzr6vf.js → chunk-bdfdjnht.js} +3 -3
- package/dist/{chunk-62pzr6vf.js.map → chunk-bdfdjnht.js.map} +1 -1
- package/dist/chunk-cr9f0s09.js +5 -0
- package/dist/{chunk-krjkgg9v.js.map → chunk-cr9f0s09.js.map} +1 -1
- package/dist/{chunk-0yfgptrq.js → chunk-dgqqv3pb.js} +2 -2
- package/dist/{chunk-0yfgptrq.js.map → chunk-dgqqv3pb.js.map} +1 -1
- package/dist/{chunk-j9r5w8xf.js → chunk-dmdmt3gw.js} +2 -2
- package/dist/{chunk-j9r5w8xf.js.map → chunk-dmdmt3gw.js.map} +1 -1
- package/dist/chunk-e8z3nyd5.js +19 -0
- package/dist/{chunk-ytt205yt.js.map → chunk-e8z3nyd5.js.map} +8 -7
- package/dist/{chunk-8rqdeyhv.js → chunk-e97kq9tn.js} +2 -2
- package/dist/{chunk-8rqdeyhv.js.map → chunk-e97kq9tn.js.map} +1 -1
- package/dist/{chunk-evbvpfv6.js → chunk-eekg7k6d.js} +1 -1
- package/dist/{chunk-26rqzgsr.js → chunk-ezae18wm.js} +2 -2
- package/dist/{chunk-26rqzgsr.js.map → chunk-ezae18wm.js.map} +1 -1
- package/dist/{chunk-ppscsvv8.js → chunk-f2hkhw76.js} +2 -2
- package/dist/{chunk-ppscsvv8.js.map → chunk-f2hkhw76.js.map} +1 -1
- package/dist/{chunk-d6dz2706.js → chunk-fd0n8sav.js} +2 -2
- package/dist/{chunk-1x8gzkpq.js.map → chunk-fd0n8sav.js.map} +1 -1
- package/dist/{chunk-3sdrj0ma.js → chunk-fmhkn266.js} +2 -2
- package/dist/{chunk-3sdrj0ma.js.map → chunk-fmhkn266.js.map} +1 -1
- package/dist/{chunk-9ecgk1c5.js → chunk-fms4fcd1.js} +2 -2
- package/dist/{chunk-9ecgk1c5.js.map → chunk-fms4fcd1.js.map} +1 -1
- package/dist/{chunk-f90k29w1.js → chunk-fvn78g6k.js} +2 -2
- package/dist/{chunk-f90k29w1.js.map → chunk-fvn78g6k.js.map} +1 -1
- package/dist/{chunk-8ypzxfvx.js → chunk-gzs2y282.js} +2 -2
- package/dist/{chunk-8ypzxfvx.js.map → chunk-gzs2y282.js.map} +1 -1
- package/dist/{chunk-gpys09rg.js → chunk-j1w19cec.js} +3 -3
- package/dist/{chunk-gpys09rg.js.map → chunk-j1w19cec.js.map} +1 -1
- package/dist/{chunk-8jgj7vdp.js → chunk-j8nbjpkg.js} +2 -2
- package/dist/{chunk-8jgj7vdp.js.map → chunk-j8nbjpkg.js.map} +1 -1
- package/dist/{chunk-achgw308.js → chunk-jcq0tbdv.js} +2 -2
- package/dist/{chunk-achgw308.js.map → chunk-jcq0tbdv.js.map} +1 -1
- package/dist/{chunk-9sqw5bjy.js → chunk-m2bmwre5.js} +2 -2
- package/dist/{chunk-9sqw5bjy.js.map → chunk-m2bmwre5.js.map} +1 -1
- package/dist/{chunk-pp9c3f5m.js → chunk-mmhf39tr.js} +2 -2
- package/dist/{chunk-pp9c3f5m.js.map → chunk-mmhf39tr.js.map} +1 -1
- package/dist/{chunk-15gc8m24.js → chunk-n03frt02.js} +2 -2
- package/dist/{chunk-15gc8m24.js.map → chunk-n03frt02.js.map} +1 -1
- package/dist/{chunk-wtwkzgec.js → chunk-njh95es7.js} +2 -2
- package/dist/{chunk-wtwkzgec.js.map → chunk-njh95es7.js.map} +1 -1
- package/dist/{chunk-ngq4n2b3.js → chunk-q0nqypca.js} +2 -2
- package/dist/{chunk-ngq4n2b3.js.map → chunk-q0nqypca.js.map} +1 -1
- package/dist/{chunk-jpej3172.js → chunk-q623tx9p.js} +2 -2
- package/dist/{chunk-jpej3172.js.map → chunk-q623tx9p.js.map} +1 -1
- package/dist/{chunk-dz7b35tn.js → chunk-qgvg10ad.js} +3 -3
- package/dist/{chunk-dz7b35tn.js.map → chunk-qgvg10ad.js.map} +1 -1
- package/dist/{chunk-9p5vwn4d.js → chunk-qjgfrsw7.js} +2 -2
- package/dist/{chunk-9p5vwn4d.js.map → chunk-qjgfrsw7.js.map} +1 -1
- package/dist/{chunk-371tt28q.js → chunk-rkx6qhwg.js} +4 -4
- package/dist/{chunk-371tt28q.js.map → chunk-rkx6qhwg.js.map} +1 -1
- package/dist/{chunk-1k0gv92y.js → chunk-rv9k5bqn.js} +2 -2
- package/dist/{chunk-1k0gv92y.js.map → chunk-rv9k5bqn.js.map} +1 -1
- package/dist/{chunk-407t1q1d.js → chunk-s7hv9qgp.js} +2 -2
- package/dist/{chunk-407t1q1d.js.map → chunk-s7hv9qgp.js.map} +1 -1
- package/dist/{chunk-wbxmwzdb.js → chunk-sbqy6r29.js} +1 -1
- package/dist/{chunk-a82m12q4.js → chunk-sp4wwg7s.js} +3 -3
- package/dist/{chunk-a82m12q4.js.map → chunk-sp4wwg7s.js.map} +1 -1
- package/dist/{chunk-3eejq348.js → chunk-sqvw7rv2.js} +3 -3
- package/dist/{chunk-3eejq348.js.map → chunk-sqvw7rv2.js.map} +1 -1
- package/dist/{chunk-1yr8qejy.js → chunk-ss7ymqfm.js} +2 -2
- package/dist/{chunk-1yr8qejy.js.map → chunk-ss7ymqfm.js.map} +1 -1
- package/dist/{chunk-cr2wpeh5.js → chunk-sww4kgk4.js} +2 -2
- package/dist/{chunk-cr2wpeh5.js.map → chunk-sww4kgk4.js.map} +1 -1
- package/dist/{chunk-4z5qqq1t.js → chunk-tnt0ybj9.js} +2 -2
- package/dist/{chunk-4z5qqq1t.js.map → chunk-tnt0ybj9.js.map} +1 -1
- package/dist/{chunk-pjcdekm1.js → chunk-tpdsfr2k.js} +2 -2
- package/dist/{chunk-pjcdekm1.js.map → chunk-tpdsfr2k.js.map} +1 -1
- package/dist/{chunk-ra1ccnd5.js → chunk-vr84mhmq.js} +2 -2
- package/dist/{chunk-ra1ccnd5.js.map → chunk-vr84mhmq.js.map} +1 -1
- package/dist/{chunk-y3hmzww0.js → chunk-waax3j1k.js} +2 -2
- package/dist/{chunk-y3hmzww0.js.map → chunk-waax3j1k.js.map} +1 -1
- package/dist/{chunk-1x8gzkpq.js → chunk-xzp2ptj5.js} +2 -2
- package/dist/{chunk-d6dz2706.js.map → chunk-xzp2ptj5.js.map} +1 -1
- package/dist/{chunk-ywf0kz71.js → chunk-yaz93haz.js} +2 -2
- package/dist/{chunk-ywf0kz71.js.map → chunk-yaz93haz.js.map} +1 -1
- package/dist/{chunk-1rnzaqpm.js → chunk-yernnzqs.js} +2 -2
- package/dist/{chunk-1rnzaqpm.js.map → chunk-yernnzqs.js.map} +1 -1
- package/dist/{chunk-a4xxmmct.js → chunk-zjg31baf.js} +2 -2
- package/dist/{chunk-a4xxmmct.js.map → chunk-zjg31baf.js.map} +1 -1
- package/dist/{chunk-14pybfjk.js → chunk-zkty5j42.js} +2 -2
- package/dist/{chunk-14pybfjk.js.map → chunk-zkty5j42.js.map} +1 -1
- package/dist/{chunk-g2hwd2ts.js → chunk-zzh52t0y.js} +2 -2
- package/dist/{chunk-g2hwd2ts.js.map → chunk-zzh52t0y.js.map} +1 -1
- package/dist/client/MutationError.d.ts +16 -1
- package/dist/client/MutationError.d.ts.map +1 -1
- package/dist/client/index.js +94 -76
- package/dist/client/index.js.map +1 -1
- package/dist/client/useMutation.d.ts +1 -1
- package/dist/client/useMutation.d.ts.map +1 -1
- 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/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/http/ApiRouter.d.ts +3 -2
- package/dist/http/ApiRouter.d.ts.map +1 -1
- package/dist/http/HttpResponse.d.ts +83 -0
- package/dist/http/HttpResponse.d.ts.map +1 -0
- 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/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/kernel/index.js +2 -2
- package/dist/kernel/index.js.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/index.js +2 -2
- package/dist/services/index.js.map +1 -1
- package/dist/services/queue/queueDriverContract.d.ts +6 -2
- package/dist/services/queue/queueDriverContract.d.ts.map +1 -1
- package/dist/services/queue/work.js +2 -2
- package/dist/services/queue/work.js.map +1 -1
- package/dist/services/router/ApiRouteDispatcher.d.ts.map +1 -1
- package/dist/services/router/serverQueryFetcher.d.ts.map +1 -1
- package/dist/support/index.js +2 -2
- package/dist/support/index.js.map +1 -1
- package/package.json +1 -1
- package/dist/chunk-krjkgg9v.js +0 -5
- package/dist/chunk-ytt205yt.js +0 -19
- /package/dist/{chunk-9gn3x603.js.map → chunk-1ap69pez.js.map} +0 -0
- /package/dist/{chunk-evbvpfv6.js.map → chunk-eekg7k6d.js.map} +0 -0
- /package/dist/{chunk-wbxmwzdb.js.map → chunk-sbqy6r29.js.map} +0 -0
|
@@ -10,6 +10,6 @@
|
|
|
10
10
|
"import type { Dialect } from \"../../database/dialect\";\nimport type { Binder, Fragment } from \"../compile/fragment\";\nimport type { RowLockClause } from \"../compile/lock\";\nimport type { FieldSchema, ScalarType } from \"../schema\";\nimport { PostgresDialect } from \"./postgres\";\nimport { SqliteDialect } from \"./sqlite\";\n\n/**\n * The per-database strategy.\n *\n * The rule this interface exists to enforce: no `if (dialect === \"postgres\")`\n * ever appears inside the compiler. When something genuinely cannot be\n * expressed through the interface, the interface widens — which is why\n * `inList`, `like` and `paginate` return `Fragment`s rather than strings. Each\n * of the three is a place where SQLite and Postgres disagree about *structure*,\n * not just spelling:\n *\n * - `inList` — SQLite expands one placeholder per element, so `in: [1,2]` and\n * `in: [1,2,3]` are different SQL and different plans. Postgres binds the\n * whole array to one parameter with `= any($1)`, so every length shares a\n * single plan and a single prepared statement.\n * - `like` — Postgres has `ilike` for `mode: \"insensitive\"`; SQLite has no\n * equivalent, and Prisma rejects the argument there outright.\n * - `paginate` — SQLite cannot parse `offset` without a preceding `limit`.\n */\nexport interface SqlDialect {\n readonly name: Dialect;\n\n /**\n * Whether `mode: \"insensitive\"` can be expressed at all. False on SQLite,\n * where Prisma rejects the argument rather than emulating it.\n */\n readonly supportsInsensitiveMode: boolean;\n\n /**\n * Whether an `in` list binds as a single parameter however long it is.\n *\n * True on Postgres (`= any($1)`), false on SQLite (`in (?, ?, ?)`). It is the\n * plan *cache* that needs to know: where the length does not change the SQL\n * text, it must not change the cache key either, or every distinct list\n * length mints another entry holding SQL identical to its neighbours'. That\n * matters most for relations, where the list length is the parent row count\n * and so varies with the data rather than with the code.\n */\n readonly bindsListAsOneParameter: boolean;\n\n /**\n * Whether `insert`/`update`/`delete` can return the rows they touched.\n *\n * True on both implemented dialects — Postgres has had `RETURNING` forever,\n * and SQLite since 3.35 (Bun 1.3.14 bundles 3.51.0, verified by querying\n * `sqlite_version()` rather than by reading a changelog).\n *\n * It is a capability rather than an assumption because MySQL and MariaDB have\n * no `RETURNING` at all. Their fallback — `lastInsertRowid` plus a re-select,\n * and no way to identify the rows an `updateMany` touched — is a different\n * statement shape, not a different spelling. Iteration 4 does not build it,\n * but it must stay expressible, so the write compiler asks rather than\n * assumes and raises a clear error when the answer is no.\n */\n readonly supportsReturning: boolean;\n\n /**\n * How many parameters one statement may bind.\n *\n * A hard protocol/driver limit, not a tuning knob: Postgres sends the\n * parameter count as an int16 in the Bind message, and SQLite compiles\n * `SQLITE_MAX_VARIABLE_NUMBER` in.\n *\n * Three shapes can approach it, all of them scaling with the caller's *data*\n * rather than with the query's shape:\n *\n * - `createMany`, at `rows × columns`.\n * - An `in` list on SQLite, which binds one placeholder per element — and\n * such a list is routinely request-derived (`?ids=…`).\n * - A to-many `include` on SQLite, which batches an `in` over the parent\n * keys, so a large enough `findMany` reaches it with no big list in sight.\n *\n * Postgres escapes the last two: `= any($1)` is one parameter however long\n * the array. The check itself lives in `compile/fragment.ts`'s `render`,\n * because that is the one place that sees a statement's final count.\n *\n * It lives *here* rather than as a constant in the compiler for the usual\n * reason: the number differs per dialect, and the compiler is not allowed to\n * know which dialect it is compiling for.\n */\n readonly maxBoundParameters: number;\n\n /**\n * Whether the **statement** decides a parameter's type, so a cast the caller\n * wrote onto their own placeholder changes how the driver encodes the value.\n *\n * True on Postgres: the server describes the statement, the client is told\n * the parameter is `jsonb`, and Bun then JSON-*encodes* whatever JS value it\n * was handed. That is the whole of #376 — the reason `json-param.ts` retypes\n * such a parameter through `text` and serialises it to match.\n *\n * False on SQLite, and not merely because the correction is unnecessary\n * there: it would be **wrong**, and it would not parse. A parameter's type is\n * the bound value's, and `cast(x as json)` is not a JSON cast at all — SQLite\n * takes any type name and applies affinity rules, and a name containing none\n * of INT/CHAR/CLOB/TEXT/BLOB/REAL/FLOA/DOUB gets NUMERIC affinity, so\n * `cast('{\"a\":1}' as json)` is `0`. Measured through `bun:sqlite` (Bun\n * 1.3.14):\n *\n * select cast(? as jsonb) -> 0 (runs)\n * select json_set('{\"a\":1}','$.b', cast(? as json)) -> {\"a\":1,\"b\":2}\n * select cast(? as text)::json -> ERROR unrecognized token: \":\"\n *\n * So the retyping's rewrite — `cast(? as text)::json` — turns a statement\n * that runs on SQLite today into a syntax error. `::` genuinely cannot fire\n * there (it does not parse), but `cast(… as …)` is not Postgres-only syntax,\n * and \"SQLite has no jsonb type\" is a claim about semantics rather than about\n * what the parser accepts. Asking here rather than matching on `name` is what\n * makes that a fact `tsc` and a test can hold.\n */\n readonly typesParametersFromStatement: boolean;\n\n /** Quote a table or column name. Only ever called with names from the schema. */\n quoteIdent(name: string): string;\n\n /**\n * The parameter marker for the `index`-th (0-based) parameter in a statement.\n * SQLite ignores the index and returns `?`; Postgres returns `$1`, `$2`, ...\n */\n placeholder(index: number): string;\n\n /**\n * Prisma-shaped value -> the value the driver must be handed for this field.\n * The mirror of `decode`, and just as load-bearing: Bun's SQLite driver binds\n * a `Date` to `NULL`, so an unencoded `where: { createdAt: date }` would\n * return no rows rather than failing.\n *\n * Applied at bind time, not compile time — it is a function of the value.\n * Which encoder runs is still decided from the schema, so compile stays pure.\n */\n encode(value: unknown, field: FieldSchema): unknown;\n\n /**\n * SQL appended to this field's placeholder, or `\"\"` for none.\n *\n * The one string a dialect contributes to the statement that is not a\n * parameter, so it must be a constant — never derived from a value, and never\n * from anything an application supplies. `fieldParam` is the only caller, and\n * a non-empty cast also means it serialises the value; the two travel\n * together and neither is correct alone (#209).\n */\n castParameter(field: FieldSchema): string;\n\n /**\n * The same, for a value with **no declared column type** — a parameter\n * interpolated into a composed raw fragment, where there is no schema to ask.\n *\n * It exists because \"raw\" cannot mean \"unportable\". Bun's SQLite driver\n * rejects a `Date` outright (`Binding expected string, TypedArray, boolean,\n * number, bigint or null`) while Postgres takes one, so\n * ``sql`where \"createdAt\" > ${date}` `` would work on one dialect and throw on\n * the other — and the caller has no dialect-independent value to reach for\n * instead, because milliseconds are only correct if that is what the ORM\n * stored. Which it is: this converts to exactly what `encode` writes for a\n * `DateTime`, so a raw statement compares against ORM-written rows correctly.\n *\n * Deliberately narrow. It normalises the JavaScript types whose SQL form the\n * ORM has already decided — a `Date`, a boolean — and touches nothing else. A\n * plain object is *not* JSON-encoded here: the compiler only knows to do that\n * because a field says `Json`, and guessing from the value would turn a\n * mistyped parameter into a successfully-written string.\n *\n * The exception is a parameter the *caller* cast to `json`/`jsonb`, which is\n * a declared type by another route and does not reach this at all — see\n * `json-param.ts`. It is still not a guess from the value: the statement says\n * so.\n */\n encodeUntyped(value: unknown): unknown;\n\n /** Driver value -> the value Prisma would have returned for this field. */\n decode(value: unknown, field: FieldSchema): unknown;\n\n /**\n * False when the driver already returns exactly what Prisma would for this\n * field, letting the shaper skip the call entirely on the hot path.\n */\n needsDecode(field: FieldSchema): boolean;\n\n /**\n * `<lhs> in (...)` / `<lhs> not in (...)`.\n *\n * `length` is the element count, which is shape information and is already\n * part of the plan key. `values` returns the whole array at bind time; how it\n * is spread across parameters is the dialect's business.\n */\n inList(\n lhs: string,\n negated: boolean,\n length: number,\n values: Binder,\n ): Fragment;\n\n /** `<lhs> like <pattern>`, case-insensitively when the dialect can. */\n like(lhs: string, insensitive: boolean, pattern: Binder): Fragment;\n\n /**\n * Whether this dialect can match a **tuple** of columns against a list of\n * tuples in a statement whose text does not grow with the list.\n *\n * The single-column case is `inList`, and on Postgres `= any($1)` already\n * gives one SQL text for every length — which is what lets `collapsedList`\n * keep a batched relation query to one plan entry however many parents it\n * has. A relation joining on *more than one* field cannot use it, so the\n * loader falls back to an `OR` of `AND`s whose text does grow, and the plan\n * cache churns with the parent count (#97).\n *\n * `unnest` closes that on Postgres — one array parameter per *column*, so the\n * text is fixed — but it needs each column's SQL type for the cast, and the\n * types are asked about here rather than assumed: a dialect that cannot spell\n * one of them says so and the caller keeps the portable `OR`.\n */\n canBindCompositeIn(types: readonly ScalarType[]): boolean;\n\n /**\n * `(a, b) in (select * from unnest($1::t[], $2::u[]))`.\n *\n * `values` yields one tuple per parent at bind time; the dialect decides how\n * they are transposed into per-column arrays. Only called when\n * {@link canBindCompositeIn} returned true for these types.\n */\n compositeIn(\n columns: readonly string[],\n types: readonly ScalarType[],\n values: Binder,\n ): Fragment;\n\n /**\n * The filters this dialect can apply to a **scalar list** — `tags String[]`.\n *\n * **Empty is the whole of SQLite's answer**, and it is a capability rather\n * than a gap in this ORM: SQLite has no array type, and Prisma refuses the\n * declaration there at validation time — *\"Field `tags` in model `User` can't\n * be a list. The current connector does not support lists of primitive\n * types.\"* So a SQLite database cannot hold such a column to begin with.\n *\n * The refusal lives here rather than in the generator, which is where it used\n * to live (#300). The generated artifact is dialect-agnostic on purpose —\n * `DATABASE_URL` can name a different database than `prisma generate` saw —\n * so a generator that refused a scalar list refused it for Postgres too, and\n * one `String[]` anywhere meant no artifact for *any* model. Asking the\n * dialect at compile time refuses exactly the combination that cannot work,\n * and names it, which is the shape {@link UnsupportedDialectError} already\n * has for the dialects with no compiler at all.\n */\n readonly listFilters: ReadonlySet<string>;\n\n /**\n * `<value> = any(<column>)` — is this element in the list?\n *\n * The mirror of {@link inList} rather than a variant of it, and the two are\n * easy to confuse: there, one column is matched against a caller's list;\n * here, one caller value is matched against a column that *is* a list.\n *\n * **These four take a `Fragment` where every other member here takes a\n * `Binder`**, which is a deliberate exception. A list operand may need a cast\n * on its placeholder — a single element of a `Json[]` needs #209's\n * `::text::jsonb`, and the serialisation that must travel with it — so the\n * parameter is built by `fieldParam` before it arrives and the dialect\n * chooses only the operator. Handing over a `Binder` instead would oblige\n * each dialect to restate `fieldParam`'s rule, and restating it slightly\n * wrong is silent: `$1::jsonb = any(col)` answers *false* where\n * `$1::text::jsonb = any(col)` answers true, with no error on either.\n */\n listHas(column: string, value: Fragment): Fragment;\n\n /** `hasEvery` — every element of the operand is present in the column. */\n listHasEvery(column: string, values: Fragment): Fragment;\n\n /** `hasSome` — the column and the operand share at least one element. */\n listHasSome(column: string, values: Fragment): Fragment;\n\n /**\n * `isEmpty: true`, or its negation when `empty` is false.\n *\n * The odd one out with no operand at all: the value being compared against is\n * the empty list, which is the compiler's own constant rather than the\n * caller's. It stays a bound parameter regardless — see `jsonNullComparison`,\n * which declines the same exception for the same reason.\n */\n listIsEmpty(column: string, empty: boolean): Fragment;\n\n /**\n * The right-hand side of a `push`: the column's current value with the\n * operand appended. An expression rather than a statement, because it is\n * assigned by the write compiler like any other `set` value.\n */\n listPush(column: string, values: Fragment): Fragment;\n\n /**\n * How this dialect spells a JSON path, and which filters it can apply to one.\n *\n * The **path grammar itself differs**, which is unusual enough to be worth\n * stating rather than hiding: Prisma takes `path: [\"a\", \"b\"]` on Postgres and\n * `path: \"$.a.b\"` on SQLite, and refuses the other form on each. That is not\n * a gemi choice — it is the shape the generated client accepts, measured on\n * both — so reproducing it is what \"Prisma-compatible\" means here.\n *\n * `jsonFilters` is the set of scalar filters the dialect can apply to an\n * extracted value. Prisma refuses `array_contains` and the numeric\n * comparisons on SQLite with *\"Unknown argument\"*, so refusing them here is\n * matching it rather than falling short of it.\n */\n readonly jsonPathSyntax: \"array\" | \"jsonpath\";\n readonly jsonFilters: ReadonlySet<string>;\n\n /**\n * Whether an extracted value compares as **text**.\n *\n * Postgres's `#>>` yields `text`, so `equals: 3` has to bind `\"3\"` — comparing\n * text to an integer parameter is a type error there. SQLite's `json_extract`\n * yields a native value, so the same filter has to bind `3`: bind `\"3\"` and\n * SQLite compares an INTEGER to a TEXT, which is silently *false* rather than\n * an error. One filter, two encodings, and the wrong one is a returned-no-rows\n * bug on one dialect and a raised error on the other.\n */\n readonly jsonComparesAsText: boolean;\n\n /**\n * The extracted value, as a fragment whose path is **bound**.\n *\n * A JSON path is the one place a caller's *value* decides part of an\n * expression's meaning, which makes it the obvious place to interpolate by\n * accident and break invariant 2. Both dialects can take it as a parameter —\n * Postgres's `#>` accepts a `text[]`, SQLite's `json_extract` a string — so\n * nothing has to be bent to keep it out of the SQL text.\n *\n * `asText` picks the extraction that yields SQL text rather than JSON. Every\n * comparison in `jsonComparison` passes `true` — the string filters compare\n * against text, and `equals` / `not` / the numeric operators compare an\n * extracted *scalar*, which is what the text form gives them. The JSON form\n * has exactly one caller, `jsonArrayContains`, because containment is the one\n * operator whose right-hand side is a document.\n *\n * SQLite ignores the flag: `json_extract` already yields a SQL value rather\n * than a JSON document for a scalar at the path. That is why the null\n * sentinels need {@link jsonValueAt} instead of this — see there.\n */\n jsonExtract(column: string, path: Binder, asText: boolean): Fragment;\n\n /** `<extracted> @> <value>` — Postgres only; see `jsonFilters`. */\n jsonArrayContains(column: string, path: Binder, value: Binder): Fragment;\n\n /**\n * The value at `path` **as JSON**, in the form two JSON values compare in.\n *\n * The difference from {@link jsonExtract} is the whole of #407, and it is the\n * distinction the null sentinels are made of. Both dialects have an\n * extraction that collapses \"the key is absent\" into \"the key holds the JSON\n * value `null`\", and both have one that does not:\n *\n * | | collapses | keeps the distinction |\n * | --- | --- | --- |\n * | postgres | `#>>` (text) | `#>` (jsonb) |\n * | sqlite | `json_extract` | `->` (JSON text) |\n *\n * `jsonExtract` is the left column at `asText: true`, which is what every\n * scalar comparison wants — a value to compare, not a document. This is the\n * right column, and it is what lets `equals: DbNull` compile to\n * `<value at path> is null` while `equals: JsonNull` compiles to\n * `<value at path> = <the JSON null>`. Refusing them because `#>>` cannot\n * tell the two apart was true of `#>>` and not of the dialect.\n *\n * **Postgres casts and SQLite does not**, and the cast is not decoration:\n * `#>` on a `json` column (a `@db.Json` field) yields `json`, which has no\n * equality operator at all — *\"operator does not exist: json = jsonb\"*, a\n * raised error rather than a wrong answer, but still one Prisma does not\n * raise. Prisma emits `(…#>…)::jsonb` for exactly this reason and so does\n * this. SQLite's `->` already yields the JSON text form.\n *\n * Bound, never interpolated, for the same reason `jsonExtract` is.\n */\n jsonValueAt(column: string, path: Binder): Fragment;\n\n /**\n * `limit`/`offset`. Both are values and therefore parameters — this is the\n * single most tempting place in the compiler to inline a number.\n */\n paginate(take: Binder | null, skip: Binder | null): Fragment;\n\n /**\n * The clause that makes an insert skip rows violating a unique constraint —\n * `createMany({ skipDuplicates: true })` — or `null` where it is not offered.\n *\n * **`null` is a parity decision, not a missing feature**, and that is worth\n * knowing before someone \"fixes\" SQLite by returning `insert or ignore`.\n * SQLite has `on conflict do nothing` and has since 3.24; Prisma nonetheless\n * rejects the *argument* on SQLite — `Unknown argument 'skipDuplicates'`,\n * whatever its value, verified against a generated 6.19 client. Offering it\n * here would make gemi a silent superset of Prisma on the one dialect the\n * differential harness could then no longer compare, which is the trade this\n * project has declined every other time it came up.\n *\n * A method rather than a boolean because the SQL differs where it exists, and\n * a `Fragment` because everything the compiler emits is one.\n */\n ignoreConflicts(): Fragment | null;\n\n /**\n * The clause a locking read ends with — `lock: \"update\"` on a `findMany` —\n * naming `table` as the only table whose rows are locked.\n *\n * Scoped to the root table (`for update of \"User\"`) rather than left bare,\n * because a folded `include` puts a lateral subquery in the `from` clause and\n * Postgres refuses to lock through one (`FOR UPDATE is not allowed with\n * aggregate functions`). Scoping it also matches the documented contract on\n * both strategies: the root rows are locked, related rows never are.\n *\n * **Empty on SQLite, and that is a decision.** SQLite has no row locks, and\n * does not need them for what a locking read is for: its transactions are\n * serializable, with one writer at a time on the whole database, so the lost\n * update a row lock prevents cannot happen there. Two transactions that race\n * wait on (or fail with `SQLITE_BUSY` on) the database lock instead of the\n * row's, and `skipLocked` / `noWait` have no row lock to react to. Refusing\n * would stop code that runs on Postgres in production from running against\n * SQLite in development and tests, for no gain. The one misuse that matters\n * on both — a lock outside a transaction — is refused in `Model.$execute`\n * on every dialect.\n */\n rowLock(lock: RowLockClause, table: string): Fragment;\n\n /**\n * Recognise a driver error as a constraint violation, and say which columns\n * it names.\n *\n * Returns `null` for anything else, including the *other* constraint kinds:\n * SQLite reports NOT NULL and FOREIGN KEY failures through the same exception\n * type, and reporting one of those as a duplicate-key error would send a\n * caller looking for a row that does not exist.\n *\n * Columns, not fields — the driver only knows the database's names. The\n * caller maps them back through the schema, where `@map` is in scope.\n */\n constraintViolation(error: unknown): ConstraintViolation | null;\n}\n\n/** A driver error identified as a constraint failure, in dialect-neutral terms. */\nexport interface ConstraintViolation {\n /** Only `unique` is translated today; the rest surface as the raw error. */\n kind: \"unique\";\n /** Database column names, in the order the driver reported them. */\n columns: string[];\n /** The constraint's own name, when the driver gives one. Postgres does. */\n constraint?: string;\n}\n\n/**\n * The ORM was asked to compile against a dialect it does not implement.\n *\n * **The split this message has to convey**, because it is the surprising part:\n * `DatabaseManager` connects to MySQL and MariaDB perfectly well — Bun's client\n * speaks all four — so raw SQL through `DB.query` / `DB.sql` works, and\n * transactions work. What does not exist is a `SqlDialect` for them, so\n * everything that *compiles* a statement stops here.\n *\n * A caller who reads only \"not supported\" reasonably concludes the connection\n * is unusable, which is wrong and is the more expensive misreading: it is the\n * ORM that is unavailable, not the database.\n */\nexport class UnsupportedDialectError extends Error {\n constructor(dialect: Dialect) {\n super(\n `The gemi ORM does not support the '${dialect}' dialect. Only sqlite ` +\n `and postgres are implemented — see the supported matrix in ` +\n `docs/orm.md.\\n\\n` +\n `The *connection* is fine: Bun's client speaks ${dialect}, so raw SQL ` +\n `through DB.query / DB.sql and transactions all work. It is the query ` +\n `compiler that has no ${dialect} dialect, so every model operation ` +\n `raises this.\\n\\n` +\n `Point DATABASE_URL at Postgres or SQLite to use the ORM, or keep ` +\n `using Prisma's own client for this database.`,\n );\n this.name = \"UnsupportedDialectError\";\n }\n}\n\n/**\n * Whether the ORM can compile for this dialect at all.\n *\n * Exported so an application can find out at **boot** rather than on its first\n * query. That is the whole gap this closes: `DatabaseManager` constructs\n * happily against MySQL, so a deploy pointed at one starts, passes a health\n * check, serves traffic, and fails on the first model read — which is the\n * latest and most expensive moment to learn it.\n */\nexport function ormSupports(dialect: Dialect): boolean {\n return COMPILERS[dialect] !== null;\n}\n\n/** Every dialect `Dialect` names, for anything that has to walk them all. */\nexport function everyDialect(): Dialect[] {\n return Object.keys(COMPILERS) as Dialect[];\n}\n\n/**\n * The compiler for each dialect, or `null` where the ORM has none.\n *\n * **One map rather than two lists, and `satisfies` rather than a lookup.** The\n * supported set used to be written three times — `ormSupports`' `||` chain,\n * `dialectFor`'s `if` chain, and a test enumerating a hand-written copy of the\n * `Dialect` union — so adding a fifth member to that union changed nothing\n * anywhere: `tsc` clean, tests green, the new dialect silently reported as\n * unsupported by one function and unknown to the other.\n *\n * That moment is exactly what the guard exists for. Adding a dialect to the\n * union is the *first step of implementing one*, and it is the step where a\n * half-added dialect would disagree with itself.\n *\n * `satisfies Record<Dialect, …>` makes it a compile error in a file the build\n * actually checks. It has to live here rather than in a test: `tsconfig.json`\n * excludes test files and vitest transpiles without type-checking, so an\n * exhaustiveness check written there is a type error nothing ever evaluates.\n *\n * The sixth thing in this codebase made `tsc`'s job rather than a convention's\n * — see the note on `resolveLink`'s `operation`.\n */\nconst COMPILERS = {\n sqlite: new SqliteDialect(),\n postgres: new PostgresDialect(),\n // Bun's client speaks both; the ORM has no compiler for either. See\n // `UnsupportedDialectError`, which is careful to say that the *connection*\n // still works.\n mysql: null,\n mariadb: null,\n} satisfies Record<Dialect, SqlDialect | null>;\n\n/**\n * Resolved per call from `DatabaseManager.dialect`, never baked into a\n * generated artifact — `DATABASE_URL` can point at a different database than\n * the one `prisma generate` saw.\n */\nexport function dialectFor(dialect: Dialect): SqlDialect {\n const compiler = COMPILERS[dialect];\n if (compiler === null) throw new UnsupportedDialectError(dialect);\n return compiler;\n}\n\nexport { PostgresDialect, SqliteDialect };\n"
|
|
11
11
|
],
|
|
12
12
|
"mappings": ";AAQO,MAAM,UAA8B,KAAM,CAE7B,SACA,MACA,UAHlB,WAAW,CACO,EACA,EACA,EAsBhB,EACA,CACA,MACE,8BAA8B,WAAkB,KAAS,OACvD,CACJ,EA7BgB,gBACA,aACA,iBA4BhB,KAAK,KAAO,wBAEhB,CAuDO,MAAM,UAA6B,CAAsB,CAC9D,WAAW,CACT,EACA,EACA,EAEA,EACA,CACA,MAAM,EAAU,EAAO,EAAW,CAAM,EACxC,KAAK,KAAO,uBACZ,KAAK,QAAU,YAAY,OAAc,KAAS,OAAe,IAErE,CAEO,MAAM,UAAiC,CAAsB,CAClE,WAAW,CACT,EACA,EACA,EAEA,EACA,CACA,MAAM,EAAU,EAAO,EAAW,CAAM,EACxC,KAAK,KAAO,2BACZ,KAAK,QACH,gCAAgC,OAAc,KAAS,iDACV,IAEnD,CAOO,MAAM,UAA0B,KAAM,CAEzB,MACA,MAFlB,WAAW,CACO,EACA,EAChB,EACA,CACA,MACE,IAAI,8BAAkC,oBACnB,EAAM,KAAK,IAAI,IACpC,EAPgB,aACA,aAOhB,KAAK,KAAO,oBAEhB,CAYO,MAAM,UAAoB,KAAM,CAEnB,MACA,MAFlB,WAAW,CACO,EACA,EAChB,CACA,MACE,8BAA8B,KAAK,UAAU,OAAO,CAAK,CAAC,kBACpD,EAAM,cAAc,EAAM,4CAC9B,6EACA,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AAW,CAAC,EAA2B,CACrD,OAAO,EAAU,KAAa,KAIzB,SAAS,EAAY,EAAc,CACxC,OAAO,OAAO,KAAK,CAAS,EAyB9B,IAAM,EAAY,CAChB,OAAQ,IAAI,EACZ,SAAU,IAAI,EAId,MAAO,KACP,QAAS,IACX,EAOO,SAAS,EAAU,CAAC,EAA8B,CACvD,IAAM,EAAW,EAAU,GAC3B,GAAI,IAAa,KAAM,MAAM,IAAI,EAAwB,CAAO,EAChE,OAAO",
|
|
13
|
-
"debugId": "
|
|
13
|
+
"debugId": "A42C945FC253F8E764756E2164756E21",
|
|
14
14
|
"names": []
|
|
15
15
|
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
// @bun
|
|
2
|
-
import{
|
|
2
|
+
import{Gg as cJ,Hg as E,Kg as LE}from"./chunk-xzp2ptj5.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=592250253B76A41D64756E2164756E21
|